This is an archive of the discontinued LLVM Phabricator instance.

[DWARFVerifier] Verify GNU extensions of call site DWARF symbols
ClosedPublic

Authored by djtodoro on Aug 28 2019, 2:21 AM.

Details

Summary

This patch verifies that the call site DWARF symbols (added during the implementation of the debug entry values feature) are
generated properly.

Diff Detail

Repository
rL LLVM

Event Timeline

djtodoro created this revision.Aug 28 2019, 2:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 28 2019, 2:21 AM
probinson added inline comments.
llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
208 ↗(On Diff #217588)

Adding GNU tags to existing functionality seems like it should be its own patch.

230 ↗(On Diff #217588)

Adding GNU attributes to existing functionality seems like it should be its own patch.

530 ↗(On Diff #217588)

Should this also check DW_TAG_call_site?

djtodoro marked 3 inline comments as done.Aug 28 2019, 6:26 AM

@probinson Thanks a lot for your comments!

llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
208 ↗(On Diff #217588)

I could split this into two patches.

530 ↗(On Diff #217588)

This only checks for the DW_AT_abstract_origin DWARF attribute that was used only by GNU call site extensions. After DWARF 5 Standard release, DW_TAG_call_site uses DW_AT_call_origin for the same purpose.

aprantl added inline comments.Aug 28 2019, 1:35 PM
llvm/test/tools/llvm-dwarfdump/X86/valid-call-site-parameters.ll
4 ↗(On Diff #217588)

Seems like this test also passes without your patch applied?

djtodoro marked an inline comment as done.Aug 29 2019, 2:22 AM
djtodoro added inline comments.
llvm/test/tools/llvm-dwarfdump/X86/valid-call-site-parameters.ll
4 ↗(On Diff #217588)

Actually the test case won't pass without the patch applied.

djtodoro updated this revision to Diff 217802.Aug 29 2019, 2:25 AM
djtodoro retitled this revision from [DWARFVerifier] Verify new call site DWARF symbols to [DWARFVerifier] Verify GNU extensions of call site DWARF symbols.

-Verify only GNU extensions in this patch

aprantl accepted this revision.Aug 29 2019, 2:09 PM

Ah because we didn't accept the GNU entry value attributes before?

This revision is now accepted and ready to land.Aug 29 2019, 2:09 PM

@aprantl Thanks for the review!

Ah because we didn't accept the GNU entry value attributes before?

We generate GNU entry value attributes for the GDB + DWARF 4 tune, because GDB has fully support for reading the debug entry values feature and users of the tune (and that debugger) can see benefits of the feature implemented now.
The functionality added with this patch was missing and we should have added this when we have introduced the attributes.

This revision was automatically updated to reflect the committed changes.