| OLD | NEW |
| 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 INCLUDE_DART_DEBUGGER_API_H_ | 5 #ifndef INCLUDE_DART_DEBUGGER_API_H_ |
| 6 #define INCLUDE_DART_DEBUGGER_API_H_ | 6 #define INCLUDE_DART_DEBUGGER_API_H_ |
| 7 | 7 |
| 8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
| 9 | 9 |
| 10 typedef struct _Dart_Breakpoint* Dart_Breakpoint; | 10 typedef struct _Dart_Breakpoint* Dart_Breakpoint; |
| 11 | 11 |
| 12 typedef struct _Dart_StackTrace* Dart_StackTrace; | 12 typedef struct _Dart_StackTrace* Dart_StackTrace; |
| 13 | 13 |
| 14 typedef struct _Dart_ActivationFrame* Dart_ActivationFrame; | 14 typedef struct _Dart_ActivationFrame* Dart_ActivationFrame; |
| 15 | 15 |
| 16 typedef void Dart_BreakpointHandler( | 16 typedef void Dart_BreakpointHandler( |
| 17 Dart_Breakpoint breakpoint, | 17 Dart_Breakpoint breakpoint, |
| 18 Dart_StackTrace stack_trace); | 18 Dart_StackTrace stack_trace); |
| 19 | 19 |
| 20 typedef void Dart_BreakpointResolvedHandler( | 20 typedef void Dart_BreakpointResolvedHandler( |
| 21 intptr_t bp_id, | 21 intptr_t bp_id, |
| 22 Dart_Handle url, | 22 Dart_Handle url, |
| 23 intptr_t line_number); | 23 intptr_t line_number); |
| 24 | 24 |
| 25 typedef void Dart_ExceptionThrownHandler( |
| 26 Dart_Handle exception_object, |
| 27 Dart_StackTrace stack_trace); |
| 28 |
| 25 | 29 |
| 26 /** | 30 /** |
| 27 * Caches a given \object and returns an object id. The object id is only | 31 * Caches a given \object and returns an object id. The object id is only |
| 28 * valid while the VM is paused. The cache is invalidated when the VM | 32 * valid while the VM is paused. The cache is invalidated when the VM |
| 29 * resumes. | 33 * resumes. |
| 30 * | 34 * |
| 31 * Requires there to be a current isolate. | 35 * Requires there to be a current isolate. |
| 32 * | 36 * |
| 33 * Returns an id >= 0 on success, or -1 if there is an error. | 37 * Returns an id >= 0 on success, or -1 if there is an error. |
| 34 */ | 38 */ |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 | 249 |
| 246 /** | 250 /** |
| 247 * Installs a callback function that gets called by the VM when | 251 * Installs a callback function that gets called by the VM when |
| 248 * a breakpoint has been resolved to an actual url and line number. | 252 * a breakpoint has been resolved to an actual url and line number. |
| 249 * | 253 * |
| 250 * Requires there to be a current isolate. | 254 * Requires there to be a current isolate. |
| 251 */ | 255 */ |
| 252 DART_EXPORT void Dart_SetBreakpointResolvedHandler( | 256 DART_EXPORT void Dart_SetBreakpointResolvedHandler( |
| 253 Dart_BreakpointResolvedHandler handler); | 257 Dart_BreakpointResolvedHandler handler); |
| 254 | 258 |
| 259 /** |
| 260 * Installs a callback function that gets called by the VM when |
| 261 * an exception has been thrown. |
| 262 * |
| 263 * Requires there to be a current isolate. |
| 264 */ |
| 265 DART_EXPORT void Dart_SetExceptionThrownHandler( |
| 266 Dart_ExceptionThrownHandler handler); |
| 255 | 267 |
| 256 /** | 268 /** |
| 257 * Returns in \trace the the current stack trace, or NULL if the | 269 * Returns in \trace the the current stack trace, or NULL if the |
| 258 * VM is not paused. | 270 * VM is not paused. |
| 259 * | 271 * |
| 260 * Requires there to be a current isolate. | 272 * Requires there to be a current isolate. |
| 261 * | 273 * |
| 262 * \return A handle to the True object if no error occurs. | 274 * \return A handle to the True object if no error occurs. |
| 263 */ | 275 */ |
| 264 DART_EXPORT Dart_Handle Dart_GetStackTrace(Dart_StackTrace* trace); | 276 DART_EXPORT Dart_Handle Dart_GetStackTrace(Dart_StackTrace* trace); |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 * Returns the url of the library \library_id. | 459 * Returns the url of the library \library_id. |
| 448 * | 460 * |
| 449 * Requires there to be a current isolate. | 461 * Requires there to be a current isolate. |
| 450 * | 462 * |
| 451 * \return A string handle containing the URL of the library. | 463 * \return A string handle containing the URL of the library. |
| 452 */ | 464 */ |
| 453 DART_EXPORT Dart_Handle Dart_GetLibraryURL(intptr_t library_id); | 465 DART_EXPORT Dart_Handle Dart_GetLibraryURL(intptr_t library_id); |
| 454 | 466 |
| 455 | 467 |
| 456 #endif // INCLUDE_DART_DEBUGGER_API_H_ | 468 #endif // INCLUDE_DART_DEBUGGER_API_H_ |
| OLD | NEW |