On Thu, 15 Sep 2022, Martin Frb via fpc-devel wrote:

https://gitlab.com/freepascal.org/fpc/source/-/issues/39904

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 believe the whole idea of interfaces is that this info is not available :-)

For externally implemented interfaces (COM and the like) this will
definitely not be available. Delphi has a special interface which - when implemented - returns the object (TComponent) behind an interface.
You can then query this interface and get a reference to the object.
It's called IInterfaceComponentReference

Michael.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to