]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb, gdbarch: Enable inferior calls for shadow stack support.
authorSchimpe, Christina <christina.schimpe@intel.com>
Wed, 7 May 2025 16:46:17 +0000 (16:46 +0000)
committerThiago Jung Bauermann <thiago.bauermann@linaro.org>
Mon, 9 Jun 2025 19:32:28 +0000 (16:32 -0300)
commit628eccdecb66c661747f5bed153482a7744d6c22
treeaa69389a400045b71f23a14a8ee5d684523f3f58
parent88d0753018cfff7a74d59316caf42e83afb2a6bc
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>
gdb/gdbarch-gen.c
gdb/gdbarch-gen.h
gdb/gdbarch_components.py
gdb/infcall.c