This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Regression for watchpoint-fork.exp [Re: [PATCH v3 2/5] PR breakpoints/7143 - Watchpoint does not trigger when first set]


On 06/19/2014 04:02 PM, Pedro Alves wrote:

>> Attaching gzipped gdb.threads/watchpoint-fork-parent-st
>> from gcc-4.9.0-9.fc21.x86_64.
> 
> Thanks, I can reproduce it.

Hmm, I suspect this might be related to kernel-side validation
of DR_CONTROL vs DR0-3, like what we already handle in amd64_linux_prepare_to_resume.
And indeed this below makes the error go away.  Not exactly sure why yet.

diff --git c/gdb/amd64-linux-nat.c w/gdb/amd64-linux-nat.c
index 06199af..5972415 100644
--- c/gdb/amd64-linux-nat.c
+++ w/gdb/amd64-linux-nat.c
@@ -415,6 +415,8 @@ amd64_linux_prepare_to_resume (struct lwp_info *lwp)

         Ensure DR_CONTROL gets written as the very last register here.  */

+      amd64_linux_dr_set (lwp->ptid, DR_CONTROL, 0);
+
       for (i = DR_FIRSTADDR; i <= DR_LASTADDR; i++)
        if (state->dr_ref_count[i] > 0)
          {

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]