Index: runtime/include/dart_api.h |
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h |
index 3cc6fb5ea0ef0eb286a367088c1d494e35155959..898b6686f8936714d661b863fce036a6744c4b98 100755 |
--- a/runtime/include/dart_api.h |
+++ b/runtime/include/dart_api.h |
@@ -279,6 +279,48 @@ DART_EXPORT Dart_Handle Dart_ErrorGetException(Dart_Handle handle); |
*/ |
DART_EXPORT Dart_Handle Dart_ErrorGetStacktrace(Dart_Handle handle); |
+ |
+/** |
+ * Gets the number of frames in a Stacktrace. |
+ * |
+ * \param handle A Stacktrace. |
siva
2013/10/31 17:13:26
maybe call it handle instead of stacktrace.
|
+ * \param length Returns the frame count. |
+ * |
+ * \return A valid handle if no error occurs during the operation. |
+ */ |
+DART_EXPORT Dart_Handle Dart_StacktraceLength(Dart_Handle handle, |
+ intptr_t* length); |
+ |
+/** |
+ * Returns information about a given frame in a Stacktrace |
+ * |
+ * \param handle A Stacktrace. |
siva
2013/10/31 17:13:26
Ditto comment.
|
+ * \param frame_index The position of the frame of the stack. Top-of-stack is at |
+ * position 0. |
siva
2013/10/31 17:13:26
position of the frame in the stacktrace?
|
+ * |
+ * \param function_name receives a string handle with the qualified function |
+ * name. |
+ * \param script_url receives a string handle with the url of the source script |
+ * that contains the frame's function. |
+ * \param line_number receives the line number in the script. |
+ * \param column_number receives the column number in the script, or -1 if |
+ * precise source locations are not available. |
+ * |
+ * Any or all of the out parameters above may be NULL. |
+ * |
+ * Requires there to be a current isolate. |
+ * |
+ * \return A valid handle if no error occurs during the operation. |
+ */ |
+DART_EXPORT Dart_Handle Dart_StacktraceFrameInfo( |
+ Dart_Handle handle, |
+ intptr_t frame_index, |
+ Dart_Handle* function_name, |
+ Dart_Handle* script_url, |
+ intptr_t* line_number, |
+ intptr_t* column_number); |
+ |
+ |
/** |
* Produces an api error handle with the provided error message. |
* |