Issue 260331.1: Reorder sections in Chapter 3
| Author: | Ben Woodard |
|---|---|
| Champion: | |
| Date submitted: | 2026-03-31 |
| Date revised: | 2026-09-23 |
| Date closed: | 2026-09-23 |
| Type: | Editorial |
| Status: | Accepted |
| DWARF version: | 6 |
DISCUSSION
When 260127.1 was under final discussion, it became apparent that there was no conceptual order to the sections in Chapter 3 of the DWARF standard. This proposal reorganizes the sections into a logical hierarchy.
Conceptual grouping for reference:
Basic mechanics of DWARF expressions
- 3.2 Stack Operations (includes
DW_OP_nop) - 3.3 Literal and Constant Operations
- 3.4 Arithmetic, Logical and Relational Operations
- 3.5 Type Conversion Operations
Location creation group
- 3.6 Undefined Location Operations
- 3.7 Register Location Operations
- 3.8 Memory Location Operations
- 3.9 Implicit Location Operations
- 3.10 Implicit Pointer Location Operations
- 3.11 Composite Location Operations
Operations on locations
- 3.12 Offset Location Operations
- 3.13 Dereferencing Location Operations
- 3.14 Register Value Operations
Special and miscellaneous operations
- 3.15 Context Query Operations
- 3.16 Control Flow Operations
- 3.17 Entry Value Operations
- 3.18 Extended Operations
PROPOSAL
Rearrange Chapter 3, "DWARF Expressions", as follows:
- 3.1 DWARF Expression Evaluation Context
- 3.2 Stack Operations (includes
DW_OP_nop) - 3.3 Literal and Constant Operations
- 3.4 Arithmetic, Logical, and Relational Operations
- 3.5 Type Conversion Operations
- 3.6 Undefined Location Operations
- 3.7 Register Location Operations
- 3.8 Memory Location Operations
- 3.9 Implicit Location Operations
- 3.10 Implicit Pointer Location Operations
- 3.11 Composite Location Operations
- 3.12 Offset Operations
- 3.13 Dereferencing Operations
- 3.14 Register Value Operations
- 3.15 Context Query Operations
- 3.16 Control Flow Operations
- 3.17 Entry Value Operations
- 3.18 Producer-Defined Operations
- 3.19 Value Lists
- 3.20 Location Lists
Key updates incorporated into this revision:
-
Standardized Terminology: Normalized all section titles to use "Operations" rather than mixing "Operators" and "Operations".
-
Basic Mechanics: Kept foundational stack and arithmetic operations together. Moved
DW_OP_nopinto Stack Operations. -
Type Conversions: Moved Type Conversion Operations directly after Arithmetic, Logical, and Relational Operations, as type conversions function as value/arithmetic operations rather than context operations.
-
Location Operations vs. Location Creation: Grouped location creation operations together (Undefined, Register, Memory, Implicit, Composite). Because Offsetting and Dereferencing apply universally to all kinds of locations (not just memory), they are placed after all location creation sections.
-
Special & Miscellaneous Operations: Split the former generic "Special Operations" section into dedicated subsections—Entry Value Operations and Producer-Defined Operations. Placed Control Flow, Context Query, and special operations together near the end of the chapter.
The DW_OP_extended operation is pure representation, and should not
be covered in Chapter 3. Instead, move its description to
Section 8.7.1, "Operator Encodings".
2026-09-14: Revised based on email feedback. Normalized section titles;
moved DW_OP_nop to stack operations section;
moved DW_OP_entry_value and extended operations to their own sections;
removed "Special Operations" section.
2026-09-14: Accepted with minor changes (replace "Extension Operations" with
"Producer-Defined Operations"; move DW_OP_extended to Chapter 8).
2026-09-23: Updated to reflect changes from 9/14/26 meeting.