| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 void RemoveBreakpoint(Breakpoint* bpt); | 137 void RemoveBreakpoint(Breakpoint* bpt); |
| 138 | 138 |
| 139 void VisitObjectPointers(ObjectPointerVisitor* visitor); | 139 void VisitObjectPointers(ObjectPointerVisitor* visitor); |
| 140 | 140 |
| 141 // Returns NULL if no breakpoint exists for the given address. | 141 // Returns NULL if no breakpoint exists for the given address. |
| 142 Breakpoint* GetBreakpoint(uword breakpoint_address); | 142 Breakpoint* GetBreakpoint(uword breakpoint_address); |
| 143 | 143 |
| 144 // Called from Runtime when a breakpoint in Dart code is reached. | 144 // Called from Runtime when a breakpoint in Dart code is reached. |
| 145 void BreakpointCallback(); | 145 void BreakpointCallback(); |
| 146 | 146 |
| 147 RawArray* GetInstanceFields(const Instance& obj); |
| 148 RawArray* GetStaticFields(const Class& cls); |
| 149 |
| 147 // Utility functions. | 150 // Utility functions. |
| 148 static const char* QualifiedFunctionName(const Function& func); | 151 static const char* QualifiedFunctionName(const Function& func); |
| 149 | 152 |
| 153 RawObject* GetInstanceField(const Class& cls, |
| 154 const String& field_name, |
| 155 const Instance& object); |
| 156 RawObject* GetStaticField(const Class& cls, |
| 157 const String& field_name); |
| 158 |
| 150 private: | 159 private: |
| 151 Breakpoint* SetBreakpoint(const Function& target_function, | 160 Breakpoint* SetBreakpoint(const Function& target_function, |
| 152 intptr_t token_index); | 161 intptr_t token_index); |
| 153 void UnsetBreakpoint(Breakpoint* bpt); | 162 void UnsetBreakpoint(Breakpoint* bpt); |
| 154 Breakpoint* NewBreakpoint(const Function& func, intptr_t pc_desc_index); | 163 Breakpoint* NewBreakpoint(const Function& func, intptr_t pc_desc_index); |
| 155 void RegisterBreakpoint(Breakpoint* bpt); | 164 void RegisterBreakpoint(Breakpoint* bpt); |
| 156 Breakpoint* GetBreakpointByFunction(const Function& func, | 165 Breakpoint* GetBreakpointByFunction(const Function& func, |
| 157 intptr_t token_index); | 166 intptr_t token_index); |
| 158 | 167 |
| 168 Isolate* isolate_; |
| 159 bool initialized_; | 169 bool initialized_; |
| 160 BreakpointHandler* bp_handler_; | 170 BreakpointHandler* bp_handler_; |
| 161 Breakpoint* breakpoints_; | 171 Breakpoint* breakpoints_; |
| 162 DISALLOW_COPY_AND_ASSIGN(Debugger); | 172 DISALLOW_COPY_AND_ASSIGN(Debugger); |
| 163 }; | 173 }; |
| 164 | 174 |
| 165 | 175 |
| 166 } // namespace dart | 176 } // namespace dart |
| 167 | 177 |
| 168 #endif // VM_DEBUGGER_H_ | 178 #endif // VM_DEBUGGER_H_ |
| OLD | NEW |