Fix more print format specifiers in debug_rnglists dumping
authorJames Henderson <jh7370@my.bristol.ac.uk>
Mon, 5 Feb 2018 10:47:13 +0000 (10:47 +0000)
committerJames Henderson <jh7370@my.bristol.ac.uk>
Mon, 5 Feb 2018 10:47:13 +0000 (10:47 +0000)
See also r324096.

I have made the assumption that DWARF64 is not an issue for the time
being with these fixes.

llvm-svn: 324223

llvm/include/llvm/DebugInfo/DWARF/DWARFDebugRnglists.h
llvm/lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp

index c400352..19d8dd1 100644 (file)
@@ -40,7 +40,7 @@ private:
   };
 
   Header HeaderData;
-  std::vector<uint64_t> Offsets;
+  std::vector<uint32_t> Offsets;
   std::vector<DWARFAddressRangesVector> Ranges;
 
 public:
index 28394f6..802fb7e 100644 (file)
@@ -161,16 +161,18 @@ Error DWARFDebugRnglists::extract(DWARFDataExtractor Data,
 
 void DWARFDebugRnglists::dump(raw_ostream &OS) const {
   // TODO: Add verbose printing of the raw encodings.
-  OS << format("Range List Header: length = 0x%8.8x, version = 0x%4.4x, "
-               "addr_size = 0x%2.2x, seg_size = 0x%2.2x, offset_entry_count = "
-               "0x%8.8x\n",
+  OS << format("Range List Header: length = 0x%8.8" PRIx32
+               ", version = 0x%4.4" PRIx16 ", "
+               "addr_size = 0x%2.2" PRIx8 ", seg_size = 0x%2.2" PRIx8
+               ", offset_entry_count = "
+               "0x%8.8" PRIx32 "\n",
                HeaderData.Length, HeaderData.Version, HeaderData.AddrSize,
                HeaderData.SegSize, HeaderData.OffsetEntryCount);
 
   if (HeaderData.OffsetEntryCount > 0) {
     OS << "Offsets: [";
     for (const auto &Off : Offsets)
-      OS << format("\n0x%8.8x", Off);
+      OS << format("\n0x%8.8" PRIx32, Off);
     OS << "\n]\n";
   }
   OS << "Ranges:\n";