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

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

Issue 9264058: Debugger API: get local variables of an activation frame (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 10 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 const String& url = String::Handle(frame->SourceUrl()); 101 const String& url = String::Handle(frame->SourceUrl());
102 *script_url = Api::NewLocalHandle(url); 102 *script_url = Api::NewLocalHandle(url);
103 } 103 }
104 if (line_number != NULL) { 104 if (line_number != NULL) {
105 *line_number = frame->LineNumber(); 105 *line_number = frame->LineNumber();
106 } 106 }
107 return Api::True(); 107 return Api::True();
108 } 108 }
109 109
110 110
111 DART_EXPORT Dart_Handle Dart_GetLocalVariables(
112 Dart_ActivationFrame activation_frame) {
113 Isolate* isolate = Isolate::Current();
114 DARTSCOPE(isolate);
115 CHECK_AND_CAST(ActivationFrame, frame, activation_frame);
116 const Array& variables = Array::Handle(frame->GetLocalVariables());
117 return Api::NewLocalHandle(variables);
118 }
119
120
111 DART_EXPORT Dart_Handle Dart_SetBreakpointAtLine( 121 DART_EXPORT Dart_Handle Dart_SetBreakpointAtLine(
112 Dart_Handle script_url_in, 122 Dart_Handle script_url_in,
113 Dart_Handle line_number_in, 123 Dart_Handle line_number_in,
114 Dart_Breakpoint* breakpoint) { 124 Dart_Breakpoint* breakpoint) {
115 Isolate* isolate = Isolate::Current(); 125 Isolate* isolate = Isolate::Current();
116 DARTSCOPE(isolate); 126 DARTSCOPE(isolate);
117 127
118 String& script_url = String::Handle(); 128 String& script_url = String::Handle();
119 Integer& line_number = Integer::Handle(); 129 Integer& line_number = Integer::Handle();
120 UNWRAP_AND_CHECK_PARAM(String, script_url, script_url_in); 130 UNWRAP_AND_CHECK_PARAM(String, script_url, script_url_in);
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 for (int i = 0; i < num_libs; i++) { 348 for (int i = 0; i < num_libs; i++) {
339 ASSERT(!lib.IsNull()); 349 ASSERT(!lib.IsNull());
340 lib_url = lib.url(); 350 lib_url = lib.url();
341 library_list.SetAt(i, lib_url); 351 library_list.SetAt(i, lib_url);
342 lib = lib.next_registered(); 352 lib = lib.next_registered();
343 } 353 }
344 return Api::NewLocalHandle(library_list); 354 return Api::NewLocalHandle(library_list);
345 } 355 }
346 356
347 } // namespace dart 357 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698