[2.7] bpo-32962: Fix test_gdb failure in debug build with -mcet -fcf-protection -O0 (GH-9656) by vstinner · Pull Request #9788 · python/cpython (original) (raw)
When Python is built with the intel control-flow protection flags,
-mcet -fcf-protection, gdb is not able to read the stack without
actually jumping inside the function. This means an extra
'next' command is required to make the $pc (program counter)
enter the function and make the stack of the function exposed to gdb.
test_gdb: get_gdb_repr() now uses the "backtrace 1" command after
breakpoint, as in the master branch.
Co-Authored-By: Marcel Plch gmarcel.plch@gmail.com
(cherry picked from commit 9b7c74c)
(cherry picked from commit 79d2133)