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

Side by Side Diff: runtime/vm/debugger_api_impl.cc

Issue 13975018: More cleanups in debugger API and wire protocol (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/include/dart_debugger_api.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/dart_api_impl.h" 7 #include "vm/dart_api_impl.h"
8 #include "vm/dart_api_state.h" 8 #include "vm/dart_api_state.h"
9 #include "vm/debugger.h" 9 #include "vm/debugger.h"
10 #include "vm/isolate.h" 10 #include "vm/isolate.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 if (library_id != NULL) { 217 if (library_id != NULL) {
218 const Library& lib = Library::Handle(frame->Library()); 218 const Library& lib = Library::Handle(frame->Library());
219 *library_id = lib.index(); 219 *library_id = lib.index();
220 } 220 }
221 return Api::True(isolate); 221 return Api::True(isolate);
222 } 222 }
223 223
224 224
225 DART_EXPORT Dart_Handle Dart_ActivationFrameGetLocation( 225 DART_EXPORT Dart_Handle Dart_ActivationFrameGetLocation(
226 Dart_ActivationFrame activation_frame, 226 Dart_ActivationFrame activation_frame,
227 Dart_Handle* script_url, 227 Dart_Handle* function_name,
228 intptr_t* library_id, 228 Dart_CodeLocation* location) {
229 intptr_t* token_number) { 229 // TODO(hausner): Implement a way to recognize when there
230 // TODO(hausner): Implement implement a way to recognize when there
231 // is no source code for the code in the frame. 230 // is no source code for the code in the frame.
232 Isolate* isolate = Isolate::Current(); 231 Isolate* isolate = Isolate::Current();
233 DARTSCOPE(isolate); 232 DARTSCOPE(isolate);
234 CHECK_AND_CAST(ActivationFrame, frame, activation_frame); 233 CHECK_AND_CAST(ActivationFrame, frame, activation_frame);
235 if (script_url != NULL) { 234 if (function_name != NULL) {
236 *script_url = Api::NewHandle(isolate, frame->SourceUrl()); 235 *function_name = Api::NewHandle(isolate, frame->QualifiedFunctionName());
237 } 236 }
238 if (library_id != NULL) { 237
238 if (location != NULL) {
239 location->script_url = Api::NewHandle(isolate, frame->SourceUrl());
239 const Library& lib = Library::Handle(frame->Library()); 240 const Library& lib = Library::Handle(frame->Library());
240 *library_id = lib.index(); 241 location->library_id = lib.index();
241 } 242 location->token_pos = frame->TokenPos();
242 if (token_number != NULL) {
243 *token_number = frame->TokenPos();
244 } 243 }
245 return Api::True(isolate); 244 return Api::True(isolate);
246 } 245 }
247 246
248 247
249 DART_EXPORT Dart_Handle Dart_GetLocalVariables( 248 DART_EXPORT Dart_Handle Dart_GetLocalVariables(
250 Dart_ActivationFrame activation_frame) { 249 Dart_ActivationFrame activation_frame) {
251 Isolate* isolate = Isolate::Current(); 250 Isolate* isolate = Isolate::Current();
252 DARTSCOPE(isolate); 251 DARTSCOPE(isolate);
253 CHECK_AND_CAST(ActivationFrame, frame, activation_frame); 252 CHECK_AND_CAST(ActivationFrame, frame, activation_frame);
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 745
747 746
748 DART_EXPORT char* Dart_GetVmStatus(const char* request) { 747 DART_EXPORT char* Dart_GetVmStatus(const char* request) {
749 if (strncmp(request, "/isolate/", 9) == 0) { 748 if (strncmp(request, "/isolate/", 9) == 0) {
750 return Isolate::GetStatus(request); 749 return Isolate::GetStatus(request);
751 } 750 }
752 return NULL; 751 return NULL;
753 } 752 }
754 753
755 } // namespace dart 754 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/include/dart_debugger_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698