| 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( |
| 21 intptr_t bp_id, |
| 22 Dart_Handle url, |
| 23 intptr_t line_number); |
| 20 | 24 |
| 21 /** | 25 /** |
| 22 * Returns a list of urls (strings) of all the libraries loaded in the | 26 * Returns a list of urls (strings) of all the libraries loaded in the |
| 23 * current isolate. | 27 * current isolate. |
| 24 * | 28 * |
| 25 * Requires there to be a current isolate. | 29 * Requires there to be a current isolate. |
| 26 * | 30 * |
| 27 * \return A handle to a list of string handles. | 31 * \return A handle to a list of string handles. |
| 28 */ | 32 */ |
| 29 DART_EXPORT Dart_Handle Dart_GetLibraryURLs(); | 33 DART_EXPORT Dart_Handle Dart_GetLibraryURLs(); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 46 * | 50 * |
| 47 * Requires there to be a current isolate. | 51 * Requires there to be a current isolate. |
| 48 * | 52 * |
| 49 * \return A handle to string containing the source text if no error | 53 * \return A handle to string containing the source text if no error |
| 50 * occurs. | 54 * occurs. |
| 51 */ | 55 */ |
| 52 DART_EXPORT Dart_Handle Dart_GetScriptSource( | 56 DART_EXPORT Dart_Handle Dart_GetScriptSource( |
| 53 Dart_Handle library_url_in, | 57 Dart_Handle library_url_in, |
| 54 Dart_Handle script_url_in); | 58 Dart_Handle script_url_in); |
| 55 | 59 |
| 60 |
| 56 /** | 61 /** |
| 57 * Sets a breakpoint at line \line_number in \script_url, or the closest | 62 * Sets a breakpoint at line \line_number in \script_url, or the closest |
| 58 * following line (within the same function) where a breakpoint can be set. | 63 * following line (within the same function) where a breakpoint can be set. |
| 59 * | 64 * |
| 60 * Requires there to be a current isolate. | 65 * Requires there to be a current isolate. |
| 61 * | 66 * |
| 67 * \return A handle containing the breakpoint id, which is an integer |
| 68 * value, or an error object if a breakpoint could not be set. |
| 69 */ |
| 70 DART_EXPORT Dart_Handle Dart_SetBreakpoint( |
| 71 Dart_Handle script_url, |
| 72 intptr_t line_number); |
| 73 |
| 74 /** |
| 75 * Deletes the breakpoint with the given id \pb_id. |
| 76 * |
| 77 * Requires there to be a current isolate. |
| 78 * |
| 79 * \return A handle to the True object if no error occurs. |
| 80 */ |
| 81 DART_EXPORT Dart_Handle Dart_RemoveBreakpoint(intptr_t bp_id); |
| 82 |
| 83 |
| 84 /** |
| 85 * Get the script URL of the breakpoint with the given id \pb_id. |
| 86 * |
| 87 * Requires there to be a current isolate. |
| 88 * |
| 89 * \return A handle to the URL (string) of the script, or an error |
| 90 * object. |
| 91 */ |
| 92 DART_EXPORT Dart_Handle Dart_GetBreakpointURL(intptr_t bp_id); |
| 93 |
| 94 |
| 95 /** |
| 96 * Get the line number of the breakpoint with the given id \pb_id. |
| 97 * |
| 98 * Requires there to be a current isolate. |
| 99 * |
| 100 * \return A handle to the line number (integer) of the script, |
| 101 * or an error object. |
| 102 */ |
| 103 DART_EXPORT Dart_Handle Dart_GetBreakpointLine(intptr_t bp_id); |
| 104 |
| 105 |
| 106 /** |
| 107 * DEPRECATED -- use Dart_SetBreakpoint instead. |
| 108 * |
| 109 * Sets a breakpoint at line \line_number in \script_url, or the closest |
| 110 * following line (within the same function) where a breakpoint can be set. |
| 111 * |
| 112 * Requires there to be a current isolate. |
| 113 * |
| 62 * \breakpoint If non-null, will point to the breakpoint object | 114 * \breakpoint If non-null, will point to the breakpoint object |
| 63 * if a breakpoint was successfully created. | 115 * if a breakpoint was successfully created. |
| 64 * | 116 * |
| 65 * \return A handle to the True object if no error occurs. | 117 * \return A handle to the True object if no error occurs. |
| 66 */ | 118 */ |
| 67 DART_EXPORT Dart_Handle Dart_SetBreakpointAtLine( | 119 DART_EXPORT Dart_Handle Dart_SetBreakpointAtLine( |
| 68 Dart_Handle script_url, | 120 Dart_Handle script_url, |
| 69 Dart_Handle line_number, | 121 Dart_Handle line_number, |
| 70 Dart_Breakpoint* breakpoint); | 122 Dart_Breakpoint* breakpoint); |
| 71 | 123 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 83 * \return A handle to the True object if no error occurs. | 135 * \return A handle to the True object if no error occurs. |
| 84 */ | 136 */ |
| 85 DART_EXPORT Dart_Handle Dart_SetBreakpointAtEntry( | 137 DART_EXPORT Dart_Handle Dart_SetBreakpointAtEntry( |
| 86 Dart_Handle library, | 138 Dart_Handle library, |
| 87 Dart_Handle class_name, | 139 Dart_Handle class_name, |
| 88 Dart_Handle function_name, | 140 Dart_Handle function_name, |
| 89 Dart_Breakpoint* breakpoint); | 141 Dart_Breakpoint* breakpoint); |
| 90 | 142 |
| 91 | 143 |
| 92 /** | 144 /** |
| 145 * DEPRECATED -- use Dart_RemoveBreakpoint instead. |
| 146 * |
| 93 * Deletes the given \breakpoint. | 147 * Deletes the given \breakpoint. |
| 94 * | 148 * |
| 95 * Requires there to be a current isolate. | 149 * Requires there to be a current isolate. |
| 96 * | 150 * |
| 97 * \return A handle to the True object if no error occurs. | 151 * \return A handle to the True object if no error occurs. |
| 98 */ | 152 */ |
| 99 DART_EXPORT Dart_Handle Dart_DeleteBreakpoint( | 153 DART_EXPORT Dart_Handle Dart_DeleteBreakpoint( |
| 100 Dart_Breakpoint breakpoint); | 154 Dart_Breakpoint breakpoint); |
| 101 | 155 |
| 102 | 156 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 129 | 183 |
| 130 /** | 184 /** |
| 131 * Installs a handler callback function that gets called by the VM | 185 * Installs a handler callback function that gets called by the VM |
| 132 * when a breakpoint has been reached. | 186 * when a breakpoint has been reached. |
| 133 * | 187 * |
| 134 * Requires there to be a current isolate. | 188 * Requires there to be a current isolate. |
| 135 */ | 189 */ |
| 136 DART_EXPORT void Dart_SetBreakpointHandler( | 190 DART_EXPORT void Dart_SetBreakpointHandler( |
| 137 Dart_BreakpointHandler bp_handler); | 191 Dart_BreakpointHandler bp_handler); |
| 138 | 192 |
| 193 /** |
| 194 * Installs a callback function that gets called by the VM when |
| 195 * a breakpoint has been resolved to an actual url and line number. |
| 196 * |
| 197 * Requires there to be a current isolate. |
| 198 */ |
| 199 DART_EXPORT void Dart_SetBreakpointResolvedHandler( |
| 200 Dart_BreakpointResolvedHandler handler); |
| 201 |
| 202 |
| 203 /** |
| 204 * Returns in \trace the the current stack trace, or NULL if the |
| 205 * VM is not paused. |
| 206 * |
| 207 * Requires there to be a current isolate. |
| 208 * |
| 209 * \return A handle to the True object if no error occurs. |
| 210 */ |
| 211 DART_EXPORT Dart_Handle Dart_GetStackTrace(Dart_StackTrace* trace); |
| 212 |
| 139 | 213 |
| 140 /** | 214 /** |
| 141 * Returns in \length the number of activation frames in the given | 215 * Returns in \length the number of activation frames in the given |
| 142 * stack trace. | 216 * stack trace. |
| 143 * | 217 * |
| 144 * Requires there to be a current isolate. | 218 * Requires there to be a current isolate. |
| 145 * | 219 * |
| 146 * \return A handle to the True object if no error occurs. | 220 * \return A handle to the True object if no error occurs. |
| 147 */ | 221 */ |
| 148 DART_EXPORT Dart_Handle Dart_StackTraceLength( | 222 DART_EXPORT Dart_Handle Dart_StackTraceLength( |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 * \return A handle to an array containing field names and | 318 * \return A handle to an array containing field names and |
| 245 * corresponding field values. The array is empty if the class has | 319 * corresponding field values. The array is empty if the class has |
| 246 * no static fields. If non-empty, field names are at array offsets 2*n, | 320 * no static fields. If non-empty, field names are at array offsets 2*n, |
| 247 * values at offset 2*n+1. Field values may also be a handle to an | 321 * values at offset 2*n+1. Field values may also be a handle to an |
| 248 * error object if an error was encountered evaluating the field. | 322 * error object if an error was encountered evaluating the field. |
| 249 */ | 323 */ |
| 250 DART_EXPORT Dart_Handle Dart_GetStaticFields(Dart_Handle cls); | 324 DART_EXPORT Dart_Handle Dart_GetStaticFields(Dart_Handle cls); |
| 251 | 325 |
| 252 | 326 |
| 253 #endif // INCLUDE_DART_DEBUGGER_API_H_ | 327 #endif // INCLUDE_DART_DEBUGGER_API_H_ |
| OLD | NEW |