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; |
(...skipping 12 matching lines...) Expand all Loading... |
23 kPauseBreakpoint, | 23 kPauseBreakpoint, |
24 kPauseInterrupted, | 24 kPauseInterrupted, |
25 kPauseException, | 25 kPauseException, |
26 kResume, | 26 kResume, |
27 | 27 |
28 kBreakpointAdded, | 28 kBreakpointAdded, |
29 kBreakpointResolved, | 29 kBreakpointResolved, |
30 kBreakpointRemoved, | 30 kBreakpointRemoved, |
31 | 31 |
32 kGC, | 32 kGC, |
| 33 kInspect, |
33 | 34 |
34 kIllegal, | 35 kIllegal, |
35 }; | 36 }; |
36 | 37 |
37 ServiceEvent(Isolate* isolate, EventType event_type) | 38 ServiceEvent(Isolate* isolate, EventType event_type) |
38 : isolate_(isolate), | 39 : isolate_(isolate), |
39 type_(event_type), | 40 type_(event_type), |
40 breakpoint_(NULL), | 41 breakpoint_(NULL), |
41 top_frame_(NULL), | 42 top_frame_(NULL), |
42 exception_(NULL), | 43 exception_(NULL), |
| 44 inspectee_(NULL), |
43 gc_stats_(NULL) {} | 45 gc_stats_(NULL) {} |
44 | 46 |
45 explicit ServiceEvent(const DebuggerEvent* debugger_event); | 47 explicit ServiceEvent(const DebuggerEvent* debugger_event); |
46 | 48 |
47 Isolate* isolate() const { return isolate_; } | 49 Isolate* isolate() const { return isolate_; } |
48 | 50 |
49 EventType type() const { return type_; } | 51 EventType type() const { return type_; } |
50 | 52 |
51 SourceBreakpoint* breakpoint() const { | 53 SourceBreakpoint* breakpoint() const { |
52 return breakpoint_; | 54 return breakpoint_; |
(...skipping 18 matching lines...) Expand all Loading... |
71 } | 73 } |
72 | 74 |
73 const Object* exception() const { | 75 const Object* exception() const { |
74 return exception_; | 76 return exception_; |
75 } | 77 } |
76 void set_exception(const Object* exception) { | 78 void set_exception(const Object* exception) { |
77 ASSERT(type_ == kPauseException); | 79 ASSERT(type_ == kPauseException); |
78 exception_ = exception; | 80 exception_ = exception; |
79 } | 81 } |
80 | 82 |
| 83 const Object* inspectee() const { |
| 84 return inspectee_; |
| 85 } |
| 86 void set_inspectee(const Object* inspectee) { |
| 87 ASSERT(type_ == kInspect); |
| 88 inspectee_ = inspectee; |
| 89 } |
| 90 |
81 const Heap::GCStats* gc_stats() const { | 91 const Heap::GCStats* gc_stats() const { |
82 return gc_stats_; | 92 return gc_stats_; |
83 } | 93 } |
84 | 94 |
85 void set_gc_stats(const Heap::GCStats* gc_stats) { | 95 void set_gc_stats(const Heap::GCStats* gc_stats) { |
86 gc_stats_ = gc_stats; | 96 gc_stats_ = gc_stats; |
87 } | 97 } |
88 | 98 |
89 void PrintJSON(JSONStream* js) const; | 99 void PrintJSON(JSONStream* js) const; |
90 | 100 |
91 static const char* EventTypeToCString(EventType type); | 101 static const char* EventTypeToCString(EventType type); |
92 | 102 |
93 private: | 103 private: |
94 Isolate* isolate_; | 104 Isolate* isolate_; |
95 EventType type_; | 105 EventType type_; |
96 SourceBreakpoint* breakpoint_; | 106 SourceBreakpoint* breakpoint_; |
97 ActivationFrame* top_frame_; | 107 ActivationFrame* top_frame_; |
98 const Object* exception_; | 108 const Object* exception_; |
| 109 const Object* inspectee_; |
99 const Heap::GCStats* gc_stats_; | 110 const Heap::GCStats* gc_stats_; |
100 }; | 111 }; |
101 | 112 |
102 } // namespace dart | 113 } // namespace dart |
103 | 114 |
104 #endif // VM_SERVICE_EVENT_H_ | 115 #endif // VM_SERVICE_EVENT_H_ |
OLD | NEW |