Move gdb_select.h to gdbsupport/
authorTom Tromey <tom@tromey.com>
Mon, 13 Apr 2020 18:42:59 +0000 (12:42 -0600)
committerTom Tromey <tromey@adacore.com>
Mon, 13 Apr 2020 20:10:03 +0000 (14:10 -0600)
This moves gdb_select.h to gdbsupport/, so it can be used by other
code there.

gdb/ChangeLog
2020-04-13  Tom Tromey  <tom@tromey.com>

* gdb_select.h: Move to ../gdbsupport/.
* event-loop.c: Update include path.
* top.c: Update include path.
* ser-base.c: Update include path.
* ui-file.c: Update include path.
* ser-tcp.c: Update include path.
* guile/scm-ports.c: Update include path.
* posix-hdep.c: Update include path.
* ser-unix.c: Update include path.
* gdb_usleep.c: Update include path.
* mingw-hdep.c: Update include path.
* inflow.c: Update include path.
* infrun.c: Update include path.
* event-top.c: Update include path.

gdbsupport/ChangeLog
2020-04-13  Tom Tromey  <tom@tromey.com>

* gdb_select.h: Move from ../gdb/.

16 files changed:
gdb/ChangeLog
gdb/event-loop.c
gdb/event-top.c
gdb/gdb_select.h [deleted file]
gdb/guile/scm-ports.c
gdb/inflow.c
gdb/infrun.c
gdb/mingw-hdep.c
gdb/posix-hdep.c
gdb/ser-base.c
gdb/ser-tcp.c
gdb/ser-unix.c
gdb/top.c
gdb/ui-file.c
gdbsupport/ChangeLog
gdbsupport/gdb_select.h [new file with mode: 0644]

index c0ac38454e3704b50e7177d21477263a6334c19d..d8be389e01a51dc751740d3cc317deb744577ee2 100644 (file)
@@ -1,3 +1,20 @@
+2020-04-13  Tom Tromey  <tom@tromey.com>
+
+       * gdb_select.h: Move to ../gdbsupport/.
+       * event-loop.c: Update include path.
+       * top.c: Update include path.
+       * ser-base.c: Update include path.
+       * ui-file.c: Update include path.
+       * ser-tcp.c: Update include path.
+       * guile/scm-ports.c: Update include path.
+       * posix-hdep.c: Update include path.
+       * ser-unix.c: Update include path.
+       * gdb_usleep.c: Update include path.
+       * mingw-hdep.c: Update include path.
+       * inflow.c: Update include path.
+       * infrun.c: Update include path.
+       * event-top.c: Update include path.
+
 2020-04-13  Tom Tromey  <tom@tromey.com>
 
        * configure: Rebuild.
index 36df4767aa931d2006c41be1ffdd8b0e41fbdb23..ae9d27eedd78671cdef383e557b5990c722ba16f 100644 (file)
@@ -32,8 +32,7 @@
 
 #include <sys/types.h>
 #include "gdbsupport/gdb_sys_time.h"
-#include "gdb_select.h"
-#include "observable.h"
+#include "gdbsupport/gdb_select.h"
 #include "top.h"
 
 /* Tell create_file_handler what events we are interested in.
index 1bfc28ea09965872f438a2e18951f6ba836d62c7..965ecd536f6bd6b7e7e6e6adceb3e9cc16ac67dc 100644 (file)
@@ -39,7 +39,7 @@
 #include "maint.h"
 #include "gdbsupport/buffer.h"
 #include "ser-event.h"
-#include "gdb_select.h"
+#include "gdbsupport/gdb_select.h"
 #include "gdbsupport/gdb-sigmask.h"
 
 /* readline include files.  */
diff --git a/gdb/gdb_select.h b/gdb/gdb_select.h
deleted file mode 100644 (file)
index 69021ac..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Slightly more portable version of <sys/select.h>.
-
-   Copyright (C) 2006-2020 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/>.  */
-
-#if !defined(GDB_SELECT_H)
-#define GDB_SELECT_H
-
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#else
-#include "gdbsupport/gdb_sys_time.h"
-#endif
-
-#ifdef USE_WIN32API
-#include <winsock2.h>
-#endif
-
-extern int gdb_select (int n, fd_set *readfds, fd_set *writefds,
-                      fd_set *exceptfds, struct timeval *timeout);
-
-/* Convenience wrapper around gdb_select that returns -1/EINTR if
-   set_quit_flag is set, either on entry or from a signal handler or
-   from a different thread while select is blocked.  The quit flag is
-   not cleared on exit -- the caller is responsible to check it with
-   check_quit_flag or QUIT.
-
-   Note this does NOT return -1/EINTR if any signal handler other than
-   SIGINT runs, nor if the current SIGINT handler does not call
-   set_quit_flag.  */
-extern int interruptible_select (int n,
-                                fd_set *readfds,
-                                fd_set *writefds,
-                                fd_set *exceptfds,
-                                struct timeval *timeout);
-
-#endif /* !defined(GDB_SELECT_H) */
index 3f832dc753afcfb3f6bbee376489bd9af2748cb8..407d1d36f1f5bcbfedbb50554b4f951f84dc0cb2 100644 (file)
@@ -22,7 +22,7 @@
    conventions, et.al.  */
 
 #include "defs.h"
-#include "gdb_select.h"
+#include "gdbsupport/gdb_select.h"
 #include "top.h"
 #include "target.h"
 #include "guile-internal.h"
index e5e595ed981adb7ecfd86c90be3d1cf32f2cdbe5..1b8e819436a2dc628dab88d24673e7dc0b698d5c 100644 (file)
@@ -27,7 +27,7 @@
 #include "observable.h"
 #include <signal.h>
 #include <fcntl.h>
