aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog6
-rw-r--r--gdb/gdbserver/i386-low.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 7c72043..8fb0e07 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,11 @@
2014-06-18 Gary Benson <gbenson@redhat.com>
+ * i386-low.c (i386_dr_low_can_set_addr): New macro.
+ (i386_dr_low_can_set_control): Likewise.
+ (i386_insert_aligned_watchpoint): New check.
+
+2014-06-18 Gary Benson <gbenson@redhat.com>
+
* i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
Renamed to state.
diff --git a/gdb/gdbserver/i386-low.c b/gdb/gdbserver/i386-low.c
index 8c50838..8d6f26c 100644
--- a/gdb/gdbserver/i386-low.c
+++ b/gdb/gdbserver/i386-low.c
@@ -32,6 +32,9 @@
The functions below implement debug registers sharing by reference
counts, and allow to watch regions up to 16 bytes long. */
+#define i386_dr_low_can_set_addr() 1
+#define i386_dr_low_can_set_control() 1
+
/* Debug register size, in bytes. */
/* NOTE: sizeof (long) == 4 on win64. */
#define i386_get_debug_register_length() (sizeof (void *))
@@ -273,6 +276,9 @@ i386_insert_aligned_watchpoint (struct i386_debug_reg_state *state,
{
int i;
+ if (!i386_dr_low_can_set_addr () || !i386_dr_low_can_set_control ())
+ return -1;
+
/* First, look for an occupied debug register with the same address
and the same RW and LEN definitions. If we find one, we can
reuse it for this watchpoint as well (and save a register). */