Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] Arm/Thumb tweak for generic_dummy_frames
@ 2002-05-21 18:45 Michael Snyder
  2002-05-22  2:52 ` Richard Earnshaw
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Snyder @ 2002-05-21 18:45 UTC (permalink / raw)
  To: gdb-patches; +Cc: rearnsha


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.


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

end of thread, other threads:[~2002-05-23 20:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-21 18:45 [RFA] Arm/Thumb tweak for generic_dummy_frames Michael Snyder
2002-05-22  2:52 ` Richard Earnshaw
2002-05-22 22:01   ` Andrew Cagney
2002-05-23 14:21   ` Michael Snyder

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