Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@zwingli.cygnus.com>
To: gdb-patches@sources.redhat.com
Subject: PATCH: S/390: backtrace properly through call dummy frames
Date: Thu, 15 Nov 2001 12:32:00 -0000	[thread overview]
Message-ID: <20011128034333.D61B45E9D8@zwingli.cygnus.com> (raw)


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);


WARNING: multiple messages have this Message-ID
From: Jim Blandy <jimb@zwingli.cygnus.com>
To: gdb-patches@sources.redhat.com
Subject: PATCH: S/390: backtrace properly through call dummy frames
Date: Tue, 27 Nov 2001 19:42:00 -0000	[thread overview]
Message-ID: <20011128034333.D61B45E9D8@zwingli.cygnus.com> (raw)
Message-ID: <20011127194200.J68SNlFTW9Heh3moIr6eSL5bPRKvAuUgrwsClTn02jE@z> (raw)

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);


             reply	other threads:[~2001-11-28  3:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-15 12:32 Jim Blandy [this message]
2001-11-27 19:42 ` Jim Blandy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011128034333.D61B45E9D8@zwingli.cygnus.com \
    --to=jimb@zwingli.cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox