X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fs390-tdep.c;h=e962824ca0471b3279d0dcc2fac82068a0f0d401;hb=cf4088a92f240b01e6db8f39a5a3abfa918f6f2c;hp=a3a3cb6c6c89a03fef8d68a3773a9555559d0830;hpb=e4c4a59b48b2cec10cffac4f562937de00cb5f3f;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index a3a3cb6c6c..e962824ca0 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -492,6 +492,9 @@ s390_displaced_step_fixup (struct gdbarch *gdbarch, /* Recompute saved return address in R1. */ regcache_cooked_write_unsigned (regs, S390_R0_REGNUM + r1, amode | (from + insnlen)); + /* Update PC iff the instruction doesn't actually branch. */ + if (insn[0] == op_basr && r2 == 0) + regcache_write_pc (regs, from + insnlen); } /* Handle absolute branch instructions. */ @@ -661,7 +664,7 @@ s390_load (struct s390_prologue_data *data, if (pv_is_constant (addr)) { struct target_section *secp; - secp = target_section_by_addr (target_stack, addr.k); + secp = target_section_by_addr (current_top_target (), addr.k); if (secp != NULL && (bfd_get_section_flags (secp->the_bfd_section->owner, secp->the_bfd_section) @@ -1074,10 +1077,10 @@ s390_guess_tracepoint_registers (struct gdbarch *gdbarch, } store_unsigned_integer (reg, sz, gdbarch_byte_order (gdbarch), pswa); - regcache_raw_supply (regcache, S390_PSWA_REGNUM, reg); + regcache->raw_supply (S390_PSWA_REGNUM, reg); store_unsigned_integer (reg, sz, gdbarch_byte_order (gdbarch), pswm); - regcache_raw_supply (regcache, S390_PSWM_REGNUM, reg); + regcache->raw_supply (S390_PSWM_REGNUM, reg); } /* Return the name of register REGNO. Return the empty string for