Re: Dwarf problem with gcc and gdb

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Tue, 8 Dec 2015 19:50:49 +0100
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


Received on Tue Dec 08 2015 - 17:51:10 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:01 UTC