| 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 #include "bin/dbg_connection.h" | 5 #include "bin/dbg_connection.h" |
| 6 #include "bin/dbg_message.h" | 6 #include "bin/dbg_message.h" |
| 7 #include "bin/dartutils.h" | 7 #include "bin/dartutils.h" |
| 8 #include "bin/lockers.h" | 8 #include "bin/lockers.h" |
| 9 #include "bin/log.h" | 9 #include "bin/log.h" |
| 10 #include "bin/socket.h" | 10 #include "bin/socket.h" |
| 11 #include "bin/thread.h" | 11 #include "bin/thread.h" |
| 12 #include "bin/utils.h" | 12 #include "bin/utils.h" |
| 13 | 13 |
| 14 #include "platform/globals.h" | 14 #include "platform/globals.h" |
| 15 #include "platform/json.h" | 15 #include "platform/json.h" |
| 16 #include "platform/utils.h" | 16 #include "platform/utils.h" |
| 17 | 17 |
| 18 #include "include/dart_api.h" | 18 #include "include/dart_api.h" |
| 19 | 19 |
| 20 | 20 |
| 21 namespace dart { | 21 namespace dart { |
| 22 namespace bin { | 22 namespace bin { |
| 23 | 23 |
| 24 extern bool trace_debug_protocol; | 24 bool trace_debug_protocol = false; |
| 25 | 25 |
| 26 intptr_t DebuggerConnectionHandler::listener_fd_ = -1; | 26 intptr_t DebuggerConnectionHandler::listener_fd_ = -1; |
| 27 Monitor* DebuggerConnectionHandler::handler_lock_ = new Monitor(); | 27 Monitor* DebuggerConnectionHandler::handler_lock_ = new Monitor(); |
| 28 | 28 |
| 29 // TODO(asiva): Remove this once we have support for multiple debugger | 29 // TODO(asiva): Remove this once we have support for multiple debugger |
| 30 // connections. For now we just store the single debugger connection | 30 // connections. For now we just store the single debugger connection |
| 31 // handler in a static variable. | 31 // handler in a static variable. |
| 32 static DebuggerConnectionHandler* singleton_handler = NULL; | 32 static DebuggerConnectionHandler* singleton_handler = NULL; |
| 33 | 33 |
| 34 // The maximum message length to print when --trace_debug_protocol is | 34 // The maximum message length to print when --trace_debug_protocol is |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 | 507 |
| 508 | 508 |
| 509 bool DebuggerConnectionHandler::IsConnected() { | 509 bool DebuggerConnectionHandler::IsConnected() { |
| 510 // TODO(asiva): Support multiple debugger connections. | 510 // TODO(asiva): Support multiple debugger connections. |
| 511 // Return true if a connection has been established. | 511 // Return true if a connection has been established. |
| 512 return singleton_handler != NULL; | 512 return singleton_handler != NULL; |
| 513 } | 513 } |
| 514 | 514 |
| 515 } // namespace bin | 515 } // namespace bin |
| 516 } // namespace dart | 516 } // namespace dart |
| OLD | NEW |