Adding properties into existing stabs/dwarf; gdb readable workaround ? [[Re: [fpc-devel] Status and ideas about debug info (stabs, dwarf / dwar3)]]
Joost van der Sluis
joost at cnoc.nl
Mon Sep 12 21:46:43 CEST 2011
On Mon, 2011-09-12 at 20:31 +0200, Jonas Maebe wrote:
> On 12 Sep 2011, at 20:20, Martin wrote:
>
> > On 12/09/2011 19:14, Martin wrote:
> >> Currently properties that map to a field are already present in dwarf (again why not in stabs?).
>
> Because Stabs is legacy and I don't want to spend time on it.
>
> >> Could not properties mapping to a function be implemented the same way => normal functions are already listed in "ptype" so
> >> public
> >> property Counter: Integer read GetCounter
> >> could appear the same as the function "GetCounter" ?
> >>
> >> In that case at least the list of available symbols is complete. The only thing that then would need codetools involved was to check if the name is a property and not a function/field.
>
> That may be possible, yes.
What is it that we actually need? At the Dwarf-level:
Is the information that a property actually has a getter, and the name
of that getter enough?
Or do we want that when the value of a property is asked, the getter is
called automagically? (And that there is some kind of flag that
indicates that a getter is being used?) I don't think that we can add a
stack-script in the DW_AT_Location that executes the getter. I've looked
at DW_OP_call, but that won't help us here.
Or, and maybe this is the best solution: some 'opaque' type that returns
a reference to something else. Which can be different for reading and
writing values...
Joost.
More information about the fpc-devel
mailing list