1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/lib/DebugInfo/DWARF
Pavel Labath c8fe2424ea DWARFAcceleratorTable: fix equal_range iterators
Summary:
Both (Apple and DWARF5) implementations of the iterators had bugs which
resulted in crashes if one attempted to iterate through the accelerator
tables all the way.

For the Apple tables, the issue was that we did not clear the DataOffset
field when we reached the end, which made our iterator compare unequal
to the "end" iterator. For the Dwarf5 tables, the problem was that we
incremented the CurrentIndex pointer and then used the incremented
(possibly invalid) pointer to check whether we have reached the end of
the index list.

The reason these bugs went undetected is because their only user
(dwarfdump) only ever searched for the first match. Besides allowing us
to test this fix, changing llvm-dwarfdump --find to display all matches
seems like a good improvement (it makes the behavior consistent with the
--name option), so I change llvm-dwarfdump to do that.

The existing tests would be sufficient to test this fix with the new
llvm-dwarfdump behavior, but I add a special test that demonstrates that
the tool indeed displays multiple results. The find.test test needed to
be tweaked a bit as the tool now does not print the ".debug_info
contents" header (also consistent with how --name works).

Reviewers: JDevlieghere, aprantl, dblaikie

Subscribers: mgrang, llvm-commits

Differential Revision: https://reviews.llvm.org/D47543

llvm-svn: 333635
2018-05-31 08:47:00 +00:00
..
CMakeLists.txt [Support] Move syntax highlighting into support 2018-03-09 09:56:24 +00:00
DWARFAbbreviationDeclaration.cpp [dwarf] Unify unknown dwarf enum formatting code 2018-03-21 11:46:37 +00:00
DWARFAcceleratorTable.cpp DWARFAcceleratorTable: fix equal_range iterators 2018-05-31 08:47:00 +00:00
DWARFAddressRange.cpp [DWARF v5] Support for verbose dumping of .debug_rnglist entries 2018-03-08 20:52:35 +00:00
DWARFCompileUnit.cpp [DWARFv5] Put the DWO ID in its place. 2018-05-22 17:27:31 +00:00
DWARFContext.cpp [DWARFv5] Put the DWO ID in its place. 2018-05-22 17:27:31 +00:00
DWARFDataExtractor.cpp Reland "[DebugInfo] Support DWARF expressions in eh_frame" 2018-03-08 00:46:53 +00:00
DWARFDebugAbbrev.cpp dwarfdump: Delay parsing abbreviations until they're needed 2017-09-19 15:13:55 +00:00
DWARFDebugAranges.cpp [DebugInfo] Change std::sort to llvm::sort in response to r327219 2018-04-01 16:18:49 +00:00
DWARFDebugArangeSet.cpp [DebugInfo] Unify dumping of address ranges 2018-01-16 11:17:57 +00:00
DWARFDebugFrame.cpp [DebugInfo] Accept S in augmentation strings in CIE. 2018-05-08 06:21:12 +00:00
DWARFDebugInfoEntry.cpp [DWARF] NFC: DWARFDataExtractor combines relocs with DataExtractor. 2017-06-29 16:52:08 +00:00
DWARFDebugLine.cpp [DWARF] Refactor callback usage for .debug_line error handling 2018-05-21 15:30:54 +00:00
DWARFDebugLoc.cpp [DebugInfo] Use absolute addresses in location lists 2018-05-21 19:36:54 +00:00
DWARFDebugMacro.cpp [Support] Move syntax highlighting into support 2018-03-09 09:56:24 +00:00
DWARFDebugPubTable.cpp llvm-dwarfdump: Factor out the printing of the section header (NFC) 2017-09-15 17:39:50 +00:00
DWARFDebugRangeList.cpp [DWARF v5] Add limited support for dumping .debug_rnglists 2018-02-02 12:35:52 +00:00
DWARFDebugRnglists.cpp Fixing buildbot error introduced with r332759. 2018-05-18 21:44:28 +00:00
DWARFDie.cpp [dwarfdump] Make -c and -p work together 2018-05-26 19:39:56 +00:00
DWARFExpression.cpp Reland "[DebugInfo] Support DWARF expressions in eh_frame" 2018-03-08 00:46:53 +00:00
DWARFFormValue.cpp [DWARF v5] Improved support for .debug_rnglists (consumer). Enables any consumer to 2018-05-18 20:12:54 +00:00
DWARFGdbIndex.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
DWARFTypeUnit.cpp [DWARF] Factor out a DWARFUnitHeader class. NFC 2018-05-14 20:32:31 +00:00
DWARFUnit.cpp [DWARFv5] Put the DWO ID in its place. 2018-05-22 17:27:31 +00:00
DWARFUnitIndex.cpp dwarfdump/symbolizer: Avoid loading unneeded CUs from a DWP 2017-09-19 18:36:11 +00:00
DWARFVerifier.cpp [DebugInfo] Invert DIE order for range errors. 2018-05-22 17:38:03 +00:00
LLVMBuild.txt [dwarfdump] Pretty print location expressions and location lists 2017-08-29 21:41:21 +00:00