Chromium Code Reviews| 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_++; } |