aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2011-05-31 21:18:56 +0000
committerPedro Alves <palves@redhat.com>2011-05-31 21:18:56 +0000
commit0a5b1e09bf62fcbe776eb641640f802f64bb6169 (patch)
treedd65006627e5bfe52013d110020fb5255e17a3c7 /gdb/gdbserver
parent74ce8de7cab5dd5a4e098f226235256b976b5165 (diff)
downloadfsf-binutils-gdb-0a5b1e09bf62fcbe776eb641640f802f64bb6169.zip
fsf-binutils-gdb-0a5b1e09bf62fcbe776eb641640f802f64bb6169.tar.gz
fsf-binutils-gdb-0a5b1e09bf62fcbe776eb641640f802f64bb6169.tar.bz2
2011-05-31 Pedro Alves <pedro@codesourcery.com>
gdb/gdbserver/ * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in assertion. * win32-i386-low.c (i386_dr_low_get_addr): Ditto. gdb/testsuite/ * gdb.arch/i386-dr3-watch.c: New file. * gdb.arch/i386-dr3-watch.exp: New file.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog6
-rw-r--r--gdb/gdbserver/linux-x86-low.c2
-rw-r--r--gdb/gdbserver/win32-i386-low.c2
3 files changed, 8 insertions, 2 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 98c1100..4a9baf6 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,9 @@
+2011-05-31 Pedro Alves <pedro@codesourcery.com>
+
+ * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
+ assertion.
+ * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
+
2011-05-26 Yao Qi <yao@codesourcery.com>
* Makefile.in (thread-db.o): Track dependence to
diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c
index 027a563..dd69379 100644
--- a/gdb/gdbserver/linux-x86-low.c
+++ b/gdb/gdbserver/linux-x86-low.c
@@ -508,7 +508,7 @@ i386_dr_low_get_addr (int regnum)
ptid_t ptid = ptid_of (lwp);
/* DR6 and DR7 are retrieved with some other way. */
- gdb_assert (DR_FIRSTADDR <= regnum && regnum < DR_LASTADDR);
+ gdb_assert (DR_FIRSTADDR <= regnum && regnum <= DR_LASTADDR);
return x86_linux_dr_get (ptid, regnum);
}
diff --git a/gdb/gdbserver/win32-i386-low.c b/gdb/gdbserver/win32-i386-low.c
index 6063df8..c29b9b0 100644
--- a/gdb/gdbserver/win32-i386-low.c
+++ b/gdb/gdbserver/win32-i386-low.c
@@ -61,7 +61,7 @@ i386_dr_low_set_addr (const struct i386_debug_reg_state *state, int regnum)
CORE_ADDR
i386_dr_low_get_addr (int regnum)
{
- gdb_assert (DR_FIRSTADDR <= regnum && regnum < DR_LASTADDR);
+ gdb_assert (DR_FIRSTADDR <= regnum && regnum <= DR_LASTADDR);
return debug_reg_state.dr_mirror[regnum];
}