Introduce "gdb/configure.nat" (and delete "gdb/config/*/*.mh" files)
Due to my ongoing work to make it possible for gdbserver to start the
inferior using the shell, I had to share the fork_inferior function
under the "nat/" directory. In order to do that, I created a new file
and put the function there; however, this meant that I now had to
update some of the *.mh files (under "gdb/config") and add the new
file as a dependency to be built natively. Bleh...
After talking a bit to Pedro about this, the idea came up to write a
new "gdb/configure.nat" file, a la "gdb/configure.tgt", which would
concentrate all of the native settings for each host/system. I
decided to tackle this issue.
The patch is simple. All of the previous Makefile variables that were
being declared inside the *.mh files are now inside "gdb/Makefile.in",
and "gdb/configure" is responsible for AC_SUBST'ing them. The
definitions of these variables were put inside "gdb/configure.nat", so
now they're shell variables. For excerpts of Makefile code, one must
create a file under "gdb/config/${gdb_cpu_host}" and reference it on
the "nat_extra_makefile_frag" variable.
It should now be easier to update the native dependencies of hosts in
this single file.
This has been tested on x86_64 without regressions.
gdb/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in: Remove "@host_makefile_frag@". Add variables
NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
"@nat_extra_makefile_frag@".
(Makefile): Remove dependency on "@frags@".
($(GNULIB_BUILDDIR)/Makefile): Likewise.
(data-directory/Makefile): Likewise.
* config/aarch64/linux.mh: Deleted; moved contents to
"gdb/configure.nat".
* config/alpha/alpha-linux.mh: Likewise.
* config/alpha/nbsd.mh: Likewise.
* config/arm/linux.mh: Likewise.
* config/arm/nbsdelf.mh: Likewise.
* config/i386/cygwin.mh: Likewise.
* config/i386/cygwin64.mh: Likewise.
* config/i386/darwin.mh: Likewise.
* config/i386/fbsd.mh: Likewise.
* config/i386/fbsd64.mh: Likewise.
* config/i386/go32.mh: Likewise.
* config/i386/i386gnu.mh: Likewise.
* config/i386/i386sol2.mh: Likewise.
* config/i386/linux.mh: Likewise.
* config/i386/linux64.mh: Likewise.
* config/i386/mingw.mh: Likewise.
* config/i386/mingw64.mh: Likewise.
* config/i386/nbsd64.mh: Likewise.
* config/i386/nbsdelf.mh: Likewise.
* config/i386/nto.mh: Likewise.
* config/i386/obsd.mh: Likewise.
* config/i386/obsd64.mh: Likewise.
* config/i386/sol2-64.mh: Likewise.
* config/ia64/linux.mh: Likewise.
* config/m32r/linux.mh: Likewise.
* config/m68k/linux.mh: Likewise.
* config/m68k/nbsdelf.mh: Likewise.
* config/m68k/obsd.mh: Likewise.
* config/m88k/obsd.mh: Likewise.
* config/mips/fbsd.mh: Likewise.
* config/mips/linux.mh: Likewise.
* config/mips/nbsd.mh: Likewise.
* config/mips/obsd64.mh: Likewise.
* config/pa/linux.mh: Likewise.
* config/pa/nbsd.mh: Likewise.
* config/pa/obsd.mh: Likewise.
* config/powerpc/aix.mh: Likewise.
* config/powerpc/fbsd.mh: Likewise.
* config/powerpc/linux.mh: Likewise.
* config/powerpc/nbsd.mh: Likewise.
* config/powerpc/obsd.mh: Likewise.
* config/powerpc/ppc64-linux.mh: Likewise.
* config/powerpc/spu-linux.mh: Likewise.
* config/s390/linux.mh: Likewise.
* config/sh/nbsd.mh: Likewise.
* config/sparc/fbsd.mh: Likewise.
* config/sparc/linux.mh: Likewise.
* config/sparc/linux64.mh: Likewise.
* config/sparc/nbsd64.mh: Likewise.
* config/sparc/nbsdelf.mh: Likewise.
* config/sparc/obsd64.mh: Likewise.
* config/sparc/sol2.mh: Likewise.
* config/tilegx/linux.mh: Likewise.
* config/vax/nbsdelf.mh: Likewise.
* config/vax/obsd.mh: Likewise.
* config/xtensa/linux.mh: Likewise.
* config/i386/i386gnu.mn: New file, with excerpts from
"config/i386/i386gnu.mh".
* configure: Regenerate.
* configure.ac: Rewrite code to use "gdb/configure.nat" instead of
*.mh files under "gdb/config".
* configure.nat: New file, with contents from the
"gdb/config/*/*.mh" files.
gdb/doc/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile: Remove "@host_makefile_frag@".
2017-04-26 04:03:39 +08:00
|
|
|
# ; -*- mode: sh ; -*-
|
2024-01-12 23:30:44 +08:00
|
|
|
# Copyright (C) 2013-2024 Free Software Foundation, Inc.
|
Introduce "gdb/configure.nat" (and delete "gdb/config/*/*.mh" files)
Due to my ongoing work to make it possible for gdbserver to start the
inferior using the shell, I had to share the fork_inferior function
under the "nat/" directory. In order to do that, I created a new file
and put the function there; however, this meant that I now had to
update some of the *.mh files (under "gdb/config") and add the new
file as a dependency to be built natively. Bleh...
After talking a bit to Pedro about this, the idea came up to write a
new "gdb/configure.nat" file, a la "gdb/configure.tgt", which would
concentrate all of the native settings for each host/system. I
decided to tackle this issue.
The patch is simple. All of the previous Makefile variables that were
being declared inside the *.mh files are now inside "gdb/Makefile.in",
and "gdb/configure" is responsible for AC_SUBST'ing them. The
definitions of these variables were put inside "gdb/configure.nat", so
now they're shell variables. For excerpts of Makefile code, one must
create a file under "gdb/config/${gdb_cpu_host}" and reference it on
the "nat_extra_makefile_frag" variable.
It should now be easier to update the native dependencies of hosts in
this single file.
This has been tested on x86_64 without regressions.
gdb/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in: Remove "@host_makefile_frag@". Add variables
NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
"@nat_extra_makefile_frag@".
(Makefile): Remove dependency on "@frags@".
($(GNULIB_BUILDDIR)/Makefile): Likewise.
(data-directory/Makefile): Likewise.
* config/aarch64/linux.mh: Deleted; moved contents to
"gdb/configure.nat".
* config/alpha/alpha-linux.mh: Likewise.
* config/alpha/nbsd.mh: Likewise.
* config/arm/linux.mh: Likewise.
* config/arm/nbsdelf.mh: Likewise.
* config/i386/cygwin.mh: Likewise.
* config/i386/cygwin64.mh: Likewise.
* config/i386/darwin.mh: Likewise.
* config/i386/fbsd.mh: Likewise.
* config/i386/fbsd64.mh: Likewise.
* config/i386/go32.mh: Likewise.
* config/i386/i386gnu.mh: Likewise.
* config/i386/i386sol2.mh: Likewise.
* config/i386/linux.mh: Likewise.
* config/i386/linux64.mh: Likewise.
* config/i386/mingw.mh: Likewise.
* config/i386/mingw64.mh: Likewise.
* config/i386/nbsd64.mh: Likewise.
* config/i386/nbsdelf.mh: Likewise.
* config/i386/nto.mh: Likewise.
* config/i386/obsd.mh: Likewise.
* config/i386/obsd64.mh: Likewise.
* config/i386/sol2-64.mh: Likewise.
* config/ia64/linux.mh: Likewise.
* config/m32r/linux.mh: Likewise.
* config/m68k/linux.mh: Likewise.
* config/m68k/nbsdelf.mh: Likewise.
* config/m68k/obsd.mh: Likewise.
* config/m88k/obsd.mh: Likewise.
* config/mips/fbsd.mh: Likewise.
* config/mips/linux.mh: Likewise.
* config/mips/nbsd.mh: Likewise.
* config/mips/obsd64.mh: Likewise.
* config/pa/linux.mh: Likewise.
* config/pa/nbsd.mh: Likewise.
* config/pa/obsd.mh: Likewise.
* config/powerpc/aix.mh: Likewise.
* config/powerpc/fbsd.mh: Likewise.
* config/powerpc/linux.mh: Likewise.
* config/powerpc/nbsd.mh: Likewise.
* config/powerpc/obsd.mh: Likewise.
* config/powerpc/ppc64-linux.mh: Likewise.
* config/powerpc/spu-linux.mh: Likewise.
* config/s390/linux.mh: Likewise.
* config/sh/nbsd.mh: Likewise.
* config/sparc/fbsd.mh: Likewise.
* config/sparc/linux.mh: Likewise.
* config/sparc/linux64.mh: Likewise.
* config/sparc/nbsd64.mh: Likewise.
* config/sparc/nbsdelf.mh: Likewise.
* config/sparc/obsd64.mh: Likewise.
* config/sparc/sol2.mh: Likewise.
* config/tilegx/linux.mh: Likewise.
* config/vax/nbsdelf.mh: Likewise.
* config/vax/obsd.mh: Likewise.
* config/xtensa/linux.mh: Likewise.
* config/i386/i386gnu.mn: New file, with excerpts from
"config/i386/i386gnu.mh".
* configure: Regenerate.
* configure.ac: Rewrite code to use "gdb/configure.nat" instead of
*.mh files under "gdb/config".
* configure.nat: New file, with contents from the
"gdb/config/*/*.mh" files.
gdb/doc/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile: Remove "@host_makefile_frag@".
2017-04-26 04:03:39 +08:00
|
|
|
#
|
|
|
|
# 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/>.
|
|
|
|
|
|
|
|
# Variables defined here:
|
|
|
|
#
|
|
|
|
# NAT_FILE - The header file with definitions for this native target.
|
|
|
|
#
|
|
|
|
# NATDEPFILES - Source files required for native debugging on this
|
|
|
|
# native target.
|
|
|
|
#
|
|
|
|
# NAT_CDEPS - Dynamic symbols to be exported for libthread_db.
|
|
|
|
#
|
|
|
|
# LOADLIBES - Libraries against which GDB will be linked for this
|
|
|
|
# native target.
|
|
|
|
#
|
|
|
|
# MH_CFLAGS - Additional CFLAGS for this host.
|
|
|
|
#
|
|
|
|
# XM_CLIBS - Host-dependent libraries against which GDB will be linked
|
|
|
|
# for this native target.
|
|
|
|
#
|
|
|
|
# HAVE_NATIVE_GCORE_HOST - Whether gcore should be installed on this
|
|
|
|
# native target.
|
|
|
|
#
|
2017-05-17 20:56:19 +08:00
|
|
|
# nat_makefile_frag - Name of the (optional) Makefile fragment file
|
|
|
|
# required to build the native target. The
|
|
|
|
# fragment is incorporated into the Makefile that
|
|
|
|
# configure constructs from Makefile.in.
|
Introduce "gdb/configure.nat" (and delete "gdb/config/*/*.mh" files)
Due to my ongoing work to make it possible for gdbserver to start the
inferior using the shell, I had to share the fork_inferior function
under the "nat/" directory. In order to do that, I created a new file
and put the function there; however, this meant that I now had to
update some of the *.mh files (under "gdb/config") and add the new
file as a dependency to be built natively. Bleh...
After talking a bit to Pedro about this, the idea came up to write a
new "gdb/configure.nat" file, a la "gdb/configure.tgt", which would
concentrate all of the native settings for each host/system. I
decided to tackle this issue.
The patch is simple. All of the previous Makefile variables that were
being declared inside the *.mh files are now inside "gdb/Makefile.in",
and "gdb/configure" is responsible for AC_SUBST'ing them. The
definitions of these variables were put inside "gdb/configure.nat", so
now they're shell variables. For excerpts of Makefile code, one must
create a file under "gdb/config/${gdb_cpu_host}" and reference it on
the "nat_extra_makefile_frag" variable.
It should now be easier to update the native dependencies of hosts in
this single file.
This has been tested on x86_64 without regressions.
gdb/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in: Remove "@host_makefile_frag@". Add variables
NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
"@nat_extra_makefile_frag@".
(Makefile): Remove dependency on "@frags@".
($(GNULIB_BUILDDIR)/Makefile): Likewise.
(data-directory/Makefile): Likewise.
* config/aarch64/linux.mh: Deleted; moved contents to
"gdb/configure.nat".
* config/alpha/alpha-linux.mh: Likewise.
* config/alpha/nbsd.mh: Likewise.
* config/arm/linux.mh: Likewise.
* config/arm/nbsdelf.mh: Likewise.
* config/i386/cygwin.mh: Likewise.
* config/i386/cygwin64.mh: Likewise.
* config/i386/darwin.mh: Likewise.
* config/i386/fbsd.mh: Likewise.
* config/i386/fbsd64.mh: Likewise.
* config/i386/go32.mh: Likewise.
* config/i386/i386gnu.mh: Likewise.
* config/i386/i386sol2.mh: Likewise.
* config/i386/linux.mh: Likewise.
* config/i386/linux64.mh: Likewise.
* config/i386/mingw.mh: Likewise.
* config/i386/mingw64.mh: Likewise.
* config/i386/nbsd64.mh: Likewise.
* config/i386/nbsdelf.mh: Likewise.
* config/i386/nto.mh: Likewise.
* config/i386/obsd.mh: Likewise.
* config/i386/obsd64.mh: Likewise.
* config/i386/sol2-64.mh: Likewise.
* config/ia64/linux.mh: Likewise.
* config/m32r/linux.mh: Likewise.
* config/m68k/linux.mh: Likewise.
* config/m68k/nbsdelf.mh: Likewise.
* config/m68k/obsd.mh: Likewise.
* config/m88k/obsd.mh: Likewise.
* config/mips/fbsd.mh: Likewise.
* config/mips/linux.mh: Likewise.
* config/mips/nbsd.mh: Likewise.
* config/mips/obsd64.mh: Likewise.
* config/pa/linux.mh: Likewise.
* config/pa/nbsd.mh: Likewise.
* config/pa/obsd.mh: Likewise.
* config/powerpc/aix.mh: Likewise.
* config/powerpc/fbsd.mh: Likewise.
* config/powerpc/linux.mh: Likewise.
* config/powerpc/nbsd.mh: Likewise.
* config/powerpc/obsd.mh: Likewise.
* config/powerpc/ppc64-linux.mh: Likewise.
* config/powerpc/spu-linux.mh: Likewise.
* config/s390/linux.mh: Likewise.
* config/sh/nbsd.mh: Likewise.
* config/sparc/fbsd.mh: Likewise.
* config/sparc/linux.mh: Likewise.
* config/sparc/linux64.mh: Likewise.
* config/sparc/nbsd64.mh: Likewise.
* config/sparc/nbsdelf.mh: Likewise.
* config/sparc/obsd64.mh: Likewise.
* config/sparc/sol2.mh: Likewise.
* config/tilegx/linux.mh: Likewise.
* config/vax/nbsdelf.mh: Likewise.
* config/vax/obsd.mh: Likewise.
* config/xtensa/linux.mh: Likewise.
* config/i386/i386gnu.mn: New file, with excerpts from
"config/i386/i386gnu.mh".
* configure: Regenerate.
* configure.ac: Rewrite code to use "gdb/configure.nat" instead of
*.mh files under "gdb/config".
* configure.nat: New file, with contents from the
"gdb/config/*/*.mh" files.
gdb/doc/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile: Remove "@host_makefile_frag@".
2017-04-26 04:03:39 +08:00
|
|
|
#
|
|
|
|
# Notes:
|
|
|
|
#
|
|
|
|
# - To avoid shell expansion of variables, declare them with single
|
|
|
|
# quotes.
|
|
|
|
#
|
2017-05-17 20:56:19 +08:00
|
|
|
# - nat_makefile_frag must contain the full path of the file.
|
Introduce "gdb/configure.nat" (and delete "gdb/config/*/*.mh" files)
Due to my ongoing work to make it possible for gdbserver to start the
inferior using the shell, I had to share the fork_inferior function
under the "nat/" directory. In order to do that, I created a new file
and put the function there; however, this meant that I now had to
update some of the *.mh files (under "gdb/config") and add the new
file as a dependency to be built natively. Bleh...
After talking a bit to Pedro about this, the idea came up to write a
new "gdb/configure.nat" file, a la "gdb/configure.tgt", which would
concentrate all of the native settings for each host/system. I
decided to tackle this issue.
The patch is simple. All of the previous Makefile variables that were
being declared inside the *.mh files are now inside "gdb/Makefile.in",
and "gdb/configure" is responsible for AC_SUBST'ing them. The
definitions of these variables were put inside "gdb/configure.nat", so
now they're shell variables. For excerpts of Makefile code, one must
create a file under "gdb/config/${gdb_cpu_host}" and reference it on
the "nat_extra_makefile_frag" variable.
It should now be easier to update the native dependencies of hosts in
this single file.
This has been tested on x86_64 without regressions.
gdb/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in: Remove "@host_makefile_frag@". Add variables
NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
"@nat_extra_makefile_frag@".
(Makefile): Remove dependency on "@frags@".
($(GNULIB_BUILDDIR)/Makefile): Likewise.
(data-directory/Makefile): Likewise.
* config/aarch64/linux.mh: Deleted; moved contents to
"gdb/configure.nat".
* config/alpha/alpha-linux.mh: Likewise.
* config/alpha/nbsd.mh: Likewise.
* config/arm/linux.mh: Likewise.
* config/arm/nbsdelf.mh: Likewise.
* config/i386/cygwin.mh: Likewise.
* config/i386/cygwin64.mh: Likewise.
* config/i386/darwin.mh: Likewise.
* config/i386/fbsd.mh: Likewise.
* config/i386/fbsd64.mh: Likewise.
* config/i386/go32.mh: Likewise.
* config/i386/i386gnu.mh: Likewise.
* config/i386/i386sol2.mh: Likewise.
* config/i386/linux.mh: Likewise.
* config/i386/linux64.mh: Likewise.
* config/i386/mingw.mh: Likewise.
* config/i386/mingw64.mh: Likewise.
* config/i386/nbsd64.mh: Likewise.
* config/i386/nbsdelf.mh: Likewise.
* config/i386/nto.mh: Likewise.
* config/i386/obsd.mh: Likewise.
* config/i386/obsd64.mh: Likewise.
* config/i386/sol2-64.mh: Likewise.
* config/ia64/linux.mh: Likewise.
* config/m32r/linux.mh: Likewise.
* config/m68k/linux.mh: Likewise.
* config/m68k/nbsdelf.mh: Likewise.
* config/m68k/obsd.mh: Likewise.
* config/m88k/obsd.mh: Likewise.
* config/mips/fbsd.mh: Likewise.
* config/mips/linux.mh: Likewise.
* config/mips/nbsd.mh: Likewise.
* config/mips/obsd64.mh: Likewise.
* config/pa/linux.mh: Likewise.
* config/pa/nbsd.mh: Likewise.
* config/pa/obsd.mh: Likewise.
* config/powerpc/aix.mh: Likewise.
* config/powerpc/fbsd.mh: Likewise.
* config/powerpc/linux.mh: Likewise.
* config/powerpc/nbsd.mh: Likewise.
* config/powerpc/obsd.mh: Likewise.
* config/powerpc/ppc64-linux.mh: Likewise.
* config/powerpc/spu-linux.mh: Likewise.
* config/s390/linux.mh: Likewise.
* config/sh/nbsd.mh: Likewise.
* config/sparc/fbsd.mh: Likewise.
* config/sparc/linux.mh: Likewise.
* config/sparc/linux64.mh: Likewise.
* config/sparc/nbsd64.mh: Likewise.
* config/sparc/nbsdelf.mh: Likewise.
* config/sparc/obsd64.mh: Likewise.
* config/sparc/sol2.mh: Likewise.
* config/tilegx/linux.mh: Likewise.
* config/vax/nbsdelf.mh: Likewise.
* config/vax/obsd.mh: Likewise.
* config/xtensa/linux.mh: Likewise.
* config/i386/i386gnu.mn: New file, with excerpts from
"config/i386/i386gnu.mh".
* configure: Regenerate.
* configure.ac: Rewrite code to use "gdb/configure.nat" instead of
*.mh files under "gdb/config".
* configure.nat: New file, with contents from the
"gdb/config/*/*.mh" files.
gdb/doc/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile: Remove "@host_makefile_frag@".
2017-04-26 04:03:39 +08:00
|
|
|
|
|
|
|
|
2017-05-03 09:32:33 +08:00
|
|
|
# This first case is useful for filling default values for each
|
|
|
|
# gdb_host.
|
|
|
|
case ${gdb_host} in
|
|
|
|
*linux*)
|
Introduce "gdb/configure.nat" (and delete "gdb/config/*/*.mh" files)
Due to my ongoing work to make it possible for gdbserver to start the
inferior using the shell, I had to share the fork_inferior function
under the "nat/" directory. In order to do that, I created a new file
and put the function there; however, this meant that I now had to
update some of the *.mh files (under "gdb/config") and add the new
file as a dependency to be built natively. Bleh...
After talking a bit to Pedro about this, the idea came up to write a
new "gdb/configure.nat" file, a la "gdb/configure.tgt", which would
concentrate all of the native settings for each host/system. I
decided to tackle this issue.
The patch is simple. All of the previous Makefile variables that were
being declared inside the *.mh files are now inside "gdb/Makefile.in",
and "gdb/configure" is responsible for AC_SUBST'ing them. The
definitions of these variables were put inside "gdb/configure.nat", so
now they're shell variables. For excerpts of Makefile code, one must
create a file under "gdb/config/${gdb_cpu_host}" and reference it on
the "nat_extra_makefile_frag" variable.
It should now be easier to update the native dependencies of hosts in
this single file.
This has been tested on x86_64 without regressions.
gdb/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in: Remove "@host_makefile_frag@". Add variables
NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
"@nat_extra_makefile_frag@".
(Makefile): Remove dependency on "@frags@".
($(GNULIB_BUILDDIR)/Makefile): Likewise.
(data-directory/Makefile): Likewise.
* config/aarch64/linux.mh: Deleted; moved contents to
"gdb/configure.nat".
* config/alpha/alpha-linux.mh: Likewise.
* config/alpha/nbsd.mh: Likewise.
* config/arm/linux.mh: Likewise.
* config/arm/nbsdelf.mh: Likewise.
* config/i386/cygwin.mh: Likewise.
* config/i386/cygwin64.mh: Likewise.
* config/i386/darwin.mh: Likewise.
* config/i386/fbsd.mh: Likewise.
* config/i386/fbsd64.mh: Likewise.
* config/i386/go32.mh: Likewise.
* config/i386/i386gnu.mh: Likewise.
* config/i386/i386sol2.mh: Likewise.
* config/i386/linux.mh: Likewise.
* config/i386/linux64.mh: Likewise.
* config/i386/mingw.mh: Likewise.
* config/i386/mingw64.mh: Likewise.
* config/i386/nbsd64.mh: Likewise.
* config/i386/nbsdelf.mh: Likewise.
* config/i386/nto.mh: Likewise.
* config/i386/obsd.mh: Likewise.
* config/i386/obsd64.mh: Likewise.
* config/i386/sol2-64.mh: Likewise.
* config/ia64/linux.mh: Likewise.
* config/m32r/linux.mh: Likewise.
* config/m68k/linux.mh: Likewise.
* config/m68k/nbsdelf.mh: Likewise.
* config/m68k/obsd.mh: Likewise.
* config/m88k/obsd.mh: Likewise.
* config/mips/fbsd.mh: Likewise.
* config/mips/linux.mh: Likewise.
* config/mips/nbsd.mh: Likewise.
* config/mips/obsd64.mh: Likewise.
* config/pa/linux.mh: Likewise.
* config/pa/nbsd.mh: Likewise.
* config/pa/obsd.mh: Likewise.
* config/powerpc/aix.mh: Likewise.
* config/powerpc/fbsd.mh: Likewise.
* config/powerpc/linux.mh: Likewise.
* config/powerpc/nbsd.mh: Likewise.
* config/powerpc/obsd.mh: Likewise.
* config/powerpc/ppc64-linux.mh: Likewise.
* config/powerpc/spu-linux.mh: Likewise.
* config/s390/linux.mh: Likewise.
* config/sh/nbsd.mh: Likewise.
* config/sparc/fbsd.mh: Likewise.
* config/sparc/linux.mh: Likewise.
* config/sparc/linux64.mh: Likewise.
* config/sparc/nbsd64.mh: Likewise.
* config/sparc/nbsdelf.mh: Likewise.
* config/sparc/obsd64.mh: Likewise.
* config/sparc/sol2.mh: Likewise.
* config/tilegx/linux.mh: Likewise.
* config/vax/nbsdelf.mh: Likewise.
* config/vax/obsd.mh: Likewise.
* config/xtensa/linux.mh: Likewise.
* config/i386/i386gnu.mn: New file, with excerpts from
"config/i386/i386gnu.mh".
* configure: Regenerate.
* configure.ac: Rewrite code to use "gdb/configure.nat" instead of
*.mh files under "gdb/config".
* configure.nat: New file, with contents from the
"gdb/config/*/*.mh" files.
gdb/doc/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile: Remove "@host_makefile_frag@".
2017-04-26 04:03:39 +08:00
|
|
|
NAT_FILE='config/nm-linux.h'
|
2018-12-25 03:01:34 +08:00
|
|
|
NATDEPFILES='inf-ptrace.o fork-child.o nat/fork-inferior.o \
|
|
|
|
proc-service.o \
|
|
|
|
linux-thread-db.o linux-nat.o nat/linux-osdata.o linux-fork.o \
|
|
|
|
nat/linux-procfs.o nat/linux-ptrace.o nat/linux-waitpid.o \
|
|
|
|
nat/linux-personality.o nat/linux-namespaces.o'
|
Introduce "gdb/configure.nat" (and delete "gdb/config/*/*.mh" files)
Due to my ongoing work to make it possible for gdbserver to start the
inferior using the shell, I had to share the fork_inferior function
under the "nat/" directory. In order to do that, I created a new file
and put the function there; however, this meant that I now had to
update some of the *.mh files (under "gdb/config") and add the new
file as a dependency to be built natively. Bleh...
After talking a bit to Pedro about this, the idea came up to write a
new "gdb/configure.nat" file, a la "gdb/configure.tgt", which would
concentrate all of the native settings for each host/system. I
decided to tackle this issue.
The patch is simple. All of the previous Makefile variables that were
being declared inside the *.mh files are now inside "gdb/Makefile.in",
and "gdb/configure" is responsible for AC_SUBST'ing them. The
definitions of these variables were put inside "gdb/configure.nat", so
now they're shell variables. For excerpts of Makefile code, one must
create a file under "gdb/config/${gdb_cpu_host}" and reference it on
the "nat_extra_makefile_frag" variable.
It should now be easier to update the native dependencies of hosts in
this single file.
This has been tested on x86_64 without regressions.
gdb/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in: Remove "@host_makefile_frag@". Add variables
NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
"@nat_extra_makefile_frag@".
(Makefile): Remove dependency on "@frags@".
($(GNULIB_BUILDDIR)/Makefile): Likewise.
(data-directory/Makefile): Likewise.
* config/aarch64/linux.mh: Deleted; moved contents to
"gdb/configure.nat".
* config/alpha/alpha-linux.mh: Likewise.
* config/alpha/nbsd.mh: Likewise.
* config/arm/linux.mh: Likewise.
* config/arm/nbsdelf.mh: Likewise.
* config/i386/cygwin.mh: Likewise.
* config/i386/cygwin64.mh: Likewise.
* config/i386/darwin.mh: Likewise.
* config/i386/fbsd.mh: Likewise.
* config/i386/fbsd64.mh: Likewise.
* config/i386/go32.mh: Likewise.
* config/i386/i386gnu.mh: Likewise.
* config/i386/i386sol2.mh: Likewise.
* config/i386/linux.mh: Likewise.
* config/i386/linux64.mh: Likewise.
* config/i386/mingw.mh: Likewise.
* config/i386/mingw64.mh: Likewise.
* config/i386/nbsd64.mh: Likewise.
* config/i386/nbsdelf.mh: Likewise.
* config/i386/nto.mh: Likewise.
* config/i386/obsd.mh: Likewise.
* config/i386/obsd64.mh: Likewise.
* config/i386/sol2-64.mh: Likewise.
* config/ia64/linux.mh: Likewise.
* config/m32r/linux.mh: Likewise.
* config/m68k/linux.mh: Likewise.
* config/m68k/nbsdelf.mh: Likewise.
* config/m68k/obsd.mh: Likewise.
* config/m88k/obsd.mh: Likewise.
* config/mips/fbsd.mh: Likewise.
* config/mips/linux.mh: Likewise.
* config/mips/nbsd.mh: Likewise.
* config/mips/obsd64.mh: Likewise.
* config/pa/linux.mh: Likewise.
* config/pa/nbsd.mh: Likewise.
* config/pa/obsd.mh: Likewise.
* config/powerpc/aix.mh: Likewise.
* config/powerpc/fbsd.mh: Likewise.
* config/powerpc/linux.mh: Likewise.
* config/powerpc/nbsd.mh: Likewise.
* config/powerpc/obsd.mh: Likewise.
* config/powerpc/ppc64-linux.mh: Likewise.
* config/powerpc/spu-linux.mh: Likewise.
* config/s390/linux.mh: Likewise.
* config/sh/nbsd.mh: Likewise.
* config/sparc/fbsd.mh: Likewise.
* config/sparc/linux.mh: Likewise.
* config/sparc/linux64.mh: Likewise.
* config/sparc/nbsd64.mh: Likewise.
* config/sparc/nbsdelf.mh: Likewise.
* config/sparc/obsd64.mh: Likewise.
* config/sparc/sol2.mh: Likewise.
* config/tilegx/linux.mh: Likewise.
* config/vax/nbsdelf.mh: Likewise.
* config/vax/obsd.mh: Likewise.
* config/xtensa/linux.mh: Likewise.
* config/i386/i386gnu.mn: New file, with excerpts from
"config/i386/i386gnu.mh".
* configure: Regenerate.
* configure.ac: Rewrite code to use "gdb/configure.nat" instead of
*.mh files under "gdb/config".
* configure.nat: New file, with contents from the
"gdb/config/*/*.mh" files.
gdb/doc/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile: Remove "@host_makefile_frag@".
2017-04-26 04:03:39 +08:00
|
|
|
NAT_CDEPS='$(srcdir)/proc-service.list'
|
|
|
|
LOADLIBES='-ldl $(RDYNAMIC)'
|
|
|
|
;;
|
2017-05-03 09:32:33 +08:00
|
|
|
fbsd*)
|
2018-12-25 03:01:34 +08:00
|
|
|
NATDEPFILES='fork-child.o nat/fork-inferior.o inf-ptrace.o fbsd-nat.o'
|
2017-05-03 09:32:33 +08:00
|
|
|
HAVE_NATIVE_GCORE_HOST=1
|
Introduce "gdb/configure.nat" (and delete "gdb/config/*/*.mh" files)
Due to my ongoing work to make it possible for gdbserver to start the
inferior using the shell, I had to share the fork_inferior function
under the "nat/" directory. In order to do that, I created a new file
and put the function there; however, this meant that I now had to
update some of the *.mh files (under "gdb/config") and add the new
file as a dependency to be built natively. Bleh...
After talking a bit to Pedro about this, the idea came up to write a
new "gdb/configure.nat" file, a la "gdb/configure.tgt", which would
concentrate all of the native settings for each host/system. I
decided to tackle this issue.
The patch is simple. All of the previous Makefile variables that were
being declared inside the *.mh files are now inside "gdb/Makefile.in",
and "gdb/configure" is responsible for AC_SUBST'ing them. The
definitions of these variables were put inside "gdb/configure.nat", so
now they're shell variables. For excerpts of Makefile code, one must
create a file under "gdb/config/${gdb_cpu_host}" and reference it on
the "nat_extra_makefile_frag" variable.
It should now be easier to update the native dependencies of hosts in
this single file.
This has been tested on x86_64 without regressions.
gdb/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in: Remove "@host_makefile_frag@". Add variables
NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
"@nat_extra_makefile_frag@".
(Makefile): Remove dependency on "@frags@".
($(GNULIB_BUILDDIR)/Makefile): Likewise.
(data-directory/Makefile): Likewise.
* config/aarch64/linux.mh: Deleted; moved contents to
"gdb/configure.nat".
* config/alpha/alpha-linux.mh: Likewise.
* config/alpha/nbsd.mh: Likewise.
* config/arm/linux.mh: Likewise.
* config/arm/nbsdelf.mh: Likewise.
* config/i386/cygwin.mh: Likewise.
* config/i386/cygwin64.mh: Likewise.
* config/i386/darwin.mh: Likewise.
* config/i386/fbsd.mh: Likewise.
* config/i386/fbsd64.mh: Likewise.
* config/i386/go32.mh: Likewise.
* config/i386/i386gnu.mh: Likewise.
* config/i386/i386sol2.mh: Likewise.
* config/i386/linux.mh: Likewise.
* config/i386/linux64.mh: Likewise.
* config/i386/mingw.mh: Likewise.
* config/i386/mingw64.mh: Likewise.
* config/i386/nbsd64.mh: Likewise.
* config/i386/nbsdelf.mh: Likewise.
* config/i386/nto.mh: Likewise.
* config/i386/obsd.mh: Likewise.
* config/i386/obsd64.mh: Likewise.
* config/i386/sol2-64.mh: Likewise.
* config/ia64/linux.mh: Likewise.
* config/m32r/linux.mh: Likewise.
* config/m68k/linux.mh: Likewise.
* config/m68k/nbsdelf.mh: Likewise.
* config/m68k/obsd.mh: Likewise.
* config/m88k/obsd.mh: Likewise.
* config/mips/fbsd.mh: Likewise.
* config/mips/linux.mh: Likewise.
* config/mips/nbsd.mh: Likewise.
* config/mips/obsd64.mh: Likewise.
* config/pa/linux.mh: Likewise.
* config/pa/nbsd.mh: Likewise.
* config/pa/obsd.mh: Likewise.
* config/powerpc/aix.mh: Likewise.
* config/powerpc/fbsd.mh: Likewise.
* config/powerpc/linux.mh: Likewise.
* config/powerpc/nbsd.mh: Likewise.
* config/powerpc/obsd.mh: Likewise.
* config/powerpc/ppc64-linux.mh: Likewise.
* config/powerpc/spu-linux.mh: Likewise.
* config/s390/linux.mh: Likewise.
* config/sh/nbsd.mh: Likewise.
* config/sparc/fbsd.mh: Likewise.
* config/sparc/linux.mh: Likewise.
* config/sparc/linux64.mh: Likewise.
* config/sparc/nbsd64.mh: Likewise.
* config/sparc/nbsdelf.mh: Likewise.
* config/sparc/obsd64.mh: Likewise.
* config/sparc/sol2.mh: Likewise.
* config/tilegx/linux.mh: Likewise.
* config/vax/nbsdelf.mh: Likewise.
* config/vax/obsd.mh: Likewise.
* config/xtensa/linux.mh: Likewise.
* config/i386/i386gnu.mn: New file, with excerpts from
"config/i386/i386gnu.mh".
* configure: Regenerate.
* configure.ac: Rewrite code to use "gdb/configure.nat" instead of
*.mh files under "gdb/config".
* configure.nat: New file, with contents from the
"gdb/config/*/*.mh" files.
gdb/doc/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile: Remove "@host_makefile_frag@".
2017-04-26 04:03:39 +08:00
|
|
|
LOADLIBES='-lkvm'
|
|
|
|
;;
|
2017-05-03 09:32:33 +08:00
|
|
|
nbsd*)
|
2020-09-03 01:02:13 +08:00
|
|
|
NATDEPFILES='fork-child.o nat/fork-inferior.o nat/netbsd-nat.o inf-ptrace.o'
|
2017-09-07 00:33:46 +08:00
|
|
|
HAVE_NATIVE_GCORE_HOST=1
|
Introduce "gdb/configure.nat" (and delete "gdb/config/*/*.mh" files)
Due to my ongoing work to make it possible for gdbserver to start the
inferior using the shell, I had to share the fork_inferior function
under the "nat/" directory. In order to do that, I created a new file
and put the function there; however, this meant that I now had to
update some of the *.mh files (under "gdb/config") and add the new
file as a dependency to be built natively. Bleh...
After talking a bit to Pedro about this, the idea came up to write a
new "gdb/configure.nat" file, a la "gdb/configure.tgt", which would
concentrate all of the native settings for each host/system. I
decided to tackle this issue.
The patch is simple. All of the previous Makefile variables that were
being declared inside the *.mh files are now inside "gdb/Makefile.in",
and "gdb/configure" is responsible for AC_SUBST'ing them. The
definitions of these variables were put inside "gdb/configure.nat", so
now they're shell variables. For excerpts of Makefile code, one must
create a file under "gdb/config/${gdb_cpu_host}" and reference it on
the "nat_extra_makefile_frag" variable.
It should now be easier to update the native dependencies of hosts in
this single file.
This has been tested on x86_64 without regressions.
gdb/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in: Remove "@host_makefile_frag@". Add variables
NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
"@nat_extra_makefile_frag@".
(Makefile): Remove dependency on "@frags@".
($(GNULIB_BUILDDIR)/Makefile): Likewise.
(data-directory/Makefile): Likewise.
* config/aarch64/linux.mh: Deleted; moved contents to
"gdb/configure.nat".
* config/alpha/alpha-linux.mh: Likewise.
* config/alpha/nbsd.mh: Likewise.
* config/arm/linux.mh: Likewise.
* config/arm/nbsdelf.mh: Likewise.
* config/i386/cygwin.mh: Likewise.
* config/i386/cygwin64.mh: Likewise.
* config/i386/darwin.mh: Likewise.
* config/i386/fbsd.mh: Likewise.
* config/i386/fbsd64.mh: Likewise.
* config/i386/go32.mh: Likewise.
* config/i386/i386gnu.mh: Likewise.
* config/i386/i386sol2.mh: Likewise.
* config/i386/linux.mh: Likewise.
* config/i386/linux64.mh: Likewise.
* config/i386/mingw.mh: Likewise.
* config/i386/mingw64.mh: Likewise.
* config/i386/nbsd64.mh: Likewise.
* config/i386/nbsdelf.mh: Likewise.
* config/i386/nto.mh: Likewise.
* config/i386/obsd.mh: Likewise.
* config/i386/obsd64.mh: Likewise.
* config/i386/sol2-64.mh: Likewise.
* config/ia64/linux.mh: Likewise.
* config/m32r/linux.mh: Likewise.
* config/m68k/linux.mh: Likewise.
* config/m68k/nbsdelf.mh: Likewise.
* config/m68k/obsd.mh: Likewise.
* config/m88k/obsd.mh: Likewise.
* config/mips/fbsd.mh: Likewise.
* config/mips/linux.mh: Likewise.
* config/mips/nbsd.mh: Likewise.
* config/mips/obsd64.mh: Likewise.
* config/pa/linux.mh: Likewise.
* config/pa/nbsd.mh: Likewise.
* config/pa/obsd.mh: Likewise.
* config/powerpc/aix.mh: Likewise.
* config/powerpc/fbsd.mh: Likewise.
* config/powerpc/linux.mh: Likewise.
* config/powerpc/nbsd.mh: Likewise.
* config/powerpc/obsd.mh: Likewise.
* config/powerpc/ppc64-linux.mh: Likewise.
* config/powerpc/spu-linux.mh: Likewise.
* config/s390/linux.mh: Likewise.
* config/sh/nbsd.mh: Likewise.
* config/sparc/fbsd.mh: Likewise.
* config/sparc/linux.mh: Likewise.
* config/sparc/linux64.mh: Likewise.
* config/sparc/nbsd64.mh: Likewise.
* config/sparc/nbsdelf.mh: Likewise.
* config/sparc/obsd64.mh: Likewise.
* config/sparc/sol2.mh: Likewise.
* config/tilegx/linux.mh: Likewise.
* config/vax/nbsdelf.mh: Likewise.
* config/vax/obsd.mh: Likewise.
* config/xtensa/linux.mh: Likewise.
* config/i386/i386gnu.mn: New file, with excerpts from
"config/i386/i386gnu.mh".
* configure: Regenerate.
* configure.ac: Rewrite code to use "gdb/configure.nat" instead of
*.mh files under "gdb/config".
* configure.nat: New file, with contents from the
"gdb/config/*/*.mh" files.
gdb/doc/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile: Remove "@host_makefile_frag@".
2017-04-26 04:03:39 +08:00
|
|
|
;;
|
2017-05-03 09:32:33 +08:00
|
|
|
obsd*)
|
2018-12-25 03:01:34 +08:00
|
|
|
NATDEPFILES='fork-child.o nat/fork-inferior.o inf-ptrace.o'
|
Introduce "gdb/configure.nat" (and delete "gdb/config/*/*.mh" files)
Due to my ongoing work to make it possible for gdbserver to start the
inferior using the shell, I had to share the fork_inferior function
under the "nat/" directory. In order to do that, I created a new file
and put the function there; however, this meant that I now had to
update some of the *.mh files (under "gdb/config") and add the new
file as a dependency to be built natively. Bleh...
After talking a bit to Pedro about this, the idea came up to write a
new "gdb/configure.nat" file, a la "gdb/configure.tgt", which would
concentrate all of the native settings for each host/system. I
decided to tackle this issue.
The patch is simple. All of the previous Makefile variables that were
being declared inside the *.mh files are now inside "gdb/Makefile.in",
and "gdb/configure" is responsible for AC_SUBST'ing them. The
definitions of these variables were put inside "gdb/configure.nat", so
now they're shell variables. For excerpts of Makefile code, one must
create a file under "gdb/config/${gdb_cpu_host}" and reference it on
the "nat_extra_makefile_frag" variable.
It should now be easier to update the native dependencies of hosts in
this single file.
This has been tested on x86_64 without regressions.
gdb/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in: Remove "@host_makefile_frag@". Add variables
NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
"@nat_extra_makefile_frag@".
(Makefile): Remove dependency on "@frags@".
($(GNULIB_BUILDDIR)/Makefile): Likewise.
(data-directory/Makefile): Likewise.
* config/aarch64/linux.mh: Deleted; moved contents to
"gdb/configure.nat".
* config/alpha/alpha-linux.mh: Likewise.
* config/alpha/nbsd.mh: Likewise.
* config/arm/linux.mh: Likewise.
* config/arm/nbsdelf.mh: Likewise.
* config/i386/cygwin.mh: Likewise.
* config/i386/cygwin64.mh: Likewise.
* config/i386/darwin.mh: Likewise.
* config/i386/fbsd.mh: Likewise.
* config/i386/fbsd64.mh: Likewise.
* config/i386/go32.mh: Likewise.
* config/i386/i386gnu.mh: Likewise.
* config/i386/i386sol2.mh: Likewise.
* config/i386/linux.mh: Likewise.
* config/i386/linux64.mh: Likewise.
* config/i386/mingw.mh: Likewise.
* config/i386/mingw64.mh: Likewise.
* config/i386/nbsd64.mh: Likewise.
* config/i386/nbsdelf.mh: Likewise.
* config/i386/nto.mh: Likewise.
* config/i386/obsd.mh: Likewise.
* config/i386/obsd64.mh: Likewise.
* config/i386/sol2-64.mh: Likewise.
* config/ia64/linux.mh: Likewise.
* config/m32r/linux.mh: Likewise.
* config/m68k/linux.mh: Likewise.
* config/m68k/nbsdelf.mh: Likewise.
* config/m68k/obsd.mh: Likewise.
* config/m88k/obsd.mh: Likewise.
* config/mips/fbsd.mh: Likewise.
* config/mips/linux.mh: Likewise.
* config/mips/nbsd.mh: Likewise.
* config/mips/obsd64.mh: Likewise.
* config/pa/linux.mh: Likewise.
* config/pa/nbsd.mh: Likewise.
* config/pa/obsd.mh: Likewise.
* config/powerpc/aix.mh: Likewise.
* config/powerpc/fbsd.mh: Likewise.
* config/powerpc/linux.mh: Likewise.
* config/powerpc/nbsd.mh: Likewise.
* config/powerpc/obsd.mh: Likewise.
* config/powerpc/ppc64-linux.mh: Likewise.
* config/powerpc/spu-linux.mh: Likewise.
* config/s390/linux.mh: Likewise.
* config/sh/nbsd.mh: Likewise.
* config/sparc/fbsd.mh: Likewise.
* config/sparc/linux.mh: Likewise.
* config/sparc/linux64.mh: Likewise.
* config/sparc/nbsd64.mh: Likewise.
* config/sparc/nbsdelf.mh: Likewise.
* config/sparc/obsd64.mh: Likewise.
* config/sparc/sol2.mh: Likewise.
* config/tilegx/linux.mh: Likewise.
* config/vax/nbsdelf.mh: Likewise.
* config/vax/obsd.mh: Likewise.
* config/xtensa/linux.mh: Likewise.
* config/i386/i386gnu.mn: New file, with excerpts from
"config/i386/i386gnu.mh".
* configure: Regenerate.
* configure.ac: Rewrite code to use "gdb/configure.nat" instead of
*.mh files under "gdb/config".
* configure.nat: New file, with contents from the
"gdb/config/*/*.mh" files.
gdb/doc/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile: Remove "@host_makefile_frag@".
2017-04-26 04:03:39 +08:00
|
|
|
;;
|
2017-05-03 09:32:33 +08:00
|
|
|
cygwin*)
|
2020-04-09 04:33:35 +08:00
|
|
|
NATDEPFILES='x86-nat.o nat/x86-dregs.o windows-nat.o nat/windows-nat.o'
|
Introduce "gdb/configure.nat" (and delete "gdb/config/*/*.mh" files)
Due to my ongoing work to make it possible for gdbserver to start the
inferior using the shell, I had to share the fork_inferior function
under the "nat/" directory. In order to do that, I created a new file
and put the function there; however, this meant that I now had to
update some of the *.mh files (under "gdb/config") and add the new
file as a dependency to be built natively. Bleh...
After talking a bit to Pedro about this, the idea came up to write a
new "gdb/configure.nat" file, a la "gdb/configure.tgt", which would
concentrate all of the native settings for each host/system. I
decided to tackle this issue.
The patch is simple. All of the previous Makefile variables that were
being declared inside the *.mh files are now inside "gdb/Makefile.in",
and "gdb/configure" is responsible for AC_SUBST'ing them. The
definitions of these variables were put inside "gdb/configure.nat", so
now they're shell variables. For excerpts of Makefile code, one must
create a file under "gdb/config/${gdb_cpu_host}" and reference it on
the "nat_extra_makefile_frag" variable.
It should now be easier to update the native dependencies of hosts in
this single file.
This has been tested on x86_64 without regressions.
gdb/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in: Remove "@host_makefile_frag@". Add variables
NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
"@nat_extra_makefile_frag@".
(Makefile): Remove dependency on "@frags@".
($(GNULIB_BUILDDIR)/Makefile): Likewise.
(data-directory/Makefile): Likewise.
* config/aarch64/linux.mh: Deleted; moved contents to
"gdb/configure.nat".
* config/alpha/alpha-linux.mh: Likewise.
* config/alpha/nbsd.mh: Likewise.
* config/arm/linux.mh: Likewise.
* config/arm/nbsdelf.mh: Likewise.
* config/i386/cygwin.mh: Likewise.
* config/i386/cygwin64.mh: Likewise.
* config/i386/darwin.mh: Likewise.
* config/i386/fbsd.mh: Likewise.
* config/i386/fbsd64.mh: Likewise.
* config/i386/go32.mh: Likewise.
* config/i386/i386gnu.mh: Likewise.
* config/i386/i386sol2.mh: Likewise.
* config/i386/linux.mh: Likewise.
* config/i386/linux64.mh: Likewise.
* config/i386/mingw.mh: Likewise.
* config/i386/mingw64.mh: Likewise.
* config/i386/nbsd64.mh: Likewise.
* config/i386/nbsdelf.mh: Likewise.
* config/i386/nto.mh: Likewise.
* config/i386/obsd.mh: Likewise.
* config/i386/obsd64.mh: Likewise.
* config/i386/sol2-64.mh: Likewise.
* config/ia64/linux.mh: Likewise.
* config/m32r/linux.mh: Likewise.
* config/m68k/linux.mh: Likewise.
* config/m68k/nbsdelf.mh: Likewise.
* config/m68k/obsd.mh: Likewise.
* config/m88k/obsd.mh: Likewise.
* config/mips/fbsd.mh: Likewise.
* config/mips/linux.mh: Likewise.
* config/mips/nbsd.mh: Likewise.
* config/mips/obsd64.mh: Likewise.
* config/pa/linux.mh: Likewise.
* config/pa/nbsd.mh: Likewise.
* config/pa/obsd.mh: Likewise.
* config/powerpc/aix.mh: Likewise.
* config/powerpc/fbsd.mh: Likewise.
* config/powerpc/linux.mh: Likewise.
* config/powerpc/nbsd.mh: Likewise.
* config/powerpc/obsd.mh: Likewise.
* config/powerpc/ppc64-linux.mh: Likewise.
* config/powerpc/spu-linux.mh: Likewise.
* config/s390/linux.mh: Likewise.
* config/sh/nbsd.mh: Likewise.
* config/sparc/fbsd.mh: Likewise.
* config/sparc/linux.mh: Likewise.
* config/sparc/linux64.mh: Likewise.
* config/sparc/nbsd64.mh: Likewise.
* config/sparc/nbsdelf.mh: Likewise.
* config/sparc/obsd64.mh: Likewise.
* config/sparc/sol2.mh: Likewise.
* config/tilegx/linux.mh: Likewise.
* config/vax/nbsdelf.mh: Likewise.
* config/vax/obsd.mh: Likewise.
* config/xtensa/linux.mh: Likewise.
* config/i386/i386gnu.mn: New file, with excerpts from
"config/i386/i386gnu.mh".
* configure: Regenerate.
* configure.ac: Rewrite code to use "gdb/configure.nat" instead of
*.mh files under "gdb/config".
* configure.nat: New file, with contents from the
"gdb/config/*/*.mh" files.
gdb/doc/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile: Remove "@host_makefile_frag@".
2017-04-26 04:03:39 +08:00
|
|
|
;;
|
2017-05-03 09:32:33 +08:00
|
|
|
mingw*)
|
2020-04-09 04:33:35 +08:00
|
|
|
NATDEPFILES='x86-nat.o nat/x86-dregs.o windows-nat.o nat/windows-nat.o'
|
Introduce "gdb/configure.nat" (and delete "gdb/config/*/*.mh" files)
Due to my ongoing work to make it possible for gdbserver to start the
inferior using the shell, I had to share the fork_inferior function
under the "nat/" directory. In order to do that, I created a new file
and put the function there; however, this meant that I now had to
update some of the *.mh files (under "gdb/config") and add the new
file as a dependency to be built natively. Bleh...
After talking a bit to Pedro about this, the idea came up to write a
new "gdb/configure.nat" file, a la "gdb/configure.tgt", which would
concentrate all of the native settings for each host/system. I
decided to tackle this issue.
The patch is simple. All of the previous Makefile variables that were
being declared inside the *.mh files are now inside "gdb/Makefile.in",
and "gdb/configure" is responsible for AC_SUBST'ing them. The
definitions of these variables were put inside "gdb/configure.nat", so
now they're shell variables. For excerpts of Makefile code, one must
create a file under "gdb/config/${gdb_cpu_host}" and reference it on
the "nat_extra_makefile_frag" variable.
It should now be easier to update the native dependencies of hosts in
this single file.
This has been tested on x86_64 without regressions.
gdb/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in: Remove "@host_makefile_frag@". Add variables
NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
"@nat_extra_makefile_frag@".
(Makefile): Remove dependency on "@frags@".
($(GNULIB_BUILDDIR)/Makefile): Likewise.
(data-directory/Makefile): Likewise.
* config/aarch64/linux.mh: Deleted; moved contents to
"gdb/configure.nat".
* config/alpha/alpha-linux.mh: Likewise.
* config/alpha/nbsd.mh: Likewise.
* config/arm/linux.mh: Likewise.
* config/arm/nbsdelf.mh: Likewise.
* config/i386/cygwin.mh: Likewise.
* config/i386/cygwin64.mh: Likewise.
* config/i386/darwin.mh: Likewise.
* config/i386/fbsd.mh: Likewise.
* config/i386/fbsd64.mh: Likewise.
* config/i386/go32.mh: Likewise.
* config/i386/i386gnu.mh: Likewise.
* config/i386/i386sol2.mh: Likewise.
* config/i386/linux.mh: Likewise.
* config/i386/linux64.mh: Likewise.
* config/i386/mingw.mh: Likewise.
* config/i386/mingw64.mh: Likewise.
* config/i386/nbsd64.mh: Likewise.
* config/i386/nbsdelf.mh: Likewise.
* config/i386/nto.mh: Likewise.
* config/i386/obsd.mh: Likewise.
* config/i386/obsd64.mh: Likewise.
* config/i386/sol2-64.mh: Likewise.
* config/ia64/linux.mh: Likewise.
* config/m32r/linux.mh: Likewise.
* config/m68k/linux.mh: Likewise.
* config/m68k/nbsdelf.mh: Likewise.
* config/m68k/obsd.mh: Likewise.
* config/m88k/obsd.mh: Likewise.
* config/mips/fbsd.mh: Likewise.
* config/mips/linux.mh: Likewise.
* config/mips/nbsd.mh: Likewise.
* config/mips/obsd64.mh: Likewise.
* config/pa/linux.mh: Likewise.
* config/pa/nbsd.mh: Likewise.
* config/pa/obsd.mh: Likewise.
* config/powerpc/aix.mh: Likewise.
* config/powerpc/fbsd.mh: Likewise.
* config/powerpc/linux.mh: Likewise.
* config/powerpc/nbsd.mh: Likewise.
* config/powerpc/obsd.mh: Likewise.
* config/powerpc/ppc64-linux.mh: Likewise.
* config/powerpc/spu-linux.mh: Likewise.
* config/s390/linux.mh: Likewise.
* config/sh/nbsd.mh: Likewise.
* config/sparc/fbsd.mh: Likewise.
* config/sparc/linux.mh: Likewise.
* config/sparc/linux64.mh: Likewise.
* config/sparc/nbsd64.mh: Likewise.
* config/sparc/nbsdelf.mh: Likewise.
* config/sparc/obsd64.mh: Likewise.
* config/sparc/sol2.mh: Likewise.
* config/tilegx/linux.mh: Likewise.
* config/vax/nbsdelf.mh: Likewise.
* config/vax/obsd.mh: Likewise.
* config/xtensa/linux.mh: Likewise.
* config/i386/i386gnu.mn: New file, with excerpts from
"config/i386/i386gnu.mh".
* configure: Regenerate.
* configure.ac: Rewrite code to use "gdb/configure.nat" instead of
*.mh files under "gdb/config".
* configure.nat: New file, with contents from the
"gdb/config/*/*.mh" files.
gdb/doc/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile: Remove "@host_makefile_frag@".
2017-04-26 04:03:39 +08:00
|
|
|
;;
|
aix: Add fork-inferior.o to NATDEPFILES
Trying to build on AIX gives:
ld: 0711-317 ERROR: Undefined symbol: .trace_start_error_with_name(char const*)
ld: 0711-317 ERROR: Undefined symbol: .fork_inferior(char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char**, void (*)(), void (*)(int), void (*)(), char const*, void (*)(char const*, char* const*, char* const*))
ld: 0711-317 ERROR: Undefined symbol: .startup_inferior(int, int, target_waitstatus*, ptid_t*)
Including fork-inferior.o in the build should help. I also factored out
the AIX bits that are not architecture-specific to be consistent with the other
OSes.
gdb/ChangeLog:
* configure.nat: Factor out AIX bits that are not
architecture-specific. Add fork-inferior.o.
2017-06-14 03:14:25 +08:00
|
|
|
aix)
|
2018-12-25 03:01:34 +08:00
|
|
|
NATDEPFILES='nat/fork-inferior.o fork-child.o inf-ptrace.o'
|
aix: Add fork-inferior.o to NATDEPFILES
Trying to build on AIX gives:
ld: 0711-317 ERROR: Undefined symbol: .trace_start_error_with_name(char const*)
ld: 0711-317 ERROR: Undefined symbol: .fork_inferior(char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char**, void (*)(), void (*)(int), void (*)(), char const*, void (*)(char const*, char* const*, char* const*))
ld: 0711-317 ERROR: Undefined symbol: .startup_inferior(int, int, target_waitstatus*, ptid_t*)
Including fork-inferior.o in the build should help. I also factored out
the AIX bits that are not architecture-specific to be consistent with the other
OSes.
gdb/ChangeLog:
* configure.nat: Factor out AIX bits that are not
architecture-specific. Add fork-inferior.o.
2017-06-14 03:14:25 +08:00
|
|
|
;;
|
darwin: Add fork-inferior.o to NATDEPFILES
I happened to be build-testing on macOS and found this:
Undefined symbols for architecture x86_64:
"fork_inferior(char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char**, void (*)(), void (*)(int), void (*)(), char const*, void (*)(char const*, char* const*, char* const*))", referenced from:
darwin_create_inferior(target_ops*, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char**, int) in darwin-nat.o
"startup_inferior(int, int, target_waitstatus*, ptid_t*)", referenced from:
gdb_startup_inferior(int, int) in fork-child.o
"trace_start_error(char const*, ...)", referenced from:
darwin_ptrace_me() in darwin-nat.o
"trace_start_error_with_name(char const*)", referenced from:
darwin_ptrace_me() in darwin-nat.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Adding fork-inferior.o fixes it. I factored out the Darwin bits that
are no architecture-specific in the section meant for that at the top.
I only built-tested this using Travis-CI, since I don't have access to
this platform.
gdb/ChangeLog:
* configure.nat: Factor out Darwin bits that are not
architecture-specific. Add fork-inferior.o.
2017-06-14 03:14:35 +08:00
|
|
|
darwin)
|
2018-12-25 03:01:34 +08:00
|
|
|
NATDEPFILES='fork-child.o nat/fork-inferior.o darwin-nat.o \
|
darwin: Add fork-inferior.o to NATDEPFILES
I happened to be build-testing on macOS and found this:
Undefined symbols for architecture x86_64:
"fork_inferior(char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char**, void (*)(), void (*)(int), void (*)(), char const*, void (*)(char const*, char* const*, char* const*))", referenced from:
darwin_create_inferior(target_ops*, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char**, int) in darwin-nat.o
"startup_inferior(int, int, target_waitstatus*, ptid_t*)", referenced from:
gdb_startup_inferior(int, int) in fork-child.o
"trace_start_error(char const*, ...)", referenced from:
darwin_ptrace_me() in darwin-nat.o
"trace_start_error_with_name(char const*)", referenced from:
darwin_ptrace_me() in darwin-nat.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Adding fork-inferior.o fixes it. I factored out the Darwin bits that
are no architecture-specific in the section meant for that at the top.
I only built-tested this using Travis-CI, since I don't have access to
this platform.
gdb/ChangeLog:
* configure.nat: Factor out Darwin bits that are not
architecture-specific. Add fork-inferior.o.
2017-06-14 03:14:35 +08:00
|
|
|
darwin-nat-info.o'
|
Remove support for Solaris < 10 (PR gdb/22185)
Given that GCC has obsoleted/removed support for Solaris 9 in GCC 4.9/5 in 2013:
https://gcc.gnu.org/gcc-4.9/changes.html
https://gcc.gnu.org/ml/gcc-patches/2013-05/msg00728.html
and the last gdb version that can be compiled with gcc 4.9 is 7.12.1 only when
configured with --disable-build-with-cxx, it's time to obsolete/remove support
for Solaris < 10.
This patch does this, simplifying configure.nat along the way (only a single
sol2 configuration with variants for i386 and sparc).
Some configure checks for older Solaris versions can go, too, and the check
for libthread_db.so.1 removed:
* Since Solaris 10, dlopen has moved to libc and libdl.so is just a
filter on ld.so.1, so no need to check.
* $RDYNAMIC is already handled above (and is a no-op with Solaris ld
anyway).
Both proc-service.c and sol-thread.c lose support for (Solaris-only)
PROC_SERVICE_IS_OLD.
The attached revised patch has been tested on sparcv9-sun-solaris2.10,
sparcv9-sun-solaris2.11.4, amd64-pc-solaris2.10, amd64-pc-solaris2.11.4,
and x86_64-pc-linux-gnu.
I've also started an i386-pc-solaris2.9 build to check that it really
stops as expected.
PR gdb/22185
* configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
obsolete.
Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
Remove i386sol2 support.
* configure.nat <i386sol2>: Remove.
<sol2-64>: Fold into ...
<sol2>: ... this.
Move common settings to default section.
Add sol-thread.o.
* configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
x86_64-*-solaris2.1[0-9]*>: Rename to ...
<i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
<i[34567]86-*-solaris*>: Remove.
<sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
* configure.ac: Remove wctype in libw check.
(_MSE_INT_H): Don't define on Solaris 7-9.
<solaris*>: Remove libthread_db.so.1 check.
* configure: Regenerate.
* config.in: Regenerate.
* proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
(gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
(gdb_ps_size_t): Remove.
Use base types in users.
* sol-thread.c: Likewise, also for gdb_ps_addr_t.
* NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
2017-09-26 21:19:10 +08:00
|
|
|
;;
|
|
|
|
sol2)
|
2018-12-25 03:01:34 +08:00
|
|
|
NATDEPFILES='fork-child.o nat/fork-inferior.o \
|
Remove support for Solaris < 10 (PR gdb/22185)
Given that GCC has obsoleted/removed support for Solaris 9 in GCC 4.9/5 in 2013:
https://gcc.gnu.org/gcc-4.9/changes.html
https://gcc.gnu.org/ml/gcc-patches/2013-05/msg00728.html
and the last gdb version that can be compiled with gcc 4.9 is 7.12.1 only when
configured with --disable-build-with-cxx, it's time to obsolete/remove support
for Solaris < 10.
This patch does this, simplifying configure.nat along the way (only a single
sol2 configuration with variants for i386 and sparc).
Some configure checks for older Solaris versions can go, too, and the check
for libthread_db.so.1 removed:
* Since Solaris 10, dlopen has moved to libc and libdl.so is just a
filter on ld.so.1, so no need to check.
* $RDYNAMIC is already handled above (and is a no-op with Solaris ld
anyway).
Both proc-service.c and sol-thread.c lose support for (Solaris-only)
PROC_SERVICE_IS_OLD.
The attached revised patch has been tested on sparcv9-sun-solaris2.10,
sparcv9-sun-solaris2.11.4, amd64-pc-solaris2.10, amd64-pc-solaris2.11.4,
and x86_64-pc-linux-gnu.
I've also started an i386-pc-solaris2.9 build to check that it really
stops as expected.
PR gdb/22185
* configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
obsolete.
Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
Remove i386sol2 support.
* configure.nat <i386sol2>: Remove.
<sol2-64>: Fold into ...
<sol2>: ... this.
Move common settings to default section.
Add sol-thread.o.
* configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
x86_64-*-solaris2.1[0-9]*>: Rename to ...
<i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
<i[34567]86-*-solaris*>: Remove.
<sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
* configure.ac: Remove wctype in libw check.
(_MSE_INT_H): Don't define on Solaris 7-9.
<solaris*>: Remove libthread_db.so.1 check.
* configure: Regenerate.
* config.in: Regenerate.
* proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
(gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
(gdb_ps_size_t): Remove.
Use base types in users.
* sol-thread.c: Likewise, also for gdb_ps_addr_t.
* NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
2017-09-26 21:19:10 +08:00
|
|
|
procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o \
|
|
|
|
sol-thread.o'
|
|
|
|
HAVE_NATIVE_GCORE_HOST=1
|
darwin: Add fork-inferior.o to NATDEPFILES
I happened to be build-testing on macOS and found this:
Undefined symbols for architecture x86_64:
"fork_inferior(char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char**, void (*)(), void (*)(int), void (*)(), char const*, void (*)(char const*, char* const*, char* const*))", referenced from:
darwin_create_inferior(target_ops*, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char**, int) in darwin-nat.o
"startup_inferior(int, int, target_waitstatus*, ptid_t*)", referenced from:
gdb_startup_inferior(int, int) in fork-child.o
"trace_start_error(char const*, ...)", referenced from:
darwin_ptrace_me() in darwin-nat.o
"trace_start_error_with_name(char const*)", referenced from:
darwin_ptrace_me() in darwin-nat.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Adding fork-inferior.o fixes it. I factored out the Darwin bits that
are no architecture-specific in the section meant for that at the top.
I only built-tested this using Travis-CI, since I don't have access to
this platform.
gdb/ChangeLog:
* configure.nat: Factor out Darwin bits that are not
architecture-specific. Add fork-inferior.o.
2017-06-14 03:14:35 +08:00
|
|
|
;;
|
2017-05-03 09:32:33 +08:00
|
|
|
esac
|
Introduce "gdb/configure.nat" (and delete "gdb/config/*/*.mh" files)
Due to my ongoing work to make it possible for gdbserver to start the
inferior using the shell, I had to share the fork_inferior function
under the "nat/" directory. In order to do that, I created a new file
and put the function there; however, this meant that I now had to
update some of the *.mh files (under "gdb/config") and add the new
file as a dependency to be built natively. Bleh...
After talking a bit to Pedro about this, the idea came up to write a
new "gdb/configure.nat" file, a la "gdb/configure.tgt", which would
concentrate all of the native settings for each host/system. I
decided to tackle this issue.
The patch is simple. All of the previous Makefile variables that were
being declared inside the *.mh files are now inside "gdb/Makefile.in",
and "gdb/configure" is responsible for AC_SUBST'ing them. The
definitions of these variables were put inside "gdb/configure.nat", so
now they're shell variables. For excerpts of Makefile code, one must
create a file under "gdb/config/${gdb_cpu_host}" and reference it on
the "nat_extra_makefile_frag" variable.
It should now be easier to update the native dependencies of hosts in
this single file.
This has been tested on x86_64 without regressions.
gdb/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in: Remove "@host_makefile_frag@". Add variables
NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
"@nat_extra_makefile_frag@".
(Makefile): Remove dependency on "@frags@".
($(GNULIB_BUILDDIR)/Makefile): Likewise.
(data-directory/Makefile): Likewise.
* config/aarch64/linux.mh: Deleted; moved contents to
"gdb/configure.nat".
* config/alpha/alpha-linux.mh: Likewise.
* config/alpha/nbsd.mh: Likewise.
* config/arm/linux.mh: Likewise.
* config/arm/nbsdelf.mh: Likewise.
* config/i386/cygwin.mh: Likewise.
* config/i386/cygwin64.mh: Likewise.
* config/i386/darwin.mh: Likewise.
* config/i386/fbsd.mh: Likewise.
* config/i386/fbsd64.mh: Likewise.
* config/i386/go32.mh: Likewise.
* config/i386/i386gnu.mh: Likewise.
* config/i386/i386sol2.mh: Likewise.
* config/i386/linux.mh: Likewise.
* config/i386/linux64.mh: Likewise.
* config/i386/mingw.mh: Likewise.
* config/i386/mingw64.mh: Likewise.
* config/i386/nbsd64.mh: Likewise.
* config/i386/nbsdelf.mh: Likewise.
* config/i386/nto.mh: Likewise.
* config/i386/obsd.mh: Likewise.
* config/i386/obsd64.mh: Likewise.
* config/i386/sol2-64.mh: Likewise.
* config/ia64/linux.mh: Likewise.
* config/m32r/linux.mh: Likewise.
* config/m68k/linux.mh: Likewise.
* config/m68k/nbsdelf.mh: Likewise.
* config/m68k/obsd.mh: Likewise.
* config/m88k/obsd.mh: Likewise.
* config/mips/fbsd.mh: Likewise.
* config/mips/linux.mh: Likewise.
* config/mips/nbsd.mh: Likewise.
* config/mips/obsd64.mh: Likewise.
* config/pa/linux.mh: Likewise.
* config/pa/nbsd.mh: Likewise.
* config/pa/obsd.mh: Likewise.
* config/powerpc/aix.mh: Likewise.
* config/powerpc/fbsd.mh: Likewise.
* config/powerpc/linux.mh: Likewise.
* config/powerpc/nbsd.mh: Likewise.
* config/powerpc/obsd.mh: Likewise.
* config/powerpc/ppc64-linux.mh: Likewise.
* config/powerpc/spu-linux.mh: Likewise.
* config/s390/linux.mh: Likewise.
* config/sh/nbsd.mh: Likewise.
* config/sparc/fbsd.mh: Likewise.
* config/sparc/linux.mh: Likewise.
* config/sparc/linux64.mh: Likewise.
* config/sparc/nbsd64.mh: Likewise.
* config/sparc/nbsdelf.mh: Likewise.
* config/sparc/obsd64.mh: Likewise.
* config/sparc/sol2.mh: Likewise.
* config/tilegx/linux.mh: Likewise.
* config/vax/nbsdelf.mh: Likewise.
* config/vax/obsd.mh: Likewise.
* config/xtensa/linux.mh: Likewise.
* config/i386/i386gnu.mn: New file, with excerpts from
"config/i386/i386gnu.mh".
* configure: Regenerate.
* configure.ac: Rewrite code to use "gdb/configure.nat" instead of
*.mh files under "gdb/config".
* configure.nat: New file, with contents from the
"gdb/config/*/*.mh" files.
gdb/doc/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile: Remove "@host_makefile_frag@".
2017-04-26 04:03:39 +08:00
|
|
|
|
2017-05-03 09:32:33 +08:00
|
|
|
# This is where we actually filter by host and host CPU.
|
|
|
|
case ${gdb_host} in
|
|
|
|
aix)
|
|
|
|
case ${gdb_host_cpu} in
|
|
|
|
powerpc)
|
|
|
|
# Host: IBM PowerPC running AIX aix-thread.o is not
|
|
|
|
# listed in NATDEPFILES as it is pulled in by
|
|
|
|
# configure.
|
2021-11-16 11:04:20 +08:00
|
|
|
NATDEPFILES="${NATDEPFILES} rs6000-aix-nat.o"
|
2017-05-03 09:32:33 +08:00
|
|
|
|
|
|
|
# When compiled with cc, for debugging, this argument
|
|
|
|
# should be passed. We have no idea who our current
|
|
|
|
# compiler is though, so we skip it.
|
|
|
|
# MH_CFLAGS='-bnodelcsect'
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
alpha-linux)
|
|
|
|
case ${gdb_host_cpu} in
|
|
|
|
alpha)
|
|
|
|
# Host: Little-endian Alpha running Linux
|
2018-05-03 07:37:08 +08:00
|
|
|
NATDEPFILES="${NATDEPFILES} linux-nat-trad.o alpha-linux-nat.o"
|
2017-05-03 09:32:33 +08:00
|
|
|
# doublest.c currently assumes some properties of FP arithmetic
|
|
|
|
# on the host which require this.
|
|
|
|
MH_CFLAGS='-mieee'
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
cygwin)
|
|
|
|
case ${gdb_host_cpu} in
|
|
|
|
i386)
|
|
|
|
# Native config information for GDB on i386
|
|
|
|
# systems running Cygwin.
|
|
|
|
NATDEPFILES="${NATDEPFILES} i386-windows-nat.o"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
cygwin64)
|
|
|
|
case ${gdb_host_cpu} in
|
|
|
|
i386)
|
|
|
|
# Native config information for GDB on amd64
|
|
|
|
# systems running Cygwin.
|
2020-01-27 05:04:04 +08:00
|
|
|
NATDEPFILES="${NATDEPFILES} i386-windows-nat.o amd64-windows-nat.o"
|
2017-05-03 09:32:33 +08:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
darwin)
|
|
|
|
case ${gdb_host_cpu} in
|
|
|
|
i386)
|
|
|
|
# Host: IA86 running Darwin
|
darwin: Add fork-inferior.o to NATDEPFILES
I happened to be build-testing on macOS and found this:
Undefined symbols for architecture x86_64:
"fork_inferior(char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char**, void (*)(), void (*)(int), void (*)(), char const*, void (*)(char const*, char* const*, char* const*))", referenced from:
darwin_create_inferior(target_ops*, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char**, int) in darwin-nat.o
"startup_inferior(int, int, target_waitstatus*, ptid_t*)", referenced from:
gdb_startup_inferior(int, int) in fork-child.o
"trace_start_error(char const*, ...)", referenced from:
darwin_ptrace_me() in darwin-nat.o
"trace_start_error_with_name(char const*)", referenced from:
darwin_ptrace_me() in darwin-nat.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Adding fork-inferior.o fixes it. I factored out the Darwin bits that
are no architecture-specific in the section meant for that at the top.
I only built-tested this using Travis-CI, since I don't have access to
this platform.
gdb/ChangeLog:
* configure.nat: Factor out Darwin bits that are not
architecture-specific. Add fork-inferior.o.
2017-06-14 03:14:35 +08:00
|
|
|
NATDEPFILES="${NATDEPFILES} i386-darwin-nat.o x86-nat.o \
|
2018-12-25 03:01:34 +08:00
|
|
|
nat/x86-dregs.o amd64-nat.o"
|
2017-05-03 09:32:33 +08:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
fbsd)
|
|
|
|
case ${gdb_host_cpu} in
|
2017-08-11 02:00:42 +08:00
|
|
|
aarch64)
|
|
|
|
# Host: FreeBSD/aarch64
|
2022-03-23 03:05:43 +08:00
|
|
|
NATDEPFILES="${NATDEPFILES} aarch64-nat.o \
|
|
|
|
nat/aarch64-hw-point.o aarch64-fbsd-nat.o"
|
2017-08-11 02:00:42 +08:00
|
|
|
LOADLIBES=
|
|
|
|
;;
|
2017-10-12 02:16:34 +08:00
|
|
|
arm)
|
|
|
|
# Host: FreeBSD/arm
|
|
|
|
NATDEPFILES="${NATDEPFILES} arm-fbsd-nat.o"
|
|
|
|
LOADLIBES=
|
|
|
|
;;
|
2017-05-03 09:32:33 +08:00
|
|
|
i386)
|
|
|
|
# Host: FreeBSD/i386
|
2018-12-25 03:01:34 +08:00
|
|
|
NATDEPFILES="${NATDEPFILES} x86-nat.o nat/x86-dregs.o \
|
2023-08-29 05:18:19 +08:00
|
|
|
nat/x86-xstate.o x86-bsd-nat.o x86-fbsd-nat.o i386-fbsd-nat.o \
|
|
|
|
bsd-kvm.o"
|
2017-05-03 09:32:33 +08:00
|
|
|
;;
|
|
|
|
mips)
|
|
|
|
# Host: FreeBSD/mips
|
|
|
|
NATDEPFILES="${NATDEPFILES} mips-fbsd-nat.o"
|
|
|
|
LOADLIBES=
|
|
|
|
;;
|
|
|
|
powerpc)
|
|
|
|
# Native config information for GDB on PowerPC
|
|
|
|
# systems running FreeBSD.
|
|
|
|
NATDEPFILES="${NATDEPFILES} ppc-fbsd-nat.o bsd-kvm.o"
|
|
|
|
;;
|
2018-10-09 05:47:34 +08:00
|
|
|
riscv*)
|
|
|
|
# Host: FreeBSD/riscv
|
|
|
|
NATDEPFILES="${NATDEPFILES} riscv-fbsd-nat.o"
|
|
|
|
;;
|
2017-05-03 09:32:33 +08:00
|
|
|
sparc)
|
|
|
|
# Host: FreeBSD/sparc64
|
|
|
|
NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc64-nat.o \
|
|
|
|
sparc64-fbsd-nat.o bsd-kvm.o"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
fbsd64)
|
|
|
|
case ${gdb_host_cpu} in
|
|
|
|
i386)
|
|
|
|
# Host: FreeBSD/amd64
|
FreeBSD x86 nat: Use register maps for GP register sets.
Rather than using the x86-specific register offset tables, use
register maps to describe the layout of the general purpose registers
fetched via PT_GETREGS. The sole user-visible difference is that
FreeBSD/amd64 will now report additional segment registers ($ds, $es,
$fs, and $gs) for both 32-bit and 64-bit processes.
As part of these changes, the FreeBSD x86 native targets no longer use
amd64-bsd-nat.c or i386-bsd-nat.c. Remove FreeBSD-specific register
handling (for $fs_base, $gs_base, and XSAVE state) from these files.
Similarly, remove the global x86bsd_xsave_len from x86-bsd-nat.c. The
FreeBSD x86 native targets use a static xsave_len instead.
While here, rework the probing of PT_GETXMMREGS on FreeBSD/i386.
Probe the ptrace op once in the target read_description method and
cache the result for the future similar to the way the status of XSAVE
support is probed in the read_description method. In addition, return
the proper xcr0 mask (X87-only) for old kernels or systems without
either XSAVE or XMM support.
2022-01-29 03:14:37 +08:00
|
|
|
NATDEPFILES="${NATDEPFILES} amd64-nat.o \
|
2018-12-25 03:01:34 +08:00
|
|
|
amd64-fbsd-nat.o bsd-kvm.o x86-nat.o nat/x86-dregs.o \
|
2023-08-29 05:18:19 +08:00
|
|
|
nat/x86-xstate.o x86-bsd-nat.o x86-fbsd-nat.o"
|
2017-05-03 09:32:33 +08:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
go32)
|
|
|
|
case ${gdb_host_cpu} in
|
|
|
|
i386)
|
|
|
|
# Host: Intel x86 running DJGPP
|
|
|
|
# We include several header files from config/djgpp
|
|
|
|
MH_CFLAGS='-I$(srcdir)/config/djgpp'
|
2018-12-25 03:01:34 +08:00
|
|
|
NATDEPFILES='go32-nat.o x86-nat.o nat/x86-dregs.o'
|
2017-05-03 09:32:33 +08:00
|
|
|
XM_CLIBS='-ldbg'
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
i386gnu)
|
|
|
|
case ${gdb_host_cpu} in
|
|
|
|
i386)
|
|
|
|
# Host: Intel 386 running the GNU Hurd
|
|
|
|
NATDEPFILES='i386-gnu-nat.o gnu-nat.o \
|
2018-12-25 03:01:34 +08:00
|
|
|
x86-nat.o nat/x86-dregs.o fork-child.o \
|
[gdb, hurd] Repair build after "Share fork_inferior et al with gdbserver" changes
..., that is commit 2090129c36c7e582943b7d300968d19b46160d84 causing:
[...]/gdb/gnu-nat.c: In function 'void gnu_ptrace_me()':
[...]/gdb/gnu-nat.c:2133:5: error: 'trace_start_error_with_name' was not declared in this scope
trace_start_error_with_name ("ptrace");
^~~~~~~~~~~~~~~~~~~~~~~~~~~
[...]/gdb/gnu-nat.c:2133:5: note: suggested alternative: 'throw_perror_with_name'
trace_start_error_with_name ("ptrace");
^~~~~~~~~~~~~~~~~~~~~~~~~~~
throw_perror_with_name
[...]/gdb/gnu-nat.c: In function 'void gnu_create_inferior(target_ops*, const char*, const string&, char**, int)':
[...]/gdb/gnu-nat.c:2147:9: error: 'fork_inferior' was not declared in this scope
pid = fork_inferior (exec_file, allargs, env, gnu_ptrace_me,
^~~~~~~~~~~~~
[...]/gdb/gnu-nat.c:2147:9: note: suggested alternative: 'exit_inferior'
pid = fork_inferior (exec_file, allargs, env, gnu_ptrace_me,
^~~~~~~~~~~~~
exit_inferior
[...]/gdb/gnu-nat.c:2174:30: error: 'START_INFERIOR_TRAPS_EXPECTED' was not declared in this scope
gdb_startup_inferior (pid, START_INFERIOR_TRAPS_EXPECTED);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: gnu-nat.o: in function `gnu_ptrace_me()':
[...]/gdb/gnu-nat.c:2134: undefined reference to `trace_start_error_with_name(char const*)'
/usr/bin/ld: gnu-nat.o: in function `gnu_create_inferior(target_ops*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char**, int)':
[...]/gdb/gnu-nat.c:2148: undefined reference to `fork_inferior(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char**, void (*)(), void (*)(int), void (*)(), char const*, void (*)(char const*, char* const*, char* const*))'
/usr/bin/ld: fork-child.o: in function `gdb_startup_inferior(int, int)':
[...]/gdb/fork-child.c:136: undefined reference to `startup_inferior(int, int, target_waitstatus*, ptid_t*)'
collect2: error: ld returned 1 exit status
gdb/
* configure.nat [gdb_host == i386gnu] (NATDEPFILES): Add
'nat/fork-inferior.o'.
* gnu-nat.c: #include "nat/fork-inferior.h".
2018-07-04 19:27:09 +08:00
|
|
|
nat/fork-inferior.o \
|
Introduce "gdb/configure.nat" (and delete "gdb/config/*/*.mh" files)
Due to my ongoing work to make it possible for gdbserver to start the
inferior using the shell, I had to share the fork_inferior function
under the "nat/" directory. In order to do that, I created a new file
and put the function there; however, this meant that I now had to
update some of the *.mh files (under "gdb/config") and add the new
file as a dependency to be built natively. Bleh...
After talking a bit to Pedro about this, the idea came up to write a
new "gdb/configure.nat" file, a la "gdb/configure.tgt", which would
concentrate all of the native settings for each host/system. I
decided to tackle this issue.
The patch is simple. All of the previous Makefile variables that were
being declared inside the *.mh files are now inside "gdb/Makefile.in",
and "gdb/configure" is responsible for AC_SUBST'ing them. The
definitions of these variables were put inside "gdb/configure.nat", so
now they're shell variables. For excerpts of Makefile code, one must
create a file under "gdb/config/${gdb_cpu_host}" and reference it on
the "nat_extra_makefile_frag" variable.
It should now be easier to update the native dependencies of hosts in
this single file.
This has been tested on x86_64 without regressions.
gdb/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in: Remove "@host_makefile_frag@". Add variables
NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
"@nat_extra_makefile_frag@".
(Makefile): Remove dependency on "@frags@".
($(GNULIB_BUILDDIR)/Makefile): Likewise.
(data-directory/Makefile): Likewise.
* config/aarch64/linux.mh: Deleted; moved contents to
"gdb/configure.nat".
* config/alpha/alpha-linux.mh: Likewise.
* config/alpha/nbsd.mh: Likewise.
* config/arm/linux.mh: Likewise.
* config/arm/nbsdelf.mh: Likewise.
* config/i386/cygwin.mh: Likewise.
* config/i386/cygwin64.mh: Likewise.
* config/i386/darwin.mh: Likewise.
* config/i386/fbsd.mh: Likewise.
* config/i386/fbsd64.mh: Likewise.
* config/i386/go32.mh: Likewise.
* config/i386/i386gnu.mh: Likewise.
* config/i386/i386sol2.mh: Likewise.
* config/i386/linux.mh: Likewise.
* config/i386/linux64.mh: Likewise.
* config/i386/mingw.mh: Likewise.
* config/i386/mingw64.mh: Likewise.
* config/i386/nbsd64.mh: Likewise.
* config/i386/nbsdelf.mh: Likewise.
* config/i386/nto.mh: Likewise.
* config/i386/obsd.mh: Likewise.
* config/i386/obsd64.mh: Likewise.
* config/i386/sol2-64.mh: Likewise.
* config/ia64/linux.mh: Likewise.
* config/m32r/linux.mh: Likewise.
* config/m68k/linux.mh: Likewise.
* config/m68k/nbsdelf.mh: Likewise.
* config/m68k/obsd.mh: Likewise.
* config/m88k/obsd.mh: Likewise.
* config/mips/fbsd.mh: Likewise.
* config/mips/linux.mh: Likewise.
* config/mips/nbsd.mh: Likewise.
* config/mips/obsd64.mh: Likewise.
* config/pa/linux.mh: Likewise.
* config/pa/nbsd.mh: Likewise.
* config/pa/obsd.mh: Likewise.
* config/powerpc/aix.mh: Likewise.
* config/powerpc/fbsd.mh: Likewise.
* config/powerpc/linux.mh: Likewise.
* config/powerpc/nbsd.mh: Likewise.
* config/powerpc/obsd.mh: Likewise.
* config/powerpc/ppc64-linux.mh: Likewise.
* config/powerpc/spu-linux.mh: Likewise.
* config/s390/linux.mh: Likewise.
* config/sh/nbsd.mh: Likewise.
* config/sparc/fbsd.mh: Likewise.
* config/sparc/linux.mh: Likewise.
* config/sparc/linux64.mh: Likewise.
* config/sparc/nbsd64.mh: Likewise.
* config/sparc/nbsdelf.mh: Likewise.
* config/sparc/obsd64.mh: Likewise.
* config/sparc/sol2.mh: Likewise.
* config/tilegx/linux.mh: Likewise.
* config/vax/nbsdelf.mh: Likewise.
* config/vax/obsd.mh: Likewise.
* config/xtensa/linux.mh: Likewise.
* config/i386/i386gnu.mn: New file, with excerpts from
"config/i386/i386gnu.mh".
* configure: Regenerate.
* configure.ac: Rewrite code to use "gdb/configure.nat" instead of
*.mh files under "gdb/config".
* configure.nat: New file, with contents from the
"gdb/config/*/*.mh" files.
gdb/doc/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile: Remove "@host_makefile_frag@".
2017-04-26 04:03:39 +08:00
|
|
|
notify_S.o process_reply_S.o msg_reply_S.o \
|
|
|
|
msg_U.o exc_request_U.o exc_request_S.o'
|
2017-05-03 09:32:33 +08:00
|
|
|
HAVE_NATIVE_GCORE_HOST=1
|
Introduce "gdb/configure.nat" (and delete "gdb/config/*/*.mh" files)
Due to my ongoing work to make it possible for gdbserver to start the
inferior using the shell, I had to share the fork_inferior function
under the "nat/" directory. In order to do that, I created a new file
and put the function there; however, this meant that I now had to
update some of the *.mh files (under "gdb/config") and add the new
file as a dependency to be built natively. Bleh...
After talking a bit to Pedro about this, the idea came up to write a
new "gdb/configure.nat" file, a la "gdb/configure.tgt", which would
concentrate all of the native settings for each host/system. I
decided to tackle this issue.
The patch is simple. All of the previous Makefile variables that were
being declared inside the *.mh files are now inside "gdb/Makefile.in",
and "gdb/configure" is responsible for AC_SUBST'ing them. The
definitions of these variables were put inside "gdb/configure.nat", so
now they're shell variables. For excerpts of Makefile code, one must
create a file under "gdb/config/${gdb_cpu_host}" and reference it on
the "nat_extra_makefile_frag" variable.
It should now be easier to update the native dependencies of hosts in
this single file.
This has been tested on x86_64 without regressions.
gdb/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in: Remove "@host_makefile_frag@". Add variables
NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
"@nat_extra_makefile_frag@".
(Makefile): Remove dependency on "@frags@".
($(GNULIB_BUILDDIR)/Makefile): Likewise.
(data-directory/Makefile): Likewise.
* config/aarch64/linux.mh: Deleted; moved contents to
"gdb/configure.nat".
* config/alpha/alpha-linux.mh: Likewise.
* config/alpha/nbsd.mh: Likewise.
* config/arm/linux.mh: Likewise.
* config/arm/nbsdelf.mh: Likewise.
* config/i386/cygwin.mh: Likewise.
* config/i386/cygwin64.mh: Likewise.
* config/i386/darwin.mh: Likewise.
* config/i386/fbsd.mh: Likewise.
* config/i386/fbsd64.mh: Likewise.
* config/i386/go32.mh: Likewise.
* config/i386/i386gnu.mh: Likewise.
* config/i386/i386sol2.mh: Likewise.
* config/i386/linux.mh: Likewise.
* config/i386/linux64.mh: Likewise.
* config/i386/mingw.mh: Likewise.
* config/i386/mingw64.mh: Likewise.
* config/i386/nbsd64.mh: Likewise.
* config/i386/nbsdelf.mh: Likewise.
* config/i386/nto.mh: Likewise.
* config/i386/obsd.mh: Likewise.
* config/i386/obsd64.mh: Likewise.
* config/i386/sol2-64.mh: Likewise.
* config/ia64/linux.mh: Likewise.
* config/m32r/linux.mh: Likewise.
* config/m68k/linux.mh: Likewise.
* config/m68k/nbsdelf.mh: Likewise.
* config/m68k/obsd.mh: Likewise.
* config/m88k/obsd.mh: Likewise.
* config/mips/fbsd.mh: Likewise.
* config/mips/linux.mh: Likewise.
* config/mips/nbsd.mh: Likewise.
* config/mips/obsd64.mh: Likewise.
* config/pa/linux.mh: Likewise.
* config/pa/nbsd.mh: Likewise.
* config/pa/obsd.mh: Likewise.
* config/powerpc/aix.mh: Likewise.
* config/powerpc/fbsd.mh: Likewise.
* config/powerpc/linux.mh: Likewise.
* config/powerpc/nbsd.mh: Likewise.
* config/powerpc/obsd.mh: Likewise.
* config/powerpc/ppc64-linux.mh: Likewise.
* config/powerpc/spu-linux.mh: Likewise.
* config/s390/linux.mh: Likewise.
* config/sh/nbsd.mh: Likewise.
* config/sparc/fbsd.mh: Likewise.
* config/sparc/linux.mh: Likewise.
* config/sparc/linux64.mh: Likewise.
* config/sparc/nbsd64.mh: Likewise.
* config/sparc/nbsdelf.mh: Likewise.
* config/sparc/obsd64.mh: Likewise.
* config/sparc/sol2.mh: Likewise.
* config/tilegx/linux.mh: Likewise.
* config/vax/nbsdelf.mh: Likewise.
* config/vax/obsd.mh: Likewise.
* config/xtensa/linux.mh: Likewise.
* config/i386/i386gnu.mn: New file, with excerpts from
"config/i386/i386gnu.mh".
* configure: Regenerate.
* configure.ac: Rewrite code to use "gdb/configure.nat" instead of
*.mh files under "gdb/config".
* configure.nat: New file, with contents from the
"gdb/config/*/*.mh" files.
gdb/doc/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile: Remove "@host_makefile_frag@".
2017-04-26 04:03:39 +08:00
|
|
|
|
2017-05-03 09:32:33 +08:00
|
|
|
NAT_FILE='nm-i386gnu.h'
|
|
|
|
MH_CFLAGS='-D_GNU_SOURCE'
|
Introduce "gdb/configure.nat" (and delete "gdb/config/*/*.mh" files)
Due to my ongoing work to make it possible for gdbserver to start the
inferior using the shell, I had to share the fork_inferior function
under the "nat/" directory. In order to do that, I created a new file
and put the function there; however, this meant that I now had to
update some of the *.mh files (under "gdb/config") and add the new
file as a dependency to be built natively. Bleh...
After talking a bit to Pedro about this, the idea came up to write a
new "gdb/configure.nat" file, a la "gdb/configure.tgt", which would
concentrate all of the native settings for each host/system. I
decided to tackle this issue.
The patch is simple. All of the previous Makefile variables that were
being declared inside the *.mh files are now inside "gdb/Makefile.in",
and "gdb/configure" is responsible for AC_SUBST'ing them. The
definitions of these variables were put inside "gdb/configure.nat", so
now they're shell variables. For excerpts of Makefile code, one must
create a file under "gdb/config/${gdb_cpu_host}" and reference it on
the "nat_extra_makefile_frag" variable.
It should now be easier to update the native dependencies of hosts in
this single file.
This has been tested on x86_64 without regressions.
gdb/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in: Remove "@host_makefile_frag@". Add variables
NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
"@nat_extra_makefile_frag@".
(Makefile): Remove dependency on "@frags@".
($(GNULIB_BUILDDIR)/Makefile): Likewise.
(data-directory/Makefile): Likewise.
* config/aarch64/linux.mh: Deleted; moved contents to
"gdb/configure.nat".
* config/alpha/alpha-linux.mh: Likewise.
* config/alpha/nbsd.mh: Likewise.
* config/arm/linux.mh: Likewise.
* config/arm/nbsdelf.mh: Likewise.
* config/i386/cygwin.mh: Likewise.
* config/i386/cygwin64.mh: Likewise.
* config/i386/darwin.mh: Likewise.
* config/i386/fbsd.mh: Likewise.
* config/i386/fbsd64.mh: Likewise.
* config/i386/go32.mh: Likewise.
* config/i386/i386gnu.mh: Likewise.
* config/i386/i386sol2.mh: Likewise.
* config/i386/linux.mh: Likewise.
* config/i386/linux64.mh: Likewise.
* config/i386/mingw.mh: Likewise.
* config/i386/mingw64.mh: Likewise.
* config/i386/nbsd64.mh: Likewise.
* config/i386/nbsdelf.mh: Likewise.
* config/i386/nto.mh: Likewise.
* config/i386/obsd.mh: Likewise.
* config/i386/obsd64.mh: Likewise.
* config/i386/sol2-64.mh: Likewise.
* config/ia64/linux.mh: Likewise.
* config/m32r/linux.mh: Likewise.
* config/m68k/linux.mh: Likewise.
* config/m68k/nbsdelf.mh: Likewise.
* config/m68k/obsd.mh: Likewise.
* config/m88k/obsd.mh: Likewise.
* config/mips/fbsd.mh: Likewise.
* config/mips/linux.mh: Likewise.
* config/mips/nbsd.mh: Likewise.
* config/mips/obsd64.mh: Likewise.
* config/pa/linux.mh: Likewise.
* config/pa/nbsd.mh: Likewise.
* config/pa/obsd.mh: Likewise.
* config/powerpc/aix.mh: Likewise.
* config/powerpc/fbsd.mh: Likewise.
* config/powerpc/linux.mh: Likewise.
* config/powerpc/nbsd.mh: Likewise.
* config/powerpc/obsd.mh: Likewise.
* config/powerpc/ppc64-linux.mh: Likewise.
* config/powerpc/spu-linux.mh: Likewise.
* config/s390/linux.mh: Likewise.
* config/sh/nbsd.mh: Likewise.
* config/sparc/fbsd.mh: Likewise.
* config/sparc/linux.mh: Likewise.
* config/sparc/linux64.mh: Likewise.
* config/sparc/nbsd64.mh: Likewise.
* config/sparc/nbsdelf.mh: Likewise.
* config/sparc/obsd64.mh: Likewise.
* config/sparc/sol2.mh: Likewise.
* config/tilegx/linux.mh: Likewise.
* config/vax/nbsdelf.mh: Likewise.
* config/vax/obsd.mh: Likewise.
* config/xtensa/linux.mh: Likewise.
* config/i386/i386gnu.mn: New file, with excerpts from
"config/i386/i386gnu.mh".
* configure: Regenerate.
* configure.ac: Rewrite code to use "gdb/configure.nat" instead of
*.mh files under "gdb/config".
* configure.nat: New file, with contents from the
"gdb/config/*/*.mh" files.
gdb/doc/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile: Remove "@host_makefile_frag@".
2017-04-26 04:03:39 +08:00
|
|
|
|
2017-05-03 09:32:33 +08:00
|
|
|
XM_CLIBS='-lshouldbeinlibc'
|
Introduce "gdb/configure.nat" (and delete "gdb/config/*/*.mh" files)
Due to my ongoing work to make it possible for gdbserver to start the
inferior using the shell, I had to share the fork_inferior function
under the "nat/" directory. In order to do that, I created a new file
and put the function there; however, this meant that I now had to
update some of the *.mh files (under "gdb/config") and add the new
file as a dependency to be built natively. Bleh...
After talking a bit to Pedro about this, the idea came up to write a
new "gdb/configure.nat" file, a la "gdb/configure.tgt", which would
concentrate all of the native settings for each host/system. I
decided to tackle this issue.
The patch is simple. All of the previous Makefile variables that were
being declared inside the *.mh files are now inside "gdb/Makefile.in",
and "gdb/configure" is responsible for AC_SUBST'ing them. The
definitions of these variables were put inside "gdb/configure.nat", so
now they're shell variables. For excerpts of Makefile code, one must
create a file under "gdb/config/${gdb_cpu_host}" and reference it on
the "nat_extra_makefile_frag" variable.
It should now be easier to update the native dependencies of hosts in
this single file.
This has been tested on x86_64 without regressions.
gdb/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in: Remove "@host_makefile_frag@". Add variables
NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
"@nat_extra_makefile_frag@".
(Makefile): Remove dependency on "@frags@".
($(GNULIB_BUILDDIR)/Makefile): Likewise.
(data-directory/Makefile): Likewise.
* config/aarch64/linux.mh: Deleted; moved contents to
"gdb/configure.nat".
* config/alpha/alpha-linux.mh: Likewise.
* config/alpha/nbsd.mh: Likewise.
* config/arm/linux.mh: Likewise.
* config/arm/nbsdelf.mh: Likewise.
* config/i386/cygwin.mh: Likewise.
* config/i386/cygwin64.mh: Likewise.
* config/i386/darwin.mh: Likewise.
* config/i386/fbsd.mh: Likewise.
* config/i386/fbsd64.mh: Likewise.
* config/i386/go32.mh: Likewise.
* config/i386/i386gnu.mh: Likewise.
* config/i386/i386sol2.mh: Likewise.
* config/i386/linux.mh: Likewise.
* config/i386/linux64.mh: Likewise.
* config/i386/mingw.mh: Likewise.
* config/i386/mingw64.mh: Likewise.
* config/i386/nbsd64.mh: Likewise.
* config/i386/nbsdelf.mh: Likewise.
* config/i386/nto.mh: Likewise.
* config/i386/obsd.mh: Likewise.
* config/i386/obsd64.mh: Likewise.
* config/i386/sol2-64.mh: Likewise.
* config/ia64/linux.mh: Likewise.
* config/m32r/linux.mh: Likewise.
* config/m68k/linux.mh: Likewise.
* config/m68k/nbsdelf.mh: Likewise.
* config/m68k/obsd.mh: Likewise.
* config/m88k/obsd.mh: Likewise.
* config/mips/fbsd.mh: Likewise.
* config/mips/linux.mh: Likewise.
* config/mips/nbsd.mh: Likewise.
* config/mips/obsd64.mh: Likewise.
* config/pa/linux.mh: Likewise.
* config/pa/nbsd.mh: Likewise.
* config/pa/obsd.mh: Likewise.
* config/powerpc/aix.mh: Likewise.
* config/powerpc/fbsd.mh: Likewise.
* config/powerpc/linux.mh: Likewise.
* config/powerpc/nbsd.mh: Likewise.
* config/powerpc/obsd.mh: Likewise.
* config/powerpc/ppc64-linux.mh: Likewise.
* config/powerpc/spu-linux.mh: Likewise.
* config/s390/linux.mh: Likewise.
* config/sh/nbsd.mh: Likewise.
* config/sparc/fbsd.mh: Likewise.
* config/sparc/linux.mh: Likewise.
* config/sparc/linux64.mh: Likewise.
* config/sparc/nbsd64.mh: Likewise.
* config/sparc/nbsdelf.mh: Likewise.
* config/sparc/obsd64.mh: Likewise.
* config/sparc/sol2.mh: Likewise.
* config/tilegx/linux.mh: Likewise.
* config/vax/nbsdelf.mh: Likewise.
* config/vax/obsd.mh: Likewise.
* config/xtensa/linux.mh: Likewise.
* config/i386/i386gnu.mn: New file, with excerpts from
"config/i386/i386gnu.mh".
* configure: Regenerate.
* configure.ac: Rewrite code to use "gdb/configure.nat" instead of
*.mh files under "gdb/config".
* configure.nat: New file, with contents from the
"gdb/config/*/*.mh" files.
gdb/doc/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile: Remove "@host_makefile_frag@".
2017-04-26 04:03:39 +08:00
|
|
|
|
2017-05-17 20:56:19 +08:00
|
|
|
nat_makefile_frag="${srcdir}/config/${gdb_host_cpu}/i386gnu.mn"
|
2017-05-03 09:32:33 +08:00
|
|
|
;;
|
|
|
|
esac
|
Introduce "gdb/configure.nat" (and delete "gdb/config/*/*.mh" files)
Due to my ongoing work to make it possible for gdbserver to start the
inferior using the shell, I had to share the fork_inferior function
under the "nat/" directory. In order to do that, I created a new file
and put the function there; however, this meant that I now had to
update some of the *.mh files (under "gdb/config") and add the new
file as a dependency to be built natively. Bleh...
After talking a bit to Pedro about this, the idea came up to write a
new "gdb/configure.nat" file, a la "gdb/configure.tgt", which would
concentrate all of the native settings for each host/system. I
decided to tackle this issue.
The patch is simple. All of the previous Makefile variables that were
being declared inside the *.mh files are now inside "gdb/Makefile.in",
and "gdb/configure" is responsible for AC_SUBST'ing them. The
definitions of these variables were put inside "gdb/configure.nat", so
now they're shell variables. For excerpts of Makefile code, one must
create a file under "gdb/config/${gdb_cpu_host}" and reference it on
the "nat_extra_makefile_frag" variable.
It should now be easier to update the native dependencies of hosts in
this single file.
This has been tested on x86_64 without regressions.
gdb/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in: Remove "@host_makefile_frag@". Add variables
NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
"@nat_extra_makefile_frag@".
(Makefile): Remove dependency on "@frags@".
($(GNULIB_BUILDDIR)/Makefile): Likewise.
(data-directory/Makefile): Likewise.
* config/aarch64/linux.mh: Deleted; moved contents to
"gdb/configure.nat".
* config/alpha/alpha-linux.mh: Likewise.
* config/alpha/nbsd.mh: Likewise.
* config/arm/linux.mh: Likewise.
* config/arm/nbsdelf.mh: Likewise.
* config/i386/cygwin.mh: Likewise.
* config/i386/cygwin64.mh: Likewise.
* config/i386/darwin.mh: Likewise.
* config/i386/fbsd.mh: Likewise.
* config/i386/fbsd64.mh: Likewise.
* config/i386/go32.mh: Likewise.
* config/i386/i386gnu.mh: Likewise.
* config/i386/i386sol2.mh: Likewise.
* config/i386/linux.mh: Likewise.
* config/i386/linux64.mh: Likewise.
* config/i386/mingw.mh: Likewise.
* config/i386/mingw64.mh: Likewise.
* config/i386/nbsd64.mh: Likewise.
* config/i386/nbsdelf.mh: Likewise.
* config/i386/nto.mh: Likewise.
* config/i386/obsd.mh: Likewise.
* config/i386/obsd64.mh: Likewise.
* config/i386/sol2-64.mh: Likewise.
* config/ia64/linux.mh: Likewise.
* config/m32r/linux.mh: Likewise.
* config/m68k/linux.mh: Likewise.
* config/m68k/nbsdelf.mh: Likewise.
* config/m68k/obsd.mh: Likewise.
* config/m88k/obsd.mh: Likewise.
* config/mips/fbsd.mh: Likewise.
* config/mips/linux.mh: Likewise.
* config/mips/nbsd.mh: Likewise.
* config/mips/obsd64.mh: Likewise.
* config/pa/linux.mh: Likewise.
* config/pa/nbsd.mh: Likewise.
* config/pa/obsd.mh: Likewise.
* config/powerpc/aix.mh: Likewise.
* config/powerpc/fbsd.mh: Likewise.
* config/powerpc/linux.mh: Likewise.
* config/powerpc/nbsd.mh: Likewise.
* config/powerpc/obsd.mh: Likewise.
* config/powerpc/ppc64-linux.mh: Likewise.
* config/powerpc/spu-linux.mh: Likewise.
* config/s390/linux.mh: Likewise.
* config/sh/nbsd.mh: Likewise.
* config/sparc/fbsd.mh: Likewise.
* config/sparc/linux.mh: Likewise.
* config/sparc/linux64.mh: Likewise.
* config/sparc/nbsd64.mh: Likewise.
* config/sparc/nbsdelf.mh: Likewise.
* config/sparc/obsd64.mh: Likewise.
* config/sparc/sol2.mh: Likewise.
* config/tilegx/linux.mh: Likewise.
* config/vax/nbsdelf.mh: Likewise.
* config/vax/obsd.mh: Likewise.
* config/xtensa/linux.mh: Likewise.
* config/i386/i386gnu.mn: New file, with excerpts from
"config/i386/i386gnu.mh".
* configure: Regenerate.
* configure.ac: Rewrite code to use "gdb/configure.nat" instead of
*.mh files under "gdb/config".
* configure.nat: New file, with contents from the
"gdb/config/*/*.mh" files.
gdb/doc/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile: Remove "@host_makefile_frag@".
2017-04-26 04:03:39 +08:00
|
|
|
;;
|
2017-05-03 09:32:33 +08:00
|
|
|
linux)
|
|
|
|
case ${gdb_host_cpu} in
|
|
|
|
aarch64)
|
|
|
|
# Host: AArch64 based machine running GNU/Linux
|
2022-03-23 03:05:43 +08:00
|
|
|
NATDEPFILES="${NATDEPFILES} aarch64-nat.o aarch64-linux-nat.o \
|
2022-03-23 03:05:43 +08:00
|
|
|
aarch32-linux-nat.o nat/aarch64-hw-point.o \
|
|
|
|
nat/aarch64-linux-hw-point.o \
|
2018-12-25 03:01:34 +08:00
|
|
|
nat/aarch64-linux.o \
|
2023-02-07 01:24:32 +08:00
|
|
|
nat/aarch64-scalable-linux-ptrace.o \
|
2020-06-20 04:33:13 +08:00
|
|
|
nat/aarch64-mte-linux-ptrace.o"
|
2017-05-03 09:32:33 +08:00
|
|
|
;;
|
2014-02-14 15:56:23 +08:00
|
|
|
arc)
|
|
|
|
# Host: ARC based machine running GNU/Linux
|
|
|
|
NATDEPFILES="${NATDEPFILES} arc-linux-nat.o"
|
|
|
|
;;
|
2017-05-03 09:32:33 +08:00
|
|
|
arm)
|
|
|
|
# Host: ARM based machine running GNU/Linux
|
|
|
|
NATDEPFILES="${NATDEPFILES} arm-linux-nat.o \
|
|
|
|
aarch32-linux-nat.o"
|
|
|
|
;;
|
|
|
|
i386)
|
|
|
|
# Host: Intel 386 running GNU/Linux.
|
2018-12-25 03:01:34 +08:00
|
|
|
NATDEPFILES="${NATDEPFILES} x86-nat.o nat/x86-dregs.o \
|
2023-08-29 05:18:19 +08:00
|
|
|
nat/x86-xstate.o \
|
2018-12-25 03:01:34 +08:00
|
|
|
i386-linux-nat.o x86-linux-nat.o nat/linux-btrace.o \
|
gdb/gdbserver: share some code relating to target description creation
This commit is part of a series to share more of the x86 target
description creation code between GDB and gdbserver.
Unlike previous commits which were mostly refactoring, this commit is
the first that makes a real change, though that change should mostly
be for gdbserver; I've largely adopted the "GDB" way of doing things
for gdbserver, and this fixes a real gdbserver bug.
On a x86-64 Linux target, running the test:
gdb.server/connect-with-no-symbol-file.exp
results in two core files being created. Both of these core files are
from the inferior process, created after gdbserver has detached.
In this test a gdbserver process is started and then, after gdbserver
has started, but before GDB attaches, we either delete the inferior
executable, or change its permissions so it can't be read. Only after
doing this do we attempt to connect with GDB.
As GDB connects to gdbserver, gdbserver attempts to figure out the
target description so that it can send the description to GDB, this
involves a call to x86_linux_read_description.
In x86_linux_read_description one of the first things we do is try to
figure out if the process is 32-bit or 64-bit. To do this we look up
the executable via the thread-id, and then attempt to read the
architecture size from the executable. This isn't going to work if
the executable has been deleted, or is no longer readable.
And so, as we can't read the executable, we default to an i386 target
and use an i386 target description.
A consequence of using an i386 target description is that addresses
are assumed to be 32-bits. Here's an example session that shows the
problems this causes. This is run on an x86-64 machine, and the test
binary (xx.x) is a standard 64-bit x86-64 binary:
shell_1$ gdbserver --once localhost :54321 /tmp/xx.x
shell_2$ gdb -q
(gdb) set sysroot
(gdb) shell chmod 000 /tmp/xx.x
(gdb) target remote :54321
Remote debugging using :54321
warning: /tmp/xx.x: Permission denied.
0xf7fd3110 in ?? ()
(gdb) show architecture
The target architecture is set to "auto" (currently "i386").
(gdb) p/x $pc
$1 = 0xf7fd3110
(gdb) info proc mappings
process 2412639
Mapped address spaces:
Start Addr End Addr Size Offset Perms objfile
0x400000 0x401000 0x1000 0x0 r--p /tmp/xx.x
0x401000 0x402000 0x1000 0x1000 r-xp /tmp/xx.x
0x402000 0x403000 0x1000 0x2000 r--p /tmp/xx.x
0x403000 0x405000 0x2000 0x2000 rw-p /tmp/xx.x
0xf7fcb000 0xf7fcf000 0x4000 0x0 r--p [vvar]
0xf7fcf000 0xf7fd1000 0x2000 0x0 r-xp [vdso]
0xf7fd1000 0xf7fd3000 0x2000 0x0 r--p /usr/lib64/ld-2.30.so
0xf7fd3000 0xf7ff3000 0x20000 0x2000 r-xp /usr/lib64/ld-2.30.so
0xf7ff3000 0xf7ffb000 0x8000 0x22000 r--p /usr/lib64/ld-2.30.so
0xf7ffc000 0xf7ffe000 0x2000 0x2a000 rw-p /usr/lib64/ld-2.30.so
0xf7ffe000 0xf7fff000 0x1000 0x0 rw-p
0xfffda000 0xfffff000 0x25000 0x0 rw-p [stack]
0xff600000 0xff601000 0x1000 0x0 r-xp [vsyscall]
(gdb) info inferiors
Num Description Connection Executable
* 1 process 2412639 1 (remote :54321)
(gdb) shell cat /proc/2412639/maps
00400000-00401000 r--p 00000000 fd:03 45907133 /tmp/xx.x
00401000-00402000 r-xp 00001000 fd:03 45907133 /tmp/xx.x
00402000-00403000 r--p 00002000 fd:03 45907133 /tmp/xx.x
00403000-00405000 rw-p 00002000 fd:03 45907133 /tmp/xx.x
7ffff7fcb000-7ffff7fcf000 r--p 00000000 00:00 0 [vvar]
7ffff7fcf000-7ffff7fd1000 r-xp 00000000 00:00 0 [vdso]
7ffff7fd1000-7ffff7fd3000 r--p 00000000 fd:00 143904 /usr/lib64/ld-2.30.so
7ffff7fd3000-7ffff7ff3000 r-xp 00002000 fd:00 143904 /usr/lib64/ld-2.30.so
7ffff7ff3000-7ffff7ffb000 r--p 00022000 fd:00 143904 /usr/lib64/ld-2.30.so
7ffff7ffc000-7ffff7ffe000 rw-p 0002a000 fd:00 143904 /usr/lib64/ld-2.30.so
7ffff7ffe000-7ffff7fff000 rw-p 00000000 00:00 0
7ffffffda000-7ffffffff000 rw-p 00000000 00:00 0 [stack]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
(gdb)
Notice the difference between the mappings reported via GDB and those
reported directly from the kernel via /proc/PID/maps, the addresses of
every mapping is clamped to 32-bits for GDB, while the kernel reports
real 64-bit addresses.
Notice also that the $pc value is a 32-bit value. It appears to be
within one of the mappings reported by GDB, but is outside any of the
mappings reported from the kernel.
And this is where the problem arises. When gdbserver detaches from
the inferior we pass the inferior the address from which it should
resume. Due to the 32/64 bit confusion we tell the inferior to resume
from the 32-bit $pc value, which is not within any valid mapping, and
so, as soon as the inferior resumes, it segfaults.
If we look at how GDB (not gdbserver) figures out its target
description then we see an interesting difference. GDB doesn't try to
read the executable. Instead GDB uses ptrace to query the thread's
state, and uses this to figure out the if the thread is 32 or 64 bit.
If we update gdbserver to do it the "GDB" way then the above problem
is resolved, gdbserver now sees the process as 64-bit, and when we
detach from the inferior we give it the correct 64-bit address, and
the inferior no longer segfaults.
Now, I could just update the gdbserver code, but better, I think, to
share one copy of the code between GDB and gdbserver in gdb/nat/.
That is what this commit does.
The cores of x86_linux_read_description from gdbserver and
x86_linux_nat_target::read_description from GDB are moved into a new
file gdb/nat/x86-linux-tdesc.c and combined into a single function
x86_linux_tdesc_for_tid which is called from each location.
This new function does things mostly the GDB way, some changes are
needed to allow for the sharing; we now take some pointers for where
the shared code can cache the xcr0 and xsave layout values.
Another thing to note about this commit is how the functions
i386_linux_read_description and amd64_linux_read_description are
handled. For now I've left these function as implemented separately
in GDB and gdbserver. I've moved the declarations of these functions
into gdb/arch/{i386,amd64}-linux-tdesc.h, but the implementations are
left where they are.
A later commit in this series will make these functions shared too,
but doing this is not trivial, so I've left that for a separate
commit. Merging the declarations as I've done here ensures that
everyone implements the function to the same API, and once these
functions are shared (in a later commit) we'll want a shared
declaration anyway.
Reviewed-By: Felix Willgerodt <felix.willgerodt@intel.com>
Acked-By: John Baldwin <jhb@FreeBSD.org>
2024-01-25 22:25:57 +08:00
|
|
|
nat/x86-linux.o nat/x86-linux-dregs.o nat/i386-linux.o \
|
gdb/gdbserver: share x86/linux tdesc caching
This commit builds on the previous series of commits to share the
target description caching code between GDB and gdbserver for
x86/Linux targets.
The objective of this commit is to move the four functions (2 each of)
i386_linux_read_description and amd64_linux_read_description into the
gdb/arch/ directory and combine them so we have just a single copy of
each. Then GDB, gdbserver, and the in-process-agent (IPA) will link
against these shared functions.
One curiosity with this patch is the function
x86_linux_post_init_tdesc. On the gdbserver side the two functions
amd64_linux_read_description and i386_linux_read_description have some
functionality that is not present on the GDB side, there is some
additional configuration that is performed as each target description
is created, to setup the expedited registers.
To support this I've added the function x86_linux_post_init_tdesc.
This function is called from the two *_linux_read_description
functions, but is implemented separately for GDB and gdbserver.
An alternative approach that avoids adding x86_linux_post_init_tdesc
would be to have x86_linux_tdesc_for_tid return a non-const target
description, then in x86_target::low_arch_setup we could inspect the
target description to figure out if it is 64-bit or not, and modify
the target description as needed. In the end I think that adding the
x86_linux_post_init_tdesc function is the simpler solution.
The contents of gdbserver/linux-x86-low.cc have moved to
gdb/arch/x86-linux-tdesc-features.c, and gdbserver/linux-x86-tdesc.h
has moved to gdb/arch/x86-linux-tdesc-features.h, this change leads to
some updates in the #includes in the gdbserver/ directory.
This commit also changes how target descriptions are cached.
Previously both GDB and gdbserver used static C-style arrays to act as
the tdesc cache. This was fine, except for two problems. Either the
C-style arrays would need to be placed in x86-linux-tdesc-features.c,
which would allow us to use the x86_linux_*_tdesc_count_1() functions
to size the arrays for us, or we'd need to hard code the array sizes
using separate #defines, which we'd then have to keep in sync with the
rest of the code in x86-linux-tdesc-features.c.
Given both of these problems I decided a better solution would be to
just switch to using a std::unordered_map to act as the cache. This
will resize automatically, and we can use the xcr0 value as the key.
At first inspection, using xcr0 might seem to be a problem; after all
the {i386,amd64}_create_target_description functions take more than
just the xcr0 value. However, this patch is only for x86/Linux
targets, and for x86/Linux all of the other flags passed to the tdesc
creation functions have constant values and so are irrelevant when we
consider tdesc caching.
For testing I've done the following:
- Built on x86-64 GNU/Linux for all targets, and just for the native
target,
- Build on i386 GNU/Linux for all targets, and just for the native
target,
- Build on a 64-bit, non-x86 GNU/Linux for all targets, just for the
native target, and for targets x86_64-*-linux and i386-*-linux.
Approved-By: Felix Willgerodt <felix.willgerodt@intel.com>
2024-01-30 23:37:23 +08:00
|
|
|
nat/x86-linux-tdesc.o arch/i386-linux-tdesc.o \
|
|
|
|
arch/x86-linux-tdesc-features.o"
|
2017-05-03 09:32:33 +08:00
|
|
|
;;
|
|
|
|
ia64)
|
|
|
|
# Host: Intel IA-64 running GNU/Linux
|
|
|
|
NATDEPFILES="${NATDEPFILES} ia64-linux-nat.o"
|
|
|
|
;;
|
2022-02-11 20:17:56 +08:00
|
|
|
loongarch)
|
|
|
|
# Host: LoongArch, running GNU/Linux.
|
2024-06-11 19:21:25 +08:00
|
|
|
NATDEPFILES="${NATDEPFILES} loongarch-linux-nat.o linux-nat-trad.o \
|
|
|
|
nat/loongarch-hw-point.o nat/loongarch-linux.o \
|
|
|
|
nat/loongarch-linux-hw-point.o"
|
2022-02-11 20:17:56 +08:00
|
|
|
;;
|
2017-05-03 09:32:33 +08:00
|
|
|
m32r)
|
|
|
|
# Host: M32R based machine running GNU/Linux
|
|
|
|
NATDEPFILES="${NATDEPFILES} m32r-linux-nat.o"
|
|
|
|
;;
|
|
|
|
m68k)
|
|
|
|
# Host: Motorola m68k running GNU/Linux.
|
|
|
|
NATDEPFILES="${NATDEPFILES} m68k-linux-nat.o"
|
|
|
|
;;
|
|
|
|
mips)
|
|
|
|
# Host: Linux/MIPS
|
2018-05-03 07:37:08 +08:00
|
|
|
NATDEPFILES="${NATDEPFILES} linux-nat-trad.o \
|
2018-12-25 03:01:34 +08:00
|
|
|
mips-linux-nat.o nat/mips-linux-watch.o"
|
2017-05-03 09:32:33 +08:00
|
|
|
;;
|
2020-10-09 05:26:30 +08:00
|
|
|
or1k)
|
|
|
|
# Host: Linux/OpenRISC
|
|
|
|
NATDEPFILES="${NATDEPFILES} or1k-linux-nat.o"
|
|
|
|
;;
|
2017-05-03 09:32:33 +08:00
|
|
|
pa)
|
|
|
|
# Host: Hewlett-Packard PA-RISC machine, running Linux
|
|
|
|
NATDEPFILES="${NATDEPFILES} hppa-linux-nat.o"
|
|
|
|
;;
|
|
|
|
powerpc)
|
|
|
|
# Host: PowerPC, running Linux
|
2018-12-25 03:01:34 +08:00
|
|
|
NATDEPFILES="${NATDEPFILES} ppc-linux-nat.o nat/ppc-linux.o"
|
2017-05-03 09:32:33 +08:00
|
|
|
;;
|
2018-08-10 04:37:45 +08:00
|
|
|
riscv*)
|
|
|
|
# Host: RISC-V, running Linux
|
2020-02-06 01:21:12 +08:00
|
|
|
NATDEPFILES="${NATDEPFILES} riscv-linux-nat.o \
|
|
|
|
nat/riscv-linux-tdesc.o"
|
2018-08-10 04:37:45 +08:00
|
|
|
;;
|
2017-05-03 09:32:33 +08:00
|
|
|
s390)
|
|
|
|
# Host: S390, running Linux
|
|
|
|
NATDEPFILES="${NATDEPFILES} s390-linux-nat.o"
|
|
|
|
;;
|
|
|
|
sparc)
|
|
|
|
# Host: GNU/Linux SPARC
|
|
|
|
NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc-linux-nat.o"
|
|
|
|
;;
|
|
|
|
tilegx)
|
|
|
|
# Host: Tilera TILE-Gx running GNU/Linux.
|
|
|
|
NATDEPFILES="${NATDEPFILES} tilegx-linux-nat.o"
|
|
|
|
NAT_CDEPS=
|
|
|
|
;;
|
|
|
|
xtensa)
|
|
|
|
# Host: Xtensa, running GNU/Linux.
|
|
|
|
NATDEPFILES="${NATDEPFILES} xtensa-linux-nat.o"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
linux64)
|
|
|
|
case ${gdb_host_cpu} in
|
|
|
|
i386)
|
|
|
|
# Host: GNU/Linux x86-64
|
2018-12-25 03:01:34 +08:00
|
|
|
NATDEPFILES="${NATDEPFILES} x86-nat.o nat/x86-dregs.o \
|
2023-08-29 05:18:19 +08:00
|
|
|
nat/x86-xstate.o amd64-nat.o amd64-linux-nat.o x86-linux-nat.o \
|
2018-12-25 03:01:34 +08:00
|
|
|
nat/linux-btrace.o \
|
gdb/gdbserver: share some code relating to target description creation
This commit is part of a series to share more of the x86 target
description creation code between GDB and gdbserver.
Unlike previous commits which were mostly refactoring, this commit is
the first that makes a real change, though that change should mostly
be for gdbserver; I've largely adopted the "GDB" way of doing things
for gdbserver, and this fixes a real gdbserver bug.
On a x86-64 Linux target, running the test:
gdb.server/connect-with-no-symbol-file.exp
results in two core files being created. Both of these core files are
from the inferior process, created after gdbserver has detached.
In this test a gdbserver process is started and then, after gdbserver
has started, but before GDB attaches, we either delete the inferior
executable, or change its permissions so it can't be read. Only after
doing this do we attempt to connect with GDB.
As GDB connects to gdbserver, gdbserver attempts to figure out the
target description so that it can send the description to GDB, this
involves a call to x86_linux_read_description.
In x86_linux_read_description one of the first things we do is try to
figure out if the process is 32-bit or 64-bit. To do this we look up
the executable via the thread-id, and then attempt to read the
architecture size from the executable. This isn't going to work if
the executable has been deleted, or is no longer readable.
And so, as we can't read the executable, we default to an i386 target
and use an i386 target description.
A consequence of using an i386 target description is that addresses
are assumed to be 32-bits. Here's an example session that shows the
problems this causes. This is run on an x86-64 machine, and the test
binary (xx.x) is a standard 64-bit x86-64 binary:
shell_1$ gdbserver --once localhost :54321 /tmp/xx.x
shell_2$ gdb -q
(gdb) set sysroot
(gdb) shell chmod 000 /tmp/xx.x
(gdb) target remote :54321
Remote debugging using :54321
warning: /tmp/xx.x: Permission denied.
0xf7fd3110 in ?? ()
(gdb) show architecture
The target architecture is set to "auto" (currently "i386").
(gdb) p/x $pc
$1 = 0xf7fd3110
(gdb) info proc mappings
process 2412639
Mapped address spaces:
Start Addr End Addr Size Offset Perms objfile
0x400000 0x401000 0x1000 0x0 r--p /tmp/xx.x
0x401000 0x402000 0x1000 0x1000 r-xp /tmp/xx.x
0x402000 0x403000 0x1000 0x2000 r--p /tmp/xx.x
0x403000 0x405000 0x2000 0x2000 rw-p /tmp/xx.x
0xf7fcb000 0xf7fcf000 0x4000 0x0 r--p [vvar]
0xf7fcf000 0xf7fd1000 0x2000 0x0 r-xp [vdso]
0xf7fd1000 0xf7fd3000 0x2000 0x0 r--p /usr/lib64/ld-2.30.so
0xf7fd3000 0xf7ff3000 0x20000 0x2000 r-xp /usr/lib64/ld-2.30.so
0xf7ff3000 0xf7ffb000 0x8000 0x22000 r--p /usr/lib64/ld-2.30.so
0xf7ffc000 0xf7ffe000 0x2000 0x2a000 rw-p /usr/lib64/ld-2.30.so
0xf7ffe000 0xf7fff000 0x1000 0x0 rw-p
0xfffda000 0xfffff000 0x25000 0x0 rw-p [stack]
0xff600000 0xff601000 0x1000 0x0 r-xp [vsyscall]
(gdb) info inferiors
Num Description Connection Executable
* 1 process 2412639 1 (remote :54321)
(gdb) shell cat /proc/2412639/maps
00400000-00401000 r--p 00000000 fd:03 45907133 /tmp/xx.x
00401000-00402000 r-xp 00001000 fd:03 45907133 /tmp/xx.x
00402000-00403000 r--p 00002000 fd:03 45907133 /tmp/xx.x
00403000-00405000 rw-p 00002000 fd:03 45907133 /tmp/xx.x
7ffff7fcb000-7ffff7fcf000 r--p 00000000 00:00 0 [vvar]
7ffff7fcf000-7ffff7fd1000 r-xp 00000000 00:00 0 [vdso]
7ffff7fd1000-7ffff7fd3000 r--p 00000000 fd:00 143904 /usr/lib64/ld-2.30.so
7ffff7fd3000-7ffff7ff3000 r-xp 00002000 fd:00 143904 /usr/lib64/ld-2.30.so
7ffff7ff3000-7ffff7ffb000 r--p 00022000 fd:00 143904 /usr/lib64/ld-2.30.so
7ffff7ffc000-7ffff7ffe000 rw-p 0002a000 fd:00 143904 /usr/lib64/ld-2.30.so
7ffff7ffe000-7ffff7fff000 rw-p 00000000 00:00 0
7ffffffda000-7ffffffff000 rw-p 00000000 00:00 0 [stack]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
(gdb)
Notice the difference between the mappings reported via GDB and those
reported directly from the kernel via /proc/PID/maps, the addresses of
every mapping is clamped to 32-bits for GDB, while the kernel reports
real 64-bit addresses.
Notice also that the $pc value is a 32-bit value. It appears to be
within one of the mappings reported by GDB, but is outside any of the
mappings reported from the kernel.
And this is where the problem arises. When gdbserver detaches from
the inferior we pass the inferior the address from which it should
resume. Due to the 32/64 bit confusion we tell the inferior to resume
from the 32-bit $pc value, which is not within any valid mapping, and
so, as soon as the inferior resumes, it segfaults.
If we look at how GDB (not gdbserver) figures out its target
description then we see an interesting difference. GDB doesn't try to
read the executable. Instead GDB uses ptrace to query the thread's
state, and uses this to figure out the if the thread is 32 or 64 bit.
If we update gdbserver to do it the "GDB" way then the above problem
is resolved, gdbserver now sees the process as 64-bit, and when we
detach from the inferior we give it the correct 64-bit address, and
the inferior no longer segfaults.
Now, I could just update the gdbserver code, but better, I think, to
share one copy of the code between GDB and gdbserver in gdb/nat/.
That is what this commit does.
The cores of x86_linux_read_description from gdbserver and
x86_linux_nat_target::read_description from GDB are moved into a new
file gdb/nat/x86-linux-tdesc.c and combined into a single function
x86_linux_tdesc_for_tid which is called from each location.
This new function does things mostly the GDB way, some changes are
needed to allow for the sharing; we now take some pointers for where
the shared code can cache the xcr0 and xsave layout values.
Another thing to note about this commit is how the functions
i386_linux_read_description and amd64_linux_read_description are
handled. For now I've left these function as implemented separately
in GDB and gdbserver. I've moved the declarations of these functions
into gdb/arch/{i386,amd64}-linux-tdesc.h, but the implementations are
left where they are.
A later commit in this series will make these functions shared too,
but doing this is not trivial, so I've left that for a separate
commit. Merging the declarations as I've done here ensures that
everyone implements the function to the same API, and once these
functions are shared (in a later commit) we'll want a shared
declaration anyway.
Reviewed-By: Felix Willgerodt <felix.willgerodt@intel.com>
Acked-By: John Baldwin <jhb@FreeBSD.org>
2024-01-25 22:25:57 +08:00
|
|
|
nat/x86-linux.o nat/x86-linux-dregs.o nat/x86-linux-tdesc.o \
|
gdb/gdbserver: share x86/linux tdesc caching
This commit builds on the previous series of commits to share the
target description caching code between GDB and gdbserver for
x86/Linux targets.
The objective of this commit is to move the four functions (2 each of)
i386_linux_read_description and amd64_linux_read_description into the
gdb/arch/ directory and combine them so we have just a single copy of
each. Then GDB, gdbserver, and the in-process-agent (IPA) will link
against these shared functions.
One curiosity with this patch is the function
x86_linux_post_init_tdesc. On the gdbserver side the two functions
amd64_linux_read_description and i386_linux_read_description have some
functionality that is not present on the GDB side, there is some
additional configuration that is performed as each target description
is created, to setup the expedited registers.
To support this I've added the function x86_linux_post_init_tdesc.
This function is called from the two *_linux_read_description
functions, but is implemented separately for GDB and gdbserver.
An alternative approach that avoids adding x86_linux_post_init_tdesc
would be to have x86_linux_tdesc_for_tid return a non-const target
description, then in x86_target::low_arch_setup we could inspect the
target description to figure out if it is 64-bit or not, and modify
the target description as needed. In the end I think that adding the
x86_linux_post_init_tdesc function is the simpler solution.
The contents of gdbserver/linux-x86-low.cc have moved to
gdb/arch/x86-linux-tdesc-features.c, and gdbserver/linux-x86-tdesc.h
has moved to gdb/arch/x86-linux-tdesc-features.h, this change leads to
some updates in the #includes in the gdbserver/ directory.
This commit also changes how target descriptions are cached.
Previously both GDB and gdbserver used static C-style arrays to act as
the tdesc cache. This was fine, except for two problems. Either the
C-style arrays would need to be placed in x86-linux-tdesc-features.c,
which would allow us to use the x86_linux_*_tdesc_count_1() functions
to size the arrays for us, or we'd need to hard code the array sizes
using separate #defines, which we'd then have to keep in sync with the
rest of the code in x86-linux-tdesc-features.c.
Given both of these problems I decided a better solution would be to
just switch to using a std::unordered_map to act as the cache. This
will resize automatically, and we can use the xcr0 value as the key.
At first inspection, using xcr0 might seem to be a problem; after all
the {i386,amd64}_create_target_description functions take more than
just the xcr0 value. However, this patch is only for x86/Linux
targets, and for x86/Linux all of the other flags passed to the tdesc
creation functions have constant values and so are irrelevant when we
consider tdesc caching.
For testing I've done the following:
- Built on x86-64 GNU/Linux for all targets, and just for the native
target,
- Build on i386 GNU/Linux for all targets, and just for the native
target,
- Build on a 64-bit, non-x86 GNU/Linux for all targets, just for the
native target, and for targets x86_64-*-linux and i386-*-linux.
Approved-By: Felix Willgerodt <felix.willgerodt@intel.com>
2024-01-30 23:37:23 +08:00
|
|
|
nat/amd64-linux-siginfo.o arch/x86-linux-tdesc-features.o \
|
|
|
|
arch/i386-linux-tdesc.o arch/amd64-linux-tdesc.o"
|
2017-05-03 09:32:33 +08:00
|
|
|
;;
|
|
|
|
sparc)
|
|
|
|
# Host: GNU/Linux UltraSPARC
|
|
|
|
NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc64-nat.o \
|
|
|
|
sparc64-linux-nat.o"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
mingw)
|
|
|
|
case ${gdb_host_cpu} in
|
|
|
|
i386)
|
|
|
|
NATDEPFILES="${NATDEPFILES} i386-windows-nat.o"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
mingw64)
|
|
|
|
case ${gdb_host_cpu} in
|
|
|
|
i386)
|
2020-01-27 05:04:04 +08:00
|
|
|
NATDEPFILES="${NATDEPFILES} i386-windows-nat.o amd64-windows-nat.o"
|
2017-05-03 09:32:33 +08:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
nbsd)
|
|
|
|
case ${gdb_host_cpu} in
|
|
|
|
alpha)
|
|
|
|
# Host: NetBSD/alpha
|
|
|
|
NATDEPFILES="${NATDEPFILES} alpha-bsd-nat.o bsd-kvm.o"
|
|
|
|
LOADLIBES='-lkvm'
|
|
|
|
;;
|
|
|
|
mips)
|
|
|
|
# Host: NetBSD/mips
|
Normalize names of the NetBSD files
The files used to be named 'nbsd', which incorrectly reflects
the name of the OS and confuses it with other BSD derived OSes.
gdb/ChangeLog:
* Makefile.in (ALL_64_TARGET_OBS, ALL_TARGET_OBS)
HFILES_NO_SRCDIR, ALLDEPFILES): Rename files.
* alpha-bsd-nat.c: Adjust include.
* alpha-bsd-tdep.h: Adjust comment.
* alpha-nbsd-tdep.c: Rename to ...
* alpha-netbsd-tdep.c: ... this, adjust include.
* amd64-nbsd-nat.c: Rename to ...
* amd64-netbsd-nat.c: ... this, adjust include.
* amd64-nbsd-tdep.c: Rename to ...
* amd64-netbsd-tdep.c: ... this, adjust include.
* amd64-tdep.h: Adjust include.
* arm-nbsd-nat.c: Rename to ...
* arm-netbsd-nat.c: ... this, adjust include.
* arm-nbsd-tdep.c: Rename to ...
* arm-netbsd-tdep.c: ... this, adjust include.
* arm-nbsd-tdep.h: Rename to ...
* arm-netbsd-tdep.h: ... this, adjust include.
* configure.nat: Adjust file lists.
* configure.tgt: Likewise.
* hppa-nbsd-nat.c: Rename to ...
* hppa-netbsd-nat.c: ... this, adjust include.
* hppa-nbsd-tdep.c: Rename to ...
* hppa-netbsd-tdep.c: ... this, adjust include.
* i386-nbsd-nat.c: Rename to ...
* i386-netbsd-nat.c: ... this, adjust include.
* i386-nbsd-tdep.c: Rename to ...
* i386-netbsd-tdep.c: ... this, adjust include.
* m68k-bsd-nat.c: Adjust include.
* mips-nbsd-nat.c: Rename to ...
* mips-netbsd-nat.c: ... this, adjust include.
* mips-nbsd-tdep.c: Rename to ...
* mips-netbsd-tdep.c: ... this, adjust include.
* mips-nbsd-tdep.h: Rename to ...
* mips-netbsd-tdep.h: ... this.
* nbsd-nat.c: Rename to ...
* netbsd-nat.c: ... this, adjust include.
* nbsd-nat.h: Rename to ...
* netbsd-nat.h: ... this, adjust include.
* nbsd-tdep.c: Rename to ...
* netbsd-tdep.c: ... this, adjust include.
* nbsd-tdep.h: Rename to ...
* netbsd-tdep.h: ... this.
* ppc-nbsd-nat.c: Rename to ...
* ppc-netbsd-nat.c: ... this, adjust include.
* ppc-nbsd-tdep.c: Rename to ...
* ppc-netbsd-tdep.c: ... this, adjust include and comment.
* ppc-nbsd-tdep.h: Rename to ...
* ppc-netbsd-tdep.h: ... this.
* sh-nbsd-nat.c: Rename to ...
* sh-netbsd-nat.c: ... this, adjust include.
* sh-nbsd-tdep.c: Rename to ...
* sh-netbsd-tdep.c: ... this, adjust include.
* sparc-nbsd-nat.c: Rename to ...
* sparc-netbsd-nat.c: ... this.
* sparc-nbsd-tdep.c: Rename to ...
* sparc-netbsd-tdep.c: ... this, adjust include.
* sparc64-nbsd-nat.c: Rename to ...
* sparc64-netbsd-nat.c: ... this.
* sparc64-nbsd-tdep.c: Rename to ...
* sparc64-netbsd-tdep.c: ... this, adjust include.
* sparc64-tdep.h: Adjust comment.
* vax-bsd-nat.c: Adjust include.
* vax-nbsd-tdep.c: Rename to ...
* vax-netbsd-tdep.c: ... this, adjust include.
2020-10-07 03:36:22 +08:00
|
|
|
NATDEPFILES="${NATDEPFILES} mips-netbsd-nat.o"
|
2017-05-03 09:32:33 +08:00
|
|
|
;;
|
|
|
|
pa)
|
|
|
|
# Host: NetBSD/hppa
|
Normalize names of the NetBSD files
The files used to be named 'nbsd', which incorrectly reflects
the name of the OS and confuses it with other BSD derived OSes.
gdb/ChangeLog:
* Makefile.in (ALL_64_TARGET_OBS, ALL_TARGET_OBS)
HFILES_NO_SRCDIR, ALLDEPFILES): Rename files.
* alpha-bsd-nat.c: Adjust include.
* alpha-bsd-tdep.h: Adjust comment.
* alpha-nbsd-tdep.c: Rename to ...
* alpha-netbsd-tdep.c: ... this, adjust include.
* amd64-nbsd-nat.c: Rename to ...
* amd64-netbsd-nat.c: ... this, adjust include.
* amd64-nbsd-tdep.c: Rename to ...
* amd64-netbsd-tdep.c: ... this, adjust include.
* amd64-tdep.h: Adjust include.
* arm-nbsd-nat.c: Rename to ...
* arm-netbsd-nat.c: ... this, adjust include.
* arm-nbsd-tdep.c: Rename to ...
* arm-netbsd-tdep.c: ... this, adjust include.
* arm-nbsd-tdep.h: Rename to ...
* arm-netbsd-tdep.h: ... this, adjust include.
* configure.nat: Adjust file lists.
* configure.tgt: Likewise.
* hppa-nbsd-nat.c: Rename to ...
* hppa-netbsd-nat.c: ... this, adjust include.
* hppa-nbsd-tdep.c: Rename to ...
* hppa-netbsd-tdep.c: ... this, adjust include.
* i386-nbsd-nat.c: Rename to ...
* i386-netbsd-nat.c: ... this, adjust include.
* i386-nbsd-tdep.c: Rename to ...
* i386-netbsd-tdep.c: ... this, adjust include.
* m68k-bsd-nat.c: Adjust include.
* mips-nbsd-nat.c: Rename to ...
* mips-netbsd-nat.c: ... this, adjust include.
* mips-nbsd-tdep.c: Rename to ...
* mips-netbsd-tdep.c: ... this, adjust include.
* mips-nbsd-tdep.h: Rename to ...
* mips-netbsd-tdep.h: ... this.
* nbsd-nat.c: Rename to ...
* netbsd-nat.c: ... this, adjust include.
* nbsd-nat.h: Rename to ...
* netbsd-nat.h: ... this, adjust include.
* nbsd-tdep.c: Rename to ...
* netbsd-tdep.c: ... this, adjust include.
* nbsd-tdep.h: Rename to ...
* netbsd-tdep.h: ... this.
* ppc-nbsd-nat.c: Rename to ...
* ppc-netbsd-nat.c: ... this, adjust include.
* ppc-nbsd-tdep.c: Rename to ...
* ppc-netbsd-tdep.c: ... this, adjust include and comment.
* ppc-nbsd-tdep.h: Rename to ...
* ppc-netbsd-tdep.h: ... this.
* sh-nbsd-nat.c: Rename to ...
* sh-netbsd-nat.c: ... this, adjust include.
* sh-nbsd-tdep.c: Rename to ...
* sh-netbsd-tdep.c: ... this, adjust include.
* sparc-nbsd-nat.c: Rename to ...
* sparc-netbsd-nat.c: ... this.
* sparc-nbsd-tdep.c: Rename to ...
* sparc-netbsd-tdep.c: ... this, adjust include.
* sparc64-nbsd-nat.c: Rename to ...
* sparc64-netbsd-nat.c: ... this.
* sparc64-nbsd-tdep.c: Rename to ...
* sparc64-netbsd-tdep.c: ... this, adjust include.
* sparc64-tdep.h: Adjust comment.
* vax-bsd-nat.c: Adjust include.
* vax-nbsd-tdep.c: Rename to ...
* vax-netbsd-tdep.c: ... this, adjust include.
2020-10-07 03:36:22 +08:00
|
|
|
NATDEPFILES="${NATDEPFILES} netbsd-nat.o hppa-netbsd-nat.o"
|
2017-05-03 09:32:33 +08:00
|
|
|
;;
|
|
|
|
powerpc)
|
|
|
|
# Host: NetBSD/powerpc
|
Normalize names of the NetBSD files
The files used to be named 'nbsd', which incorrectly reflects
the name of the OS and confuses it with other BSD derived OSes.
gdb/ChangeLog:
* Makefile.in (ALL_64_TARGET_OBS, ALL_TARGET_OBS)
HFILES_NO_SRCDIR, ALLDEPFILES): Rename files.
* alpha-bsd-nat.c: Adjust include.
* alpha-bsd-tdep.h: Adjust comment.
* alpha-nbsd-tdep.c: Rename to ...
* alpha-netbsd-tdep.c: ... this, adjust include.
* amd64-nbsd-nat.c: Rename to ...
* amd64-netbsd-nat.c: ... this, adjust include.
* amd64-nbsd-tdep.c: Rename to ...
* amd64-netbsd-tdep.c: ... this, adjust include.
* amd64-tdep.h: Adjust include.
* arm-nbsd-nat.c: Rename to ...
* arm-netbsd-nat.c: ... this, adjust include.
* arm-nbsd-tdep.c: Rename to ...
* arm-netbsd-tdep.c: ... this, adjust include.
* arm-nbsd-tdep.h: Rename to ...
* arm-netbsd-tdep.h: ... this, adjust include.
* configure.nat: Adjust file lists.
* configure.tgt: Likewise.
* hppa-nbsd-nat.c: Rename to ...
* hppa-netbsd-nat.c: ... this, adjust include.
* hppa-nbsd-tdep.c: Rename to ...
* hppa-netbsd-tdep.c: ... this, adjust include.
* i386-nbsd-nat.c: Rename to ...
* i386-netbsd-nat.c: ... this, adjust include.
* i386-nbsd-tdep.c: Rename to ...
* i386-netbsd-tdep.c: ... this, adjust include.
* m68k-bsd-nat.c: Adjust include.
* mips-nbsd-nat.c: Rename to ...
* mips-netbsd-nat.c: ... this, adjust include.
* mips-nbsd-tdep.c: Rename to ...
* mips-netbsd-tdep.c: ... this, adjust include.
* mips-nbsd-tdep.h: Rename to ...
* mips-netbsd-tdep.h: ... this.
* nbsd-nat.c: Rename to ...
* netbsd-nat.c: ... this, adjust include.
* nbsd-nat.h: Rename to ...
* netbsd-nat.h: ... this, adjust include.
* nbsd-tdep.c: Rename to ...
* netbsd-tdep.c: ... this, adjust include.
* nbsd-tdep.h: Rename to ...
* netbsd-tdep.h: ... this.
* ppc-nbsd-nat.c: Rename to ...
* ppc-netbsd-nat.c: ... this, adjust include.
* ppc-nbsd-tdep.c: Rename to ...
* ppc-netbsd-tdep.c: ... this, adjust include and comment.
* ppc-nbsd-tdep.h: Rename to ...
* ppc-netbsd-tdep.h: ... this.
* sh-nbsd-nat.c: Rename to ...
* sh-netbsd-nat.c: ... this, adjust include.
* sh-nbsd-tdep.c: Rename to ...
* sh-netbsd-tdep.c: ... this, adjust include.
* sparc-nbsd-nat.c: Rename to ...
* sparc-netbsd-nat.c: ... this.
* sparc-nbsd-tdep.c: Rename to ...
* sparc-netbsd-tdep.c: ... this, adjust include.
* sparc64-nbsd-nat.c: Rename to ...
* sparc64-netbsd-nat.c: ... this.
* sparc64-nbsd-tdep.c: Rename to ...
* sparc64-netbsd-tdep.c: ... this, adjust include.
* sparc64-tdep.h: Adjust comment.
* vax-bsd-nat.c: Adjust include.
* vax-nbsd-tdep.c: Rename to ...
* vax-netbsd-tdep.c: ... this, adjust include.
2020-10-07 03:36:22 +08:00
|
|
|
NATDEPFILES="${NATDEPFILES} ppc-netbsd-nat.o bsd-kvm.o"
|
2017-05-03 09:32:33 +08:00
|
|
|
LOADLIBES='-lkvm'
|
|
|
|
;;
|
|
|
|
sh)
|
|
|
|
# Host: NetBSD/sh
|
Normalize names of the NetBSD files
The files used to be named 'nbsd', which incorrectly reflects
the name of the OS and confuses it with other BSD derived OSes.
gdb/ChangeLog:
* Makefile.in (ALL_64_TARGET_OBS, ALL_TARGET_OBS)
HFILES_NO_SRCDIR, ALLDEPFILES): Rename files.
* alpha-bsd-nat.c: Adjust include.
* alpha-bsd-tdep.h: Adjust comment.
* alpha-nbsd-tdep.c: Rename to ...
* alpha-netbsd-tdep.c: ... this, adjust include.
* amd64-nbsd-nat.c: Rename to ...
* amd64-netbsd-nat.c: ... this, adjust include.
* amd64-nbsd-tdep.c: Rename to ...
* amd64-netbsd-tdep.c: ... this, adjust include.
* amd64-tdep.h: Adjust include.
* arm-nbsd-nat.c: Rename to ...
* arm-netbsd-nat.c: ... this, adjust include.
* arm-nbsd-tdep.c: Rename to ...
* arm-netbsd-tdep.c: ... this, adjust include.
* arm-nbsd-tdep.h: Rename to ...
* arm-netbsd-tdep.h: ... this, adjust include.
* configure.nat: Adjust file lists.
* configure.tgt: Likewise.
* hppa-nbsd-nat.c: Rename to ...
* hppa-netbsd-nat.c: ... this, adjust include.
* hppa-nbsd-tdep.c: Rename to ...
* hppa-netbsd-tdep.c: ... this, adjust include.
* i386-nbsd-nat.c: Rename to ...
* i386-netbsd-nat.c: ... this, adjust include.
* i386-nbsd-tdep.c: Rename to ...
* i386-netbsd-tdep.c: ... this, adjust include.
* m68k-bsd-nat.c: Adjust include.
* mips-nbsd-nat.c: Rename to ...
* mips-netbsd-nat.c: ... this, adjust include.
* mips-nbsd-tdep.c: Rename to ...
* mips-netbsd-tdep.c: ... this, adjust include.
* mips-nbsd-tdep.h: Rename to ...
* mips-netbsd-tdep.h: ... this.
* nbsd-nat.c: Rename to ...
* netbsd-nat.c: ... this, adjust include.
* nbsd-nat.h: Rename to ...
* netbsd-nat.h: ... this, adjust include.
* nbsd-tdep.c: Rename to ...
* netbsd-tdep.c: ... this, adjust include.
* nbsd-tdep.h: Rename to ...
* netbsd-tdep.h: ... this.
* ppc-nbsd-nat.c: Rename to ...
* ppc-netbsd-nat.c: ... this, adjust include.
* ppc-nbsd-tdep.c: Rename to ...
* ppc-netbsd-tdep.c: ... this, adjust include and comment.
* ppc-nbsd-tdep.h: Rename to ...
* ppc-netbsd-tdep.h: ... this.
* sh-nbsd-nat.c: Rename to ...
* sh-netbsd-nat.c: ... this, adjust include.
* sh-nbsd-tdep.c: Rename to ...
* sh-netbsd-tdep.c: ... this, adjust include.
* sparc-nbsd-nat.c: Rename to ...
* sparc-netbsd-nat.c: ... this.
* sparc-nbsd-tdep.c: Rename to ...
* sparc-netbsd-tdep.c: ... this, adjust include.
* sparc64-nbsd-nat.c: Rename to ...
* sparc64-netbsd-nat.c: ... this.
* sparc64-nbsd-tdep.c: Rename to ...
* sparc64-netbsd-tdep.c: ... this, adjust include.
* sparc64-tdep.h: Adjust comment.
* vax-bsd-nat.c: Adjust include.
* vax-nbsd-tdep.c: Rename to ...
* vax-netbsd-tdep.c: ... this, adjust include.
2020-10-07 03:36:22 +08:00
|
|
|
NATDEPFILES="${NATDEPFILES} sh-netbsd-nat.o"
|
2017-05-03 09:32:33 +08:00
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
nbsd64)
|
|
|
|
case ${gdb_host_cpu} in
|
|
|
|
i386)
|
|
|
|
# Host: NetBSD/amd64
|
Normalize names of the NetBSD files
The files used to be named 'nbsd', which incorrectly reflects
the name of the OS and confuses it with other BSD derived OSes.
gdb/ChangeLog:
* Makefile.in (ALL_64_TARGET_OBS, ALL_TARGET_OBS)
HFILES_NO_SRCDIR, ALLDEPFILES): Rename files.
* alpha-bsd-nat.c: Adjust include.
* alpha-bsd-tdep.h: Adjust comment.
* alpha-nbsd-tdep.c: Rename to ...
* alpha-netbsd-tdep.c: ... this, adjust include.
* amd64-nbsd-nat.c: Rename to ...
* amd64-netbsd-nat.c: ... this, adjust include.
* amd64-nbsd-tdep.c: Rename to ...
* amd64-netbsd-tdep.c: ... this, adjust include.
* amd64-tdep.h: Adjust include.
* arm-nbsd-nat.c: Rename to ...
* arm-netbsd-nat.c: ... this, adjust include.
* arm-nbsd-tdep.c: Rename to ...
* arm-netbsd-tdep.c: ... this, adjust include.
* arm-nbsd-tdep.h: Rename to ...
* arm-netbsd-tdep.h: ... this, adjust include.
* configure.nat: Adjust file lists.
* configure.tgt: Likewise.
* hppa-nbsd-nat.c: Rename to ...
* hppa-netbsd-nat.c: ... this, adjust include.
* hppa-nbsd-tdep.c: Rename to ...
* hppa-netbsd-tdep.c: ... this, adjust include.
* i386-nbsd-nat.c: Rename to ...
* i386-netbsd-nat.c: ... this, adjust include.
* i386-nbsd-tdep.c: Rename to ...
* i386-netbsd-tdep.c: ... this, adjust include.
* m68k-bsd-nat.c: Adjust include.
* mips-nbsd-nat.c: Rename to ...
* mips-netbsd-nat.c: ... this, adjust include.
* mips-nbsd-tdep.c: Rename to ...
* mips-netbsd-tdep.c: ... this, adjust include.
* mips-nbsd-tdep.h: Rename to ...
* mips-netbsd-tdep.h: ... this.
* nbsd-nat.c: Rename to ...
* netbsd-nat.c: ... this, adjust include.
* nbsd-nat.h: Rename to ...
* netbsd-nat.h: ... this, adjust include.
* nbsd-tdep.c: Rename to ...
* netbsd-tdep.c: ... this, adjust include.
* nbsd-tdep.h: Rename to ...
* netbsd-tdep.h: ... this.
* ppc-nbsd-nat.c: Rename to ...
* ppc-netbsd-nat.c: ... this, adjust include.
* ppc-nbsd-tdep.c: Rename to ...
* ppc-netbsd-tdep.c: ... this, adjust include and comment.
* ppc-nbsd-tdep.h: Rename to ...
* ppc-netbsd-tdep.h: ... this.
* sh-nbsd-nat.c: Rename to ...
* sh-netbsd-nat.c: ... this, adjust include.
* sh-nbsd-tdep.c: Rename to ...
* sh-netbsd-tdep.c: ... this, adjust include.
* sparc-nbsd-nat.c: Rename to ...
* sparc-netbsd-nat.c: ... this.
* sparc-nbsd-tdep.c: Rename to ...
* sparc-netbsd-tdep.c: ... this, adjust include.
* sparc64-nbsd-nat.c: Rename to ...
* sparc64-netbsd-nat.c: ... this.
* sparc64-nbsd-tdep.c: Rename to ...
* sparc64-netbsd-tdep.c: ... this, adjust include.
* sparc64-tdep.h: Adjust comment.
* vax-bsd-nat.c: Adjust include.
* vax-nbsd-tdep.c: Rename to ...
* vax-netbsd-tdep.c: ... this, adjust include.
2020-10-07 03:36:22 +08:00
|
|
|
NATDEPFILES="${NATDEPFILES} netbsd-nat.o amd64-nat.o x86-nat.o \
|
|
|
|
nat/x86-dregs.o x86-bsd-nat.o amd64-bsd-nat.o amd64-netbsd-nat.o"
|
2017-05-03 09:32:33 +08:00
|
|
|
;;
|
|
|
|
sparc)
|
|
|
|
# Host: NetBSD/sparc64
|
Normalize names of the NetBSD files
The files used to be named 'nbsd', which incorrectly reflects
the name of the OS and confuses it with other BSD derived OSes.
gdb/ChangeLog:
* Makefile.in (ALL_64_TARGET_OBS, ALL_TARGET_OBS)
HFILES_NO_SRCDIR, ALLDEPFILES): Rename files.
* alpha-bsd-nat.c: Adjust include.
* alpha-bsd-tdep.h: Adjust comment.
* alpha-nbsd-tdep.c: Rename to ...
* alpha-netbsd-tdep.c: ... this, adjust include.
* amd64-nbsd-nat.c: Rename to ...
* amd64-netbsd-nat.c: ... this, adjust include.
* amd64-nbsd-tdep.c: Rename to ...
* amd64-netbsd-tdep.c: ... this, adjust include.
* amd64-tdep.h: Adjust include.
* arm-nbsd-nat.c: Rename to ...
* arm-netbsd-nat.c: ... this, adjust include.
* arm-nbsd-tdep.c: Rename to ...
* arm-netbsd-tdep.c: ... this, adjust include.
* arm-nbsd-tdep.h: Rename to ...
* arm-netbsd-tdep.h: ... this, adjust include.
* configure.nat: Adjust file lists.
* configure.tgt: Likewise.
* hppa-nbsd-nat.c: Rename to ...
* hppa-netbsd-nat.c: ... this, adjust include.
* hppa-nbsd-tdep.c: Rename to ...
* hppa-netbsd-tdep.c: ... this, adjust include.
* i386-nbsd-nat.c: Rename to ...
* i386-netbsd-nat.c: ... this, adjust include.
* i386-nbsd-tdep.c: Rename to ...
* i386-netbsd-tdep.c: ... this, adjust include.
* m68k-bsd-nat.c: Adjust include.
* mips-nbsd-nat.c: Rename to ...
* mips-netbsd-nat.c: ... this, adjust include.
* mips-nbsd-tdep.c: Rename to ...
* mips-netbsd-tdep.c: ... this, adjust include.
* mips-nbsd-tdep.h: Rename to ...
* mips-netbsd-tdep.h: ... this.
* nbsd-nat.c: Rename to ...
* netbsd-nat.c: ... this, adjust include.
* nbsd-nat.h: Rename to ...
* netbsd-nat.h: ... this, adjust include.
* nbsd-tdep.c: Rename to ...
* netbsd-tdep.c: ... this, adjust include.
* nbsd-tdep.h: Rename to ...
* netbsd-tdep.h: ... this.
* ppc-nbsd-nat.c: Rename to ...
* ppc-netbsd-nat.c: ... this, adjust include.
* ppc-nbsd-tdep.c: Rename to ...
* ppc-netbsd-tdep.c: ... this, adjust include and comment.
* ppc-nbsd-tdep.h: Rename to ...
* ppc-netbsd-tdep.h: ... this.
* sh-nbsd-nat.c: Rename to ...
* sh-netbsd-nat.c: ... this, adjust include.
* sh-nbsd-tdep.c: Rename to ...
* sh-netbsd-tdep.c: ... this, adjust include.
* sparc-nbsd-nat.c: Rename to ...
* sparc-netbsd-nat.c: ... this.
* sparc-nbsd-tdep.c: Rename to ...
* sparc-netbsd-tdep.c: ... this, adjust include.
* sparc64-nbsd-nat.c: Rename to ...
* sparc64-netbsd-nat.c: ... this.
* sparc64-nbsd-tdep.c: Rename to ...
* sparc64-netbsd-tdep.c: ... this, adjust include.
* sparc64-tdep.h: Adjust comment.
* vax-bsd-nat.c: Adjust include.
* vax-nbsd-tdep.c: Rename to ...
* vax-netbsd-tdep.c: ... this, adjust include.
2020-10-07 03:36:22 +08:00
|
|
|
NATDEPFILES="${NATDEPFILES} sparc64-netbsd-nat.o sparc-nat.o \
|
2017-05-03 09:32:33 +08:00
|
|
|
bsd-kvm.o"
|
2017-07-15 23:30:40 +08:00
|
|
|
LOADLIBES='-lkvm'
|
2017-05-03 09:32:33 +08:00
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
;;
|
2017-07-15 23:30:40 +08:00
|
|
|
nbsdelf)
|
2017-05-03 09:32:33 +08:00
|
|
|
case ${gdb_host_cpu} in
|
|
|
|
arm)
|
|
|
|
# Host: NetBSD/arm
|
Normalize names of the NetBSD files
The files used to be named 'nbsd', which incorrectly reflects
the name of the OS and confuses it with other BSD derived OSes.
gdb/ChangeLog:
* Makefile.in (ALL_64_TARGET_OBS, ALL_TARGET_OBS)
HFILES_NO_SRCDIR, ALLDEPFILES): Rename files.
* alpha-bsd-nat.c: Adjust include.
* alpha-bsd-tdep.h: Adjust comment.
* alpha-nbsd-tdep.c: Rename to ...
* alpha-netbsd-tdep.c: ... this, adjust include.
* amd64-nbsd-nat.c: Rename to ...
* amd64-netbsd-nat.c: ... this, adjust include.
* amd64-nbsd-tdep.c: Rename to ...
* amd64-netbsd-tdep.c: ... this, adjust include.
* amd64-tdep.h: Adjust include.
* arm-nbsd-nat.c: Rename to ...
* arm-netbsd-nat.c: ... this, adjust include.
* arm-nbsd-tdep.c: Rename to ...
* arm-netbsd-tdep.c: ... this, adjust include.
* arm-nbsd-tdep.h: Rename to ...
* arm-netbsd-tdep.h: ... this, adjust include.
* configure.nat: Adjust file lists.
* configure.tgt: Likewise.
* hppa-nbsd-nat.c: Rename to ...
* hppa-netbsd-nat.c: ... this, adjust include.
* hppa-nbsd-tdep.c: Rename to ...
* hppa-netbsd-tdep.c: ... this, adjust include.
* i386-nbsd-nat.c: Rename to ...
* i386-netbsd-nat.c: ... this, adjust include.
* i386-nbsd-tdep.c: Rename to ...
* i386-netbsd-tdep.c: ... this, adjust include.
* m68k-bsd-nat.c: Adjust include.
* mips-nbsd-nat.c: Rename to ...
* mips-netbsd-nat.c: ... this, adjust include.
* mips-nbsd-tdep.c: Rename to ...
* mips-netbsd-tdep.c: ... this, adjust include.
* mips-nbsd-tdep.h: Rename to ...
* mips-netbsd-tdep.h: ... this.
* nbsd-nat.c: Rename to ...
* netbsd-nat.c: ... this, adjust include.
* nbsd-nat.h: Rename to ...
* netbsd-nat.h: ... this, adjust include.
* nbsd-tdep.c: Rename to ...
* netbsd-tdep.c: ... this, adjust include.
* nbsd-tdep.h: Rename to ...
* netbsd-tdep.h: ... this.
* ppc-nbsd-nat.c: Rename to ...
* ppc-netbsd-nat.c: ... this, adjust include.
* ppc-nbsd-tdep.c: Rename to ...
* ppc-netbsd-tdep.c: ... this, adjust include and comment.
* ppc-nbsd-tdep.h: Rename to ...
* ppc-netbsd-tdep.h: ... this.
* sh-nbsd-nat.c: Rename to ...
* sh-netbsd-nat.c: ... this, adjust include.
* sh-nbsd-tdep.c: Rename to ...
* sh-netbsd-tdep.c: ... this, adjust include.
* sparc-nbsd-nat.c: Rename to ...
* sparc-netbsd-nat.c: ... this.
* sparc-nbsd-tdep.c: Rename to ...
* sparc-netbsd-tdep.c: ... this, adjust include.
* sparc64-nbsd-nat.c: Rename to ...
* sparc64-netbsd-nat.c: ... this.
* sparc64-nbsd-tdep.c: Rename to ...
* sparc64-netbsd-tdep.c: ... this, adjust include.
* sparc64-tdep.h: Adjust comment.
* vax-bsd-nat.c: Adjust include.
* vax-nbsd-tdep.c: Rename to ...
* vax-netbsd-tdep.c: ... this, adjust include.
2020-10-07 03:36:22 +08:00
|
|
|
NATDEPFILES="${NATDEPFILES} arm-netbsd-nat.o"
|
2017-05-03 09:32:33 +08:00
|
|
|
;;
|
|
|
|
i386)
|
|
|
|
# Host: NetBSD/i386 ELF
|
Normalize names of the NetBSD files
The files used to be named 'nbsd', which incorrectly reflects
the name of the OS and confuses it with other BSD derived OSes.
gdb/ChangeLog:
* Makefile.in (ALL_64_TARGET_OBS, ALL_TARGET_OBS)
HFILES_NO_SRCDIR, ALLDEPFILES): Rename files.
* alpha-bsd-nat.c: Adjust include.
* alpha-bsd-tdep.h: Adjust comment.
* alpha-nbsd-tdep.c: Rename to ...
* alpha-netbsd-tdep.c: ... this, adjust include.
* amd64-nbsd-nat.c: Rename to ...
* amd64-netbsd-nat.c: ... this, adjust include.
* amd64-nbsd-tdep.c: Rename to ...
* amd64-netbsd-tdep.c: ... this, adjust include.
* amd64-tdep.h: Adjust include.
* arm-nbsd-nat.c: Rename to ...
* arm-netbsd-nat.c: ... this, adjust include.
* arm-nbsd-tdep.c: Rename to ...
* arm-netbsd-tdep.c: ... this, adjust include.
* arm-nbsd-tdep.h: Rename to ...
* arm-netbsd-tdep.h: ... this, adjust include.
* configure.nat: Adjust file lists.
* configure.tgt: Likewise.
* hppa-nbsd-nat.c: Rename to ...
* hppa-netbsd-nat.c: ... this, adjust include.
* hppa-nbsd-tdep.c: Rename to ...
* hppa-netbsd-tdep.c: ... this, adjust include.
* i386-nbsd-nat.c: Rename to ...
* i386-netbsd-nat.c: ... this, adjust include.
* i386-nbsd-tdep.c: Rename to ...
* i386-netbsd-tdep.c: ... this, adjust include.
* m68k-bsd-nat.c: Adjust include.
* mips-nbsd-nat.c: Rename to ...
* mips-netbsd-nat.c: ... this, adjust include.
* mips-nbsd-tdep.c: Rename to ...
* mips-netbsd-tdep.c: ... this, adjust include.
* mips-nbsd-tdep.h: Rename to ...
* mips-netbsd-tdep.h: ... this.
* nbsd-nat.c: Rename to ...
* netbsd-nat.c: ... this, adjust include.
* nbsd-nat.h: Rename to ...
* netbsd-nat.h: ... this, adjust include.
* nbsd-tdep.c: Rename to ...
* netbsd-tdep.c: ... this, adjust include.
* nbsd-tdep.h: Rename to ...
* netbsd-tdep.h: ... this.
* ppc-nbsd-nat.c: Rename to ...
* ppc-netbsd-nat.c: ... this, adjust include.
* ppc-nbsd-tdep.c: Rename to ...
* ppc-netbsd-tdep.c: ... this, adjust include and comment.
* ppc-nbsd-tdep.h: Rename to ...
* ppc-netbsd-tdep.h: ... this.
* sh-nbsd-nat.c: Rename to ...
* sh-netbsd-nat.c: ... this, adjust include.
* sh-nbsd-tdep.c: Rename to ...
* sh-netbsd-tdep.c: ... this, adjust include.
* sparc-nbsd-nat.c: Rename to ...
* sparc-netbsd-nat.c: ... this.
* sparc-nbsd-tdep.c: Rename to ...
* sparc-netbsd-tdep.c: ... this, adjust include.
* sparc64-nbsd-nat.c: Rename to ...
* sparc64-netbsd-nat.c: ... this.
* sparc64-nbsd-tdep.c: Rename to ...
* sparc64-netbsd-tdep.c: ... this, adjust include.
* sparc64-tdep.h: Adjust comment.
* vax-bsd-nat.c: Adjust include.
* vax-nbsd-tdep.c: Rename to ...
* vax-netbsd-tdep.c: ... this, adjust include.
2020-10-07 03:36:22 +08:00
|
|
|
NATDEPFILES="${NATDEPFILES} netbsd-nat.o x86-nat.o \
|
2018-12-25 03:01:34 +08:00
|
|
|
nat/x86-dregs.o \
|
Normalize names of the NetBSD files
The files used to be named 'nbsd', which incorrectly reflects
the name of the OS and confuses it with other BSD derived OSes.
gdb/ChangeLog:
* Makefile.in (ALL_64_TARGET_OBS, ALL_TARGET_OBS)
HFILES_NO_SRCDIR, ALLDEPFILES): Rename files.
* alpha-bsd-nat.c: Adjust include.
* alpha-bsd-tdep.h: Adjust comment.
* alpha-nbsd-tdep.c: Rename to ...
* alpha-netbsd-tdep.c: ... this, adjust include.
* amd64-nbsd-nat.c: Rename to ...
* amd64-netbsd-nat.c: ... this, adjust include.
* amd64-nbsd-tdep.c: Rename to ...
* amd64-netbsd-tdep.c: ... this, adjust include.
* amd64-tdep.h: Adjust include.
* arm-nbsd-nat.c: Rename to ...
* arm-netbsd-nat.c: ... this, adjust include.
* arm-nbsd-tdep.c: Rename to ...
* arm-netbsd-tdep.c: ... this, adjust include.
* arm-nbsd-tdep.h: Rename to ...
* arm-netbsd-tdep.h: ... this, adjust include.
* configure.nat: Adjust file lists.
* configure.tgt: Likewise.
* hppa-nbsd-nat.c: Rename to ...
* hppa-netbsd-nat.c: ... this, adjust include.
* hppa-nbsd-tdep.c: Rename to ...
* hppa-netbsd-tdep.c: ... this, adjust include.
* i386-nbsd-nat.c: Rename to ...
* i386-netbsd-nat.c: ... this, adjust include.
* i386-nbsd-tdep.c: Rename to ...
* i386-netbsd-tdep.c: ... this, adjust include.
* m68k-bsd-nat.c: Adjust include.
* mips-nbsd-nat.c: Rename to ...
* mips-netbsd-nat.c: ... this, adjust include.
* mips-nbsd-tdep.c: Rename to ...
* mips-netbsd-tdep.c: ... this, adjust include.
* mips-nbsd-tdep.h: Rename to ...
* mips-netbsd-tdep.h: ... this.
* nbsd-nat.c: Rename to ...
* netbsd-nat.c: ... this, adjust include.
* nbsd-nat.h: Rename to ...
* netbsd-nat.h: ... this, adjust include.
* nbsd-tdep.c: Rename to ...
* netbsd-tdep.c: ... this, adjust include.
* nbsd-tdep.h: Rename to ...
* netbsd-tdep.h: ... this.
* ppc-nbsd-nat.c: Rename to ...
* ppc-netbsd-nat.c: ... this, adjust include.
* ppc-nbsd-tdep.c: Rename to ...
* ppc-netbsd-tdep.c: ... this, adjust include and comment.
* ppc-nbsd-tdep.h: Rename to ...
* ppc-netbsd-tdep.h: ... this.
* sh-nbsd-nat.c: Rename to ...
* sh-netbsd-nat.c: ... this, adjust include.
* sh-nbsd-tdep.c: Rename to ...
* sh-netbsd-tdep.c: ... this, adjust include.
* sparc-nbsd-nat.c: Rename to ...
* sparc-netbsd-nat.c: ... this.
* sparc-nbsd-tdep.c: Rename to ...
* sparc-netbsd-tdep.c: ... this, adjust include.
* sparc64-nbsd-nat.c: Rename to ...
* sparc64-netbsd-nat.c: ... this.
* sparc64-nbsd-tdep.c: Rename to ...
* sparc64-netbsd-tdep.c: ... this, adjust include.
* sparc64-tdep.h: Adjust comment.
* vax-bsd-nat.c: Adjust include.
* vax-nbsd-tdep.c: Rename to ...
* vax-netbsd-tdep.c: ... this, adjust include.
2020-10-07 03:36:22 +08:00
|
|
|
x86-bsd-nat.o i386-bsd-nat.o i386-netbsd-nat.o bsd-kvm.o"
|
2017-05-03 09:32:33 +08:00
|
|
|
LOADLIBES='-lkvm'
|
|
|
|
;;
|
|
|
|
m68k)
|
|
|
|
# Host: NetBSD/m68k ELF
|
|
|
|
NATDEPFILES="${NATDEPFILES} m68k-bsd-nat.o bsd-kvm.o"
|
|
|
|
LOADLIBES='-lkvm'
|
|
|
|
;;
|
|
|
|
sparc)
|
|
|
|
# Host: NetBSD/sparc ELF
|
Normalize names of the NetBSD files
The files used to be named 'nbsd', which incorrectly reflects
the name of the OS and confuses it with other BSD derived OSes.
gdb/ChangeLog:
* Makefile.in (ALL_64_TARGET_OBS, ALL_TARGET_OBS)
HFILES_NO_SRCDIR, ALLDEPFILES): Rename files.
* alpha-bsd-nat.c: Adjust include.
* alpha-bsd-tdep.h: Adjust comment.
* alpha-nbsd-tdep.c: Rename to ...
* alpha-netbsd-tdep.c: ... this, adjust include.
* amd64-nbsd-nat.c: Rename to ...
* amd64-netbsd-nat.c: ... this, adjust include.
* amd64-nbsd-tdep.c: Rename to ...
* amd64-netbsd-tdep.c: ... this, adjust include.
* amd64-tdep.h: Adjust include.
* arm-nbsd-nat.c: Rename to ...
* arm-netbsd-nat.c: ... this, adjust include.
* arm-nbsd-tdep.c: Rename to ...
* arm-netbsd-tdep.c: ... this, adjust include.
* arm-nbsd-tdep.h: Rename to ...
* arm-netbsd-tdep.h: ... this, adjust include.
* configure.nat: Adjust file lists.
* configure.tgt: Likewise.
* hppa-nbsd-nat.c: Rename to ...
* hppa-netbsd-nat.c: ... this, adjust include.
* hppa-nbsd-tdep.c: Rename to ...
* hppa-netbsd-tdep.c: ... this, adjust include.
* i386-nbsd-nat.c: Rename to ...
* i386-netbsd-nat.c: ... this, adjust include.
* i386-nbsd-tdep.c: Rename to ...
* i386-netbsd-tdep.c: ... this, adjust include.
* m68k-bsd-nat.c: Adjust include.
* mips-nbsd-nat.c: Rename to ...
* mips-netbsd-nat.c: ... this, adjust include.
* mips-nbsd-tdep.c: Rename to ...
* mips-netbsd-tdep.c: ... this, adjust include.
* mips-nbsd-tdep.h: Rename to ...
* mips-netbsd-tdep.h: ... this.
* nbsd-nat.c: Rename to ...
* netbsd-nat.c: ... this, adjust include.
* nbsd-nat.h: Rename to ...
* netbsd-nat.h: ... this, adjust include.
* nbsd-tdep.c: Rename to ...
* netbsd-tdep.c: ... this, adjust include.
* nbsd-tdep.h: Rename to ...
* netbsd-tdep.h: ... this.
* ppc-nbsd-nat.c: Rename to ...
* ppc-netbsd-nat.c: ... this, adjust include.
* ppc-nbsd-tdep.c: Rename to ...
* ppc-netbsd-tdep.c: ... this, adjust include and comment.
* ppc-nbsd-tdep.h: Rename to ...
* ppc-netbsd-tdep.h: ... this.
* sh-nbsd-nat.c: Rename to ...
* sh-netbsd-nat.c: ... this, adjust include.
* sh-nbsd-tdep.c: Rename to ...
* sh-netbsd-tdep.c: ... this, adjust include.
* sparc-nbsd-nat.c: Rename to ...
* sparc-netbsd-nat.c: ... this.
* sparc-nbsd-tdep.c: Rename to ...
* sparc-netbsd-tdep.c: ... this, adjust include.
* sparc64-nbsd-nat.c: Rename to ...
* sparc64-netbsd-nat.c: ... this.
* sparc64-nbsd-tdep.c: Rename to ...
* sparc64-netbsd-tdep.c: ... this, adjust include.
* sparc64-tdep.h: Adjust comment.
* vax-bsd-nat.c: Adjust include.
* vax-nbsd-tdep.c: Rename to ...
* vax-netbsd-tdep.c: ... this, adjust include.
2020-10-07 03:36:22 +08:00
|
|
|
NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc-netbsd-nat.o \
|
2017-05-03 09:32:33 +08:00
|
|
|
bsd-kvm.o"
|
|
|
|
LOADLIBES='-lkvm'
|
|
|
|
;;
|
|
|
|
vax)
|
|
|
|
# Host: NetBSD/vax ELF
|
|
|
|
NATDEPFILES="${NATDEPFILES} vax-bsd-nat.o bsd-kvm.o"
|
|
|
|
LOADLIBES='-lkvm'
|
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
obsd)
|
|
|
|
case ${gdb_host_cpu} in
|
|
|
|
i386)
|
|
|
|
# Host: OpenBSD/i386 ELF
|
|
|
|
NATDEPFILES="${NATDEPFILES} obsd-nat.o x86-bsd-nat.o \
|
|
|
|
i386-bsd-nat.o i386-obsd-nat.o bsd-kvm.o"
|
|
|
|
LOADLIBES='-lkvm'
|
|
|
|
;;
|
|
|
|
m68k)
|
|
|
|
# Host: OpenBSD/m68k
|
|
|
|
NATDEPFILES="${NATDEPFILES} m68k-bsd-nat.o bsd-kvm.o"
|
|
|
|
LOADLIBES='-lkvm'
|
|
|
|
;;
|
|
|
|
pa)
|
|
|
|
# Host: OpenBSD/hppa
|
|
|
|
NATDEPFILES="${NATDEPFILES} obsd-nat.o hppa-obsd-nat.o"
|
|
|
|
;;
|
|
|
|
powerpc)
|
|
|
|
# Host: OpenBSD/powerpc
|
|
|
|
NATDEPFILES="${NATDEPFILES} obsd-nat.o ppc-obsd-nat.o bsd-kvm.o"
|
|
|
|
LOADLIBES='-lkvm'
|
|
|
|
;;
|
|
|
|
vax)
|
|
|
|
# Host: OpenBSD/vax
|
|
|
|
NATDEPFILES="${NATDEPFILES} vax-bsd-nat.o bsd-kvm.o"
|
|
|
|
LOADLIBES='-lkvm'
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
obsd64)
|
|
|
|
case ${gdb_host_cpu} in
|
|
|
|
i386)
|
|
|
|
# Host: OpenBSD/amd64
|
2021-07-30 04:16:28 +08:00
|
|
|
NATDEPFILES="${NATDEPFILES} obsd-nat.o amd64-nat.o \
|
|
|
|
x86-bsd-nat.o amd64-bsd-nat.o amd64-obsd-nat.o bsd-kvm.o"
|
2017-05-03 09:32:33 +08:00
|
|
|
LOADLIBES='-lkvm'
|
|
|
|
;;
|
|
|
|
mips)
|
|
|
|
# Host: OpenBSD/mips64
|
|
|
|
NATDEPFILES="${NATDEPFILES} obsd-nat.o mips64-obsd-nat.o"
|
|
|
|
;;
|
|
|
|
sparc)
|
|
|
|
# Host: OpenBSD/sparc64
|
|
|
|
NATDEPFILES="${NATDEPFILES} obsd-nat.o sparc64-obsd-nat.o \
|
|
|
|
sparc-nat.o bsd-kvm.o"
|
|
|
|
LOADLIBES='-lkvm'
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
ppc64-linux)
|
|
|
|
case ${gdb_host_cpu} in
|
|
|
|
powerpc)
|
|
|
|
# Host: PowerPC64, running Linux
|
|
|
|
XM_CLIBS=
|
2018-12-25 03:01:34 +08:00
|
|
|
NATDEPFILES="${NATDEPFILES} ppc-linux-nat.o nat/ppc-linux.o"
|
2017-05-03 09:32:33 +08:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
sol2)
|
|
|
|
case ${gdb_host_cpu} in
|
Remove support for Solaris < 10 (PR gdb/22185)
Given that GCC has obsoleted/removed support for Solaris 9 in GCC 4.9/5 in 2013:
https://gcc.gnu.org/gcc-4.9/changes.html
https://gcc.gnu.org/ml/gcc-patches/2013-05/msg00728.html
and the last gdb version that can be compiled with gcc 4.9 is 7.12.1 only when
configured with --disable-build-with-cxx, it's time to obsolete/remove support
for Solaris < 10.
This patch does this, simplifying configure.nat along the way (only a single
sol2 configuration with variants for i386 and sparc).
Some configure checks for older Solaris versions can go, too, and the check
for libthread_db.so.1 removed:
* Since Solaris 10, dlopen has moved to libc and libdl.so is just a
filter on ld.so.1, so no need to check.
* $RDYNAMIC is already handled above (and is a no-op with Solaris ld
anyway).
Both proc-service.c and sol-thread.c lose support for (Solaris-only)
PROC_SERVICE_IS_OLD.
The attached revised patch has been tested on sparcv9-sun-solaris2.10,
sparcv9-sun-solaris2.11.4, amd64-pc-solaris2.10, amd64-pc-solaris2.11.4,
and x86_64-pc-linux-gnu.
I've also started an i386-pc-solaris2.9 build to check that it really
stops as expected.
PR gdb/22185
* configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
obsolete.
Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
Remove i386sol2 support.
* configure.nat <i386sol2>: Remove.
<sol2-64>: Fold into ...
<sol2>: ... this.
Move common settings to default section.
Add sol-thread.o.
* configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
x86_64-*-solaris2.1[0-9]*>: Rename to ...
<i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
<i[34567]86-*-solaris*>: Remove.
<sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
* configure.ac: Remove wctype in libw check.
(_MSE_INT_H): Don't define on Solaris 7-9.
<solaris*>: Remove libthread_db.so.1 check.
* configure: Regenerate.
* config.in: Regenerate.
* proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
(gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
(gdb_ps_size_t): Remove.
Use base types in users.
* sol-thread.c: Likewise, also for gdb_ps_addr_t.
* NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
2017-09-26 21:19:10 +08:00
|
|
|
i386)
|
|
|
|
# Host: Solaris x86_64
|
|
|
|
NATDEPFILES="${NATDEPFILES} \
|
2018-09-20 16:10:07 +08:00
|
|
|
amd64-nat.o i386-sol2-nat.o"
|
Remove support for Solaris < 10 (PR gdb/22185)
Given that GCC has obsoleted/removed support for Solaris 9 in GCC 4.9/5 in 2013:
https://gcc.gnu.org/gcc-4.9/changes.html
https://gcc.gnu.org/ml/gcc-patches/2013-05/msg00728.html
and the last gdb version that can be compiled with gcc 4.9 is 7.12.1 only when
configured with --disable-build-with-cxx, it's time to obsolete/remove support
for Solaris < 10.
This patch does this, simplifying configure.nat along the way (only a single
sol2 configuration with variants for i386 and sparc).
Some configure checks for older Solaris versions can go, too, and the check
for libthread_db.so.1 removed:
* Since Solaris 10, dlopen has moved to libc and libdl.so is just a
filter on ld.so.1, so no need to check.
* $RDYNAMIC is already handled above (and is a no-op with Solaris ld
anyway).
Both proc-service.c and sol-thread.c lose support for (Solaris-only)
PROC_SERVICE_IS_OLD.
The attached revised patch has been tested on sparcv9-sun-solaris2.10,
sparcv9-sun-solaris2.11.4, amd64-pc-solaris2.10, amd64-pc-solaris2.11.4,
and x86_64-pc-linux-gnu.
I've also started an i386-pc-solaris2.9 build to check that it really
stops as expected.
PR gdb/22185
* configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
obsolete.
Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
Remove i386sol2 support.
* configure.nat <i386sol2>: Remove.
<sol2-64>: Fold into ...
<sol2>: ... this.
Move common settings to default section.
Add sol-thread.o.
* configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
x86_64-*-solaris2.1[0-9]*>: Rename to ...
<i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
<i[34567]86-*-solaris*>: Remove.
<sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
* configure.ac: Remove wctype in libw check.
(_MSE_INT_H): Don't define on Solaris 7-9.
<solaris*>: Remove libthread_db.so.1 check.
* configure: Regenerate.
* config.in: Regenerate.
* proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
(gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
(gdb_ps_size_t): Remove.
Use base types in users.
* sol-thread.c: Likewise, also for gdb_ps_addr_t.
* NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
2017-09-26 21:19:10 +08:00
|
|
|
;;
|
2017-05-03 09:32:33 +08:00
|
|
|
sparc)
|
|
|
|
# Host: Solaris SPARC & UltraSPARC
|
|
|
|
NAT_FILE='nm-sol2.h'
|
Remove support for Solaris < 10 (PR gdb/22185)
Given that GCC has obsoleted/removed support for Solaris 9 in GCC 4.9/5 in 2013:
https://gcc.gnu.org/gcc-4.9/changes.html
https://gcc.gnu.org/ml/gcc-patches/2013-05/msg00728.html
and the last gdb version that can be compiled with gcc 4.9 is 7.12.1 only when
configured with --disable-build-with-cxx, it's time to obsolete/remove support
for Solaris < 10.
This patch does this, simplifying configure.nat along the way (only a single
sol2 configuration with variants for i386 and sparc).
Some configure checks for older Solaris versions can go, too, and the check
for libthread_db.so.1 removed:
* Since Solaris 10, dlopen has moved to libc and libdl.so is just a
filter on ld.so.1, so no need to check.
* $RDYNAMIC is already handled above (and is a no-op with Solaris ld
anyway).
Both proc-service.c and sol-thread.c lose support for (Solaris-only)
PROC_SERVICE_IS_OLD.
The attached revised patch has been tested on sparcv9-sun-solaris2.10,
sparcv9-sun-solaris2.11.4, amd64-pc-solaris2.10, amd64-pc-solaris2.11.4,
and x86_64-pc-linux-gnu.
I've also started an i386-pc-solaris2.9 build to check that it really
stops as expected.
PR gdb/22185
* configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
obsolete.
Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
Remove i386sol2 support.
* configure.nat <i386sol2>: Remove.
<sol2-64>: Fold into ...
<sol2>: ... this.
Move common settings to default section.
Add sol-thread.o.
* configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
x86_64-*-solaris2.1[0-9]*>: Rename to ...
<i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
<i[34567]86-*-solaris*>: Remove.
<sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
* configure.ac: Remove wctype in libw check.
(_MSE_INT_H): Don't define on Solaris 7-9.
<solaris*>: Remove libthread_db.so.1 check.
* configure: Regenerate.
* config.in: Regenerate.
* proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
(gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
(gdb_ps_size_t): Remove.
Use base types in users.
* sol-thread.c: Likewise, also for gdb_ps_addr_t.
* NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
2017-09-26 21:19:10 +08:00
|
|
|
NATDEPFILES="${NATDEPFILES} sparc-sol2-nat.o"
|
2017-05-03 09:32:33 +08:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
Introduce "gdb/configure.nat" (and delete "gdb/config/*/*.mh" files)
Due to my ongoing work to make it possible for gdbserver to start the
inferior using the shell, I had to share the fork_inferior function
under the "nat/" directory. In order to do that, I created a new file
and put the function there; however, this meant that I now had to
update some of the *.mh files (under "gdb/config") and add the new
file as a dependency to be built natively. Bleh...
After talking a bit to Pedro about this, the idea came up to write a
new "gdb/configure.nat" file, a la "gdb/configure.tgt", which would
concentrate all of the native settings for each host/system. I
decided to tackle this issue.
The patch is simple. All of the previous Makefile variables that were
being declared inside the *.mh files are now inside "gdb/Makefile.in",
and "gdb/configure" is responsible for AC_SUBST'ing them. The
definitions of these variables were put inside "gdb/configure.nat", so
now they're shell variables. For excerpts of Makefile code, one must
create a file under "gdb/config/${gdb_cpu_host}" and reference it on
the "nat_extra_makefile_frag" variable.
It should now be easier to update the native dependencies of hosts in
this single file.
This has been tested on x86_64 without regressions.
gdb/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in: Remove "@host_makefile_frag@". Add variables
NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
"@nat_extra_makefile_frag@".
(Makefile): Remove dependency on "@frags@".
($(GNULIB_BUILDDIR)/Makefile): Likewise.
(data-directory/Makefile): Likewise.
* config/aarch64/linux.mh: Deleted; moved contents to
"gdb/configure.nat".
* config/alpha/alpha-linux.mh: Likewise.
* config/alpha/nbsd.mh: Likewise.
* config/arm/linux.mh: Likewise.
* config/arm/nbsdelf.mh: Likewise.
* config/i386/cygwin.mh: Likewise.
* config/i386/cygwin64.mh: Likewise.
* config/i386/darwin.mh: Likewise.
* config/i386/fbsd.mh: Likewise.
* config/i386/fbsd64.mh: Likewise.
* config/i386/go32.mh: Likewise.
* config/i386/i386gnu.mh: Likewise.
* config/i386/i386sol2.mh: Likewise.
* config/i386/linux.mh: Likewise.
* config/i386/linux64.mh: Likewise.
* config/i386/mingw.mh: Likewise.
* config/i386/mingw64.mh: Likewise.
* config/i386/nbsd64.mh: Likewise.
* config/i386/nbsdelf.mh: Likewise.
* config/i386/nto.mh: Likewise.
* config/i386/obsd.mh: Likewise.
* config/i386/obsd64.mh: Likewise.
* config/i386/sol2-64.mh: Likewise.
* config/ia64/linux.mh: Likewise.
* config/m32r/linux.mh: Likewise.
* config/m68k/linux.mh: Likewise.
* config/m68k/nbsdelf.mh: Likewise.
* config/m68k/obsd.mh: Likewise.
* config/m88k/obsd.mh: Likewise.
* config/mips/fbsd.mh: Likewise.
* config/mips/linux.mh: Likewise.
* config/mips/nbsd.mh: Likewise.
* config/mips/obsd64.mh: Likewise.
* config/pa/linux.mh: Likewise.
* config/pa/nbsd.mh: Likewise.
* config/pa/obsd.mh: Likewise.
* config/powerpc/aix.mh: Likewise.
* config/powerpc/fbsd.mh: Likewise.
* config/powerpc/linux.mh: Likewise.
* config/powerpc/nbsd.mh: Likewise.
* config/powerpc/obsd.mh: Likewise.
* config/powerpc/ppc64-linux.mh: Likewise.
* config/powerpc/spu-linux.mh: Likewise.
* config/s390/linux.mh: Likewise.
* config/sh/nbsd.mh: Likewise.
* config/sparc/fbsd.mh: Likewise.
* config/sparc/linux.mh: Likewise.
* config/sparc/linux64.mh: Likewise.
* config/sparc/nbsd64.mh: Likewise.
* config/sparc/nbsdelf.mh: Likewise.
* config/sparc/obsd64.mh: Likewise.
* config/sparc/sol2.mh: Likewise.
* config/tilegx/linux.mh: Likewise.
* config/vax/nbsdelf.mh: Likewise.
* config/vax/obsd.mh: Likewise.
* config/xtensa/linux.mh: Likewise.
* config/i386/i386gnu.mn: New file, with excerpts from
"config/i386/i386gnu.mh".
* configure: Regenerate.
* configure.ac: Rewrite code to use "gdb/configure.nat" instead of
*.mh files under "gdb/config".
* configure.nat: New file, with contents from the
"gdb/config/*/*.mh" files.
gdb/doc/ChangeLog:
2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile: Remove "@host_makefile_frag@".
2017-04-26 04:03:39 +08:00
|
|
|
esac
|