Is the discriminant value always a constant? Perhaps DWARF should say, "The value of this attribute is of class constant." Table 2.3 defines attribute class constant as, "One, two, four, eight or sixteen bytes of uninterpreted data, or data encoded in the variable length format known as LEB128 (see Section 7.6 on page 221).".
Cheers, John D. On 1/18/25 16:09, Tom Tromey via Dwarf-discuss wrote: > 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 > -- > Dwarf-discuss mailing list > Dwarf-discuss@lists.dwarfstd.org > https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss > > > CAUTION: This email originated from outside of the organization. Do not click > on links or open attachments unless you recognize the sender and know the > content is safe. This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately. -- Dwarf-discuss mailing list Dwarf-discuss@lists.dwarfstd.org https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss