This problem affects Rust most directly. In short, there are 2 problems:
- LLDB stores discriminant values of
DW_TAG_variant as a uint32_t, even though discriminants can be up to 128 bits long (e.g. Option<String> is 64 bits, Option<NonZero<u128>> is 128 bits). In the 128-bit case, the DW_AT_discr_value is a DW_FORM_block1:
die.GetAttributeValueAsOptionalUnsigned returns a std_optional<uint64_t>, so even if the DW_FORM_block1 was read correctly and VariantMember.discr_value was a u128, it wouldn't be communicated to VariantMember correctly
This problem affects Rust most directly. In short, there are 2 problems:
DW_TAG_variantas auint32_t, even though discriminants can be up to 128 bits long (e.g.Option<String>is 64 bits,Option<NonZero<u128>>is 128 bits). In the 128-bit case, theDW_AT_discr_valueis aDW_FORM_block1:die.GetAttributeValueAsOptionalUnsignedreturns astd_optional<uint64_t>, so even if theDW_FORM_block1was read correctly andVariantMember.discr_valuewas au128, it wouldn't be communicated toVariantMembercorrectly