summaryrefslogtreecommitdiff
path: root/gdb/gdbserver/Makefile.in
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2018-06-08 20:48:28 +0100
committerPedro Alves <palves@redhat.com>2018-06-08 20:48:28 +0100
commit03349c934525d0f78a3f971a351b1202ea21ec94 (patch)
tree33a3d907c10bc81da33e87be44b25a950b1ff548 /gdb/gdbserver/Makefile.in
parentecf99cc09236316db27fd8ffaedca864f81ea081 (diff)
downloadbinutils-gdb-03349c934525d0f78a3f971a351b1202ea21ec94.tar.gz
Make gdbreplay use more common routines
This makes gdbreplay share a bit more code with gdbserver, and paves the way to share more in future. Including common-defs.h pulls in defines and headers that gdb and gdbserver assume are always defined/available too, such as for example _(), ansidecl.h or a set of system headers. Including that revealed (static vs extern conflict) gdbreplay had a local copy of perror_with_name (which exited directly instead of throwing an error). So I removed gdbreplay's local copy, and then added enough .o files until gdbreplay linked successfully. Also, use xstrdup instead of strdup. gdb/gdbserver/ChangeLog: 2018-06-08 Pedro Alves <palves@redhat.com> * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o, common/common-exceptions.o, common/common-utils.o, common/errors.o, common/print-utils.o and utils.o. * gdbreplay.c: Include "common-defs.h" instead of the two 'config.h's here. Don't include stdio.h, errno.h, stdlib.h, string.h or alloca.h. (perror_with_name): Delete. (remote_open): Use xstrdup instead of strdup. (main): Rename to ... (captured_main): ... this. (main): New.
Diffstat (limited to 'gdb/gdbserver/Makefile.in')
-rw-r--r--gdb/gdbserver/Makefile.in11
1 files changed, 10 insertions, 1 deletions
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index 675faa43642..cf04b7d7b5a 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -284,7 +284,16 @@ OBS = \
$(LIBOBJS) \
$(XML_BUILTIN)
-GDBREPLAY_OBS = gdbreplay.o version.o
+GDBREPLAY_OBS = \
+ common/cleanups.o \
+ common/common-exceptions.o \
+ common/common-utils.o \
+ common/errors.o \
+ common/print-utils.o \
+ gdbreplay.o \
+ utils.o \
+ version.o
+
GDBSERVER_LIBS = @GDBSERVER_LIBS@
XM_CLIBS = @LIBS@
CDEPS = $(srcdir)/proc-service.list