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

Pedro Alves
2014-06-19T15:02:19Z

On 06/19/2014 02:43 PM, Jan Kratochvil wrote:
> On Tue, 17 Jun 2014 21:18:50 +0200, Jan Kratochvil wrote:
>> On Thu, 20 Mar 2014 14:57:36 +0100, Pedro Alves wrote:
>>> Here's what I pushed (nothing else changed).
>>
>> 31e77af205cf6564c2bf4c18400b4ca16bdf92cd is the first bad commit
>> commit 31e77af205cf6564c2bf4c18400b4ca16bdf92cd
>> Author: Pedro Alves <palves@redhat.com>
>> Date: Thu Mar 20 13:26:32 2014 +0000
>> PR breakpoints/7143 - Watchpoint does not trigger when first set
>>
>> PASS kernel-3.14.6-200.fc20.x86_64
>> FAIL kernel-3.13.10-200.dentrybuflen.fc20.x86_64
>
> That was a red herring, in fact it was due to different GCC.
>
> (gdb) disas marker
> Dump of assembler code for function marker:
> 0x0000000000400826 <+0>: push %rbp
> 0x0000000000400827 <+1>: mov %rsp,%rbp
> => 0x000000000040082a <+4>: pop %rbp
> 0x000000000040082b <+5>: retq
> End of assembler dump.
>
> ptrace(PTRACE_POKEUSER, 24574, offsetof(struct user, u_debugreg), 0x40082a) = -1 EINVAL (Invalid argument)
>
> New GDB in the 'hbreak' case does not align the breakpoint address.

Hmm, I'm confused. Why would the breakpoint address need to be aligned?
And aligned to what?

> Attaching gzipped gdb.threads/watchpoint-fork-parent-st
> from gcc-4.9.0-9.fc21.x86_64.

Thanks, I can reproduce it.

--
Pedro Alves