This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] Arm/Thumb tweak for generic_dummy_frames
- From: Michael Snyder <msnyder at cygnus dot com>
- To: gdb-patches at sources dot redhat dot com
- Cc: rearnsha at arm dot com
- Date: Tue, 21 May 2002 18:26:54 -0700
- Subject: [RFA] Arm/Thumb tweak for generic_dummy_frames
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.