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

Unified Diff: runtime/vm/debugger.cc

Issue 1113243002: Add the --steal-breakpoints flag. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: switch branch Created 5 years, 8 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
« no previous file with comments | « runtime/vm/debugger.h ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger.cc
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index 73161726883d9a7614bf0e25e1b8ee4a4554c3e4..ab05357c5d99bfda8217984d065130bd809a68ce 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -35,6 +35,11 @@ DEFINE_FLAG(bool, show_invisible_frames, false,
DEFINE_FLAG(bool, trace_debugger_stacktrace, false,
"Trace debugger stacktrace collection");
DEFINE_FLAG(bool, verbose_debug, false, "Verbose debugger messages");
+DEFINE_FLAG(bool, steal_breakpoints, false,
+ "Intercept breakpoints and other pause events before they "
+ "are sent to the embedder and use a generic VM breakpoint "
+ "handler instead. This handler dispatches breakpoints to "
+ "the VM service.");
Debugger::EventHandler* Debugger::event_handler_ = NULL;
@@ -239,7 +244,10 @@ void Debugger::InvokeEventHandler(DebuggerEvent* event) {
Service::HandleEvent(&service_event);
}
- if (event_handler_ != NULL) {
+ if (FLAG_steal_breakpoints && event->IsPauseEvent()) {
+ // We allow the embedder's default breakpoint handler to be overridden.
+ isolate_->PauseEventHandler();
+ } else if (event_handler_ != NULL) {
(*event_handler_)(event);
}
« no previous file with comments | « runtime/vm/debugger.h ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698