[PATCH v2 1/5] gdb/aarch64: Implement software single stepping for MOPS instructions

Thiago Jung Bauermann thiago.bauermann@linaro.org
Tue May 21 21:40:39 GMT 2024


Pedro Alves <pedro@palves.net> writes:

> On 2024-05-07 03:22, Thiago Jung Bauermann wrote:
>
>> The Arm Architecture Reference Manual says that "the prologue, main, and
>> epilogue instructions are expected to be run in succession and to appear
>> consecutively in memory".  Therefore GDB needs to treat them as an atomic
>> instruction sequence, and also can't do displaced stepping with them.
>
> Curious on this "can't".  GDB could copy the whole sequence to the displaced
> stepping buffer, and execute then in one go, and it should work, right?
>
> Not suggesting that you should do it as a requisite to the patch, just
> trying to understand it, in case the issue comes up again in other contexts.

Yes. I hadn't thought of that, but Luis also gave that idea. He said¹
that "Regarding displaced stepping, we can disable displaced stepping
temporarily for these instructions. If we find a convenient way to
relocate the whole block of MOPS instructions, then we can add that
later on."

I'll work on it as a future improvement.

-- 
Thiago

¹ https://inbox.sourceware.org/gdb-patches/2c974745-b2d1-4981-bbc8-1b5985970fdb@arm.com/


More information about the Gdb-patches mailing list