Issue 251030.1: Normalize Some Class and Form Names
| Author: | Ron Brender |
|---|---|
| Champion: | |
| Date submitted: | 2025-10-30 |
| Date revised: | |
| Date closed: | 2025-11-10 |
| Type: | Editorial |
| Status: | Accepted in part |
| DWARF version: | 6 |
BACKGROUND
As a result of adopting 230524.1, "Location Descriptions on the Stack," and other recent proposals in V6, we have some new class and form names in the DWARF spec:
Classes:
- exprval
- exprloc
- vallist
- loclist
Form:
DW_FORM_expression
Classes exprval and exprloc use DW_FORM_expression (which is
a renaming of DW_FORM_exprloc from V5).
Classes loclist and vallist use DW_FORM_loclistx (this last
carried over from V5).
Notice that the exprval and exprloc names indicate the representation first (expression) and the meaning second (val vs loc) while vallist and loclist are the opposite.
Further, DW_FORM_expression is rather long compared to the
usual abbreviated spelling of other classes and forms.
PROPOSAL
1) For the class names, adopt the order meaning then representation. That means change exprval to valexpr and exprloc to locexpr. The resulting set of names is: locexpr, loclist, valexpr and vallist.
2) Rename DW_FORM_expression to DW_FORM_expr. The latter
is more consistent with the abbreviation conventions in the
classes that use it (locexpr, valexpr).
3) Rename DW_FORM_loclistx to DW_FORM_listx. This better
reflects the fact that that form is used with both value
lists and location lists and not just locations.
These are simple renamings only. DW_FORM_expr will use code
0x18 (used by DW_FORM_exprloc in V5), and the two names can
be treated as synonyms. Similarly DW_FORM_listx can use code
0x22 (used by DW_FORM_loclistx in V5), and those two names
can be treated as synonyms.
Note that DW_FORM_expression is new in V6 and already
defined as a renaming of DW_FORM_exprloc.
Note that DW_FORM_rnglistx (carried over from V5) already
follows the meaning then representation order and needs no
change.
2025-11-10: Accepted parts 1 and 2, rejected part 3.
DW_FORM_loclistx will remain as spelled.