Hi,
trying to debug an avr program, I got this error with fpc trunk :
"Reading symbols from
<PATH>\Projects\unit_depth_dwarf\unit_depth_dwarf.elf... Dwarf Error: Could not find abbrev number 18 in CU at offset 0x111d [in module
G:\Programming\dimitris\Projects\unit_depth_dwarf\unit_depth_dwarf.elf] (No debugging symbols found in
<PATH>\Projects\unit_depth_dwarf\unit_depth_dwarf.elf)"
Investigating further, I found that when I declare an array type ( only ? I need to check further ... ) in a unit that is referenced from another unit which in turn is referenced from the main program, I get the error, i.e. :
depth_2.pas unit -> has a type declared as an array
depth_1.pas unit -> uses depth_2 unit and declares a variable with the type from the unit depth_2
main.pas -> uses depth_1 only
in such scenario I get the dwarf error .
FYI, readelf output show the same :
"avr-readelf.exe -w unit_depth_dwarf.elf > unit_depth_dwarf.dwf
readelf: Warning: DIE at offset 0x11de refers to abbreviation number 18 which does not exist
readelf: Warning: DIE at offset 0x11de refers to abbreviation number 18 which does not exist"
The attached example I compiled it using :
fpc.exe -g -gw2 -a -al -Xe -Xm -Sm -Tembedded -Pavr -CpAVR5
-WpATMEGA328P -dF_CPU:=16000000 unit_depth_dwarf.pasPS: I attached also the dwarf output from avr-readelf .
PS2: Even with an empty project and debugging enabled I get warnings from readelf :
"readelf: Warning: Invalid CIE pointer 0x009e0000 in FDE at 0x000014 readelf: Warning: Invalid CIE pointer 0x00bc0024 in FDE at 0x0013ac readelf: Warning: Invalid CIE pointer 0x00c20024 in FDE at 0x0013b8 readelf: Warning: Invalid CIE pointer 0x00d01f10 in FDE at 0x001f24 readelf: Warning: Invalid CIE pointer 0x00d41f10 in FDE at 0x001f30 readelf: Warning: Invalid CIE pointer 0x00d61f48 in FDE at 0x001f5c readelf: Warning: Encoded value extends past end of section"
regards
