Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Feb 2011 09:13:12 +1100 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Bruce Evans <brde@optusnet.com.au>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric <dim@freebsd.org>
Subject:   Re: svn commit: r218984 - head/lib/librt
Message-ID:  <20110224090558.E1571@besplex.bde.org>
In-Reply-To: <20110224084812.F1571@besplex.bde.org>
References:  <201102232117.p1NLHcuE011679@svn.freebsd.org> <20110224084812.F1571@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
PS:

On Thu, 24 Feb 2011, Bruce Evans wrote:

> This may be related to the bug that -g is broken if the compilation is
> via an intermediate asm file:
>
> 	"cc -g -o foo foo.c"  != "cc -g -S foo.c; cc -g -o foo foo.s"
>
> The former works, but the latter gives:
>
> % Script started on Wed Feb 23 21:47:19 2011
> % % pts/0:bde@ref9-i386:~/r> gdb foo
> % GNU gdb 6.1.1 [FreeBSD]
> % Copyright 2004 Free Software Foundation, Inc.
> % GDB is free software, covered by the GNU General Public License, and you 
> are
> % welcome to change it and/or distribute copies of it under certain 
> conditions.
> % Type "show copying" to see the conditions.
> % There is absolutely no warranty for GDB.  Type "show warranty" for details.
> % This GDB was configured as "i386-marcel-freebsd"...Dwarf Error: Could not 
> find abbrev number 47 [in module /dumpster/home/bde/r/foo]
> % % (gdb) q
> % pts/0:bde@ref9-i386:~/r> exit
> % % Script done on Wed Feb 23 21:47:24 2011

> I haven't found an incantantion that works.  The asm file contains lots
> of debugging info, but the info is apparently incomplete or invalid.
> The object file produced from the asm file differs from the one produced
> directly from the C file.

Now found it easly using gcc -v.  gcc -c -v foo.c produces "... /usr/bin/as 
-o foo.o /var/tmp/whatever.s", but gcc -c -v foo.s produces "... /usr/bin/as 
-gdwarf2 -o foo.o foo.s".  gcc's generation of -gdwarf2 is inconsistent
with itself.  Do we use a nonstandard not-gdwarf2 option for the usual case
but forget to change this for asm files?

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110224090558.E1571>