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_debugger_api.h" | 8 #include "include/dart_debugger_api.h" |
9 | 9 |
10 #include "vm/object.h" | 10 #include "vm/object.h" |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 | 447 |
448 bool IsPaused() const { return pause_event_ != NULL; } | 448 bool IsPaused() const { return pause_event_ != NULL; } |
449 | 449 |
450 // Indicates why the debugger is currently paused. If the debugger | 450 // Indicates why the debugger is currently paused. If the debugger |
451 // is not paused, this returns NULL. Note that the debugger can be | 451 // is not paused, this returns NULL. Note that the debugger can be |
452 // paused for breakpoints, isolate interruption, and (sometimes) | 452 // paused for breakpoints, isolate interruption, and (sometimes) |
453 // exceptions. | 453 // exceptions. |
454 const DebuggerEvent* PauseEvent() const { return pause_event_; } | 454 const DebuggerEvent* PauseEvent() const { return pause_event_; } |
455 | 455 |
456 void SetExceptionPauseInfo(Dart_ExceptionPauseInfo pause_info); | 456 void SetExceptionPauseInfo(Dart_ExceptionPauseInfo pause_info); |
457 Dart_ExceptionPauseInfo GetExceptionPauseInfo(); | 457 Dart_ExceptionPauseInfo GetExceptionPauseInfo() const; |
458 | 458 |
459 void VisitObjectPointers(ObjectPointerVisitor* visitor); | 459 void VisitObjectPointers(ObjectPointerVisitor* visitor); |
460 | 460 |
461 // Called from Runtime when a breakpoint in Dart code is reached. | 461 // Called from Runtime when a breakpoint in Dart code is reached. |
462 void BreakpointCallback(); | 462 void BreakpointCallback(); |
463 | 463 |
464 // Returns true if there is at least one breakpoint set in func or code. | 464 // Returns true if there is at least one breakpoint set in func or code. |
465 // Checks for both user-defined and internal temporary breakpoints. | 465 // Checks for both user-defined and internal temporary breakpoints. |
466 bool HasBreakpoint(const Function& func); | 466 bool HasBreakpoint(const Function& func); |
467 bool HasBreakpoint(const Code& code); | 467 bool HasBreakpoint(const Code& code); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 | 509 |
510 void BreakHere(const String& msg); | 510 void BreakHere(const String& msg); |
511 | 511 |
512 void SignalExceptionThrown(const Instance& exc); | 512 void SignalExceptionThrown(const Instance& exc); |
513 void SignalIsolateEvent(DebuggerEvent::EventType type); | 513 void SignalIsolateEvent(DebuggerEvent::EventType type); |
514 static void SignalIsolateInterrupted(); | 514 static void SignalIsolateInterrupted(); |
515 | 515 |
516 uword GetPatchedStubAddress(uword breakpoint_address); | 516 uword GetPatchedStubAddress(uword breakpoint_address); |
517 | 517 |
518 void PrintBreakpointsToJSONArray(JSONArray* jsarr) const; | 518 void PrintBreakpointsToJSONArray(JSONArray* jsarr) const; |
| 519 void PrintSettingsToJSONObject(JSONObject* jsobj) const; |
519 | 520 |
520 static bool IsDebuggable(const Function& func); | 521 static bool IsDebuggable(const Function& func); |
521 | 522 |
522 private: | 523 private: |
523 enum ResumeAction { | 524 enum ResumeAction { |
524 kContinue, | 525 kContinue, |
525 kStepOver, | 526 kStepOver, |
526 kStepOut, | 527 kStepOut, |
527 kSingleStep | 528 kSingleStep |
528 }; | 529 }; |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 | 632 |
632 friend class Isolate; | 633 friend class Isolate; |
633 friend class BreakpointLocation; | 634 friend class BreakpointLocation; |
634 DISALLOW_COPY_AND_ASSIGN(Debugger); | 635 DISALLOW_COPY_AND_ASSIGN(Debugger); |
635 }; | 636 }; |
636 | 637 |
637 | 638 |
638 } // namespace dart | 639 } // namespace dart |
639 | 640 |
640 #endif // VM_DEBUGGER_H_ | 641 #endif // VM_DEBUGGER_H_ |
OLD | NEW |