diff options
author | Tim Northover <t.p.northover@gmail.com> | 2013-05-19 09:55:06 +0000 |
---|---|---|
committer | Tim Northover <t.p.northover@gmail.com> | 2013-05-19 09:55:06 +0000 |
commit | 79ab7f736fd267665e8b5677f73add15e8c7a7c6 (patch) | |
tree | e6ed6634df5d0e29614c89e52166b3d31e3c8824 | |
parent | 10bb5b90edb6702db64a037c6ed3ac6a11b265c8 (diff) | |
download | bcm5719-llvm-79ab7f736fd267665e8b5677f73add15e8c7a7c6.tar.gz bcm5719-llvm-79ab7f736fd267665e8b5677f73add15e8c7a7c6.zip |
Print uint64_t -debug text correctly on 32-bit hosts
On 32-bit hosts %p can print garbage when given a uint64_t, we should
use %llx instead. This only affects the output of the debugging text
produced by lli.
llvm-svn: 182209
-rw-r--r-- | llvm/tools/lli/lli.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/tools/lli/lli.cpp b/llvm/tools/lli/lli.cpp index ac7db20aed8..031f945abae 100644 --- a/llvm/tools/lli/lli.cpp +++ b/llvm/tools/lli/lli.cpp @@ -254,7 +254,7 @@ void layoutRemoteTargetMemory(RemoteTarget *T, RecordingMemoryManager *JMM) { EE->mapSectionAddress(const_cast<void*>(Offsets[i].first), Addr); DEBUG(dbgs() << " Mapping local: " << Offsets[i].first - << " to remote: " << format("%p", Addr) << "\n"); + << " to remote: 0x" << format("%llx", Addr) << "\n"); } @@ -269,12 +269,12 @@ void layoutRemoteTargetMemory(RemoteTarget *T, RecordingMemoryManager *JMM) { T->loadCode(Addr, Offsets[i].first, Sizes[i]); DEBUG(dbgs() << " loading code: " << Offsets[i].first - << " to remote: " << format("%p", Addr) << "\n"); + << " to remote: 0x" << format("%llx", Addr) << "\n"); } else { T->loadData(Addr, Offsets[i].first, Sizes[i]); DEBUG(dbgs() << " loading data: " << Offsets[i].first - << " to remote: " << format("%p", Addr) << "\n"); + << " to remote: 0x" << format("%llx", Addr) << "\n"); } } @@ -483,8 +483,8 @@ int main(int argc, char **argv, char * const *envp) { // FIXME: argv and envp handling. uint64_t Entry = (uint64_t)EE->getPointerToFunction(EntryFn); - DEBUG(dbgs() << "Executing '" << EntryFn->getName() << "' at " - << format("%p", Entry) << "\n"); + DEBUG(dbgs() << "Executing '" << EntryFn->getName() << "' at 0x" + << format("%llx", Entry) << "\n"); if (Target.executeCode(Entry, Result)) errs() << "ERROR: " << Target.getErrorMsg() << "\n"; |