| Index: runtime/bin/dbg_message.cc
|
| ===================================================================
|
| --- runtime/bin/dbg_message.cc (revision 21556)
|
| +++ runtime/bin/dbg_message.cc (working copy)
|
| @@ -979,14 +979,18 @@
|
| }
|
|
|
|
|
| -// TODO(hausner): Remove stack trace parameter once we remove the stack
|
| -// trace from the paused event in the wire protocol.
|
| -void DbgMsgQueue::SendBreakpointEvent(Dart_StackTrace trace) {
|
| +void DbgMsgQueue::SendBreakpointEvent(const Dart_CodeLocation& location) {
|
| dart::TextBuffer msg(128);
|
| msg.Printf("{ \"event\": \"paused\", \"params\": { ");
|
| msg.Printf("\"reason\": \"breakpoint\", ");
|
| msg.Printf("\"isolateId\": %"Pd64"", isolate_id_);
|
| - FormatLocationFromTrace(&msg, trace, ", ");
|
| + if (!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);
|
| + }
|
| msg.Printf("}}");
|
| DebuggerConnectionHandler::BroadcastMsg(&msg);
|
| }
|
| @@ -1047,7 +1051,7 @@
|
| // Setup handlers for isolate events, breakpoints, exceptions and
|
| // delayed breakpoints.
|
| Dart_SetIsolateEventHandler(IsolateEventHandler);
|
| - Dart_SetBreakpointHandler(BreakpointHandler);
|
| + Dart_SetPausedEventHandler(PausedEventHandler);
|
| Dart_SetBreakpointResolvedHandler(BptResolvedHandler);
|
| Dart_SetExceptionThrownHandler(ExceptionThrownHandler);
|
| }
|
| @@ -1168,15 +1172,14 @@
|
| }
|
|
|
|
|
| -void DbgMsgQueueList::BreakpointHandler(Dart_IsolateId isolate_id,
|
| - Dart_Breakpoint bpt,
|
| - Dart_StackTrace trace) {
|
| +void DbgMsgQueueList::PausedEventHandler(Dart_IsolateId isolate_id,
|
| + const Dart_CodeLocation& loc) {
|
| DebuggerConnectionHandler::WaitForConnection();
|
| Dart_EnterScope();
|
| DbgMsgQueue* msg_queue = GetIsolateMsgQueue(isolate_id);
|
| ASSERT(msg_queue != NULL);
|
| msg_queue->SendQueuedMsgs();
|
| - msg_queue->SendBreakpointEvent(trace);
|
| + msg_queue->SendBreakpointEvent(loc);
|
| msg_queue->HandleMessages();
|
| Dart_ExitScope();
|
| }
|
|
|