]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb, gdbarch: Enable inferior calls for shadow stack support.
authorChristina Schimpe <christina.schimpe@intel.com>
Thu, 11 Apr 2024 09:53:35 +0000 (05:53 -0400)
committerChristina Schimpe <christina.schimpe@intel.com>
Fri, 29 Aug 2025 17:02:10 +0000 (17:02 +0000)
commit4c2fee0658ea2f279d8eb09f20962f139d9dfec3
tree69650935f0aad68e82b963c7e401b80f7b32f672
parenta4011720d4c464db45fc0d3d02656c89c473eedc
gdb, gdbarch: Enable inferior calls for shadow stack support.

Inferior calls in GDB reset the current PC to the beginning of the function
that is called.  As no call instruction is executed the new return address
needs to be pushed to the shadow stack and the shadow stack pointer needs
to be updated.

This commit adds a new gdbarch method to push an address on the shadow
stack.  The method is used to adapt the function 'call_function_by_hand_dummy'
for inferior call shadow stack support.

Reviewed-By: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Approved-By: Luis Machado <luis.machado@arm.com>
Approved-By: Andrew Burgess <aburgess@redhat.com>
gdb/gdbarch-gen.c
gdb/gdbarch-gen.h
gdb/gdbarch_components.py
gdb/infcall.c