| OLD | NEW |
| 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_tools_api.h" | 5 #include "include/dart_tools_api.h" |
| 6 | 6 |
| 7 #include "vm/class_finalizer.h" | 7 #include "vm/class_finalizer.h" |
| 8 #include "vm/compiler.h" | 8 #include "vm/compiler.h" |
| 9 #include "vm/dart_api_impl.h" | 9 #include "vm/dart_api_impl.h" |
| 10 #include "vm/dart_api_state.h" | 10 #include "vm/dart_api_state.h" |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 | 354 |
| 355 DART_EXPORT Dart_Handle Dart_GetBreakpointLine(intptr_t bp_id) { | 355 DART_EXPORT Dart_Handle Dart_GetBreakpointLine(intptr_t bp_id) { |
| 356 DARTSCOPE(Thread::Current()); | 356 DARTSCOPE(Thread::Current()); |
| 357 Debugger* debugger = I->debugger(); | 357 Debugger* debugger = I->debugger(); |
| 358 | 358 |
| 359 Breakpoint* bpt = debugger->GetBreakpointById(bp_id); | 359 Breakpoint* bpt = debugger->GetBreakpointById(bp_id); |
| 360 if (bpt == NULL) { | 360 if (bpt == NULL) { |
| 361 return Api::NewError("%s: breakpoint with id %" Pd " does not exist", | 361 return Api::NewError("%s: breakpoint with id %" Pd " does not exist", |
| 362 CURRENT_FUNC, bp_id); | 362 CURRENT_FUNC, bp_id); |
| 363 } | 363 } |
| 364 return Dart_NewInteger(bpt->bpt_location()->LineNumber()); | 364 if (bpt->bpt_location()->IsResolved()) { |
| 365 return Dart_NewInteger(bpt->bpt_location()->LineNumber()); |
| 366 } else { |
| 367 return Dart_NewInteger(bpt->bpt_location()->requested_line_number()); |
| 368 } |
| 365 } | 369 } |
| 366 | 370 |
| 367 | 371 |
| 368 DART_EXPORT Dart_Handle Dart_SetBreakpointAtEntry( | 372 DART_EXPORT Dart_Handle Dart_SetBreakpointAtEntry( |
| 369 Dart_Handle library_in, | 373 Dart_Handle library_in, |
| 370 Dart_Handle class_name_in, | 374 Dart_Handle class_name_in, |
| 371 Dart_Handle function_name_in) { | 375 Dart_Handle function_name_in) { |
| 372 DARTSCOPE(Thread::Current()); | 376 DARTSCOPE(Thread::Current()); |
| 373 UNWRAP_AND_CHECK_PARAM(Library, library, library_in); | 377 UNWRAP_AND_CHECK_PARAM(Library, library, library_in); |
| 374 UNWRAP_AND_CHECK_PARAM(String, class_name, class_name_in); | 378 UNWRAP_AND_CHECK_PARAM(String, class_name, class_name_in); |
| (...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 926 return Api::CastIsolate(isolate); | 930 return Api::CastIsolate(isolate); |
| 927 } | 931 } |
| 928 | 932 |
| 929 | 933 |
| 930 DART_EXPORT Dart_IsolateId Dart_GetIsolateId(Dart_Isolate dart_isolate) { | 934 DART_EXPORT Dart_IsolateId Dart_GetIsolateId(Dart_Isolate dart_isolate) { |
| 931 Isolate* isolate = reinterpret_cast<Isolate*>(dart_isolate); | 935 Isolate* isolate = reinterpret_cast<Isolate*>(dart_isolate); |
| 932 return isolate->debugger()->GetIsolateId(); | 936 return isolate->debugger()->GetIsolateId(); |
| 933 } | 937 } |
| 934 | 938 |
| 935 } // namespace dart | 939 } // namespace dart |
| OLD | NEW |