From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21142 invoked by alias); 11 Jul 2005 15:33:00 -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 21110 invoked by uid 22791); 11 Jul 2005 15:32:55 -0000 Received: from lon-del-01.spheriq.net (HELO lon-del-01.spheriq.net) (195.46.50.97) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 11 Jul 2005 15:32:55 +0000 Received: from lon-out-01.spheriq.net ([195.46.50.129]) by lon-del-01.spheriq.net with ESMTP id j6BFWTsa010402 for ; Mon, 11 Jul 2005 15:32:29 GMT Received: from lon-cus-01.spheriq.net (lon-cus-01.spheriq.net [195.46.50.37]) by lon-out-01.spheriq.net with ESMTP id j6BFWShG018001 for ; Mon, 11 Jul 2005 15:32:29 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by lon-cus-01.spheriq.net with ESMTP id j6BFWRbX027697 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Mon, 11 Jul 2005 15:32:28 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 6C1C7DA43; Mon, 11 Jul 2005 15:32:18 +0000 (GMT) Received: by zeta.dmz-eu.st.com (STMicroelectronics, from userid 60012) id E210D47559; Mon, 11 Jul 2005 15:34:17 +0000 (GMT) Received: from zeta.dmz-eu.st.com (localhost [127.0.0.1]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 7C49D75969; Mon, 11 Jul 2005 15:34:17 +0000 (UTC) Received: from mail2.gnb.st.com (mail2.gnb.st.com [164.129.119.59]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 0256647556; Mon, 11 Jul 2005 15:34:16 +0000 (GMT) Received: from st.com (pcx0003.gnb.st.com [164.129.118.67]) by mail2.gnb.st.com (MOS 3.4.4-GR) with ESMTP id BNP02615 (AUTH lyon); Mon, 11 Jul 2005 17:32:15 +0200 (CEST) Message-ID: <42D290FF.F665B4A1@st.com> Date: Mon, 11 Jul 2005 15:33:00 -0000 From: Christophe LYON MIME-Version: 1.0 To: Daniel Jacobowitz Cc: gdb@sources.redhat.com Subject: Re: dwarf2 frame unwinder assumptions on SP References: <42D285AB.9E36C062@st.com> <20050711145053.GA29229@nevyn.them.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-O-General-Status: No X-O-Spam1-Status: Not Scanned X-O-Spam2-Status: Not Scanned X-O-URL-Status: Not Scanned X-O-Virus1-Status: No X-O-Virus2-Status: Not Scanned X-O-Virus3-Status: No X-O-Virus4-Status: No X-O-Virus5-Status: Not Scanned X-O-Image-Status: Not Scanned X-O-Attach-Status: Not Scanned X-SpheriQ-Ver: 2.2.2 X-SW-Source: 2005-07/txt/msg00115.txt.bz2 > > Currently, in my x-tdep.c I have: > > set_gdbarch_unwind_pc(gdbarch, x_unwind_pc); > > frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer); > > It sounds like you need to set a "frame base" sniffer also, other than > the dwarf one. The dwarf2 frame unwinder does not set anything related > to the "frame base" used by symbolic debug information; it only unwinds > the stack pointer as best it can. > > Does "print $sp" work correctly when unwinding? > At frame #0, it's OK, at frame #1 it is not (it displays CFA). I have tried to add frame_base_set_default (gdbarch, &x_frame_base); where static CORE_ADDR x_frame_base_address (struct frame_info *next_frame, void **this_cache) { struct lx_frame_cache *cache = x_frame_cache (next_frame, this_cache); fprintf(stderr, "In %s\n", __FUNCTION__); return cache->base; } static const struct frame_base x_frame_base = { &x_frame_unwind, x_frame_base_address, x_frame_base_address, x_frame_base_address }; but in my test case x_frame_base_address() is not called. (in funcargs, I set a bkp in call6b, run, then backtrace) Isn't this what you mean by "frame base sniffer" ? Thanks, Christophe.