ccoutant / dwarf-locations

2 stars 6 forks source link

...and so on. #2

Closed woodard closed 1 year ago

woodard commented 1 year ago

[non-normative] The evaluation of a DWARF expression can provide the location of an object, the value of an array bound, the length of a dynamic string, the desired value itself, and so on.

It feels to me that in this context "...and so on" is too imprecise. You have an enumeration of very specific items and just a grab bag. I think that you should either complete the enumeration of things that can be the result of a DWARF expression or use terminology like:

The evaluation of a DWARF expression can provide objects of various types including: the location of an object, the value of an array bound, the length of a dynamic string, the desired value itself.

Completing the enumeration would be the preferred choice because it defines the data structures that could be used as the result of the evaluation of a DWARF expression.

t-tye commented 1 year ago

The evaluation of a DWARF expression can result in either a value or a [set of] location descriptions. This non-normative text aims to motivate why you may need a value or location description so cannot enumerate all possibilities as it depends on how the producer wants to use the expressions.

This sentence was moved from section 2.5.1 paragraph 1 of the DWARF 5 spec.