Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Unified Diff: runtime/vm/debugger.h

Issue 9019029: Retrieve value of local variables in stack frames. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/debugger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger.h
===================================================================
--- runtime/vm/debugger.h (revision 2724)
+++ runtime/vm/debugger.h (working copy)
@@ -50,11 +50,12 @@
// on the call stack.
class ActivationFrame : public ZoneAllocated {
public:
- explicit ActivationFrame(uword pc);
+ explicit ActivationFrame(uword pc, uword fp);
uword pc() const { return pc_; }
+ uword fp() const { return fp_; }
- Function* DartFunction();
+ const Function& DartFunction();
RawString* QualifiedFunctionName();
RawString* SourceUrl();
RawScript* SourceScript();
@@ -62,19 +63,31 @@
intptr_t LineNumber();
const char* ToCString();
- ActiveVariables* LocalVariables();
+ intptr_t NumLocalVariables();
+ void VariableAt(intptr_t i,
+ String* name,
+ intptr_t* token_pos,
+ intptr_t* end_pos,
+ Instance* value);
+
// Returns the value of the given variable in the context of the
// activation frame.
RawInstance* Value(const String& variable_name);
private:
+ void GetLocalVariables();
+ RawInstance* GetLocalVarValue(intptr_t slot_index);
+
uword pc_;
- Function* function_;
+ uword fp_;
+ Function& function_;
intptr_t token_index_;
intptr_t line_number_;
- ActiveVariables* locals_;
+ LocalVarDescriptors* var_descriptors_;
+ ZoneGrowableArray<intptr_t> desc_indices_;
+
DISALLOW_COPY_AND_ASSIGN(ActivationFrame);
};
@@ -99,24 +112,6 @@
};
-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);
« no previous file with comments | « no previous file | runtime/vm/debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698