diff options
author | Pedro Alves <palves@redhat.com> | 2010-03-23 18:00:57 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2010-03-23 18:00:57 +0000 |
commit | b9a881c2d200e0e2920f9d307817400f2bdbefac (patch) | |
tree | aa186899cc50d187414c18c420a763b0ad5ec886 | |
parent | 619a37130fdd1584c8e4c7527d3dec6af8ba5b10 (diff) | |
download | gdb-b9a881c2d200e0e2920f9d307817400f2bdbefac.zip gdb-b9a881c2d200e0e2920f9d307817400f2bdbefac.tar.gz gdb-b9a881c2d200e0e2920f9d307817400f2bdbefac.tar.bz2 |
* linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
lwp had been stopped by a watchpoint.
-rw-r--r-- | gdb/gdbserver/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/gdbserver/linux-x86-low.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 2944489..552c83d 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2010-03-23 Pedro Alves <pedro@codesourcery.com> + + * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the + lwp had been stopped by a watchpoint. + 2010-03-16 Pedro Alves <pedro@codesourcery.com> * server.h (internal_error): Declare. diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c index 496baa2..fe5d46e 100644 --- a/gdb/gdbserver/linux-x86-low.c +++ b/gdb/gdbserver/linux-x86-low.c @@ -507,10 +507,11 @@ x86_linux_new_thread (void) static void x86_linux_prepare_to_resume (struct lwp_info *lwp) { + ptid_t ptid = ptid_of (lwp); + if (lwp->arch_private->debug_registers_changed) { int i; - ptid_t ptid = ptid_of (lwp); int pid = ptid_get_pid (ptid); struct process_info *proc = find_process_pid (pid); struct i386_debug_reg_state *state = &proc->private->arch_private->debug_reg_state; @@ -522,6 +523,9 @@ x86_linux_prepare_to_resume (struct lwp_info *lwp) lwp->arch_private->debug_registers_changed = 0; } + + if (lwp->stopped_by_watchpoint) + x86_linux_dr_set (ptid, DR_STATUS, 0); } /* When GDBSERVER is built as a 64-bit application on linux, the |