Re: [Dwarf-discuss] Proposal: Add support for "property" with getter/setter (based on Pascal properties)

2024-10-14 Thread Martin via Dwarf-discuss
On 14/10/2024 20:56, Todd Allen via Dwarf-discuss wrote: Playing devil's advocate here: Can you mix these two types of properties?  That is, something like the following (please excuse any wrong syntax): type TMyRecord = record    a,b: integer; end; TMyClass = class    function GetProp: TMy

Re: [Dwarf-discuss] Proposal: Add support for "property" with getter/setter (based on Pascal properties)

2024-10-13 Thread Martin via Dwarf-discuss
On 13/10/2024 00:59, Adrian Prantl via Dwarf-discuss wrote: On Sep 30, 2024, at 1:39 PM, Martin wrote: On 30/09/2024 19:30, Adrian Prantl wrote: PS: One thing I left out is DW_AT_Property_Object. It wasn't clear to me why this wouldn't always be the address of the parent object of the DW_TAG

Re: [Dwarf-discuss] Proposal: Add support for "property" with getter/setter (based on Pascal properties)

2024-10-07 Thread Martin via Dwarf-discuss
has a language constructs for defining it. Calling it is done via the fields in RTTI. So, yes. "stored" can be dropped. On Oct 7, 2024, at 2:23 AM, Martin via Dwarf-discuss wrote: On 04/10/2024 21:56, Augusto Noronha via Dwarf-discuss wrote: Hi Martin, Could you explain w

Re: [Dwarf-discuss] Proposal: Add support for "property" with getter/setter (based on Pascal properties)

2024-10-07 Thread Martin via Dwarf-discuss
On 04/10/2024 21:56, Augusto Noronha via Dwarf-discuss wrote: Hi Martin, Could you explain what a Pascal-style stored accessor is or link to a reference to it? I tried looking it up but couldn’t find anything relevant. https://www.freepascal.org/docs-html/ref/refsu38.html FreePascal and Del

Re: [Dwarf-discuss] Proposal: Add support for "property" with getter/setter (based on Pascal properties)

2024-09-30 Thread Martin via Dwarf-discuss
On 30/09/2024 19:30, Adrian Prantl wrote: PS: One thing I left out is DW_AT_Property_Object. It wasn't clear to me why this wouldn't always be the address of the parent object of the DW_TAG_property. There is a construct where a property can point to an embedded structure. type TMyRecord =

Re: [Dwarf-discuss] Proposal: Add support for "property" with getter/setter (based on Pascal properties)

2024-06-22 Thread Martin via Dwarf-discuss
On 22/06/2024 23:22, Adrian Prantl via Dwarf-discuss wrote: 2) DW_TAG_Property_Default "default value" of a property. property Foo: integer read FFoo default 1; // In Pascal, there is no semicolon before "default" for this. ... Here I think it would be appropriate to use DW_AT_default_value (

Re: [Dwarf-discuss] Proposal: Add support for "property" with getter/setter (based on Pascal properties)

2024-06-20 Thread Martin via Dwarf-discuss
Sorry for the late reply. I've been away. > - What does it mean for a property to be default? I couldn't find that > defined in the linked FreePascal documentation. The property can be accessed without its name being specified. This currently exists for (array-like) indexed properties. ` pro

[Dwarf-discuss] Proposal: add DW_AT_lower_bound to DW_TAG_string_type

2024-05-22 Thread Martin via Dwarf-discuss
# Proposal to add DW_AT_lower_bound to DW_TAG_string_type ## Background Pascal normally use 1-based indexes for strings. But it can also generate strings with a 0-based index. Other languages may have varying defaults. For a debugger to show the result of an expression like `MyString[5]`

[Dwarf-discuss] Question: Clarification for DW_AT_string_length

2024-05-22 Thread Martin via Dwarf-discuss
DW_AT_string_length is described as "that provides the value of the length of the string" Is that the length in characters or bytes? That matters for e.g. Utf-16 when the DW_TAG_base_type for the char has a DW_AT_byte_size of 2 (or more). Below is from the draft for DWARF-6, but the same i

Re: [Dwarf-discuss] Question on DW_AT_low_pc for "repeated" DW_TAG_subprogram

2024-05-22 Thread Martin via Dwarf-discuss
On 20/05/2024 22:34, David Blaikie via Dwarf-discuss wrote: On Thu, May 16, 2024 at 1:05 PM Martin via Dwarf-discuss <mailto:dwarf-discuss@lists.dwarfstd.org>> wrote: On 16/05/2024 21:58, Martin via Dwarf-discuss wrote: > > If there is code (with debug info) th

Re: [Dwarf-discuss] Question on DW_AT_low_pc for "repeated" DW_TAG_subprogram

2024-05-16 Thread Martin via Dwarf-discuss
On 16/05/2024 21:58, Martin via Dwarf-discuss wrote: If there is code (with debug info) that uses a class/struct that is defined in a unit with debug info (or at least a base class is in such a Tiny but important mistake..., it meant to write uses a class/struct that is defined in a unit

Re: [Dwarf-discuss] Question on DW_AT_low_pc for "repeated" DW_TAG_subprogram

2024-05-16 Thread Martin via Dwarf-discuss
On 16/05/2024 18:46, David Blaikie via Dwarf-discuss wrote: On Thu, May 16, 2024 at 7:10 AM Martin via Dwarf-discuss <mailto:dwarf-discuss@lists.dwarfstd.org>> wrote: If a compiler adds a DW_TAG_subprogram for a routine from a different compilation unit ... Maybe because

[Dwarf-discuss] Question on DW_AT_low_pc for "repeated" DW_TAG_subprogram

2024-05-16 Thread Martin via Dwarf-discuss
If a compiler adds a DW_TAG_subprogram for a routine from a different compilation unit ... Maybe because - the other CU has no debug info - The compiler does not support referencing cross CU Would there be any reason why the compiler would not be allowed to include a  DW_AT_low_pc  for that rou

Re: [Dwarf-discuss] Proposal: Add support for "property" with getter/setter (based on Pascal properties)

2024-05-08 Thread Martin via Dwarf-discuss
array-indexes, but may be extended in future. For the example it just shows where the attribute would go. On 08/05/2024 12:35, Martin via Dwarf-discuss wrote: Here are 2 examples of what it would look like ## Property with different visibility ```   type     TFoo = class     private

