[fpc-devel] apple properties // Re: Help/Guidance please: Dwarf support for properties
Martin Frb
lazarus at mfriebe.de
Thu May 2 10:56:58 CEST 2024
https://github.com/llvm/llvm-project/blob/main/llvm/docs/SourceLevelDebugging.rst#debugging-information-format-1
> Objective C properties exist separately from class members. A
> property can be
> defined only by "setter" and "getter" selectors, and be calculated
> anew on each
> access. Or a property can just be a direct access to some declared ivar.
I don't know if in Apple terms "ivar" has any special meaning?
Nor if there is more to "calculated anew on each access"?
---------------
I don't have background on the Apple properties.
But the fact that the link between a "field" (tag_member) and the
property goes from the member to the property strikes me as odd. (first
example of dwarf)
It indicates, that the property is only meant to be found when starting
at the member?
For FPC properties that is the other way round.
The property would have to point to the field. (or function)
Also the Apple spec uses strings (names) to refer to the getter/setter.
I don't know if there is a particular underlying need. It's more costly
than a reference. Also It gets problematic if the getter is in an
embedded record, or if there are overloaded functions, ....
-----------------
There do exist Borland properties
https://android.googlesource.com/platform//prebuilts/clang/host/linux-x86/+/b669748458572622ed716407611633c5415da25c/clang-r416183d/include/llvm/BinaryFormat/Dwarf.def
But I could not find any details at all....
More information about the fpc-devel
mailing list