Fix type of startup_with_shell in gdbserver
authorTom Tromey <tromey@adacore.com>
Tue, 1 Oct 2019 12:52:44 +0000 (06:52 -0600)
committerTom Tromey <tromey@adacore.com>
Wed, 2 Oct 2019 19:43:41 +0000 (13:43 -0600)
commit80fd2826411c1033ec403658c5f3187bf9c1740a
tree7f5b7411ebaee9dbd719e0f6e0f2c0667c8f1dd6
parent700545387df82388b054947dc74cc0bb5cbd2a60
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.
gdb/ChangeLog
gdb/Makefile.in
gdb/gdbserver/ChangeLog
gdb/gdbserver/Makefile.in
gdb/gdbserver/server.c
gdb/gdbsupport/common-inferior.c [new file with mode: 0644]
gdb/gdbsupport/common-inferior.h
gdb/infcmd.c
gdb/inferior.h
gdb/nat/fork-inferior.h