This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] S390: Fix displaced stepping of "basr r,0"


*** TEST RESULTS FOR COMMIT 5c1eda30f55e9c543de26fec0246f4d7655c81e4 ***

Author: Andreas Arnez <arnez@linux.vnet.ibm.com>
Branch: master
Commit: 5c1eda30f55e9c543de26fec0246f4d7655c81e4

S390: Fix displaced stepping of "basr r,0"

The BASR instruction behaves differently depending on whether the second
operand is a number from 1 to 15, or zero.  In the former case BASR jumps
to the address contained in the general register of that number, but in
the latter case no jump is performed.  GDB's displaced-stepping logic does
not distinguish these cases, although it should.

This is fixed.  In the case where no jump is performed the PC is adjusted
to point back after the original instruction.  Otherwise the PC is left
alone.

gdb/ChangeLog:

	* s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
	non-branching basr.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]