diff options
author | Jim Blandy <jimb@codesourcery.com> | 2001-11-28 03:40:50 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2001-11-28 03:40:50 +0000 |
commit | 5c3cf190c0ee98cfade016748df228c6dc559fab (patch) | |
tree | 3c0602f3de420f91a18ab91a5cc1ebf40863abaf /gdb | |
parent | 31c4d430c4ae6068c12ed5bb965fe7a1641b9bba (diff) | |
download | gdb-5c3cf190c0ee98cfade016748df228c6dc559fab.zip gdb-5c3cf190c0ee98cfade016748df228c6dc559fab.tar.gz gdb-5c3cf190c0ee98cfade016748df228c6dc559fab.tar.bz2 |
* s390-tdep.c: Get frame chains and saved pc values properly from
dummy frames.
(s390_frame_saved_pc_nofix): if `*fi' is a dummy frame, get the
saved PC from the dummy frame's registers.
(s390_frame_chain): Same for the saved SP.
(s390_gdbarch_init): Register `generic_save_dummy_frame_tos' as
the `SAVE_DUMMY_FRAME_TOS' method, so the dummy frame's `top' gets
set correctly.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 9 | ||||
-rw-r--r-- | gdb/s390-tdep.c | 8 |
2 files changed, 17 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 07b13ee..6877f4b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,14 @@ 2001-11-27 Jim Blandy <jimb@redhat.com> + * s390-tdep.c: Get frame chains and saved pc values properly from + dummy frames. + (s390_frame_saved_pc_nofix): if `*fi' is a dummy frame, get the + saved PC from the dummy frame's registers. + (s390_frame_chain): Same for the saved SP. + (s390_gdbarch_init): Register `generic_save_dummy_frame_tos' as + the `SAVE_DUMMY_FRAME_TOS' method, so the dummy frame's `top' gets + set correctly. + * s390-tdep.c (s390_frame_chain): Remember that the SP's element of the frame's saved_regs array is special. diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index afefc7f..61f4ae8 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -884,6 +884,10 @@ s390_frame_saved_pc_nofix (struct frame_info *fi) { if (fi->extra_info && fi->extra_info->saved_pc_valid) return fi->extra_info->saved_pc; + + if (generic_find_dummy_frame (fi->pc, fi->frame)) + return generic_read_register_dummy (fi->pc, fi->frame, S390_PC_REGNUM); + s390_frame_init_saved_regs (fi); if (fi->extra_info) { @@ -937,6 +941,9 @@ s390_frame_chain (struct frame_info *thisframe) if (thisframe->prev && thisframe->prev->frame) prev_fp = thisframe->prev->frame; + else if (generic_find_dummy_frame (thisframe->pc, thisframe->frame)) + return generic_read_register_dummy (thisframe->pc, thisframe->frame, + S390_SP_REGNUM); else { int sigreturn = 0; @@ -1743,6 +1750,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_pc_in_call_dummy (gdbarch, pc_in_call_dummy_at_entry_point); set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame); set_gdbarch_push_arguments (gdbarch, s390_push_arguments); + set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos); set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1); set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0); set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0); |