Change gdbserver to use existing gdbsupport
This changes the gdbserver build to use the gdbsupport that was built for gdb. gdbserver and gdbreplay now must use WIN32APILIBS (aka -lws2_32). Before this change, gdbserver did not define USE_WIN32API when building gdbsupport, but now this is always done. ChangeLog 2020-03-12 Tom Tromey <tom@tromey.com> * Makefile.in: Rebuild. * Makefile.def (gdbserver): Depend on gdbsupport. gdbserver/ChangeLog 2020-03-12 Tom Tromey <tom@tromey.com> * configure: Rebuild. * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs. (WIN32APILIBS): New subst. * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove gdbsupport files. (gdbsupport/%.o): Remove target. (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables. (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT. (WIN32APILIBS): New variable. (gdbserver$(EXEEXT)): Add WIN32APILIBS. (gdbreplay$(EXEEXT)): Likewise.
This commit is contained in:
parent
213291361b
commit
4635ff9753
@ -1,3 +1,8 @@
|
|||||||
|
2020-03-12 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
|
* Makefile.in: Rebuild.
|
||||||
|
* Makefile.def (gdbserver): Depend on gdbsupport.
|
||||||
|
|
||||||
2020-03-12 Tom Tromey <tom@tromey.com>
|
2020-03-12 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
* Makefile.in: Rebuild.
|
* Makefile.in: Rebuild.
|
||||||
|
@ -412,6 +412,7 @@ dependencies = { module=all-gdb; on=all-libctf; };
|
|||||||
|
|
||||||
// Host modules specific to gdbserver.
|
// Host modules specific to gdbserver.
|
||||||
dependencies = { module=configure-gdbserver; on=all-gnulib; };
|
dependencies = { module=configure-gdbserver; on=all-gnulib; };
|
||||||
|
dependencies = { module=all-gdbserver; on=all-gdbsupport; };
|
||||||
dependencies = { module=all-gdbserver; on=all-gnulib; };
|
dependencies = { module=all-gdbserver; on=all-gnulib; };
|
||||||
dependencies = { module=all-gdbserver; on=all-libiberty; };
|
dependencies = { module=all-gdbserver; on=all-libiberty; };
|
||||||
|
|
||||||
|
@ -51977,6 +51977,7 @@ all-gdb: maybe-all-build-bison
|
|||||||
all-gdb: maybe-all-sim
|
all-gdb: maybe-all-sim
|
||||||
all-gdb: maybe-all-libtermcap
|
all-gdb: maybe-all-libtermcap
|
||||||
configure-gdbserver: maybe-all-gnulib
|
configure-gdbserver: maybe-all-gnulib
|
||||||
|
all-gdbserver: maybe-all-gdbsupport
|
||||||
all-gdbserver: maybe-all-gnulib
|
all-gdbserver: maybe-all-gnulib
|
||||||
configure-libgui: maybe-configure-tcl
|
configure-libgui: maybe-configure-tcl
|
||||||
configure-libgui: maybe-configure-tk
|
configure-libgui: maybe-configure-tk
|
||||||
|
@ -1,3 +1,17 @@
|
|||||||
|
2020-03-12 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
|
* configure: Rebuild.
|
||||||
|
* configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
|
||||||
|
(WIN32APILIBS): New subst.
|
||||||
|
* Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
|
||||||
|
gdbsupport files.
|
||||||
|
(gdbsupport/%.o): Remove target.
|
||||||
|
(GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
|
||||||
|
(gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
|
||||||
|
(WIN32APILIBS): New variable.
|
||||||
|
(gdbserver$(EXEEXT)): Add WIN32APILIBS.
|
||||||
|
(gdbreplay$(EXEEXT)): Likewise.
|
||||||
|
|
||||||
2020-03-12 Tom Tromey <tom@tromey.com>
|
2020-03-12 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
* config.in, configure: Rebuild.
|
* config.in, configure: Rebuild.
|
||||||
|
@ -102,6 +102,9 @@ INCLUDE_DEP = $$(INCLUDE_DIR)
|
|||||||
LIBIBERTY_BUILDDIR = ../libiberty
|
LIBIBERTY_BUILDDIR = ../libiberty
|
||||||
LIBIBERTY = $(LIBIBERTY_BUILDDIR)/libiberty.a
|
LIBIBERTY = $(LIBIBERTY_BUILDDIR)/libiberty.a
|
||||||
|
|
||||||
|
GDBSUPPORT_BUILDDIR = ../gdbsupport
|
||||||
|
GDBSUPPORT = $(GDBSUPPORT_BUILDDIR)/libgdbsupport.a
|
||||||
|
|
||||||
# Where is ust? These will be empty if ust was not available.
|
# Where is ust? These will be empty if ust was not available.
|
||||||
ustlibs = @ustlibs@
|
ustlibs = @ustlibs@
|
||||||
ustinc = @ustinc@
|
ustinc = @ustinc@
|
||||||
@ -152,6 +155,8 @@ CPPFLAGS = @CPPFLAGS@
|
|||||||
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
|
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
|
||||||
PTHREAD_LIBS = @PTHREAD_LIBS@
|
PTHREAD_LIBS = @PTHREAD_LIBS@
|
||||||
|
|
||||||
|
WIN32APILIBS = @WIN32APILIBS@
|
||||||
|
|
||||||
# INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
|
# INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
|
||||||
INTERNAL_CFLAGS_BASE = ${CXXFLAGS} ${GLOBAL_CFLAGS} \
|
INTERNAL_CFLAGS_BASE = ${CXXFLAGS} ${GLOBAL_CFLAGS} \
|
||||||
${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CPPFLAGS} $(PTHREAD_CFLAGS)
|
${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CPPFLAGS} $(PTHREAD_CFLAGS)
|
||||||
@ -213,32 +218,6 @@ SFILES = \
|
|||||||
$(srcdir)/../gdb/arch/arm-linux.c \
|
$(srcdir)/../gdb/arch/arm-linux.c \
|
||||||
$(srcdir)/../gdb/arch/ppc-linux-common.c \
|
$(srcdir)/../gdb/arch/ppc-linux-common.c \
|
||||||
$(srcdir)/../gdb/arch/riscv.c \
|
$(srcdir)/../gdb/arch/riscv.c \
|
||||||
$(srcdir)/../gdbsupport/btrace-common.cc \
|
|
||||||
$(srcdir)/../gdbsupport/buffer.cc \
|
|
||||||
$(srcdir)/../gdbsupport/cleanups.cc \
|
|
||||||
$(srcdir)/../gdbsupport/common-debug.cc \
|
|
||||||
$(srcdir)/../gdbsupport/common-exceptions.cc \
|
|
||||||
$(srcdir)/../gdbsupport/common-inferior.cc \
|
|
||||||
$(srcdir)/../gdbsupport/common-regcache.cc \
|
|
||||||
$(srcdir)/../gdbsupport/common-utils.cc \
|
|
||||||
$(srcdir)/../gdbsupport/errors.cc \
|
|
||||||
$(srcdir)/../gdbsupport/environ.cc \
|
|
||||||
$(srcdir)/../gdbsupport/fileio.cc \
|
|
||||||
$(srcdir)/../gdbsupport/filestuff.cc \
|
|
||||||
$(srcdir)/../gdbsupport/job-control.cc \
|
|
||||||
$(srcdir)/../gdbsupport/gdb-dlfcn.cc \
|
|
||||||
$(srcdir)/../gdbsupport/gdb_tilde_expand.cc \
|
|
||||||
$(srcdir)/../gdbsupport/gdb_vecs.cc \
|
|
||||||
$(srcdir)/../gdbsupport/gdb_wait.cc \
|
|
||||||
$(srcdir)/../gdbsupport/netstuff.cc \
|
|
||||||
$(srcdir)/../gdbsupport/new-op.cc \
|
|
||||||
$(srcdir)/../gdbsupport/pathstuff.cc \
|
|
||||||
$(srcdir)/../gdbsupport/print-utils.cc \
|
|
||||||
$(srcdir)/../gdbsupport/ptid.cc \
|
|
||||||
$(srcdir)/../gdbsupport/rsp-low.cc \
|
|
||||||
$(srcdir)/../gdbsupport/safe-strerror.cc \
|
|
||||||
$(srcdir)/../gdbsupport/tdesc.cc \
|
|
||||||
$(srcdir)/../gdbsupport/xml-utils.cc \
|
|
||||||
$(srcdir)/../gdb/nat/aarch64-sve-linux-ptrace.c \
|
$(srcdir)/../gdb/nat/aarch64-sve-linux-ptrace.c \
|
||||||
$(srcdir)/../gdb/nat/linux-btrace.c \
|
$(srcdir)/../gdb/nat/linux-btrace.c \
|
||||||
$(srcdir)/../gdb/nat/linux-namespaces.c \
|
$(srcdir)/../gdb/nat/linux-namespaces.c \
|
||||||
@ -260,36 +239,6 @@ TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS}
|
|||||||
OBS = \
|
OBS = \
|
||||||
alloc.o \
|
alloc.o \
|
||||||
ax.o \
|
ax.o \
|
||||||
gdbsupport/agent.o \
|
|
||||||
gdbsupport/btrace-common.o \
|
|
||||||
gdbsupport/buffer.o \
|
|
||||||
gdbsupport/cleanups.o \
|
|
||||||
gdbsupport/common-debug.o \
|
|
||||||
gdbsupport/common-exceptions.o \
|
|
||||||
gdbsupport/common-inferior.o \
|
|
||||||
gdbsupport/job-control.o \
|
|
||||||
gdbsupport/common-regcache.o \
|
|
||||||
gdbsupport/common-utils.o \
|
|
||||||
gdbsupport/errors.o \
|
|
||||||
gdbsupport/environ.o \
|
|
||||||
gdbsupport/fileio.o \
|
|
||||||
gdbsupport/filestuff.o \
|
|
||||||
gdbsupport/format.o \
|
|
||||||
gdbsupport/gdb-dlfcn.o \
|
|
||||||
gdbsupport/gdb_tilde_expand.o \
|
|
||||||
gdbsupport/gdb_vecs.o \
|
|
||||||
gdbsupport/gdb_wait.o \
|
|
||||||
gdbsupport/netstuff.o \
|
|
||||||
gdbsupport/new-op.o \
|
|
||||||
gdbsupport/pathstuff.o \
|
|
||||||
gdbsupport/print-utils.o \
|
|
||||||
gdbsupport/ptid.o \
|
|
||||||
gdbsupport/rsp-low.o \
|
|
||||||
gdbsupport/safe-strerror.o \
|
|
||||||
gdbsupport/signals.o \
|
|
||||||
gdbsupport/signals-state-save-restore.o \
|
|
||||||
gdbsupport/tdesc.o \
|
|
||||||
gdbsupport/xml-utils.o \
|
|
||||||
debug.o \
|
debug.o \
|
||||||
dll.o \
|
dll.o \
|
||||||
event-loop.o \
|
event-loop.o \
|
||||||
@ -312,14 +261,6 @@ OBS = \
|
|||||||
$(XML_BUILTIN)
|
$(XML_BUILTIN)
|
||||||
|
|
||||||
GDBREPLAY_OBS = \
|
GDBREPLAY_OBS = \
|
||||||
gdbsupport/cleanups.o \
|
|
||||||
gdbsupport/common-exceptions.o \
|
|
||||||
gdbsupport/common-utils.o \
|
|
||||||
gdbsupport/rsp-low.o \
|
|
||||||
gdbsupport/errors.o \
|
|
||||||
gdbsupport/netstuff.o \
|
|
||||||
gdbsupport/print-utils.o \
|
|
||||||
gdbsupport/safe-strerror.o \
|
|
||||||
gdbreplay.o \
|
gdbreplay.o \
|
||||||
utils.o \
|
utils.o \
|
||||||
version.o
|
version.o
|
||||||
@ -412,18 +353,20 @@ install-html:
|
|||||||
clean-info:
|
clean-info:
|
||||||
|
|
||||||
gdbserver$(EXEEXT): $(sort $(OBS)) ${CDEPS} $(LIBGNU) $(LIBIBERTY) \
|
gdbserver$(EXEEXT): $(sort $(OBS)) ${CDEPS} $(LIBGNU) $(LIBIBERTY) \
|
||||||
$(INTL_DEPS)
|
$(INTL_DEPS) $(GDBSUPPORT)
|
||||||
$(SILENCE) rm -f gdbserver$(EXEEXT)
|
$(SILENCE) rm -f gdbserver$(EXEEXT)
|
||||||
$(ECHO_CXXLD) $(CC_LD) $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) \
|
$(ECHO_CXXLD) $(CC_LD) $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) \
|
||||||
-o gdbserver$(EXEEXT) $(OBS) $(LIBGNU) $(LIBIBERTY) \
|
-o gdbserver$(EXEEXT) $(OBS) $(GDBSUPPORT) $(LIBGNU) \
|
||||||
$(INTL) $(GDBSERVER_LIBS) $(XM_CLIBS)
|
$(LIBIBERTY) $(INTL) $(GDBSERVER_LIBS) $(XM_CLIBS) \
|
||||||
|
$(WIN32APILIBS)
|
||||||
|
|
||||||
gdbreplay$(EXEEXT): $(sort $(GDBREPLAY_OBS)) $(LIBGNU) $(LIBIBERTY) \
|
gdbreplay$(EXEEXT): $(sort $(GDBREPLAY_OBS)) $(LIBGNU) $(LIBIBERTY) \
|
||||||
$(INTL_DEPS)
|
$(INTL_DEPS) $(GDBSUPPORT)
|
||||||
$(SILENCE) rm -f gdbreplay$(EXEEXT)
|
$(SILENCE) rm -f gdbreplay$(EXEEXT)
|
||||||
$(ECHO_CXXLD) $(CC_LD) $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) \
|
$(ECHO_CXXLD) $(CC_LD) $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) \
|
||||||
-o gdbreplay$(EXEEXT) $(GDBREPLAY_OBS) $(XM_CLIBS) $(LIBGNU) \
|
-o gdbreplay$(EXEEXT) $(GDBREPLAY_OBS) $(XM_CLIBS) \
|
||||||
$(LIBIBERTY) $(INTL)
|
$(GDBSUPPORT) $(LIBGNU) $(LIBIBERTY) $(INTL) \
|
||||||
|
$(WIN32APILIBS)
|
||||||
|
|
||||||
IPA_OBJS = \
|
IPA_OBJS = \
|
||||||
alloc-ipa.o \
|
alloc-ipa.o \
|
||||||
@ -459,7 +402,6 @@ TAGS: ${TAGFILES}
|
|||||||
if [ x$$i != xyzzy ]; then \
|
if [ x$$i != xyzzy ]; then \
|
||||||
echo ${srcdir}/$$i | sed -e 's/\.o$$/\.cc/' \
|
echo ${srcdir}/$$i | sed -e 's/\.o$$/\.cc/' \
|
||||||
-e 's,/\(arch\|nat\|target\)/,/../\1/,' \
|
-e 's,/\(arch\|nat\|target\)/,/../\1/,' \
|
||||||
-e 's,/\(gdbsupport\)/,/../../\1/,'; \
|
|
||||||
fi; \
|
fi; \
|
||||||
done` \
|
done` \
|
||||||
${TAGFILES}
|
${TAGFILES}
|
||||||
@ -595,10 +537,6 @@ arch/%.o: ../gdb/arch/%.c
|
|||||||
$(COMPILE) -x c++ $<
|
$(COMPILE) -x c++ $<
|
||||||
$(POSTCOMPILE)
|
$(POSTCOMPILE)
|
||||||
|
|
||||||
gdbsupport/%.o: ../gdbsupport/%.cc
|
|
||||||
$(COMPILE) $<
|
|
||||||
$(POSTCOMPILE)
|
|
||||||
|
|
||||||
%.o: %-generated.cc
|
%.o: %-generated.cc
|
||||||
$(COMPILE) $<
|
$(COMPILE) $<
|
||||||
$(POSTCOMPILE)
|
$(POSTCOMPILE)
|
||||||
|
7
gdbserver/configure
vendored
7
gdbserver/configure
vendored
@ -655,6 +655,7 @@ DEPDIR
|
|||||||
am__leading_dot
|
am__leading_dot
|
||||||
host_noncanonical
|
host_noncanonical
|
||||||
target_noncanonical
|
target_noncanonical
|
||||||
|
WIN32APILIBS
|
||||||
LTLIBIPT
|
LTLIBIPT
|
||||||
LIBIPT
|
LIBIPT
|
||||||
HAVE_LIBIPT
|
HAVE_LIBIPT
|
||||||
@ -8900,6 +8901,8 @@ $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# This is set by GDB_AC_COMMON.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Check whether we will enable the inclusion of unit tests when
|
# Check whether we will enable the inclusion of unit tests when
|
||||||
@ -8931,8 +8934,6 @@ if $enable_unittests; then
|
|||||||
$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
|
$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
|
||||||
|
|
||||||
|
|
||||||
srv_selftest_objs="gdbsupport/selftest.o"
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@ -10633,7 +10634,7 @@ $as_echo "#define USE_XML 1" >>confdefs.h
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_hostio_err_objs $srv_thread_depfiles $srv_selftest_objs"
|
GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_hostio_err_objs $srv_thread_depfiles"
|
||||||
GDBSERVER_LIBS="$srv_libs"
|
GDBSERVER_LIBS="$srv_libs"
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports __sync_*_compare_and_swap" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports __sync_*_compare_and_swap" >&5
|
||||||
|
@ -44,10 +44,10 @@ AX_CXX_COMPILE_STDCXX(11, , mandatory)
|
|||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
|
|
||||||
GDB_AC_COMMON
|
GDB_AC_COMMON
|
||||||
|
# This is set by GDB_AC_COMMON.
|
||||||
|
AC_SUBST(WIN32APILIBS)
|
||||||
|
|
||||||
GDB_AC_SELFTEST([
|
GDB_AC_SELFTEST
|
||||||
srv_selftest_objs="gdbsupport/selftest.o"
|
|
||||||
])
|
|
||||||
|
|
||||||
ACX_NONCANONICAL_TARGET
|
ACX_NONCANONICAL_TARGET
|
||||||
ACX_NONCANONICAL_HOST
|
ACX_NONCANONICAL_HOST
|
||||||
@ -357,7 +357,7 @@ if test "$srv_xmlfiles" != ""; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_hostio_err_objs $srv_thread_depfiles $srv_selftest_objs"
|
GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_hostio_err_objs $srv_thread_depfiles"
|
||||||
GDBSERVER_LIBS="$srv_libs"
|
GDBSERVER_LIBS="$srv_libs"
|
||||||
|
|
||||||
dnl Check whether the target supports __sync_*_compare_and_swap.
|
dnl Check whether the target supports __sync_*_compare_and_swap.
|
||||||
|
Loading…
Reference in New Issue
Block a user