summaryrefslogtreecommitdiff
path: root/gdb/mips-linux-nat.c
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2014-09-11 11:19:56 +0100
committerGary Benson <gbenson@redhat.com>2014-09-11 11:19:56 +0100
commitc5e92cca56da9153985d4c15dab243e383f66919 (patch)
tree92e704193346474629577b55d7ff0b80167df4f0 /gdb/mips-linux-nat.c
parent3adc1a7d457d7fcdc413b970f1ed02b0925e6da8 (diff)
downloadbinutils-gdb-c5e92cca56da9153985d4c15dab243e383f66919.tar.gz
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.
Diffstat (limited to 'gdb/mips-linux-nat.c')
-rw-r--r--gdb/mips-linux-nat.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
index ffc8411ca3b..9aada60b65f 100644
--- a/gdb/mips-linux-nat.c
+++ b/gdb/mips-linux-nat.c
@@ -50,10 +50,6 @@
we'll clear this and use PTRACE_PEEKUSER instead. */
static int have_ptrace_regsets = 1;
-/* Whether or not to print the mirrored debug registers. */
-
-static int maint_show_dr;
-
/* Saved function pointers to fetch and store a single register using
PTRACE_PEEKUSER and PTRACE_POKEUSER. */
@@ -690,7 +686,7 @@ mips_linux_insert_watchpoint (struct target_ops *self,
watch_mirror = regs;
retval = write_watchpoint_regs ();
- if (maint_show_dr)
+ if (show_debug_regs)
mips_show_dr ("insert_watchpoint", addr, len, type);
return retval;
@@ -738,7 +734,7 @@ mips_linux_remove_watchpoint (struct target_ops *self,
retval = write_watchpoint_regs ();
- if (maint_show_dr)
+ if (show_debug_regs)
mips_show_dr ("remove_watchpoint", addr, len, type);
return retval;
@@ -775,7 +771,7 @@ _initialize_mips_linux_nat (void)
struct target_ops *t;
add_setshow_boolean_cmd ("show-debug-regs", class_maintenance,
- &maint_show_dr, _("\
+ &show_debug_regs, _("\
Set whether to show variables that mirror the mips debug registers."), _("\
Show whether to show variables that mirror the mips debug registers."), _("\
Use \"on\" to enable, \"off\" to disable.\n\