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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | 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
diff --git a/runtime/vm/debugger.h b/runtime/vm/debugger.h
index 4f271842bea922575150e0eb6260da56e6fe9cb6..f68c023655f5c79c148bda515066e8530d0e576b 100644
--- a/runtime/vm/debugger.h
+++ b/runtime/vm/debugger.h
@@ -144,6 +144,7 @@ class ActivationFrame : public ZoneAllocated {
RawLibrary* Library();
intptr_t TokenPos();
intptr_t LineNumber();
+ intptr_t ColumnNumber();
void SetContext(const Context& ctx) { ctx_ = ctx.raw(); }
// Returns true if this frame is for a function that is visible
@@ -196,6 +197,7 @@ class ActivationFrame : public ZoneAllocated {
intptr_t token_pos_;
intptr_t pc_desc_index_;
intptr_t line_number_;
+ intptr_t column_number_;
intptr_t context_level_;
// Some frames are deoptimized into a side array in order to inspect them.
@@ -300,7 +302,17 @@ class Debugger {
// Checks for both user-defined and internal temporary breakpoints.
bool HasBreakpoint(const Function& func);
+ // Returns a stack trace with frames corresponding to invisible functions
+ // omitted. CurrentStackTrace always returns a new trace on the current stack.
+ // The trace returned by StackTrace may have been cached; it is suitable for
+ // use when stepping, but otherwise may be out of sync with the current stack.
DebuggerStackTrace* StackTrace();
+ DebuggerStackTrace* CurrentStackTrace();
+
+ // Returns a debugger stack trace corresponding to a dart.core.Stacktrace.
+ // Frames corresponding to invisible functions are omitted. It is not valid
+ // to query local variables in the returned stack.
+ DebuggerStackTrace* StackTraceFrom(const Stacktrace& dart_stacktrace);
RawArray* GetInstanceFields(const Instance& obj);
RawArray* GetStaticFields(const Class& cls);
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698