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