[Dwarf-discuss] DW_AT_discr_value improvement

Tom Tromey tom@tromey.com
Sat Jan 18 21:09:27 GMT 2025


This comes from a Rust bug:

https://github.com/rust-lang/rust/issues/125147

DW_AT_discr_value (section 5.7 page 123) says:

    The variant entry may have a DW_AT_discr_value attribute whose value
    represents the discriminant value selecting this variant. The value
    of this attribute is encoded as an LEB128 number.

It is needless and confusing to specify LEB128 here, as the form will
determine the representation.  Additionally there doesn't seem to be any
reason to limit the forms that may be used here.

Tom


More information about the Dwarf-discuss mailing list