| 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 |
| 26 /** |
| 27 * 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 |
| 29 * resumes. |
| 30 * |
| 31 * Requires there to be a current isolate. |
| 32 * |
| 33 * Returns an id >= 0 on success, or -1 if there is an error. |
| 34 */ |
| 35 DART_EXPORT intptr_t Dart_CacheObject(Dart_Handle object_in); |
| 36 |
| 37 |
| 38 /** |
| 39 * Returns a cached object given the \obj_id. |
| 40 * |
| 41 * Requires there to be a current isolate. |
| 42 */ |
| 43 DART_EXPORT Dart_Handle Dart_GetCachedObject(intptr_t obj_id); |
| 44 |
| 45 |
| 25 /** | 46 /** |
| 26 * Returns a list of urls (strings) of all the libraries loaded in the | 47 * Returns a list of urls (strings) of all the libraries loaded in the |
| 27 * current isolate. | 48 * current isolate. |
| 28 * | 49 * |
| 29 * Requires there to be a current isolate. | 50 * Requires there to be a current isolate. |
| 30 * | 51 * |
| 31 * \return A handle to a list of string handles. | 52 * \return A handle to a list of string handles. |
| 32 */ | 53 */ |
| 33 DART_EXPORT Dart_Handle Dart_GetLibraryURLs(); | 54 DART_EXPORT Dart_Handle Dart_GetLibraryURLs(); |
| 34 | 55 |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 * Returns the class of the given \object. | 299 * Returns the class of the given \object. |
| 279 * | 300 * |
| 280 * Requires there to be a current isolate. | 301 * Requires there to be a current isolate. |
| 281 * | 302 * |
| 282 * \return A handle to the class object. | 303 * \return A handle to the class object. |
| 283 */ | 304 */ |
| 284 DART_EXPORT Dart_Handle Dart_GetObjClass(Dart_Handle object); | 305 DART_EXPORT Dart_Handle Dart_GetObjClass(Dart_Handle object); |
| 285 | 306 |
| 286 | 307 |
| 287 /** | 308 /** |
| 309 * Returns in \class_id the class id of the given \object. The id is valid |
| 310 * for the lifetime of the isolate. |
| 311 * |
| 312 * Requires there to be a current isolate. |
| 313 * |
| 314 * \return True if no error occurs. |
| 315 */ |
| 316 DART_EXPORT Dart_Handle Dart_GetObjClassId(Dart_Handle object, |
| 317 intptr_t* class_id); |
| 318 |
| 319 |
| 320 /** |
| 288 * Returns the superclass of the given class \cls. | 321 * Returns the superclass of the given class \cls. |
| 289 * | 322 * |
| 290 * Requires there to be a current isolate. | 323 * Requires there to be a current isolate. |
| 291 * | 324 * |
| 292 * \return A handle to the class object. | 325 * \return A handle to the class object. |
| 293 */ | 326 */ |
| 294 DART_EXPORT Dart_Handle Dart_GetSuperclass(Dart_Handle cls); | 327 DART_EXPORT Dart_Handle Dart_GetSuperclass(Dart_Handle cls); |
| 295 | 328 |
| 296 | 329 |
| 297 /** | 330 /** |
| 331 * Returns info about the given class \cls_id. |
| 332 * |
| 333 * \param class_name receives handle to class name (string) if non-null. |
| 334 * \param library receives handle to library in which the class |
| 335 * is defined, if non-null. |
| 336 * \param super_class_id receives the class id to the super class of |
| 337 * \cls_id if non-null. |
| 338 * \param static_fields If non-null, receives an array containing field |
| 339 * names and values of static fields of the class. Names are |
| 340 * at array offsets 2*n, values at offset 2*n+1. |
| 341 * |
| 342 * Requires there to be a current isolate. |
| 343 * |
| 344 * \return A handle to the value true if no error occurs. |
| 345 */ |
| 346 DART_EXPORT Dart_Handle Dart_GetClassInfo(intptr_t class_id, |
| 347 Dart_Handle* class_name, |
| 348 Dart_Handle* library, |
| 349 intptr_t* super_class_id, |
| 350 Dart_Handle* static_fields); |
| 351 |
| 352 |
| 353 /** |
| 298 * Returns an array containing all instance field names and values of | 354 * Returns an array containing all instance field names and values of |
| 299 * the given \object. | 355 * the given \object. |
| 300 * | 356 * |
| 301 * Requires there to be a current isolate. | 357 * Requires there to be a current isolate. |
| 302 * | 358 * |
| 303 * \return A handle to an array containing field names and | 359 * \return A handle to an array containing field names and |
| 304 * corresponding field values. The array is empty if the object has | 360 * corresponding field values. The array is empty if the object has |
| 305 * no fields. If non-empty, field names are at array offsets 2*n, | 361 * no fields. If non-empty, field names are at array offsets 2*n, |
| 306 * values at offset 2*n+1. Field values may also be a handle to an | 362 * values at offset 2*n+1. Field values may also be a handle to an |
| 307 * error object if an error was encountered evaluating the field. | 363 * error object if an error was encountered evaluating the field. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 318 * \return A handle to an array containing field names and | 374 * \return A handle to an array containing field names and |
| 319 * corresponding field values. The array is empty if the class has | 375 * corresponding field values. The array is empty if the class has |
| 320 * no static fields. If non-empty, field names are at array offsets 2*n, | 376 * no static fields. If non-empty, field names are at array offsets 2*n, |
| 321 * values at offset 2*n+1. Field values may also be a handle to an | 377 * values at offset 2*n+1. Field values may also be a handle to an |
| 322 * error object if an error was encountered evaluating the field. | 378 * error object if an error was encountered evaluating the field. |
| 323 */ | 379 */ |
| 324 DART_EXPORT Dart_Handle Dart_GetStaticFields(Dart_Handle cls); | 380 DART_EXPORT Dart_Handle Dart_GetStaticFields(Dart_Handle cls); |
| 325 | 381 |
| 326 | 382 |
| 327 #endif // INCLUDE_DART_DEBUGGER_API_H_ | 383 #endif // INCLUDE_DART_DEBUGGER_API_H_ |
| OLD | NEW |