aboutsummaryrefslogtreecommitdiff
path: root/gdb/source-cache.c
diff options
context:
space:
mode:
authorLuis Machado <luis.machado@linaro.org>2020-01-09 16:04:36 -0300
committerLuis Machado <luis.machado@linaro.org>2020-01-21 10:25:15 -0300
commit0c27188999bfc5bf03536bf44593c4ed8df296c3 (patch)
tree84eb2d1782b3d4bef8b5484a2540c1c98ce69c6e /gdb/source-cache.c
parent1a0351246a5cfd4a425e0a32b6a1a94f3ce21f3f (diff)
downloadbinutils-0c27188999bfc5bf03536bf44593c4ed8df296c3.zip
binutils-0c27188999bfc5bf03536bf44593c4ed8df296c3.tar.gz
binutils-0c27188999bfc5bf03536bf44593c4ed8df296c3.tar.bz2
Fix step-over-syscall.exp failure
In particular, this one: FAIL: gdb.base/step-over-syscall.exp: fork: displaced=on: check_pc_after_cross_syscall: single step over fork final pc When ptrace fork event reporting is enabled, GDB gets a PTRACE_EVENT_FORK event whenever the inferior executes the fork syscall. Then the logic is that GDB needs to step the inferior yet again in order to receive a predetermined SIGTRAP, but no execution takes place because the signal was already queued for delivery. That means the PC should stay the same. I noticed the aarch64 code is currently adjusting the PC in this situation, making the inferior skip an instruction without executing it. The following change checks if we did not execute the instruction (pc - to == 0), making proper adjustments for such case. Regression tested on aarch64-linux-gnu on the tryserver. gdb/ChangeLog: 2020-01-21 Luis Machado <luis.machado@linaro.org> * aarch64-tdep.c (struct aarch64_displaced_step_closure ) <pc_adjust>: Adjust the documentation. (aarch64_displaced_step_fixup): Check if PC really moved before adjusting it.
Diffstat (limited to 'gdb/source-cache.c')
0 files changed, 0 insertions, 0 deletions