gdb / dwarf issue
Gary Aitken
freebsd at dreamchaser.org
Tue Nov 15 18:51:51 UTC 2016
On 11/14/16 22:55, Gary Aitken wrote:
> I'm having trouble getting gdb to agree to look at symbols:
>
> $ cd /usr/ports/graphics/rawtherapee
> $ make showconfig
> ===> The following configuration options are available for rawtherapee-4.2_3:
> OPENMP=on: Enable multicore processing using OpenMP
> OPTIMIZED_CFLAGS=off: Use extra compiler optimizations (requires SSE support)
>
> $ file /usr/local/bin/rawtherapee
> /usr/local/bin/rawtherapee: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 10.3, not stripped
>
> $ gdb /usr/local/bin/rawtherapee
> GNU gdb 6.1.1 [FreeBSD]
> <snip>
> This GDB was configured as "amd64-marcel-freebsd"...Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/local/bin/rawtherapee]
> (gdb) break main
> No symbol table is loaded. Use the "file" command.
>
> My search found implications that a single dependent library with
> optimization turned on could cause this to happen; is that what I'm
> seeing here, or something else?
>
> If so, is there an easy way to find out which libraries have compiler
> optimization turned on that causes this?
>
> Or do I need to be running something else like the gdb66 port?
>
> Or?...
now I'm really puzzled:
$ nm /usr/local/bin/rawtherapee | grep main
0000000000c2b45c T KLTCountRemainingFeatures
00000000007fecab t _GLOBAL__sub_I_main.cc
00000000011f76e0 b _ZGVZ4mainE8settings
000000000055516c T _ZN10EditWindow21on_mainNB_switch_pageEP16_GtkNotebookPagej
00000000005da0b8 T _ZN8RTWindow21on_mainNB_switch_pageEP16_GtkNotebookPagej
00000000011f76e8 b _ZZ4mainE8settings
U gtk_main_quit
00000000007f8905 T main
00000000011f75e0 B mainThread
$ gdb /usr/local/bin/rawtherapee
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
<snip>
This GDB was configured as "amd64-marcel-freebsd"...Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/local/bin/rawtherapee]
How do I get the right header, or what is the correct gdb to use?
Thanks for any pointers,
Gary
More information about the freebsd-questions
mailing list