Re: [PATCH v2 1/9] gdb: Generalize handling of the shadow stack pointer.

Thiago Jung Bauermann
2026-02-27T22:55:24Z

"Schimpe, Christina" <christina.schimpe@intel.com> writes:

>> -----Original Message-----
>> From: Tom Tromey <tom@tromey.com>
>> Sent: Donnerstag, 19. Februar 2026 18:55
>> To: Schimpe, Christina <christina.schimpe@intel.com>
>> Cc: gdb-patches@sourceware.org; thiago.bauermann@linaro.org
>> Subject: Re: [PATCH v2 1/9] gdb: Generalize handling of the shadow stack
>> pointer.
>>
>> >>>>> Christina Schimpe <christina.schimpe@intel.com> writes:
>>
>> > Until now, handling of the shadow stack pointer has been done in the
>> > target dependent implementations of the gdbarch hook
>> > 'gdbarch_shadow_stack_push'. Also amd64 and aarch64 linux specific
>> > unwinders for the shadow stack pointer are implemented.
>> > In a following patch a command line option "-shadow" will be added to
>> > the backtrace command to print the shadow stack backtrace. This
>> > requires more target-independent logic to handle the shadow stack
>> > pointer. To avoid that we duplicate the logic, add new source and
>> > header files "shadow-stack" for the implementation of
>> > shadow_stack_push and shadow stack pointer unwinding in a target-
>> independent way.
>>
>> This looks reasonable to me, but I think someone else ought to examine the
>> arch-specific bits.
>
> Ok, I'll wait for more feedback on this. Thiago has run some tests for GCS already,
> but only with v1 AFAIK.

I'm currently looking into these patches. Sorry for the delay. I'll
provide my feedback next week.

--
Thiago