OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef VM_DEBUGGER_H_ | 5 #ifndef VM_DEBUGGER_H_ |
6 #define VM_DEBUGGER_H_ | 6 #define VM_DEBUGGER_H_ |
7 | 7 |
8 #include "include/dart_tools_api.h" | 8 #include "include/dart_tools_api.h" |
9 | 9 |
10 #include "vm/object.h" | 10 #include "vm/object.h" |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 | 488 |
489 // Pause execution for a breakpoint. Called from generated code. | 489 // Pause execution for a breakpoint. Called from generated code. |
490 RawError* PauseBreakpoint(); | 490 RawError* PauseBreakpoint(); |
491 | 491 |
492 // Pause execution due to stepping. Called from generated code. | 492 // Pause execution due to stepping. Called from generated code. |
493 RawError* PauseStepping(); | 493 RawError* PauseStepping(); |
494 | 494 |
495 // Pause execution due to isolate interrupt. | 495 // Pause execution due to isolate interrupt. |
496 RawError* PauseInterrupted(); | 496 RawError* PauseInterrupted(); |
497 | 497 |
| 498 // Pause after a reload request. |
| 499 RawError* PausePostRequest(); |
| 500 |
498 // Pause execution due to an uncaught exception. | 501 // Pause execution due to an uncaught exception. |
499 void PauseException(const Instance& exc); | 502 void PauseException(const Instance& exc); |
500 | 503 |
501 // Pause execution due to a call to the debugger() function from | 504 // Pause execution due to a call to the debugger() function from |
502 // Dart. | 505 // Dart. |
503 void PauseDeveloper(const String& msg); | 506 void PauseDeveloper(const String& msg); |
504 | 507 |
505 RawCode* GetPatchedStubAddress(uword breakpoint_address); | 508 RawCode* GetPatchedStubAddress(uword breakpoint_address); |
506 | 509 |
507 void PrintBreakpointsToJSONArray(JSONArray* jsarr) const; | 510 void PrintBreakpointsToJSONArray(JSONArray* jsarr) const; |
508 void PrintSettingsToJSONObject(JSONObject* jsobj) const; | 511 void PrintSettingsToJSONObject(JSONObject* jsobj) const; |
509 | 512 |
510 static bool IsDebuggable(const Function& func); | 513 static bool IsDebuggable(const Function& func); |
511 | 514 |
512 intptr_t limitBreakpointId() { return next_id_; } | 515 intptr_t limitBreakpointId() { return next_id_; } |
513 | 516 |
514 private: | 517 private: |
515 enum ResumeAction { | 518 enum ResumeAction { |
516 kContinue, | 519 kContinue, |
517 kStepOver, | 520 kStepOver, |
518 kStepOut, | 521 kStepOut, |
519 kSingleStep | 522 kSingleStep |
520 }; | 523 }; |
521 | 524 |
| 525 RawError* PauseRequest(ServiceEvent::EventKind kind); |
| 526 |
522 bool NeedsIsolateEvents(); | 527 bool NeedsIsolateEvents(); |
523 bool NeedsDebugEvents(); | 528 bool NeedsDebugEvents(); |
524 void InvokeEventHandler(ServiceEvent* event); | 529 void InvokeEventHandler(ServiceEvent* event); |
525 | 530 |
526 void SendBreakpointEvent(ServiceEvent::EventKind kind, Breakpoint* bpt); | 531 void SendBreakpointEvent(ServiceEvent::EventKind kind, Breakpoint* bpt); |
527 | 532 |
528 bool IsAtAsyncJump(ActivationFrame* top_frame); | 533 bool IsAtAsyncJump(ActivationFrame* top_frame); |
529 void FindCompiledFunctions(const Script& script, | 534 void FindCompiledFunctions(const Script& script, |
530 TokenPosition start_pos, | 535 TokenPosition start_pos, |
531 TokenPosition end_pos, | 536 TokenPosition end_pos, |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 | 648 |
644 friend class Isolate; | 649 friend class Isolate; |
645 friend class BreakpointLocation; | 650 friend class BreakpointLocation; |
646 DISALLOW_COPY_AND_ASSIGN(Debugger); | 651 DISALLOW_COPY_AND_ASSIGN(Debugger); |
647 }; | 652 }; |
648 | 653 |
649 | 654 |
650 } // namespace dart | 655 } // namespace dart |
651 | 656 |
652 #endif // VM_DEBUGGER_H_ | 657 #endif // VM_DEBUGGER_H_ |
OLD | NEW |