-ggdb3 -gdwarf-4 but "info macro BLAH" still doesn't work?

Jan Kratochvil jan.kratochvil@redhat.com
Tue May 8 10:52:00 GMT 2012


On Tue, 08 May 2012 12:03:50 +0200, Luke wrote:
> $ gcc -gdwarf-4 -gdb3 -Wall -O0 sample.c -o sample

-ggdb3, otherwise:
cc1: error: unrecognised debug output level "db3"


> This happens with Linaro gcc 4.7-2012.04, as well as a very recent
> pull from gcc master (4.8.0 20120502).
> 
> It doesn't happen with gcc 4.6.2.

It is probably due to the smaller .debug_macro section by Jakub Jelinek.
See 'readelf -WS sample', .debug_macinfo is the gdb-7.4.x compatible format,
.debug_macro is the new format available only in post-7.4 GDB snapshots since:
	commit 101e95e8a31879712dff26d233cdb266c1aba673
	Author: Tom Tromey <tromey@redhat.com>
	Date:   Tue Jul 26 17:04:21 2011 +0000

You can request with new GCC the old .debug_macinfo format by -gstrict-dwarf
but it also generates more poor debug info in other regards.


> Any suggestions?  I'm guessing this is a gcc bug.

Use GDB snapshot:
	http://sources.redhat.com/gdb/current/


Regards,
Jan



More information about the Gdb mailing list