aboutsummaryrefslogtreecommitdiff
path: root/gdb/nat
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/nat
parent3adc1a7d457d7fcdc413b970f1ed02b0925e6da8 (diff)
downloadgdb-c5e92cca56da9153985d4c15dab243e383f66919.zip
gdb-c5e92cca56da9153985d4c15dab243e383f66919.tar.gz
gdb-c5e92cca56da9153985d4c15dab243e383f66919.tar.bz2
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/nat')
-rw-r--r--gdb/nat/x86-dregs.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/gdb/nat/x86-dregs.c b/gdb/nat/x86-dregs.c
index fbb2426..c0d1e72 100644
--- a/gdb/nat/x86-dregs.c
+++ b/gdb/nat/x86-dregs.c
@@ -175,11 +175,6 @@
/* Types of operations supported by x86_handle_nonaligned_watchpoint. */
typedef enum { WP_INSERT, WP_REMOVE, WP_COUNT } x86_wp_op_t;
-#ifndef GDBSERVER
-/* Whether or not to print the mirrored debug registers. */
-extern int debug_hw_points;
-#endif
-
/* Print the values of the mirrored debug registers. */
static void
@@ -511,7 +506,7 @@ x86_dr_insert_watchpoint (struct x86_debug_reg_state *state,
if (retval == 0)
x86_update_inferior_debug_regs (state, &local_state);
- if (debug_hw_points)
+ if (show_debug_regs)
x86_show_dr (state, "insert_watchpoint", addr, len, type);
return retval;
@@ -550,7 +545,7 @@ x86_dr_remove_watchpoint (struct x86_debug_reg_state *state,
if (retval == 0)
x86_update_inferior_debug_regs (state, &local_state);
- if (debug_hw_points)
+ if (show_debug_regs)
x86_show_dr (state, "remove_watchpoint", addr, len, type);
return retval;
@@ -640,12 +635,12 @@ x86_dr_stopped_data_address (struct x86_debug_reg_state *state,
{
addr = x86_dr_low_get_addr (i);
rc = 1;
- if (debug_hw_points)
+ if (show_debug_regs)
x86_show_dr (state, "watchpoint_hit", addr, -1, hw_write);
}
}
- if (debug_hw_points && addr == 0)
+ if (show_debug_regs && addr == 0)
x86_show_dr (state, "stopped_data_addr", 0, 0, hw_write);
if (rc)