s390: Fix displaced-stepping certain relative branch insns
authorAndreas Arnez <arnez@linux.vnet.ibm.com>
Mon, 20 Mar 2017 16:30:01 +0000 (17:30 +0100)
committerAndreas Arnez <arnez@linux.vnet.ibm.com>
Mon, 20 Mar 2017 16:30:01 +0000 (17:30 +0100)
commitdcb84eda0c5f25835251a311c4d6704e70cfa498
treef8dd148d45ddfff7553e1d4f76239dc6374de641
parent4ea0266c22eccf6e7719469a981267659e47ef3a
s390: Fix displaced-stepping certain relative branch insns

On s390x targets GDB can not handle displaced stepping correctly for some
relative branch instructions, such as cij (compare immediate and branch
relative).  When setting a breakpoint on such an instruction and
single-stepping over it, the branch is never taken.  This is because the
check in s390_displaced_step_fixup for relative branch instructions is
incomplete.

Instead of completing the list of relative branch instructions to check
against, this patch just treats relative branches and non-branching
instructions in the same way and adjusts the PC with the negated
displacement in both cases.

gdb/ChangeLog:

* s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
(s390_displaced_step_fixup): Cover relative branches with the
default fixup handling.  This fixes lack of support for some
relative branch instructions.
gdb/ChangeLog
gdb/s390-linux-tdep.c
This page took 0.024903 seconds and 4 git commands to generate.