From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26897 invoked by alias); 13 Sep 2002 20:11:01 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 26881 invoked from network); 13 Sep 2002 20:11:00 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 13 Sep 2002 20:11:00 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g8DJsHw11957 for ; Fri, 13 Sep 2002 15:54:17 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g8DKAqd23988; Fri, 13 Sep 2002 16:10:53 -0400 Received: from romulus.sfbay.redhat.com (IDENT:RJEzf1+lFfUh3528IWRwsmtrDRMyv7EP@romulus.sfbay.redhat.com [172.16.27.251]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id g8DKApC13972; Fri, 13 Sep 2002 13:10:51 -0700 Received: (from kev@localhost) by romulus.sfbay.redhat.com (8.11.6/8.11.6) id g8DKAnw19443; Fri, 13 Sep 2002 13:10:49 -0700 Date: Fri, 13 Sep 2002 13:11:00 -0000 From: Kevin Buettner Message-Id: <1020913201049.ZM19442@localhost.localdomain> In-Reply-To: Johan Walles "create_new_frame() on Linux/IA64" (Sep 13, 5:17pm) References: <3D820172.3070707@appeal.se> To: Johan Walles , gdb Subject: Re: create_new_frame() on Linux/IA64 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-09/txt/msg00162.txt.bz2 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