[DWARF] DWARFDie::getDeclFile() doesn't work with DW_FORM_implicit_const
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
DWARFDie::getDeclFile() gets an invalid DWARFFormValue without a DWARFUnit* as DWARFAbbreviationDeclaration::getAttributeValueFromOffset() doesn't pass it in DWARFFormValue::createFromSValue().
Can be checked with DWARFDie::dump(). It works correctly as it gets a referenced value, not a lazy copy.
getDeclFile in DWARFDieTest.cpp has a value stored in DW_FORM_data1, so it passes.
Contributor guide
Research direction
Start with DWARFAbbreviationDeclaration::getAttributeValueFromOffset() and DWARFFormValue::createFromSValue(), then inspect DWARFDie::getDeclFile() and DWARFDie::dump(). Review the getDeclFile test in DWARFDieTest.cpp, which currently uses DW_FORM_data1, and add coverage for DW_FORM_implicit_const. Done means getDeclFile() produces a valid value for that form and DWARFDie::dump() handles it correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100