From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [RFC 10/17] Move event-loop.[ch] to common/
Date: Sun, 24 Feb 2019 16:52:00 -0000 [thread overview]
Message-ID: <20190224165153.5062-11-tom@tromey.com> (raw)
In-Reply-To: <20190224165153.5062-1-tom@tromey.com>
This moves event-loop.[ch] to common and updates the uses in gdb.
gdb/ChangeLog
2019-02-24 Tom Tromey <tom@tromey.com>
* tui/tui-win.c: Update include.
* tui/tui-io.c: Update include.
* tui/tui-interp.c: Update include.
* tui/tui-hooks.c: Update include.
* top.h: Update include.
* top.c: Update include.
* ser-base.c: Update include.
* remote.c: Update include.
* remote-notif.c: Update include.
* remote-fileio.c: Update include.
* record-full.c: Update include.
* record-btrace.c: Update include.
* python/python.c: Update include.
* posix-hdep.c: Update include.
* mingw-hdep.c: Update include.
* mi/mi-main.c: Update include.
* mi/mi-interp.c: Update include.
* main.c: Update include.
* linux-nat.c: Update include.
* interps.c: Update include.
* infrun.c: Update include.
* inf-loop.c: Update include.
* event-top.c: Update include.
* event-loop.c: Move...
* common/event-loop.c: ... here.
* event-loop.h: Move...
* common/event-loop.h: ... here.
* async-event.h: Update include.
* Makefile.in (COMMON_SFILES, HFILES_NO_SRCDIR): Update.
---
gdb/ChangeLog | 32 ++++++++++++++++++++++++++++++++
gdb/Makefile.in | 4 ++--
gdb/async-event.h | 2 +-
gdb/{ => common}/event-loop.c | 4 ++--
gdb/{ => common}/event-loop.h | 2 ++
gdb/event-top.c | 2 +-
gdb/inf-loop.c | 2 +-
gdb/infrun.c | 2 +-
gdb/interps.c | 2 +-
gdb/linux-nat.c | 2 +-
gdb/main.c | 2 +-
gdb/mi/mi-interp.c | 2 +-
gdb/mi/mi-main.c | 2 +-
gdb/mingw-hdep.c | 2 +-
gdb/posix-hdep.c | 2 +-
gdb/python/python.c | 2 +-
gdb/record-btrace.c | 2 +-
gdb/record-full.c | 2 +-
gdb/remote-fileio.c | 2 +-
gdb/remote-notif.c | 2 +-
gdb/remote.c | 2 +-
gdb/ser-base.c | 2 +-
gdb/top.c | 2 +-
gdb/top.h | 2 +-
gdb/tui/tui-hooks.c | 2 +-
gdb/tui/tui-interp.c | 2 +-
gdb/tui/tui-io.c | 2 +-
gdb/tui/tui-win.c | 2 +-
28 files changed, 62 insertions(+), 28 deletions(-)
rename gdb/{ => common}/event-loop.c (99%)
rename gdb/{ => common}/event-loop.h (99%)
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index c7a9cb62d10..af0d2e95ef8 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -961,6 +961,7 @@ COMMON_SFILES = \
common/common-utils.c \
common/errors.c \
common/environ.c \
+ common/event-loop.c \
common/fileio.c \
common/filestuff.c \
common/format.c \
@@ -1011,7 +1012,6 @@ COMMON_SFILES = \
dwarf2loc.c \
dwarf2read.c \
eval.c \
- event-loop.c \
event-top.c \
exceptions.c \
exec.c \
@@ -1240,7 +1240,6 @@ HFILES_NO_SRCDIR = \
dwarf2expr.h \
dwarf2loc.h \
dwarf2read.h \
- event-loop.h \
event-top.h \
exceptions.h \
exec.h \
@@ -1452,6 +1451,7 @@ HFILES_NO_SRCDIR = \
common/job-control.h \
common/errors.h \
common/environ.h \
+ common/event-loop.h \
common/fileio.h \
common/format.h \
common/gdb_assert.h \
diff --git a/gdb/async-event.h b/gdb/async-event.h
index 408f7764f7c..45b4daf3f18 100644
--- a/gdb/async-event.h
+++ b/gdb/async-event.h
@@ -19,7 +19,7 @@
#ifndef ASYNC_EVENT_H
#define ASYNC_EVENT_H
-#include "event-loop.h"
+#include "common/event-loop.h"
struct async_signal_handler;
struct async_event_handler;
diff --git a/gdb/event-loop.c b/gdb/common/event-loop.c
similarity index 99%
rename from gdb/event-loop.c
rename to gdb/common/event-loop.c
index 08536f57902..a2563414dfd 100644
--- a/gdb/event-loop.c
+++ b/gdb/common/event-loop.c
@@ -17,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "defs.h"
-#include "event-loop.h"
+#include "common/common-defs.h"
+#include "common/event-loop.h"
#include <chrono>
diff --git a/gdb/event-loop.h b/gdb/common/event-loop.h
similarity index 99%
rename from gdb/event-loop.h
rename to gdb/common/event-loop.h
index 16bde6474db..1eec1ed2cd9 100644
--- a/gdb/event-loop.h
+++ b/gdb/common/event-loop.h
@@ -70,6 +70,8 @@
Corollary tasks are the creation and deletion of event sources. */
+#include "common/function-view.h"
+
typedef void *gdb_client_data;
typedef void (handler_func) (int, gdb_client_data);
typedef void (timer_handler_func) (gdb_client_data);
diff --git a/gdb/event-top.c b/gdb/event-top.c
index 5829957e513..1a66721540e 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -25,7 +25,7 @@
#include "infrun.h"
#include "target.h"
#include "terminal.h" /* for job_control */
-#include "event-loop.h"
+#include "common/event-loop.h"
#include "event-top.h"
#include "interps.h"
#include <signal.h>
diff --git a/gdb/inf-loop.c b/gdb/inf-loop.c
index d0e19d5f824..34db6a4bce4 100644
--- a/gdb/inf-loop.c
+++ b/gdb/inf-loop.c
@@ -20,7 +20,7 @@
#include "defs.h"
#include "inferior.h"
#include "infrun.h"
-#include "event-loop.h"
+#include "common/event-loop.h"
#include "event-top.h"
#include "inf-loop.h"
#include "remote.h"
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 0eaf1b608b6..029c75bae73 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -61,7 +61,7 @@
#include "target-dcache.h"
#include "terminal.h"
#include "solist.h"
-#include "event-loop.h"
+#include "common/event-loop.h"
#include "thread-fsm.h"
#include "common/enum-flags.h"
#include "progspace-and-thread.h"
diff --git a/gdb/interps.c b/gdb/interps.c
index b62e33339a2..540786e578a 100644
--- a/gdb/interps.c
+++ b/gdb/interps.c
@@ -32,7 +32,7 @@
#include "defs.h"
#include "gdbcmd.h"
#include "ui-out.h"
-#include "event-loop.h"
+#include "common/event-loop.h"
#include "event-top.h"
#include "interps.h"
#include "completer.h"
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index 063afe26666..4ce78aaceee 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -47,7 +47,7 @@
#include <sys/stat.h> /* for struct stat */
#include <fcntl.h> /* for O_RDONLY */
#include "inf-loop.h"
-#include "event-loop.h"
+#include "common/event-loop.h"
#include "event-top.h"
#include <pwd.h>
#include <sys/types.h>
diff --git a/gdb/main.c b/gdb/main.c
index f60f0d0a092..043e7b03830 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -28,7 +28,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <ctype.h>
-#include "event-loop.h"
+#include "common/event-loop.h"
#include "ui-out.h"
#include "interps.h"
diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c
index 3e9f36897a8..ea8d6d54907 100644
--- a/gdb/mi/mi-interp.c
+++ b/gdb/mi/mi-interp.c
@@ -20,7 +20,7 @@
#include "defs.h"
#include "interps.h"
#include "event-top.h"
-#include "event-loop.h"
+#include "common/event-loop.h"
#include "inferior.h"
#include "infrun.h"
#include "ui-out.h"
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 46bc928d9fe..a39749f1a7c 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -33,7 +33,7 @@
#include "ui-out.h"
#include "mi-out.h"
#include "interps.h"
-#include "event-loop.h"
+#include "common/event-loop.h"
#include "event-top.h"
#include "gdbcore.h" /* For write_memory(). */
#include "value.h"
diff --git a/gdb/mingw-hdep.c b/gdb/mingw-hdep.c
index 2fa82d1d484..08f1632f4ba 100644
--- a/gdb/mingw-hdep.c
+++ b/gdb/mingw-hdep.c
@@ -20,7 +20,7 @@
#include "defs.h"
#include "main.h"
#include "serial.h"
-#include "event-loop.h"
+#include "common/event-loop.h"
#include "common/gdb_select.h"
#include "readline/readline.h"
diff --git a/gdb/posix-hdep.c b/gdb/posix-hdep.c
index 97fd9b535a6..b02a76c59c2 100644
--- a/gdb/posix-hdep.c
+++ b/gdb/posix-hdep.c
@@ -18,7 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "event-loop.h"
+#include "common/event-loop.h"
#include "common/gdb_select.h"
diff --git a/gdb/python/python.c b/gdb/python/python.c
index c23db2c1261..154c6023070 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -27,7 +27,7 @@
#include "objfiles.h"
#include "value.h"
#include "language.h"
-#include "event-loop.h"
+#include "common/event-loop.h"
#include "serial.h"
#include "readline/tilde.h"
#include "python.h"
diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index 5319a1b2bb8..d79244129d7 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -36,7 +36,7 @@
#include "frame-unwind.h"
#include "hashtab.h"
#include "infrun.h"
-#include "event-loop.h"
+#include "common/event-loop.h"
#include "inf-loop.h"
#include "common/vec.h"
#include "inferior.h"
diff --git a/gdb/record-full.c b/gdb/record-full.c
index 95ccc2c797e..10a5146f4be 100644
--- a/gdb/record-full.c
+++ b/gdb/record-full.c
@@ -31,7 +31,7 @@
#include "record-full.h"
#include "elf-bfd.h"
#include "gcore.h"
-#include "event-loop.h"
+#include "common/event-loop.h"
#include "inf-loop.h"
#include "gdb_bfd.h"
#include "observable.h"
diff --git a/gdb/remote-fileio.c b/gdb/remote-fileio.c
index 91caa2b0726..3db68b8bfc8 100644
--- a/gdb/remote-fileio.c
+++ b/gdb/remote-fileio.c
@@ -25,7 +25,7 @@
#include "common/gdb_wait.h"
#include <sys/stat.h>
#include "remote-fileio.h"
-#include "event-loop.h"
+#include "common/event-loop.h"
#include "target.h"
#include "filenames.h"
#include "common/filestuff.h"
diff --git a/gdb/remote-notif.c b/gdb/remote-notif.c
index 72916023420..d2ffe34efc4 100644
--- a/gdb/remote-notif.c
+++ b/gdb/remote-notif.c
@@ -35,7 +35,7 @@
#include "remote.h"
#include "remote-notif.h"
#include "observable.h"
-#include "event-loop.h"
+#include "common/event-loop.h"
#include "target.h"
#include "inferior.h"
#include "infrun.h"
diff --git a/gdb/remote.c b/gdb/remote.c
index d6561dda61f..c5bc52137a1 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -49,7 +49,7 @@
#include "common/gdb_sys_time.h"
-#include "event-loop.h"
+#include "common/event-loop.h"
#include "event-top.h"
#include "inf-loop.h"
diff --git a/gdb/ser-base.c b/gdb/ser-base.c
index 6411ad7b2f7..8388bec3a7d 100644
--- a/gdb/ser-base.c
+++ b/gdb/ser-base.c
@@ -20,7 +20,7 @@
#include "defs.h"
#include "serial.h"
#include "ser-base.h"
-#include "event-loop.h"
+#include "common/event-loop.h"
#include "common/gdb_select.h"
#include "common/gdb_sys_time.h"
diff --git a/gdb/top.c b/gdb/top.c
index 91989609c07..9ad4b5a7c04 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -42,7 +42,7 @@
#include "common/version.h"
#include "serial.h"
#include "main.h"
-#include "event-loop.h"
+#include "common/event-loop.h"
#include "gdbthread.h"
#include "extension.h"
#include "interps.h"
diff --git a/gdb/top.h b/gdb/top.h
index 025d9389d60..9c9af1af3e9 100644
--- a/gdb/top.h
+++ b/gdb/top.h
@@ -21,7 +21,7 @@
#define TOP_H
#include "common/buffer.h"
-#include "event-loop.h"
+#include "common/event-loop.h"
#include "value.h"
struct tl_interp_info;
diff --git a/gdb/tui/tui-hooks.c b/gdb/tui/tui-hooks.c
index 98c6fd651fa..0e9dbdfc4f4 100644
--- a/gdb/tui/tui-hooks.c
+++ b/gdb/tui/tui-hooks.c
@@ -26,7 +26,7 @@
#include "objfiles.h"
#include "target.h"
#include "gdbcore.h"
-#include "event-loop.h"
+#include "common/event-loop.h"
#include "event-top.h"
#include "frame.h"
#include "breakpoint.h"
diff --git a/gdb/tui/tui-interp.c b/gdb/tui/tui-interp.c
index 14215b83dea..e8f3a69df68 100644
--- a/gdb/tui/tui-interp.c
+++ b/gdb/tui/tui-interp.c
@@ -22,7 +22,7 @@
#include "interps.h"
#include "top.h"
#include "event-top.h"
-#include "event-loop.h"
+#include "common/event-loop.h"
#include "ui-out.h"
#include "cli-out.h"
#include "tui/tui-data.h"
diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c
index d006e41cabb..bb0bc904f1a 100644
--- a/gdb/tui/tui-io.c
+++ b/gdb/tui/tui-io.c
@@ -21,7 +21,7 @@
#include "defs.h"
#include "target.h"
-#include "event-loop.h"
+#include "common/event-loop.h"
#include "event-top.h"
#include "command.h"
#include "top.h"
diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
index fa1ee89603d..1df21df026d 100644
--- a/gdb/tui/tui-win.c
+++ b/gdb/tui/tui-win.c
@@ -32,7 +32,7 @@
#include "cli/cli-cmds.h"
#include "top.h"
#include "source.h"
-#include "event-loop.h"
+#include "common/event-loop.h"
#include "async-event.h"
#include "tui/tui.h"
--
2.17.2
next prev parent reply other threads:[~2019-02-24 16:52 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-24 16:51 [RFC 00/17] Merge event loop implementations Tom Tromey
2019-02-24 16:52 ` [RFC 14/17] Remove some dead code from event-loop.c Tom Tromey
2019-02-24 16:52 ` [RFC 12/17] Add the ability to stop the event loop Tom Tromey
2019-02-24 16:52 ` [RFC 07/17] Use warning in event-loop Tom Tromey
2019-09-26 14:02 ` Pedro Alves
2019-02-24 16:52 ` [RFC 11/17] Implement event-loop glue for gdbserver Tom Tromey
2019-02-24 16:52 ` [RFC 02/17] Move gdb-specific code out of start_event_loop Tom Tromey
2019-09-26 14:02 ` Pedro Alves
2019-02-24 16:52 ` [RFC 15/17] Move gdb_notifier comment Tom Tromey
2019-09-26 14:06 ` Pedro Alves
2019-02-24 16:52 ` [RFC 13/17] Switch gdbserver to common event loop Tom Tromey
2019-02-24 16:52 ` [RFC 16/17] Remove gdb_fildes_t Tom Tromey
2019-02-24 16:52 ` [RFC 05/17] Remove gdb_usleep.c Tom Tromey
2019-09-26 14:02 ` Pedro Alves
2019-09-26 14:43 ` Tom Tromey
2019-02-24 16:52 ` [RFC 06/17] Include <chrono> in event-loop.c Tom Tromey
2019-09-26 14:02 ` Pedro Alves
2019-02-24 16:52 ` Tom Tromey [this message]
2019-09-26 14:06 ` [RFC 10/17] Move event-loop.[ch] to common/ Pedro Alves
2019-10-04 22:06 ` Tom Tromey
2019-02-24 16:52 ` [RFC 04/17] Move gdb_select.h " Tom Tromey
2019-02-24 16:52 ` [RFC 03/17] Move event-loop configury to common.m4 Tom Tromey
2019-02-24 16:52 ` [RFC 17/17] Simplify gdbserver's serial event handling Tom Tromey
2019-09-26 17:36 ` Pedro Alves
2019-10-04 22:08 ` Tom Tromey
2019-02-24 16:52 ` [RFC 08/17] Introduce and use flush_streams Tom Tromey
2019-02-24 16:52 ` [RFC 01/17] Remove include from event-loop.c Tom Tromey
2019-02-24 16:52 ` [RFC 09/17] Introduce async-event.[ch] Tom Tromey
2019-09-26 14:06 ` Pedro Alves
2019-10-04 22:17 ` Tom Tromey
2019-02-24 17:14 ` [RFC 00/17] Merge event loop implementations Eli Zaretskii
2019-02-24 17:26 ` Tom Tromey
2019-02-24 17:45 ` Eli Zaretskii
2019-02-25 19:57 ` Tom Tromey
2019-02-25 20:30 ` Eli Zaretskii
2019-02-25 20:55 ` Tom Tromey
2019-02-26 16:04 ` Eli Zaretskii
2019-02-26 16:23 ` Tom Tromey
2019-02-26 16:46 ` Eli Zaretskii
2019-09-26 17:47 ` Pedro Alves
2019-09-26 23:09 ` Tom Tromey
2019-09-27 13:53 ` Pedro Alves
2019-09-27 14:05 ` Pedro Alves
2019-09-27 14:21 ` Eli Zaretskii
2019-09-27 14:53 ` Pedro Alves
2019-09-27 15:32 ` Eli Zaretskii
2019-09-27 19:10 ` Tom Tromey
2020-02-14 2:22 ` Tom Tromey
2020-02-14 17:58 ` Pedro Alves
2020-02-14 18:36 ` Tom Tromey
2019-10-04 22:25 ` Tom Tromey
2020-02-14 18:20 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190224165153.5062-11-tom@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).