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

Unified Diff: runtime/vm/debugger.h

Issue 110913002: Transmit breakpoint id on paused event (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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.h
===================================================================
--- runtime/vm/debugger.h (revision 31003)
+++ runtime/vm/debugger.h (working copy)
@@ -254,13 +254,22 @@
kIsolateInterrupted = 6,
};
struct DebuggerEvent {
+ explicit DebuggerEvent(EventType event_type)
+ : type(event_type) {
+ top_frame = NULL;
+ breakpoint = NULL;
+ exception = NULL;
+ isolate_id = 0;
+ }
EventType type;
- union {
- ActivationFrame* top_frame;
- SourceBreakpoint* breakpoint;
- const Object* exception;
- Dart_Port isolate_id;
- };
+ // type == kBreakpointReached.
+ ActivationFrame* top_frame;
+ // type == kBreakpointResolved, kBreakpointReached.
+ SourceBreakpoint* breakpoint;
+ // type == kExceptionThrown.
+ const Object* exception;
+ // type == kIsolate(Created|Shutdown|Interrupted).
+ Dart_Port isolate_id;
turnidge 2013/12/10 17:17:18 At some point this may grow out of being a struct
hausner 2013/12/10 17:44:37 I try not to be baroque. It's just a struct with a
turnidge 2013/12/10 18:55:24 Yeah, agreed that being unnecessarily baroque is n
};
typedef void EventHandler(DebuggerEvent *event);
@@ -391,7 +400,8 @@
const Code& code);
static DebuggerStackTrace* CollectStackTraceNew();
void SignalBpResolved(SourceBreakpoint *bpt);
- void SignalPausedEvent(ActivationFrame* top_frame);
+ void SignalPausedEvent(ActivationFrame* top_frame,
+ SourceBreakpoint* breakpoint);
intptr_t nextId() { return next_id_++; }

Powered by Google App Engine
This is Rietveld 408576698