Issue 260320.1: Distinct Registers Need not be Independent

Author: Ron Brender
Champion:
Date submitted: 2026-03-20
Date revised:
Date closed:
Type: Clarification
Status: Open
DWARF version: 6

ISSUE

The description of register storage in Section 2.5 is quite terse. It reads

  • Registers. Corresponds to the target architecture registers. Each register storage block is the size of the corresponding register.

Among other things, this leaves it unclear whether distinct registers are conceptually independent of each other as far as DWARF is concerned. The following attempts to clarify that while registers need not be independent, it is the producer that must consider such matters and not the consumer. The produced DWARF must be usable by a consumer without any need to be aware of such register interactions.

PROPOSAL

In Section 2.5, following the bullet for Registers, insert the following text:

It is the responsibility of a DWARF producer to provide consistent DWARF that can be used by a consumer without considering possible implicit aliasing between registers.

Registers are identified by integer numbers as specified in the architecture ABI. While distinct registers are identified by distinct numbers, there is no requirement that distinct registers correspond to distinct memory locations. For example, in the Intel x86 Architecture, the 1-byte %a1 register consists of the same byte of memory as the low byte of the 2-byte %ax register; which consists of the same low two bytes of the 4-byte %eax register; which consists of the same low four bytes of the 8-byte %rax register. Any operation that changes the low byte of any of these registers will change the value of the low byte read from the others as well. Similar relationships hold for many other registers as well.