-#include "gdb_select.h"
+#include "gdbsupport/gdb_select.h"
 
 #include "inflow.h"
 #include "gdbcmd.h"
index 8ff34c382d6397276abe99d186d18c40d7c3b549..88105e0801c2ead529eb0e340330523639c5573b 100644 (file)
@@ -64,7 +64,7 @@
 #include "arch-utils.h"
 #include "gdbsupport/scope-exit.h"
 #include "gdbsupport/forward-scope-exit.h"
-#include "gdb_select.h"
+#include "gdbsupport/gdb_select.h"
 #include <unordered_map>
 
 /* Prototypes for local functions */
index cc425491dc91618e8f4fd643ce0f14eac2ce64ab..016cf2d2310b3d9d6c4edcaab7f1e72fd11107a5 100644 (file)
@@ -22,7 +22,7 @@
 #include "serial.h"
 #include "event-loop.h"
 
-#include "gdb_select.h"
+#include "gdbsupport/gdb_select.h"
 
 #include <windows.h>
 
index cca72418aac7d97519b19413bc40bbe40a41c59f..e5754cd701a54dbb9eb95496943631c613bb5507 100644 (file)
@@ -20,7 +20,7 @@
 #include "defs.h"
 #include "event-loop.h"
 
-#include "gdb_select.h"
+#include "gdbsupport/gdb_select.h"
 
 /* Wrapper for select.  Nothing special needed on POSIX platforms.  */
 
index 89d9a695c2fd29cf86e8f5fb46315ec2241cec9b..8231ec515431579a4b4ef11b71b111e5e470982c 100644 (file)
@@ -22,7 +22,7 @@
 #include "ser-base.h"
 #include "event-loop.h"
 
-#include "gdb_select.h"
+#include "gdbsupport/gdb_select.h"
 #include "gdbsupport/gdb_sys_time.h"
 #ifdef USE_WIN32API
 #include <winsock2.h>
index c5581744f9963b59c27e46dd45f5e020f7ddf52a..1c6d5a346c6dda20b58f98dd09571ca79d7846bf 100644 (file)
@@ -58,7 +58,7 @@
 #endif
 
 #include <signal.h>
-#include "gdb_select.h"
+#include "gdbsupport/gdb_select.h"
 #include <algorithm>
 
 #ifndef HAVE_SOCKLEN_T
index 8000e352a09bf14f91408715a09c01fd2076e41d..9a13acddbc85a75a45e5ec62e816e4b9af9f361d 100644 (file)
@@ -28,7 +28,7 @@
 #include <sys/socket.h>
 #include "gdbsupport/gdb_sys_time.h"
 
-#include "gdb_select.h"
+#include "gdbsupport/gdb_select.h"
 #include "gdbcmd.h"
 #include "gdbsupport/filestuff.h"
 #include <termios.h>
index e2432489dc8b0d82862ca00749aac35f2d03ca70..010aa6fb7710ce3768a004a3b3ef072d53f29f5c 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -51,7 +51,7 @@
 #include "filenames.h"
 #include "frame.h"
 #include "gdbsupport/buffer.h"
-#include "gdb_select.h"
+#include "gdbsupport/gdb_select.h"
 #include "gdbsupport/scope-exit.h"
 #include "gdbarch.h"
 #include "gdbsupport/pathstuff.h"
index f3adbd014aaab288763e1f676e0f7dc65000d8be..a7b63a494b9a25335d430e644a0f6e18ad6f6f01 100644 (file)
@@ -22,7 +22,7 @@
 #include "defs.h"
 #include "ui-file.h"
 #include "gdb_obstack.h"
-#include "gdb_select.h"
+#include "gdbsupport/gdb_select.h"
 #include "gdbsupport/filestuff.h"
 #include "cli/cli-style.h"
 
index 0d0ea875a49c30b61927f42e83e456145b32410b..880a6ae7658c347b33b7c1aa16557c4941f570f0 100644 (file)
@@ -1,3 +1,7 @@
+2020-04-13  Tom Tromey  <tom@tromey.com>
+
+       * gdb_select.h: Move from ../gdb/.
+
 2020-04-13  Tom Tromey  <tom@tromey.com>
 
        * config.in, configure: Rebuild.
diff --git a/gdbsupport/gdb_select.h b/gdbsupport/gdb_select.h
new file mode 100644 (file)
index 0000000..69021ac
--- /dev/null
@@ -0,0 +1,51 @@
+/* Slightly more portable version of <sys/select.h>.
+
+   Copyright (C) 2006-2020 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/>.  */
+
+#if !defined(GDB_SELECT_H)
+#define GDB_SELECT_H
+
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#else
+#include "gdbsupport/gdb_sys_time.h"
+#endif
+
+#ifdef USE_WIN32API
+#include <winsock2.h>
+#endif
+
+extern int gdb_select (int n, fd_set *readfds, fd_set *writefds,
+                      fd_set *exceptfds, struct timeval *timeout);
+
+/* Convenience wrapper around gdb_select that returns -1/EINTR if
+   set_quit_flag is set, either on entry or from a signal handler or
+   from a different thread while select is blocked.  The quit flag is
+   not cleared on exit -- the caller is responsible to check it with
+   check_quit_flag or QUIT.
+
+   Note this does NOT return -1/EINTR if any signal handler other than
+   SIGINT runs, nor if the current SIGINT handler does not call
+   set_quit_flag.  */
+extern int interruptible_select (int n,
+                                fd_set *readfds,
+                                fd_set *writefds,
+                                fd_set *exceptfds,
+                                struct timeval *timeout);
+
+#endif /* !defined(GDB_SELECT_H) */
This page took 0.033865 seconds and 4 git commands to generate.