Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* PATCH: S/390: backtrace properly through call dummy frames
@ 2001-11-15 12:32 Jim Blandy
  2001-11-27 19:42 ` Jim Blandy
  0 siblings, 1 reply; 2+ messages in thread
From: Jim Blandy @ 2001-11-15 12:32 UTC (permalink / raw)
  To: gdb-patches


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.

Index: gdb/s390-tdep.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/s390-tdep.c,v
retrieving revision 2.20
diff -c -r2.20 s390-tdep.c
*** gdb/s390-tdep.c	2001/11/28 03:36:41	2.20
--- gdb/s390-tdep.c	2001/11/28 03:38:18
***************
*** 884,889 ****
--- 884,893 ----
  {
    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,942 ****
--- 941,949 ----
  
    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,1748 ****
--- 1750,1756 ----
    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);


^ permalink raw reply	[flat|nested] 2+ messages in thread

* PATCH: S/390: backtrace properly through call dummy frames
  2001-11-15 12:32 PATCH: S/390: backtrace properly through call dummy frames Jim Blandy
@ 2001-11-27 19:42 ` Jim Blandy
  0 siblings, 0 replies; 2+ messages in thread
From: Jim Blandy @ 2001-11-27 19:42 UTC (permalink / raw)
  To: gdb-patches

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.

Index: gdb/s390-tdep.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/s390-tdep.c,v
retrieving revision 2.20
diff -c -r2.20 s390-tdep.c
*** gdb/s390-tdep.c	2001/11/28 03:36:41	2.20
--- gdb/s390-tdep.c	2001/11/28 03:38:18
***************
*** 884,889 ****
--- 884,893 ----
  {
    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,942 ****
--- 941,949 ----
  
    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,1748 ****
--- 1750,1756 ----
    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);


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-11-28  3:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-15 12:32 PATCH: S/390: backtrace properly through call dummy frames Jim Blandy
2001-11-27 19:42 ` Jim Blandy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox