Issue 260413.1: Wrong form classes for DW_CFA_def_cfa_expression, _expression, and _val_expression

Author: Cary Coutant
Champion:
Date submitted: 2026-04-13
Date revised: 2026-04-22
Date closed: 2026-04-27
Type: Error
Status: Accepted
DWARF version: 6

After accepting Issue 230616.1, we made the following editorial changes (among others):

Note that Section 6.4 is now 7.4. The page numbers are now closer to 200 and 202.

Also, as a result of 251030.1, the form classes were renamed valexpr and locexpr.

It seems to me that the first two, DW_CFA_def_cfa_expression and DW_CFA_expression, should be locexpr, not valexpr. These are expressions that return a location, not a value. That's the difference between DW_CFA_expression and DW_CFA_val_expression: the first gives a location, and second gives a value.

In Section 8.23, Table 8.29 has DW_CFA_def_cfa_expression and DW_CFA_expression taking locexpr (correct, I think), but also lists DW_CFA_val_expression as taking locexpr (wrong, should be valexpr).

Proposal

In Section 7.4.2.2 CFA Definition Instructions, bullet 6, DW_CFA_def_cfa_expression, change "valexpr" to "locexpr".

In Section 7.4.2.3 Register Rule Instructions, bullet 9, DW_CFA_expression, change "valexpr" to "locexpr".

(Bullet 10, DW_CFA_val_expression is correct.)

In Section 8.23 Call Frame Information, Table 8.29, in the row for DW_CFA_val_expression, change "locexpr" to "valexpr".

(The rows for DW_CFA_def_cfa_expression and DW_CFA_expression are correct.)


2026-04-27: Accepted.