From c5e92cca56da9153985d4c15dab243e383f66919 Mon Sep 17 00:00:00 2001 From: Gary Benson Date: Thu, 11 Sep 2014 11:19:56 +0100 Subject: Introduce show_debug_regs This commit adds a new global flag show_debug_regs to common-debug.h to replace the flag debug_hw_points used by gdbserver and by the Linux x86 and AArch64 ports, and to replace the flag maint_show_dr used by the Linux MIPS port. Note that some debug printing in the AArch64 port was enabled only if debug_hw_points > 1 but no way to set debug_hw_points to values other than 0 and 1 was provided; that code was effectively dead. This commit enables all debug printing if show_debug_regs is nonzero, so the AArch64 output will be more verbose than previously. gdb/ChangeLog: * common/common-debug.h (show_debug_regs): Declare. * common/common-debug.c (show_debug_regs): Define. * aarch64-linux-nat.c (debug_hw_points): Don't define. Replace all uses with show_debug_regs. Replace all uses that considered debug_hw_points as a multi-value integer with straight boolean uses. * x86-nat.c (debug_hw_points): Don't define. Replace all uses with show_debug_regs. * nat/x86-dregs.c (debug_hw_points): Don't declare. Replace all uses with show_debug_regs. * mips-linux-nat.c (maint_show_dr): Don't define. Replace all uses with show_debug_regs. gdb/gdbserver/ChangeLog: * server.h (debug_hw_points): Don't declare. * server.c (debug_hw_points): Don't define. Replace all uses with show_debug_regs. * linux-aarch64-low.c (debug_hw_points): Don't define. Replace all uses with show_debug_regs. --- gdb/common/common-debug.c | 4 ++++ gdb/common/common-debug.h | 5 +++++ 2 files changed, 9 insertions(+) (limited to 'gdb/common') diff --git a/gdb/common/common-debug.c b/gdb/common/common-debug.c index 660fc70..5cac3bf 100644 --- a/gdb/common/common-debug.c +++ b/gdb/common/common-debug.c @@ -26,6 +26,10 @@ /* See common/common-debug.h. */ +int show_debug_regs; + +/* See common/common-debug.h. */ + void debug_printf (const char *fmt, ...) { diff --git a/gdb/common/common-debug.h b/gdb/common/common-debug.h index c2bb192..348b0e3 100644 --- a/gdb/common/common-debug.h +++ b/gdb/common/common-debug.h @@ -20,6 +20,11 @@ #ifndef COMMON_DEBUG_H #define COMMON_DEBUG_H +/* Set to nonzero to enable debugging of hardware breakpoint/ + watchpoint support code. */ + +extern int show_debug_regs; + /* Print a formatted message to the appropriate channel for debugging output for the client. */ -- cgit v1.1