[fpc-devel] Question on the dwarf representation of IInterface

Martin fpc at mfriebe.de
Wed Aug 28 14:53:29 CEST 2019


I noted that fpc uses different representation for class and interface.

classes are encoded as
   DW_TAG_pointer_type
   DW_TAG_structure (or class)

interfaces as
   DW_TAG_structure (or class)
      DW_AT_allocated
      DW_AT_data_location


The problem is, that for both class and interface the following is valid
   var a,b: IUnknown;
   if a=b then
And afaik for class and interface, this compares the pointer

I have not tested this, but I would expect that a debugger evaluating 
"a=b" would not be able to do the correctly for interfaces.
Instead the debugger would compare the empty structure of the interface.
This means that for the debugger any interface would equal to any other.

For classes, as far as I am aware = comparison currently works.

Any comments?



More information about the fpc-devel mailing list