This is an archive of the discontinued LLVM Phabricator instance.

[llvm] Check the debug info line table for basic block sections.
ClosedPublic

Authored by snehasish on Nov 6 2020, 4:26 PM.

Details

Summary

Extend the existing basic block sections debug info test to check for the correctness of the generated line table.

Diff Detail

Event Timeline

snehasish created this revision.Nov 6 2020, 4:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 6 2020, 4:26 PM
snehasish requested review of this revision.Nov 6 2020, 4:26 PM
dblaikie accepted this revision.Nov 6 2020, 4:40 PM

Looks OK - though you might want to check with -v output or otherwise check the addresses maybe? It might be the llvm-dwarfdump output, even with -v, is a bit hard to test what you may want to test on an object file - validating which line table entries are referring to which sections. If you want to test at that level to ensure the portions of the line table refer to the right bb sections, it might involve enhancing llvm-dwarfdump -v -debug-line output to include the name of the section (& section number, in cases where the name may not be unique (-fno-unique-section-names)) in a similar way to llvm-dwarfdump's output for debug_ranges/loc/etc.

This revision is now accepted and ready to land.Nov 6 2020, 4:40 PM
MaskRay added a subscriber: MaskRay.Nov 6 2020, 4:46 PM
MaskRay added inline comments.
llvm/test/DebugInfo/X86/basic-block-sections_1.ll
2

x86_64-* -> x86_64

snehasish updated this revision to Diff 303943.Nov 9 2020, 11:11 AM

Check addresses as well, simplify triple.

snehasish marked an inline comment as done.Nov 9 2020, 11:24 AM

Thanks for the review David. I've added the addresses to the test for now. Extending the verbose output for dwarfdump seems like a good idea, we will look into adding that in the future.

This revision was landed with ongoing or failed builds.Nov 9 2020, 12:21 PM
This revision was automatically updated to reflect the committed changes.