From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11971 invoked by alias); 28 Nov 2004 19:02:00 -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 11938 invoked from network); 28 Nov 2004 19:01:54 -0000 Received: from unknown (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org with SMTP; 28 Nov 2004 19:01:54 -0000 Received: from elgar.sibelius.xs4all.nl (elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.0/8.13.0) with ESMTP id iASJ1f21024287; Sun, 28 Nov 2004 20:01:41 +0100 (CET) Received: from elgar.sibelius.xs4all.nl (localhost [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.12.6p3/8.12.6) with ESMTP id iASJ1eD0001529; Sun, 28 Nov 2004 20:01:40 +0100 (CET) (envelope-from kettenis@elgar.sibelius.xs4all.nl) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.12.6p3/8.12.6/Submit) id iASJ1ZUw001525; Sun, 28 Nov 2004 20:01:35 +0100 (CET) Date: Sun, 28 Nov 2004 19:02:00 -0000 Message-Id: <200411281901.iASJ1ZUw001525@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: brobecker@adacore.com CC: gdb-patches@sources.redhat.com In-reply-to: <20041126223410.GZ908@adacore.com> (message from Joel Brobecker on Fri, 26 Nov 2004 14:34:10 -0800) Subject: Re: [RFC/RFA/sparc] problem with prologue analyzer References: <20041126223410.GZ908@adacore.com> X-SW-Source: 2004-11/txt/msg00496.txt.bz2 Date: Fri, 26 Nov 2004 14:34:10 -0800 From: Joel Brobecker Breakpoint 2, 0x00010aac in marker2 (a=720) at break1.c:41 41 int marker2 (a) int a; { return (1); } /* set breakpoint 9 here */ (gdb) FAIL: gdb.base/break.exp: run until quoted breakpoint Hmm, the test PASSes for me on sparc-sun-solaris2.9 with GCC 3.2.3, which generates essentially the same prologue code. This test used to pass with 5.3. Doing a bit of archeology, I discovered that the code analyzing problogues has been heavily rewritten at the end of 2003, and that the piece of code that handles these store insns got lost during one large code rewrite. I left that bit of code out quite deliberately. The idea was to implement the minimum of prologue analysis code necessary to get the frame unwinder working, and rely on debugging information for skipping prologues (which the old code didn't do). It appears that your compiler isn't generating the proper debug info, or GDB isn't handling that debug info properly. Now if indeed GCC is generating bad debug info, and we accept that, it makes sense to improve the prologue analyzer where it makes sense. We must realize that we probably will never get it completely right. We must also realize that there's a rather fundamental question here: Should we be conservative with prologue skipping, risking the "wrong arguments" problem you're seeing, or should we skip any code that is likely to belong to the prologue, risking stopping after real code has been executed. Ultimately the "wrong arguments" case is a problem with incomplete debug info, which might go away when GDB implements proper "multiple location" support. So I'm in favour of being a bit conservative here. That said, I'm not against improving the prologue analyzer here. However, as the comment that goes with the code that your patch buts back in says, there are some problems with that code. I think code needs some polishing, splitting out the 32-bit and 64-bit cases. I'll try to come up with a somewhat better patch. Mark