aboutsummaryrefslogtreecommitdiff
path: root/gdb/Makefile.in
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2014-07-30 16:21:55 +0100
committerGary Benson <gbenson@redhat.com>2014-08-19 10:07:20 +0100
commit34abf635b3edf9d70b24aa655ffd7d4696d48cde (patch)
tree589de322e6cadff3b9cf9475927ee15e021903f9 /gdb/Makefile.in
parentf6e94d78b2fe30977ffefcb26420109940ca7bb1 (diff)
downloadgdb-34abf635b3edf9d70b24aa655ffd7d4696d48cde.zip
gdb-34abf635b3edf9d70b24aa655ffd7d4696d48cde.tar.gz
gdb-34abf635b3edf9d70b24aa655ffd7d4696d48cde.tar.bz2
Introduce common-debug.h
This introduces common-debug.h. This holds the functions debug_printf and debug_vprintf, two functions that the common code can use to print debugging messages. Clients of the common code are expected to implement debug_vprintf; a debug_vprintf function is written from scratch for GDB, and gdbserver's existing debug_printf is repurposed as debug_vprintf. common/agent.c is changed to use debug_vprintf rather than defining the macro DEBUG_AGENT depending on GDBSERVER. nat/i386-dregs.c is changed to use the externally-implemented debug_printf, rather than defining it itself. gdb/ChangeLog: * common/common-debug.h: New file. * common/common-debug.c: Likewise. * debug.c: Likewise. * Makefile.in (SFILES): Add common/common-debug.c. (HFILES_NO_SRCDIR): Add common/common-debug.h. (COMMON_OBS): Add common-debug.o and debug.o. (common-debug.o): New rule. * common/common-defs.h: Include common-debug.h. * common/agent.c (debug_agent_printf): New function. (DEBUG_AGENT): Redefine. * nat/i386-dregs.c (debug_printf): Undefine. gdb/gdbserver/ChangeLog: * Makefile.in (SFILES): Add common/common-debug.c. (OBS): Add common-debug.o. (common-debug.o): New rule. * debug.h (debug_printf): Don't declare. * debug.c (debug_printf): Renamed and rewritten as... (debug_vprintf): New function.
Diffstat (limited to 'gdb/Makefile.in')
-rw-r--r--gdb/Makefile.in11
1 files changed, 8 insertions, 3 deletions
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 76ca0da..b33defe 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -851,7 +851,7 @@ SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \
common/ptid.c common/buffer.c gdb-dlfcn.c common/agent.c \
common/format.c common/filestuff.c btrace.c record-btrace.c ctf.c \
target/waitstatus.c common/print-utils.c common/rsp-low.c \
- common/errors.c
+ common/errors.c common/common-debug.c
LINTFILES = $(SFILES) $(YYFILES) $(CONFIG_SRCS) init.c
@@ -936,7 +936,8 @@ gdb_bfd.h sparc-ravenscar-thread.h ppc-ravenscar-thread.h nat/linux-btrace.h \
ctf.h nat/i386-cpuid.h nat/i386-gcc-cpuid.h target/resume.h \
target/wait.h target/waitstatus.h nat/linux-nat.h nat/linux-waitpid.h \
common/print-utils.h common/rsp-low.h nat/i386-dregs.h x86-linux-nat.h \
-i386-linux-nat.h common/common-defs.h common/errors.h common/common-types.h
+i386-linux-nat.h common/common-defs.h common/errors.h common/common-types.h \
+common/common-debug.h
# Header files that already have srcdir in them, or which are in objdir.
@@ -1035,7 +1036,7 @@ COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \
gdb_vecs.o jit.o progspace.o skip.o probe.o \
common-utils.o buffer.o ptid.o gdb-dlfcn.o common-agent.o \
format.o registry.o btrace.o record-btrace.o waitstatus.o \
- print-utils.o rsp-low.o errors.o
+ print-utils.o rsp-low.o errors.o common-debug.o debug.o
TSOBS = inflow.o
@@ -2149,6 +2150,10 @@ errors.o: ${srcdir}/common/errors.c
$(COMPILE) $(srcdir)/common/errors.c
$(POSTCOMPILE)
+common-debug.o: ${srcdir}/common/common-debug.c
+ $(COMPILE) $(srcdir)/common/common-debug.c
+ $(POSTCOMPILE)
+
#
# gdb/target/ dependencies
#