Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* create_new_frame() on Linux/IA64
@ 2002-09-13  8:16 Johan Walles
  2002-09-13 13:11 ` Kevin Buettner
  0 siblings, 1 reply; 2+ messages in thread
From: Johan Walles @ 2002-09-13  8:16 UTC (permalink / raw)
  To: gdb

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 problem I'm trying to solve is that we do our own code generation, 
and gdb can't parse our stack frames.  I'm trying to patch 
get_prev_frame() to call on us for help with stack frames it doesn't 
recognize.

   Regards //Johan



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

* Re: create_new_frame() on Linux/IA64
  2002-09-13  8:16 create_new_frame() on Linux/IA64 Johan Walles
@ 2002-09-13 13:11 ` Kevin Buettner
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Buettner @ 2002-09-13 13:11 UTC (permalink / raw)
  To: Johan Walles, gdb

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


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

end of thread, other threads:[~2002-09-13 20:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-13  8:16 create_new_frame() on Linux/IA64 Johan Walles
2002-09-13 13:11 ` Kevin Buettner

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