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

Unified Diff: runtime/bin/dbg_message.cc

Issue 242453011: Add class id to debugger stack trace (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/include/dart_debugger_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/dbg_message.cc
===================================================================
--- runtime/bin/dbg_message.cc (revision 35210)
+++ runtime/bin/dbg_message.cc (working copy)
@@ -473,8 +473,9 @@
res = Dart_GetActivationFrame(trace, i, &frame);
ASSERT_NOT_ERROR(res);
Dart_Handle func_name;
+ Dart_Handle func;
Dart_CodeLocation location;
- res = Dart_ActivationFrameGetLocation(frame, &func_name, NULL, &location);
+ res = Dart_ActivationFrameGetLocation(frame, &func_name, &func, &location);
ASSERT_NOT_ERROR(res);
ASSERT(Dart_IsString(func_name));
msg->Printf("%s{\"functionName\":", (i > 0) ? "," : "");
@@ -486,6 +487,13 @@
msg->Printf(",\"libraryId\":%d,", location.library_id);
msg->Printf("\"tokenOffset\":%d}", location.token_pos);
}
+ ASSERT_NOT_ERROR(func);
+ Dart_Handle origin = Dart_GetFunctionOrigin(func);
+ ASSERT_NOT_ERROR(origin);
+ if (Dart_IsInteger(origin)) {
+ int64_t class_id = GetIntValue(origin);
+ msg->Printf(",\"classId\":%" Pd64 "", class_id);
+ }
Dart_Handle locals = Dart_GetLocalVariables(frame);
ASSERT_NOT_ERROR(locals);
msg->Printf(",\"locals\":");
« no previous file with comments | « no previous file | runtime/include/dart_debugger_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698