Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(546)

Side by Side Diff: runtime/include/dart_debugger_api.h

Issue 51793002: Add an API function to get a debugger stack trace from an error handle. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: . Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 345
346 346
347 /** 347 /**
348 * Returns on which exceptions the debugger pauses. 348 * Returns on which exceptions the debugger pauses.
349 * 349 *
350 * Requires there to be a current isolate. 350 * Requires there to be a current isolate.
351 */ 351 */
352 DART_EXPORT Dart_ExceptionPauseInfo Dart_GetExceptionPauseInfo(); 352 DART_EXPORT Dart_ExceptionPauseInfo Dart_GetExceptionPauseInfo();
353 353
354 /** 354 /**
355 * Returns in \trace the the current stack trace, or NULL if the 355 * Returns in \trace the current stack trace, or NULL if the
356 * VM is not paused. 356 * VM is not paused.
357 * 357 *
358 * Requires there to be a current isolate. 358 * Requires there to be a current isolate.
359 * 359 *
360 * \return A handle to the True object if no error occurs. 360 * \return A valid handle if no error occurs during the operation.
361 */ 361 */
362 DART_EXPORT Dart_Handle Dart_GetStackTrace(Dart_StackTrace* trace); 362 DART_EXPORT Dart_Handle Dart_GetStackTrace(Dart_StackTrace* trace);
363 363
364 364
365 /** 365 /**
366 * Returns in \trace the stack trace associated with the error given in \handle.
367 *
368 * Requires there to be a current isolate.
369 *
370 * \return A valid handle if no error occurs during the operation.
371 */
372 DART_EXPORT Dart_Handle Dart_GetStackTraceFromError(Dart_Handle error,
373 Dart_StackTrace* trace);
374
375
376 /**
366 * Returns in \length the number of activation frames in the given 377 * Returns in \length the number of activation frames in the given
367 * stack trace. 378 * stack trace.
368 * 379 *
369 * Requires there to be a current isolate. 380 * Requires there to be a current isolate.
370 * 381 *
371 * \return A handle to the True object if no error occurs. 382 * \return A handle to the True object if no error occurs.
372 */ 383 */
373 DART_EXPORT Dart_Handle Dart_StackTraceLength( 384 DART_EXPORT Dart_Handle Dart_StackTraceLength(
374 Dart_StackTrace trace, 385 Dart_StackTrace trace,
375 intptr_t* length); 386 intptr_t* length);
376 387
377 388
378 /** 389 /**
379 * Returns in \frame the activation frame with index \frame_index. 390 * Returns in \frame the activation frame with index \frame_index.
380 * The activation frame at the top of stack has index 0. 391 * The activation frame at the top of stack has index 0.
381 * 392 *
382 * Requires there to be a current isolate. 393 * Requires there to be a current isolate.
383 * 394 *
384 * \return A handle to the True object if no error occurs. 395 * \return A handle to the True object if no error occurs.
385 */ 396 */
386 DART_EXPORT Dart_Handle Dart_GetActivationFrame( 397 DART_EXPORT Dart_Handle Dart_GetActivationFrame(
387 Dart_StackTrace trace, 398 Dart_StackTrace trace,
388 int frame_index, 399 int frame_index,
389 Dart_ActivationFrame* frame); 400 Dart_ActivationFrame* frame);
390 401
391 402
392 /** 403 /**
393 * DEPRECATED -- Use Dart_ActivationFrameGetLocation instead.
394 *
395 * Returns information about the given activation frame. 404 * Returns information about the given activation frame.
396 * \function_name receives a string handle with the qualified 405 * \function_name receives a string handle with the qualified
397 * function name. 406 * function name.
398 * \script_url receives a string handle with the url of the 407 * \script_url receives a string handle with the url of the
399 * source script that contains the frame's function. 408 * source script that contains the frame's function.
400 * \line_number receives the line number in the script. 409 * \line_number receives the line number in the script.
401 * \library_id receives the id of the library in which the 410 * \col_number receives the column number in the script, or -1 if column
402 * function in this frame is defined. 411 * information is not available
403 * 412 *
404 * Any or all of the out parameters above may be NULL. 413 * Any or all of the out parameters above may be NULL.
405 * 414 *
406 * Requires there to be a current isolate. 415 * Requires there to be a current isolate.
407 * 416 *
408 * \return A handle to the True object if no error occurs. 417 * \return A valid handle if no error occurs during the operation.
409 */ 418 */
410 DART_EXPORT Dart_Handle Dart_ActivationFrameInfo( 419 DART_EXPORT Dart_Handle Dart_ActivationFrameInfo(
411 Dart_ActivationFrame activation_frame, 420 Dart_ActivationFrame activation_frame,
412 Dart_Handle* function_name, 421 Dart_Handle* function_name,
413 Dart_Handle* script_url, 422 Dart_Handle* script_url,
414 intptr_t* line_number, 423 intptr_t* line_number,
415 intptr_t* library_id); 424 intptr_t* column_number);
416 425
417 426
418 /** 427 /**
419 * Returns code location of the given activation frame. 428 * Returns code location of the given activation frame.
420 * 429 *
421 * \function_name receives a string handle with the qualified 430 * \function_name receives a string handle with the qualified
422 * function name. 431 * function name.
423 * \function receives a handle to the function. 432 * \function receives a handle to the function.
424 * \location.script_url receives a string handle with the url of 433 * \location.script_url receives a string handle with the url of
425 * the source script that contains the frame's function. 434 * the source script that contains the frame's function.
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 * \param request A REST-like string, which uses '/' to separate 705 * \param request A REST-like string, which uses '/' to separate
697 * parameters. The first parameter is always the status type. 706 * parameters. The first parameter is always the status type.
698 * 707 *
699 * \return The requested status as a JSON formatted string, with the 708 * \return The requested status as a JSON formatted string, with the
700 * contents defined by the status plug-in. The caller is responsible 709 * contents defined by the status plug-in. The caller is responsible
701 * for freeing this string. 710 * for freeing this string.
702 */ 711 */
703 DART_EXPORT char* Dart_GetVmStatus(const char* request); 712 DART_EXPORT char* Dart_GetVmStatus(const char* request);
704 713
705 #endif // INCLUDE_DART_DEBUGGER_API_H_ 714 #endif // INCLUDE_DART_DEBUGGER_API_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698