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

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

Issue 1312763010: Support column-based breakpoints in the VM and Observatory. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: hausner review Created 5 years, 3 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
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/debugger_test.cc » ('j') | 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_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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/debugger_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698