diff options
author | Pedro Alves <palves@redhat.com> | 2015-08-06 18:23:01 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2015-08-07 17:26:21 +0100 |
commit | 5ac213430b710e8aaed1f4cea6ff809783201df9 (patch) | |
tree | 302a197a20f1f30d0fc7f4edef4ea122b4bbe5fe /gdb/macroexp.c | |
parent | 7f03bd92e389a32da490bb55037881cf374d0f69 (diff) | |
download | gdb-5ac213430b710e8aaed1f4cea6ff809783201df9.zip gdb-5ac213430b710e8aaed1f4cea6ff809783201df9.tar.gz gdb-5ac213430b710e8aaed1f4cea6ff809783201df9.tar.bz2 |
S/390: displaced stepping and PC-relative RIL-b/RIL-c instructions
This adds displaced stepping support for the General-Instruction
Extension Facility instructions, which have a PC-relative displacement
(RIL-b/RIL-c). We already handle RIL branches, but not others.
Currently, displaced stepping a breakpoint put on any of these
instructions results in the inferior crashing when or after the
instruction is executed out-of-line in the scratch pad.
This patch takes the easy route of patching the displacement in the
copy of the instruction in the scratch pad. As the displacement is a
signed 32-bit field, it's possible that the stratch pad ends too far
that the needed displacement doesn't fit in the adjusted instruction,
as e.g., if stepping over a breakpoint in a shared library (the
scratch pad is around the main program's entry point). That case is
detected and GDB falls back to stepping over the breakpoint in-line
(which involves pausing all threads momentarily).
(We could probably do something smarter, but I don't plan on doing it
myself. This was already sufficient to get "maint set target-non-stop
on" working regression free on S/390.)
Tested on S/390 RHEL 7.1, where it fixes a few hundred FAILs when
testing with displaced stepping force-enabled, with the end result
being no regressions compared to a test run that doesn't force
displaced stepping. Fixes the non-stop tests compared to mainline
too; most are crashing due to this on the machine I run tests on.
gdb/ChangeLog:
2015-08-07 Pedro Alves <palves@redhat.com>
* s390-linux-tdep.c (is_non_branch_ril)
(s390_displaced_step_copy_insn): New functions.
(s390_displaced_step_fixup): Update comment.
(s390_gdbarch_init): Install s390_displaced_step_copy_insn as
gdbarch_displaced_step_copy_insn hook.
Diffstat (limited to 'gdb/macroexp.c')
0 files changed, 0 insertions, 0 deletions