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; |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 37 typedef void Dart_ExceptionThrownHandler(Dart_IsolateId isolate_id, | 37 typedef void Dart_ExceptionThrownHandler(Dart_IsolateId isolate_id, |
| 38 Dart_Handle exception_object, | 38 Dart_Handle exception_object, |
| 39 Dart_StackTrace stack_trace); | 39 Dart_StackTrace stack_trace); |
| 40 | 40 |
| 41 typedef enum { | 41 typedef enum { |
| 42 kCreated = 0, | 42 kCreated = 0, |
| 43 kInterrupted, | 43 kInterrupted, |
| 44 kShutdown, | 44 kShutdown, |
| 45 } Dart_IsolateEvent; | 45 } Dart_IsolateEvent; |
| 46 | 46 |
| 47 | |
| 48 /** | |
| 49 * Represents a location in Dart code. | |
| 50 */ | |
| 51 typedef struct { | |
| 52 Dart_Handle script_url; // Url (string) of the script. | |
| 53 int32_t library_id; // Library in which the script is loaded. | |
| 54 int32_t token_pos; // Code address. | |
|
Tom Ball
2013/04/12 21:44:32
Line up comment?
hausner
2013/04/12 21:48:09
Done.
| |
| 55 } Dart_CodeLocation; | |
| 56 | |
| 57 | |
| 47 typedef void Dart_IsolateEventHandler(Dart_IsolateId isolate_id, | 58 typedef void Dart_IsolateEventHandler(Dart_IsolateId isolate_id, |
| 48 Dart_IsolateEvent kind); | 59 Dart_IsolateEvent kind); |
| 49 | 60 |
| 50 /** | 61 /** |
| 51 * Caches a given \object and returns an object id. The object id is only | 62 * Caches a given \object and returns an object id. The object id is only |
| 52 * valid while the VM is paused. The cache is invalidated when the VM | 63 * valid while the VM is paused. The cache is invalidated when the VM |
| 53 * resumes. | 64 * resumes. |
| 54 * | 65 * |
| 55 * Requires there to be a current isolate. | 66 * Requires there to be a current isolate. |
| 56 * | 67 * |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 355 * | 366 * |
| 356 * \return A handle to the True object if no error occurs. | 367 * \return A handle to the True object if no error occurs. |
| 357 */ | 368 */ |
| 358 DART_EXPORT Dart_Handle Dart_GetActivationFrame( | 369 DART_EXPORT Dart_Handle Dart_GetActivationFrame( |
| 359 Dart_StackTrace trace, | 370 Dart_StackTrace trace, |
| 360 int frame_index, | 371 int frame_index, |
| 361 Dart_ActivationFrame* frame); | 372 Dart_ActivationFrame* frame); |
| 362 | 373 |
| 363 | 374 |
| 364 /** | 375 /** |
| 376 * DEPRECATED -- Use Dart_ActivationframeGetLocation instead. | |
| 377 * | |
| 365 * Returns information about the given activation frame. | 378 * Returns information about the given activation frame. |
| 366 * \function_name receives a string handle with the qualified | 379 * \function_name receives a string handle with the qualified |
| 367 * function name. | 380 * function name. |
| 368 * \script_url receives a string handle with the url of the | 381 * \script_url receives a string handle with the url of the |
| 369 * source script that contains the frame's function. | 382 * source script that contains the frame's function. |
| 370 * \line_number receives the line number in the script. | 383 * \line_number receives the line number in the script. |
| 371 * \library_id receives the id of the library in which the | 384 * \library_id receives the id of the library in which the |
| 372 * function in this frame is defined. | 385 * function in this frame is defined. |
| 373 * | 386 * |
| 374 * Any or all of the out parameters above may be NULL. | 387 * Any or all of the out parameters above may be NULL. |
| 375 * | 388 * |
| 376 * Requires there to be a current isolate. | 389 * Requires there to be a current isolate. |
| 377 * | 390 * |
| 378 * \return A handle to the True object if no error occurs. | 391 * \return A handle to the True object if no error occurs. |
| 379 */ | 392 */ |
| 380 DART_EXPORT Dart_Handle Dart_ActivationFrameInfo( | 393 DART_EXPORT Dart_Handle Dart_ActivationFrameInfo( |
| 381 Dart_ActivationFrame activation_frame, | 394 Dart_ActivationFrame activation_frame, |
| 382 Dart_Handle* function_name, | 395 Dart_Handle* function_name, |
| 383 Dart_Handle* script_url, | 396 Dart_Handle* script_url, |
| 384 intptr_t* line_number, | 397 intptr_t* line_number, |
| 385 intptr_t* library_id); | 398 intptr_t* library_id); |
| 386 | 399 |
| 387 | 400 |
| 388 /** | 401 /** |
| 389 * Returns text location of the given activation frame. | 402 * Returns code location of the given activation frame. |
| 390 * \script_url receives a string handle with the url of the | 403 * |
| 391 * source script that contains the frame's function. | 404 * \function_name receives a string handle with the qualified |
| 405 * function name. | |
| 406 * \locatin.script_url receives a string handle with the url of | |
|
Tom Ball
2013/04/12 21:44:32
locatin => location
hausner
2013/04/12 21:48:09
Done.
| |
| 407 * the source script that contains the frame's function. | |
| 392 * Receives a null handle if there is no textual location | 408 * Receives a null handle if there is no textual location |
| 393 * that corresponds to the frame, e.g. for implicitly | 409 * that corresponds to the frame, e.g. for implicitly |
| 394 * generated constructors. | 410 * generated constructors. |
| 395 * \token_number receives the line number in the script. | 411 * \location.library_id receives the id of the library in which the |
| 412 * function in this frame is defined. | |
| 413 * \location.token_pos receives the token position in the script. | |
| 396 * | 414 * |
| 397 * Any or all of the out parameters above may be NULL. | 415 * Any of the out parameters above may be NULL. |
| 398 * | 416 * |
| 399 * Requires there to be a current isolate. | 417 * Requires there to be a current isolate. |
| 400 * | 418 * |
| 401 * \return A handle to the True object if no error occurs. | 419 * \return A handle to the True object if no error occurs. |
| 402 * A handle to the False object if there is no text | 420 * A handle to the False object if there is no text |
| 403 * position for the frame. | 421 * position for the frame. |
| 404 */ | 422 */ |
| 405 DART_EXPORT Dart_Handle Dart_ActivationFrameGetLocation( | 423 DART_EXPORT Dart_Handle Dart_ActivationFrameGetLocation( |
| 406 Dart_ActivationFrame activation_frame, | 424 Dart_ActivationFrame activation_frame, |
| 407 Dart_Handle* script_url, | 425 Dart_Handle* function_name, |
| 408 intptr_t* library_id, | 426 Dart_CodeLocation* location); |
| 409 intptr_t* token_number); | |
| 410 | 427 |
| 411 | 428 |
| 412 /** | 429 /** |
| 413 * Returns an array containing all the local variable names and values of | 430 * Returns an array containing all the local variable names and values of |
| 414 * the given \activation_frame. | 431 * the given \activation_frame. |
| 415 * | 432 * |
| 416 * Requires there to be a current isolate. | 433 * Requires there to be a current isolate. |
| 417 * | 434 * |
| 418 * \return A handle to an array containing variable names and | 435 * \return A handle to an array containing variable names and |
| 419 * corresponding values. The array is empty if the activation frame has | 436 * corresponding values. The array is empty if the activation frame has |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 589 * \param request A REST-like string, which uses '/' to separate | 606 * \param request A REST-like string, which uses '/' to separate |
| 590 * parameters. The first parameter is always the status type. | 607 * parameters. The first parameter is always the status type. |
| 591 * | 608 * |
| 592 * \return The requested status as a JSON formatted string, with the | 609 * \return The requested status as a JSON formatted string, with the |
| 593 * contents defined by the status plug-in. The caller is responsible | 610 * contents defined by the status plug-in. The caller is responsible |
| 594 * for freeing this string. | 611 * for freeing this string. |
| 595 */ | 612 */ |
| 596 DART_EXPORT char* Dart_GetVmStatus(const char* request); | 613 DART_EXPORT char* Dart_GetVmStatus(const char* request); |
| 597 | 614 |
| 598 #endif // INCLUDE_DART_DEBUGGER_API_H_ | 615 #endif // INCLUDE_DART_DEBUGGER_API_H_ |
| OLD | NEW |