https://sourceware.org/bugzilla/show_bug.cgi?id=31115
--- Comment #10 from Sourceware Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Tom de Vries <vr...@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9e2d0e2f5369bdd483973171ce436062b866d2dc commit 9e2d0e2f5369bdd483973171ce436062b866d2dc Author: Tom de Vries <tdevr...@suse.de> Date: Sat Jan 4 10:19:37 2025 +0100 [gdb/cli] Warn about forced return from signal trampoline The Linaro CI reported a regression on arm-linux in test-case gdb.base/sigstep.exp following commit 7b46460a619 ("[gdb/symtab] Apply workaround for PR gas/31115 a bit more") [1]: ... (gdb) return^M Make __default_sa_restorer return now? (y or n) n^M Not confirmed^M (gdb) FAIL: $exp: return from handleri: \ leave signal trampoline (got interactive prompt) ... After installing package glibc-debuginfo and adding --with-separate-debug-dir to the configure flags, I managed to reproduce the FAIL. The regression seems to be a progression in the sense that the function name for the signal trampoline is found. After reading up on the signal trampoline [2] and the return command [3], my understanding is that forced returning from the signal trampoline is potentially unsafe, given that for instance the process signal mask won't be restored. Fix this by: - rather than using the name, using "signal trampoline" in the query, and - adding a warning about returning from a signal trampoline, giving us: ... (gdb) return^M warning: Returning from signal trampoline does not fully restore pre-signal \ state, such as process signal mask.^M Make signal trampoline return now? (y or n) y^M 87 dummy = 0; dummy = 0; while (!done);^M (gdb) PASS: $exp: return from handleri: leave signal trampoline (in main) ... Tested on x86_64-linux. Reviewed-by: Thiago Jung Bauermann <thiago.bauerm...@linaro.org> [1] https://linaro.atlassian.net/browse/GNU-1459 [2] https://man7.org/linux/man-pages/man2/sigreturn.2.html [3] https://sourceware.org/gdb/current/onlinedocs/gdb.html/Returning.html -- You are receiving this mail because: You are on the CC list for the bug.