| 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_debugger_api.h" | 8 #include "include/dart_debugger_api.h" |
| 9 | 9 |
| 10 #include "vm/object.h" | 10 #include "vm/object.h" |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 | 172 |
| 173 void VariableAt(intptr_t i, | 173 void VariableAt(intptr_t i, |
| 174 String* name, | 174 String* name, |
| 175 intptr_t* token_pos, | 175 intptr_t* token_pos, |
| 176 intptr_t* end_pos, | 176 intptr_t* end_pos, |
| 177 Instance* value); | 177 Instance* value); |
| 178 | 178 |
| 179 RawArray* GetLocalVariables(); | 179 RawArray* GetLocalVariables(); |
| 180 RawObject* GetReceiver(); | 180 RawObject* GetReceiver(); |
| 181 | 181 |
| 182 RawContext* GetSavedEntryContext(); | |
| 183 RawContext* GetSavedCurrentContext(); | 182 RawContext* GetSavedCurrentContext(); |
| 184 | 183 |
| 185 RawObject* Evaluate(const String& expr); | 184 RawObject* Evaluate(const String& expr); |
| 186 | 185 |
| 187 void PrintToJSONObject(JSONObject* jsobj); | 186 void PrintToJSONObject(JSONObject* jsobj); |
| 188 | 187 |
| 189 private: | 188 private: |
| 190 void PrintContextMismatchError(const String& var_name, | 189 void PrintContextMismatchError(const String& var_name, |
| 191 intptr_t ctx_slot, | 190 intptr_t ctx_slot, |
| 192 intptr_t frame_ctx_level, | 191 intptr_t frame_ctx_level, |
| 193 intptr_t var_ctx_level); | 192 intptr_t var_ctx_level); |
| 194 | 193 |
| 195 intptr_t TryIndex(); | 194 intptr_t TryIndex(); |
| 196 void GetPcDescriptors(); | 195 void GetPcDescriptors(); |
| 197 void GetVarDescriptors(); | 196 void GetVarDescriptors(); |
| 198 void GetDescIndices(); | 197 void GetDescIndices(); |
| 199 | 198 |
| 200 RawObject* GetLocalVar(intptr_t slot_index); | 199 RawObject* GetLocalVar(intptr_t slot_index); |
| 201 RawInstance* GetLocalInstanceVar(intptr_t slot_index); | 200 RawInstance* GetLocalInstanceVar(intptr_t slot_index); |
| 202 RawContext* GetLocalContextVar(intptr_t slot_index); | |
| 203 | 201 |
| 204 RawInstance* GetLocalVarValue(intptr_t slot_index); | 202 RawInstance* GetLocalVarValue(intptr_t slot_index); |
| 205 RawInstance* GetInstanceCallReceiver(intptr_t num_actual_args); | 203 RawInstance* GetInstanceCallReceiver(intptr_t num_actual_args); |
| 206 RawObject* GetClosureObject(intptr_t num_acatual_args); | 204 RawObject* GetClosureObject(intptr_t num_acatual_args); |
| 207 | 205 |
| 208 uword pc_; | 206 uword pc_; |
| 209 uword fp_; | 207 uword fp_; |
| 210 uword sp_; | 208 uword sp_; |
| 211 | 209 |
| 212 // The anchor of the context chain for this function. | 210 // The anchor of the context chain for this function. |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 CodeBreakpoint* GetCodeBreakpoint(uword breakpoint_address); | 472 CodeBreakpoint* GetCodeBreakpoint(uword breakpoint_address); |
| 475 | 473 |
| 476 void SyncBreakpoint(SourceBreakpoint* bpt); | 474 void SyncBreakpoint(SourceBreakpoint* bpt); |
| 477 | 475 |
| 478 ActivationFrame* TopDartFrame() const; | 476 ActivationFrame* TopDartFrame() const; |
| 479 static ActivationFrame* CollectDartFrame(Isolate* isolate, | 477 static ActivationFrame* CollectDartFrame(Isolate* isolate, |
| 480 uword pc, | 478 uword pc, |
| 481 StackFrame* frame, | 479 StackFrame* frame, |
| 482 const Code& code, | 480 const Code& code, |
| 483 const Array& deopt_frame, | 481 const Array& deopt_frame, |
| 484 intptr_t deopt_frame_offset, | 482 intptr_t deopt_frame_offset); |
| 485 ActivationFrame* callee_activation, | |
| 486 const Context& entry_ctx); | |
| 487 static RawArray* DeoptimizeToArray(Isolate* isolate, | 483 static RawArray* DeoptimizeToArray(Isolate* isolate, |
| 488 StackFrame* frame, | 484 StackFrame* frame, |
| 489 const Code& code); | 485 const Code& code); |
| 490 static DebuggerStackTrace* CollectStackTrace(); | 486 static DebuggerStackTrace* CollectStackTrace(); |
| 491 void SignalBpResolved(SourceBreakpoint *bpt); | 487 void SignalBpResolved(SourceBreakpoint *bpt); |
| 492 void SignalPausedEvent(ActivationFrame* top_frame, | 488 void SignalPausedEvent(ActivationFrame* top_frame, |
| 493 SourceBreakpoint* bpt); | 489 SourceBreakpoint* bpt); |
| 494 | 490 |
| 495 intptr_t nextId() { return next_id_++; } | 491 intptr_t nextId() { return next_id_++; } |
| 496 | 492 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 | 546 |
| 551 friend class Isolate; | 547 friend class Isolate; |
| 552 friend class SourceBreakpoint; | 548 friend class SourceBreakpoint; |
| 553 DISALLOW_COPY_AND_ASSIGN(Debugger); | 549 DISALLOW_COPY_AND_ASSIGN(Debugger); |
| 554 }; | 550 }; |
| 555 | 551 |
| 556 | 552 |
| 557 } // namespace dart | 553 } // namespace dart |
| 558 | 554 |
| 559 #endif // VM_DEBUGGER_H_ | 555 #endif // VM_DEBUGGER_H_ |
| OLD | NEW |