| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 static void RemoveDebuggerConnection(int debug_fd); | 90 static void RemoveDebuggerConnection(int debug_fd); |
| 91 static DebuggerConnectionHandler* GetDebuggerConnectionHandler(int debug_fd); | 91 static DebuggerConnectionHandler* GetDebuggerConnectionHandler(int debug_fd); |
| 92 static bool IsConnected(); | 92 static bool IsConnected(); |
| 93 | 93 |
| 94 // Helper method for sending messages back to a debugger client. | 94 // Helper method for sending messages back to a debugger client. |
| 95 static void SendMsgHelper(int debug_fd, dart::TextBuffer* msg); | 95 static void SendMsgHelper(int debug_fd, dart::TextBuffer* msg); |
| 96 | 96 |
| 97 // mutex/condition variable used by isolates when writing back to the | 97 // mutex/condition variable used by isolates when writing back to the |
| 98 // debugger. This is also used to ensure that the isolate waits for | 98 // debugger. This is also used to ensure that the isolate waits for |
| 99 // a debugger to be attached when that is requested on the command line. | 99 // a debugger to be attached when that is requested on the command line. |
| 100 static dart::Monitor handler_lock_; | 100 static dart::Monitor* handler_lock_; |
| 101 | 101 |
| 102 // The socket that is listening for incoming debugger connections. | 102 // The socket that is listening for incoming debugger connections. |
| 103 // This descriptor is created and closed by a native thread. | 103 // This descriptor is created and closed by a native thread. |
| 104 static int listener_fd_; | 104 static int listener_fd_; |
| 105 | 105 |
| 106 friend class DebuggerConnectionImpl; | 106 friend class DebuggerConnectionImpl; |
| 107 | 107 |
| 108 DISALLOW_IMPLICIT_CONSTRUCTORS(DebuggerConnectionHandler); | 108 DISALLOW_IMPLICIT_CONSTRUCTORS(DebuggerConnectionHandler); |
| 109 }; | 109 }; |
| 110 | 110 |
| 111 } // namespace bin | 111 } // namespace bin |
| 112 } // namespace dart | 112 } // namespace dart |
| 113 | 113 |
| 114 #endif // BIN_DBG_CONNECTION_H_ | 114 #endif // BIN_DBG_CONNECTION_H_ |
| OLD | NEW |