Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2019-08

Question on the dwarf representation of IInterface

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin

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?

Reply by email