Issue 260331.1: Reorder sections in Chapter 3
| Author: | Ben Woodard |
|---|---|
| Champion: | |
| Date submitted: | 2026-03-31 |
| Date revised: | |
| Date closed: | |
| Type: | Editorial |
| Status: | Open |
| DWARF version: | 6 |
DISCUSSION
When 260127.1 was under final discussion I noticed that there was no conceptual order to the sections in Chapter 3 of the DWARF standard. I propose a reorganization of the sections to make the order more logical.
The order that I propose is the following with some commentary. (Even though I grouped these into sections. I do not believe that these sections need to be represented as actual sections and subsections in the final document. It was just helpful in understanding the order I propose.)
Basic mechanics of DWARF expressions super-section
- 3.2 Stack Operators
- 3.3 Literal and Constant Operators - introduce basic numbers
- 3.4 Arithmetic, Logical and Relational - Manipulation of those numbers
- 3.5 Control flow operations - Right after relational operators
Context Operations
- 3.6 Context Query - This placement is up for debate in my mind. I considered putting this right after 3.1 but I think that we need to explain the basic operations of the stack before we discuss querying the context. Another position may be after 3.2 before the numbers. For the moment, this seems like the best placement
- 3.7 Type Conversions - I think that there is an argument to be made that type conversion operators are really "context manipulation operators" that modify the current object element of the DWARF context and 3.6 and 3.7 should be merged into "Context Operations" but that is beyond the scope of this proposal.
Location super-section
-
3.8 Undefined Location - the most basic location
-
Register group
- 3.9 Register Value Operations
- 3.10 Register Locations
-
Memory group
- 3.11 Memory Locations
- 3.12 Dereferencing Locations
-
Implicit group
- 3.13 Implicit Locations
- 3.14 Implicit Pointer Locations
-
3.15 Composite Locations
-
3.16 Offset Locations - Open for debate. I really debate where to put this. Maybe it should be 3.8.
Special Operations
- 3.17 Special Operations
PROPOSAL
Rearrange the Operations chapter as follows:
- 3.2 Stack Operators
- 3.3 Literal and Constant Operators
- 3.4 Arithmetic, Logical and Relational
- 3.5 Control flow operations
- 3.6 Context Query
- 3.7 Type Conversions
- 3.8 Undefined Location
- 3.9 Register Value Operations
- 3.10 Register Locations
- 3.11 Memory Locations
- 3.12 Dereferencing Locations
- 3.13 Implicit Locations
- 3.14 Implicit Pointer Locations
- 3.15 Composite Locations
- 3.16 Offset Locations
- 3.17 Special Operations