mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +08:00
be628ab814
As requested, I'm sending this as a separate patch because it is ready to be included as-is. The idea here is that both gdb/terminal.h and gdb/gdbserver/terminal.h share the same code, which is responsible for setting a bunch of defines on based on the presence of termios.h and a few other headers. This simple patch just moves this common code to common/gdb_termios.h and makes the necessary adjustments on both GDB and gdbserver so that they can use this new header. It also implements the some header checks on common/common.m4. As a bonus, gdb/gdbserver/terminal.h can be removed because it's now empty. Built on x86_64, no regressions found. gdb/ChangeLog: 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com> * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h". * common/common.m4: Check headers 'termios.h', 'termio.h' and 'sgtty.h'. * common/gdb_termios.h: New file, with parts of "terminal.h". * inflow.c: Include "gdb_termios.h". * ser-unix.c: Include "gdb_termios.h". * terminal.h: Move terminal-related defines to "common/gdb_termios.h". gdb/gdbserver/ChangeLog: 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com> * remote-utils.c: Include "gdb_termios.h" instead of "terminal.h". * terminal.h: Delete file.
37 lines
1.1 KiB
C
37 lines
1.1 KiB
C
/* Low level interface to ptrace, for GDB when running under Unix.
|
|
|
|
Copyright (C) 2003-2017 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 "gdb_termios.h"
|
|
|
|
#ifdef HAVE_TERMIOS
|
|
# define PROCESS_GROUP_TYPE pid_t
|
|
#elif defined (HAVE_TERMIO) || defined (HAVE_SGTTY)
|
|
# define PROCESS_GROUP_TYPE int
|
|
#endif
|
|
|
|
#ifdef PROCESS_GROUP_TYPE
|
|
/* Process group of the current inferior. */
|
|
extern PROCESS_GROUP_TYPE inferior_process_group (void);
|
|
#endif
|
|
|
|
#endif /* inflow.h */
|