| 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_CONNECTION_H_ | 5 #ifndef BIN_DBG_CONNECTION_H_ |
| 6 #define BIN_DBG_CONNECTION_H_ | 6 #define BIN_DBG_CONNECTION_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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 static DebuggerConnectionHandler* GetDebuggerConnectionHandler( | 96 static DebuggerConnectionHandler* GetDebuggerConnectionHandler( |
| 97 intptr_t debug_fd); | 97 intptr_t debug_fd); |
| 98 static bool IsConnected(); | 98 static bool IsConnected(); |
| 99 | 99 |
| 100 // Helper method for sending messages back to a debugger client. | 100 // Helper method for sending messages back to a debugger client. |
| 101 static void SendMsgHelper(intptr_t debug_fd, dart::TextBuffer* msg); | 101 static void SendMsgHelper(intptr_t debug_fd, dart::TextBuffer* msg); |
| 102 | 102 |
| 103 // mutex/condition variable used by isolates when writing back to the | 103 // mutex/condition variable used by isolates when writing back to the |
| 104 // debugger. This is also used to ensure that the isolate waits for | 104 // debugger. This is also used to ensure that the isolate waits for |
| 105 // a debugger to be attached when that is requested on the command line. | 105 // a debugger to be attached when that is requested on the command line. |
| 106 static dart::Monitor* handler_lock_; | 106 static Monitor* handler_lock_; |
| 107 | 107 |
| 108 static bool IsListening() { | 108 static bool IsListening() { |
| 109 return listener_fd_ != -1; | 109 return listener_fd_ != -1; |
| 110 } | 110 } |
| 111 | 111 |
| 112 // The socket that is listening for incoming debugger connections. | 112 // The socket that is listening for incoming debugger connections. |
| 113 // This descriptor is created and closed by a native thread. | 113 // This descriptor is created and closed by a native thread. |
| 114 static intptr_t listener_fd_; | 114 static intptr_t listener_fd_; |
| 115 | 115 |
| 116 friend class DebuggerConnectionImpl; | 116 friend class DebuggerConnectionImpl; |
| 117 | 117 |
| 118 DISALLOW_IMPLICIT_CONSTRUCTORS(DebuggerConnectionHandler); | 118 DISALLOW_IMPLICIT_CONSTRUCTORS(DebuggerConnectionHandler); |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 } // namespace bin | 121 } // namespace bin |
| 122 } // namespace dart | 122 } // namespace dart |
| 123 | 123 |
| 124 #endif // BIN_DBG_CONNECTION_H_ | 124 #endif // BIN_DBG_CONNECTION_H_ |
| OLD | NEW |