[Lldb-commits] [PATCH] D107470: [llvm+lldb] Remove dead-code in DWARFListTableHeader::extract modifying DWARFDataExtractor
Igor Kudrin via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 16 05:55:14 PDT 2021
ikudrin added a comment.
`DWARFDebugInfo.TestRnglistsAddressSize`, `DWARFListTableHeader.AddressSize64Offset`, and `DWARFListTableHeader.AddressSize32Offset` pass without applying the patch. Why adding them?
================
Comment at: llvm/unittests/DebugInfo/DWARF/DWARFListTableTest.cpp:123
+ llvm::Error E = Table.extractHeaderAndOffsets(Extractor, &Offset);
+ EXPECT_FALSE(!!E);
+ EXPECT_EQ(Offset, 12U);
----------------
The rest of the test makes no sense if `extractHeaderAndOffsets()` returns an error.
================
Comment at: llvm/unittests/DebugInfo/DWARF/DWARFListTableTest.cpp:129-130
+ Expected<DWARFDebugRnglist> List = Table.findList(Extractor, Offset);
+ EXPECT_TRUE(!!List);
+ EXPECT_EQ(List->getEntries().size(), 2U);
+ EXPECT_EQ(List->getEntries()[0].Offset, 12 + 0U);
----------------
If these checks fail, the execution of the test should be terminated.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107470/new/
https://reviews.llvm.org/D107470
More information about the lldb-commits
mailing list