| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 "vm/object.h" | 8 #include "vm/object.h" |
| 9 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 102 |
| 103 | 103 |
| 104 class Debugger { | 104 class Debugger { |
| 105 public: | 105 public: |
| 106 Debugger(); | 106 Debugger(); |
| 107 | 107 |
| 108 void Initialize(Isolate* isolate); | 108 void Initialize(Isolate* isolate); |
| 109 | 109 |
| 110 void SetBreakpointHandler(BreakpointHandler* handler); | 110 void SetBreakpointHandler(BreakpointHandler* handler); |
| 111 | 111 |
| 112 RawFunction* ResolveFunction(const Library& library, |
| 113 const String& class_name, |
| 114 const String& function_name); |
| 115 |
| 112 // Set breakpoint at closest location to function entry. | 116 // Set breakpoint at closest location to function entry. |
| 113 void SetBreakpointAtEntry(const String& class_name, | 117 Breakpoint* SetBreakpointAtEntry(const Function& target_function); |
| 114 const String& function_name); | |
| 115 | 118 |
| 116 void VisitObjectPointers(ObjectPointerVisitor* visitor); | 119 void VisitObjectPointers(ObjectPointerVisitor* visitor); |
| 117 | 120 |
| 118 // Returns NULL if no breakpoint exists for the given address. | 121 // Returns NULL if no breakpoint exists for the given address. |
| 119 Breakpoint* GetBreakpoint(uword breakpoint_address); | 122 Breakpoint* GetBreakpoint(uword breakpoint_address); |
| 120 | 123 |
| 121 // Called from Runtime when a breakpoint in Dart code is reached. | 124 // Called from Runtime when a breakpoint in Dart code is reached. |
| 122 void BreakpointCallback(); | 125 void BreakpointCallback(); |
| 123 | 126 |
| 124 private: | 127 private: |
| 125 void AddBreakpoint(Breakpoint* bpt); | 128 void AddBreakpoint(Breakpoint* bpt); |
| 126 | 129 |
| 127 bool initialized_; | 130 bool initialized_; |
| 128 BreakpointHandler* bp_handler_; | 131 BreakpointHandler* bp_handler_; |
| 129 Breakpoint* breakpoints_; | 132 Breakpoint* breakpoints_; |
| 130 DISALLOW_COPY_AND_ASSIGN(Debugger); | 133 DISALLOW_COPY_AND_ASSIGN(Debugger); |
| 131 }; | 134 }; |
| 132 | 135 |
| 133 | 136 |
| 134 } // namespace dart | 137 } // namespace dart |
| 135 | 138 |
| 136 #endif // VM_DEBUGGER_H_ | 139 #endif // VM_DEBUGGER_H_ |
| OLD | NEW |