public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/37196]  New: Broken debug information on FreeBSD (dwarf)
@ 2008-08-21 22:28 pip88nl at gmail dot com
  2008-08-21 22:33 ` [Bug c++/37196] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: pip88nl at gmail dot com @ 2008-08-21 22:28 UTC (permalink / raw)
  To: gcc-bugs

Follow the steps on either:

http://xinutec.org/~pippijn/files/txt/46e78059d1e42f9381587ea2ab502f2b.txt
https://gist.github.com/56744b9f0a5b0d69b83e

on FreeBSD. Dwarf debug information is wrong, but this only happens on FreeBSD
and only if the compiling (-S) and assembling (-c) step are split. It happens
for PIC and non-PIC code. It happens for i386 and x86_64.

This bug is blocking, because I rely on this separate assembling step due to an
assembly code analysis and pattern replacement stage in my build. It is
especially blocking, because I can't fix a blocking bug in my own software.


-- 
           Summary: Broken debug information on FreeBSD (dwarf)
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: blocker
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pip88nl at gmail dot com
 GCC build triplet: i386-undermydesk-freebsd
  GCC host triplet: i386-undermydesk-freebsd
GCC target triplet: i386-undermydesk-freebsd


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37196


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/37196] Broken debug information on FreeBSD (dwarf)
  2008-08-21 22:28 [Bug c++/37196] New: Broken debug information on FreeBSD (dwarf) pip88nl at gmail dot com
@ 2008-08-21 22:33 ` pinskia at gcc dot gnu dot org
  2008-08-21 22:58 ` pip88nl at gmail dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-08-21 22:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2008-08-21 22:32 -------
The issue is here:
g++ -g -c test.s -o test.o 

Don't use -g with assembly code that already has debugging info in it.  Also I
think this was just fixed on the trunk of binutils lately where it checks to
make sure that if there is debugging info, don't create new debugging info
based on the assembly file.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37196


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/37196] Broken debug information on FreeBSD (dwarf)
  2008-08-21 22:28 [Bug c++/37196] New: Broken debug information on FreeBSD (dwarf) pip88nl at gmail dot com
  2008-08-21 22:33 ` [Bug c++/37196] " pinskia at gcc dot gnu dot org
@ 2008-08-21 22:58 ` pip88nl at gmail dot com
  2008-08-21 23:04 ` pinskia at gcc dot gnu dot org
  2008-08-21 23:04 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pip88nl at gmail dot com @ 2008-08-21 22:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pip88nl at gmail dot com  2008-08-21 22:56 -------
It works if -g is omitted on the assembling step. Still, the debug information
from the asm should not conflict with the original debug information, should
it?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37196


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/37196] Broken debug information on FreeBSD (dwarf)
  2008-08-21 22:28 [Bug c++/37196] New: Broken debug information on FreeBSD (dwarf) pip88nl at gmail dot com
  2008-08-21 22:33 ` [Bug c++/37196] " pinskia at gcc dot gnu dot org
  2008-08-21 22:58 ` pip88nl at gmail dot com
@ 2008-08-21 23:04 ` pinskia at gcc dot gnu dot org
  2008-08-21 23:04 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-08-21 23:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2008-08-21 23:03 -------
see http://sourceware.org/bugzilla/show_bug.cgi?id=6656 also.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37196


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/37196] Broken debug information on FreeBSD (dwarf)
  2008-08-21 22:28 [Bug c++/37196] New: Broken debug information on FreeBSD (dwarf) pip88nl at gmail dot com
                   ` (2 preceding siblings ...)
  2008-08-21 23:04 ` pinskia at gcc dot gnu dot org
@ 2008-08-21 23:04 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-08-21 23:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2008-08-21 23:02 -------
(In reply to comment #2)
> It works if -g is omitted on the assembling step. Still, the debug information
> from the asm should not conflict with the original debug information, should
> it?

And at that point, this is not a GCC bug but rather a binutils one or a gdb
one.  binutils contains the assembler.

So I am going to close this as invalid.  GCC is doing the correct thing of
passing -g down the assembler since you asked for it.  The assembler might be
doing the incorrect thing but that is not GCC's fault.  Report it to the
binutils team (as I mentioned they just fixed it recently,
http://sourceware.org/ml/binutils/2008-08/msg00036.html).


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37196


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-08-21 23:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-21 22:28 [Bug c++/37196] New: Broken debug information on FreeBSD (dwarf) pip88nl at gmail dot com
2008-08-21 22:33 ` [Bug c++/37196] " pinskia at gcc dot gnu dot org
2008-08-21 22:58 ` pip88nl at gmail dot com
2008-08-21 23:04 ` pinskia at gcc dot gnu dot org
2008-08-21 23:04 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).