aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPedro Alves <pedro@palves.net>2021-06-17 16:16:54 +0100
committerPedro Alves <pedro@palves.net>2021-06-17 16:22:11 +0100
commit965febe599ab3a5f9fa17a7aaed4dd714f265ecd (patch)
tree6070fefce3712338afe42d5a13504b893a64223d /gdb
parent96cbfd9f0488e9536bfc27550ebf90cb1ecac93b (diff)
downloadgdb-965febe599ab3a5f9fa17a7aaed4dd714f265ecd.zip
gdb-965febe599ab3a5f9fa17a7aaed4dd714f265ecd.tar.gz
gdb-965febe599ab3a5f9fa17a7aaed4dd714f265ecd.tar.bz2
Move scoped_ignore_sigttou to gdbsupport/
A following patch will want to use scoped_ignore_sigttou in code shared between GDB and GDBserver. Move it under gdbsupport/. Note that despite what inflow.h/inflow.c's first line says, inflow.c is no longer about ptrace, it is about terminal management. Some other files were unnecessarily including inflow.h, I guess a leftover from the days when inflow.c really was about ptrace. Those inclusions are simply dropped. gdb/ChangeLog: yyyy-mm-dd Pedro Alves <pedro@palves.net> * Makefile.in (HFILES_NO_SRCDIR): Remove inflow.h. * inf-ptrace.c, inflow.c, procfs.c: Don't include "inflow.h". * inflow.h: Delete, moved to gdbsupport/ under a different name. * ser-unix.c: Don't include "inflow.h". Include "gdbsupport/scoped_ignore_sigttou.h". gdbsupport/ChangeLog: yyyy-mm-dd Pedro Alves <pedro@palves.net> * scoped_ignore_sigttou.h: New file, moved from gdb/ and renamed. Change-Id: Ie390abf42c3a78bec6d282ad2a63edd3e623559a
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/Makefile.in1
-rw-r--r--gdb/inf-ptrace.c1
-rw-r--r--gdb/inflow.c2
-rw-r--r--gdb/inflow.h56
-rw-r--r--gdb/procfs.c1
-rw-r--r--gdb/ser-unix.c2
7 files changed, 10 insertions, 61 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 497d9f6..63d7cf5 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,13 @@
2021-06-17 Pedro Alves <pedro@palves.net>
+ * Makefile.in (HFILES_NO_SRCDIR): Remove inflow.h.
+ * inf-ptrace.c, inflow.c, procfs.c: Don't include "inflow.h".
+ * inflow.h: Delete, moved to gdbsupport/ under a different name.
+ * ser-unix.c: Don't include "inflow.h". Include
+ "gdbsupport/scoped_ignore_sigttou.h".
+
+2021-06-17 Pedro Alves <pedro@palves.net>
+
* tui/tui-io.c (tui_dispatch_mouse_event): New, factored out from
...
(tui_dispatch_ctrl_char): ... this. Move CTRL-L handling to
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index b3d264f..881ebde 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1336,7 +1336,6 @@ HFILES_NO_SRCDIR = \
inf-ptrace.h \
infcall.h \
inferior.h \
- inflow.h \
inline-frame.h \
interps.h \
jit.h \
diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c
index b6fa71f..afa38de 100644
--- a/gdb/inf-ptrace.c
+++ b/gdb/inf-ptrace.c
@@ -20,7 +20,6 @@
#include "defs.h"
#include "command.h"
#include "inferior.h"
-#include "inflow.h"
#include "terminal.h"
#include "gdbcore.h"
#include "regcache.h"
diff --git a/gdb/inflow.c b/gdb/inflow.c
index d241540..f9917d6 100644
--- a/gdb/inflow.c
+++ b/gdb/inflow.c
@@ -29,12 +29,12 @@
#include <fcntl.h>
#include "gdbsupport/gdb_select.h"
-#include "inflow.h"
#include "gdbcmd.h"
#ifdef HAVE_TERMIOS_H
#include <termios.h>
#endif
#include "gdbsupport/job-control.h"
+#include "gdbsupport/scoped_ignore_sigttou.h"
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
diff --git a/gdb/inflow.h b/gdb/inflow.h
deleted file mode 100644
index 8a671c7..0000000
--- a/gdb/inflow.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Low level interface to ptrace, for GDB when running under Unix.
-
- Copyright (C) 2003-2021 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 INFLOW_H
-#define INFLOW_H
-
-#include <unistd.h>
-#include <signal.h>
-#include "gdbsupport/job-control.h"
-
-/* RAII class used to ignore SIGTTOU in a scope. */
-
-class scoped_ignore_sigttou
-{
-public:
- scoped_ignore_sigttou ()
- {
-#ifdef SIGTTOU
- if (job_control)
- m_osigttou = signal (SIGTTOU, SIG_IGN);
-#endif
- }
-
- ~scoped_ignore_sigttou ()
- {
-#ifdef SIGTTOU
- if (job_control)
- signal (SIGTTOU, m_osigttou);
-#endif
- }
-
- DISABLE_COPY_AND_ASSIGN (scoped_ignore_sigttou);
-
-private:
-#ifdef SIGTTOU
- sighandler_t m_osigttou = NULL;
-#endif
-};
-
-#endif /* inflow.h */
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 23c0aa2..529ee33 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -40,7 +40,6 @@
#include <signal.h>
#include <ctype.h>
#include "gdb_bfd.h"
-#include "inflow.h"
#include "auxv.h"
#include "procfs.h"
#include "observable.h"
diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c
index e97dc2f..96d024e 100644
--- a/gdb/ser-unix.c
+++ b/gdb/ser-unix.c
@@ -32,7 +32,7 @@
#include "gdbcmd.h"
#include "gdbsupport/filestuff.h"
#include <termios.h>
-#include "inflow.h"
+#include "gdbsupport/scoped_ignore_sigttou.h"
struct hardwire_ttystate
{