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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 bool IsInternal() const { return bpt_location_ == NULL; } | 184 bool IsInternal() const { return bpt_location_ == NULL; } |
185 | 185 |
186 RawScript* SourceCode(); | 186 RawScript* SourceCode(); |
187 RawString* SourceUrl(); | 187 RawString* SourceUrl(); |
188 intptr_t LineNumber(); | 188 intptr_t LineNumber(); |
189 | 189 |
190 void Enable(); | 190 void Enable(); |
191 void Disable(); | 191 void Disable(); |
192 bool IsEnabled() const { return is_enabled_; } | 192 bool IsEnabled() const { return is_enabled_; } |
193 | 193 |
194 uword OrigStubAddress() const; | 194 RawCode* OrigStubAddress() const; |
195 | 195 |
196 private: | 196 private: |
197 void VisitObjectPointers(ObjectPointerVisitor* visitor); | 197 void VisitObjectPointers(ObjectPointerVisitor* visitor); |
198 | 198 |
199 BreakpointLocation* bpt_location() const { return bpt_location_; } | 199 BreakpointLocation* bpt_location() const { return bpt_location_; } |
200 void set_bpt_location(BreakpointLocation* value) { bpt_location_ = value; } | 200 void set_bpt_location(BreakpointLocation* value) { bpt_location_ = value; } |
201 | 201 |
202 void set_next(CodeBreakpoint* value) { next_ = value; } | 202 void set_next(CodeBreakpoint* value) { next_ = value; } |
203 CodeBreakpoint* next() const { return this->next_; } | 203 CodeBreakpoint* next() const { return this->next_; } |
204 | 204 |
205 void PatchCode(); | 205 void PatchCode(); |
206 void RestoreCode(); | 206 void RestoreCode(); |
207 | 207 |
208 RawCode* code_; | 208 RawCode* code_; |
209 intptr_t token_pos_; | 209 intptr_t token_pos_; |
210 uword pc_; | 210 uword pc_; |
211 intptr_t line_number_; | 211 intptr_t line_number_; |
212 bool is_enabled_; | 212 bool is_enabled_; |
213 | 213 |
214 BreakpointLocation* bpt_location_; | 214 BreakpointLocation* bpt_location_; |
215 CodeBreakpoint* next_; | 215 CodeBreakpoint* next_; |
216 | 216 |
217 RawPcDescriptors::Kind breakpoint_kind_; | 217 RawPcDescriptors::Kind breakpoint_kind_; |
218 uword saved_value_; | 218 RawCode* saved_value_; |
219 | 219 |
220 friend class Debugger; | 220 friend class Debugger; |
221 DISALLOW_COPY_AND_ASSIGN(CodeBreakpoint); | 221 DISALLOW_COPY_AND_ASSIGN(CodeBreakpoint); |
222 }; | 222 }; |
223 | 223 |
224 | 224 |
225 // ActivationFrame represents one dart function activation frame | 225 // ActivationFrame represents one dart function activation frame |
226 // on the call stack. | 226 // on the call stack. |
227 class ActivationFrame : public ZoneAllocated { | 227 class ActivationFrame : public ZoneAllocated { |
228 public: | 228 public: |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 | 558 |
559 void SignalBpReached(); | 559 void SignalBpReached(); |
560 void DebuggerStepCallback(); | 560 void DebuggerStepCallback(); |
561 | 561 |
562 void BreakHere(const String& msg); | 562 void BreakHere(const String& msg); |
563 | 563 |
564 void SignalExceptionThrown(const Instance& exc); | 564 void SignalExceptionThrown(const Instance& exc); |
565 void SignalIsolateEvent(DebuggerEvent::EventType type); | 565 void SignalIsolateEvent(DebuggerEvent::EventType type); |
566 static void SignalIsolateInterrupted(); | 566 static void SignalIsolateInterrupted(); |
567 | 567 |
568 uword GetPatchedStubAddress(uword breakpoint_address); | 568 RawCode* GetPatchedStubAddress(uword breakpoint_address); |
569 | 569 |
570 void PrintBreakpointsToJSONArray(JSONArray* jsarr) const; | 570 void PrintBreakpointsToJSONArray(JSONArray* jsarr) const; |
571 void PrintSettingsToJSONObject(JSONObject* jsobj) const; | 571 void PrintSettingsToJSONObject(JSONObject* jsobj) const; |
572 | 572 |
573 static bool IsDebuggable(const Function& func); | 573 static bool IsDebuggable(const Function& func); |
574 | 574 |
575 intptr_t limitBreakpointId() { return next_id_; } | 575 intptr_t limitBreakpointId() { return next_id_; } |
576 | 576 |
577 private: | 577 private: |
578 enum ResumeAction { | 578 enum ResumeAction { |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 | 692 |
693 friend class Isolate; | 693 friend class Isolate; |
694 friend class BreakpointLocation; | 694 friend class BreakpointLocation; |
695 DISALLOW_COPY_AND_ASSIGN(Debugger); | 695 DISALLOW_COPY_AND_ASSIGN(Debugger); |
696 }; | 696 }; |
697 | 697 |
698 | 698 |
699 } // namespace dart | 699 } // namespace dart |
700 | 700 |
701 #endif // VM_DEBUGGER_H_ | 701 #endif // VM_DEBUGGER_H_ |
OLD | NEW |