| 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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 void SetExceptionPauseInfo(Dart_ExceptionPauseInfo pause_info); | 508 void SetExceptionPauseInfo(Dart_ExceptionPauseInfo pause_info); |
| 509 Dart_ExceptionPauseInfo GetExceptionPauseInfo() const; | 509 Dart_ExceptionPauseInfo GetExceptionPauseInfo() const; |
| 510 | 510 |
| 511 void VisitObjectPointers(ObjectPointerVisitor* visitor); | 511 void VisitObjectPointers(ObjectPointerVisitor* visitor); |
| 512 | 512 |
| 513 // Called from Runtime when a breakpoint in Dart code is reached. | 513 // Called from Runtime when a breakpoint in Dart code is reached. |
| 514 void BreakpointCallback(); | 514 void BreakpointCallback(); |
| 515 | 515 |
| 516 // Returns true if there is at least one breakpoint set in func or code. | 516 // Returns true if there is at least one breakpoint set in func or code. |
| 517 // Checks for both user-defined and internal temporary breakpoints. | 517 // Checks for both user-defined and internal temporary breakpoints. |
| 518 bool HasBreakpoint(const Function& func); | 518 // This may be called from different threads, therefore do not use the, |
| 519 // debugger's zone. |
| 520 bool HasBreakpoint(const Function& func, Zone* zone); |
| 519 bool HasBreakpoint(const Code& code); | 521 bool HasBreakpoint(const Code& code); |
| 520 | 522 |
| 521 // Returns true if the call at address pc is patched to point to | 523 // Returns true if the call at address pc is patched to point to |
| 522 // a debugger stub. | 524 // a debugger stub. |
| 523 bool HasActiveBreakpoint(uword pc); | 525 bool HasActiveBreakpoint(uword pc); |
| 524 | 526 |
| 525 // Returns a stack trace with frames corresponding to invisible functions | 527 // Returns a stack trace with frames corresponding to invisible functions |
| 526 // omitted. CurrentStackTrace always returns a new trace on the current stack. | 528 // omitted. CurrentStackTrace always returns a new trace on the current stack. |
| 527 // The trace returned by StackTrace may have been cached; it is suitable for | 529 // The trace returned by StackTrace may have been cached; it is suitable for |
| 528 // use when stepping, but otherwise may be out of sync with the current stack. | 530 // use when stepping, but otherwise may be out of sync with the current stack. |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 const Library& lib, | 645 const Library& lib, |
| 644 const String& prefix, | 646 const String& prefix, |
| 645 bool include_private_fields); | 647 bool include_private_fields); |
| 646 | 648 |
| 647 // Handles any events which pause vm execution. Breakpoints, | 649 // Handles any events which pause vm execution. Breakpoints, |
| 648 // interrupts, etc. | 650 // interrupts, etc. |
| 649 void Pause(DebuggerEvent* event); | 651 void Pause(DebuggerEvent* event); |
| 650 | 652 |
| 651 void HandleSteppingRequest(DebuggerStackTrace* stack_trace); | 653 void HandleSteppingRequest(DebuggerStackTrace* stack_trace); |
| 652 | 654 |
| 653 Zone* zone() const { | |
| 654 return isolate_->current_zone(); | |
| 655 } | |
| 656 | |
| 657 Isolate* isolate_; | 655 Isolate* isolate_; |
| 658 Dart_Port isolate_id_; // A unique ID for the isolate in the debugger. | 656 Dart_Port isolate_id_; // A unique ID for the isolate in the debugger. |
| 659 bool initialized_; | 657 bool initialized_; |
| 660 | 658 |
| 661 // ID number generator. | 659 // ID number generator. |
| 662 intptr_t next_id_; | 660 intptr_t next_id_; |
| 663 | 661 |
| 664 BreakpointLocation* latent_locations_; | 662 BreakpointLocation* latent_locations_; |
| 665 BreakpointLocation* breakpoint_locations_; | 663 BreakpointLocation* breakpoint_locations_; |
| 666 CodeBreakpoint* code_breakpoints_; | 664 CodeBreakpoint* code_breakpoints_; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 696 | 694 |
| 697 friend class Isolate; | 695 friend class Isolate; |
| 698 friend class BreakpointLocation; | 696 friend class BreakpointLocation; |
| 699 DISALLOW_COPY_AND_ASSIGN(Debugger); | 697 DISALLOW_COPY_AND_ASSIGN(Debugger); |
| 700 }; | 698 }; |
| 701 | 699 |
| 702 | 700 |
| 703 } // namespace dart | 701 } // namespace dart |
| 704 | 702 |
| 705 #endif // VM_DEBUGGER_H_ | 703 #endif // VM_DEBUGGER_H_ |
| OLD | NEW |