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

Unified Diff: runtime/bin/dbg_message.cc

Issue 13940008: Add library id, location info to breakpointResolved event (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | « runtime/bin/dbg_message.h ('k') | 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 21569)
+++ runtime/bin/dbg_message.cc (working copy)
@@ -1157,14 +1157,26 @@
void DbgMsgQueueList::BptResolvedHandler(Dart_IsolateId isolate_id,
intptr_t bp_id,
- Dart_Handle url,
- intptr_t line_number) {
+ const Dart_CodeLocation& location) {
Dart_EnterScope();
dart::TextBuffer msg(128);
msg.Printf("{ \"event\": \"breakpointResolved\", \"params\": {");
- msg.Printf("\"breakpointId\": %"Pd", \"url\":", bp_id);
- FormatEncodedString(&msg, url);
- msg.Printf(",\"line\": %"Pd" }}", line_number);
+ msg.Printf("\"breakpointId\": %"Pd"", bp_id);
+
+ // TODO(hausner): remove url and line elements.
+ msg.Printf(", \"url\":");
+ FormatEncodedString(&msg, location.script_url);
+ int line_number = GetIntValue(Dart_GetBreakpointLine(bp_id));
+ msg.Printf(",\"line\":%d", line_number);
+
+ msg.Printf(", \"isolateId\":%"Pd64"", isolate_id);
+ ASSERT(!Dart_IsNull(location.script_url));
+ ASSERT(Dart_IsString(location.script_url));
+ msg.Printf(", \"location\":{\"url\":");
+ FormatEncodedString(&msg, location.script_url);
+ msg.Printf(",\"libraryId\":%d", location.library_id);
+ msg.Printf(",\"tokenOffset\":%d}}}", location.token_pos);
+
DbgMsgQueue* msg_queue = GetIsolateMsgQueue(isolate_id);
ASSERT(msg_queue != NULL);
msg_queue->QueueOutputMsg(&msg);
« no previous file with comments | « runtime/bin/dbg_message.h ('k') | runtime/include/dart_debugger_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698