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

Unified Diff: runtime/vm/isolate.cc

Issue 537673002: Add --break-at-isolate-spawn to help with isolate debugging. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: gen js Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/vmservice/observatory/lib/src/service/object.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.cc
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index a90137d56724e31b06c859c90c39b4e2f7367487..74d0394a57ab2dae0801233c96f34af7cf807a54 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -43,6 +43,9 @@ DEFINE_FLAG(bool, pause_isolates_on_start, false,
"Pause isolates before starting.");
DEFINE_FLAG(bool, pause_isolates_on_exit, false,
"Pause isolates exiting.");
+DEFINE_FLAG(bool, break_at_isolate_spawn, false,
+ "Insert a one-time breakpoint at the entrypoint for all spawned "
+ "isolates");
// Quick access to the locally defined isolate() method.
@@ -836,6 +839,14 @@ static bool RunIsolate(uword parameter) {
func ^= result.raw();
func = func.ImplicitClosureFunction();
+ // TODO(turnidge): Currently we need a way to force a one-time
+ // breakpoint for all spawned isolates to support isolate
+ // debugging. Remove this once the vmservice becomes the standard
+ // way to debug.
+ if (FLAG_break_at_isolate_spawn) {
+ isolate->debugger()->OneTimeBreakAtEntry(func);
+ }
+
const Array& capabilities = Array::Handle(Array::New(2));
Capability& capability = Capability::Handle();
capability = Capability::New(isolate->pause_capability());
« no previous file with comments | « runtime/bin/vmservice/observatory/lib/src/service/object.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698