aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-12-24 12:01:34 -0700
committerTom Tromey <tom@tromey.com>2018-12-27 13:15:31 -0700
commit6987262214a204ea3ab857d86a1faf9f4e66f211 (patch)
treea1943c2805edb3b185d29619ec9c48c407715496 /gdb
parentb180d0a254034c14fd540c1b57391bb413f788f7 (diff)
downloadgdb-6987262214a204ea3ab857d86a1faf9f4e66f211.zip
gdb-6987262214a204ea3ab857d86a1faf9f4e66f211.tar.gz
gdb-6987262214a204ea3ab857d86a1faf9f4e66f211.tar.bz2
Build gdb "nat" files in subdirectory
This moves the various "nat" object files into the nat/ subdirectory. This allows for the removal of a pattern rule from the gdb Makefile, which is a small cleanup. I made the configure.nat change in a (semi-) automated way, hopefully meaning that it is more likely to be correct than had I done it by hand. Eventually I would like for the various configure scripts to only mention source files, and let the Makefile compute the object file names. gdb/ChangeLog 2018-12-27 Tom Tromey <tom@tromey.com> * configure.nat (NATDEPFILES): Use nat/ prefix. * Makefile.in (CONFIG_SRC_SUBDIR): Add nat. (%.o: ${srcdir}/nat/%.c): Remove rule. (INIT_FILES): Do not filter out NATDEPFILES.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/Makefile.in9
-rw-r--r--gdb/configure.nat73
3 files changed, 50 insertions, 39 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5c7e98b..9d1b1ab 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2018-12-27 Tom Tromey <tom@tromey.com>
+ * configure.nat (NATDEPFILES): Use nat/ prefix.
+ * Makefile.in (CONFIG_SRC_SUBDIR): Add nat.
+ (%.o: ${srcdir}/nat/%.c): Remove rule.
+ (INIT_FILES): Do not filter out NATDEPFILES.
+
+2018-12-27 Tom Tromey <tom@tromey.com>
+
* Makefile.in (INIT_FILES): Redefine.
(stamp-init): Remove sed, tr invocations. Use for loop. Don't
set LANG or LC_ALL.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 713b0d8..bbff688 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -525,7 +525,8 @@ CONFIG_INSTALL = @CONFIG_INSTALL@
CONFIG_UNINSTALL = @CONFIG_UNINSTALL@
HAVE_NATIVE_GCORE_TARGET = @HAVE_NATIVE_GCORE_TARGET@
-CONFIG_SRC_SUBDIR = arch cli mi common compile tui unittests guile python target
+CONFIG_SRC_SUBDIR = arch cli mi common compile tui unittests guile python \
+ target nat
CONFIG_DEP_SUBDIR = $(addsuffix /$(DEPDIR),$(CONFIG_SRC_SUBDIR))
# -I. for config files.
@@ -1635,10 +1636,6 @@ python/%.o: INTERNAL_CFLAGS += $(PYTHON_CFLAGS)
$(COMPILE) $(all_gdbtk_cflags) $<
$(POSTCOMPILE)
-%.o: ${srcdir}/nat/%.c
- $(COMPILE) $<
- $(POSTCOMPILE)
-
installcheck:
# The check target can not use subdir_do, because subdir_do does not
@@ -1837,7 +1834,7 @@ test-cp-name-parser$(EXEEXT): test-cp-name-parser.o $(LIBIBERTY)
INIT_FILES = \
$(patsubst %.o,%.c, \
$(patsubst %-exp.o,%-exp.y, \
- $(filter-out $(NATDEPFILES) init.o version.o %_S.o %_U.o,\
+ $(filter-out init.o version.o %_S.o %_U.o,\
$(COMMON_OBS))))
init.c: stamp-init; @true
diff --git a/gdb/configure.nat b/gdb/configure.nat
index 7bba7f4..dead116 100644
--- a/gdb/configure.nat
+++ b/gdb/configure.nat
@@ -54,40 +54,41 @@
case ${gdb_host} in
*linux*)
NAT_FILE='config/nm-linux.h'
- NATDEPFILES='inf-ptrace.o fork-child.o fork-inferior.o proc-service.o \
- linux-thread-db.o linux-nat.o linux-osdata.o linux-fork.o \
- linux-procfs.o linux-ptrace.o linux-waitpid.o \
- linux-personality.o linux-namespaces.o'
+ 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'
NAT_CDEPS='$(srcdir)/proc-service.list'
LOADLIBES='-ldl $(RDYNAMIC)'
;;
fbsd*)
- NATDEPFILES='fork-child.o fork-inferior.o inf-ptrace.o fbsd-nat.o'
+ NATDEPFILES='fork-child.o nat/fork-inferior.o inf-ptrace.o fbsd-nat.o'
HAVE_NATIVE_GCORE_HOST=1
LOADLIBES='-lkvm'
;;
nbsd*)
- NATDEPFILES='fork-child.o fork-inferior.o inf-ptrace.o'
+ NATDEPFILES='fork-child.o nat/fork-inferior.o inf-ptrace.o'
HAVE_NATIVE_GCORE_HOST=1
;;
obsd*)
- NATDEPFILES='fork-child.o fork-inferior.o inf-ptrace.o'
+ NATDEPFILES='fork-child.o nat/fork-inferior.o inf-ptrace.o'
;;
cygwin*)
- NATDEPFILES='x86-nat.o x86-dregs.o windows-nat.o'
+ NATDEPFILES='x86-nat.o nat/x86-dregs.o windows-nat.o'
;;
mingw*)
- NATDEPFILES='x86-nat.o x86-dregs.o windows-nat.o'
+ NATDEPFILES='x86-nat.o nat/x86-dregs.o windows-nat.o'
;;
aix)
- NATDEPFILES='fork-inferior.o fork-child.o inf-ptrace.o'
+ NATDEPFILES='nat/fork-inferior.o fork-child.o inf-ptrace.o'
;;
darwin)
- NATDEPFILES='fork-child.o fork-inferior.o darwin-nat.o \
+ NATDEPFILES='fork-child.o nat/fork-inferior.o darwin-nat.o \
darwin-nat-info.o'
;;
sol2)
- NATDEPFILES='fork-child.o fork-inferior.o \
+ NATDEPFILES='fork-child.o nat/fork-inferior.o \
procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o \
sol-thread.o'
HAVE_NATIVE_GCORE_HOST=1
@@ -145,7 +146,7 @@ case ${gdb_host} in
i386)
# Host: IA86 running Darwin
NATDEPFILES="${NATDEPFILES} i386-darwin-nat.o x86-nat.o \
- x86-dregs.o amd64-nat.o"
+ nat/x86-dregs.o amd64-nat.o"
;;
esac
;;
@@ -163,7 +164,7 @@ case ${gdb_host} in
;;
i386)
# Host: FreeBSD/i386
- NATDEPFILES="${NATDEPFILES} x86-nat.o x86-dregs.o \
+ NATDEPFILES="${NATDEPFILES} x86-nat.o nat/x86-dregs.o \
x86-bsd-nat.o i386-bsd-nat.o i386-fbsd-nat.o bsd-kvm.o"
;;
mips)
@@ -192,7 +193,8 @@ case ${gdb_host} in
i386)
# Host: FreeBSD/amd64
NATDEPFILES="${NATDEPFILES} amd64-nat.o amd64-bsd-nat.o \
- amd64-fbsd-nat.o bsd-kvm.o x86-nat.o x86-dregs.o x86-bsd-nat.o"
+ amd64-fbsd-nat.o bsd-kvm.o x86-nat.o nat/x86-dregs.o \
+ x86-bsd-nat.o"
;;
esac
;;
@@ -202,7 +204,7 @@ case ${gdb_host} in
# Host: Intel x86 running DJGPP
# We include several header files from config/djgpp
MH_CFLAGS='-I$(srcdir)/config/djgpp'
- NATDEPFILES='go32-nat.o x86-nat.o x86-dregs.o'
+ NATDEPFILES='go32-nat.o x86-nat.o nat/x86-dregs.o'
XM_CLIBS='-ldbg'
;;
esac
@@ -212,7 +214,7 @@ case ${gdb_host} in
i386)
# Host: Intel 386 running the GNU Hurd
NATDEPFILES='i386-gnu-nat.o gnu-nat.o \
- x86-nat.o x86-dregs.o fork-child.o \
+ x86-nat.o nat/x86-dregs.o fork-child.o \
notify_S.o process_reply_S.o msg_reply_S.o \
msg_U.o exc_request_U.o exc_request_S.o'
HAVE_NATIVE_GCORE_HOST=1
@@ -231,8 +233,9 @@ case ${gdb_host} in
aarch64)
# Host: AArch64 based machine running GNU/Linux
NATDEPFILES="${NATDEPFILES} aarch64-linux-nat.o \
- aarch32-linux-nat.o aarch64-linux-hw-point.o aarch64-linux.o \
- aarch64-sve-linux-ptrace.o"
+ aarch32-linux-nat.o nat/aarch64-linux-hw-point.o \
+ nat/aarch64-linux.o \
+ nat/aarch64-sve-linux-ptrace.o"
;;
arm)
# Host: ARM based machine running GNU/Linux
@@ -241,9 +244,9 @@ case ${gdb_host} in
;;
i386)
# Host: Intel 386 running GNU/Linux.
- NATDEPFILES="${NATDEPFILES} x86-nat.o x86-dregs.o \
- i386-linux-nat.o x86-linux-nat.o linux-btrace.o \
- x86-linux.o x86-linux-dregs.o"
+ NATDEPFILES="${NATDEPFILES} x86-nat.o nat/x86-dregs.o \
+ i386-linux-nat.o x86-linux-nat.o nat/linux-btrace.o \
+ nat/x86-linux.o nat/x86-linux-dregs.o"
;;
ia64)
# Host: Intel IA-64 running GNU/Linux
@@ -260,7 +263,7 @@ case ${gdb_host} in
mips)
# Host: Linux/MIPS
NATDEPFILES="${NATDEPFILES} linux-nat-trad.o \
- mips-linux-nat.o mips-linux-watch.o"
+ mips-linux-nat.o nat/mips-linux-watch.o"
;;
pa)
# Host: Hewlett-Packard PA-RISC machine, running Linux
@@ -268,7 +271,7 @@ case ${gdb_host} in
;;
powerpc)
# Host: PowerPC, running Linux
- NATDEPFILES="${NATDEPFILES} ppc-linux-nat.o ppc-linux.o"
+ NATDEPFILES="${NATDEPFILES} ppc-linux-nat.o nat/ppc-linux.o"
;;
riscv*)
# Host: RISC-V, running Linux
@@ -297,9 +300,11 @@ case ${gdb_host} in
case ${gdb_host_cpu} in
i386)
# Host: GNU/Linux x86-64
- NATDEPFILES="${NATDEPFILES} x86-nat.o x86-dregs.o \
- amd64-nat.o amd64-linux-nat.o x86-linux-nat.o linux-btrace.o \
- x86-linux.o x86-linux-dregs.o amd64-linux-siginfo.o"
+ NATDEPFILES="${NATDEPFILES} x86-nat.o nat/x86-dregs.o \
+ amd64-nat.o amd64-linux-nat.o x86-linux-nat.o \
+ nat/linux-btrace.o \
+ nat/x86-linux.o nat/x86-linux-dregs.o \
+ nat/amd64-linux-siginfo.o"
;;
sparc)
# Host: GNU/Linux UltraSPARC
@@ -354,7 +359,7 @@ case ${gdb_host} in
i386)
# Host: NetBSD/amd64
NATDEPFILES="${NATDEPFILES} nbsd-nat.o amd64-nat.o x86-nat.o \
- x86-dregs.o x86-bsd-nat.o amd64-bsd-nat.o amd64-nbsd-nat.o"
+ nat/x86-dregs.o x86-bsd-nat.o amd64-bsd-nat.o amd64-nbsd-nat.o"
;;
sparc)
# Host: NetBSD/sparc64
@@ -373,7 +378,8 @@ case ${gdb_host} in
;;
i386)
# Host: NetBSD/i386 ELF
- NATDEPFILES="${NATDEPFILES} nbsd-nat.o x86-nat.o x86-dregs.o \
+ NATDEPFILES="${NATDEPFILES} nbsd-nat.o x86-nat.o \
+ nat/x86-dregs.o \
x86-bsd-nat.o i386-bsd-nat.o i386-nbsd-nat.o bsd-kvm.o"
LOADLIBES='-lkvm'
;;
@@ -459,7 +465,7 @@ case ${gdb_host} in
powerpc)
# Host: PowerPC64, running Linux
XM_CLIBS=
- NATDEPFILES="${NATDEPFILES} ppc-linux-nat.o ppc-linux.o"
+ NATDEPFILES="${NATDEPFILES} ppc-linux-nat.o nat/ppc-linux.o"
;;
esac
;;
@@ -487,9 +493,10 @@ case ${gdb_host} in
NAT_CDEPS=
LOADLIBES=
NATDEPFILES='spu-linux-nat.o \
- inf-ptrace.o fork-child.o fork-inferior.o \
- linux-procfs.o linux-ptrace.o linux-waitpid.o \
- linux-personality.o linux-namespaces.o'
+ inf-ptrace.o fork-child.o nat/fork-inferior.o \
+ nat/linux-procfs.o nat/linux-ptrace.o \
+ nat/linux-waitpid.o \
+ nat/linux-personality.o nat/linux-namespaces.o'
;;
esac
;;