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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 static DbgMessageQueue* GetIsolateMessageQueue(Dart_Isolate isolate); | 169 static DbgMessageQueue* GetIsolateMessageQueue(Dart_Isolate isolate); |
170 | 170 |
171 // Generic handlers for breakpoints, exceptions and delayed breakpoint | 171 // Generic handlers for breakpoints, exceptions and delayed breakpoint |
172 // resolution. | 172 // resolution. |
173 static void BptResolvedHandler(intptr_t bp_id, | 173 static void BptResolvedHandler(intptr_t bp_id, |
174 Dart_Handle url, | 174 Dart_Handle url, |
175 intptr_t line_number); | 175 intptr_t line_number); |
176 static void BreakpointHandler(Dart_Breakpoint bpt, Dart_StackTrace trace); | 176 static void BreakpointHandler(Dart_Breakpoint bpt, Dart_StackTrace trace); |
177 static void ExceptionThrownHandler(Dart_Handle exception, | 177 static void ExceptionThrownHandler(Dart_Handle exception, |
178 Dart_StackTrace stack_trace); | 178 Dart_StackTrace stack_trace); |
179 static void IsolateEventHandler(Dart_Isolate isolate, | 179 static void IsolateEventHandler(Dart_IsolateId isolate_id, |
180 Dart_IsolateEvent kind); | 180 Dart_IsolateEvent kind); |
181 | 181 |
182 private: | 182 private: |
183 bool is_running_; // True if isolate is running and not in the debugger loop. | 183 bool is_running_; // True if isolate is running and not in the debugger loop. |
184 bool is_interrupted_; // True if interrupt command is pending. | 184 bool is_interrupted_; // True if interrupt command is pending. |
185 | 185 |
186 DbgMessage* msglist_head_; // Start of debugger messages list. | 186 DbgMessage* msglist_head_; // Start of debugger messages list. |
187 DbgMessage* msglist_tail_; // End of debugger messages list. | 187 DbgMessage* msglist_tail_; // End of debugger messages list. |
188 | 188 |
189 // Text buffer that accumulates messages to be output. | 189 // Text buffer that accumulates messages to be output. |
190 dart::TextBuffer queued_output_messages_; | 190 dart::TextBuffer queued_output_messages_; |
191 | 191 |
192 // The waits on this condition variable when it needs to process | 192 // The waits on this condition variable when it needs to process |
193 // debug messages. | 193 // debug messages. |
194 dart::Monitor msg_queue_lock_; | 194 dart::Monitor msg_queue_lock_; |
195 | 195 |
196 DISALLOW_COPY_AND_ASSIGN(DbgMessageQueue); | 196 DISALLOW_COPY_AND_ASSIGN(DbgMessageQueue); |
197 }; | 197 }; |
198 | 198 |
199 #endif // BIN_DBG_MESSAGE_H_ | 199 #endif // BIN_DBG_MESSAGE_H_ |
OLD | NEW |