| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 // Interrupt Isolate. | 167 // Interrupt Isolate. |
| 168 void InterruptIsolate(); | 168 void InterruptIsolate(); |
| 169 | 169 |
| 170 // Queue output messages, these are sent out when we hit an event. | 170 // Queue output messages, these are sent out when we hit an event. |
| 171 void QueueOutputMsg(dart::TextBuffer* msg); | 171 void QueueOutputMsg(dart::TextBuffer* msg); |
| 172 | 172 |
| 173 // Send all queued messages over to the debugger. | 173 // Send all queued messages over to the debugger. |
| 174 void SendQueuedMsgs(); | 174 void SendQueuedMsgs(); |
| 175 | 175 |
| 176 // Send breakpoint event message over to the debugger. | 176 // Send breakpoint event message over to the debugger. |
| 177 void SendBreakpointEvent(const Dart_CodeLocation& location); | 177 void SendBreakpointEvent(intptr_t bp_id, const Dart_CodeLocation& location); |
| 178 | 178 |
| 179 // Send Exception event message over to the debugger. | 179 // Send Exception event message over to the debugger. |
| 180 void SendExceptionEvent(Dart_Handle exception, Dart_StackTrace trace); | 180 void SendExceptionEvent(Dart_Handle exception, Dart_StackTrace trace); |
| 181 | 181 |
| 182 // Send Isolate event message over to the debugger. | 182 // Send Isolate event message over to the debugger. |
| 183 void SendIsolateEvent(Dart_IsolateId isolate_id, Dart_IsolateEvent kind); | 183 void SendIsolateEvent(Dart_IsolateId isolate_id, Dart_IsolateEvent kind); |
| 184 | 184 |
| 185 private: | 185 private: |
| 186 bool is_running_; // True if isolate is running and not in the debugger loop. | 186 bool is_running_; // True if isolate is running and not in the debugger loop. |
| 187 bool is_interrupted_; // True if interrupt command is pending. | 187 bool is_interrupted_; // True if interrupt command is pending. |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 | 236 |
| 237 // Remove Debugger Message Queue corresponding to the Isolate. | 237 // Remove Debugger Message Queue corresponding to the Isolate. |
| 238 static void RemoveIsolateMsgQueue(Dart_IsolateId isolate_id); | 238 static void RemoveIsolateMsgQueue(Dart_IsolateId isolate_id); |
| 239 | 239 |
| 240 // Generic handlers for breakpoints, exceptions and delayed breakpoint | 240 // Generic handlers for breakpoints, exceptions and delayed breakpoint |
| 241 // resolution. | 241 // resolution. |
| 242 static void BptResolvedHandler(Dart_IsolateId isolate_id, | 242 static void BptResolvedHandler(Dart_IsolateId isolate_id, |
| 243 intptr_t bp_id, | 243 intptr_t bp_id, |
| 244 const Dart_CodeLocation& location); | 244 const Dart_CodeLocation& location); |
| 245 static void PausedEventHandler(Dart_IsolateId isolate_id, | 245 static void PausedEventHandler(Dart_IsolateId isolate_id, |
| 246 intptr_t bp_id, |
| 246 const Dart_CodeLocation& loc); | 247 const Dart_CodeLocation& loc); |
| 247 static void ExceptionThrownHandler(Dart_IsolateId isolate_id, | 248 static void ExceptionThrownHandler(Dart_IsolateId isolate_id, |
| 248 Dart_Handle exception, | 249 Dart_Handle exception, |
| 249 Dart_StackTrace stack_trace); | 250 Dart_StackTrace stack_trace); |
| 250 static void IsolateEventHandler(Dart_IsolateId isolate_id, | 251 static void IsolateEventHandler(Dart_IsolateId isolate_id, |
| 251 Dart_IsolateEvent kind); | 252 Dart_IsolateEvent kind); |
| 252 | 253 |
| 253 // Print list of isolate ids of all message queues into text buffer. | 254 // Print list of isolate ids of all message queues into text buffer. |
| 254 static void ListIsolateIds(dart::TextBuffer* msg); | 255 static void ListIsolateIds(dart::TextBuffer* msg); |
| 255 | 256 |
| 256 private: | 257 private: |
| 257 static DbgMsgQueue* GetIsolateMsgQueueLocked(Dart_IsolateId isolate_id); | 258 static DbgMsgQueue* GetIsolateMsgQueueLocked(Dart_IsolateId isolate_id); |
| 258 | 259 |
| 259 static DbgMsgQueue* list_; | 260 static DbgMsgQueue* list_; |
| 260 static dart::Mutex* msg_queue_list_lock_; | 261 static dart::Mutex* msg_queue_list_lock_; |
| 261 | 262 |
| 262 DISALLOW_ALLOCATION(); | 263 DISALLOW_ALLOCATION(); |
| 263 DISALLOW_IMPLICIT_CONSTRUCTORS(DbgMsgQueueList); | 264 DISALLOW_IMPLICIT_CONSTRUCTORS(DbgMsgQueueList); |
| 264 }; | 265 }; |
| 265 | 266 |
| 266 } // namespace bin | 267 } // namespace bin |
| 267 } // namespace dart | 268 } // namespace dart |
| 268 | 269 |
| 269 #endif // BIN_DBG_MESSAGE_H_ | 270 #endif // BIN_DBG_MESSAGE_H_ |
| OLD | NEW |