From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26982 invoked by alias); 3 Dec 2001 20:35:06 -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 26959 invoked from network); 3 Dec 2001 20:35:03 -0000 Received: from unknown (HELO lacrosse.corp.redhat.com) (207.175.42.154) by sources.redhat.com with SMTP; 3 Dec 2001 20:35:03 -0000 Received: from trixie.bosbc.com (cgf.cipe.redhat.com [10.0.1.172]) by lacrosse.corp.redhat.com (8.11.6/8.9.3) with ESMTP id fB3KZ2h14435 for ; Mon, 3 Dec 2001 15:35:02 -0500 Received: (from cgf@localhost) by trixie.bosbc.com (8.11.6/8.8.7) id fB3KZAM10575 for gdb-patches@sources.redhat.com; Mon, 3 Dec 2001 15:35:10 -0500 Date: Mon, 03 Dec 2001 12:35:00 -0000 From: Christopher Faylor To: gdb-patches@sources.redhat.com Subject: Re: [RFC] Try to enhanced backtrace on i386 machines. Message-ID: <20011203203510.GB10437@redhat.com> Mail-Followup-To: gdb-patches@sources.redhat.com References: <4.2.0.58.20011203112721.01921430@ics.u-strasbg.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4.2.0.58.20011203112721.01921430@ics.u-strasbg.fr> User-Agent: Mutt/1.3.23.1i X-SW-Source: 2001-12/txt/msg00057.txt.bz2 On Mon, Dec 03, 2001 at 11:28:07AM +0100, Pierre Muller wrote: >GCC for i386 does several optimization to allow correct pairing of >instructions. > >This leads in particular to mix loading of constants into registers >with usual prologue instructions. > >The major effect is that the backtrace shows some 'pseudo' trace >levels, which are due to a failure to get the correct prologue. One of >the nastiest effect of this is that if you use 'return' on that >function, it sets a temporary breakpoint on a wrong location and you >program continues without stopping when frame is left. > >I started to implement some code that tries to deal with that issue. >Its far from perfect, but it gives already some result (when debugging >GDB with itself compiled with -O2, it reduces the number of those false >frame levels). > >This code might probably be used at several other position. > >All comments and suggestions welcome. It would be nice to improve backtraces on x86. What would really be wonderful is to do this with frame pointerless functions. Regarding your implementation, I wonder if it would be better to define the opcodes as constants in the opcodes directory and use the defines in both the opcodes and gdb directories? I realize that it is more work but it seems like we've already got most of the information in this directory. cgf