From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18180 invoked by alias); 24 May 2005 13:03:10 -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 18091 invoked by uid 22791); 24 May 2005 13:02:58 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 24 May 2005 13:02:58 +0000 Received: from drow by nevyn.them.org with local (Exim 4.50) id 1DaZ3f-0000OB-VE; Tue, 24 May 2005 09:02:56 -0400 Date: Tue, 24 May 2005 13:03:00 -0000 From: Daniel Jacobowitz To: Christophe LYON Cc: gdb@sourceware.org Subject: Re: Handling the 'next' command on a variable-length bundles target Message-ID: <20050524130255.GA1460@nevyn.them.org> Mail-Followup-To: Christophe LYON , gdb@sourceware.org References: <4291F882.BC2F3699@st.com> <20050523154546.GA3028@nevyn.them.org> <4292E29B.A1FE162E@st.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4292E29B.A1FE162E@st.com> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-05/txt/msg00300.txt.bz2 On Tue, May 24, 2005 at 10:15:23AM +0200, Christophe LYON wrote: > > > > I would like to have your inputs on possible > > > clean ways of handling this. > > > I am considering modyfing the way 'next' and > > > 'stepi' memorize the frame in this specific > > > case, but this is far from being generic. > > > Maybe it is too specific to think of a generic > > > fix, but maybe some of you have similar > > > features? > > > > This is not a missing feature in GDB, it's a bug in your target. The > > ID for a frame should be constant throughout the function. You need to > > use either code analysis or DWARF-2 style unwind information to have a > > constant ID for the frame; in this case, probably the unadjusted SP. > > > > Well, I am not (yet) very familiar with debugging optimized code. > > What do you mean by "code analysis" ? > > Currently, the recorded frame contains the unadjusted SP, but > upon return from the call SP has been modified and the current > frame is thus different from the recorded one. As you say > the frame ID should be the unadjusted SP, I don't understand > exactly how: you mean that after the call the frame ID should > also contain the unadjusted SP? Yes. You might want to look at how DWARF-2 unwind information works; the "stack" part of the GDB frame ID should usually be equivalent to the DWARF-2 notion of a "call frame address". -- Daniel Jacobowitz CodeSourcery, LLC