| 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 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 static bool IsConnected() { | 35 static bool IsConnected() { |
| 36 return debugger_fd_ >= 0; | 36 return debugger_fd_ >= 0; |
| 37 } | 37 } |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 static void SendMsg(dart::TextBuffer* msg); | 40 static void SendMsg(dart::TextBuffer* msg); |
| 41 static void QueueMsg(dart::TextBuffer* msg); | 41 static void QueueMsg(dart::TextBuffer* msg); |
| 42 static void SendQueuedMsgs(); | 42 static void SendQueuedMsgs(); |
| 43 | 43 |
| 44 static void SendBreakpointEvent(Dart_Breakpoint bpt, Dart_StackTrace trace); | 44 static void SendBreakpointEvent(Dart_StackTrace trace); |
| 45 static void SendExceptionEvent(Dart_Handle exception, Dart_StackTrace trace); |
| 45 static void BptResolvedHandler(intptr_t bp_id, | 46 static void BptResolvedHandler(intptr_t bp_id, |
| 46 Dart_Handle url, | 47 Dart_Handle url, |
| 47 intptr_t line_number); | 48 intptr_t line_number); |
| 48 static void BreakpointHandler(Dart_Breakpoint bpt, Dart_StackTrace trace); | 49 static void BreakpointHandler(Dart_Breakpoint bpt, Dart_StackTrace trace); |
| 50 static void ExceptionThrownHandler(Dart_Handle exception, |
| 51 Dart_StackTrace stack_trace); |
| 49 | 52 |
| 50 static void AcceptDbgConnection(int debug_fd); | 53 static void AcceptDbgConnection(int debug_fd); |
| 54 static void WaitForConnection(); |
| 51 static void CloseDbgConnection(); | 55 static void CloseDbgConnection(); |
| 52 | 56 |
| 53 static void HandleMessages(); | 57 static void HandleMessages(); |
| 54 static void HandleResumeCmd(const char* msg); | 58 static void HandleResumeCmd(const char* msg); |
| 55 static void HandleStepIntoCmd(const char* msg); | 59 static void HandleStepIntoCmd(const char* msg); |
| 56 static void HandleStepOverCmd(const char* msg); | 60 static void HandleStepOverCmd(const char* msg); |
| 57 static void HandleStepOutCmd(const char* msg); | 61 static void HandleStepOutCmd(const char* msg); |
| 58 static void HandleGetLibrariesCmd(const char* json_msg); | 62 static void HandleGetLibrariesCmd(const char* json_msg); |
| 59 static void HandleGetClassPropsCmd(const char* json_msg); | 63 static void HandleGetClassPropsCmd(const char* json_msg); |
| 60 static void HandleGetLibPropsCmd(const char* json_msg); | 64 static void HandleGetLibPropsCmd(const char* json_msg); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 90 | 94 |
| 91 static MessageBuffer* msgbuf_; | 95 static MessageBuffer* msgbuf_; |
| 92 | 96 |
| 93 friend class DebuggerConnectionImpl; | 97 friend class DebuggerConnectionImpl; |
| 94 | 98 |
| 95 DISALLOW_ALLOCATION(); | 99 DISALLOW_ALLOCATION(); |
| 96 DISALLOW_IMPLICIT_CONSTRUCTORS(DebuggerConnectionHandler); | 100 DISALLOW_IMPLICIT_CONSTRUCTORS(DebuggerConnectionHandler); |
| 97 }; | 101 }; |
| 98 | 102 |
| 99 #endif // BIN_DBG_CONNECTION_H_ | 103 #endif // BIN_DBG_CONNECTION_H_ |
| OLD | NEW |