OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 "vm/debugger.h" | 5 #include "vm/debugger.h" |
6 #include "vm/heap_histogram.h" | 6 #include "vm/heap_histogram.h" |
7 #include "vm/isolate.h" | 7 #include "vm/isolate.h" |
8 #include "vm/message.h" | 8 #include "vm/message.h" |
9 #include "vm/object.h" | 9 #include "vm/object.h" |
10 #include "vm/object_id_ring.h" | 10 #include "vm/object_id_ring.h" |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 | 160 |
161 static void HandleStackTrace(Isolate* isolate, JSONStream* js) { | 161 static void HandleStackTrace(Isolate* isolate, JSONStream* js) { |
162 DebuggerStackTrace* stack = isolate->debugger()->StackTrace(); | 162 DebuggerStackTrace* stack = isolate->debugger()->StackTrace(); |
163 js->OpenObject(); | 163 js->OpenObject(); |
164 js->PrintProperty("type", "StackTrace"); | 164 js->PrintProperty("type", "StackTrace"); |
165 js->OpenArray("members"); | 165 js->OpenArray("members"); |
166 intptr_t n_frames = stack->Length(); | 166 intptr_t n_frames = stack->Length(); |
167 String& url = String::Handle(); | 167 String& url = String::Handle(); |
168 String& function = String::Handle(); | 168 String& function = String::Handle(); |
169 for (int i = 0; i < n_frames; i++) { | 169 for (int i = 0; i < n_frames; i++) { |
170 ActivationFrame* frame = stack->ActivationFrameAt(i); | 170 ActivationFrame* frame = stack->FrameAt(i); |
171 url ^= frame->SourceUrl(); | 171 url ^= frame->SourceUrl(); |
172 function ^= frame->function().UserVisibleName(); | 172 function ^= frame->function().UserVisibleName(); |
173 js->OpenObject(); | 173 js->OpenObject(); |
174 js->PrintProperty("name", function.ToCString()); | 174 js->PrintProperty("name", function.ToCString()); |
175 js->PrintProperty("url", url.ToCString()); | 175 js->PrintProperty("url", url.ToCString()); |
176 js->PrintProperty("line", frame->LineNumber()); | 176 js->PrintProperty("line", frame->LineNumber()); |
177 js->PrintProperty("function", frame->function()); | 177 js->PrintProperty("function", frame->function()); |
178 js->PrintProperty("code", frame->code()); | 178 js->PrintProperty("code", frame->code()); |
179 js->CloseObject(); | 179 js->CloseObject(); |
180 } | 180 } |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 for (intptr_t i = 0; i < num_message_handlers; i++) { | 278 for (intptr_t i = 0; i < num_message_handlers; i++) { |
279 const ServiceMessageHandlerEntry& entry = __message_handlers[i]; | 279 const ServiceMessageHandlerEntry& entry = __message_handlers[i]; |
280 if (!strcmp(command, entry.command)) { | 280 if (!strcmp(command, entry.command)) { |
281 return entry.handler; | 281 return entry.handler; |
282 } | 282 } |
283 } | 283 } |
284 return HandleFallthrough; | 284 return HandleFallthrough; |
285 } | 285 } |
286 | 286 |
287 } // namespace dart | 287 } // namespace dart |
OLD | NEW |