binutils-gdb/gdb/testsuite/gdb.reverse
Bruno Larsen 1f3e37e057 gdb/reverse: Fix stepping over recursive functions
Currently, when using GDB to do reverse debugging, if we try to use the
command "reverse next" to skip a recursive function, instead of skipping
all of the recursive calls and stopping in the previous line, we stop at
the second to last recursive call, and need to manually step backwards
until we leave the first call.  This is well documented in PR gdb/16678.

This bug happens because when GDB notices that a reverse step has
entered into a function, GDB will add a step_resume_breakpoint at the
start of the function, then single step out of the prologue once that
breakpoint is hit.  The problem was happening because GDB wouldn't give
that step_resume_breakpoint a frame-id, so the first time the breakpoint
was hit, the inferior would be stopped.  This is fixed by giving the
current frame-id to the breakpoint.

This commit also changes gdb.reverse/step-reverse.c to contain a
recursive function and attempt to both, skip it altogether, and to skip
the second call from inside the first call, as this setup broke a
previous version of the patch.
2022-10-21 12:49:26 +02:00
..
amd64-tailcall-reverse.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
amd64-tailcall-reverse.exp Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
amd64-tailcall-reverse.S Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
break-precsave.exp Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
break-reverse.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
break-reverse.exp Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
consecutive-precsave.exp Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
consecutive-reverse.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
consecutive-reverse.exp Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
finish-precsave.exp Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
finish-reverse-bkpt.exp Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
finish-reverse.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
finish-reverse.exp Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
fstatat-reverse.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
fstatat-reverse.exp Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
getrandom.c [gdb/record] Support recording of getrandom 2022-07-12 15:15:19 +02:00
getrandom.exp [gdb/record] Support recording of getrandom 2022-07-12 15:15:19 +02:00
getresuid-reverse.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
getresuid-reverse.exp Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
i386-precsave.exp [gdb/testsuite] Enable some test-cases for x86_64 -m32 2022-06-27 12:47:26 +02:00
i386-reverse.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
i386-reverse.exp [gdb/testsuite] Enable some test-cases for x86_64 -m32 2022-06-27 12:47:26 +02:00
i386-sse-reverse.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
i386-sse-reverse.exp Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
i387-env-reverse.c
i387-env-reverse.exp [gdb/testsuite] Fix gdb.reverse/i387-env-reverse.exp for -pie 2022-06-27 12:47:26 +02:00
i387-stack-reverse.c
i387-stack-reverse.exp [gdb/testsuite] Enable some test-cases for x86_64 -m32 2022-06-27 12:47:26 +02:00
insn-reverse-aarch64.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
insn-reverse-arm.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
insn-reverse-x86.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
insn-reverse.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
insn-reverse.exp gdb: Fix DUPLICATE and PATH regressions throughout 2022-05-25 13:44:12 +01:00
machinestate-precsave.exp gdb: Fix DUPLICATE and PATH regressions throughout 2022-05-25 13:44:12 +01:00
machinestate.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
machinestate.exp gdb: Fix DUPLICATE and PATH regressions throughout 2022-05-25 13:44:12 +01:00
ms1.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
next-reverse-bkpt-over-sr.exp Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
pipe-reverse.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
pipe-reverse.exp Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
ppc_record_test_isa_2_06.c GDB PowerPC record test cases for ISA 2.06 and ISA 3.1 2022-04-26 19:23:49 +00:00
ppc_record_test_isa_2_06.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
ppc_record_test_isa_3_1.c GDB PowerPC record test cases for ISA 2.06 and ISA 3.1 2022-04-26 19:23:49 +00:00
ppc_record_test_isa_3_1.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
readv-reverse.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
readv-reverse.exp Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
recvmsg-reverse.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
recvmsg-reverse.exp Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
rerun-prec.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
rerun-prec.exp Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
s390-mvcle.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
s390-mvcle.exp Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
shr.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
shr1.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
shr2.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
sigall-precsave.exp Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
sigall-reverse.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
sigall-reverse.exp Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
singlejmp-reverse-nodebug.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
singlejmp-reverse-nodebug.S Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
singlejmp-reverse.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
singlejmp-reverse.exp Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
singlejmp-reverse.S Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
solib-precsave.exp [gdb/testsuite] Fix gdb.base/infoline-reloc-main-from-zero.exp with clang 2022-10-14 13:09:51 +02:00
solib-reverse.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
solib-reverse.exp gdb/testsuite: remove unneeded calls to get_compiler_info 2022-06-24 15:07:29 +01:00
step-indirect-call-thunk.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
step-indirect-call-thunk.exp Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
step-precsave.exp gdb/reverse: Fix stepping over recursive functions 2022-10-21 12:49:26 +02:00
step-reverse.c gdb/reverse: Fix stepping over recursive functions 2022-10-21 12:49:26 +02:00
step-reverse.exp gdb/reverse: Fix stepping over recursive functions 2022-10-21 12:49:26 +02:00
test_ioctl_TCSETSW.c Fix comparison of unsigned long int to int in record_linux_system_call. 2022-06-10 16:19:01 +00:00
test_ioctl_TCSETSW.exp [gdb/testsuite] Fix gdb.reverse/test_ioctl_TCSETSW.exp with libc debuginfo 2022-06-14 00:26:46 +02:00
time-reverse.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
time-reverse.exp Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
until-precsave.exp Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
until-reverse.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
until-reverse.exp Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
ur1.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
waitpid-reverse.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
waitpid-reverse.exp Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
watch-precsave.exp Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
watch-reverse.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
watch-reverse.exp Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00