Dwarf problem with gcc and gdb

Dimitry Andric dim at FreeBSD.org
Tue Dec 8 18:51:10 UTC 2015


On 08 Dec 2015, at 10:02, Ray Newman <ray at woopwoop.com> wrote:
> 
> Compiled using gcc (FreeBSD Ports Collection) 4.8.5 on arm (Raspberry Pi - several versions); BSDmakefile attached (make test used).
> gdb gives:
> 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 "armv6-marcel-freebsd"...Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /home/ray/mumps/mumps]
> 
> I need to fix this to find the *real* problem.

Since gcc 4.8.0, it defaults to -gdwarf-4.  You must explicitly use
-gdwarf-2, if you want to debug with the version of gdb in base.

Alternatively, use the gdb port, or lldb.

-Dimitry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20151208/04e98f89/attachment.sig>


More information about the freebsd-current mailing list