OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 BIN_DBG_MESSAGE_H_ | 5 #ifndef BIN_DBG_MESSAGE_H_ |
6 #define BIN_DBG_MESSAGE_H_ | 6 #define BIN_DBG_MESSAGE_H_ |
7 | 7 |
8 #include "bin/builtin.h" | 8 #include "bin/builtin.h" |
9 #include "bin/utils.h" | 9 #include "bin/utils.h" |
10 | 10 |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 // Interrupt Isolate. | 162 // Interrupt Isolate. |
163 void InterruptIsolate(); | 163 void InterruptIsolate(); |
164 | 164 |
165 // Queue output messages, these are sent out when we hit an event. | 165 // Queue output messages, these are sent out when we hit an event. |
166 void QueueOutputMsg(dart::TextBuffer* msg); | 166 void QueueOutputMsg(dart::TextBuffer* msg); |
167 | 167 |
168 // Send all queued messages over to the debugger. | 168 // Send all queued messages over to the debugger. |
169 void SendQueuedMsgs(); | 169 void SendQueuedMsgs(); |
170 | 170 |
171 // Send breakpoint event message over to the debugger. | 171 // Send breakpoint event message over to the debugger. |
172 void SendBreakpointEvent(Dart_StackTrace trace); | 172 void SendBreakpointEvent(const Dart_CodeLocation& location); |
173 | 173 |
174 // Send Exception event message over to the debugger. | 174 // Send Exception event message over to the debugger. |
175 void SendExceptionEvent(Dart_Handle exception, Dart_StackTrace trace); | 175 void SendExceptionEvent(Dart_Handle exception, Dart_StackTrace trace); |
176 | 176 |
177 // Send Isolate event message over to the debugger. | 177 // Send Isolate event message over to the debugger. |
178 void SendIsolateEvent(Dart_IsolateId isolate_id, Dart_IsolateEvent kind); | 178 void SendIsolateEvent(Dart_IsolateId isolate_id, Dart_IsolateEvent kind); |
179 | 179 |
180 private: | 180 private: |
181 bool is_running_; // True if isolate is running and not in the debugger loop. | 181 bool is_running_; // True if isolate is running and not in the debugger loop. |
182 bool is_interrupted_; // True if interrupt command is pending. | 182 bool is_interrupted_; // True if interrupt command is pending. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 | 231 |
232 // Remove Debugger Message Queue corresponding to the Isolate. | 232 // Remove Debugger Message Queue corresponding to the Isolate. |
233 static void RemoveIsolateMsgQueue(Dart_IsolateId isolate_id); | 233 static void RemoveIsolateMsgQueue(Dart_IsolateId isolate_id); |
234 | 234 |
235 // Generic handlers for breakpoints, exceptions and delayed breakpoint | 235 // Generic handlers for breakpoints, exceptions and delayed breakpoint |
236 // resolution. | 236 // resolution. |
237 static void BptResolvedHandler(Dart_IsolateId isolate_id, | 237 static void BptResolvedHandler(Dart_IsolateId isolate_id, |
238 intptr_t bp_id, | 238 intptr_t bp_id, |
239 Dart_Handle url, | 239 Dart_Handle url, |
240 intptr_t line_number); | 240 intptr_t line_number); |
241 static void BreakpointHandler(Dart_IsolateId isolate_id, | 241 static void PausedEventHandler(Dart_IsolateId isolate_id, |
242 Dart_Breakpoint bpt, | 242 const Dart_CodeLocation& loc); |
243 Dart_StackTrace trace); | |
244 static void ExceptionThrownHandler(Dart_IsolateId isolate_id, | 243 static void ExceptionThrownHandler(Dart_IsolateId isolate_id, |
245 Dart_Handle exception, | 244 Dart_Handle exception, |
246 Dart_StackTrace stack_trace); | 245 Dart_StackTrace stack_trace); |
247 static void IsolateEventHandler(Dart_IsolateId isolate_id, | 246 static void IsolateEventHandler(Dart_IsolateId isolate_id, |
248 Dart_IsolateEvent kind); | 247 Dart_IsolateEvent kind); |
249 | 248 |
250 private: | 249 private: |
251 static DbgMsgQueue* GetIsolateMsgQueueLocked(Dart_IsolateId isolate_id); | 250 static DbgMsgQueue* GetIsolateMsgQueueLocked(Dart_IsolateId isolate_id); |
252 | 251 |
253 static DbgMsgQueue* list_; | 252 static DbgMsgQueue* list_; |
254 static dart::Mutex msg_queue_list_lock_; | 253 static dart::Mutex msg_queue_list_lock_; |
255 | 254 |
256 DISALLOW_ALLOCATION(); | 255 DISALLOW_ALLOCATION(); |
257 DISALLOW_IMPLICIT_CONSTRUCTORS(DbgMsgQueueList); | 256 DISALLOW_IMPLICIT_CONSTRUCTORS(DbgMsgQueueList); |
258 }; | 257 }; |
259 | 258 |
260 #endif // BIN_DBG_MESSAGE_H_ | 259 #endif // BIN_DBG_MESSAGE_H_ |
OLD | NEW |