[PATCH] D42481: [DebugInfo] Add basic support for DWARF 5 .debug_rnglists dumping
Jonas Devlieghere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 25 06:42:48 PST 2018
JDevlieghere added inline comments.
================
Comment at: include/llvm/DebugInfo/DWARF/DWARFDebugRnglists.h:23
+public:
+ struct BoundedRange {
+ uint64_t Start;
----------------
As this is so similar to `DWARFAddressRange` it would be nice if we could reuse that in some way. We already have infrastructure to verify these entries for things like overlap that we might want to reuse in the verifier.
================
Comment at: lib/DebugInfo/DWARF/DWARFContext.cpp:488
+ isLittleEndian(), 0);
+ DWARFDebugRnglists Set;
+ uint32_t Offset = 0;
----------------
Set?
================
Comment at: lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp:23
+
+bool DWARFDebugRnglists::extract(DWARFDataExtractor Data, uint32_t *OffsetPtr) {
+ clear();
----------------
Let's return an LLVM error instead of a bool so we can convey a useful error message to the caller.
================
Comment at: lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp:109
+ OS << "Offsets: [";
+ for (const auto &Off : Offsets) {
+ OS << format("\n0x%8.8x", Off);
----------------
LLVM Coding standard says no braces around single line if/for
================
Comment at: lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp:117
+ const uint32_t HexWidth = HeaderData.AddrSize * 2;
+ for (const auto &List : Ranges) {
+ for (const auto &Entry : List) {
----------------
Same here and on the next line.
Repository:
rL LLVM
https://reviews.llvm.org/D42481
More information about the llvm-commits
mailing list