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

Side by Side Diff: runtime/vm/debugger.h

Issue 9288071: Add debugger functions to inspect objects and classes (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 10 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 "vm/object.h" 8 #include "vm/object.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 void RemoveBreakpoint(Breakpoint* bpt); 137 void RemoveBreakpoint(Breakpoint* bpt);
138 138
139 void VisitObjectPointers(ObjectPointerVisitor* visitor); 139 void VisitObjectPointers(ObjectPointerVisitor* visitor);
140 140
141 // Returns NULL if no breakpoint exists for the given address. 141 // Returns NULL if no breakpoint exists for the given address.
142 Breakpoint* GetBreakpoint(uword breakpoint_address); 142 Breakpoint* GetBreakpoint(uword breakpoint_address);
143 143
144 // Called from Runtime when a breakpoint in Dart code is reached. 144 // Called from Runtime when a breakpoint in Dart code is reached.
145 void BreakpointCallback(); 145 void BreakpointCallback();
146 146
147 RawArray* GetInstanceFields(const Instance& obj);
siva 2012/01/26 21:34:08 I am wondering whether it would make sense to just
hausner 2012/01/27 17:19:30 I was envisioning that the static fields of a clas
148 RawArray* GetStaticFields(const Class& cls);
149
147 // Utility functions. 150 // Utility functions.
148 static const char* QualifiedFunctionName(const Function& func); 151 static const char* QualifiedFunctionName(const Function& func);
149 152
153 RawInstance* GetInstanceField(const Class& cls,
154 const String& field_name,
155 const Instance& object);
156 RawInstance* GetStaticField(const Class& cls,
157 const String& field_name);
siva 2012/01/26 21:34:08 There is a certain amount of overlap between these
hausner 2012/01/27 17:19:30 I looked at that code when I implemented this. The
158
150 private: 159 private:
151 Breakpoint* SetBreakpoint(const Function& target_function, 160 Breakpoint* SetBreakpoint(const Function& target_function,
152 intptr_t token_index); 161 intptr_t token_index);
153 void UnsetBreakpoint(Breakpoint* bpt); 162 void UnsetBreakpoint(Breakpoint* bpt);
154 Breakpoint* NewBreakpoint(const Function& func, intptr_t pc_desc_index); 163 Breakpoint* NewBreakpoint(const Function& func, intptr_t pc_desc_index);
155 void RegisterBreakpoint(Breakpoint* bpt); 164 void RegisterBreakpoint(Breakpoint* bpt);
156 Breakpoint* GetBreakpointByFunction(const Function& func, 165 Breakpoint* GetBreakpointByFunction(const Function& func,
157 intptr_t token_index); 166 intptr_t token_index);
158 167
159 bool initialized_; 168 bool initialized_;
160 BreakpointHandler* bp_handler_; 169 BreakpointHandler* bp_handler_;
161 Breakpoint* breakpoints_; 170 Breakpoint* breakpoints_;
162 DISALLOW_COPY_AND_ASSIGN(Debugger); 171 DISALLOW_COPY_AND_ASSIGN(Debugger);
163 }; 172 };
164 173
165 174
166 } // namespace dart 175 } // namespace dart
167 176
168 #endif // VM_DEBUGGER_H_ 177 #endif // VM_DEBUGGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698