mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-31 07:43:37 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182209 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6d65f333a3
commit
a73a6141ca
@ -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";
|
||||
|
Loading…
x
Reference in New Issue
Block a user