From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23493 invoked by alias); 12 Jul 2002 17:31:07 -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 23479 invoked from network); 12 Jul 2002 17:31:06 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 12 Jul 2002 17:31:06 -0000 Received: from dsl254-114-096.nyc1.dsl.speakeasy.net ([216.254.114.96] helo=nevyn.them.org) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 17T4Fy-0006qL-00; Fri, 12 Jul 2002 12:31:03 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 17T4Fv-0000Hp-00; Fri, 12 Jul 2002 13:30:59 -0400 Date: Fri, 12 Jul 2002 10:46:00 -0000 From: Daniel Jacobowitz To: Jim Ingham Cc: gdb-patches@sources.redhat.com Subject: Re: [patch] Fix to processing end of function stab in dbxread.c Message-ID: <20020712173056.GA989@nevyn.them.org> Mail-Followup-To: Jim Ingham , gdb-patches@sources.redhat.com References: <20020711184252.GA29207@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-SW-Source: 2002-07/txt/msg00273.txt.bz2 On Thu, Jul 11, 2002 at 02:10:49PM -0700, Jim Ingham wrote: > >I judge from your example that MacOSX has resolved addresses attached > >to N_SLINE stabs, but not in ending N_FUN stabs? GDB assumes that > >function_start_offset applies to both of them equally (and it will be > >zero if we expect both to be resolved). On GNU/Linux both N_SLINE and > >final N_FUN have offsets within the function. I suspect that on some > >Solaris variant N_SLINE and final N_FUN will both have resolved values. > >In that case using last_function_start + valu will put us well outside > >of the actual function, causing mayhem. > > That's right. MacOS X's linker does fix up the SLINE stabs, but it > does what stabs.texi says to do with the end of function stabs. > > It would suprise me if there were a Solaris compile/linker that does > otherwise with the end of FUN stab. After all, it seems like the > Solaris tools go out of their way to avoid having STABS that the linker > has to fix up. Also, the comment in stabs.texi says "Recent versions > of GCC will mark the end of the function with an N_FUN symbol..." > Sounds like the Solaris compilers may not have this end of function FUN > stab at all. > > Would somebody with access to a Solaris box with acc on it compile a > simple program with "-g" and see if it has this stab, and if so what > its value is? > > I bet the code I suggested will work fine. ACC is HP/UX, isn't it? The Sun compiler is Sun Workshop CC. In any case, it appears that Solaris does not mark the end of functions with stabs. I'm satisfied; sorry for the runaround. You might want to repost the patch not-mangled this time; since your mail client persistently wraps things attaching it might be simplest. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer