This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 8/9] [gdbserver] Split a new event-loop.h file out of server.h.
- From: Pedro Alves <palves at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 3 Sep 2013 21:26:38 +0100
- Subject: [PATCH 8/9] [gdbserver] Split a new event-loop.h file out of server.h.
- Authentication-results: sourceware.org; auth=none
- References: <1378239999-15533-1-git-send-email-palves at redhat dot com>
gdb/gdbserver/
2013-09-03 Pedro Alves <palves@redhat.com>
* server.h (gdb_client_data, handler_func, callback_handler_func)
(delete_file_handler, add_file_handler, append_callback_event)
(delete_callback_event, start_event_loop, initialize_event_loop):
Move to event-loop.h and include it.
* event-loop.h: New file.
---
gdb/gdbserver/event-loop.h | 36 ++++++++++++++++++++++++++++++++++++
gdb/gdbserver/server.h | 15 +--------------
2 files changed, 37 insertions(+), 14 deletions(-)
create mode 100644 gdb/gdbserver/event-loop.h
diff --git a/gdb/gdbserver/event-loop.h b/gdb/gdbserver/event-loop.h
new file mode 100644
index 0000000..4967389
--- /dev/null
+++ b/gdb/gdbserver/event-loop.h
@@ -0,0 +1,36 @@
+/* Event loop machinery for the remote server for GDB.
+ Copyright (C) 1993-2013 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef EVENT_LOOP_H
+#define EVENT_LOOP_H
+
+typedef void *gdb_client_data;
+typedef int (handler_func) (int, gdb_client_data);
+typedef int (callback_handler_func) (gdb_client_data);
+
+extern void delete_file_handler (gdb_fildes_t fd);
+extern void add_file_handler (gdb_fildes_t fd, handler_func *proc,
+ gdb_client_data client_data);
+extern int append_callback_event (callback_handler_func *proc,
+ gdb_client_data client_data);
+extern void delete_callback_event (int id);
+
+extern void start_event_loop (void);
+extern void initialize_event_loop (void);
+
+#endif /* EVENT_LOOP_H */
diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h
index ab52738..53127bf 100644
--- a/gdb/gdbserver/server.h
+++ b/gdb/gdbserver/server.h
@@ -138,20 +138,7 @@ typedef SOCKET gdb_fildes_t;
typedef int gdb_fildes_t;
#endif
-/* Functions from event-loop.c. */
-typedef void *gdb_client_data;
-typedef int (handler_func) (int, gdb_client_data);
-typedef int (callback_handler_func) (gdb_client_data);
-
-extern void delete_file_handler (gdb_fildes_t fd);
-extern void add_file_handler (gdb_fildes_t fd, handler_func *proc,
- gdb_client_data client_data);
-extern int append_callback_event (callback_handler_func *proc,
- gdb_client_data client_data);
-extern void delete_callback_event (int id);
-
-extern void start_event_loop (void);
-extern void initialize_event_loop (void);
+#include "event-loop.h"
/* Functions from server.c. */
extern int handle_serial_event (int err, gdb_client_data client_data);
--
1.7.11.7