From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18324 invoked by alias); 4 Dec 2001 15:34:40 -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 18287 invoked from network); 4 Dec 2001 15:34:34 -0000 Received: from unknown (HELO cerbere.u-strasbg.fr) (130.79.112.7) by sources.redhat.com with SMTP; 4 Dec 2001 15:34:34 -0000 Received: from laocoon (laocoon.u-strasbg.fr [130.79.112.72]) by cerbere.u-strasbg.fr (8.9.3/8.8.7) with ESMTP id QAA12039 for ; Tue, 4 Dec 2001 16:34:33 +0100 Message-Id: <4.2.0.58.20011204163254.00aca908@ics.u-strasbg.fr> X-Sender: muller@ics.u-strasbg.fr X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58 Date: Tue, 04 Dec 2001 07:34:00 -0000 To: gdb-patches@sources.redhat.com From: Pierre Muller Subject: Re: [RFC] Try to enhanced backtrace on i386 machines. In-Reply-To: <20011203203510.GB10437@redhat.com> References: <4.2.0.58.20011203112721.01921430@ics.u-strasbg.fr> <4.2.0.58.20011203112721.01921430@ics.u-strasbg.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-SW-Source: 2001-12/txt/msg00094.txt.bz2 At 21:35 03/12/2001 , Christopher Faylor a écrit: >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. This patch does nothing yet in that direction :( >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. Sorry, but I don't really see what you mean here... I looked at i386-dis.c code but its not clear to me how we could use this... Pierre Muller Institut Charles Sadron 6,rue Boussingault F 67083 STRASBOURG CEDEX (France) mailto:muller@ics.u-strasbg.fr Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99