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: [RFA v2] (x86) Fix watchpoint using hardware breakpoint for some distro


On 03/20/2018 02:28 PM, Xavier Roirand wrote:
> Hello Pedro,
> 
> I've replied to your comments and attached a v2 patch.
> 
> Le 3/19/18 à 3:28 PM, Pedro Alves a écrit :
>> A few things are missing here:
>>
>> #1 - kernel versions where this was observed.
>>
> 
> CentOS: 2.6.18-419.el5
> Suse: 2.6.27.19-5-pae
> 
>> #2 - If it's not equal to TRAP_HWBKPT, then what's it equal to?
>>       I assume zero?
> 
> No, it's equal to 1.

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?

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?

>> Does the step-into-watchpoint case result in TRAP_TRACE, or does
>> that result in 0 too?  That affects the "continue" in the comment above.
> 
> This results to a value of 1 too.

What do those kernels report for hardware _breakpoints_?  Is it 1 too?
Wondering whether we should make GDB_ARCH_IS_TRAP_HWBKPT return
true for 1 too...

Please provide a more complete picture.

Thanks,
Pedro Alves


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