OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 #include "include/dart_debugger_api.h" | 5 #include "include/dart_debugger_api.h" |
6 | 6 |
7 #include "vm/class_finalizer.h" | 7 #include "vm/class_finalizer.h" |
8 #include "vm/compiler.h" | 8 #include "vm/compiler.h" |
9 #include "vm/dart_api_impl.h" | 9 #include "vm/dart_api_impl.h" |
10 #include "vm/dart_api_state.h" | 10 #include "vm/dart_api_state.h" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 Dart_StackTrace stack_trace = | 120 Dart_StackTrace stack_trace = |
121 reinterpret_cast<Dart_StackTrace>(isolate->debugger()->StackTrace()); | 121 reinterpret_cast<Dart_StackTrace>(isolate->debugger()->StackTrace()); |
122 (*legacy_bp_handler)(isolate_id, NULL, stack_trace); | 122 (*legacy_bp_handler)(isolate_id, NULL, stack_trace); |
123 } else if (paused_event_handler != NULL) { | 123 } else if (paused_event_handler != NULL) { |
124 Dart_CodeLocation location; | 124 Dart_CodeLocation location; |
125 ActivationFrame* top_frame = event->top_frame; | 125 ActivationFrame* top_frame = event->top_frame; |
126 location.script_url = Api::NewHandle(isolate, top_frame->SourceUrl()); | 126 location.script_url = Api::NewHandle(isolate, top_frame->SourceUrl()); |
127 const Library& lib = Library::Handle(top_frame->Library()); | 127 const Library& lib = Library::Handle(top_frame->Library()); |
128 location.library_id = lib.index(); | 128 location.library_id = lib.index(); |
129 location.token_pos = top_frame->TokenPos(); | 129 location.token_pos = top_frame->TokenPos(); |
130 (*paused_event_handler)(isolate_id, location); | 130 intptr_t bp_id = 0; |
| 131 if (event->breakpoint != NULL) { |
| 132 ASSERT(event->breakpoint->id() != ILLEGAL_BREAKPOINT_ID); |
| 133 bp_id = event->breakpoint->id(); |
| 134 } |
| 135 (*paused_event_handler)(isolate_id, bp_id, location); |
131 } | 136 } |
132 } else if (event->type == Debugger::kBreakpointResolved) { | 137 } else if (event->type == Debugger::kBreakpointResolved) { |
133 if (bp_resolved_handler != NULL) { | 138 if (bp_resolved_handler != NULL) { |
134 SourceBreakpoint* bpt = event->breakpoint; | 139 SourceBreakpoint* bpt = event->breakpoint; |
135 ASSERT(bpt != NULL); | 140 ASSERT(bpt != NULL); |
136 Dart_CodeLocation location; | 141 Dart_CodeLocation location; |
137 Library& library = Library::Handle(isolate); | 142 Library& library = Library::Handle(isolate); |
138 Script& script = Script::Handle(isolate); | 143 Script& script = Script::Handle(isolate); |
139 intptr_t token_pos; | 144 intptr_t token_pos; |
140 bpt->GetCodeLocation(&library, &script, &token_pos); | 145 bpt->GetCodeLocation(&library, &script, &token_pos); |
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
969 | 974 |
970 | 975 |
971 DART_EXPORT char* Dart_GetVmStatus(const char* request) { | 976 DART_EXPORT char* Dart_GetVmStatus(const char* request) { |
972 if (strncmp(request, "/isolate/", 9) == 0) { | 977 if (strncmp(request, "/isolate/", 9) == 0) { |
973 return Isolate::GetStatus(request); | 978 return Isolate::GetStatus(request); |
974 } | 979 } |
975 return NULL; | 980 return NULL; |
976 } | 981 } |
977 | 982 |
978 } // namespace dart | 983 } // namespace dart |
OLD | NEW |