Index: runtime/vm/debugger.cc |
=================================================================== |
--- runtime/vm/debugger.cc (revision 31891) |
+++ runtime/vm/debugger.cc (working copy) |
@@ -1892,6 +1892,11 @@ |
if (frame->TokenPos() == Scanner::kDummyTokenIndex) { |
return; |
} |
+ // Don't pause for a single step if there is a breakpoint set |
+ // at this location. |
+ if (HasActiveBreakpoint(frame->pc())) { |
+ return; |
+ } |
if (FLAG_verbose_debug) { |
OS::Print(">>> single step break at %s:%" Pd " (func %s token %" Pd ")\n", |
@@ -2101,6 +2106,14 @@ |
} |
+// TODO(hausner): Could potentially make this faster by checking |
+// whether the call target at pc is a debugger stub. |
+bool Debugger::HasActiveBreakpoint(uword pc) { |
+ CodeBreakpoint* bpt = GetCodeBreakpoint(pc); |
+ return (bpt != NULL) && (bpt->IsEnabled()); |
+} |
+ |
+ |
CodeBreakpoint* Debugger::GetCodeBreakpoint(uword breakpoint_address) { |
CodeBreakpoint* bpt = code_breakpoints_; |
while (bpt != NULL) { |