aboutsummaryrefslogtreecommitdiff
path: root/gdb/s390-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/s390-tdep.c')
-rw-r--r--gdb/s390-tdep.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index c524657..7b4972b 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -1225,20 +1225,23 @@ s390_pop_frame_regular (struct frame_info *frame)
write_register (S390_PC_REGNUM, FRAME_SAVED_PC (frame));
/* Restore any saved registers. */
- for (regnum = 0; regnum < NUM_REGS; regnum++)
- if (frame->saved_regs[regnum] != 0)
- {
- ULONGEST value;
-
- value = read_memory_unsigned_integer (frame->saved_regs[regnum],
- REGISTER_RAW_SIZE (regnum));
- write_register (regnum, value);
- }
+ if (frame->saved_regs)
+ {
+ for (regnum = 0; regnum < NUM_REGS; regnum++)
+ if (frame->saved_regs[regnum] != 0)
+ {
+ ULONGEST value;
+
+ value = read_memory_unsigned_integer (frame->saved_regs[regnum],
+ REGISTER_RAW_SIZE (regnum));
+ write_register (regnum, value);
+ }
- /* Actually cut back the stack. Remember that the SP's element of
- saved_regs is the old SP itself, not the address at which it is
- saved. */
- write_register (S390_SP_REGNUM, frame->saved_regs[S390_SP_REGNUM]);
+ /* Actually cut back the stack. Remember that the SP's element of
+ saved_regs is the old SP itself, not the address at which it is
+ saved. */
+ write_register (S390_SP_REGNUM, frame->saved_regs[S390_SP_REGNUM]);
+ }
/* Throw away any cached frame information. */
flush_cached_frames ();