[fpc-devel] Dwarf3 and the encoding of classes
Joost van der Sluis
joost at cnoc.nl
Mon Jan 3 14:10:14 CET 2011
On Mon, 2011-01-03 at 13:38 +0100, Jonas Maebe wrote:
> 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....
> 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.
I didn't change the (Dwarf-3) encoding of class types, it already
omitted the implicit pointer. But it wasn't done properly so I fixed
that.
If we agree on this, we can change this.
I'll see if I can find any other differences between the code that
writes the Dwarf-3 class info and the other Dwarf-formats. If we are
happy with the Dwarf-2 class debug-info, maybe the Dwarf-3 code can even
be removed.
Joost.
More information about the fpc-devel
mailing list