This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: create_new_frame() on Linux/IA64
- From: Kevin Buettner <kevinb at redhat dot com>
- To: Johan Walles <johan dot walles at appeal dot se>, gdb <gdb at sources dot redhat dot com>
- Date: Fri, 13 Sep 2002 13:10:49 -0700
- Subject: Re: create_new_frame() on Linux/IA64
- References: <3D820172.3070707@appeal.se>
On Sep 13, 5:17pm, Johan Walles wrote:
> I'm trying to insert artificial stack frames in a backtrace using
> create_new_frame(addr, pc) on Linux/IA64. The pc parameter is quite
> obvious, but what should I use for addr?
The frame pointer. You might find the following bit from ia64-tdep.c
to be useful:
/* We won't necessarily have a frame pointer and even if we do,
it winds up being extraordinarly messy when attempting to find
the frame chain. So for the purposes of creating frames (which
is all read_fp() is used for), simply use the stack pointer value
instead. */
set_gdbarch_read_fp (gdbarch, generic_target_read_sp);
However, it turns out that this isn't really sufficient since it's
possible to leave the memory stack pointer fixed, but change the
bsp value in the register stack. There have been some proposals
(and patches) for dealing with this. See:
http://sources.redhat.com/ml/gdb-patches/2002-05/msg00377.html
and the associated thread.
Kevin