From: Ulrich Weigand Date: Mon, 19 Dec 2011 21:45:42 +0000 (+0000) Subject: * s390-tdep.c (s390_push_dummy_call): Set addressing mode bit X-Git-Tag: gdb_7_4-2012-01-24-release~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8311236f3e6af08e97f7ab8cf6117b40827395c;p=thirdparty%2Fbinutils-gdb.git * s390-tdep.c (s390_push_dummy_call): Set addressing mode bit in return PSWA. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 83cfd5b80e4..6b4b889471b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2011-12-19 Ulrich Weigand + + * s390-tdep.c (s390_push_dummy_call): Set addressing mode bit + in return PSWA. + 2011-12-17 Mark Kettenis * amd64obsd-tdep.c (amd64obsd_init_abi): Don't set diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index 1c09739a238..cd0ef9c7ccc 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -2749,9 +2749,15 @@ s390_push_dummy_call (struct gdbarch *gdbarch, struct value *function, } } - /* Store return address. */ + /* Store return PSWA. In 31-bit mode, keep addressing mode bit. */ + if (word_size == 4) + { + ULONGEST pswa; + regcache_cooked_read_unsigned (regcache, S390_PSWA_REGNUM, &pswa); + bp_addr = (bp_addr & 0x7fffffff) | (pswa & 0x80000000); + } regcache_cooked_write_unsigned (regcache, S390_RETADDR_REGNUM, bp_addr); - + /* Store updated stack pointer. */ regcache_cooked_write_unsigned (regcache, S390_SP_REGNUM, sp);