Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@cygnus.com>
To: gdb-patches@sources.redhat.com
Cc: rearnsha@arm.com
Subject: [RFA] Arm/Thumb tweak for generic_dummy_frames
Date: Tue, 21 May 2002 18:45:00 -0000	[thread overview]
Message-ID: <200205220126.g4M1Qsg03294@reddwarf.sfbay.redhat.com> (raw)


Richard, 

This is a corner case that Andrew missed when he did the
transition to generic dummy frames.

2002-05-21  Michael Snyder  <msnyder@redhat.com>

	* arm-tdep.c (arm_frame_chain): Recognize dummy-frame as a
	special case that does not indicate a transition from arm
	to thumb or vice versa.

Index: arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.62
diff -p -r1.62 arm-tdep.c
*** arm-tdep.c	21 May 2002 15:36:02 -0000	1.62
--- arm-tdep.c	22 May 2002 01:38:08 -0000
*************** arm_frame_chain (struct frame_info *fi)
*** 1039,1062 ****
        struct frame_info caller_fi;
        struct cleanup *old_chain;
  
!       /* Create a temporary frame suitable for scanning the caller's
! 	 prologue.  (Ugh.)  */
!       memset (&caller_fi, 0, sizeof (caller_fi));
!       caller_fi.extra_info = (struct frame_extra_info *)
! 	xcalloc (1, sizeof (struct frame_extra_info));
!       old_chain = make_cleanup (xfree, caller_fi.extra_info);
!       caller_fi.saved_regs = (CORE_ADDR *)
! 	xcalloc (1, SIZEOF_FRAME_SAVED_REGS);
!       make_cleanup (xfree, caller_fi.saved_regs);
  
!       /* Now, scan the prologue and obtain the frame register.  */
!       caller_fi.pc = caller_pc;
!       arm_scan_prologue (&caller_fi);
!       framereg = caller_fi.extra_info->framereg;
  
!       /* Deallocate the storage associated with the temporary frame
! 	 created above.  */
!       do_cleanups (old_chain);
      }
  
    /* If the caller used a frame register, return its value.
--- 1039,1066 ----
        struct frame_info caller_fi;
        struct cleanup *old_chain;
  
!       if (!(USE_GENERIC_DUMMY_FRAMES
! 	    && PC_IN_CALL_DUMMY (caller_pc, 0, 0)))
! 	{
! 	  /* Create a temporary frame suitable for scanning the caller's
! 	     prologue.  (Ugh.)  */
! 	  memset (&caller_fi, 0, sizeof (caller_fi));
! 	  caller_fi.extra_info = (struct frame_extra_info *)
! 	    xcalloc (1, sizeof (struct frame_extra_info));
! 	  old_chain = make_cleanup (xfree, caller_fi.extra_info);
! 	  caller_fi.saved_regs = (CORE_ADDR *)
! 	    xcalloc (1, SIZEOF_FRAME_SAVED_REGS);
! 	  make_cleanup (xfree, caller_fi.saved_regs);
  
! 	  /* Now, scan the prologue and obtain the frame register.  */
! 	  caller_fi.pc = caller_pc;
! 	  arm_scan_prologue (&caller_fi);
! 	  framereg = caller_fi.extra_info->framereg;
  
! 	  /* Deallocate the storage associated with the temporary frame
! 	     created above.  */
! 	  do_cleanups (old_chain);
! 	}
      }
  
    /* If the caller used a frame register, return its value.


             reply	other threads:[~2002-05-22  1:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-21 18:45 Michael Snyder [this message]
2002-05-22  2:52 ` Richard Earnshaw
2002-05-22 22:01   ` Andrew Cagney
2002-05-23 14:21   ` Michael Snyder

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=200205220126.g4M1Qsg03294@reddwarf.sfbay.redhat.com \
    --to=msnyder@cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=rearnsha@arm.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