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

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

Issue 9169102: Add Dart_PropagateError. (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
« no previous file with comments | « runtime/vm/dart_entry_test.cc ('k') | runtime/vm/debugger.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 void Shutdown(); 125 void Shutdown();
126 bool IsActive(); 126 bool IsActive();
127 127
128 void SetBreakpointHandler(BreakpointHandler* handler); 128 void SetBreakpointHandler(BreakpointHandler* handler);
129 129
130 RawFunction* ResolveFunction(const Library& library, 130 RawFunction* ResolveFunction(const Library& library,
131 const String& class_name, 131 const String& class_name,
132 const String& function_name); 132 const String& function_name);
133 133
134 // Set breakpoint at closest location to function entry. 134 // Set breakpoint at closest location to function entry.
135 Breakpoint* SetBreakpointAtEntry(const Function& target_function); 135 Breakpoint* SetBreakpointAtEntry(const Function& target_function,
136 Error* error);
136 Breakpoint* SetBreakpointAtLine(const String& script_url, 137 Breakpoint* SetBreakpointAtLine(const String& script_url,
137 intptr_t line_number); 138 intptr_t line_number,
139 Error* error);
138 140
139 void RemoveBreakpoint(Breakpoint* bpt); 141 void RemoveBreakpoint(Breakpoint* bpt);
140 142
141 void VisitObjectPointers(ObjectPointerVisitor* visitor); 143 void VisitObjectPointers(ObjectPointerVisitor* visitor);
142 144
143 // Returns NULL if no breakpoint exists for the given address. 145 // Returns NULL if no breakpoint exists for the given address.
144 Breakpoint* GetBreakpoint(uword breakpoint_address); 146 Breakpoint* GetBreakpoint(uword breakpoint_address);
145 147
146 // Called from Runtime when a breakpoint in Dart code is reached. 148 // Called from Runtime when a breakpoint in Dart code is reached.
147 void BreakpointCallback(); 149 void BreakpointCallback();
148 150
149 RawArray* GetInstanceFields(const Instance& obj); 151 RawArray* GetInstanceFields(const Instance& obj);
150 RawArray* GetStaticFields(const Class& cls); 152 RawArray* GetStaticFields(const Class& cls);
151 153
152 // Utility functions. 154 // Utility functions.
153 static const char* QualifiedFunctionName(const Function& func); 155 static const char* QualifiedFunctionName(const Function& func);
154 156
155 RawObject* GetInstanceField(const Class& cls, 157 RawObject* GetInstanceField(const Class& cls,
156 const String& field_name, 158 const String& field_name,
157 const Instance& object); 159 const Instance& object);
158 RawObject* GetStaticField(const Class& cls, 160 RawObject* GetStaticField(const Class& cls,
159 const String& field_name); 161 const String& field_name);
160 162
161 private: 163 private:
162 Breakpoint* SetBreakpoint(const Function& target_function, 164 Breakpoint* SetBreakpoint(const Function& target_function,
163 intptr_t token_index); 165 intptr_t token_index,
166 Error* error);
164 void UnsetBreakpoint(Breakpoint* bpt); 167 void UnsetBreakpoint(Breakpoint* bpt);
165 Breakpoint* NewBreakpoint(const Function& func, intptr_t pc_desc_index); 168 Breakpoint* NewBreakpoint(const Function& func, intptr_t pc_desc_index);
166 void RegisterBreakpoint(Breakpoint* bpt); 169 void RegisterBreakpoint(Breakpoint* bpt);
167 Breakpoint* GetBreakpointByFunction(const Function& func, 170 Breakpoint* GetBreakpointByFunction(const Function& func,
168 intptr_t token_index); 171 intptr_t token_index);
169 172
170 Isolate* isolate_; 173 Isolate* isolate_;
171 bool initialized_; 174 bool initialized_;
172 BreakpointHandler* bp_handler_; 175 BreakpointHandler* bp_handler_;
173 Breakpoint* breakpoints_; 176 Breakpoint* breakpoints_;
174 DISALLOW_COPY_AND_ASSIGN(Debugger); 177 DISALLOW_COPY_AND_ASSIGN(Debugger);
175 }; 178 };
176 179
177 180
178 } // namespace dart 181 } // namespace dart
179 182
180 #endif // VM_DEBUGGER_H_ 183 #endif // VM_DEBUGGER_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart_entry_test.cc ('k') | runtime/vm/debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698