Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(555)

Unified Diff: runtime/bin/dbg_connection_macos.h

Issue 10357003: Beginnings of a debugger wire protocol (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/dbg_connection_linux.cc ('k') | runtime/bin/dbg_connection_macos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/dbg_connection_macos.h
===================================================================
--- runtime/bin/dbg_connection_macos.h (revision 0)
+++ runtime/bin/dbg_connection_macos.h (revision 0)
@@ -0,0 +1,44 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#ifndef BIN_DBG_CONNECTION_MACOS_H_
+#define BIN_DBG_CONNECTION_MACOS_H_
+
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <sys/socket.h>
+
+
+class DebuggerConnectionImpl {
+ public:
+ static void StartHandler(int port_number);
+
+ private:
+ enum MessageType {
+ kAddDbgFd = 1,
+ kRemoveDbgFd,
+ kQuit
+ };
+
+ struct Message {
+ MessageType msg_id;
+ };
+
+ static void SendMessage(MessageType id);
+ static bool ReceiveMessage(Message* msg);
+
+ static void SetupPollQueue();
+ static void HandleEvent(struct kevent* event);
+ static void Handler(uword args);
+
+
+
+ // File descriptors for pipes used to communicate with the debugger thread.
+ static int wakeup_fds_[2];
+ // File descriptor for the polling queue.
+ static int kqueue_fd_;
+};
+
+
+#endif // BIN_DBG_CONNECTION_MACOS_H_
« no previous file with comments | « runtime/bin/dbg_connection_linux.cc ('k') | runtime/bin/dbg_connection_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698