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

Unified Diff: runtime/include/dart_debugger_api.h

Issue 8872049: First debugger API unit test (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
« no previous file with comments | « no previous file | runtime/vm/debugger.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/include/dart_debugger_api.h
===================================================================
--- runtime/include/dart_debugger_api.h (revision 2319)
+++ runtime/include/dart_debugger_api.h (working copy)
@@ -9,7 +9,14 @@
typedef struct _Dart_Breakpoint* Dart_Breakpoint;
+typedef struct _Dart_StackTrace* Dart_StackTrace;
+typedef struct _Dart_ActivationFrame* Dart_ActivationFrame;
+
+typedef void Dart_BreakpointHandler(
+ Dart_Breakpoint breakpoint,
+ Dart_StackTrace stack_trace);
+
/**
* Sets a breakpoint at the entry of the given function. If class_name
* is the empty string, looks for a library function with the given
@@ -28,4 +35,62 @@
Dart_Handle function_name,
Dart_Breakpoint* breakpoint);
+/**
+ * Installs a handler callback function that gets called by the VM
+ * when a breakpoint has been reached.
+ *
+ * Requires there to be a current isolate.
+ */
+DART_EXPORT void Dart_SetBreakpointHandler(
+ Dart_BreakpointHandler bp_handler);
+
+
+/**
+ * Returns in \length the number of activation frames in the given
+ * stack trace.
+ *
+ * Requires there to be a current isolate.
+ *
+ * \return A handle to the True object if no error occurs.
+ */
+DART_EXPORT Dart_Handle Dart_StackTraceLength(
+ Dart_StackTrace trace,
+ intptr_t* length);
+
+
+/**
+ * Returns in \frame the activation frame with index \frame_index.
+ * The activation frame at the top of stack has index 0.
+ *
+ * Requires there to be a current isolate.
+ *
+ * \return A handle to the True object if no error occurs.
+ */
+DART_EXPORT Dart_Handle Dart_GetActivationFrame(
+ Dart_StackTrace trace,
+ int frame_index,
+ Dart_ActivationFrame* frame);
+
+
+/**
+ * Returns information about the given activation frame.
+ * \function_name receives a string handle with the qualified
+ * function name.
+ * \script_url receives a string handle with the url of the
+ * source script that contains the frame's function.
+ * \line_number receives the line number in the script.
+ *
+ * Any or all of the out parameters above may be NULL.
+ *
+ * Requires there to be a current isolate.
+ *
+ * \return A handle to the True object if no error occurs.
+ */
+DART_EXPORT Dart_Handle Dart_ActivationFrameInfo(
+ Dart_ActivationFrame activation_frame,
+ Dart_Handle* function_name,
+ Dart_Handle* script_url,
+ intptr_t* line_number);
+
+
#endif // INCLUDE_DART_DEBUGGER_API_H_
« no previous file with comments | « no previous file | runtime/vm/debugger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698