[Dwarf-discuss] Extension for the new DW_TAG_property in DWARF-6
Martin
dwarf@mfriebe.de
Sat Apr 25 22:18:20 GMT 2026
Actually it can be even more complex
type
T1 = array [3..5, 1..2] of integer;
TFoo = class
private
F1: T1;
public
property Bar: Integer read f1[4][1];
end;
In this case several indices are required. Or a final address inside the
array.
Also:
type
t2 = record a,b: integer; end;
T1 = array [3..5] of T2;
TFoo = class
private
F1: T1;
public
property Bar: Integer read f1[4].b;
end;
The path can be any combination of index and fields (currently no
pointer/deref).
However this 2nd example is already solved as the address of "b"'s
parent "T2" can be given (and the fact that it is in an array is not
relevant)
On 26/04/2026 00:09, Martin wrote:
> I found a case that I was myself not previously aware off.
>
> In the below example the value is an indexed member of an array.
>
> program project1;
> {$Mode objfpc}
> type
> T1 = array [3..5] of integer;
>
> TFoo = class
> private
> F1: T1;
> public
> property Bar: Integer read f1[4];
> end;
>
>
> There is no DW_TAG_member or DW_TAG_variable for the single element.
> DW_AT_property_forward can only link to the array itself.
>
> I additionally would need the index in the array.
>
>
> I can also not use
> > DW_OP_push_object_location to inquire of the location of the
> property’s parent
>
> Since the array could be in a sub-structure, for which this would supply
> the address. (So that then the address of the array itself can be
> calculated).
>
>
More information about the Dwarf-discuss
mailing list