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

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

Issue 13771013: Add library id to code location object (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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
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* script_url,
228 intptr_t* library_id,
228 intptr_t* token_number) { 229 intptr_t* token_number) {
229 // TODO(hausner): Implement implement a way to recognize when there 230 // TODO(hausner): Implement implement a way to recognize when there
230 // is no source code for the code in the frame. 231 // is no source code for the code in the frame.
231 Isolate* isolate = Isolate::Current(); 232 Isolate* isolate = Isolate::Current();
232 DARTSCOPE(isolate); 233 DARTSCOPE(isolate);
233 CHECK_AND_CAST(ActivationFrame, frame, activation_frame); 234 CHECK_AND_CAST(ActivationFrame, frame, activation_frame);
234 if (script_url != NULL) { 235 if (script_url != NULL) {
235 *script_url = Api::NewHandle(isolate, frame->SourceUrl()); 236 *script_url = Api::NewHandle(isolate, frame->SourceUrl());
236 } 237 }
238 if (library_id != NULL) {
239 const Library& lib = Library::Handle(frame->Library());
240 *library_id = lib.index();
241 }
237 if (token_number != NULL) { 242 if (token_number != NULL) {
238 *token_number = frame->TokenPos(); 243 *token_number = frame->TokenPos();
239 } 244 }
240 return Api::True(isolate); 245 return Api::True(isolate);
241 } 246 }
242 247
243 248
244 DART_EXPORT Dart_Handle Dart_GetLocalVariables( 249 DART_EXPORT Dart_Handle Dart_GetLocalVariables(
245 Dart_ActivationFrame activation_frame) { 250 Dart_ActivationFrame activation_frame) {
246 Isolate* isolate = Isolate::Current(); 251 Isolate* isolate = Isolate::Current();
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 827
823 828
824 DART_EXPORT char* Dart_GetVmStatus(const char* request) { 829 DART_EXPORT char* Dart_GetVmStatus(const char* request) {
825 if (strncmp(request, "/isolate/", 9) == 0) { 830 if (strncmp(request, "/isolate/", 9) == 0) {
826 return Isolate::GetStatus(request); 831 return Isolate::GetStatus(request);
827 } 832 }
828 return NULL; 833 return NULL;
829 } 834 }
830 835
831 } // namespace dart 836 } // 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