From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25212 invoked by alias); 12 Feb 2005 03:13:57 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 25168 invoked from network); 12 Feb 2005 03:13:51 -0000 Received: from unknown (HELO copland.sibelius.xs4all.nl) (24.75.92.210) by sourceware.org with SMTP; 12 Feb 2005 03:13:51 -0000 Received: from copland.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by copland.sibelius.xs4all.nl (8.13.3/8.13.3) with ESMTP id j1C3CTCu021465; Sat, 12 Feb 2005 04:12:30 +0100 (CET) Received: (from kettenis@localhost) by copland.sibelius.xs4all.nl (8.13.3/8.13.3/Submit) id j1C3CSid022971; Fri, 11 Feb 2005 22:12:28 -0500 (EST) Date: Sat, 12 Feb 2005 13:04:00 -0000 Message-Id: <200502120312.j1C3CSid022971@copland.sibelius.xs4all.nl> From: Mark Kettenis To: nathan@codesourcery.com CC: gdb-patches@sources.redhat.com, paul@codesourcery.com In-reply-to: <420B2F90.4060403@codesourcery.com> (message from Nathan Sidwell on Thu, 10 Feb 2005 09:55:28 +0000) Subject: Re: [patch] Dwarf2 virtual frame pointer References: <420B2F90.4060403@codesourcery.com> X-SW-Source: 2005-02/txt/msg00116.txt.bz2 From: Nathan Sidwell Date: Thu, 10 Feb 2005 09:55:28 +0000 Hi, The default frame pointer accessor only copes with a fixed frame pointer. I've added a dwarf2_virtual_frame_pointer function, which can be enabled with set_gdbarch_virtual_frame_pointer (gdbarch, dwarf2_virtual_frame_pointer) It executes the cfa for the supplied PC and determines which register is the frame pointer at that point. I've not hooked it into any existing architectures, but verified its functionality on an unrealeased architecture where $sp or $fp might be the relevent register. I've tested on i686-pc-linux-gnu also, ok? Almost certainly no. Replacing `struct frame *next_frame' with `CORE_ADDR pc' is moving backward instead of forward. Any functions that starts with legacy_ should not be used in generic code like the code in dwarf2-frame.c. Can you explains what you're trying to accomplish? If you're trying to use the DWARF CFI for anything else than unwinding the stack, like finding out whether the location of local variables is relative to $sp or $fp then rethink your strategy. This is not what the DWARF CFI is for. Mark