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

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

Issue 51793002: Add an API function to get a debugger stack trace from an error handle. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "include/dart_debugger_api.h" 8 #include "include/dart_debugger_api.h"
9 9
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 ASSERT(!code_.IsNull()); 137 ASSERT(!code_.IsNull());
138 return code_; 138 return code_;
139 } 139 }
140 140
141 RawString* QualifiedFunctionName(); 141 RawString* QualifiedFunctionName();
142 RawString* SourceUrl(); 142 RawString* SourceUrl();
143 RawScript* SourceScript(); 143 RawScript* SourceScript();
144 RawLibrary* Library(); 144 RawLibrary* Library();
145 intptr_t TokenPos(); 145 intptr_t TokenPos();
146 intptr_t LineNumber(); 146 intptr_t LineNumber();
147 intptr_t ColumnNumber();
147 void SetContext(const Context& ctx) { ctx_ = ctx.raw(); } 148 void SetContext(const Context& ctx) { ctx_ = ctx.raw(); }
148 149
149 // Returns true if this frame is for a function that is visible 150 // Returns true if this frame is for a function that is visible
150 // to the user and can be debugged. 151 // to the user and can be debugged.
151 bool IsDebuggable() const; 152 bool IsDebuggable() const;
152 153
153 // The context level of a frame is the context level at the 154 // The context level of a frame is the context level at the
154 // PC/token index of the frame. It determines the depth of the context 155 // PC/token index of the frame. It determines the depth of the context
155 // chain that belongs to the function of this activation frame. 156 // chain that belongs to the function of this activation frame.
156 intptr_t ContextLevel(); 157 intptr_t ContextLevel();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 uword fp_; 190 uword fp_;
190 uword sp_; 191 uword sp_;
191 192
192 // The anchor of the context chain for this function. 193 // The anchor of the context chain for this function.
193 Context& ctx_; 194 Context& ctx_;
194 const Code& code_; 195 const Code& code_;
195 const Function& function_; 196 const Function& function_;
196 intptr_t token_pos_; 197 intptr_t token_pos_;
197 intptr_t pc_desc_index_; 198 intptr_t pc_desc_index_;
198 intptr_t line_number_; 199 intptr_t line_number_;
200 intptr_t column_number_;
199 intptr_t context_level_; 201 intptr_t context_level_;
200 202
201 // Some frames are deoptimized into a side array in order to inspect them. 203 // Some frames are deoptimized into a side array in order to inspect them.
202 const Array& deopt_frame_; 204 const Array& deopt_frame_;
203 const intptr_t deopt_frame_offset_; 205 const intptr_t deopt_frame_offset_;
204 206
205 bool vars_initialized_; 207 bool vars_initialized_;
206 LocalVarDescriptors& var_descriptors_; 208 LocalVarDescriptors& var_descriptors_;
207 ZoneGrowableArray<intptr_t> desc_indices_; 209 ZoneGrowableArray<intptr_t> desc_indices_;
208 PcDescriptors& pc_desc_; 210 PcDescriptors& pc_desc_;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 void VisitObjectPointers(ObjectPointerVisitor* visitor); 304 void VisitObjectPointers(ObjectPointerVisitor* visitor);
303 305
304 // Called from Runtime when a breakpoint in Dart code is reached. 306 // Called from Runtime when a breakpoint in Dart code is reached.
305 void BreakpointCallback(); 307 void BreakpointCallback();
306 308
307 // Returns true if there is at least one breakpoint set in func. 309 // Returns true if there is at least one breakpoint set in func.
308 // Checks for both user-defined and internal temporary breakpoints. 310 // Checks for both user-defined and internal temporary breakpoints.
309 bool HasBreakpoint(const Function& func); 311 bool HasBreakpoint(const Function& func);
310 312
311 DebuggerStackTrace* StackTrace(); 313 DebuggerStackTrace* StackTrace();
314 DebuggerStackTrace* UncachedStackTrace();
315 DebuggerStackTrace* StackTraceFrom(const Stacktrace& dart_stacktrace);
312 316
313 RawArray* GetInstanceFields(const Instance& obj); 317 RawArray* GetInstanceFields(const Instance& obj);
314 RawArray* GetStaticFields(const Class& cls); 318 RawArray* GetStaticFields(const Class& cls);
315 RawArray* GetLibraryFields(const Library& lib); 319 RawArray* GetLibraryFields(const Library& lib);
316 RawArray* GetGlobalFields(const Library& lib); 320 RawArray* GetGlobalFields(const Library& lib);
317 321
318 intptr_t CacheObject(const Object& obj); 322 intptr_t CacheObject(const Object& obj);
319 RawObject* GetCachedObject(intptr_t obj_id); 323 RawObject* GetCachedObject(intptr_t obj_id);
320 bool IsValidObjectId(intptr_t obj_id); 324 bool IsValidObjectId(intptr_t obj_id);
321 325
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 436
433 friend class Isolate; 437 friend class Isolate;
434 friend class SourceBreakpoint; 438 friend class SourceBreakpoint;
435 DISALLOW_COPY_AND_ASSIGN(Debugger); 439 DISALLOW_COPY_AND_ASSIGN(Debugger);
436 }; 440 };
437 441
438 442
439 } // namespace dart 443 } // namespace dart
440 444
441 #endif // VM_DEBUGGER_H_ 445 #endif // VM_DEBUGGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698