<div dir="ltr"><div dir="ltr"></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, May 17, 2020 at 10:46 PM Dimitrios Chr. Ioannidis via fpc-devel <<a href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
   trying to debug an avr program, I got this error with fpc trunk  :<br>
<br>
"Reading symbols from <br>
<PATH>\Projects\unit_depth_dwarf\unit_depth_dwarf.elf...<br>
Dwarf Error: Could not find abbrev number 18 in CU at offset 0x111d [in <br>
module <br>
G:\Programming\dimitris\Projects\unit_depth_dwarf\unit_depth_dwarf.elf]<br>
(No debugging symbols found in <br>
<PATH>\Projects\unit_depth_dwarf\unit_depth_dwarf.elf)"<br>
<br>
Investigating further, I found that when I declare an array type ( only <br>
? I need to check further ... ) in a unit that is referenced from <br>
another unit which in turn is referenced from the main program, I get <br>
the error, i.e. :<br>
<br>
depth_2.pas unit -> has a type declared as an array<br>
<br>
depth_1.pas unit -> uses depth_2 unit and declares a variable with the <br>
type from the unit depth_2<br>
<br>
main.pas -> uses depth_1 only<br>
<br>
in such scenario I get the dwarf error .<br></blockquote><div><br></div><div>Looking at the compiler generated assembler (-a) the information is emitted, but doesn't end up in the final elf.  This raises the suspicion that it is the linker that is dropping the whole of the 2nd unit's debug information  If you add a procedure to unit2 that gets referenced anywhere else the information is retained in the elf.</div></div></div>