This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Implementation of different software breakpoint kinds in gdb server
On 10/18/2012 11:28 AM, Yao Qi wrote:
> On 10/18/2012 06:08 PM, Pedro Alves wrote:
>> Offhand, the main issues with tracepoints on ARM are:
>>
>> #1 - gdbserver needs to know how to step over the tracepoints, without gdb's intervention.
>>
>> #2 - ARM can't hw single-step, so that needs to be done the hard way, with breakpoints
>> (a.k.a., software single-step).
>> All the logic to do that is in gdb. This conflicts with #1.
>>
>> So we'd need to teach gdbserver to software single-step. Maybe it's possible
>> to tell offline all the possible destinations of an instruction, so we could still
>> leave that logic in gdb, but I suspect not.
>
> I am wondering that it might be relatively easier to implement fast tracepoint in which step-over is not needed, if finding a jumppad is not a problem :)
Maybe. :-)
The "move out of jumppad" logic uses single-stepping. I guess we could come up
with something clever to avoid it. Related, linux_fast_tracepoint_collecting logic
assumes it can identify a thread from its tls base / thread area. And this assumes
you can retrieve this address without an infcall. This is possible on x86. Don't know
about ARM (well, in an ABI-stable way).
--
Pedro Alves