[llvm] r346715 - [DWARF] Do not use PRIx32 for printing uint64_t values
Simon Atanasyan via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 12 14:43:17 PST 2018
Author: atanasyan
Date: Mon Nov 12 14:43:17 2018
New Revision: 346715
URL: http://llvm.org/viewvc/llvm-project?rev=346715&view=rev
Log:
[DWARF] Do not use PRIx32 for printing uint64_t values
The `DWARFDebugAddrTable::dump` routine prints 32/64-bits addresses.
These values are stored in a vector of `uint64_t` independently of their
original sizes. But `format` function gets format string with PRIx32
suffix in case of 32-bit address size. At least on MIPS 32-bit targets
that leads to incorrect output.
This patch changes formats strings and always use PRIx64 to print
`uint64_t` values.
Differential Revision: http://reviews.llvm.org/D54424
Modified:
llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugAddr.cpp
Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugAddr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugAddr.cpp?rev=346715&r1=346714&r2=346715&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugAddr.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugAddr.cpp Mon Nov 12 14:43:17 2018
@@ -148,7 +148,7 @@ void DWARFDebugAddrTable::dump(raw_ostre
HeaderData.Length, HeaderData.Version, HeaderData.AddrSize,
HeaderData.SegSize);
- static const char *Fmt32 = "0x%8.8" PRIx32;
+ static const char *Fmt32 = "0x%8.8" PRIx64;
static const char *Fmt64 = "0x%16.16" PRIx64;
std::string AddrFmt = "\n";
std::string AddrFmtVerbose = " => ";
More information about the llvm-commits
mailing list