| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 static void CloseDbgConnection(); | 43 static void CloseDbgConnection(); |
| 44 | 44 |
| 45 static void HandleMessages(); | 45 static void HandleMessages(); |
| 46 static void HandleResumeCmd(const char* msg); | 46 static void HandleResumeCmd(const char* msg); |
| 47 static void HandleStepIntoCmd(const char* msg); | 47 static void HandleStepIntoCmd(const char* msg); |
| 48 static void HandleStepOverCmd(const char* msg); | 48 static void HandleStepOverCmd(const char* msg); |
| 49 static void HandleStepOutCmd(const char* msg); | 49 static void HandleStepOutCmd(const char* msg); |
| 50 static void HandleGetLibraryURLsCmd(const char* json_msg); | 50 static void HandleGetLibraryURLsCmd(const char* json_msg); |
| 51 static void HandleGetScriptURLsCmd(const char* json_msg); | 51 static void HandleGetScriptURLsCmd(const char* json_msg); |
| 52 | 52 |
| 53 static void SendError(int msg_id, const char* format, ...); | 53 static void SendError(int msg_id, const char* err_msg); |
| 54 | 54 |
| 55 static bool handler_started_; | 55 static bool handler_started_; |
| 56 | 56 |
| 57 static bool request_resume_; | 57 static bool request_resume_; |
| 58 | 58 |
| 59 // The socket that is listening for incoming debugger connections. | 59 // The socket that is listening for incoming debugger connections. |
| 60 // This descriptor is created and closed by a VM thread. | 60 // This descriptor is created and closed by a VM thread. |
| 61 static int listener_fd_; | 61 static int listener_fd_; |
| 62 | 62 |
| 63 // The socket that connects with the debugger client. | 63 // The socket that connects with the debugger client. |
| 64 // The descriptor is created by the debugger connection thread and | 64 // The descriptor is created by the debugger connection thread and |
| 65 // closed by a VM thread. | 65 // closed by a VM thread. |
| 66 static int debugger_fd_; | 66 static int debugger_fd_; |
| 67 | 67 |
| 68 // The VM thread waits on this condition variable when it reaches a | 68 // The VM thread waits on this condition variable when it reaches a |
| 69 // breakpoint and the debugger client has not connected yet. | 69 // breakpoint and the debugger client has not connected yet. |
| 70 static dart::Monitor is_connected_; | 70 static dart::Monitor is_connected_; |
| 71 | 71 |
| 72 static MessageBuffer* msgbuf_; | 72 static MessageBuffer* msgbuf_; |
| 73 | 73 |
| 74 friend class DebuggerConnectionImpl; | 74 friend class DebuggerConnectionImpl; |
| 75 | 75 |
| 76 DISALLOW_ALLOCATION(); | 76 DISALLOW_ALLOCATION(); |
| 77 DISALLOW_IMPLICIT_CONSTRUCTORS(DebuggerConnectionHandler); | 77 DISALLOW_IMPLICIT_CONSTRUCTORS(DebuggerConnectionHandler); |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 #endif // BIN_DBG_CONNECTION_H_ | 80 #endif // BIN_DBG_CONNECTION_H_ |
| OLD | NEW |