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

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

Issue 13144018: Add text location in debugger event (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
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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 *line_number = frame->LineNumber(); 215 *line_number = frame->LineNumber();
216 } 216 }
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(
226 Dart_ActivationFrame activation_frame,
227 Dart_Handle* script_url,
228 intptr_t* token_number) {
229 // TODO(hausner): Implement implement a way to recognize when there
230 // is no source code for the code in the frame.
231 Isolate* isolate = Isolate::Current();
232 DARTSCOPE(isolate);
233 CHECK_AND_CAST(ActivationFrame, frame, activation_frame);
234 if (script_url != NULL) {
235 *script_url = Api::NewHandle(isolate, frame->SourceUrl());
236 }
237 if (token_number != NULL) {
238 *token_number = frame->TokenPos();
239 }
240 return Api::True(isolate);
241 }
242
243
225 DART_EXPORT Dart_Handle Dart_GetLocalVariables( 244 DART_EXPORT Dart_Handle Dart_GetLocalVariables(
226 Dart_ActivationFrame activation_frame) { 245 Dart_ActivationFrame activation_frame) {
227 Isolate* isolate = Isolate::Current(); 246 Isolate* isolate = Isolate::Current();
228 DARTSCOPE(isolate); 247 DARTSCOPE(isolate);
229 CHECK_AND_CAST(ActivationFrame, frame, activation_frame); 248 CHECK_AND_CAST(ActivationFrame, frame, activation_frame);
230 return Api::NewHandle(isolate, frame->GetLocalVariables()); 249 return Api::NewHandle(isolate, frame->GetLocalVariables());
231 } 250 }
232 251
233 252
234 DART_EXPORT Dart_Handle Dart_SetBreakpoint( 253 DART_EXPORT Dart_Handle Dart_SetBreakpoint(
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 771
753 772
754 DART_EXPORT char* Dart_GetVmStatus(const char* request) { 773 DART_EXPORT char* Dart_GetVmStatus(const char* request) {
755 if (strncmp(request, "/isolate/", 9) == 0) { 774 if (strncmp(request, "/isolate/", 9) == 0) {
756 return Isolate::GetStatus(request); 775 return Isolate::GetStatus(request);
757 } 776 }
758 return NULL; 777 return NULL;
759 } 778 }
760 779
761 } // namespace dart 780 } // namespace dart
OLDNEW
« runtime/bin/dbg_message.cc ('K') | « runtime/include/dart_debugger_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698