From: Pedro Alves <palves@redhat.com>
To: Xavier Roirand <roirand@adacore.com>, gdb-patches@sourceware.org
Cc: brobecker@adacore.com
Subject: Re: [RFA v2] (x86) Fix watchpoint using hardware breakpoint for some distro
Date: Mon, 26 Mar 2018 11:38:00 -0000 [thread overview]
Message-ID: <38205bbb-35c0-c512-0d2c-df0fe9596b4f@redhat.com> (raw)
In-Reply-To: <736c9dbb-4583-c425-f20f-fd3bc5cf84e8@adacore.com>
On 03/21/2018 04:17 PM, Xavier Roirand wrote:
> Hello Pedro,
>
> Le 3/20/18 à 4:11 PM, Pedro Alves a écrit :
>> On 03/20/2018 02:28 PM, Xavier Roirand wrote:
>> Hmm, that's TRAP_BRKPT nowadays. What was '1' supposed to mean in
>> kernels of such vintage? What was it's symbolic name back then?
>
> As far as I can see in header file (/usr/include/bits/siginfo.h),
> this is the same value, it's:
>
> TRAP_BRKPT = 1,       /* Process breakpoint. */
>
>> In the table in linux-ptrace.h, we see that modern kernels report
>> TRAP_BRKPT/1 for the "single-stepping a syscall" case. What do
>> those older kernels report in that case then?
>
> When "single-stepping" syscall, the same value (TRAP_BRKPT) is
> reported.
>
>> What do those kernels report for hardware _breakpoints_? Is it 1 too?
>
> Yes, I've checked this and it's 1 also.
>
>> Wondering whether we should make GDB_ARCH_IS_TRAP_HWBKPT return
>> true for 1 too...
>>
>> Please provide a more complete picture.
>>
>
> Is it enough or do you think I need to provide more info ?
>
Earlier you said that TRAP_HWBKPT was the only case that was different
from current kernels, but turns out that's not accurate. And now
I'm left wondering what do those kernels report for the other cases
you haven't confirmed yet, like hw breakpoints, software breakpoints,
and regular single steps. We need a complete picture to figure out
what the best fix is.
E.g., if hw breakpoints and watchpoints report the same si_code,
how do hw breakpoints work with your patch?
Thanks,
Pedro Alves
next prev parent reply other threads:[~2018-03-26 11:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-16 14:07 [RFA] " Xavier Roirand
2018-03-19 14:29 ` Pedro Alves
2018-03-20 14:28 ` [RFA v2] " Xavier Roirand
[not found] ` <c0d80d21-9f0e-c6b0-caaf-7b6246e83807@redhat.com>
2018-03-21 16:17 ` Xavier Roirand
2018-03-26 11:38 ` Pedro Alves [this message]
2018-03-27 13:19 ` Xavier Roirand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=38205bbb-35c0-c512-0d2c-df0fe9596b4f@redhat.com \
--to=palves@redhat.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=roirand@adacore.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox