Index: runtime/vm/service_event.cc |
diff --git a/runtime/vm/service_event.cc b/runtime/vm/service_event.cc |
index 070125d6f299f7f4cf83a5c23ff1963874633da7..a0faadf60d193c79d66ba2227d85e5f7468f5d93 100644 |
--- a/runtime/vm/service_event.cc |
+++ b/runtime/vm/service_event.cc |
@@ -84,6 +84,8 @@ const char* ServiceEvent::EventTypeToCString(EventType type) { |
return "GC"; // TODO(koda): Change to GarbageCollected. |
case kInspect: |
return "Inspect"; |
+ case kIllegal: |
+ return "Illegal"; |
default: |
UNREACHABLE(); |
return "Unknown"; |
@@ -91,6 +93,35 @@ const char* ServiceEvent::EventTypeToCString(EventType type) { |
} |
+const char* ServiceEvent::stream_id() const { |
+ switch (type()) { |
+ case kIsolateStart: |
+ case kIsolateExit: |
+ case kIsolateUpdate: |
+ return "Isolate"; |
+ |
+ case kPauseStart: |
+ case kPauseExit: |
+ case kPauseBreakpoint: |
+ case kPauseInterrupted: |
+ case kPauseException: |
+ case kResume: |
+ case kBreakpointAdded: |
+ case kBreakpointResolved: |
+ case kBreakpointRemoved: |
+ case kInspect: |
+ return "Debug"; |
+ |
+ case kGC: |
+ return "GC"; |
+ |
+ default: |
+ UNREACHABLE(); |
+ return NULL; |
+ } |
+} |
+ |
+ |
void ServiceEvent::PrintJSON(JSONStream* js) const { |
JSONObject jsobj(js); |
jsobj.AddProperty("type", "ServiceEvent"); |