[fpc-devel] Dwarf3 and the encoding of classes
Jonas Maebe
jonas.maebe at elis.ugent.be
Mon Jan 3 13:38:26 CET 2011
On 03 Jan 2011, at 13:29, Joost van der Sluis wrote:
> This has nothing to do with gdb, but with the debug-information that
> fpc
> (-gw3) generates. Now it handles classes as if they are not
> pointers. I
> think that this is closer to how a class is defined in Pascal. A class
> is (imho) not a pointer, just like an ansistring is not a pointer.
> After
> all, we don't use AnObject^.Destroy....
Delphi also allows skipping the ^ for e.g. pointers to records. A
difference is that it does not allow using ^ at all for classes, but
still...
Also, in Delphi (and in FPC's Delphi mode) untyped pointers can be
automatically converted by the compiler into class types, so they are
quite close. I don't really see a big advantage in changing the
encoding of class types in the debug information, especially since
even now stuff like classinstance.fieldname works.
Jonas
More information about the fpc-devel
mailing list