As what we discussed in D105469, the overflow error occurs when we try to dump location list for those attributes that do not have the loclist class, like DW_AT_count and DW_AT_byte_size
After re-reviewed the entire list, I sorted those attributes into two parts, one for dumping location list and one for dumping the location expression.
Details
- Reviewers
probinson shchenz dblaikie aprantl jhenderson jdoerfert - Group Reviewers
Restricted Project - Commits
- rG14f6cfcf3cab: [Debug-Info][llvm-dwarfdump] Don't try to dump location
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Overall the patch looks pretty reasonable, needs some polishing up.
llvm/lib/DebugInfo/DWARF/DWARFDie.cpp | ||
---|---|---|
92 | Should verify the right kind of FORM here, as in: assert((FormValue.isFormClass(DWARFFormValue::FC_Block) || FormValue.isFormClass(DWARFFormValue::FC_Exprloc)) && "bad FORM for location expression"); | |
780 | Missing DW_AT_bit_offset here (between byte_size and bit_size). I know this isn't really directly what you were doing, but if we're reviewing all the exprloc/loclist attributes, might as well fix both lists. | |
796 | Missing DW_AT_data_location between associated and byte_stride. | |
llvm/test/tools/llvm-dwarfdump/ELF/formclass3.s | ||
10 ↗ | (On Diff #357171) | I think the following single source line should be sufficient: |
14 ↗ | (On Diff #357171) | If you simplify the source to have no executable instructions, then I *think* you can remove the -triple which will allow this test to be run in all environments. (A number of bots do not build all targets, so it's preferable to have tests be as generic as possible.) |
Thank you Paul!
Address comments.
llvm/test/tools/llvm-dwarfdump/ELF/formclass3.s | ||
---|---|---|
14 ↗ | (On Diff #357171) | Some targets, like AIX, have not yet supported llvm-mc. So I think we should still keep the -triple? |
llvm/test/tools/llvm-dwarfdump/ELF/formclass3.s | ||
---|---|---|
7 ↗ | (On Diff #360750) | It's more common to pipe the object file instead of writing it to the file system. The test runs a little faster that way, and across many thousands of tests these little things add up. # RUN: llvm-mc ... -o - | llvm-dwarfdump -debug-info - | FileCheck %s |
14 ↗ | (On Diff #357171) | If you keep -triple then you need a REQUIRES to restrict the test to bots that include the correct target. A number of bots do not build all targets. |
llvm/test/tools/llvm-dwarfdump/ELF/formclass3.s | ||
---|---|---|
14 ↗ | (On Diff #357171) | If you move the test to the llvm/test/tools/llvm-dwarfdump/X86 directory you shouldn't need the REQUIRES - the whole directory has that implemented generically. |
Should verify the right kind of FORM here, as in: