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

Unified Diff: runtime/vm/debugger.h

Issue 8992020: First part of inspecting local variables (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
Index: runtime/vm/debugger.h
===================================================================
--- runtime/vm/debugger.h (revision 2646)
+++ 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
@@ -53,7 +54,7 @@
uword pc() const { return pc_; }
- RawFunction* DartFunction();
+ Function* DartFunction();
RawString* QualifiedFunctionName();
RawString* SourceUrl();
RawScript* SourceScript();
@@ -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.
@@ -71,9 +70,10 @@
private:
uword pc_;
- RawFunction* function_;
+ Function* function_;
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);
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/debugger.cc » ('j') | runtime/vm/debugger.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698