aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@wdc.com>2020-01-24 12:56:00 +0000
committerMaciej W. Rozycki <macro@wdc.com>2020-01-24 12:56:00 +0000
commit42cd72aa0279520384327a1f6d0ebd2eb2200645 (patch)
treeab0253aa183161484fcf8b6df288505819862801
parent42ba50eccbb9793a68d19b4f04598ab657201fcc (diff)
downloadgdb-42cd72aa0279520384327a1f6d0ebd2eb2200645.zip
gdb-42cd72aa0279520384327a1f6d0ebd2eb2200645.tar.gz
gdb-42cd72aa0279520384327a1f6d0ebd2eb2200645.tar.bz2
gdbserver: Make `make TAGS' actually work
Fix a: make: *** No rule to make target '.../gdb/gdbserver/arch/arm.c', needed by 'TAGS'. Stop. error produced by `make TAGS' by making the list of sources processed match actual file locations and by moving host-specific object files listed in DEPFILES to nat/ or target/ subdirectories as appropriate so that the location of the corresponding source file can be mechanically determined. gdb/gdbserver/ * Makefile.in (SFILES): Adjust paths to point to real files. (OBS): Move waitstatus.o to target/waitstatus.o. (TAGS): Transform paths appropriately. (%.o): Rename to... (nat/%.o): ... this pattern rule. (%.o): Rename to... (target/%.o): ... this pattern rule. * configure.srv: Adjust paths throughout to include nat/ prefix with the revant files. * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR. * configure: Regenerate.
-rw-r--r--gdb/gdbserver/ChangeLog14
-rw-r--r--gdb/gdbserver/Makefile.in36
-rwxr-xr-xgdb/gdbserver/configure2
-rw-r--r--gdb/gdbserver/configure.ac2
-rw-r--r--gdb/gdbserver/configure.srv49
5 files changed, 65 insertions, 38 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index bf0d999..5f1e086 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,19 @@
2020-01-24 Maciej W. Rozycki <macro@wdc.com>
+ * Makefile.in (SFILES): Adjust paths to point to real files.
+ (OBS): Move waitstatus.o to target/waitstatus.o.
+ (TAGS): Transform paths appropriately.
+ (%.o): Rename to...
+ (nat/%.o): ... this pattern rule.
+ (%.o): Rename to...
+ (target/%.o): ... this pattern rule.
+ * configure.srv: Adjust paths throughout to include nat/ prefix
+ with the revant files.
+ * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
+ * configure: Regenerate.
+
+2020-01-24 Maciej W. Rozycki <macro@wdc.com>
+
* Makefile.in (TAGS): Remove config files from the recipe.
2020-01-14 Tom Tromey <tom@tromey.com>
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index d550830..d8cd505 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -198,11 +198,11 @@ SFILES = \
$(srcdir)/win32-low.c \
$(srcdir)/wincecompat.c \
$(srcdir)/x86-low.c \
- $(srcdir)/arch/arm.c \
- $(srcdir)/arch/arm-get-next-pcs.c \
- $(srcdir)/arch/arm-linux.c \
- $(srcdir)/arch/ppc-linux-common.c \
$(srcdir)/../alloc.c \
+ $(srcdir)/../arch/arm.c \
+ $(srcdir)/../arch/arm-get-next-pcs.c \
+ $(srcdir)/../arch/arm-linux.c \
+ $(srcdir)/../arch/ppc-linux-common.c \
$(srcdir)/../../gdbsupport/btrace-common.c \
$(srcdir)/../../gdbsupport/buffer.c \
$(srcdir)/../../gdbsupport/cleanups.c \
@@ -229,15 +229,15 @@ SFILES = \
$(srcdir)/../../gdbsupport/safe-strerror.c \
$(srcdir)/../../gdbsupport/tdesc.c \
$(srcdir)/../../gdbsupport/xml-utils.c \
- $(srcdir)/nat/aarch64-sve-linux-ptrace.c \
- $(srcdir)/nat/linux-btrace.c \
- $(srcdir)/nat/linux-namespaces.c \
- $(srcdir)/nat/linux-osdata.c \
- $(srcdir)/nat/linux-personality.c \
- $(srcdir)/nat/mips-linux-watch.c \
- $(srcdir)/nat/ppc-linux.c \
- $(srcdir)/nat/fork-inferior.c \
- $(srcdir)/target/waitstatus.c
+ $(srcdir)/../nat/aarch64-sve-linux-ptrace.c \
+ $(srcdir)/../nat/linux-btrace.c \
+ $(srcdir)/../nat/linux-namespaces.c \
+ $(srcdir)/../nat/linux-osdata.c \
+ $(srcdir)/../nat/linux-personality.c \
+ $(srcdir)/../nat/mips-linux-watch.c \
+ $(srcdir)/../nat/ppc-linux.c \
+ $(srcdir)/../nat/fork-inferior.c \
+ $(srcdir)/../target/waitstatus.c
DEPFILES = @GDBSERVER_DEPFILES@
@@ -295,7 +295,7 @@ OBS = \
tracepoint.o \
utils.o \
version.o \
- waitstatus.o \
+ target/waitstatus.o \
$(DEPFILES) \
$(LIBOBJS) \
$(XML_BUILTIN)
@@ -459,7 +459,9 @@ TAGS: ${TAGFILES}
etags \
`for i in yzzy ${DEPFILES}; do \
if [ x$$i != xyzzy ]; then \
- echo ${srcdir}/$$i | sed -e 's/\.o$$/\.c/' ; \
+ echo ${srcdir}/$$i | sed -e 's/\.o$$/\.c/' \
+ -e 's,/\(arch\|nat\|target\)/,/../\1/,' \
+ -e 's,/\(gdbsupport\)/,/../../\1/,'; \
fi; \
done` \
${TAGFILES}
@@ -633,11 +635,11 @@ gdbsupport/%.o: ../../gdbsupport/%.c
$(COMPILE) $<
$(POSTCOMPILE)
-%.o: ../nat/%.c
+nat/%.o: ../nat/%.c
$(COMPILE) $<
$(POSTCOMPILE)
-%.o: ../target/%.c
+target/%.o: ../target/%.c
$(COMPILE) $<
$(POSTCOMPILE)
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
index 0bdc214..169edf7 100755
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
@@ -6025,7 +6025,7 @@ ac_config_commands="$ac_config_commands depdir"
# Create sub-directories for objects and dependencies.
-CONFIG_SRC_SUBDIR="arch gdbsupport"
+CONFIG_SRC_SUBDIR="arch gdbsupport nat target"
ac_config_commands="$ac_config_commands gdbdepdir"
diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac
index 9693543..0654cb4 100644
--- a/gdb/gdbserver/configure.ac
+++ b/gdb/gdbserver/configure.ac
@@ -56,7 +56,7 @@ ACX_NONCANONICAL_HOST
ZW_CREATE_DEPDIR
# Create sub-directories for objects and dependencies.
-CONFIG_SRC_SUBDIR="arch gdbsupport"
+CONFIG_SRC_SUBDIR="arch gdbsupport nat target"
AC_SUBST(CONFIG_SRC_SUBDIR)
AC_CONFIG_COMMANDS([gdbdepdir],[
diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv
index 1a4ab8e..8437c1a 100644
--- a/gdb/gdbserver/configure.srv
+++ b/gdb/gdbserver/configure.srv
@@ -28,21 +28,22 @@ ipa_ppc_linux_regobj="powerpc-32l-ipa.o powerpc-altivec32l-ipa.o powerpc-vsx32l-
# Linux object files. This is so we don't have to repeat
# these files over and over again.
-srv_linux_obj="linux-low.o linux-osdata.o linux-procfs.o linux-ptrace.o linux-waitpid.o linux-personality.o linux-namespaces.o fork-child.o fork-inferior.o"
+srv_linux_obj="linux-low.o nat/linux-osdata.o nat/linux-procfs.o nat/linux-ptrace.o nat/linux-waitpid.o nat/linux-personality.o nat/linux-namespaces.o fork-child.o nat/fork-inferior.o"
# Input is taken from the "${target}" variable.
case "${target}" in
- aarch64*-*-linux*) srv_tgtobj="linux-aarch64-low.o aarch64-linux-hw-point.o"
+ aarch64*-*-linux*) srv_tgtobj="linux-aarch64-low.o"
+ srv_tgtobj="$srv_tgtobj nat/aarch64-linux-hw-point.o"
srv_tgtobj="$srv_tgtobj linux-aarch32-low.o"
srv_tgtobj="$srv_tgtobj linux-aarch32-tdesc.o"
srv_tgtobj="${srv_tgtobj} arch/aarch32.o"
srv_tgtobj="${srv_tgtobj} arch/arm.o"
- srv_tgtobj="$srv_tgtobj aarch64-linux.o"
+ srv_tgtobj="$srv_tgtobj nat/aarch64-linux.o"
srv_tgtobj="$srv_tgtobj arch/aarch64-insn.o"
srv_tgtobj="$srv_tgtobj arch/aarch64.o"
srv_tgtobj="$srv_tgtobj linux-aarch64-tdesc.o"
- srv_tgtobj="$srv_tgtobj aarch64-sve-linux-ptrace.o"
+ srv_tgtobj="$srv_tgtobj nat/aarch64-sve-linux-ptrace.o"
srv_tgtobj="${srv_tgtobj} $srv_linux_obj"
srv_linux_regsets=yes
srv_linux_thread_db=yes
@@ -86,14 +87,18 @@ case "${target}" in
srv_linux_thread_db=yes
;;
i[34567]86-*-cygwin*) srv_regobj=""
- srv_tgtobj="x86-low.o x86-dregs.o win32-low.o win32-i386-low.o"
+ srv_tgtobj="x86-low.o nat/x86-dregs.o win32-low.o"
+ srv_tgtobj="${srv_tgtobj} win32-i386-low.o"
srv_tgtobj="${srv_tgtobj} arch/i386.o"
;;
i[34567]86-*-linux*) srv_tgtobj="${srv_tgtobj} arch/i386.o"
- srv_tgtobj="${srv_tgtobj} $srv_linux_obj linux-x86-low.o x86-low.o x86-dregs.o i387-fp.o"
+ srv_tgtobj="${srv_tgtobj} $srv_linux_obj"
+ srv_tgtobj="${srv_tgtobj} linux-x86-low.o x86-low.o"
+ srv_tgtobj="${srv_tgtobj} nat/x86-dregs.o i387-fp.o"
srv_tgtobj="${srv_tgtobj} linux-x86-tdesc.o"
- srv_tgtobj="${srv_tgtobj} linux-btrace.o x86-linux.o"
- srv_tgtobj="${srv_tgtobj} x86-linux-dregs.o"
+ srv_tgtobj="${srv_tgtobj} nat/linux-btrace.o"
+ srv_tgtobj="${srv_tgtobj} nat/x86-linux.o"
+ srv_tgtobj="${srv_tgtobj} nat/x86-linux-dregs.o"
srv_linux_usrregs=yes
srv_linux_regsets=yes
srv_linux_thread_db=yes
@@ -102,13 +107,15 @@ case "${target}" in
ipa_obj="${ipa_obj} arch/i386-ipa.o"
;;
i[34567]86-*-lynxos*) srv_regobj=""
- srv_tgtobj="lynx-low.o lynx-i386-low.o fork-child.o fork-inferior.o"
+ srv_tgtobj="lynx-low.o lynx-i386-low.o fork-child.o"
+ srv_tgtobj="${srv_tgtobj} nat/fork-inferior.o"
srv_tgtobj="${srv_tgtobj} arch/i386.o"
srv_lynxos=yes
;;
i[34567]86-*-mingw32ce*)
srv_regobj=""
- srv_tgtobj="x86-low.o x86-dregs.o win32-low.o win32-i386-low.o"
+ srv_tgtobj="x86-low.o nat/x86-dregs.o win32-low.o"
+ srv_tgtobj="${srv_tgtobj} win32-i386-low.o"
srv_tgtobj="${srv_tgtobj} arch/i386.o"
srv_tgtobj="${srv_tgtobj} wincecompat.o"
# hostio_last_error implementation is in win32-low.c
@@ -117,7 +124,7 @@ case "${target}" in
srv_mingwce=yes
;;
i[34567]86-*-mingw*) srv_regobj=""
- srv_tgtobj="x86-low.o x86-dregs.o win32-low.o win32-i386-low.o"
+ srv_tgtobj="x86-low.o nat/x86-dregs.o win32-low.o" srv_tgtobj="${srv_tgtobj} win32-i386-low.o"
srv_tgtobj="${srv_tgtobj} arch/i386.o"
srv_mingw=yes
;;
@@ -159,7 +166,7 @@ case "${target}" in
srv_regobj="${srv_regobj} mips64-linux.o"
srv_regobj="${srv_regobj} mips64-dsp-linux.o"
srv_tgtobj="$srv_linux_obj linux-mips-low.o"
- srv_tgtobj="${srv_tgtobj} mips-linux-watch.o"
+ srv_tgtobj="${srv_tgtobj} nat/mips-linux-watch.o"
srv_xmlfiles="mips-linux.xml"
srv_xmlfiles="${srv_xmlfiles} mips-dsp-linux.xml"
srv_xmlfiles="${srv_xmlfiles} mips-cpu.xml"
@@ -203,7 +210,8 @@ case "${target}" in
srv_regobj="${srv_regobj} powerpc-isa205-ppr-dscr-vsx64l.o"
srv_regobj="${srv_regobj} powerpc-isa207-vsx64l.o"
srv_regobj="${srv_regobj} powerpc-isa207-htm-vsx64l.o"
- srv_tgtobj="$srv_linux_obj linux-ppc-low.o ppc-linux.o"
+ srv_tgtobj="$srv_linux_obj linux-ppc-low.o"
+ srv_tgtobj="$srv_linux_obj nat/ppc-linux.o"
srv_tgtobj="${srv_tgtobj} arch/ppc-linux-common.o"
srv_xmlfiles="rs6000/powerpc-32l.xml"
srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-altivec32l.xml"
@@ -350,12 +358,13 @@ case "${target}" in
srv_linux_thread_db=yes
;;
x86_64-*-linux*) srv_tgtobj="$srv_linux_obj linux-x86-low.o x86-low.o"
- srv_tgtobj="${srv_tgtobj} x86-dregs.o i387-fp.o"
+ srv_tgtobj="${srv_tgtobj} nat/x86-dregs.o i387-fp.o"
srv_tgtobj="${srv_tgtobj} arch/i386.o arch/amd64.o"
srv_tgtobj="${srv_tgtobj} linux-x86-tdesc.o"
- srv_tgtobj="${srv_tgtobj} linux-btrace.o x86-linux.o"
- srv_tgtobj="${srv_tgtobj} x86-linux-dregs.o"
- srv_tgtobj="${srv_tgtobj} amd64-linux-siginfo.o"
+ srv_tgtobj="${srv_tgtobj} nat/linux-btrace.o"
+ srv_tgtobj="${srv_tgtobj} nat/x86-linux.o"
+ srv_tgtobj="${srv_tgtobj} nat/x86-linux-dregs.o"
+ srv_tgtobj="${srv_tgtobj} nat/amd64-linux-siginfo.o"
srv_linux_usrregs=yes # This is for i386 progs.
srv_linux_regsets=yes
srv_linux_thread_db=yes
@@ -364,12 +373,14 @@ case "${target}" in
ipa_obj="${ipa_obj} arch/amd64-ipa.o"
;;
x86_64-*-mingw*) srv_regobj=""
- srv_tgtobj="x86-low.o x86-dregs.o i387-fp.o win32-low.o win32-i386-low.o"
+ srv_tgtobj="x86-low.o nat/x86-dregs.o i387-fp.o"
+ srv_tgtobj="${srv_tgtobj} win32-low.o win32-i386-low.o"
srv_tgtobj="${srv_tgtobj} arch/amd64.o"
srv_mingw=yes
;;
x86_64-*-cygwin*) srv_regobj=""
- srv_tgtobj="x86-low.o x86-dregs.o i387-fp.o win32-low.o win32-i386-low.o"
+ srv_tgtobj="x86-low.o nat/x86-dregs.o i387-fp.o"
+ srv_tgtobj="${srv_tgtobj} win32-low.o win32-i386-low.o"
srv_tgtobj="${srv_tgtobj} arch/amd64.o"
;;