From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31678 invoked by alias); 28 Nov 2004 17:53: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 31619 invoked from network); 28 Nov 2004 17:52:57 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 28 Nov 2004 17:52:57 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1CYTE0-0006Wz-P7; Sun, 28 Nov 2004 12:52:40 -0500 Date: Sun, 28 Nov 2004 17:53:00 -0000 From: Daniel Jacobowitz To: Joel Brobecker Cc: gdb-patches@sources.redhat.com Subject: Re: [RFC/RFA/sparc] problem with prologue analyzer Message-ID: <20041128175240.GE24639@nevyn.them.org> Mail-Followup-To: Joel Brobecker , gdb-patches@sources.redhat.com References: <20041126223410.GZ908@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041126223410.GZ908@adacore.com> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-11/txt/msg00492.txt.bz2 On Fri, Nov 26, 2004 at 02:34:10PM -0800, Joel Brobecker wrote: > Hello, > > Using break.exp, we have a function marker2 defined in break1.c as > follow (sic): > > int marker2 (a) int a; { return (1); } /* set breakpoint 9 here */ > > Because the entire declaration is on one single line, the function > that skips prologue can not use the line number information from > debugging data (sparc32_skip_prologue()): > > /* This is the preferred method, find the end of the prologue by > using the debugging information. */ > if (find_pc_partial_function (start_pc, NULL, &func_start, &func_end)) > { > sal = find_pc_line (func_start, 0); > > if (sal.end < func_end > && start_pc <= sal.end) > return sal.end; > } "Normally", when using GCC, there are two line number entries in the debug information in this case. Whether they've got the same line number or not doesn't make a difference; the presence of two lets GDB find the end of the prologue. What does the debug information look like? > 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. > > Assuming this was an accident, I put the code back more or less blindly. > I did exclude the part of the code that recognizes an instruction adding > and offset to sp, as I haven't seen evidences that this is needed, and > removed one if block that could only be executed in that case. But I'd > be happy to put the entire code back, if it is felt more appropriate. The rest of this I'm not qualified to review; Mark rewrote it, so maybe he can. -- Daniel Jacobowitz