I had a look at the Apple properties extension. There is also a Borland one, but for that I could not find anything beyond just the names.

The apple one bears some similarities. There documentation is here
https://github.com/llvm/llvm-project/blob/main/llvm/docs/SourceLevelDebugging.rst#debugging-information-format-1

I don't have any Objective-C experience myself, but briefly consulted with someone who has.

1) ObjC apparently always has an "ivar" (field) - Pascal may not have one
2) In ObjC the "ivar" refers to the property - For Pascal the opposite direction would be desirable (though of course a debugger could perform a backward search) 3) InObjC getter and setter attributes are strings => Apparently the given names are used for some dispatch call. In Pascal getter/setter should have to be either -field, -procedure/function (no oop), -method(oop), -method on different object

There are a few other things to be added for Pascal.

.....

Then next is the question, how to start an attempt to get it standardized?

What to submit and where?

How specific/generic should the specs be?

E.g. the above Apple extension appears to rely on the debugger knowing it is ObjC, and the debugger knowing how to invoke the dispatch (well, that is from what I understood on my brief consultation).
Adding a description for a getter/setter method:
- should this assume the debugger knows how to call it (where the parameter goes, etc)? Even if there could be different languages with different ways to call it? - should it have some defaults? (e.g. where the _this param goes, default for the value param) - should it give detailed instructions (describe how to compute each param).


I don't know the full needs properties in other languages would have. But some provisions could be included (and maybe someone with additional knowledge will join). Like C#, properties can have their own getter/setter instead of a reference to an existing, so that could be accommodated.





On 01/05/2024 23:46, Adrian Prantl wrote:
Just a quick very general remark: For Objective-C, Clang (and presumably also GCC) are producing a couple of property-related attributes in the DW_AT_APPLE extension space

https://github.com/llvm/llvm-project/blob/505f6da1961ab55c601d7239648c53ce863b5d70/llvm/include/llvm/BinaryFormat/Dwarf.def#L630
 
<https://github.com/llvm/llvm-project/blob/505f6da1961ab55c601d7239648c53ce863b5d70/llvm/include/llvm/BinaryFormat/Dwarf.def#L630>

maybe these are useful for you. I also wouldn't be opposed to standardizing a more generally useful mechanism for properties; we could potentially also find use for them in the Swift compiler.

--
Dwarf-discuss mailing list
Dwarf-discuss@lists.dwarfstd.org
https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss

Reply via email to