Chromium Code Reviews| Index: runtime/vm/debugger.h |
| =================================================================== |
| --- runtime/vm/debugger.h (revision 2587) |
| +++ runtime/vm/debugger.h (working copy) |
| @@ -12,6 +12,7 @@ |
| class Breakpoint; |
| class Isolate; |
| class ObjectPointerVisitor; |
| +class ActiveVariables; |
| // Breakpoint represents a location in Dart source and the corresponding |
| @@ -61,9 +62,7 @@ |
| intptr_t LineNumber(); |
| const char* ToCString(); |
| - // Returns an array of String values containing variable names |
| - // in this activation frame. |
| - RawArray* Variables(); |
| + ActiveVariables* LocalVariables(); |
| // Returns the value of the given variable in the context of the |
| // activation frame. |
| @@ -74,6 +73,7 @@ |
| RawFunction* function_; |
|
siva
2011/12/20 19:11:26
How is this object pointer traversed during GC?
hausner
2011/12/20 21:43:55
Good point. Changed it into a handle.
|
| intptr_t token_index_; |
| intptr_t line_number_; |
| + ActiveVariables* locals_; |
| DISALLOW_COPY_AND_ASSIGN(ActivationFrame); |
| }; |
| @@ -99,6 +99,24 @@ |
| }; |
| +class ActiveVariables : public ZoneAllocated { |
| + public: |
| + ActiveVariables(const Function& function, intptr_t token_pos); |
| + |
| + intptr_t Length() const { return desc_indices_.length(); } |
| + |
| + void VariableAt(intptr_t i, |
| + String* name, |
| + intptr_t* token_pos, |
| + intptr_t* end_pos, |
| + Instance* value) const; |
| + private: |
| + LocalVarDescriptors* descriptors_; |
| + ZoneGrowableArray<intptr_t> desc_indices_; |
| + DISALLOW_COPY_AND_ASSIGN(ActiveVariables); |
| +}; |
| + |
| + |
| typedef void BreakpointHandler(Breakpoint* bpt, StackTrace* stack); |