From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10683 invoked by alias); 23 May 2005 15:45:53 -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 10653 invoked by uid 22791); 23 May 2005 15:45:48 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 23 May 2005 15:45:48 +0000 Received: from drow by nevyn.them.org with local (Exim 4.50) id 1DaF7i-0000t8-OW; Mon, 23 May 2005 11:45:46 -0400 Date: Mon, 23 May 2005 15:45: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: <20050523154546.GA3028@nevyn.them.org> Mail-Followup-To: Christophe LYON , gdb@sourceware.org References: <4291F882.BC2F3699@st.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4291F882.BC2F3699@st.com> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-05/txt/msg00284.txt.bz2 On Mon, May 23, 2005 at 05:36:34PM +0200, Christophe LYON wrote: > The generated code for the beginning of the > function looks like this: > testcall2: > *bundle start* > adjust SP > save return address > call testcall > *bundle stop* > When the breakpoint on the return address fires, > GDB compares the frame address in order to > handle the case of a recursive function call. > > In my case, as SP has been modified during > the 'next' command, GDB thinks it has entered > a recursive function and decides to continue.... > until the end of the program. > > > 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. -- Daniel Jacobowitz CodeSourcery, LLC