* linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
authorPedro Alves <palves@redhat.com>
Tue, 23 Mar 2010 18:00:57 +0000 (18:00 +0000)
committerPedro Alves <palves@redhat.com>
Tue, 23 Mar 2010 18:00:57 +0000 (18:00 +0000)
lwp had been stopped by a watchpoint.

gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-x86-low.c

index 29444894ddda38fec2aa5620dde2cec7e2ae177b..552c83d5ee97d23a96a7d8f09f3d3db1ced0f941 100644 (file)
@@ -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.
index 496baa280d5a349081475f2e8a85db1510549e20..fe5d46ef40d06b1a52176056471c1c7dc7218127 100644 (file)
@@ -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);
 }
 \f
 /* When GDBSERVER is built as a 64-bit application on linux, the
This page took 0.043473 seconds and 4 git commands to generate.