| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 // ActivationFrame represents one dart function activation frame | 48 // ActivationFrame represents one dart function activation frame |
| 49 // on the call stack. | 49 // on the call stack. |
| 50 class ActivationFrame : public ZoneAllocated { | 50 class ActivationFrame : public ZoneAllocated { |
| 51 public: | 51 public: |
| 52 explicit ActivationFrame(uword pc); | 52 explicit ActivationFrame(uword pc); |
| 53 | 53 |
| 54 uword pc() const { return pc_; } | 54 uword pc() const { return pc_; } |
| 55 | 55 |
| 56 RawFunction* DartFunction(); | 56 RawFunction* DartFunction(); |
| 57 RawString* QualifiedFunctionName(); |
| 57 RawString* SourceUrl(); | 58 RawString* SourceUrl(); |
| 58 RawScript* SourceScript(); | 59 RawScript* SourceScript(); |
| 59 intptr_t TokenIndex(); | 60 intptr_t TokenIndex(); |
| 60 intptr_t LineNumber(); | 61 intptr_t LineNumber(); |
| 61 const char* ToCString(); | 62 const char* ToCString(); |
| 62 | 63 |
| 63 // Returns an array of String values containing variable names | 64 // Returns an array of String values containing variable names |
| 64 // in this activation frame. | 65 // in this activation frame. |
| 65 RawArray* Variables(); | 66 RawArray* Variables(); |
| 66 | 67 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 Breakpoint* SetBreakpointAtEntry(const Function& target_function); | 119 Breakpoint* SetBreakpointAtEntry(const Function& target_function); |
| 119 | 120 |
| 120 void VisitObjectPointers(ObjectPointerVisitor* visitor); | 121 void VisitObjectPointers(ObjectPointerVisitor* visitor); |
| 121 | 122 |
| 122 // Returns NULL if no breakpoint exists for the given address. | 123 // Returns NULL if no breakpoint exists for the given address. |
| 123 Breakpoint* GetBreakpoint(uword breakpoint_address); | 124 Breakpoint* GetBreakpoint(uword breakpoint_address); |
| 124 | 125 |
| 125 // Called from Runtime when a breakpoint in Dart code is reached. | 126 // Called from Runtime when a breakpoint in Dart code is reached. |
| 126 void BreakpointCallback(); | 127 void BreakpointCallback(); |
| 127 | 128 |
| 129 // Utility functions. |
| 130 static const char* QualifiedFunctionName(const Function& func); |
| 131 |
| 128 private: | 132 private: |
| 129 void AddBreakpoint(Breakpoint* bpt); | 133 void AddBreakpoint(Breakpoint* bpt); |
| 130 | 134 |
| 131 bool initialized_; | 135 bool initialized_; |
| 132 BreakpointHandler* bp_handler_; | 136 BreakpointHandler* bp_handler_; |
| 133 Breakpoint* breakpoints_; | 137 Breakpoint* breakpoints_; |
| 134 DISALLOW_COPY_AND_ASSIGN(Debugger); | 138 DISALLOW_COPY_AND_ASSIGN(Debugger); |
| 135 }; | 139 }; |
| 136 | 140 |
| 137 | 141 |
| 138 } // namespace dart | 142 } // namespace dart |
| 139 | 143 |
| 140 #endif // VM_DEBUGGER_H_ | 144 #endif // VM_DEBUGGER_H_ |
| OLD | NEW |