[PATCH] D105469: [Debug-Info] [llvm-dwarfdump] Don't treat DW_FORM_data4/8 to be section offsets in DWARF3.

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 8 07:17:42 PDT 2021


probinson added a comment.

In D105469#2863965 <https://reviews.llvm.org/D105469#2863965>, @Esme wrote:

> In D105469#2860046 <https://reviews.llvm.org/D105469#2860046>, @probinson wrote:
>
>> The standard specifies that if an attribute allows one of the '*ptr' classes, then data4/data8 must be interpreted that way. The interpretation is fixed for each attribute. DWARF 3, section 7.5.4 "Attribute Encodings" third paragraph. If the test is using data4 to encode a constant, the test is incorrect. (I haven't really looked at the tests in this patch, except to see that they could probably be reduced quite a bit.)
>
> The test was compiled from a c++ source code, and the overflow error does exist for DW_AT_data_member_location in DWARF3.
> Do you mean that we should use other forms to encode a constant in DW_AT_data_member_location?
> I will have a look into the issue and post another patch for it.

Yes, that would be a compiler bug.  I agree it's annoying because it means we can't just always use data4, for some attributes.
Note that fixed-size FORMs are preferable to using a LEB, because it helps debugger parsing when DIEs have a fixed size.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105469/new/

https://reviews.llvm.org/D105469



More information about the llvm-commits mailing list