| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_SERVICE_EVENT_H_ | 5 #ifndef VM_SERVICE_EVENT_H_ |
| 6 #define VM_SERVICE_EVENT_H_ | 6 #define VM_SERVICE_EVENT_H_ |
| 7 | 7 |
| 8 #include "vm/debugger.h" | 8 #include "vm/debugger.h" |
| 9 | 9 |
| 10 class DebuggerEvent; | 10 class DebuggerEvent; |
| 11 | 11 |
| 12 namespace dart { | 12 namespace dart { |
| 13 | 13 |
| 14 class ServiceEvent { | 14 class ServiceEvent { |
| 15 public: | 15 public: |
| 16 enum EventKind { | 16 enum EventKind { |
| 17 kVMUpdate, // VM identity information has changed | 17 kVMUpdate, // VM identity information has changed |
| 18 | 18 |
| 19 kIsolateStart, // New isolate has started | 19 kIsolateStart, // New isolate has started |
| 20 kIsolateRunnable, // Isolate is ready to run | 20 kIsolateRunnable, // Isolate is ready to run |
| 21 kIsolateExit, // Isolate has exited | 21 kIsolateExit, // Isolate has exited |
| 22 kIsolateUpdate, // Isolate identity information has changed | 22 kIsolateUpdate, // Isolate identity information has changed |
| 23 | 23 |
| 24 kServiceExtensionAdded, // A service extension was registered |
| 25 |
| 24 kPauseStart, // --pause-isolates-on-start | 26 kPauseStart, // --pause-isolates-on-start |
| 25 kPauseExit, // --pause-isolates-on-exit | 27 kPauseExit, // --pause-isolates-on-exit |
| 26 kPauseBreakpoint, | 28 kPauseBreakpoint, |
| 27 kPauseInterrupted, | 29 kPauseInterrupted, |
| 28 kPauseException, | 30 kPauseException, |
| 29 kResume, | 31 kResume, |
| 30 kBreakpointAdded, | 32 kBreakpointAdded, |
| 31 kBreakpointResolved, | 33 kBreakpointResolved, |
| 32 kBreakpointRemoved, | 34 kBreakpointRemoved, |
| 33 kInspect, | 35 kInspect, |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 return top_frame_; | 92 return top_frame_; |
| 91 } | 93 } |
| 92 void set_top_frame(ActivationFrame* frame) { | 94 void set_top_frame(ActivationFrame* frame) { |
| 93 ASSERT(kind() == kPauseBreakpoint || | 95 ASSERT(kind() == kPauseBreakpoint || |
| 94 kind() == kPauseInterrupted || | 96 kind() == kPauseInterrupted || |
| 95 kind() == kPauseException || | 97 kind() == kPauseException || |
| 96 kind() == kResume); | 98 kind() == kResume); |
| 97 top_frame_ = frame; | 99 top_frame_ = frame; |
| 98 } | 100 } |
| 99 | 101 |
| 102 const String* extension_rpc() const { |
| 103 return extension_rpc_; |
| 104 } |
| 105 void set_extension_rpc(const String* extension_rpc) { |
| 106 extension_rpc_ = extension_rpc; |
| 107 } |
| 108 |
| 100 const Object* exception() const { | 109 const Object* exception() const { |
| 101 return exception_; | 110 return exception_; |
| 102 } | 111 } |
| 103 void set_exception(const Object* exception) { | 112 void set_exception(const Object* exception) { |
| 104 ASSERT(kind_ == kPauseException); | 113 ASSERT(kind_ == kPauseException); |
| 105 exception_ = exception; | 114 exception_ = exception; |
| 106 } | 115 } |
| 107 | 116 |
| 108 const Object* async_continuation() const { | 117 const Object* async_continuation() const { |
| 109 return async_continuation_; | 118 return async_continuation_; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 170 |
| 162 void PrintJSONHeader(JSONObject* jsobj) const; | 171 void PrintJSONHeader(JSONObject* jsobj) const; |
| 163 | 172 |
| 164 private: | 173 private: |
| 165 Isolate* isolate_; | 174 Isolate* isolate_; |
| 166 EventKind kind_; | 175 EventKind kind_; |
| 167 const char* embedder_kind_; | 176 const char* embedder_kind_; |
| 168 const char* embedder_stream_id_; | 177 const char* embedder_stream_id_; |
| 169 Breakpoint* breakpoint_; | 178 Breakpoint* breakpoint_; |
| 170 ActivationFrame* top_frame_; | 179 ActivationFrame* top_frame_; |
| 180 const String* extension_rpc_; |
| 171 const Object* exception_; | 181 const Object* exception_; |
| 172 const Object* async_continuation_; | 182 const Object* async_continuation_; |
| 173 bool at_async_jump_; | 183 bool at_async_jump_; |
| 174 const Object* inspectee_; | 184 const Object* inspectee_; |
| 175 const Heap::GCStats* gc_stats_; | 185 const Heap::GCStats* gc_stats_; |
| 176 const uint8_t* bytes_; | 186 const uint8_t* bytes_; |
| 177 intptr_t bytes_length_; | 187 intptr_t bytes_length_; |
| 178 LogRecord log_record_; | 188 LogRecord log_record_; |
| 179 int64_t timestamp_; | 189 int64_t timestamp_; |
| 180 }; | 190 }; |
| 181 | 191 |
| 182 } // namespace dart | 192 } // namespace dart |
| 183 | 193 |
| 184 #endif // VM_SERVICE_EVENT_H_ | 194 #endif // VM_SERVICE_EVENT_H_ |
| OLD | NEW |