diff options
author | Tom Tromey <tromey@adacore.com> | 2019-10-01 06:52:44 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2019-10-02 13:43:41 -0600 |
commit | 80fd2826411c1033ec403658c5f3187bf9c1740a (patch) | |
tree | 7f5b7411ebaee9dbd719e0f6e0f2c0667c8f1dd6 /gdb/gdbsupport/common-inferior.c | |
parent | 700545387df82388b054947dc74cc0bb5cbd2a60 (diff) | |
download | gdb-80fd2826411c1033ec403658c5f3187bf9c1740a.zip gdb-80fd2826411c1033ec403658c5f3187bf9c1740a.tar.gz gdb-80fd2826411c1033ec403658c5f3187bf9c1740a.tar.bz2 |
Fix type of startup_with_shell in gdbserver
startup_with_shell was changed to be of "bool" type, but I noticed
that the definition in gdbserver disagreed. This disagreement caused
some regressions on a big-endian machine.
This patch removes the redundant declaration and definition of
startup_with_shell and ensures that such clashes will be diagnosed.
This moves the declaration to common-inferior.h, and introduces a new
common-inferior.c, as suggested by Pedro.
gdb/ChangeLog
2019-10-02 Tom Tromey <tromey@adacore.com>
* Makefile.in (COMMON_SFILES): Add common-inferior.c.
* gdbsupport/common-inferior.c: New file.
* infcmd.c (startup_with_shell): Don't define.
* nat/fork-inferior.h (startup_with_shell): Don't declare.
* gdbsupport/common-inferior.h (startup_with_shell): Declare.
* inferior.h (startup_with_shell): Don't declare.
gdb/gdbserver/ChangeLog
2019-10-02 Tom Tromey <tromey@adacore.com>
* Makefile.in (SFILES): Add common-inferior.c.
(OBS): Add common-inferior.o.
* server.c (startup_with_shell): Don't define.
Diffstat (limited to 'gdb/gdbsupport/common-inferior.c')
-rw-r--r-- | gdb/gdbsupport/common-inferior.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gdb/gdbsupport/common-inferior.c b/gdb/gdbsupport/common-inferior.c new file mode 100644 index 0000000..3a7c873 --- /dev/null +++ b/gdb/gdbsupport/common-inferior.c @@ -0,0 +1,26 @@ +/* Functions to deal with the inferior being executed on GDB or + GDBserver. + + Copyright (C) 2019 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/>. */ + +#include "gdbsupport/common-defs.h" +#include "gdbsupport/common-inferior.h" + +/* See common-inferior.h. */ + +bool startup_with_shell = true; |