| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |