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

Unified Diff: runtime/vm/debugger.cc

Issue 135843003: Fix several little buglets with stepping (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
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) {
« no previous file with comments | « runtime/vm/debugger.h ('k') | runtime/vm/parser.cc » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698