Re: [Dwarf-discuss] Proposal: Add support for "property" with getter/setter (based on Pascal properties)

2024-05-08 Thread Martin via Dwarf-discuss
Here are 2 examples of what it would look like ## Property with different visibility ``` type TFoo = class private MyMember: integer; function MyFunc: integer; protected // "read public" is currently from oxygene, but may be added to FreePascal property My

Re: [Dwarf-discuss] Proposal: Add support for "property" with getter/setter (based on Pascal properties)

2024-05-08 Thread Martin via Dwarf-discuss
On 08/05/2024 06:34, Cary Coutant via Dwarf-discuss wrote: It will support the following new attributes * DW_AT_Default_Property flag    Specify this is a default property * DW_TAG_Property_Setter * DW_TAG_Property_Reader * DW_TAG_Property_Default * DW_TAG_Property_St

[Dwarf-discuss] Proposal: Add support for "property" with getter/setter (based on Pascal properties)

2024-05-07 Thread Martin via Dwarf-discuss
# Proposal to implement "properties" (based on Pascal) ## Background Pascal has a property construct, that allows a "variable like" identifier, which can either point to a field (member variable) or a getter/setter function. ``` TFoo = class FField: integer; function GetProp:

Re: [Dwarf-discuss] Question on "pascal property"

2024-05-03 Thread Martin via Dwarf-discuss
On 03/05/2024 10:08, Martin via Dwarf-discuss wrote: Then next is the question, how to start an attempt to get it standardized? I started on a DRAFT. (still discussing on the Pascal community, to ensure it comprises everything required. I post it here for comments on the general direction

Re: [Dwarf-discuss] Question on "pascal property"

2024-05-03 Thread Martin via Dwarf-discuss
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#debuggin

Re: [Dwarf-discuss] Question on "pascal property"

2024-05-02 Thread Martin via Dwarf-discuss
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/505f6da1961ab55c601d7239648c53ce863b5d

[Dwarf-discuss] Question on "pascal property"

2024-05-01 Thread Martin via Dwarf-discuss
Hello, I am writing the below to see if any of this might be of interest to add new tags/attributes to the Dwarf spec. If not, or for the parts for which it is a no, then I am happy to use vendor extensions. In Pascal there is a construct called property. https://www.freepascal.org/docs-h

Re: [Dwarf-Discuss] data-location containing "DW_OP_push_object_address / DW_OP_deref" if the variable could be in memory or register

2021-10-28 Thread Martin via Dwarf-Discuss
On 27/10/2021 17:34, John DelSignore wrote: One of the key concepts in the extensions, which I think addresses the problem you described, is to make locations (memory, register, composite, implicit, and undefined) first-class objects that can be pushed onto the DWARF evaluation stack. Certai

[Dwarf-Discuss] data-location containing "DW_OP_push_object_address / DW_OP_deref" if the variable could be in memory or register

2021-10-24 Thread Martin via Dwarf-Discuss
The problem was already described here http://lists.dwarfstd.org/pipermail/dwarf-discuss-dwarfstd.org/2005-April/002844.html But the replies in that thread only answered the case for DW_AT_frame_base However, if you have a data-type like described - At "Address of variable": e.g. pointer to 0x