[fpc-devel] Insufficient Dwarf info for Interfaces

Martin Frb lazarus at mfriebe.de
Thu Sep 15 14:32:26 CEST 2022


On top of adding the functions in the interface to the dwarf info, it 
would be great if the compiler could also add some sort of link to the 
underlaying TObject.

So the debugger could (if available) show the user the object/instance 
that implements the interface.

I am not sure how that would best be done (i.e. maybe add some internal 
field, maybe there is some dwarf tag that can be used, maybe a dwarf 
 From what I  understand, this would require the offset between the 
interface table and the class (i.e. the value that is subtracted from 
"self" in the interface's method).
If for a debug build the compiler could write that value in front of the 
interface, then it could point the debugger to it....

Just my 2 cents.

More information about the fpc-devel mailing list