forked from Imagelibrary/binutils-gdb
* s390-tdep.c (s390_pop_frame_regular): Make sure the saved_regs
array is actually set before we try to use it.
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
2001-12-19 Jim Blandy <jimb@redhat.com>
|
2001-12-19 Jim Blandy <jimb@redhat.com>
|
||||||
|
|
||||||
|
* s390-tdep.c (s390_pop_frame_regular): Make sure the saved_regs
|
||||||
|
array is actually set before we try to use it.
|
||||||
|
|
||||||
* s390-tdep.c (s390_frame_saved_pc_nofix): If we get the saved PC
|
* s390-tdep.c (s390_frame_saved_pc_nofix): If we get the saved PC
|
||||||
out of the return address register, cache that in the frame's
|
out of the return address register, cache that in the frame's
|
||||||
extra info, just as if we'd gotten it from the saved regs array;
|
extra info, just as if we'd gotten it from the saved regs array;
|
||||||
|
|||||||
@@ -1225,20 +1225,23 @@ s390_pop_frame_regular (struct frame_info *frame)
|
|||||||
write_register (S390_PC_REGNUM, FRAME_SAVED_PC (frame));
|
write_register (S390_PC_REGNUM, FRAME_SAVED_PC (frame));
|
||||||
|
|
||||||
/* Restore any saved registers. */
|
/* Restore any saved registers. */
|
||||||
for (regnum = 0; regnum < NUM_REGS; regnum++)
|
if (frame->saved_regs)
|
||||||
if (frame->saved_regs[regnum] != 0)
|
{
|
||||||
{
|
for (regnum = 0; regnum < NUM_REGS; regnum++)
|
||||||
ULONGEST value;
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
value = read_memory_unsigned_integer (frame->saved_regs[regnum],
|
/* Actually cut back the stack. Remember that the SP's element of
|
||||||
REGISTER_RAW_SIZE (regnum));
|
saved_regs is the old SP itself, not the address at which it is
|
||||||
write_register (regnum, value);
|
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. */
|
/* Throw away any cached frame information. */
|
||||||
flush_cached_frames ();
|
flush_cached_frames ();
|
||||||
|
|||||||
Reference in New Issue
Block a user