summaryrefslogtreecommitdiff
path: root/gdb/s390-tdep.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2011-12-19 21:44:57 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2011-12-19 21:44:57 +0000
commit1664c9c9294c7a2d80b7e77eebb28f678b4cbc59 (patch)
treeb285d156fc1bd2b6c2417c484d4bfce092a0ffb3 /gdb/s390-tdep.c
parent0c6af30d49d27e5a52be80cb0022b0546cfc7199 (diff)
downloadgdb-1664c9c9294c7a2d80b7e77eebb28f678b4cbc59.tar.gz
* s390-tdep.c (s390_push_dummy_call): Set addressing mode bit
in return PSWA.
Diffstat (limited to 'gdb/s390-tdep.c')
-rw-r--r--gdb/s390-tdep.c10
1 files changed, 8 insertions, 2 deletions
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);