aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-07-09 08:06:39 -0600
committerTom Tromey <tom@tromey.com>2020-01-14 16:25:02 -0700
commit01027315f54048dbaf03ac37455c2528c72a6d9b (patch)
treec7cab8f936383a1adcb5da0a9493808b643d16ed /gdb/gdbserver
parentb2ceabe8f0c2056342834b2b3f52f3b015538df3 (diff)
downloadfsf-binutils-gdb-01027315f54048dbaf03ac37455c2528c72a6d9b.zip
fsf-binutils-gdb-01027315f54048dbaf03ac37455c2528c72a6d9b.tar.gz
fsf-binutils-gdb-01027315f54048dbaf03ac37455c2528c72a6d9b.tar.bz2
Move gdbsupport to the top level
This patch moves the gdbsupport directory to the top level. This is the next step in the ongoing project to move gdbserver to the top level. The bulk of this patch was created by "git mv gdb/gdbsupport gdbsupport". This patch then adds a build system to gdbsupport and wires it into the top level. Then it changes gdb to use the top-level build. gdbserver, on the other hand, is not yet changed. It still does its own build of gdbsupport. ChangeLog 2020-01-14 Tom Tromey <tom@tromey.com> * src-release.sh (GDB_SUPPORT_DIRS): Add gdbsupport. * MAINTAINERS: Add gdbsupport. * configure: Rebuild. * configure.ac (configdirs): Add gdbsupport. * gdbsupport: New directory, move from gdb/gdbsupport. * Makefile.def (host_modules, dependencies): Add gnulib. * Makefile.in: Rebuild. gdb/ChangeLog 2020-01-14 Tom Tromey <tom@tromey.com> * nat/x86-linux-dregs.c: Include configh.h. * nat/linux-ptrace.c: Include configh.h. * nat/linux-btrace.c: Include configh.h. * defs.h: Include config.h, bfd.h. * configure.ac: Don't source common.host. (CONFIG_OBS, CONFIG_SRCS): Remove gdbsupport files. * configure: Rebuild. * acinclude.m4: Update path. * Makefile.in (SUPPORT, LIBSUPPORT, INCSUPPORT): New variables. (CONFIG_SRC_SUBDIR): Remove gdbsupport. (INTERNAL_CFLAGS_BASE): Add INCSUPPORT. (CLIBS): Add LIBSUPPORT. (CDEPS): Likewise. (COMMON_SFILES): Remove gdbsupport files. (HFILES_NO_SRCDIR): Likewise. (stamp-version): Update path to create-version.sh. (ALLDEPFILES): Remove gdbsupport files. gdb/gdbserver/ChangeLog 2020-01-14 Tom Tromey <tom@tromey.com> * server.h: Include config.h. * gdbreplay.c: Include config.h. * configure: Rebuild. * configure.ac: Don't source common.host. * acinclude.m4: Update path. * Makefile.in (INCSUPPORT): New variable. (INCLUDE_CFLAGS): Add INCSUPPORT. (SFILES): Update paths. (version-generated.c): Update path to create-version.sh. (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths. gdbsupport/ChangeLog 2020-01-14 Tom Tromey <tom@tromey.com> * common-defs.h: Add GDBSERVER case. Update includes. * acinclude.m4, aclocal.m4, config.in, configure, configure.ac, Makefile.am, Makefile.in, README: New files. * Moved from ../gdb/gdbsupport/ Change-Id: I07632e7798635c1bab389bf885971e584fb4bb78
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog13
-rw-r--r--gdb/gdbserver/Makefile.in64
-rw-r--r--gdb/gdbserver/acinclude.m42
-rw-r--r--gdb/gdbserver/gdbreplay.c8
-rw-r--r--gdb/gdbserver/server.h8
5 files changed, 63 insertions, 32 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 6d9e314..f3f2643 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,18 @@
2020-01-14 Tom Tromey <tom@tromey.com>
+ * server.h: Include config.h.
+ * gdbreplay.c: Include config.h.
+ * configure: Rebuild.
+ * configure.ac: Don't source common.host.
+ * acinclude.m4: Update path.
+ * Makefile.in (INCSUPPORT): New variable.
+ (INCLUDE_CFLAGS): Add INCSUPPORT.
+ (SFILES): Update paths.
+ (version-generated.c): Update path to create-version.sh.
+ (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
+
+2020-01-14 Tom Tromey <tom@tromey.com>
+
* configure.ac (LIBS): Use WIN32APILIBS.
(USE_WIN32API): Don't define.
* configure: Rebuild.
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index d1af55b..38f30a0 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -109,6 +109,8 @@ INCGNU = -I$(srcdir)/../../gnulib/import -I$(GNULIB_BUILDDIR)/import
# so that they are generated before other files are compiled.
GNULIB_H = $(GNULIB_BUILDDIR)/import/string.h @GNULIB_STDINT_H@
+INCSUPPORT = -I$(srcdir)/../.. -I../..
+
# All the includes used for CFLAGS and for lint.
# -I. for config files.
# -I${srcdir} for our headers.
@@ -120,7 +122,7 @@ GNULIB_H = $(GNULIB_BUILDDIR)/import/string.h @GNULIB_STDINT_H@
#
INCLUDE_CFLAGS = -I. -I${srcdir} \
-I$(srcdir)/../regformats -I$(srcdir)/.. -I$(INCLUDE_DIR) \
- $(INCGNU)
+ $(INCGNU) $(INCSUPPORT)
# M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
# from the config/ directory.
@@ -201,32 +203,32 @@ SFILES = \
$(srcdir)/arch/arm-linux.c \
$(srcdir)/arch/ppc-linux-common.c \
$(srcdir)/../alloc.c \
- $(srcdir)/gdbsupport/btrace-common.c \
- $(srcdir)/gdbsupport/buffer.c \
- $(srcdir)/gdbsupport/cleanups.c \
- $(srcdir)/gdbsupport/common-debug.c \
- $(srcdir)/gdbsupport/common-exceptions.c \
- $(srcdir)/gdbsupport/common-inferior.c \
- $(srcdir)/gdbsupport/common-regcache.c \
- $(srcdir)/gdbsupport/common-utils.c \
- $(srcdir)/gdbsupport/errors.c \
- $(srcdir)/gdbsupport/environ.c \
- $(srcdir)/gdbsupport/fileio.c \
- $(srcdir)/gdbsupport/filestuff.c \
- $(srcdir)/gdbsupport/job-control.c \
- $(srcdir)/gdbsupport/gdb-dlfcn.c \
- $(srcdir)/gdbsupport/gdb_tilde_expand.c \
- $(srcdir)/gdbsupport/gdb_vecs.c \
- $(srcdir)/gdbsupport/gdb_wait.c \
- $(srcdir)/gdbsupport/netstuff.c \
- $(srcdir)/gdbsupport/new-op.c \
- $(srcdir)/gdbsupport/pathstuff.c \
- $(srcdir)/gdbsupport/print-utils.c \
- $(srcdir)/gdbsupport/ptid.c \
- $(srcdir)/gdbsupport/rsp-low.c \
- $(srcdir)/gdbsupport/safe-strerror.c \
- $(srcdir)/gdbsupport/tdesc.c \
- $(srcdir)/gdbsupport/xml-utils.c \
+ $(srcdir)/../../gdbsupport/btrace-common.c \
+ $(srcdir)/../../gdbsupport/buffer.c \
+ $(srcdir)/../../gdbsupport/cleanups.c \
+ $(srcdir)/../../gdbsupport/common-debug.c \
+ $(srcdir)/../../gdbsupport/common-exceptions.c \
+ $(srcdir)/../../gdbsupport/common-inferior.c \
+ $(srcdir)/../../gdbsupport/common-regcache.c \
+ $(srcdir)/../../gdbsupport/common-utils.c \
+ $(srcdir)/../../gdbsupport/errors.c \
+ $(srcdir)/../../gdbsupport/environ.c \
+ $(srcdir)/../../gdbsupport/fileio.c \
+ $(srcdir)/../../gdbsupport/filestuff.c \
+ $(srcdir)/../../gdbsupport/job-control.c \
+ $(srcdir)/../../gdbsupport/gdb-dlfcn.c \
+ $(srcdir)/../../gdbsupport/gdb_tilde_expand.c \
+ $(srcdir)/../../gdbsupport/gdb_vecs.c \
+ $(srcdir)/../../gdbsupport/gdb_wait.c \
+ $(srcdir)/../../gdbsupport/netstuff.c \
+ $(srcdir)/../../gdbsupport/new-op.c \
+ $(srcdir)/../../gdbsupport/pathstuff.c \
+ $(srcdir)/../../gdbsupport/print-utils.c \
+ $(srcdir)/../../gdbsupport/ptid.c \
+ $(srcdir)/../../gdbsupport/rsp-low.c \
+ $(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 \
@@ -529,8 +531,8 @@ am--refresh:
force:
-version-generated.c: Makefile $(srcdir)/../version.in $(srcdir)/../../bfd/version.h $(srcdir)/../gdbsupport/create-version.sh
- $(ECHO_GEN) $(SHELL) $(srcdir)/../gdbsupport/create-version.sh $(srcdir)/.. \
+version-generated.c: Makefile $(srcdir)/../version.in $(srcdir)/../../bfd/version.h $(srcdir)/../../gdbsupport/create-version.sh
+ $(ECHO_GEN) $(SHELL) $(srcdir)/../../gdbsupport/create-version.sh $(srcdir)/.. \
$(host_alias) $(target_alias) $@
xml-builtin-generated.c: stamp-xml; @true
@@ -588,7 +590,7 @@ arch/%-ipa.o: ../arch/%.c
$(IPAGENT_COMPILE) $<
$(POSTCOMPILE)
-gdbsupport/%-ipa.o: ../gdbsupport/%.c
+gdbsupport/%-ipa.o: ../../gdbsupport/%.c
$(IPAGENT_COMPILE) $<
$(POSTCOMPILE)
@@ -621,7 +623,7 @@ arch/%.o: ../arch/%.c
$(COMPILE) $<
$(POSTCOMPILE)
-gdbsupport/%.o: ../gdbsupport/%.c
+gdbsupport/%.o: ../../gdbsupport/%.c
$(COMPILE) $<
$(POSTCOMPILE)
diff --git a/gdb/gdbserver/acinclude.m4 b/gdb/gdbserver/acinclude.m4
index 4c18e9b..a42f2d5 100644
--- a/gdb/gdbserver/acinclude.m4
+++ b/gdb/gdbserver/acinclude.m4
@@ -18,7 +18,7 @@ m4_include(../../config/lead-dot.m4)
dnl codeset.m4 is needed for common.m4, but not for
dnl anything else in gdbserver.
m4_include(../../config/codeset.m4)
-m4_include(../gdbsupport/common.m4)
+m4_include(../../gdbsupport/common.m4)
dnl For libiberty_INIT.
m4_include(../libiberty.m4)
diff --git a/gdb/gdbserver/gdbreplay.c b/gdb/gdbserver/gdbreplay.c
index 3ed18f1..263fb0e 100644
--- a/gdb/gdbserver/gdbreplay.c
+++ b/gdb/gdbserver/gdbreplay.c
@@ -18,6 +18,14 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "gdbsupport/common-defs.h"
+
+#undef PACKAGE
+#undef PACKAGE_NAME
+#undef PACKAGE_VERSION
+#undef PACKAGE_STRING
+#undef PACKAGE_TARNAME
+
+#include <config.h>
#include "gdbsupport/version.h"
#if HAVE_SYS_FILE_H
diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h
index 0c74f99..3c28686 100644
--- a/gdb/gdbserver/server.h
+++ b/gdb/gdbserver/server.h
@@ -21,6 +21,14 @@
#include "gdbsupport/common-defs.h"
+#undef PACKAGE
+#undef PACKAGE_NAME
+#undef PACKAGE_VERSION
+#undef PACKAGE_STRING
+#undef PACKAGE_TARNAME
+
+#include <config.h>
+
gdb_static_assert (sizeof (CORE_ADDR) >= sizeof (void *));
#ifdef __MINGW32CE__