I knew for a while that dwarf output for the target is not 100% correct, I now found one example of a wrongly generated debuginfo, could somebody please help me and fix this problem in compiler?
I see the problem both with dwarf2 or dwarf4 debug info, with dwarf2 the error message is a little different.
Happy easter and thank you in advance,
Michael
the program:
program hello;
const
a : array[0..3] of longWord = (
$ffffffff,
$ffffffff,
$ffffffff,
$7fffffff
);
begin
end.comes up with a dwarf error on gdb:
pic32mx795f512h]$ pic32mx-elf32-gdb hello.elf
GNU gdb (GDB) 7.6
Reading symbols from /Users/ring/devel/pic32mx795f512h/hello.elf...Dwarf Error: wrong version in compilation unit header (is 16964, should be 2, 3, or 4) [in module /Users/ring/devel/pic32mx795f512h/hello.elf]
(no debugging symbols found)...done.
Dwarf2 errormessage:
Reading symbols from /Users/ring/devel/pic32mx795f512h/hello.elf...done. invalid dwarf2 offset 2231369728
My commandline for compilation is:
DEBUG="-gw4 -godwarfsets -godwarfmethodclassprefix" BINUTILS=pic32mx-elf32-; SUBARCH=pic32mx
CPU=pic32mx795f512h
/usr/local/lib/fpc/2.7.1/ppcrossmipsel -MObjFPC -Scghi -Ch1024 -Cs1024 -Tembedded -Pmipsel $DEBUG -vewnhix -l -Cp$SUBARCH -Wp$CPU -XP$BINUTILS -FD/usr/local/bin -a hello.pas -al -ar -at -O2 -d$CPU -B
