summaryrefslogtreecommitdiffstats
path: root/lldb/source
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/API/SBAddress.cpp2
-rw-r--r--lldb/source/API/SBBlock.cpp2
-rw-r--r--lldb/source/API/SBBreakpoint.cpp10
-rw-r--r--lldb/source/API/SBCommandInterpreter.cpp2
-rw-r--r--lldb/source/API/SBCommunication.cpp6
-rw-r--r--lldb/source/API/SBData.cpp4
-rw-r--r--lldb/source/API/SBDebugger.cpp4
-rw-r--r--lldb/source/API/SBFileSpec.cpp2
-rw-r--r--lldb/source/API/SBFrame.cpp8
-rw-r--r--lldb/source/API/SBFunction.cpp2
-rw-r--r--lldb/source/API/SBProcess.cpp28
-rw-r--r--lldb/source/API/SBSection.cpp2
-rw-r--r--lldb/source/API/SBTarget.cpp8
-rw-r--r--lldb/source/API/SBThread.cpp4
-rw-r--r--lldb/source/API/SBValue.cpp6
-rw-r--r--lldb/source/Breakpoint/Breakpoint.cpp4
-rw-r--r--lldb/source/Breakpoint/BreakpointLocation.cpp4
-rw-r--r--lldb/source/Breakpoint/BreakpointLocationList.cpp2
-rw-r--r--lldb/source/Breakpoint/BreakpointResolverFileLine.cpp4
-rw-r--r--lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp4
-rw-r--r--lldb/source/Breakpoint/BreakpointSite.cpp4
-rw-r--r--lldb/source/Breakpoint/BreakpointSiteList.cpp4
-rw-r--r--lldb/source/Breakpoint/Watchpoint.cpp2
-rw-r--r--lldb/source/Breakpoint/WatchpointList.cpp2
-rw-r--r--lldb/source/Commands/CommandObjectDisassemble.cpp4
-rw-r--r--lldb/source/Commands/CommandObjectMemory.cpp34
-rw-r--r--lldb/source/Commands/CommandObjectPlatform.cpp6
-rw-r--r--lldb/source/Commands/CommandObjectProcess.cpp14
-rw-r--r--lldb/source/Commands/CommandObjectTarget.cpp26
-rw-r--r--lldb/source/Commands/CommandObjectThread.cpp14
-rw-r--r--lldb/source/Commands/CommandObjectWatchpoint.cpp4
-rw-r--r--lldb/source/Core/Address.cpp6
-rw-r--r--lldb/source/Core/AddressRange.cpp2
-rw-r--r--lldb/source/Core/AddressResolverFileLine.cpp2
-rw-r--r--lldb/source/Core/CXXFormatterFunctions.cpp20
-rw-r--r--lldb/source/Core/Communication.cpp6
-rw-r--r--lldb/source/Core/ConnectionFileDescriptor.cpp12
-rw-r--r--lldb/source/Core/ConstString.cpp2
-rw-r--r--lldb/source/Core/DataBufferMemoryMap.cpp2
-rw-r--r--lldb/source/Core/DataExtractor.cpp28
-rw-r--r--lldb/source/Core/Debugger.cpp22
-rw-r--r--lldb/source/Core/EmulateInstruction.cpp16
-rw-r--r--lldb/source/Core/History.cpp3
-rw-r--r--lldb/source/Core/Log.cpp4
-rw-r--r--lldb/source/Core/Module.cpp6
-rw-r--r--lldb/source/Core/Opcode.cpp2
-rw-r--r--lldb/source/Core/RegisterValue.cpp4
-rw-r--r--lldb/source/Core/Scalar.cpp5
-rw-r--r--lldb/source/Core/Section.cpp10
-rw-r--r--lldb/source/Core/Stream.cpp12
-rw-r--r--lldb/source/Core/UserID.cpp4
-rw-r--r--lldb/source/Core/Value.cpp14
-rw-r--r--lldb/source/Expression/ClangASTSource.cpp8
-rw-r--r--lldb/source/Expression/ClangExpressionDeclMap.cpp8
-rw-r--r--lldb/source/Expression/ClangExpressionParser.cpp4
-rw-r--r--lldb/source/Expression/ClangFunction.cpp4
-rw-r--r--lldb/source/Expression/ClangUserExpression.cpp8
-rw-r--r--lldb/source/Expression/ClangUtilityFunction.cpp2
-rw-r--r--lldb/source/Expression/DWARFExpression.cpp46
-rw-r--r--lldb/source/Expression/IRForTarget.cpp14
-rw-r--r--lldb/source/Expression/IRInterpreter.cpp2
-rw-r--r--lldb/source/Expression/RecordingMemoryManager.cpp8
-rw-r--r--lldb/source/Host/common/Host.cpp6
-rw-r--r--lldb/source/Host/common/Mutex.cpp8
-rw-r--r--lldb/source/Host/linux/Host.cpp2
-rw-r--r--lldb/source/Interpreter/OptionValueArray.cpp4
-rw-r--r--lldb/source/Interpreter/OptionValueEnumeration.cpp2
-rw-r--r--lldb/source/Interpreter/OptionValueSInt64.cpp6
-rw-r--r--lldb/source/Interpreter/OptionValueUInt64.cpp2
-rw-r--r--lldb/source/Interpreter/ScriptInterpreterPython.cpp10
-rw-r--r--lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp22
-rw-r--r--lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp6
-rw-r--r--lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp4
-rw-r--r--lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp10
-rw-r--r--lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp20
-rw-r--r--lldb/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp2
-rw-r--r--lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp18
-rw-r--r--lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp12
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp4
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp6
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp10
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp6
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp10
-rw-r--r--lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp2
-rw-r--r--lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp18
-rw-r--r--lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp10
-rw-r--r--lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp8
-rw-r--r--lldb/source/Plugins/Process/Linux/ProcessLinux.cpp4
-rw-r--r--lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp10
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp12
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp18
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp2
-rw-r--r--lldb/source/Plugins/Process/POSIX/POSIXThread.cpp4
-rw-r--r--lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp10
-rw-r--r--lldb/source/Plugins/Process/POSIX/RegisterContext_i386.cpp2
-rw-r--r--lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp2
-rw-r--r--lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp18
-rw-r--r--lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp6
-rw-r--r--lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp2
-rw-r--r--lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp2
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp6
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp22
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp6
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp16
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp68
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp2
-rw-r--r--lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp10
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp2
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp6
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp4
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp10
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp4
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp8
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationDescription.cpp22
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp52
-rw-r--r--lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp4
-rw-r--r--lldb/source/Symbol/Block.cpp8
-rw-r--r--lldb/source/Symbol/ClangASTImporter.cpp8
-rw-r--r--lldb/source/Symbol/ClangASTType.cpp4
-rw-r--r--lldb/source/Symbol/CompileUnit.cpp2
-rw-r--r--lldb/source/Symbol/Function.cpp4
-rw-r--r--lldb/source/Symbol/ObjectFile.cpp10
-rw-r--r--lldb/source/Symbol/Symbol.cpp12
-rw-r--r--lldb/source/Symbol/SymbolContext.cpp12
-rw-r--r--lldb/source/Symbol/Type.cpp4
-rw-r--r--lldb/source/Symbol/UnwindPlan.cpp4
-rw-r--r--lldb/source/Symbol/UnwindTable.cpp2
-rw-r--r--lldb/source/Target/Memory.cpp10
-rw-r--r--lldb/source/Target/ObjCLanguageRuntime.cpp2
-rw-r--r--lldb/source/Target/Process.cpp80
-rw-r--r--lldb/source/Target/SectionLoadList.cpp8
-rw-r--r--lldb/source/Target/StackFrame.cpp2
-rw-r--r--lldb/source/Target/StackFrameList.cpp4
-rw-r--r--lldb/source/Target/StackID.cpp4
-rw-r--r--lldb/source/Target/StopInfo.cpp16
-rw-r--r--lldb/source/Target/Target.cpp20
-rw-r--r--lldb/source/Target/Thread.cpp42
-rw-r--r--lldb/source/Target/ThreadList.cpp8
-rw-r--r--lldb/source/Target/ThreadPlan.cpp2
-rw-r--r--lldb/source/Target/ThreadPlanBase.cpp6
-rw-r--r--lldb/source/Target/ThreadPlanCallFunction.cpp8
-rw-r--r--lldb/source/Target/ThreadPlanShouldStopHere.cpp4
-rw-r--r--lldb/source/Target/ThreadPlanStepOut.cpp2
-rw-r--r--lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp2
-rw-r--r--lldb/source/Target/ThreadPlanStepRange.cpp2
-rw-r--r--lldb/source/Target/ThreadPlanStepThrough.cpp6
-rw-r--r--lldb/source/Target/ThreadPlanStepUntil.cpp8
-rw-r--r--lldb/source/Target/ThreadSpec.cpp2
148 files changed, 682 insertions, 676 deletions
diff --git a/lldb/source/API/SBAddress.cpp b/lldb/source/API/SBAddress.cpp
index 39b613bd321..8c4f5f1b66c 100644
--- a/lldb/source/API/SBAddress.cpp
+++ b/lldb/source/API/SBAddress.cpp
@@ -133,7 +133,7 @@ SBAddress::GetLoadAddress (const SBTarget &target) const
if (addr == LLDB_INVALID_ADDRESS)
log->Printf ("SBAddress::GetLoadAddress (SBTarget(%p)) => LLDB_INVALID_ADDRESS", target_sp.get());
else
- log->Printf ("SBAddress::GetLoadAddress (SBTarget(%p)) => 0x%llx", target_sp.get(), addr);
+ log->Printf ("SBAddress::GetLoadAddress (SBTarget(%p)) => 0x%" PRIx64, target_sp.get(), addr);
}
return addr;
diff --git a/lldb/source/API/SBBlock.cpp b/lldb/source/API/SBBlock.cpp
index 91324ed8538..c8a665f7d6f 100644
--- a/lldb/source/API/SBBlock.cpp
+++ b/lldb/source/API/SBBlock.cpp
@@ -183,7 +183,7 @@ SBBlock::GetDescription (SBStream &description)
if (m_opaque_ptr)
{
lldb::user_id_t id = m_opaque_ptr->GetID();
- strm.Printf ("Block: {id: %llu} ", id);
+ strm.Printf ("Block: {id: %" PRIu64 "} ", id);
if (IsInlined())
{
strm.Printf (" (inlined, '%s') ", GetInlinedName());
diff --git a/lldb/source/API/SBBreakpoint.cpp b/lldb/source/API/SBBreakpoint.cpp
index b0b1e2a042b..f0e29176a9e 100644
--- a/lldb/source/API/SBBreakpoint.cpp
+++ b/lldb/source/API/SBBreakpoint.cpp
@@ -353,7 +353,7 @@ SBBreakpoint::SetThreadID (tid_t tid)
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
- log->Printf ("SBBreakpoint(%p)::SetThreadID (tid=0x%4.4llx)", m_opaque_sp.get(), tid);
+ log->Printf ("SBBreakpoint(%p)::SetThreadID (tid=0x%4.4" PRIx64 ")", m_opaque_sp.get(), tid);
}
@@ -369,7 +369,7 @@ SBBreakpoint::GetThreadID ()
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
- log->Printf ("SBBreakpoint(%p)::GetThreadID () => 0x%4.4llx", m_opaque_sp.get(), tid);
+ log->Printf ("SBBreakpoint(%p)::GetThreadID () => 0x%4.4" PRIx64, m_opaque_sp.get(), tid);
return tid;
}
@@ -479,7 +479,7 @@ SBBreakpoint::GetNumResolvedLocations() const
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
- log->Printf ("SBBreakpoint(%p)::GetNumResolvedLocations () => %llu", m_opaque_sp.get(), (uint64_t)num_resolved);
+ log->Printf ("SBBreakpoint(%p)::GetNumResolvedLocations () => %" PRIu64, m_opaque_sp.get(), (uint64_t)num_resolved);
return num_resolved;
}
@@ -494,7 +494,7 @@ SBBreakpoint::GetNumLocations() const
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
- log->Printf ("SBBreakpoint(%p)::GetNumLocations () => %llu", m_opaque_sp.get(), (uint64_t)num_locs);
+ log->Printf ("SBBreakpoint(%p)::GetNumLocations () => %" PRIu64, m_opaque_sp.get(), (uint64_t)num_locs);
return num_locs;
}
@@ -508,7 +508,7 @@ SBBreakpoint::GetDescription (SBStream &s)
m_opaque_sp->GetResolverDescription (s.get());
m_opaque_sp->GetFilterDescription (s.get());
const size_t num_locations = m_opaque_sp->GetNumLocations ();
- s.Printf(", locations = %llu", (uint64_t)num_locations);
+ s.Printf(", locations = %" PRIu64, (uint64_t)num_locations);
return true;
}
s.Printf ("No value");
diff --git a/lldb/source/API/SBCommandInterpreter.cpp b/lldb/source/API/SBCommandInterpreter.cpp
index 3f22a177a72..15ffe658d82 100644
--- a/lldb/source/API/SBCommandInterpreter.cpp
+++ b/lldb/source/API/SBCommandInterpreter.cpp
@@ -166,7 +166,7 @@ SBCommandInterpreter::HandleCompletion (const char *current_line,
return 0;
if (log)
- log->Printf ("SBCommandInterpreter(%p)::HandleCompletion (current_line=\"%s\", cursor at: %lld, last char at: %lld, match_start_point: %d, max_return_elements: %d)",
+ log->Printf ("SBCommandInterpreter(%p)::HandleCompletion (current_line=\"%s\", cursor at: %" PRId64 ", last char at: %" PRId64 ", match_start_point: %d, max_return_elements: %d)",
m_opaque_ptr, current_line, (uint64_t) (cursor - current_line), (uint64_t) (last_char - current_line), match_start_point, max_return_elements);
if (m_opaque_ptr)
diff --git a/lldb/source/API/SBCommunication.cpp b/lldb/source/API/SBCommunication.cpp
index 80f557c15bb..f96a064c6e2 100644
--- a/lldb/source/API/SBCommunication.cpp
+++ b/lldb/source/API/SBCommunication.cpp
@@ -139,7 +139,7 @@ SBCommunication::Read (void *dst, size_t dst_len, uint32_t timeout_usec, Connect
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
- log->Printf ("SBCommunication(%p)::Read (dst=%p, dst_len=%llu, timeout_usec=%u, &status)...",
+ log->Printf ("SBCommunication(%p)::Read (dst=%p, dst_len=%" PRIu64 ", timeout_usec=%u, &status)...",
m_opaque,
dst,
(uint64_t)dst_len,
@@ -151,7 +151,7 @@ SBCommunication::Read (void *dst, size_t dst_len, uint32_t timeout_usec, Connect
status = eConnectionStatusNoConnection;
if (log)
- log->Printf ("SBCommunication(%p)::Read (dst=%p, dst_len=%llu, timeout_usec=%u, &status=%s) => %llu",
+ log->Printf ("SBCommunication(%p)::Read (dst=%p, dst_len=%" PRIu64 ", timeout_usec=%u, &status=%s) => %" PRIu64,
m_opaque,
dst,
(uint64_t)dst_len,
@@ -173,7 +173,7 @@ SBCommunication::Write (const void *src, size_t src_len, ConnectionStatus &statu
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
- log->Printf ("SBCommunication(%p)::Write (src=%p, src_len=%llu, &status=%s) => %llu",
+ log->Printf ("SBCommunication(%p)::Write (src=%p, src_len=%" PRIu64 ", &status=%s) => %" PRIu64,
m_opaque, src, (uint64_t)src_len, Communication::ConnectionStatusAsCString (status), (uint64_t)bytes_written);
return 0;
diff --git a/lldb/source/API/SBData.cpp b/lldb/source/API/SBData.cpp
index 60b451cc42d..9f9bc4f5b63 100644
--- a/lldb/source/API/SBData.cpp
+++ b/lldb/source/API/SBData.cpp
@@ -322,7 +322,7 @@ SBData::GetUnsignedInt64 (lldb::SBError& error, uint32_t offset)
}
if (log)
log->Printf ("SBData::GetUnsignedInt64 (error=%p,offset=%d) => "
- "(%lld)", error.get(), offset, value);
+ "(%" PRId64 ")", error.get(), offset, value);
return value;
}
@@ -410,7 +410,7 @@ SBData::GetSignedInt64 (lldb::SBError& error, uint32_t offset)
}
if (log)
log->Printf ("SBData::GetSignedInt64 (error=%p,offset=%d) => "
- "(%lld)", error.get(), offset, value);
+ "(%" PRId64 ")", error.get(), offset, value);
return value;
}
diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp
index 94af6799b84..af9447a7e18 100644
--- a/lldb/source/API/SBDebugger.cpp
+++ b/lldb/source/API/SBDebugger.cpp
@@ -800,7 +800,7 @@ SBDebugger::DispatchInput (const void *data, size_t data_len)
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
- log->Printf ("SBDebugger(%p)::DispatchInput (data=\"%.*s\", size_t=%llu)",
+ log->Printf ("SBDebugger(%p)::DispatchInput (data=\"%.*s\", size_t=%" PRIu64 ")",
m_opaque_sp.get(),
(int) data_len,
(const char *) data,
@@ -1049,7 +1049,7 @@ SBDebugger::GetDescription (SBStream &description)
{
const char *name = m_opaque_sp->GetInstanceName().AsCString();
user_id_t id = m_opaque_sp->GetID();
- strm.Printf ("Debugger (instance: \"%s\", id: %llu)", name, id);
+ strm.Printf ("Debugger (instance: \"%s\", id: %" PRIu64 ")", name, id);
}
else
strm.PutCString ("No value");
diff --git a/lldb/source/API/SBFileSpec.cpp b/lldb/source/API/SBFileSpec.cpp
index d494846687e..cabf0905481 100644
--- a/lldb/source/API/SBFileSpec.cpp
+++ b/lldb/source/API/SBFileSpec.cpp
@@ -154,7 +154,7 @@ SBFileSpec::GetPath (char *dst_path, size_t dst_len) const
result = m_opaque_ap->GetPath (dst_path, dst_len);
if (log)
- log->Printf ("SBFileSpec(%p)::GetPath (dst_path=\"%.*s\", dst_len=%llu) => %u",
+ log->Printf ("SBFileSpec(%p)::GetPath (dst_path=\"%.*s\", dst_len=%" PRIu64 ") => %u",
m_opaque_ap.get(), result, dst_path, (uint64_t)dst_len, result);
if (result == 0 && dst_path && dst_len > 0)
diff --git a/lldb/source/API/SBFrame.cpp b/lldb/source/API/SBFrame.cpp
index 87c1f221cd8..8b7cacca988 100644
--- a/lldb/source/API/SBFrame.cpp
+++ b/lldb/source/API/SBFrame.cpp
@@ -478,7 +478,7 @@ SBFrame::GetPC () const
}
if (log)
- log->Printf ("SBFrame(%p)::GetPC () => 0x%llx", frame, addr);
+ log->Printf ("SBFrame(%p)::GetPC () => 0x%" PRIx64, frame, addr);
return addr;
}
@@ -518,7 +518,7 @@ SBFrame::SetPC (addr_t new_pc)
}
if (log)
- log->Printf ("SBFrame(%p)::SetPC (new_pc=0x%llx) => %i",
+ log->Printf ("SBFrame(%p)::SetPC (new_pc=0x%" PRIx64 ") => %i",
frame, new_pc, ret_val);
return ret_val;
@@ -558,7 +558,7 @@ SBFrame::GetSP () const
}
}
if (log)
- log->Printf ("SBFrame(%p)::GetSP () => 0x%llx", frame, addr);
+ log->Printf ("SBFrame(%p)::GetSP () => 0x%" PRIx64, frame, addr);
return addr;
}
@@ -599,7 +599,7 @@ SBFrame::GetFP () const
}
if (log)
- log->Printf ("SBFrame(%p)::GetFP () => 0x%llx", frame, addr);
+ log->Printf ("SBFrame(%p)::GetFP () => 0x%" PRIx64, frame, addr);
return addr;
}
diff --git a/lldb/source/API/SBFunction.cpp b/lldb/source/API/SBFunction.cpp
index 7ac447e5f1b..028725cbae2 100644
--- a/lldb/source/API/SBFunction.cpp
+++ b/lldb/source/API/SBFunction.cpp
@@ -107,7 +107,7 @@ SBFunction::GetDescription (SBStream &s)
{
if (m_opaque_ptr)
{
- s.Printf ("SBFunction: id = 0x%8.8llx, name = %s",
+ s.Printf ("SBFunction: id = 0x%8.8" PRIx64 ", name = %s",
m_opaque_ptr->GetID(),
m_opaque_ptr->GetName().AsCString());
Type *func_type = m_opaque_ptr->GetType();
diff --git a/lldb/source/API/SBProcess.cpp b/lldb/source/API/SBProcess.cpp
index 65adbeef0b6..9b1dff03560 100644
--- a/lldb/source/API/SBProcess.cpp
+++ b/lldb/source/API/SBProcess.cpp
@@ -224,7 +224,7 @@ SBProcess::RemoteAttachToProcessWithID (lldb::pid_t pid, lldb::SBError& error)
if (log) {
SBStream sstr;
error.GetDescription (sstr);
- log->Printf ("SBProcess(%p)::RemoteAttachToProcessWithID (%llu) => SBError (%p): %s", process_sp.get(), pid, error.get(), sstr.GetData());
+ log->Printf ("SBProcess(%p)::RemoteAttachToProcessWithID (%" PRIu64 ") => SBError (%p): %s", process_sp.get(), pid, error.get(), sstr.GetData());
}
return error.Success();
@@ -333,7 +333,7 @@ SBProcess::GetSTDOUT (char *dst, size_t dst_len) const
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
- log->Printf ("SBProcess(%p)::GetSTDOUT (dst=\"%.*s\", dst_len=%llu) => %llu",
+ log->Printf ("SBProcess(%p)::GetSTDOUT (dst=\"%.*s\", dst_len=%" PRIu64 ") => %" PRIu64,
process_sp.get(),
(int) bytes_read,
dst,
@@ -356,7 +356,7 @@ SBProcess::GetSTDERR (char *dst, size_t dst_len) const
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
- log->Printf ("SBProcess(%p)::GetSTDERR (dst=\"%.*s\", dst_len=%llu) => %llu",
+ log->Printf ("SBProcess(%p)::GetSTDERR (dst=\"%.*s\", dst_len=%" PRIu64 ") => %" PRIu64,
process_sp.get(),
(int) bytes_read,
dst,
@@ -379,7 +379,7 @@ SBProcess::GetAsyncProfileData(char *dst, size_t dst_len) const
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
- log->Printf ("SBProcess(%p)::GetProfileData (dst=\"%.*s\", dst_len=%llu) => %llu",
+ log->Printf ("SBProcess(%p)::GetProfileData (dst=\"%.*s\", dst_len=%" PRIu64 ") => %" PRIu64,
process_sp.get(),
(int) bytes_read,
dst,
@@ -402,7 +402,7 @@ SBProcess::ReportEventState (const SBEvent &event, FILE *out) const
char message[1024];
int message_len = ::snprintf (message,
sizeof (message),
- "Process %llu %s\n",
+ "Process %" PRIu64 " %s\n",
process_sp->GetID(),
SBDebugger::StateAsCString (event_state));
@@ -421,7 +421,7 @@ SBProcess::AppendEventStateReport (const SBEvent &event, SBCommandReturnObject &
char message[1024];
::snprintf (message,
sizeof (message),
- "Process %llu %s\n",
+ "Process %" PRIu64 " %s\n",
process_sp->GetID(),
SBDebugger::StateAsCString (event_state));
@@ -455,7 +455,7 @@ SBProcess::SetSelectedThreadByID (lldb::tid_t tid)
}
if (log)
- log->Printf ("SBProcess(%p)::SetSelectedThreadByID (tid=0x%4.4llx) => %s",
+ log->Printf ("SBProcess(%p)::SetSelectedThreadByID (tid=0x%4.4" PRIx64 ") => %s",
process_sp.get(), tid, (ret_val ? "true" : "false"));
return ret_val;
@@ -574,7 +574,7 @@ SBProcess::GetProcessID ()
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
- log->Printf ("SBProcess(%p)::GetProcessID () => %llu", process_sp.get(), ret_val);
+ log->Printf ("SBProcess(%p)::GetProcessID () => %" PRIu64, process_sp.get(), ret_val);
return ret_val;
}
@@ -802,7 +802,7 @@ SBProcess::GetThreadByID (tid_t tid)
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
- log->Printf ("SBProcess(%p)::GetThreadByID (tid=0x%4.4llx) => SBThread (%p)",
+ log->Printf ("SBProcess(%p)::GetThreadByID (tid=0x%4.4" PRIx64 ") => SBThread (%p)",
process_sp.get(),
tid,
thread_sp.get());
@@ -904,7 +904,7 @@ SBProcess::ReadMemory (addr_t addr, void *dst, size_t dst_len, SBError &sb_error
if (log)
{
- log->Printf ("SBProcess(%p)::ReadMemory (addr=0x%llx, dst=%p, dst_len=%llu, SBError (%p))...",
+ log->Printf ("SBProcess(%p)::ReadMemory (addr=0x%" PRIx64 ", dst=%p, dst_len=%" PRIu64 ", SBError (%p))...",
process_sp.get(),
addr,
dst,
@@ -936,7 +936,7 @@ SBProcess::ReadMemory (addr_t addr, void *dst, size_t dst_len, SBError &sb_error
{
SBStream sstr;
sb_error.GetDescription (sstr);
- log->Printf ("SBProcess(%p)::ReadMemory (addr=0x%llx, dst=%p, dst_len=%llu, SBError (%p): %s) => %llu",
+ log->Printf ("SBProcess(%p)::ReadMemory (addr=0x%" PRIx64 ", dst=%p, dst_len=%" PRIu64 ", SBError (%p): %s) => %" PRIu64,
process_sp.get(),
addr,
dst,
@@ -1044,7 +1044,7 @@ SBProcess::WriteMemory (addr_t addr, const void *src, size_t src_len, SBError &s
if (log)
{
- log->Printf ("SBProcess(%p)::WriteMemory (addr=0x%llx, src=%p, src_len=%llu, SBError (%p))...",
+ log->Printf ("SBProcess(%p)::WriteMemory (addr=0x%" PRIx64 ", src=%p, src_len=%" PRIu64 ", SBError (%p))...",
process_sp.get(),
addr,
src,
@@ -1072,7 +1072,7 @@ SBProcess::WriteMemory (addr_t addr, const void *src, size_t src_len, SBError &s
{
SBStream sstr;
sb_error.GetDescription (sstr);
- log->Printf ("SBProcess(%p)::WriteMemory (addr=0x%llx, src=%p, src_len=%llu, SBError (%p): %s) => %llu",
+ log->Printf ("SBProcess(%p)::WriteMemory (addr=0x%" PRIx64 ", src=%p, src_len=%" PRIu64 ", SBError (%p): %s) => %" PRIu64,
process_sp.get(),
addr,
src,
@@ -1100,7 +1100,7 @@ SBProcess::GetDescription (SBStream &description)
if (exe_module)
exe_name = exe_module->GetFileSpec().GetFilename().AsCString();
- strm.Printf ("SBProcess: pid = %llu, state = %s, threads = %d%s%s",
+ strm.Printf ("SBProcess: pid = %" PRIu64 ", state = %s, threads = %d%s%s",
process_sp->GetID(),
lldb_private::StateAsCString (GetState()),
GetNumThreads(),
diff --git a/lldb/source/API/SBSection.cpp b/lldb/source/API/SBSection.cpp
index 0f55f0169f3..0b98ddb6fcf 100644
--- a/lldb/source/API/SBSection.cpp
+++ b/lldb/source/API/SBSection.cpp
@@ -264,7 +264,7 @@ SBSection::GetDescription (SBStream &description)
if (section_sp)
{
const addr_t file_addr = section_sp->GetFileAddress();
- strm.Printf ("[0x%16.16llx-0x%16.16llx) ", file_addr, file_addr + section_sp->GetByteSize());
+ strm.Printf ("[0x%16.16" PRIx64 "-0x%16.16" PRIx64 ") ", file_addr, file_addr + section_sp->GetByteSize());
section_sp->DumpName(&strm);
}
else
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp
index 071c4b5a983..611da77073c 100644
--- a/lldb/source/API/SBTarget.cpp
+++ b/lldb/source/API/SBTarget.cpp
@@ -876,7 +876,7 @@ SBTarget::Attach (SBAttachInfo &sb_attach_info, SBError& error)
}
else
{
- error.ref().SetErrorStringWithFormat("no process found with process ID %llu", attach_pid);
+ error.ref().SetErrorStringWithFormat("no process found with process ID %" PRIu64, attach_pid);
if (log)
{
log->Printf ("SBTarget(%p)::Attach (...) => error %s",
@@ -944,7 +944,7 @@ SBTarget::AttachToProcessWithID
if (log)
{
- log->Printf ("SBTarget(%p)::AttachToProcessWithID (listener, pid=%lld, error)...", target_sp.get(), pid);
+ log->Printf ("SBTarget(%p)::AttachToProcessWithID (listener, pid=%" PRId64 ", error)...", target_sp.get(), pid);
}
if (target_sp)
@@ -1487,7 +1487,7 @@ SBTarget::BreakpointCreateByAddress (addr_t address)
if (log)
{
- log->Printf ("SBTarget(%p)::BreakpointCreateByAddress (address=%llu) => SBBreakpoint(%p)", target_sp.get(), (uint64_t) address, sb_bp.get());
+ log->Printf ("SBTarget(%p)::BreakpointCreateByAddress (address=%" PRIu64 ") => SBBreakpoint(%p)", target_sp.get(), (uint64_t) address, sb_bp.get());
}
return sb_bp;
@@ -1792,7 +1792,7 @@ SBTarget::WatchAddress (lldb::addr_t addr, size_t size, bool read, bool write, S
if (log)
{
- log->Printf ("SBTarget(%p)::WatchAddress (addr=0x%llx, 0x%u) => SBWatchpoint(%p)",
+ log->Printf ("SBTarget(%p)::WatchAddress (addr=0x%" PRIx64 ", 0x%u) => SBWatchpoint(%p)",
target_sp.get(), addr, (uint32_t) size, watchpoint_sp.get());
}
diff --git a/lldb/source/API/SBThread.cpp b/lldb/source/API/SBThread.cpp
index f895a3d40d1..4dd29d71493 100644
--- a/lldb/source/API/SBThread.cpp
+++ b/lldb/source/API/SBThread.cpp
@@ -715,7 +715,7 @@ SBThread::RunToAddress (lldb::addr_t addr)
if (log)
- log->Printf ("SBThread(%p)::RunToAddress (addr=0x%llx)", exe_ctx.GetThreadPtr(), addr);
+ log->Printf ("SBThread(%p)::RunToAddress (addr=0x%" PRIx64 ")", exe_ctx.GetThreadPtr(), addr);
if (exe_ctx.HasThreadScope())
{
@@ -1185,7 +1185,7 @@ SBThread::GetDescription (SBStream &description) const
ExecutionContext exe_ctx (m_opaque_sp.get());
if (exe_ctx.HasThreadScope())
{
- strm.Printf("SBThread: tid = 0x%4.4llx", exe_ctx.GetThreadPtr()->GetID());
+ strm.Printf("SBThread: tid = 0x%4.4" PRIx64, exe_ctx.GetThreadPtr()->GetID());
}
else
strm.PutCString ("No value");
diff --git a/lldb/source/API/SBValue.cpp b/lldb/source/API/SBValue.cpp
index 2e4be07b1fd..27b4608fc0c 100644
--- a/lldb/source/API/SBValue.cpp
+++ b/lldb/source/API/SBValue.cpp
@@ -301,7 +301,7 @@ SBValue::GetByteSize ()
}
if (log)
- log->Printf ("SBValue(%p)::GetByteSize () => %llu", value_sp.get(), (uint64_t)result);
+ log->Printf ("SBValue(%p)::GetByteSize () => %" PRIu64, value_sp.get(), (uint64_t)result);
return result;
}
@@ -1755,7 +1755,7 @@ SBValue::GetLoadAddress()
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
- log->Printf ("SBValue(%p)::GetLoadAddress () => (%llu)", value_sp.get(), value);
+ log->Printf ("SBValue(%p)::GetLoadAddress () => (%" PRIu64 ")", value_sp.get(), value);
return value;
}
@@ -1792,7 +1792,7 @@ SBValue::GetAddress()
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
- log->Printf ("SBValue(%p)::GetAddress () => (%s,%llu)", value_sp.get(),
+ log->Printf ("SBValue(%p)::GetAddress () => (%s,%" PRIu64 ")", value_sp.get(),
(addr.GetSection() ? addr.GetSection()->GetName().GetCString() : "NULL"),
addr.GetOffset());
return SBAddress(new Address(addr));
diff --git a/lldb/source/Breakpoint/Breakpoint.cpp b/lldb/source/Breakpoint/Breakpoint.cpp
index 0fbf9a7ff4e..0b88625fe9e 100644
--- a/lldb/source/Breakpoint/Breakpoint.cpp
+++ b/lldb/source/Breakpoint/Breakpoint.cpp
@@ -545,9 +545,9 @@ Breakpoint::GetDescription (Stream *s, lldb::DescriptionLevel level, bool show_l
case lldb::eDescriptionLevelFull:
if (num_locations > 0)
{
- s->Printf(", locations = %llu", (uint64_t)num_locations);
+ s->Printf(", locations = %" PRIu64, (uint64_t)num_locations);
if (num_resolved_locations > 0)
- s->Printf(", resolved = %llu", (uint64_t)num_resolved_locations);
+ s->Printf(", resolved = %" PRIu64, (uint64_t)num_resolved_locations);
}
else
{
diff --git a/lldb/source/Breakpoint/BreakpointLocation.cpp b/lldb/source/Breakpoint/BreakpointLocation.cpp
index 202898c19ab..0502ff8c975 100644
--- a/lldb/source/Breakpoint/BreakpointLocation.cpp
+++ b/lldb/source/Breakpoint/BreakpointLocation.cpp
@@ -378,7 +378,7 @@ BreakpointLocation::ResolveBreakpointSite ()
{
LogSP log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS);
if (log)
- log->Warning ("Tried to add breakpoint site at 0x%llx but it was already present.\n",
+ log->Warning ("Tried to add breakpoint site at 0x%" PRIx64 " but it was already present.\n",
m_address.GetOpcodeLoadAddress (&m_owner.GetTarget()));
return false;
}
@@ -537,7 +537,7 @@ BreakpointLocation::Dump(Stream *s) const
if (s == NULL)
return;
- s->Printf("BreakpointLocation %u: tid = %4.4llx load addr = 0x%8.8llx state = %s type = %s breakpoint "
+ s->Printf("BreakpointLocation %u: tid = %4.4" PRIx64 " load addr = 0x%8.8" PRIx64 " state = %s type = %s breakpoint "
"hw_index = %i hit_count = %-4u ignore_count = %-4u",
GetID(),
GetOptionsNoCreate()->GetThreadSpecNoCreate()->GetTID(),
diff --git a/lldb/source/Breakpoint/BreakpointLocationList.cpp b/lldb/source/Breakpoint/BreakpointLocationList.cpp
index 908ed874e70..0034a9241b8 100644
--- a/lldb/source/Breakpoint/BreakpointLocationList.cpp
+++ b/lldb/source/Breakpoint/BreakpointLocationList.cpp
@@ -128,7 +128,7 @@ BreakpointLocationList::Dump (Stream *s) const
s->Printf("%p: ", this);
//s->Indent();
Mutex::Locker locker (m_mutex);
- s->Printf("BreakpointLocationList with %llu BreakpointLocations:\n", (uint64_t)m_locations.size());
+ s->Printf("BreakpointLocationList with %" PRIu64 " BreakpointLocations:\n", (uint64_t)m_locations.size());
s->IndentMore();
collection::const_iterator pos, end = m_locations.end();
for (pos = m_locations.begin(); pos != end; ++pos)
diff --git a/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp b/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
index 45d54e73f3d..6231bce6589 100644
--- a/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
+++ b/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
@@ -174,7 +174,7 @@ BreakpointResolverFileLine::SearchCallback
}
else if (log)
{
- log->Printf ("Breakpoint at file address 0x%llx for %s:%d didn't pass the filter.\n",
+ log->Printf ("Breakpoint at file address 0x%" PRIx64 " for %s:%d didn't pass the filter.\n",
line_start.GetFileAddress(),
m_file_spec.GetFilename().AsCString("<Unknown>"),
m_line_number);
@@ -183,7 +183,7 @@ BreakpointResolverFileLine::SearchCallback
else
{
if (log)
- log->Printf ("error: Unable to set breakpoint at file address 0x%llx for %s:%d\n",
+ log->Printf ("error: Unable to set breakpoint at file address 0x%" PRIx64 " for %s:%d\n",
line_start.GetFileAddress(),
m_file_spec.GetFilename().AsCString("<Unknown>"),
m_line_number);
diff --git a/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp b/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
index 0f627a094eb..b0af574f451 100644
--- a/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
+++ b/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
@@ -92,7 +92,7 @@ BreakpointResolverFileRegex::SearchCallback
}
else if (log)
{
- log->Printf ("Breakpoint at file address 0x%llx for %s:%d didn't pass filter.\n",
+ log->Printf ("Breakpoint at file address 0x%" PRIx64 " for %s:%d didn't pass filter.\n",
line_start.GetFileAddress(),
cu_file_spec.GetFilename().AsCString("<Unknown>"),
line_matches[i]);
@@ -101,7 +101,7 @@ BreakpointResolverFileRegex::SearchCallback
else
{
if (log)
- log->Printf ("error: Unable to set breakpoint at file address 0x%llx for %s:%d\n",
+ log->Printf ("error: Unable to set breakpoint at file address 0x%" PRIx64 " for %s:%d\n",
line_start.GetFileAddress(),
cu_file_spec.GetFilename().AsCString("<Unknown>"),
line_matches[i]);
diff --git a/lldb/source/Breakpoint/BreakpointSite.cpp b/lldb/source/Breakpoint/BreakpointSite.cpp
index 1ad7f8f1440..5f94a190d10 100644
--- a/lldb/source/Breakpoint/BreakpointSite.cpp
+++ b/lldb/source/Breakpoint/BreakpointSite.cpp
@@ -83,7 +83,7 @@ BreakpointSite::Dump(Stream *s) const
if (s == NULL)
return;
- s->Printf("BreakpointSite %u: addr = 0x%8.8llx type = %s breakpoint hw_index = %i hit_count = %-4u",
+ s->Printf("BreakpointSite %u: addr = 0x%8.8" PRIx64 " type = %s breakpoint hw_index = %i hit_count = %-4u",
GetID(),
(uint64_t)m_addr,
IsHardware() ? "hardware" : "software",
@@ -95,7 +95,7 @@ void
BreakpointSite::GetDescription (Stream *s, lldb::DescriptionLevel level)
{
if (level != lldb::eDescriptionLevelBrief)
- s->Printf ("breakpoint site: %d at 0x%8.8llx", GetID(), GetLoadAddress());
+ s->Printf ("breakpoint site: %d at 0x%8.8" PRIx64, GetID(), GetLoadAddress());
m_owners.GetDescription (s, level);
}
diff --git a/lldb/source/Breakpoint/BreakpointSiteList.cpp b/lldb/source/Breakpoint/BreakpointSiteList.cpp
index bacb388b377..76ea5b4c7ac 100644
--- a/lldb/source/Breakpoint/BreakpointSiteList.cpp
+++ b/lldb/source/Breakpoint/BreakpointSiteList.cpp
@@ -69,10 +69,10 @@ BreakpointSiteList::FindIDByAddress (lldb::addr_t addr)
BreakpointSiteSP bp = FindByAddress (addr);
if (bp)
{
- //DBLogIf(PD_LOG_BREAKPOINTS, "BreakpointSiteList::%s ( addr = 0x%8.8llx ) => %u", __FUNCTION__, (uint64_t)addr, bp->GetID());
+ //DBLogIf(PD_LOG_BREAKPOINTS, "BreakpointSiteList::%s ( addr = 0x%8.8" PRIx64 " ) => %u", __FUNCTION__, (uint64_t)addr, bp->GetID());
return bp.get()->GetID();
}
- //DBLogIf(PD_LOG_BREAKPOINTS, "BreakpointSiteList::%s ( addr = 0x%8.8llx ) => NONE", __FUNCTION__, (uint64_t)addr);
+ //DBLogIf(PD_LOG_BREAKPOINTS, "BreakpointSiteList::%s ( addr = 0x%8.8" PRIx64 " ) => NONE", __FUNCTION__, (uint64_t)addr);
return LLDB_INVALID_BREAK_ID;
}
diff --git a/lldb/source/Breakpoint/Watchpoint.cpp b/lldb/source/Breakpoint/Watchpoint.cpp
index 1de33ebb24f..4aadb9515ff 100644
--- a/lldb/source/Breakpoint/Watchpoint.cpp
+++ b/lldb/source/Breakpoint/Watchpoint.cpp
@@ -235,7 +235,7 @@ Watchpoint::DumpWithLevel(Stream *s, lldb::DescriptionLevel description_level) c
assert(description_level >= lldb::eDescriptionLevelBrief &&
description_level <= lldb::eDescriptionLevelVerbose);
- s->Printf("Watchpoint %u: addr = 0x%8.8llx size = %u state = %s type = %s%s",
+ s->Printf("Watchpoint %u: addr = 0x%8.8" PRIx64 " size = %u state = %s type = %s%s",
GetID(),
GetLoadAddress(),
m_byte_size,
diff --git a/lldb/source/Breakpoint/WatchpointList.cpp b/lldb/source/Breakpoint/WatchpointList.cpp
index 637cdca6c0b..ad4e873fe9a 100644
--- a/lldb/source/Breakpoint/WatchpointList.cpp
+++ b/lldb/source/Breakpoint/WatchpointList.cpp
@@ -51,7 +51,7 @@ WatchpointList::DumpWithLevel (Stream *s, lldb::DescriptionLevel description_lev
Mutex::Locker locker (m_mutex);
s->Printf("%p: ", this);
//s->Indent();
- s->Printf("WatchpointList with %llu Watchpoints:\n",
+ s->Printf("WatchpointList with %" PRIu64 " Watchpoints:\n",
(uint64_t)m_watchpoints.size());
s->IndentMore();
wp_collection::const_iterator pos, end = m_watchpoints.end();
diff --git a/lldb/source/Commands/CommandObjectDisassemble.cpp b/lldb/source/Commands/CommandObjectDisassemble.cpp
index 38cfe322ddc..45fdda71731 100644
--- a/lldb/source/Commands/CommandObjectDisassemble.cpp
+++ b/lldb/source/Commands/CommandObjectDisassemble.cpp
@@ -424,7 +424,7 @@ CommandObjectDisassemble::DoExecute (Args& command, CommandReturnObject &result)
}
else
{
- result.AppendErrorWithFormat ("Failed to disassemble memory at 0x%8.8llx.\n", m_options.start_addr);
+ result.AppendErrorWithFormat ("Failed to disassemble memory at 0x%8.8" PRIx64 ".\n", m_options.start_addr);
result.SetStatus (eReturnStatusFailed);
}
}
@@ -470,7 +470,7 @@ CommandObjectDisassemble::DoExecute (Args& command, CommandReturnObject &result)
}
else
{
- result.AppendErrorWithFormat ("Failed to disassemble memory at 0x%8.8llx.\n", m_options.start_addr);
+ result.AppendErrorWithFormat ("Failed to disassemble memory at 0x%8.8" PRIx64 ".\n", m_options.start_addr);
result.SetStatus (eReturnStatusFailed);
}
}
diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp
index 99a35932355..fffbda1d143 100644
--- a/lldb/source/Commands/CommandObjectMemory.cpp
+++ b/lldb/source/Commands/CommandObjectMemory.cpp
@@ -190,7 +190,7 @@ public:
if (byte_size_option_set)
{
if (byte_size_value > 1)
- error.SetErrorStringWithFormat ("display format (bytes/bytes with ascii) conflicts with the specified byte size %llu\n"
+ error.SetErrorStringWithFormat ("display format (bytes/bytes with ascii) conflicts with the specified byte size %" PRIu64 "\n"
"\tconsider using a different display format or don't specify the byte size",
byte_size_value.GetCurrentValue());
}
@@ -620,13 +620,13 @@ protected:
}
else if (end_addr <= addr)
{
- result.AppendErrorWithFormat("end address (0x%llx) must be greater that the start address (0x%llx).\n", end_addr, addr);
+ result.AppendErrorWithFormat("end address (0x%" PRIx64 ") must be greater that the start address (0x%" PRIx64 ").\n", end_addr, addr);
result.SetStatus(eReturnStatusFailed);
return false;
}
else if (m_format_options.GetCountValue().OptionWasSet())
{
- result.AppendErrorWithFormat("specify either the end address (0x%llx) or the count (--count %lu), not both.\n", end_addr, item_count);
+ result.AppendErrorWithFormat("specify either the end address (0x%" PRIx64 ") or the count (--count %lu), not both.\n", end_addr, item_count);
result.SetStatus(eReturnStatusFailed);
return false;
}
@@ -658,14 +658,14 @@ protected:
}
else
{
- result.AppendErrorWithFormat("failed to read memory from 0x%llx.\n", addr);
+ result.AppendErrorWithFormat("failed to read memory from 0x%" PRIx64 ".\n", addr);
}
result.SetStatus(eReturnStatusFailed);
return false;
}
if (bytes_read < total_byte_size)
- result.AppendWarningWithFormat("Not all bytes (%lu/%lu) were able to be read from 0x%llx.\n", bytes_read, total_byte_size, addr);
+ result.AppendWarningWithFormat("Not all bytes (%lu/%lu) were able to be read from 0x%" PRIx64 ".\n", bytes_read, total_byte_size, addr);
else
{
m_next_addr = addr + bytes_read;
@@ -705,7 +705,7 @@ protected:
}
else
{
- result.AppendErrorWithFormat("Failed to write %llu bytes to '%s'.\n", (uint64_t)bytes_read, path);
+ result.AppendErrorWithFormat("Failed to write %" PRIu64 " bytes to '%s'.\n", (uint64_t)bytes_read, path);
result.SetStatus(eReturnStatusFailed);
return false;
}
@@ -738,7 +738,7 @@ protected:
addr_t item_addr = addr + (i * item_byte_size);
Address address (item_addr);
StreamString name_strm;
- name_strm.Printf ("0x%llx", item_addr);
+ name_strm.Printf ("0x%" PRIx64, item_addr);
ValueObjectSP valobj_sp (ValueObjectMemory::Create (exe_scope,
name_strm.GetString().c_str(),
address,
@@ -1044,18 +1044,18 @@ protected:
if (bytes_written == length)
{
// All bytes written
- result.GetOutputStream().Printf("%llu bytes were written to 0x%llx\n", (uint64_t)bytes_written, addr);
+ result.GetOutputStream().Printf("%" PRIu64 " bytes were written to 0x%" PRIx64 "\n", (uint64_t)bytes_written, addr);
result.SetStatus(eReturnStatusSuccessFinishResult);
}
else if (bytes_written > 0)
{
// Some byte written
- result.GetOutputStream().Printf("%llu bytes of %llu requested were written to 0x%llx\n", (uint64_t)bytes_written, (uint64_t)length, addr);
+ result.GetOutputStream().Printf("%" PRIu64 " bytes of %" PRIu64 " requested were written to 0x%" PRIx64 "\n", (uint64_t)bytes_written, (uint64_t)length, addr);
result.SetStatus(eReturnStatusSuccessFinishResult);
}
else
{
- result.AppendErrorWithFormat ("Memory write to 0x%llx failed: %s.\n", addr, error.AsCString());
+ result.AppendErrorWithFormat ("Memory write to 0x%" PRIx64 " failed: %s.\n", addr, error.AsCString());
result.SetStatus(eReturnStatusFailed);
}
}
@@ -1133,7 +1133,7 @@ protected:
}
else if (!UIntValueIsValidForSize (uval64, item_byte_size))
{
- result.AppendErrorWithFormat ("Value 0x%llx is too large to fit in a %lu byte unsigned integer value.\n", uval64, item_byte_size);
+ result.AppendErrorWithFormat ("Value 0x%" PRIx64 " is too large to fit in a %lu byte unsigned integer value.\n", uval64, item_byte_size);
result.SetStatus(eReturnStatusFailed);
return false;
}
@@ -1161,7 +1161,7 @@ protected:
}
else if (!UIntValueIsValidForSize (uval64, item_byte_size))
{
- result.AppendErrorWithFormat ("Value 0x%llx is too large to fit in a %lu byte unsigned integer value.\n", uval64, item_byte_size);
+ result.AppendErrorWithFormat ("Value 0x%" PRIx64 " is too large to fit in a %lu byte unsigned integer value.\n", uval64, item_byte_size);
result.SetStatus(eReturnStatusFailed);
return false;
}
@@ -1184,7 +1184,7 @@ protected:
}
else
{
- result.AppendErrorWithFormat ("Memory write to 0x%llx failed: %s.\n", addr, error.AsCString());
+ result.AppendErrorWithFormat ("Memory write to 0x%" PRIx64 " failed: %s.\n", addr, error.AsCString());
result.SetStatus(eReturnStatusFailed);
return false;
}
@@ -1201,7 +1201,7 @@ protected:
}
else if (!SIntValueIsValidForSize (sval64, item_byte_size))
{
- result.AppendErrorWithFormat ("Value %lli is too large or small to fit in a %lu byte signed integer value.\n", sval64, item_byte_size);
+ result.AppendErrorWithFormat ("Value %" PRIi64 " is too large or small to fit in a %lu byte signed integer value.\n", sval64, item_byte_size);
result.SetStatus(eReturnStatusFailed);
return false;
}
@@ -1218,7 +1218,7 @@ protected:
}
else if (!UIntValueIsValidForSize (uval64, item_byte_size))
{
- result.AppendErrorWithFormat ("Value %llu is too large to fit in a %lu byte unsigned integer value.\n", uval64, item_byte_size);
+ result.AppendErrorWithFormat ("Value %" PRIu64 " is too large to fit in a %lu byte unsigned integer value.\n", uval64, item_byte_size);
result.SetStatus(eReturnStatusFailed);
return false;
}
@@ -1235,7 +1235,7 @@ protected:
}
else if (!UIntValueIsValidForSize (uval64, item_byte_size))
{
- result.AppendErrorWithFormat ("Value %llo is too large to fit in a %lu byte unsigned integer value.\n", uval64, item_byte_size);
+ result.AppendErrorWithFormat ("Value %" PRIo64 " is too large to fit in a %lu byte unsigned integer value.\n", uval64, item_byte_size);
result.SetStatus(eReturnStatusFailed);
return false;
}
@@ -1251,7 +1251,7 @@ protected:
return true;
else
{
- result.AppendErrorWithFormat ("Memory write to 0x%llx failed: %s.\n", addr, error.AsCString());
+ result.AppendErrorWithFormat ("Memory write to 0x%" PRIx64 " failed: %s.\n", addr, error.AsCString());
result.SetStatus(eReturnStatusFailed);
return false;
}
diff --git a/lldb/source/Commands/CommandObjectPlatform.cpp b/lldb/source/Commands/CommandObjectPlatform.cpp
index c97abf01d89..3be46ab872e 100644
--- a/lldb/source/Commands/CommandObjectPlatform.cpp
+++ b/lldb/source/Commands/CommandObjectPlatform.cpp
@@ -519,7 +519,7 @@ protected:
}
else
{
- result.AppendErrorWithFormat ("no process found with pid = %llu\n", pid);
+ result.AppendErrorWithFormat ("no process found with pid = %" PRIu64 "\n", pid);
result.SetStatus (eReturnStatusFailed);
}
}
@@ -796,12 +796,12 @@ protected:
ProcessInstanceInfo proc_info;
if (platform_sp->GetProcessInfo (pid, proc_info))
{
- ostrm.Printf ("Process information for process %llu:\n", pid);
+ ostrm.Printf ("Process information for process %" PRIu64 ":\n", pid);
proc_info.Dump (ostrm, platform_sp.get());
}
else
{
- ostrm.Printf ("error: no process information is available for process %llu\n", pid);
+ ostrm.Printf ("error: no process information is available for process %" PRIu64 "\n", pid);
}
ostrm.EOL();
}
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp
index 3269f197a7b..68f577ffcf5 100644
--- a/lldb/source/Commands/CommandObjectProcess.cpp
+++ b/lldb/source/Commands/CommandObjectProcess.cpp
@@ -250,7 +250,7 @@ protected:
{
const char *archname = exe_module->GetArchitecture().GetArchitectureName();
- result.AppendMessageWithFormat ("Process %llu launched: '%s' (%s)\n", process->GetID(), filename, archname);
+ result.AppendMessageWithFormat ("Process %" PRIu64 " launched: '%s' (%s)\n", process->GetID(), filename, archname);
result.SetDidChangeProcessState (true);
if (m_options.launch_info.GetFlags().Test(eLaunchFlagStopAtEntry) == false)
{
@@ -510,7 +510,7 @@ protected:
state = process->GetState();
if (process->IsAlive() && state != eStateConnected)
{
- result.AppendErrorWithFormat ("Process %llu is currently being debugged, kill the process before attaching.\n",
+ result.AppendErrorWithFormat ("Process %" PRIu64 " is currently being debugged, kill the process before attaching.\n",
process->GetID());
result.SetStatus (eReturnStatusFailed);
return false;
@@ -597,7 +597,7 @@ protected:
if (state == eStateStopped)
{
- result.AppendMessageWithFormat ("Process %llu %s\n", process->GetID(), StateAsCString (state));
+ result.AppendMessageWithFormat ("Process %" PRIu64 " %s\n", process->GetID(), StateAsCString (state));
result.SetStatus (eReturnStatusSuccessFinishNoResult);
}
else
@@ -815,13 +815,13 @@ protected:
Error error(process->Resume());
if (error.Success())
{
- result.AppendMessageWithFormat ("Process %llu resuming\n", process->GetID());
+ result.AppendMessageWithFormat ("Process %" PRIu64 " resuming\n", process->GetID());
if (synchronous_execution)
{
state = process->WaitForProcessToStop (NULL);
result.SetDidChangeProcessState (true);
- result.AppendMessageWithFormat ("Process %llu %s\n", process->GetID(), StateAsCString (state));
+ result.AppendMessageWithFormat ("Process %" PRIu64 " %s\n", process->GetID(), StateAsCString (state));
result.SetStatus (eReturnStatusSuccessFinishNoResult);
}
else
@@ -897,7 +897,7 @@ protected:
return false;
}
- result.AppendMessageWithFormat ("Detaching from process %llu\n", process->GetID());
+ result.AppendMessageWithFormat ("Detaching from process %" PRIu64 "\n", process->GetID());
Error error (process->Detach());
if (error.Success())
{
@@ -1011,7 +1011,7 @@ protected:
{
if (process->IsAlive())
{
- result.AppendErrorWithFormat ("Process %llu is currently being debugged, kill the process before connecting.\n",
+ result.AppendErrorWithFormat ("Process %" PRIu64 " is currently being debugged, kill the process before connecting.\n",
process->GetID());
result.SetStatus (eReturnStatusFailed);
return false;
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp
index 14018a41145..bd89f881915 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -91,7 +91,7 @@ DumpTargetInfo (uint32_t target_idx, Target *target, const char *prefix_cstr, bo
show_process_status = StateIsStoppedState(state, true);
const char *state_cstr = StateAsCString (state);
if (pid != LLDB_INVALID_PROCESS_ID)
- strm.Printf ("%spid=%llu", properties++ > 0 ? ", " : " ( ", pid);
+ strm.Printf ("%spid=%" PRIu64, properties++ > 0 ? ", " : " ( ", pid);
strm.Printf ("%sstate=%s", properties++ > 0 ? ", " : " ( ", state_cstr);
}
if (properties > 0)
@@ -2664,7 +2664,7 @@ protected:
{
if (target->GetSectionLoadList().SetSectionLoadAddress (section_sp, load_addr))
changed = true;
- result.AppendMessageWithFormat("section '%s' loaded at 0x%llx\n", sect_name, load_addr);
+ result.AppendMessageWithFormat("section '%s' loaded at 0x%" PRIx64 "\n", sect_name, load_addr);
}
}
else
@@ -2918,13 +2918,13 @@ protected:
}
else
{
- result.AppendError ("Couldn't find module matching address: 0x%llx.", m_options.m_module_addr);
+ result.AppendError ("Couldn't find module matching address: 0x%" PRIx64 ".", m_options.m_module_addr);
result.SetStatus (eReturnStatusFailed);
}
}
else
{
- result.AppendError ("Couldn't find module containing address: 0x%llx.", m_options.m_module_addr);
+ result.AppendError ("Couldn't find module containing address: 0x%" PRIx64 ".", m_options.m_module_addr);
result.SetStatus (eReturnStatusFailed);
}
}
@@ -3102,12 +3102,12 @@ protected:
if (format_char == 'o')
{
// Show the offset of slide for the image
- strm.Printf ("0x%*.*llx", addr_nibble_width, addr_nibble_width, header_load_addr - header_addr.GetFileAddress());
+ strm.Printf ("0x%*.*" PRIx64, addr_nibble_width, addr_nibble_width, header_load_addr - header_addr.GetFileAddress());
}
else
{
// Show the load address of the image
- strm.Printf ("0x%*.*llx", addr_nibble_width, addr_nibble_width, header_load_addr);
+ strm.Printf ("0x%*.*" PRIx64, addr_nibble_width, addr_nibble_width, header_load_addr);
}
}
break;
@@ -3399,14 +3399,14 @@ protected:
Address first_non_prologue_insn (func_unwinders_sp->GetFirstNonPrologueInsn(*target));
if (first_non_prologue_insn.IsValid())
{
- result.GetOutputStream().Printf("First non-prologue instruction is at address 0x%llx or offset %lld into the function.\n", first_non_prologue_insn.GetLoadAddress(target), first_non_prologue_insn.GetLoadAddress(target) - start_addr);
+ result.GetOutputStream().Printf("First non-prologue instruction is at address 0x%" PRIx64 " or offset %" PRId64 " into the function.\n", first_non_prologue_insn.GetLoadAddress(target), first_non_prologue_insn.GetLoadAddress(target) - start_addr);
result.GetOutputStream().Printf ("\n");
}
UnwindPlanSP non_callsite_unwind_plan = func_unwinders_sp->GetUnwindPlanAtNonCallSite(*thread.get());
if (non_callsite_unwind_plan.get())
{
- result.GetOutputStream().Printf("Asynchronous (not restricted to call-sites) UnwindPlan for %s`%s (start addr 0x%llx):\n", sc.module_sp->GetPlatformFileSpec().GetFilename().AsCString(), funcname.AsCString(), start_addr);
+ result.GetOutputStream().Printf("Asynchronous (not restricted to call-sites) UnwindPlan for %s`%s (start addr 0x%" PRIx64 "):\n", sc.module_sp->GetPlatformFileSpec().GetFilename().AsCString(), funcname.AsCString(), start_addr);
non_callsite_unwind_plan->Dump(result.GetOutputStream(), thread.get(), LLDB_INVALID_ADDRESS);
result.GetOutputStream().Printf ("\n");
}
@@ -3414,7 +3414,7 @@ protected:
UnwindPlanSP callsite_unwind_plan = func_unwinders_sp->GetUnwindPlanAtCallSite(-1);
if (callsite_unwind_plan.get())
{
- result.GetOutputStream().Printf("Synchronous (restricted to call-sites) UnwindPlan for %s`%s (start addr 0x%llx):\n", sc.module_sp->GetPlatformFileSpec().GetFilename().AsCString(), funcname.AsCString(), start_addr);
+ result.GetOutputStream().Printf("Synchronous (restricted to call-sites) UnwindPlan for %s`%s (start addr 0x%" PRIx64 "):\n", sc.module_sp->GetPlatformFileSpec().GetFilename().AsCString(), funcname.AsCString(), start_addr);
callsite_unwind_plan->Dump(result.GetOutputStream(), thread.get(), LLDB_INVALID_ADDRESS);
result.GetOutputStream().Printf ("\n");
}
@@ -3422,7 +3422,7 @@ protected:
UnwindPlanSP arch_default_unwind_plan = func_unwinders_sp->GetUnwindPlanArchitectureDefault(*thread.get());
if (arch_default_unwind_plan.get())
{
- result.GetOutputStream().Printf("Architecture default UnwindPlan for %s`%s (start addr 0x%llx):\n", sc.module_sp->GetPlatformFileSpec().GetFilename().AsCString(), funcname.AsCString(), start_addr);
+ result.GetOutputStream().Printf("Architecture default UnwindPlan for %s`%s (start addr 0x%" PRIx64 "):\n", sc.module_sp->GetPlatformFileSpec().GetFilename().AsCString(), funcname.AsCString(), start_addr);
arch_default_unwind_plan->Dump(result.GetOutputStream(), thread.get(), LLDB_INVALID_ADDRESS);
result.GetOutputStream().Printf ("\n");
}
@@ -3430,7 +3430,7 @@ protected:
UnwindPlanSP fast_unwind_plan = func_unwinders_sp->GetUnwindPlanFastUnwind(*thread.get());
if (fast_unwind_plan.get())
{
- result.GetOutputStream().Printf("Fast UnwindPlan for %s`%s (start addr 0x%llx):\n", sc.module_sp->GetPlatformFileSpec().GetFilename().AsCString(), funcname.AsCString(), start_addr);
+ result.GetOutputStream().Printf("Fast UnwindPlan for %s`%s (start addr 0x%" PRIx64 "):\n", sc.module_sp->GetPlatformFileSpec().GetFilename().AsCString(), funcname.AsCString(), start_addr);
fast_unwind_plan->Dump(result.GetOutputStream(), thread.get(), LLDB_INVALID_ADDRESS);
result.GetOutputStream().Printf ("\n");
}
@@ -4604,7 +4604,7 @@ public:
case eInputReaderDone:
if (!got_interrupted && !batch_mode)
{
- out_stream->Printf ("Stop hook #%llu added.\n", new_stop_hook->GetID());
+ out_stream->Printf ("Stop hook #%" PRIu64 " added.\n", new_stop_hook->GetID());
out_stream->Flush();
}
break;
@@ -4690,7 +4690,7 @@ protected:
{
// Use one-liner.
new_hook_sp->GetCommandPointer()->AppendString (m_options.m_one_liner.c_str());
- result.AppendMessageWithFormat("Stop hook #%llu added.\n", new_hook_sp->GetID());
+ result.AppendMessageWithFormat("Stop hook #%" PRIu64 " added.\n", new_hook_sp->GetID());
}
else
{
diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp
index 0547d38fe4d..f555b624e11 100644
--- a/lldb/source/Commands/CommandObjectThread.cpp
+++ b/lldb/source/Commands/CommandObjectThread.cpp
@@ -548,7 +548,7 @@ protected:
// }
process->GetThreadList().SetSelectedThreadByID (thread->GetID());
result.SetDidChangeProcessState (true);
- result.AppendMessageWithFormat ("Process %llu %s\n", process->GetID(), StateAsCString (state));
+ result.AppendMessageWithFormat ("Process %" PRIu64 " %s\n", process->GetID(), StateAsCString (state));
result.SetStatus (eReturnStatusSuccessFinishNoResult);
}
else
@@ -723,7 +723,7 @@ public:
thread->SetResumeState (eStateSuspended);
}
}
- result.AppendMessageWithFormat ("in process %llu\n", process->GetID());
+ result.AppendMessageWithFormat ("in process %" PRIu64 "\n", process->GetID());
}
}
else
@@ -741,7 +741,7 @@ public:
Thread *thread = process->GetThreadList().GetThreadAtIndex(idx).get();
if (thread == current_thread)
{
- result.AppendMessageWithFormat ("Resuming thread 0x%4.4llx in process %llu\n", thread->GetID(), process->GetID());
+ result.AppendMessageWithFormat ("Resuming thread 0x%4.4" PRIx64 " in process %" PRIu64 "\n", thread->GetID(), process->GetID());
thread->SetResumeState (eStateRunning);
}
else
@@ -754,13 +754,13 @@ public:
Error error (process->Resume());
if (error.Success())
{
- result.AppendMessageWithFormat ("Process %llu resuming\n", process->GetID());
+ result.AppendMessageWithFormat ("Process %" PRIu64 " resuming\n", process->GetID());
if (synchronous_execution)
{
state = process->WaitForProcessToStop (NULL);
result.SetDidChangeProcessState (true);
- result.AppendMessageWithFormat ("Process %llu %s\n", process->GetID(), StateAsCString (state));
+ result.AppendMessageWithFormat ("Process %" PRIu64 " %s\n", process->GetID(), StateAsCString (state));
result.SetStatus (eReturnStatusSuccessFinishNoResult);
}
else
@@ -1082,13 +1082,13 @@ protected:
Error error (process->Resume ());
if (error.Success())
{
- result.AppendMessageWithFormat ("Process %llu resuming\n", process->GetID());
+ result.AppendMessageWithFormat ("Process %" PRIu64 " resuming\n", process->GetID());
if (synchronous_execution)
{
StateType state = process->WaitForProcessToStop (NULL);
result.SetDidChangeProcessState (true);
- result.AppendMessageWithFormat ("Process %llu %s\n", process->GetID(), StateAsCString (state));
+ result.AppendMessageWithFormat ("Process %" PRIu64 " %s\n", process->GetID(), StateAsCString (state));
result.SetStatus (eReturnStatusSuccessFinishNoResult);
}
else
diff --git a/lldb/source/Commands/CommandObjectWatchpoint.cpp b/lldb/source/Commands/CommandObjectWatchpoint.cpp
index d3b22439586..8d907ae5740 100644
--- a/lldb/source/Commands/CommandObjectWatchpoint.cpp
+++ b/lldb/source/Commands/CommandObjectWatchpoint.cpp
@@ -1096,7 +1096,7 @@ protected:
output_stream.EOL();
result.SetStatus(eReturnStatusSuccessFinishResult);
} else {
- result.AppendErrorWithFormat("Watchpoint creation failed (addr=0x%llx, size=%lu, variable expression='%s').\n",
+ result.AppendErrorWithFormat("Watchpoint creation failed (addr=0x%" PRIx64 ", size=%lu, variable expression='%s').\n",
addr, size, command.GetArgumentAtIndex(0));
if (error.AsCString(NULL))
result.AppendError(error.AsCString());
@@ -1286,7 +1286,7 @@ protected:
output_stream.EOL();
result.SetStatus(eReturnStatusSuccessFinishResult);
} else {
- result.AppendErrorWithFormat("Watchpoint creation failed (addr=0x%llx, size=%lu).\n",
+ result.AppendErrorWithFormat("Watchpoint creation failed (addr=0x%" PRIx64 ", size=%lu).\n",
addr, size);
if (error.AsCString(NULL))
result.AppendError(error.AsCString());
diff --git a/lldb/source/Core/Address.cpp b/lldb/source/Core/Address.cpp
index 2edd52f39b6..9d4d8706c5a 100644
--- a/lldb/source/Core/Address.cpp
+++ b/lldb/source/Core/Address.cpp
@@ -384,7 +384,7 @@ Address::Dump (Stream *s, ExecutionContextScope *exe_scope, DumpStyle style, Dum
if (section_sp)
{
section_sp->DumpName(s);
- s->Printf (" + %llu", m_offset);
+ s->Printf (" + %" PRIu64, m_offset);
}
else
{
@@ -465,7 +465,7 @@ Address::Dump (Stream *s, ExecutionContextScope *exe_scope, DumpStyle style, Dum
s->PutCString(symbol_name);
addr_t delta = file_Addr - symbol->GetAddress().GetFileAddress();
if (delta)
- s->Printf(" + %llu", delta);
+ s->Printf(" + %" PRIu64, delta);
showed_info = true;
}
}
@@ -703,7 +703,7 @@ Address::Dump (Stream *s, ExecutionContextScope *exe_scope, DumpStyle style, Dum
if (var && var->LocationIsValidForAddress (*this))
{
s->Indent();
- s->Printf (" Variable: id = {0x%8.8llx}, name = \"%s\", type= \"%s\", location =",
+ s->Printf (" Variable: id = {0x%8.8" PRIx64 "}, name = \"%s\", type= \"%s\", location =",
var->GetID(),
var->GetName().GetCString(),
var->GetType()->GetName().GetCString());
diff --git a/lldb/source/Core/AddressRange.cpp b/lldb/source/Core/AddressRange.cpp
index 20050221914..835a01d82aa 100644
--- a/lldb/source/Core/AddressRange.cpp
+++ b/lldb/source/Core/AddressRange.cpp
@@ -196,7 +196,7 @@ AddressRange::Dump(Stream *s, Target *target, Address::DumpStyle style, Address:
void
AddressRange::DumpDebug (Stream *s) const
{
- s->Printf("%p: AddressRange section = %p, offset = 0x%16.16llx, byte_size = 0x%16.16llx\n", this, m_base_addr.GetSection().get(), m_base_addr.GetOffset(), GetByteSize());
+ s->Printf("%p: AddressRange section = %p, offset = 0x%16.16" PRIx64 ", byte_size = 0x%16.16" PRIx64 "\n", this, m_base_addr.GetSection().get(), m_base_addr.GetOffset(), GetByteSize());
}
//
//bool
diff --git a/lldb/source/Core/AddressResolverFileLine.cpp b/lldb/source/Core/AddressResolverFileLine.cpp
index 9300f90dbc4..78f156d9556 100644
--- a/lldb/source/Core/AddressResolverFileLine.cpp
+++ b/lldb/source/Core/AddressResolverFileLine.cpp
@@ -77,7 +77,7 @@ AddressResolverFileLine::SearchCallback
else
{
if (log)
- log->Printf ("error: Unable to resolve address at file address 0x%llx for %s:%d\n",
+ log->Printf ("error: Unable to resolve address at file address 0x%" PRIx64 " for %s:%d\n",
line_start.GetFileAddress(),
m_file_spec.GetFilename().AsCString("<Unknown>"),
m_line_number);
diff --git a/lldb/source/Core/CXXFormatterFunctions.cpp b/lldb/source/Core/CXXFormatterFunctions.cpp
index 46070888b98..c458cf2e2ff 100644
--- a/lldb/source/Core/CXXFormatterFunctions.cpp
+++ b/lldb/source/Core/CXXFormatterFunctions.cpp
@@ -78,7 +78,7 @@ lldb_private::formatters::CallSelectorOnObject (ValueObject &valobj,
StreamString expr_path_stream;
valobj.GetExpressionPath(expr_path_stream, false);
StreamString expr;
- expr.Printf("(%s)[%s %s:%lld]",return_type,expr_path_stream.GetData(),selector,index);
+ expr.Printf("(%s)[%s %s:%" PRId64 "]",return_type,expr_path_stream.GetData(),selector,index);
ExecutionContext exe_ctx (valobj.GetExecutionContextRef());
lldb::ValueObjectSP result_sp;
Target* target = exe_ctx.GetTargetPtr();
@@ -200,7 +200,7 @@ lldb_private::formatters::NSDictionarySummaryProvider (ValueObject& valobj, Stre
return false;
}
- stream.Printf("%s%llu %s%s",
+ stream.Printf("%s%" PRIu64 " %s%s",
(name_entries ? "@\"" : ""),
value,
(name_entries ? (value == 1 ? "entry" : "entries") : (value == 1 ? "key/value pair" : "key/value pairs")),
@@ -266,7 +266,7 @@ lldb_private::formatters::NSArraySummaryProvider (ValueObject& valobj, Stream& s
return false;
}
- stream.Printf("@\"%llu object%s\"",
+ stream.Printf("@\"%" PRIu64 " object%s\"",
value,
value == 1 ? "" : "s");
return true;
@@ -319,7 +319,7 @@ lldb_private::formatters::NSDataSummaryProvider (ValueObject& valobj, Stream& st
return false;
}
- stream.Printf("%s%llu byte%s%s",
+ stream.Printf("%s%" PRIu64 " byte%s%s",
(needs_at ? "@\"" : ""),
value,
(value > 1 ? "s" : ""),
@@ -377,10 +377,10 @@ lldb_private::formatters::NSNumberSummaryProvider (ValueObject& valobj, Stream&
stream.Printf("(int)%d",(int)value);
break;
case 12:
- stream.Printf("(long)%lld",value);
+ stream.Printf("(long)%" PRId64,value);
break;
default:
- stream.Printf("absurd value:(info=%llu, value=%llu",i_bits,value);
+ stream.Printf("absurd value:(info=%" PRIu64 ", value=%" PRIu64,i_bits,value);
break;
}
return true;
@@ -419,7 +419,7 @@ lldb_private::formatters::NSNumberSummaryProvider (ValueObject& valobj, Stream&
value = process_sp->ReadUnsignedIntegerFromMemory(data_location, 8, 0, error);
if (error.Fail())
return false;
- stream.Printf("(long)%lld",value);
+ stream.Printf("(long)%" PRId64,value);
break;
case 5: // 0B0101
{
@@ -971,7 +971,7 @@ lldb_private::formatters::NSArrayISyntheticFrontEnd::GetChildAtIndex (uint32_t i
if (error.Fail())
return lldb::ValueObjectSP();
StreamString expr;
- expr.Printf("(id)%llu",object_at_idx);
+ expr.Printf("(id)%" PRIu64,object_at_idx);
StreamString idx_name;
idx_name.Printf("[%d]",idx);
lldb::ValueObjectSP retval_sp = ValueObject::CreateValueObjectFromExpression(idx_name.GetData(), expr.GetData(), m_exe_ctx_ref);
@@ -1304,7 +1304,7 @@ lldb_private::formatters::NSDictionaryISyntheticFrontEnd::GetChildAtIndex (uint3
{
// make the new ValueObject
StreamString expr;
- expr.Printf("struct __lldb_autogen_nspair { id key; id value; } _lldb_valgen_item; _lldb_valgen_item.key = (id)%llu ; _lldb_valgen_item.value = (id)%llu; _lldb_valgen_item;",dict_item.key_ptr,dict_item.val_ptr);
+ expr.Printf("struct __lldb_autogen_nspair { id key; id value; } _lldb_valgen_item; _lldb_valgen_item.key = (id)%" PRIu64 " ; _lldb_valgen_item.value = (id)%" PRIu64 "; _lldb_valgen_item;",dict_item.key_ptr,dict_item.val_ptr);
StreamString idx_name;
idx_name.Printf("[%d]",idx);
dict_item.valobj_sp = ValueObject::CreateValueObjectFromExpression(idx_name.GetData(), expr.GetData(), m_exe_ctx_ref);
@@ -1456,7 +1456,7 @@ lldb_private::formatters::NSDictionaryMSyntheticFrontEnd::GetChildAtIndex (uint3
{
// make the new ValueObject
StreamString expr;
- expr.Printf("struct __lldb_autogen_nspair { id key; id value; } _lldb_valgen_item; _lldb_valgen_item.key = (id)%llu ; _lldb_valgen_item.value = (id)%llu; _lldb_valgen_item;",dict_item.key_ptr,dict_item.val_ptr);
+ expr.Printf("struct __lldb_autogen_nspair { id key; id value; } _lldb_valgen_item; _lldb_valgen_item.key = (id)%" PRIu64 " ; _lldb_valgen_item.value = (id)%" PRIu64 "; _lldb_valgen_item;",dict_item.key_ptr,dict_item.val_ptr);
StreamString idx_name;
idx_name.Printf("[%d]",idx);
dict_item.valobj_sp = ValueObject::CreateValueObjectFromExpression(idx_name.GetData(), expr.GetData(), m_exe_ctx_ref);
diff --git a/lldb/source/Core/Communication.cpp b/lldb/source/Core/Communication.cpp
index 0c7a8901f6f..8d4385bef47 100644
--- a/lldb/source/Core/Communication.cpp
+++ b/lldb/source/Core/Communication.cpp
@@ -136,7 +136,7 @@ size_t
Communication::Read (void *dst, size_t dst_len, uint32_t timeout_usec, ConnectionStatus &status, Error *error_ptr)
{
lldb_private::LogIfAnyCategoriesSet (LIBLLDB_LOG_COMMUNICATION,
- "%p Communication::Read (dst = %p, dst_len = %llu, timeout = %u usec) connection = %p",
+ "%p Communication::Read (dst = %p, dst_len = %" PRIu64 ", timeout = %u usec) connection = %p",
this,
dst,
(uint64_t)dst_len,
@@ -210,7 +210,7 @@ Communication::Write (const void *src, size_t src_len, ConnectionStatus &status,
Mutex::Locker locker(m_write_mutex);
lldb_private::LogIfAnyCategoriesSet (LIBLLDB_LOG_COMMUNICATION,
- "%p Communication::Write (src = %p, src_len = %llu) connection = %p",
+ "%p Communication::Write (src = %p, src_len = %" PRIu64 ") connection = %p",
this,
src,
(uint64_t)src_len,
@@ -295,7 +295,7 @@ void
Communication::AppendBytesToCache (const uint8_t * bytes, size_t len, bool broadcast, ConnectionStatus status)
{
lldb_private::LogIfAnyCategoriesSet (LIBLLDB_LOG_COMMUNICATION,
- "%p Communication::AppendBytesToCache (src = %p, src_len = %llu, broadcast = %i)",
+ "%p Communication::AppendBytesToCache (src = %p, src_len = %" PRIu64 ", broadcast = %i)",
this, bytes, (uint64_t)len, broadcast);
if ((bytes == NULL || len == 0)
&& (status != lldb::eConnectionStatusEndOfFile))
diff --git a/lldb/source/Core/ConnectionFileDescriptor.cpp b/lldb/source/Core/ConnectionFileDescriptor.cpp
index 238daabdb48..91c2ff369b1 100644
--- a/lldb/source/Core/ConnectionFileDescriptor.cpp
+++ b/lldb/source/Core/ConnectionFileDescriptor.cpp
@@ -362,7 +362,7 @@ ConnectionFileDescriptor::Read (void *dst,
{
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
if (log)
- log->Printf ("%p ConnectionFileDescriptor::Read () ::read (fd = %i, dst = %p, dst_len = %llu)...",
+ log->Printf ("%p ConnectionFileDescriptor::Read () ::read (fd = %i, dst = %p, dst_len = %" PRIu64 ")...",
this, m_fd_recv, dst, (uint64_t)dst_len);
Mutex::Locker locker;
@@ -411,7 +411,7 @@ ConnectionFileDescriptor::Read (void *dst,
}
if (log)
- log->Printf ("%p ConnectionFileDescriptor::Read () ::read (fd = %i, dst = %p, dst_len = %llu) => %lli, error = %s",
+ log->Printf ("%p ConnectionFileDescriptor::Read () ::read (fd = %i, dst = %p, dst_len = %" PRIu64 ") => %" PRIi64 ", error = %s",
this,
m_fd_recv,
dst,
@@ -475,7 +475,7 @@ ConnectionFileDescriptor::Write (const void *src, size_t src_len, ConnectionStat
{
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
if (log)
- log->Printf ("%p ConnectionFileDescriptor::Write (src = %p, src_len = %llu)", this, src, (uint64_t)src_len);
+ log->Printf ("%p ConnectionFileDescriptor::Write (src = %p, src_len = %" PRIu64 ")", this, src, (uint64_t)src_len);
if (!IsConnected ())
{
@@ -530,7 +530,7 @@ ConnectionFileDescriptor::Write (const void *src, size_t src_len, ConnectionStat
switch (m_fd_send_type)
{
case eFDTypeFile: // Other FD requireing read/write
- log->Printf ("%p ConnectionFileDescriptor::Write() ::write (fd = %i, src = %p, src_len = %llu) => %lli (error = %s)",
+ log->Printf ("%p ConnectionFileDescriptor::Write() ::write (fd = %i, src = %p, src_len = %" PRIu64 ") => %" PRIi64 " (error = %s)",
this,
m_fd_send,
src,
@@ -540,7 +540,7 @@ ConnectionFileDescriptor::Write (const void *src, size_t src_len, ConnectionStat
break;
case eFDTypeSocket: // Socket requiring send/recv
- log->Printf ("%p ConnectionFileDescriptor::Write() ::send (socket = %i, src = %p, src_len = %llu, flags = 0) => %lli (error = %s)",
+ log->Printf ("%p ConnectionFileDescriptor::Write() ::send (socket = %i, src = %p, src_len = %" PRIu64 ", flags = 0) => %" PRIi64 " (error = %s)",
this,
m_fd_send,
src,
@@ -550,7 +550,7 @@ ConnectionFileDescriptor::Write (const void *src, size_t src_len, ConnectionStat
break;
case eFDTypeSocketUDP: // Unconnected UDP socket requiring sendto/recvfrom
- log->Printf ("%p ConnectionFileDescriptor::Write() ::sendto (socket = %i, src = %p, src_len = %llu, flags = 0) => %lli (error = %s)",
+ log->Printf ("%p ConnectionFileDescriptor::Write() ::sendto (socket = %i, src = %p, src_len = %" PRIu64 ", flags = 0) => %" PRIi64 " (error = %s)",
this,
m_fd_send,
src,
diff --git a/lldb/source/Core/ConstString.cpp b/lldb/source/Core/ConstString.cpp
index 7dfc5534421..72a4332a4ff 100644
--- a/lldb/source/Core/ConstString.cpp
+++ b/lldb/source/Core/ConstString.cpp
@@ -294,7 +294,7 @@ ConstString::DumpDebug(Stream *s) const
size_t cstr_len = GetLength();
// Only print the parens if we have a non-NULL string
const char *parens = cstr ? "\"" : "";
- s->Printf("%*p: ConstString, string = %s%s%s, length = %llu", (int)sizeof(void*) * 2, this, parens, cstr, parens, (uint64_t)cstr_len);
+ s->Printf("%*p: ConstString, string = %s%s%s, length = %" PRIu64, (int)sizeof(void*) * 2, this, parens, cstr, parens, (uint64_t)cstr_len);
}
void
diff --git a/lldb/source/Core/DataBufferMemoryMap.cpp b/lldb/source/Core/DataBufferMemoryMap.cpp
index 8f9b56d3539..5e1403a5a82 100644
--- a/lldb/source/Core/DataBufferMemoryMap.cpp
+++ b/lldb/source/Core/DataBufferMemoryMap.cpp
@@ -209,7 +209,7 @@ DataBufferMemoryMap::MemoryMapFromFileDescriptor (int fd,
}
if (error.GetError() == ENOMEM)
{
- error.SetErrorStringWithFormat("could not allocate %lld bytes of memory to mmap in file", (uint64_t) length);
+ error.SetErrorStringWithFormat("could not allocate %" PRId64 " bytes of memory to mmap in file", (uint64_t) length);
}
}
else
diff --git a/lldb/source/Core/DataExtractor.cpp b/lldb/source/Core/DataExtractor.cpp
index d9255a408b6..9e948f43991 100644
--- a/lldb/source/Core/DataExtractor.cpp
+++ b/lldb/source/Core/DataExtractor.cpp
@@ -1408,7 +1408,7 @@ DataExtractor::Dump (Stream *s,
s->EOL();
}
if (base_addr != LLDB_INVALID_ADDRESS)
- s->Printf ("0x%8.8llx: ", (uint64_t)(base_addr + (offset - start_offset)));
+ s->Printf ("0x%8.8" PRIx64 ": ", (uint64_t)(base_addr + (offset - start_offset)));
line_start_offset = offset;
}
else
@@ -1498,7 +1498,7 @@ DataExtractor::Dump (Stream *s,
if (item_byte_size == 1)
s->Printf ("\\x%2.2x", (uint8_t)ch);
else
- s->Printf ("%llu", ch);
+ s->Printf ("%" PRIu64, ch);
break;
}
}
@@ -1516,7 +1516,7 @@ DataExtractor::Dump (Stream *s,
case eFormatEnum: // Print enum value as a signed integer when we don't get the enum type
case eFormatDecimal:
if (item_byte_size <= 8)
- s->Printf ("%lld", GetMaxS64Bitfield(&offset, item_byte_size, item_bit_size, item_bit_offset));
+ s->Printf ("%" PRId64, GetMaxS64Bitfield(&offset, item_byte_size, item_bit_size, item_bit_offset));
else
{
const bool is_signed = true;
@@ -1527,7 +1527,7 @@ DataExtractor::Dump (Stream *s,
case eFormatUnsigned:
if (item_byte_size <= 8)
- s->Printf ("%llu", GetMaxU64Bitfield(&offset, item_byte_size, item_bit_size, item_bit_offset));
+ s->Printf ("%" PRIu64, GetMaxU64Bitfield(&offset, item_byte_size, item_bit_size, item_bit_offset));
else
{
const bool is_signed = false;
@@ -1538,7 +1538,7 @@ DataExtractor::Dump (Stream *s,
case eFormatOctal:
if (item_byte_size <= 8)
- s->Printf ("0%llo", GetMaxS64Bitfield(&offset, item_byte_size, item_bit_size, item_bit_offset));
+ s->Printf ("0%" PRIo64, GetMaxS64Bitfield(&offset, item_byte_size, item_bit_size, item_bit_offset));
else
{
const bool is_signed = false;
@@ -1632,8 +1632,8 @@ DataExtractor::Dump (Stream *s,
if (complex_int_byte_size <= 8)
{
- s->Printf("%llu", GetMaxU64Bitfield(&offset, complex_int_byte_size, 0, 0));
- s->Printf(" + %llui", GetMaxU64Bitfield(&offset, complex_int_byte_size, 0, 0));
+ s->Printf("%" PRIu64, GetMaxU64Bitfield(&offset, complex_int_byte_size, 0, 0));
+ s->Printf(" + %" PRIu64 "i", GetMaxU64Bitfield(&offset, complex_int_byte_size, 0, 0));
}
else
{
@@ -1682,7 +1682,7 @@ DataExtractor::Dump (Stream *s,
bool wantsuppercase = (item_format == eFormatHexUppercase);
if (item_byte_size <= 8)
{
- s->Printf(wantsuppercase ? "0x%*.*llX" : "0x%*.*llx", 2 * item_byte_size, 2 * item_byte_size, GetMaxU64Bitfield(&offset, item_byte_size, item_bit_size, item_bit_offset));
+ s->Printf(wantsuppercase ? "0x%*.*" PRIX64 : "0x%*.*" PRIx64, 2 * item_byte_size, 2 * item_byte_size, GetMaxU64Bitfield(&offset, item_byte_size, item_bit_size, item_bit_offset));
}
else
{
@@ -1746,7 +1746,7 @@ DataExtractor::Dump (Stream *s,
case eFormatAddressInfo:
{
addr_t addr = GetMaxU64Bitfield(&offset, item_byte_size, item_bit_size, item_bit_offset);
- s->Printf("0x%*.*llx", 2 * item_byte_size, 2 * item_byte_size, addr);
+ s->Printf("0x%*.*" PRIx64, 2 * item_byte_size, 2 * item_byte_size, addr);
if (exe_scope)
{
TargetSP target_sp (exe_scope->CalculateTarget());
@@ -1923,7 +1923,7 @@ DataExtractor::PutToLog
}
// Reset string offset and fill the current line string with address:
if (base_addr != LLDB_INVALID_ADDRESS)
- sstr.Printf("0x%8.8llx:", (uint64_t)(base_addr + (offset - start_offset)));
+ sstr.Printf("0x%8.8" PRIx64 ":", (uint64_t)(base_addr + (offset - start_offset)));
}
switch (type)
@@ -1938,10 +1938,10 @@ DataExtractor::PutToLog
break;
case TypeUInt16: sstr.Printf (format ? format : " %4.4x", GetU16(&offset)); break;
case TypeUInt32: sstr.Printf (format ? format : " %8.8x", GetU32(&offset)); break;
- case TypeUInt64: sstr.Printf (format ? format : " %16.16llx", GetU64(&offset)); break;
- case TypePointer: sstr.Printf (format ? format : " 0x%llx", GetAddress(&offset)); break;
- case TypeULEB128: sstr.Printf (format ? format : " 0x%llx", GetULEB128(&offset)); break;
- case TypeSLEB128: sstr.Printf (format ? format : " %lld", GetSLEB128(&offset)); break;
+ case TypeUInt64: sstr.Printf (format ? format : " %16.16" PRIx64, GetU64(&offset)); break;
+ case TypePointer: sstr.Printf (format ? format : " 0x%" PRIx64, GetAddress(&offset)); break;
+ case TypeULEB128: sstr.Printf (format ? format : " 0x%" PRIx64, GetULEB128(&offset)); break;
+ case TypeSLEB128: sstr.Printf (format ? format : " %" PRId64, GetSLEB128(&offset)); break;
}
}
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index 38baac44293..aadbf4d1da3 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -1187,7 +1187,7 @@ ScanBracketedRange (const char* var_name_begin,
*index_lower = ::strtoul (*open_bracket_position+1, &end, 0);
*index_higher = *index_lower;
if (log)
- log->Printf("[ScanBracketedRange] [%lld] detected, high index is same", *index_lower);
+ log->Printf("[ScanBracketedRange] [%" PRId64 "] detected, high index is same", *index_lower);
}
else if (*close_bracket_position && *close_bracket_position < var_name_end)
{
@@ -1195,7 +1195,7 @@ ScanBracketedRange (const char* var_name_begin,
*index_lower = ::strtoul (*open_bracket_position+1, &end, 0);
*index_higher = ::strtoul (*separator_position+1, &end, 0);
if (log)
- log->Printf("[ScanBracketedRange] [%lld-%lld] detected", *index_lower, *index_higher);
+ log->Printf("[ScanBracketedRange] [%" PRId64 "-%" PRId64 "] detected", *index_lower, *index_higher);
}
else
{
@@ -1642,7 +1642,7 @@ Debugger::FormatPrompt
if (!item)
{
if (log)
- log->Printf("[Debugger::FormatPrompt] ERROR in getting child item at index %lld", index_lower);
+ log->Printf("[Debugger::FormatPrompt] ERROR in getting child item at index %" PRId64, index_lower);
}
else
{
@@ -1898,7 +1898,7 @@ Debugger::FormatPrompt
var_name_begin += ::strlen ("process.");
if (::strncmp (var_name_begin, "id}", strlen("id}")) == 0)
{
- s.Printf("%llu", process->GetID());
+ s.Printf("%" PRIu64, process->GetID());
var_success = true;
}
else if ((::strncmp (var_name_begin, "name}", strlen("name}")) == 0) ||
@@ -1936,7 +1936,7 @@ Debugger::FormatPrompt
var_name_begin += ::strlen ("thread.");
if (::strncmp (var_name_begin, "id}", strlen("id}")) == 0)
{
- s.Printf("0x%4.4llx", thread->GetID());
+ s.Printf("0x%4.4" PRIx64, thread->GetID());
var_success = true;
}
else if (::strncmp (var_name_begin, "index}", strlen("index}")) == 0)
@@ -2144,7 +2144,7 @@ Debugger::FormatPrompt
if (::strncmp (var_name_begin, "id}", strlen("id}")) == 0)
{
if (sc->function)
- s.Printf("function{0x%8.8llx}", sc->function->GetID());
+ s.Printf("function{0x%8.8" PRIx64 "}", sc->function->GetID());
else
s.Printf("symbol[%u]", sc->symbol->GetID());
@@ -2430,9 +2430,9 @@ Debugger::FormatPrompt
addr_t func_file_addr = func_addr.GetFileAddress();
addr_t addr_file_addr = format_addr.GetFileAddress();
if (addr_file_addr > func_file_addr)
- s.Printf(" + %llu", addr_file_addr - func_file_addr);
+ s.Printf(" + %" PRIu64, addr_file_addr - func_file_addr);
else if (addr_file_addr < func_file_addr)
- s.Printf(" - %llu", func_file_addr - addr_file_addr);
+ s.Printf(" - %" PRIu64, func_file_addr - addr_file_addr);
var_success = true;
}
else
@@ -2443,9 +2443,9 @@ Debugger::FormatPrompt
addr_t func_load_addr = func_addr.GetLoadAddress (target);
addr_t addr_load_addr = format_addr.GetLoadAddress (target);
if (addr_load_addr > func_load_addr)
- s.Printf(" + %llu", addr_load_addr - func_load_addr);
+ s.Printf(" + %" PRIu64, addr_load_addr - func_load_addr);
else if (addr_load_addr < func_load_addr)
- s.Printf(" - %llu", func_load_addr - addr_load_addr);
+ s.Printf(" - %" PRIu64, func_load_addr - addr_load_addr);
var_success = true;
}
}
@@ -2465,7 +2465,7 @@ Debugger::FormatPrompt
int addr_width = target->GetArchitecture().GetAddressByteSize() * 2;
if (addr_width == 0)
addr_width = 16;
- s.Printf("0x%*.*llx", addr_width, addr_width, vaddr);
+ s.Printf("0x%*.*" PRIx64, addr_width, addr_width, vaddr);
var_success = true;
}
}
diff --git a/lldb/source/Core/EmulateInstruction.cpp b/lldb/source/Core/EmulateInstruction.cpp
index 0e94e67b8d8..c773eeb5fb4 100644
--- a/lldb/source/Core/EmulateInstruction.cpp
+++ b/lldb/source/Core/EmulateInstruction.cpp
@@ -361,7 +361,7 @@ EmulateInstruction::ReadMemoryDefault (EmulateInstruction *instruction,
size_t length)
{
StreamFile strm (stdout, false);
- strm.Printf (" Read from Memory (address = 0x%llx, length = %llu, context = ", addr, (uint64_t)length);
+ strm.Printf (" Read from Memory (address = 0x%" PRIx64 ", length = %" PRIu64 ", context = ", addr, (uint64_t)length);
context.Dump (strm, instruction);
strm.EOL();
*((uint64_t *) dst) = 0xdeadbeef;
@@ -377,7 +377,7 @@ EmulateInstruction::WriteMemoryDefault (EmulateInstruction *instruction,
size_t length)
{
StreamFile strm (stdout, false);
- strm.Printf (" Write to Memory (address = 0x%llx, length = %llu, context = ", addr, (uint64_t)length);
+ strm.Printf (" Write to Memory (address = 0x%" PRIx64 ", length = %" PRIu64 ", context = ", addr, (uint64_t)length);
context.Dump (strm, instruction);
strm.EOL();
return length;
@@ -503,7 +503,7 @@ EmulateInstruction::Context::Dump (Stream &strm,
{
case eInfoTypeRegisterPlusOffset:
{
- strm.Printf (" (reg_plus_offset = %s%+lld)",
+ strm.Printf (" (reg_plus_offset = %s%+" PRId64 ")",
info.RegisterPlusOffset.reg.name,
info.RegisterPlusOffset.signed_offset);
}
@@ -519,7 +519,7 @@ EmulateInstruction::Context::Dump (Stream &strm,
case eInfoTypeRegisterToRegisterPlusOffset:
{
- strm.Printf (" (base_and_imm_offset = %s%+lld, data_reg = %s)",
+ strm.Printf (" (base_and_imm_offset = %s%+" PRId64 ", data_reg = %s)",
info.RegisterToRegisterPlusOffset.base_reg.name,
info.RegisterToRegisterPlusOffset.offset,
info.RegisterToRegisterPlusOffset.data_reg.name);
@@ -544,7 +544,7 @@ EmulateInstruction::Context::Dump (Stream &strm,
break;
case eInfoTypeOffset:
- strm.Printf (" (signed_offset = %+lld)", info.signed_offset);
+ strm.Printf (" (signed_offset = %+" PRId64 ")", info.signed_offset);
break;
case eInfoTypeRegister:
@@ -552,19 +552,19 @@ EmulateInstruction::Context::Dump (Stream &strm,
break;
case eInfoTypeImmediate:
- strm.Printf (" (unsigned_immediate = %llu (0x%16.16llx))",
+ strm.Printf (" (unsigned_immediate = %" PRIu64 " (0x%16.16" PRIx64 "))",
info.unsigned_immediate,
info.unsigned_immediate);
break;
case eInfoTypeImmediateSigned:
- strm.Printf (" (signed_immediate = %+lld (0x%16.16llx))",
+ strm.Printf (" (signed_immediate = %+" PRId64 " (0x%16.16" PRIx64 "))",
info.signed_immediate,
info.signed_immediate);
break;
case eInfoTypeAddress:
- strm.Printf (" (address = 0x%llx)", info.address);
+ strm.Printf (" (address = 0x%" PRIx64 ")", info.address);
break;
case eInfoTypeISAAndImmediate:
diff --git a/lldb/source/Core/History.cpp b/lldb/source/Core/History.cpp
index 929c8544798..0105dce730d 100644
--- a/lldb/source/Core/History.cpp
+++ b/lldb/source/Core/History.cpp
@@ -10,6 +10,7 @@
#include "lldb/Core/History.h"
// C Includes
+#include <inttypes.h>
// C++ Includes
// Other libraries and framework includes
// Project includes
@@ -21,5 +22,5 @@ using namespace lldb_private;
void
HistorySourceUInt::DumpHistoryEvent (Stream &strm, HistoryEvent event)
{
- strm.Printf ("%s %llu", m_name.c_str(), (uint64_t)((uintptr_t)event));
+ strm.Printf ("%s %" PRIu64, m_name.c_str(), (uint64_t)((uintptr_t)event));
}
diff --git a/lldb/source/Core/Log.cpp b/lldb/source/Core/Log.cpp
index 17281c03fd0..b8671f7ddc9 100644
--- a/lldb/source/Core/Log.cpp
+++ b/lldb/source/Core/Log.cpp
@@ -100,12 +100,12 @@ Log::PrintfWithFlagsVarArg (uint32_t flags, const char *format, va_list args)
if (m_options.Test (LLDB_LOG_OPTION_PREPEND_TIMESTAMP))
{
struct timeval tv = TimeValue::Now().GetAsTimeVal();
- header.Printf ("%9ld.%6.6d ", tv.tv_sec, tv.tv_usec);
+ header.Printf ("%9ld.%6.6ld ", tv.tv_sec, tv.tv_usec);
}
// Add the process and thread if requested
if (m_options.Test (LLDB_LOG_OPTION_PREPEND_PROC_AND_THREAD))
- header.Printf ("[%4.4x/%4.4llx]: ", getpid(), Host::GetCurrentThreadID());
+ header.Printf ("[%4.4x/%4.4" PRIx64 "]: ", getpid(), Host::GetCurrentThreadID());
// Add the process and thread if requested
if (m_options.Test (LLDB_LOG_OPTION_PREPEND_THREAD_NAME))
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index e349d635c1c..e03c499823e 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -103,7 +103,7 @@ namespace lldb {
Mutex::Locker locker (Module::GetAllocationModuleCollectionMutex());
ModuleCollection &modules = GetModuleCollection();
const size_t count = modules.size();
- printf ("%s: %llu modules:\n", __PRETTY_FUNCTION__, (uint64_t)count);
+ printf ("%s: %" PRIu64 " modules:\n", __PRETTY_FUNCTION__, (uint64_t)count);
for (size_t i=0; i<count; ++i)
{
@@ -263,7 +263,7 @@ Module::GetMemoryObjectFile (const lldb::ProcessSP &process_sp, lldb::addr_t hea
if (m_objfile_sp)
{
StreamString s;
- s.Printf("0x%16.16llx", header_addr);
+ s.Printf("0x%16.16" PRIx64, header_addr);
m_object_name.SetCString (s.GetData());
// Once we get the object file, update our module with the object file's
@@ -429,7 +429,7 @@ bool
Module::ResolveFileAddress (lldb::addr_t vm_addr, Address& so_addr)
{
Mutex::Locker locker (m_mutex);
- Timer scoped_timer(__PRETTY_FUNCTION__, "Module::ResolveFileAddress (vm_addr = 0x%llx)", vm_addr);
+ Timer scoped_timer(__PRETTY_FUNCTION__, "Module::ResolveFileAddress (vm_addr = 0x%" PRIx64 ")", vm_addr);
ObjectFile* ofile = GetObjectFile();
if (ofile)
return so_addr.ResolveAddressUsingFileSections(vm_addr, ofile->GetSectionList());
diff --git a/lldb/source/Core/Opcode.cpp b/lldb/source/Core/Opcode.cpp
index 3793bdee2ae..d9878656e3f 100644
--- a/lldb/source/Core/Opcode.cpp
+++ b/lldb/source/Core/Opcode.cpp
@@ -46,7 +46,7 @@ Opcode::Dump (Stream *s, uint32_t min_byte_width)
break;
case Opcode::eType64:
- bytes_written = s->Printf ("0x%16.16llx", m_data.inst64);
+ bytes_written = s->Printf ("0x%16.16" PRIx64, m_data.inst64);
break;
case Opcode::eTypeBytes:
diff --git a/lldb/source/Core/RegisterValue.cpp b/lldb/source/Core/RegisterValue.cpp
index 5f2e2e599ab..f546e0127d6 100644
--- a/lldb/source/Core/RegisterValue.cpp
+++ b/lldb/source/Core/RegisterValue.cpp
@@ -462,7 +462,7 @@ RegisterValue::SetValueFromCString (const RegisterInfo *reg_info, const char *va
if (!success)
error.SetErrorStringWithFormat ("'%s' is not a valid unsigned integer string value", value_str);
else if (!Args::UInt64ValueIsValidForByteSize (uval64, byte_size))
- error.SetErrorStringWithFormat ("value 0x%llx is too large to fit in a %u byte unsigned integer value", uval64, byte_size);
+ error.SetErrorStringWithFormat ("value 0x%" PRIx64 " is too large to fit in a %u byte unsigned integer value", uval64, byte_size);
else
{
if (!SetUInt (uval64, reg_info->byte_size))
@@ -483,7 +483,7 @@ RegisterValue::SetValueFromCString (const RegisterInfo *reg_info, const char *va
if (!success)
error.SetErrorStringWithFormat ("'%s' is not a valid signed integer string value", value_str);
else if (!Args::SInt64ValueIsValidForByteSize (sval64, byte_size))
- error.SetErrorStringWithFormat ("value 0x%llx is too large to fit in a %u byte signed integer value", sval64, byte_size);
+ error.SetErrorStringWithFormat ("value 0x%" PRIx64 " is too large to fit in a %u byte signed integer value", sval64, byte_size);
else
{
if (!SetUInt (sval64, reg_info->byte_size))
diff --git a/lldb/source/Core/Scalar.cpp b/lldb/source/Core/Scalar.cpp
index eaf0bc502b8..e791236f639 100644
--- a/lldb/source/Core/Scalar.cpp
+++ b/lldb/source/Core/Scalar.cpp
@@ -10,6 +10,7 @@
#include "lldb/Core/Scalar.h"
#include <math.h>
+#include <inttypes.h>
#include "lldb/Interpreter/Args.h"
#include "lldb/Core/Error.h"
@@ -1833,7 +1834,7 @@ Scalar::SetValueFromCString (const char *value_str, Encoding encoding, uint32_t
if (!success)
error.SetErrorStringWithFormat ("'%s' is not a valid unsigned integer string value", value_str);
else if (!UIntValueIsValidForSize (uval64, byte_size))
- error.SetErrorStringWithFormat ("value 0x%llx is too large to fit in a %u byte unsigned integer value", uval64, byte_size);
+ error.SetErrorStringWithFormat ("value 0x%" PRIx64 " is too large to fit in a %u byte unsigned integer value", uval64, byte_size);
else
{
m_type = Scalar::GetValueTypeForUnsignedIntegerWithByteSize (byte_size);
@@ -1862,7 +1863,7 @@ Scalar::SetValueFromCString (const char *value_str, Encoding encoding, uint32_t
if (!success)
error.SetErrorStringWithFormat ("'%s' is not a valid signed integer string value", value_str);
else if (!SIntValueIsValidForSize (sval64, byte_size))
- error.SetErrorStringWithFormat ("value 0x%llx is too large to fit in a %u byte signed integer value", sval64, byte_size);
+ error.SetErrorStringWithFormat ("value 0x%" PRIx64 " is too large to fit in a %u byte signed integer value", sval64, byte_size);
else
{
m_type = Scalar::GetValueTypeForSignedIntegerWithByteSize (byte_size);
diff --git a/lldb/source/Core/Section.cpp b/lldb/source/Core/Section.cpp
index 54bbe17407e..0efa39a03e2 100644
--- a/lldb/source/Core/Section.cpp
+++ b/lldb/source/Core/Section.cpp
@@ -41,7 +41,7 @@ Section::Section (const ModuleSP &module_sp,
m_linked_section_wp(),
m_linked_offset (0)
{
-// printf ("Section::Section(%p): module=%p, sect_id = 0x%16.16llx, addr=[0x%16.16llx - 0x%16.16llx), file [0x%16.16llx - 0x%16.16llx), flags = 0x%8.8x, name = %s\n",
+// printf ("Section::Section(%p): module=%p, sect_id = 0x%16.16" PRIx64 ", addr=[0x%16.16" PRIx64 " - 0x%16.16" PRIx64 "), file [0x%16.16" PRIx64 " - 0x%16.16" PRIx64 "), flags = 0x%8.8x, name = %s\n",
// this, module_sp.get(), sect_id, file_addr, file_addr + byte_size, file_offset, file_offset + file_size, flags, name.GetCString());
}
@@ -72,7 +72,7 @@ Section::Section (const lldb::SectionSP &parent_section_sp,
m_linked_section_wp(),
m_linked_offset (0)
{
-// printf ("Section::Section(%p): module=%p, sect_id = 0x%16.16llx, addr=[0x%16.16llx - 0x%16.16llx), file [0x%16.16llx - 0x%16.16llx), flags = 0x%8.8x, name = %s.%s\n",
+// printf ("Section::Section(%p): module=%p, sect_id = 0x%16.16" PRIx64 ", addr=[0x%16.16" PRIx64 " - 0x%16.16" PRIx64 "), file [0x%16.16" PRIx64 " - 0x%16.16" PRIx64 "), flags = 0x%8.8x, name = %s.%s\n",
// this, module_sp.get(), sect_id, file_addr, file_addr + byte_size, file_offset, file_offset + file_size, flags, parent_section_sp->GetName().GetCString(), name.GetCString());
if (parent_section_sp)
m_parent_wp = parent_section_sp;
@@ -257,7 +257,7 @@ Section::Dump (Stream *s, Target *target, uint32_t depth) const
{
// s->Printf("%.*p: ", (int)sizeof(void*) * 2, this);
s->Indent();
- s->Printf("0x%8.8llx %-16s ", GetID(), GetSectionTypeAsCString (m_type));
+ s->Printf("0x%8.8" PRIx64 " %-16s ", GetID(), GetSectionTypeAsCString (m_type));
bool resolved = true;
addr_t addr = LLDB_INVALID_ADDRESS;
@@ -280,7 +280,7 @@ Section::Dump (Stream *s, Target *target, uint32_t depth) const
range.Dump (s, 0);
}
- s->Printf("%c 0x%8.8llx 0x%8.8llx 0x%8.8x ", resolved ? ' ' : '*', m_file_offset, m_file_size, Get());
+ s->Printf("%c 0x%8.8" PRIx64 " 0x%8.8" PRIx64 " 0x%8.8x ", resolved ? ' ' : '*', m_file_offset, m_file_size, Get());
DumpName (s);
@@ -312,7 +312,7 @@ Section::Dump (Stream *s, Target *target, uint32_t depth) const
s->Printf("%c%*.*s", resolved ? ' ' : '*', indent, indent, "");
linked_section_sp->DumpName(s);
- s->Printf(" + 0x%llx\n", m_linked_offset);
+ s->Printf(" + 0x%" PRIx64 "\n", m_linked_offset);
}
if (depth > 0)
diff --git a/lldb/source/Core/Stream.cpp b/lldb/source/Core/Stream.cpp
index 6e5f99c1105..bb1af7b407c 100644
--- a/lldb/source/Core/Stream.cpp
+++ b/lldb/source/Core/Stream.cpp
@@ -14,6 +14,8 @@
#include <string.h>
#include <stdlib.h>
+#include <inttypes.h>
+
using namespace lldb;
using namespace lldb_private;
@@ -85,7 +87,7 @@ Stream::PutSLEB128 (int64_t sval)
}
else
{
- bytes_written = Printf ("0x%lli", sval);
+ bytes_written = Printf ("0x%" PRIi64, sval);
}
return bytes_written;
@@ -117,7 +119,7 @@ Stream::PutULEB128 (uint64_t uval)
}
else
{
- bytes_written = Printf ("0x%llx", uval);
+ bytes_written = Printf ("0x%" PRIx64, uval);
}
return bytes_written;
}
@@ -157,8 +159,8 @@ Stream::Address (uint64_t addr, int addr_size, const char *prefix, const char *s
if (suffix == NULL)
suffix = "";
// int addr_width = m_addr_size << 1;
-// Printf ("%s0x%0*llx%s", prefix, addr_width, addr, suffix);
- Printf ("%s0x%0*llx%s", prefix, addr_size * 2, (uint64_t)addr, suffix);
+// Printf ("%s0x%0*" PRIx64 "%s", prefix, addr_width, addr, suffix);
+ Printf ("%s0x%0*" PRIx64 "%s", prefix, addr_size * 2, (uint64_t)addr, suffix);
}
//------------------------------------------------------------------
@@ -364,7 +366,7 @@ Stream::operator<< (int32_t sval)
Stream&
Stream::operator<< (int64_t sval)
{
- Printf ("%lli", sval);
+ Printf ("%" PRIi64, sval);
return *this;
}
diff --git a/lldb/source/Core/UserID.cpp b/lldb/source/Core/UserID.cpp
index ad042df8cbc..57ffce9cfff 100644
--- a/lldb/source/Core/UserID.cpp
+++ b/lldb/source/Core/UserID.cpp
@@ -10,6 +10,8 @@
#include "lldb/Core/UserID.h"
#include "lldb/Core/Stream.h"
+#include <inttypes.h>
+
using namespace lldb;
using namespace lldb_private;
@@ -20,6 +22,6 @@ UserID::~UserID ()
Stream&
lldb_private::operator << (Stream& strm, const UserID& uid)
{
- strm.Printf("{0x%8.8llx}", uid.GetID());
+ strm.Printf("{0x%8.8" PRIx64 "}", uid.GetID());
return strm;
}
diff --git a/lldb/source/Core/Value.cpp b/lldb/source/Core/Value.cpp
index 4e31a7bfe2a..b6b4eb76fdc 100644
--- a/lldb/source/Core/Value.cpp
+++ b/lldb/source/Core/Value.cpp
@@ -456,14 +456,14 @@ Value::GetValueAsData (ExecutionContext *exe_ctx,
if (module)
{
if (variable)
- error.SetErrorStringWithFormat ("unable to resolve the module for file address 0x%llx for variable '%s' in %s%s%s",
+ error.SetErrorStringWithFormat ("unable to resolve the module for file address 0x%" PRIx64 " for variable '%s' in %s%s%s",
address,
variable->GetName().AsCString(""),
module->GetFileSpec().GetDirectory().GetCString(),
module->GetFileSpec().GetDirectory() ? "/" : "",
module->GetFileSpec().GetFilename().GetCString());
else
- error.SetErrorStringWithFormat ("unable to resolve the module for file address 0x%llx in %s%s%s",
+ error.SetErrorStringWithFormat ("unable to resolve the module for file address 0x%" PRIx64 " in %s%s%s",
address,
module->GetFileSpec().GetDirectory().GetCString(),
module->GetFileSpec().GetDirectory() ? "/" : "",
@@ -472,11 +472,11 @@ Value::GetValueAsData (ExecutionContext *exe_ctx,
else
{
if (variable)
- error.SetErrorStringWithFormat ("unable to resolve the module for file address 0x%llx for variable '%s'",
+ error.SetErrorStringWithFormat ("unable to resolve the module for file address 0x%" PRIx64 " for variable '%s'",
address,
variable->GetName().AsCString(""));
else
- error.SetErrorStringWithFormat ("unable to resolve the module for file address 0x%llx", address);
+ error.SetErrorStringWithFormat ("unable to resolve the module for file address 0x%" PRIx64, address);
}
}
}
@@ -555,7 +555,7 @@ Value::GetValueAsData (ExecutionContext *exe_ctx,
const bool prefer_file_cache = false;
if (exe_ctx->GetTargetRef().ReadMemory(file_so_addr, prefer_file_cache, dst, byte_size, error) != byte_size)
{
- error.SetErrorStringWithFormat("read memory from 0x%llx failed", (uint64_t)address);
+ error.SetErrorStringWithFormat("read memory from 0x%" PRIx64 " failed", (uint64_t)address);
}
}
else
@@ -570,14 +570,14 @@ Value::GetValueAsData (ExecutionContext *exe_ctx,
{
const size_t bytes_read = process->ReadMemory(address, dst, byte_size, error);
if (bytes_read != byte_size)
- error.SetErrorStringWithFormat("read memory from 0x%llx failed (%u of %u bytes read)",
+ error.SetErrorStringWithFormat("read memory from 0x%" PRIx64 " failed (%u of %u bytes read)",
(uint64_t)address,
(uint32_t)bytes_read,
(uint32_t)byte_size);
}
else
{
- error.SetErrorStringWithFormat("read memory from 0x%llx failed (invalid process)", (uint64_t)address);
+ error.SetErrorStringWithFormat("read memory from 0x%" PRIx64 " failed (invalid process)", (uint64_t)address);
}
}
}
diff --git a/lldb/source/Expression/ClangASTSource.cpp b/lldb/source/Expression/ClangASTSource.cpp
index 81400ffc2b8..2bce5090dca 100644
--- a/lldb/source/Expression/ClangASTSource.cpp
+++ b/lldb/source/Expression/ClangASTSource.cpp
@@ -1431,14 +1431,14 @@ ClangASTSource::layoutRecordType(const RecordDecl *record,
{
log->Printf("LRT[%u] returned:", current_id);
log->Printf("LRT[%u] Original = (RecordDecl*)%p", current_id, origin_record.decl);
- log->Printf("LRT[%u] Size = %lld", current_id, size);
- log->Printf("LRT[%u] Alignment = %lld", current_id, alignment);
+ log->Printf("LRT[%u] Size = %" PRId64, current_id, size);
+ log->Printf("LRT[%u] Alignment = %" PRId64, current_id, alignment);
log->Printf("LRT[%u] Fields:", current_id);
for (RecordDecl::field_iterator fi = record->field_begin(), fe = record->field_end();
fi != fe;
++fi)
{
- log->Printf("LRT[%u] (FieldDecl*)%p, Name = '%s', Offset = %lld bits",
+ log->Printf("LRT[%u] (FieldDecl*)%p, Name = '%s', Offset = %" PRId64 " bits",
current_id,
*fi,
fi->getNameAsString().c_str(),
@@ -1459,7 +1459,7 @@ ClangASTSource::layoutRecordType(const RecordDecl *record,
DeclFromParser <RecordDecl> base_record(base_record_type->getDecl());
DeclFromParser <CXXRecordDecl> base_cxx_record = DynCast<CXXRecordDecl>(base_record);
- log->Printf("LRT[%u] %s(CXXRecordDecl*)%p, Name = '%s', Offset = %lld chars",
+ log->Printf("LRT[%u] %s(CXXRecordDecl*)%p, Name = '%s', Offset = %" PRId64 " chars",
current_id,
(is_virtual ? "Virtual " : ""),
base_cxx_record.decl,
diff --git a/lldb/source/Expression/ClangExpressionDeclMap.cpp b/lldb/source/Expression/ClangExpressionDeclMap.cpp
index dd39fa1e35b..cdbffbf1898 100644
--- a/lldb/source/Expression/ClangExpressionDeclMap.cpp
+++ b/lldb/source/Expression/ClangExpressionDeclMap.cpp
@@ -1499,7 +1499,7 @@ ClangExpressionDeclMap::DoMaterialize
if (mem == LLDB_INVALID_ADDRESS)
{
- err.SetErrorStringWithFormat("Couldn't allocate 0x%llx bytes for materialized argument struct",
+ err.SetErrorStringWithFormat("Couldn't allocate 0x%llx bytes for materialized argument struct",
(unsigned long long)(m_struct_vars->m_struct_alignment + m_struct_vars->m_struct_size));
return false;
}
@@ -1683,7 +1683,7 @@ ClangExpressionDeclMap::DoMaterializeOnePersistentVariable
mem = var_sp->m_live_sp->GetValue().GetScalar().ULongLong();
if (log)
- log->Printf("Dematerializing %s from 0x%llx (size = %u)", var_sp->GetName().GetCString(), (uint64_t)mem, (unsigned)pvar_byte_size);
+ log->Printf("Dematerializing %s from 0x%" PRIx64 " (size = %u)", var_sp->GetName().GetCString(), (uint64_t)mem, (unsigned)pvar_byte_size);
// Read the contents of the spare memory area
@@ -1758,7 +1758,7 @@ ClangExpressionDeclMap::DoMaterializeOnePersistentVariable
}
if (log)
- log->Printf("Allocated %s (0x%llx) sucessfully", var_sp->GetName().GetCString(), mem);
+ log->Printf("Allocated %s (0x%" PRIx64 ") sucessfully", var_sp->GetName().GetCString(), mem);
// Put the location of the spare memory into the live data of the ValueObject.
@@ -3398,7 +3398,7 @@ ClangExpressionDeclMap::AddOneFunction (NameSearchContext &context,
// We failed to copy the type we found
if (log)
{
- log->Printf (" Failed to import the function type '%s' {0x%8.8llx} into the expression parser AST contenxt",
+ log->Printf (" Failed to import the function type '%s' {0x%8.8" PRIx64 "} into the expression parser AST contenxt",
fun_type->GetName().GetCString(),
fun_type->GetID());
}
diff --git a/lldb/source/Expression/ClangExpressionParser.cpp b/lldb/source/Expression/ClangExpressionParser.cpp
index 5acd4b680ce..6904bcaa679 100644
--- a/lldb/source/Expression/ClangExpressionParser.cpp
+++ b/lldb/source/Expression/ClangExpressionParser.cpp
@@ -733,7 +733,7 @@ ClangExpressionParser::DisassembleFunction (Stream &stream, ExecutionContext &ex
}
if (log)
- log->Printf("Found function, has local address 0x%llx and remote address 0x%llx", (uint64_t)func_local_addr, (uint64_t)func_remote_addr);
+ log->Printf("Found function, has local address 0x%" PRIx64 " and remote address 0x%" PRIx64, (uint64_t)func_local_addr, (uint64_t)func_remote_addr);
std::pair <lldb::addr_t, lldb::addr_t> func_range;
@@ -747,7 +747,7 @@ ClangExpressionParser::DisassembleFunction (Stream &stream, ExecutionContext &ex
}
if (log)
- log->Printf("Function's code range is [0x%llx+0x%llx]", func_range.first, func_range.second);
+ log->Printf("Function's code range is [0x%" PRIx64 "+0x%" PRIx64 "]", func_range.first, func_range.second);
Target *target = exe_ctx.GetTargetPtr();
if (!target)
diff --git a/lldb/source/Expression/ClangFunction.cpp b/lldb/source/Expression/ClangFunction.cpp
index 1909dc2c848..988bad528b9 100644
--- a/lldb/source/Expression/ClangFunction.cpp
+++ b/lldb/source/Expression/ClangFunction.cpp
@@ -186,7 +186,7 @@ ClangFunction::CompileFunction (Stream &errors)
char arg_buf[32];
args_buffer.append (" ");
args_buffer.append (type_name);
- snprintf(arg_buf, 31, "arg_%llu", (uint64_t)i);
+ snprintf(arg_buf, 31, "arg_%" PRIu64, (uint64_t)i);
args_buffer.push_back (' ');
args_buffer.append (arg_buf);
args_buffer.append (";\n");
@@ -389,7 +389,7 @@ ClangFunction::InsertFunction (ExecutionContext &exe_ctx, lldb::addr_t &args_add
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
if (log)
- log->Printf ("Call Address: 0x%llx Struct Address: 0x%llx.\n", m_jit_start_addr, args_addr_ref);
+ log->Printf ("Call Address: 0x%" PRIx64 " Struct Address: 0x%" PRIx64 ".\n", m_jit_start_addr, args_addr_ref);
return true;
}
diff --git a/lldb/source/Expression/ClangUserExpression.cpp b/lldb/source/Expression/ClangUserExpression.cpp
index 9dfd0998a25..91cb886f126 100644
--- a/lldb/source/Expression/ClangUserExpression.cpp
+++ b/lldb/source/Expression/ClangUserExpression.cpp
@@ -463,19 +463,19 @@ ClangUserExpression::PrepareToExecuteJITExpression (Stream &error_stream,
#if 0
// jingham: look here
StreamFile logfile ("/tmp/exprs.txt", "a");
- logfile.Printf("0x%16.16llx: thread = 0x%4.4x, expr = '%s'\n", m_jit_start_addr, exe_ctx.thread ? exe_ctx.thread->GetID() : -1, m_expr_text.c_str());
+ logfile.Printf("0x%16.16" PRIx64 ": thread = 0x%4.4x, expr = '%s'\n", m_jit_start_addr, exe_ctx.thread ? exe_ctx.thread->GetID() : -1, m_expr_text.c_str());
#endif
if (log)
{
log->Printf("-- [ClangUserExpression::PrepareToExecuteJITExpression] Materializing for execution --");
- log->Printf(" Function address : 0x%llx", (uint64_t)m_jit_start_addr);
+ log->Printf(" Function address : 0x%" PRIx64, (uint64_t)m_jit_start_addr);
if (m_needs_object_ptr)
- log->Printf(" Object pointer : 0x%llx", (uint64_t)object_ptr);
+ log->Printf(" Object pointer : 0x%" PRIx64, (uint64_t)object_ptr);
- log->Printf(" Structure address : 0x%llx", (uint64_t)struct_address);
+ log->Printf(" Structure address : 0x%" PRIx64, (uint64_t)struct_address);
StreamString args;
diff --git a/lldb/source/Expression/ClangUtilityFunction.cpp b/lldb/source/Expression/ClangUtilityFunction.cpp
index b2f13f11f8a..fd78f6e0b89 100644
--- a/lldb/source/Expression/ClangUtilityFunction.cpp
+++ b/lldb/source/Expression/ClangUtilityFunction.cpp
@@ -153,7 +153,7 @@ ClangUtilityFunction::Install (Stream &error_stream,
#if 0
// jingham: look here
StreamFile logfile ("/tmp/exprs.txt", "a");
- logfile.Printf ("0x%16.16llx: func = %s, source =\n%s\n",
+ logfile.Printf ("0x%16.16" PRIx64 ": func = %s, source =\n%s\n",
m_jit_start_addr,
m_function_name.c_str(),
m_function_text.c_str());
diff --git a/lldb/source/Expression/DWARFExpression.cpp b/lldb/source/Expression/DWARFExpression.cpp
index b044143a9a5..538afb71d56 100644
--- a/lldb/source/Expression/DWARFExpression.cpp
+++ b/lldb/source/Expression/DWARFExpression.cpp
@@ -322,10 +322,10 @@ DWARFExpression::DumpLocation (Stream *s, uint32_t offset, uint32_t length, lldb
case DW_OP_const2s: s->Printf("DW_OP_const2s(0x%4.4x) ", m_data.GetU16(&offset)); break; // 0x0b 1 2-byte constant
case DW_OP_const4u: s->Printf("DW_OP_const4u(0x%8.8x) ", m_data.GetU32(&offset)); break; // 0x0c 1 4-byte constant
case DW_OP_const4s: s->Printf("DW_OP_const4s(0x%8.8x) ", m_data.GetU32(&offset)); break; // 0x0d 1 4-byte constant
- case DW_OP_const8u: s->Printf("DW_OP_const8u(0x%16.16llx) ", m_data.GetU64(&offset)); break; // 0x0e 1 8-byte constant
- case DW_OP_const8s: s->Printf("DW_OP_const8s(0x%16.16llx) ", m_data.GetU64(&offset)); break; // 0x0f 1 8-byte constant
- case DW_OP_constu: s->Printf("DW_OP_constu(0x%llx) ", m_data.GetULEB128(&offset)); break; // 0x10 1 ULEB128 constant
- case DW_OP_consts: s->Printf("DW_OP_consts(0x%lld) ", m_data.GetSLEB128(&offset)); break; // 0x11 1 SLEB128 constant
+ case DW_OP_const8u: s->Printf("DW_OP_const8u(0x%16.16" PRIx64 ") ", m_data.GetU64(&offset)); break; // 0x0e 1 8-byte constant
+ case DW_OP_const8s: s->Printf("DW_OP_const8s(0x%16.16" PRIx64 ") ", m_data.GetU64(&offset)); break; // 0x0f 1 8-byte constant
+ case DW_OP_constu: s->Printf("DW_OP_constu(0x%" PRIx64 ") ", m_data.GetULEB128(&offset)); break; // 0x10 1 ULEB128 constant
+ case DW_OP_consts: s->Printf("DW_OP_consts(0x%" PRId64 ") ", m_data.GetSLEB128(&offset)); break; // 0x11 1 SLEB128 constant
case DW_OP_dup: s->PutCString("DW_OP_dup"); break; // 0x12
case DW_OP_drop: s->PutCString("DW_OP_drop"); break; // 0x13
case DW_OP_over: s->PutCString("DW_OP_over"); break; // 0x14
@@ -344,7 +344,7 @@ DWARFExpression::DumpLocation (Stream *s, uint32_t offset, uint32_t length, lldb
case DW_OP_or: s->PutCString("DW_OP_or"); break; // 0x21
case DW_OP_plus: s->PutCString("DW_OP_plus"); break; // 0x22
case DW_OP_plus_uconst: // 0x23 1 ULEB128 addend
- s->Printf("DW_OP_plus_uconst(0x%llx) ", m_data.GetULEB128(&offset));
+ s->Printf("DW_OP_plus_uconst(0x%" PRIx64 ") ", m_data.GetULEB128(&offset));
break;
case DW_OP_shl: s->PutCString("DW_OP_shl"); break; // 0x24
@@ -490,17 +490,17 @@ DWARFExpression::DumpLocation (Stream *s, uint32_t offset, uint32_t length, lldb
{
if (reg_info.name)
{
- s->Printf("[%s%+lli]", reg_info.name, reg_offset);
+ s->Printf("[%s%+" PRIi64 "]", reg_info.name, reg_offset);
break;
}
else if (reg_info.alt_name)
{
- s->Printf("[%s%+lli]", reg_info.alt_name, reg_offset);
+ s->Printf("[%s%+" PRIi64 "]", reg_info.alt_name, reg_offset);
break;
}
}
}
- s->Printf("DW_OP_breg%i(0x%llx)", reg_num, reg_offset);
+ s->Printf("DW_OP_breg%i(0x%" PRIx64 ")", reg_num, reg_offset);
}
break;
@@ -524,11 +524,11 @@ DWARFExpression::DumpLocation (Stream *s, uint32_t offset, uint32_t length, lldb
}
}
}
- s->Printf("DW_OP_regx(%llu)", reg_num); break;
+ s->Printf("DW_OP_regx(%" PRIu64 ")", reg_num); break;
}
break;
case DW_OP_fbreg: // 0x91 1 SLEB128 offset
- s->Printf("DW_OP_fbreg(%lli)",m_data.GetSLEB128(&offset));
+ s->Printf("DW_OP_fbreg(%" PRIi64 ")",m_data.GetSLEB128(&offset));
break;
case DW_OP_bregx: // 0x92 2 ULEB128 register followed by SLEB128 offset
{
@@ -541,21 +541,21 @@ DWARFExpression::DumpLocation (Stream *s, uint32_t offset, uint32_t length, lldb
{
if (reg_info.name)
{
- s->Printf("[%s%+lli]", reg_info.name, reg_offset);
+ s->Printf("[%s%+" PRIi64 "]", reg_info.name, reg_offset);
break;
}
else if (reg_info.alt_name)
{
- s->Printf("[%s%+lli]", reg_info.alt_name, reg_offset);
+ s->Printf("[%s%+" PRIi64 "]", reg_info.alt_name, reg_offset);
break;
}
}
}
- s->Printf("DW_OP_bregx(reg=%u,offset=%lli)", reg_num, reg_offset);
+ s->Printf("DW_OP_bregx(reg=%u,offset=%" PRIi64 ")", reg_num, reg_offset);
}
break;
case DW_OP_piece: // 0x93 1 ULEB128 size of piece addressed
- s->Printf("DW_OP_piece(0x%llx)", m_data.GetULEB128(&offset));
+ s->Printf("DW_OP_piece(0x%" PRIx64 ")", m_data.GetULEB128(&offset));
break;
case DW_OP_deref_size: // 0x94 1 1-byte size of data retrieved
s->Printf("DW_OP_deref_size(0x%2.2x)", m_data.GetU8(&offset));
@@ -572,7 +572,7 @@ DWARFExpression::DumpLocation (Stream *s, uint32_t offset, uint32_t length, lldb
s->Printf("DW_OP_call4(0x%8.8x)", m_data.GetU32(&offset));
break;
case DW_OP_call_ref: // 0x9a DWARF3 1 4- or 8-byte offset of DIE
- s->Printf("DW_OP_call_ref(0x%8.8llx)", m_data.GetAddress(&offset));
+ s->Printf("DW_OP_call_ref(0x%8.8" PRIx64 ")", m_data.GetAddress(&offset));
break;
// case DW_OP_form_tls_address: s << "form_tls_address"; break; // 0x9b DWARF3
// case DW_OP_call_frame_cfa: s << "call_frame_cfa"; break; // 0x9c DWARF3
@@ -582,7 +582,7 @@ DWARFExpression::DumpLocation (Stream *s, uint32_t offset, uint32_t length, lldb
// case DW_OP_lo_user: s->PutCString("DW_OP_lo_user"); break; // 0xe0
// case DW_OP_hi_user: s->PutCString("DW_OP_hi_user"); break; // 0xff
// case DW_OP_APPLE_extern:
-// s->Printf("DW_OP_APPLE_extern(%llu)", m_data.GetULEB128(&offset));
+// s->Printf("DW_OP_APPLE_extern(%" PRIu64 ")", m_data.GetULEB128(&offset));
// break;
// case DW_OP_APPLE_array_ref:
// s->PutCString("DW_OP_APPLE_array_ref");
@@ -603,7 +603,7 @@ DWARFExpression::DumpLocation (Stream *s, uint32_t offset, uint32_t length, lldb
// s->PutCString("DW_OP_APPLE_deref_type");
// break;
// case DW_OP_APPLE_expr_local: // 0xF5 - ULEB128 expression local index
-// s->Printf("DW_OP_APPLE_expr_local(%llu)", m_data.GetULEB128(&offset));
+// s->Printf("DW_OP_APPLE_expr_local(%" PRIu64 ")", m_data.GetULEB128(&offset));
// break;
// case DW_OP_APPLE_constf: // 0xF6 - 1 byte float size, followed by constant float data
// {
@@ -1345,7 +1345,7 @@ DWARFExpression::Evaluate
for (size_t i=0; i<count; ++i)
{
StreamString new_value;
- new_value.Printf("[%llu]", (uint64_t)i);
+ new_value.Printf("[%" PRIu64 "]", (uint64_t)i);
stack[i].Dump(&new_value);
log->Printf(" %s", new_value.GetData());
}
@@ -1438,7 +1438,7 @@ DWARFExpression::Evaluate
else
{
if (error_ptr)
- error_ptr->SetErrorStringWithFormat ("Failed to dereference pointer from 0x%llx for DW_OP_deref: %s\n",
+ error_ptr->SetErrorStringWithFormat ("Failed to dereference pointer from 0x%" PRIx64 " for DW_OP_deref: %s\n",
pointer_addr,
error.AsCString());
return false;
@@ -1536,7 +1536,7 @@ DWARFExpression::Evaluate
else
{
if (error_ptr)
- error_ptr->SetErrorStringWithFormat ("Failed to dereference pointer from 0x%llx for DW_OP_deref: %s\n",
+ error_ptr->SetErrorStringWithFormat ("Failed to dereference pointer from 0x%" PRIx64 " for DW_OP_deref: %s\n",
pointer_addr,
error.AsCString());
return false;
@@ -2709,7 +2709,7 @@ DWARFExpression::Evaluate
if (size && (index >= size || index < 0))
{
if (error_ptr)
- error_ptr->SetErrorStringWithFormat("Out of bounds array access. %lld is not in [0, %llu]", index, size);
+ error_ptr->SetErrorStringWithFormat("Out of bounds array access. %" PRId64 " is not in [0, %" PRIu64 "]", index, size);
return false;
}
@@ -2892,7 +2892,7 @@ DWARFExpression::Evaluate
new_value))
{
if (error_ptr)
- error_ptr->SetErrorStringWithFormat ("Failed to write value to memory at 0x%llx.\n", addr);
+ error_ptr->SetErrorStringWithFormat ("Failed to write value to memory at 0x%" PRIx64 ".\n", addr);
return false;
}
}
@@ -3186,7 +3186,7 @@ DWARFExpression::Evaluate
for (size_t i=0; i<count; ++i)
{
StreamString new_value;
- new_value.Printf("[%llu]", (uint64_t)i);
+ new_value.Printf("[%" PRIu64 "]", (uint64_t)i);
stack[i].Dump(&new_value);
log->Printf(" %s", new_value.GetData());
}
diff --git a/lldb/source/Expression/IRForTarget.cpp b/lldb/source/Expression/IRForTarget.cpp
index ef76b9da720..1217871993b 100644
--- a/lldb/source/Expression/IRForTarget.cpp
+++ b/lldb/source/Expression/IRForTarget.cpp
@@ -294,7 +294,7 @@ IRForTarget::GetFunctionAddress (llvm::Function *fun,
}
if (log)
- log->Printf("Found \"%s\" at 0x%llx", name.GetCString(), fun_addr);
+ log->Printf("Found \"%s\" at 0x%" PRIx64, name.GetCString(), fun_addr);
return true;
}
@@ -869,7 +869,7 @@ IRForTarget::RewriteObjCConstString (llvm::GlobalVariable *ns_str,
}
if (log)
- log->Printf("Found CFStringCreateWithBytes at 0x%llx", CFStringCreateWithBytes_addr);
+ log->Printf("Found CFStringCreateWithBytes at 0x%" PRIx64, CFStringCreateWithBytes_addr);
// Build the function type:
//
@@ -1262,7 +1262,7 @@ IRForTarget::RewriteObjCSelector (Instruction* selector_load)
return false;
if (log)
- log->Printf("Found sel_registerName at 0x%llx", sel_registerName_addr);
+ log->Printf("Found sel_registerName at 0x%" PRIx64, sel_registerName_addr);
// Build the function type: struct objc_selector *sel_registerName(uint8_t*)
@@ -1678,7 +1678,7 @@ IRForTarget::MaybeHandleVariable (Value *llvm_value_ptr)
off_t value_alignment = (ast_context->getTypeAlign(qual_type) + 7) / 8;
if (log)
- log->Printf("Type of \"%s\" is [clang \"%s\", llvm \"%s\"] [size %lu, align %lld]",
+ log->Printf("Type of \"%s\" is [clang \"%s\", llvm \"%s\"] [size %lu, align %" PRId64 "]",
name.c_str(),
qual_type.getAsString().c_str(),
PrintType(value_type).c_str(),
@@ -1728,7 +1728,7 @@ IRForTarget::HandleSymbol (Value *symbol)
}
if (log)
- log->Printf("Found \"%s\" at 0x%llx", name.GetCString(), symbol_addr);
+ log->Printf("Found \"%s\" at 0x%" PRIx64, name.GetCString(), symbol_addr);
Type *symbol_type = symbol->getType();
IntegerType *intptr_ty = Type::getIntNTy(m_module->getContext(),
@@ -2529,7 +2529,7 @@ IRForTarget::ReplaceVariables (Function &llvm_function)
}
if (log)
- log->Printf(" \"%s\" (\"%s\") placed at %lld",
+ log->Printf(" \"%s\" (\"%s\") placed at %" PRId64,
name.GetCString(),
decl->getNameAsString().c_str(),
offset);
@@ -2573,7 +2573,7 @@ IRForTarget::ReplaceVariables (Function &llvm_function)
}
if (log)
- log->Printf("Total structure [align %lld, size %lu]", alignment, size);
+ log->Printf("Total structure [align %" PRId64 ", size %lu]", alignment, size);
return true;
}
diff --git a/lldb/source/Expression/IRInterpreter.cpp b/lldb/source/Expression/IRInterpreter.cpp
index 4211c876bc6..b30b066a137 100644
--- a/lldb/source/Expression/IRInterpreter.cpp
+++ b/lldb/source/Expression/IRInterpreter.cpp
@@ -389,7 +389,7 @@ public:
lldb_private::Value base = GetAccessTarget(region.m_base);
- ss.Printf("%llx [%s - %s %llx]",
+ ss.Printf("%" PRIx64 " [%s - %s %llx]",
region.m_base,
lldb_private::Value::GetValueTypeAsCString(base.GetValueType()),
lldb_private::Value::GetContextTypeAsCString(base.GetContextType()),
diff --git a/lldb/source/Expression/RecordingMemoryManager.cpp b/lldb/source/Expression/RecordingMemoryManager.cpp
index 4d9c7219b07..6dc202959f2 100644
--- a/lldb/source/Expression/RecordingMemoryManager.cpp
+++ b/lldb/source/Expression/RecordingMemoryManager.cpp
@@ -89,7 +89,7 @@ RecordingMemoryManager::allocateSpace(intptr_t Size, unsigned Alignment)
if (m_log)
{
- m_log->Printf("RecordingMemoryManager::allocateSpace(Size=%llu, Alignment=%u) = %p",
+ m_log->Printf("RecordingMemoryManager::allocateSpace(Size=%" PRIu64 ", Alignment=%u) = %p",
(uint64_t)Size, Alignment, return_value);
allocation.dump(m_log);
}
@@ -113,7 +113,7 @@ RecordingMemoryManager::allocateCodeSection(uintptr_t Size, unsigned Alignment,
if (m_log)
{
- m_log->Printf("RecordingMemoryManager::allocateCodeSection(Size=0x%llx, Alignment=%u, SectionID=%u) = %p",
+ m_log->Printf("RecordingMemoryManager::allocateCodeSection(Size=0x%" PRIx64 ", Alignment=%u, SectionID=%u) = %p",
(uint64_t)Size, Alignment, SectionID, return_value);
allocation.dump(m_log);
}
@@ -136,7 +136,7 @@ RecordingMemoryManager::allocateDataSection(uintptr_t Size, unsigned Alignment,
if (m_log)
{
- m_log->Printf("RecordingMemoryManager::allocateDataSection(Size=0x%llx, Alignment=%u, SectionID=%u) = %p",
+ m_log->Printf("RecordingMemoryManager::allocateDataSection(Size=0x%" PRIx64 ", Alignment=%u, SectionID=%u) = %p",
(uint64_t)Size, Alignment, SectionID, return_value);
allocation.dump(m_log);
}
@@ -158,7 +158,7 @@ RecordingMemoryManager::allocateGlobal(uintptr_t Size, unsigned Alignment)
if (m_log)
{
- m_log->Printf("RecordingMemoryManager::allocateGlobal(Size=0x%llx, Alignment=%u) = %p",
+ m_log->Printf("RecordingMemoryManager::allocateGlobal(Size=0x%" PRIx64 ", Alignment=%u) = %p",
(uint64_t)Size, Alignment, return_value);
allocation.dump(m_log);
}
diff --git a/lldb/source/Host/common/Host.cpp b/lldb/source/Host/common/Host.cpp
index 8fdec86c4d6..875b5796ffc 100644
--- a/lldb/source/Host/common/Host.cpp
+++ b/lldb/source/Host/common/Host.cpp
@@ -89,7 +89,7 @@ Host::StartMonitoringChildProcess
info_ptr->monitor_signals = monitor_signals;
char thread_name[256];
- ::snprintf (thread_name, sizeof(thread_name), "<lldb.host.wait4(pid=%i)>", pid);
+ ::snprintf (thread_name, sizeof(thread_name), "<lldb.host.wait4(pid=%" PRIu64 ")>", pid);
thread = ThreadCreate (thread_name,
MonitorChildProcessThreadFunction,
info_ptr,
@@ -149,7 +149,7 @@ MonitorChildProcessThreadFunction (void *arg)
{
log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS);
if (log)
- log->Printf("%s ::wait_pid (pid = %i, &status, options = %i)...", function, pid, options);
+ log->Printf("%s ::wait_pid (pid = %" PRIu64 ", &status, options = %i)...", function, pid, options);
// Wait for all child processes
::pthread_testcancel ();
@@ -198,7 +198,7 @@ MonitorChildProcessThreadFunction (void *arg)
log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS);
if (log)
- log->Printf ("%s ::waitpid (pid = %i, &status, options = %i) => pid = %i, status = 0x%8.8x (%s), signal = %i, exit_state = %i",
+ log->Printf ("%s ::waitpid (pid = %" PRIu64 ", &status, options = %i) => pid = %" PRIu64 ", status = 0x%8.8x (%s), signal = %i, exit_state = %i",
function,
wait_pid,
options,
diff --git a/lldb/source/Host/common/Mutex.cpp b/lldb/source/Host/common/Mutex.cpp
index ef7cde46332..5382334f29b 100644
--- a/lldb/source/Host/common/Mutex.cpp
+++ b/lldb/source/Host/common/Mutex.cpp
@@ -275,7 +275,7 @@ Mutex::GetMutex()
int
Mutex::Lock()
{
- DEBUG_LOG ("[%4.4llx/%4.4llx] pthread_mutex_lock (%p)...\n", Host::GetCurrentProcessID(), Host::GetCurrentThreadID(), &m_mutex);
+ DEBUG_LOG ("[%4.4" PRIx64 "/%4.4" PRIx64 "] pthread_mutex_lock (%p)...\n", Host::GetCurrentProcessID(), Host::GetCurrentThreadID(), &m_mutex);
#if ENABLE_MUTEX_ERROR_CHECKING
error_check_mutex (&m_mutex, eMutexActionAssertInitialized);
@@ -291,7 +291,7 @@ Mutex::Lock()
assert(err == 0);
}
#endif
- DEBUG_LOG ("[%4.4llx/%4.4llx] pthread_mutex_lock (%p) => %i\n", Host::GetCurrentProcessID(), Host::GetCurrentThreadID(), &m_mutex, err);
+ DEBUG_LOG ("[%4.4" PRIx64 "/%4.4" PRIx64 "] pthread_mutex_lock (%p) => %i\n", Host::GetCurrentProcessID(), Host::GetCurrentThreadID(), &m_mutex, err);
return err;
}
@@ -311,7 +311,7 @@ Mutex::TryLock(const char *failure_message)
#endif
int err = ::pthread_mutex_trylock (&m_mutex);
- DEBUG_LOG ("[%4.4llx/%4.4llx] pthread_mutex_trylock (%p) => %i\n", Host::GetCurrentProcessID(), Host::GetCurrentThreadID(), &m_mutex, err);
+ DEBUG_LOG ("[%4.4" PRIx64 "/%4.4" PRIx64 "] pthread_mutex_trylock (%p) => %i\n", Host::GetCurrentProcessID(), Host::GetCurrentThreadID(), &m_mutex, err);
return err;
}
@@ -340,7 +340,7 @@ Mutex::Unlock()
assert(err == 0);
}
#endif
- DEBUG_LOG ("[%4.4llx/%4.4llx] pthread_mutex_unlock (%p) => %i\n", Host::GetCurrentProcessID(), Host::GetCurrentThreadID(), &m_mutex, err);
+ DEBUG_LOG ("[%4.4" PRIx64 "/%4.4" PRIx64 "] pthread_mutex_unlock (%p) => %i\n", Host::GetCurrentProcessID(), Host::GetCurrentThreadID(), &m_mutex, err);
return err;
}
diff --git a/lldb/source/Host/linux/Host.cpp b/lldb/source/Host/linux/Host.cpp
index 432dfd509de..a418f38eb08 100644
--- a/lldb/source/Host/linux/Host.cpp
+++ b/lldb/source/Host/linux/Host.cpp
@@ -65,7 +65,7 @@ Host::GetAuxvData(lldb_private::Process *process)
// dynamically generated by the kernel) which is incompatible with the
// current ReadFileContents implementation. Therefore we simply stream the
// data into a DataBuffer ourselves.
- if (snprintf(path, path_size, "/proc/%d/auxv", process->GetID()) < 0)
+ if (snprintf(path, path_size, "/proc/%" PRIu64 "/auxv", process->GetID()) < 0)
return buf_sp;
if ((fd = open(path, O_RDONLY, 0)) < 0)
diff --git a/lldb/source/Interpreter/OptionValueArray.cpp b/lldb/source/Interpreter/OptionValueArray.cpp
index 1776b83cda5..9a015580bd6 100644
--- a/lldb/source/Interpreter/OptionValueArray.cpp
+++ b/lldb/source/Interpreter/OptionValueArray.cpp
@@ -126,9 +126,9 @@ OptionValueArray::GetSubValue (const ExecutionContext *exe_ctx,
if (array_count == 0)
error.SetErrorStringWithFormat("index %i is not valid for an empty array", idx);
else if (idx > 0)
- error.SetErrorStringWithFormat("index %i out of range, valid values are 0 through %llu", idx, (uint64_t)(array_count - 1));
+ error.SetErrorStringWithFormat("index %i out of range, valid values are 0 through %" PRIu64, idx, (uint64_t)(array_count - 1));
else
- error.SetErrorStringWithFormat("negative index %i out of range, valid values are -1 through -%llu", idx, (uint64_t)array_count);
+ error.SetErrorStringWithFormat("negative index %i out of range, valid values are -1 through -%" PRIu64, idx, (uint64_t)array_count);
}
}
}
diff --git a/lldb/source/Interpreter/OptionValueEnumeration.cpp b/lldb/source/Interpreter/OptionValueEnumeration.cpp
index 03314172931..f282235d58e 100644
--- a/lldb/source/Interpreter/OptionValueEnumeration.cpp
+++ b/lldb/source/Interpreter/OptionValueEnumeration.cpp
@@ -50,7 +50,7 @@ OptionValueEnumeration::DumpValue (const ExecutionContext *exe_ctx, Stream &strm
return;
}
}
- strm.Printf("%llu", (uint64_t)m_current_value);
+ strm.Printf("%" PRIu64, (uint64_t)m_current_value);
}
}
diff --git a/lldb/source/Interpreter/OptionValueSInt64.cpp b/lldb/source/Interpreter/OptionValueSInt64.cpp
index 9d7f4cc58af..04bf9306ade 100644
--- a/lldb/source/Interpreter/OptionValueSInt64.cpp
+++ b/lldb/source/Interpreter/OptionValueSInt64.cpp
@@ -22,7 +22,7 @@ using namespace lldb_private;
void
OptionValueSInt64::DumpValue (const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask)
{
- //printf ("%p: DumpValue (exe_ctx=%p, strm, mask) m_current_value = %lli\n", this, exe_ctx, m_current_value);
+ //printf ("%p: DumpValue (exe_ctx=%p, strm, mask) m_current_value = %" PRIi64 "\n", this, exe_ctx, m_current_value);
if (dump_mask & eDumpOptionType)
strm.Printf ("(%s)", GetTypeAsCString ());
// if (dump_mask & eDumpOptionName)
@@ -31,7 +31,7 @@ OptionValueSInt64::DumpValue (const ExecutionContext *exe_ctx, Stream &strm, uin
{
if (dump_mask & eDumpOptionType)
strm.PutCString (" = ");
- strm.Printf ("%lli", m_current_value);
+ strm.Printf ("%" PRIi64, m_current_value);
}
}
@@ -59,7 +59,7 @@ OptionValueSInt64::SetValueFromCString (const char *value_cstr, VarSetOperationT
m_current_value = value;
}
else
- error.SetErrorStringWithFormat ("%lli is out of range, valid values must be between %lli and %lli.",
+ error.SetErrorStringWithFormat ("%" PRIi64 " is out of range, valid values must be between %" PRIi64 " and %" PRIi64 ".",
value,
m_min_value,
m_max_value);
diff --git a/lldb/source/Interpreter/OptionValueUInt64.cpp b/lldb/source/Interpreter/OptionValueUInt64.cpp
index 59f1e5f4189..56b3a1c7470 100644
--- a/lldb/source/Interpreter/OptionValueUInt64.cpp
+++ b/lldb/source/Interpreter/OptionValueUInt64.cpp
@@ -39,7 +39,7 @@ OptionValueUInt64::DumpValue (const ExecutionContext *exe_ctx, Stream &strm, uin
{
if (dump_mask & eDumpOptionType)
strm.PutCString (" = ");
- strm.Printf ("%llu", m_current_value);
+ strm.Printf ("%" PRIu64, m_current_value);
}
}
diff --git a/lldb/source/Interpreter/ScriptInterpreterPython.cpp b/lldb/source/Interpreter/ScriptInterpreterPython.cpp
index 638720e93a5..07258dd9734 100644
--- a/lldb/source/Interpreter/ScriptInterpreterPython.cpp
+++ b/lldb/source/Interpreter/ScriptInterpreterPython.cpp
@@ -334,7 +334,7 @@ ScriptInterpreterPython::PythonInputReaderManager::InputReaderCallback
if (IS_VALID_LLDB_HOST_THREAD(embedded_interpreter_thread))
{
if (log)
- log->Printf ("ScriptInterpreterPython::NonInteractiveInputReaderCallback, Activate, succeeded in creating thread (thread_t = %p)", embedded_interpreter_thread);
+ log->Printf ("ScriptInterpreterPython::NonInteractiveInputReaderCallback, Activate, succeeded in creating thread (thread_t = %p)", (void *)embedded_interpreter_thread);
Error detach_error;
Host::ThreadDetach (embedded_interpreter_thread, &detach_error);
}
@@ -493,7 +493,7 @@ ScriptInterpreterPython::ScriptInterpreterPython (CommandInterpreter &interprete
Debugger::Terminate();
run_string.Clear();
- run_string.Printf ("run_one_line (%s, 'lldb.debugger_unique_id = %llu; pydoc.pager = pydoc.plainpager')", m_dictionary_name.c_str(),
+ run_string.Printf ("run_one_line (%s, 'lldb.debugger_unique_id = %" PRIu64 "; pydoc.pager = pydoc.plainpager')", m_dictionary_name.c_str(),
interpreter.GetDebugger().GetID());
PyRun_SimpleString (run_string.GetData());
@@ -614,8 +614,8 @@ ScriptInterpreterPython::EnterSession ()
StreamString run_string;
- run_string.Printf ( "run_one_line (%s, 'lldb.debugger_unique_id = %llu", m_dictionary_name.c_str(), GetCommandInterpreter().GetDebugger().GetID());
- run_string.Printf ( "; lldb.debugger = lldb.SBDebugger.FindDebuggerWithID (%llu)", GetCommandInterpreter().GetDebugger().GetID());
+ run_string.Printf ( "run_one_line (%s, 'lldb.debugger_unique_id = %" PRIu64, m_dictionary_name.c_str(), GetCommandInterpreter().GetDebugger().GetID());
+ run_string.Printf ( "; lldb.debugger = lldb.SBDebugger.FindDebuggerWithID (%" PRIu64 ")", GetCommandInterpreter().GetDebugger().GetID());
run_string.PutCString ("; lldb.target = lldb.debugger.GetSelectedTarget()");
run_string.PutCString ("; lldb.process = lldb.target.GetProcess()");
run_string.PutCString ("; lldb.thread = lldb.process.GetSelectedThread ()");
@@ -859,7 +859,7 @@ ScriptInterpreterPython::InputReaderCallback
if (IS_VALID_LLDB_HOST_THREAD(embedded_interpreter_thread))
{
if (log)
- log->Printf ("ScriptInterpreterPython::InputReaderCallback, Activate, succeeded in creating thread (thread_t = %p)", embedded_interpreter_thread);
+ log->Printf ("ScriptInterpreterPython::InputReaderCallback, Activate, succeeded in creating thread (thread_t = %p)", (void *)embedded_interpreter_thread);
Error detach_error;
Host::ThreadDetach (embedded_interpreter_thread, &detach_error);
}
diff --git a/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp b/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp
index 0f82341e6d3..ed86db1fc46 100644
--- a/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp
+++ b/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp
@@ -318,7 +318,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread,
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (log)
- log->Printf("ABISysV_x86_64::PrepareTrivialCall\n(\n thread = %p\n sp = 0x%llx\n func_addr = 0x%llx\n return_addr = 0x%llx\n arg1_ptr = %p (0x%llx)\n arg2_ptr = %p (0x%llx)\n arg3_ptr = %p (0x%llx)\n)",
+ log->Printf("ABISysV_x86_64::PrepareTrivialCall\n(\n thread = %p\n sp = 0x%" PRIx64 "\n func_addr = 0x%" PRIx64 "\n return_addr = 0x%" PRIx64 "\n arg1_ptr = %p (0x%" PRIx64 ")\n arg2_ptr = %p (0x%" PRIx64 ")\n arg3_ptr = %p (0x%" PRIx64 ")\n)",
(void*)&thread,
(uint64_t)sp,
(uint64_t)func_addr,
@@ -336,7 +336,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread,
{
reg_info = reg_ctx->GetRegisterInfoByName("rdi", 0);
if (log)
- log->Printf("About to write arg1 (0x%llx) into %s", (uint64_t)*arg1_ptr, reg_info->name);
+ log->Printf("About to write arg1 (0x%" PRIx64 ") into %s", (uint64_t)*arg1_ptr, reg_info->name);
if (!reg_ctx->WriteRegisterFromUnsigned (reg_info, *arg1_ptr))
return false;
@@ -345,7 +345,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread,
{
reg_info = reg_ctx->GetRegisterInfoByName("rsi", 0);
if (log)
- log->Printf("About to write arg2 (0x%llx) into %s", (uint64_t)*arg2_ptr, reg_info->name);
+ log->Printf("About to write arg2 (0x%" PRIx64 ") into %s", (uint64_t)*arg2_ptr, reg_info->name);
if (!reg_ctx->WriteRegisterFromUnsigned (reg_info, *arg2_ptr))
return false;
@@ -353,7 +353,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread,
{
reg_info = reg_ctx->GetRegisterInfoByName("rdx", 0);
if (log)
- log->Printf("About to write arg3 (0x%llx) into %s", (uint64_t)*arg3_ptr, reg_info->name);
+ log->Printf("About to write arg3 (0x%" PRIx64 ") into %s", (uint64_t)*arg3_ptr, reg_info->name);
if (!reg_ctx->WriteRegisterFromUnsigned (reg_info, *arg3_ptr))
return false;
@@ -361,7 +361,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread,
{
reg_info = reg_ctx->GetRegisterInfoByName("rcx", 0);
if (log)
- log->Printf("About to write arg4 (0x%llx) into %s", (uint64_t)*arg4_ptr, reg_info->name);
+ log->Printf("About to write arg4 (0x%" PRIx64 ") into %s", (uint64_t)*arg4_ptr, reg_info->name);
if (!reg_ctx->WriteRegisterFromUnsigned (reg_info, *arg4_ptr))
return false;
@@ -369,7 +369,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread,
{
reg_info = reg_ctx->GetRegisterInfoByName("r8", 0);
if (log)
- log->Printf("About to write arg5 (0x%llx) into %s", (uint64_t)*arg5_ptr, reg_info->name);
+ log->Printf("About to write arg5 (0x%" PRIx64 ") into %s", (uint64_t)*arg5_ptr, reg_info->name);
if (!reg_ctx->WriteRegisterFromUnsigned (reg_info, *arg5_ptr))
return false;
@@ -377,7 +377,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread,
{
reg_info = reg_ctx->GetRegisterInfoByName("r9", 0);
if (log)
- log->Printf("About to write arg6 (0x%llx) into %s", (uint64_t)*arg6_ptr, reg_info->name);
+ log->Printf("About to write arg6 (0x%" PRIx64 ") into %s", (uint64_t)*arg6_ptr, reg_info->name);
if (!reg_ctx->WriteRegisterFromUnsigned (reg_info, *arg6_ptr))
return false;
}
@@ -391,7 +391,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread,
// First, align the SP
if (log)
- log->Printf("16-byte aligning SP: 0x%llx to 0x%llx", (uint64_t)sp, (uint64_t)(sp & ~0xfull));
+ log->Printf("16-byte aligning SP: 0x%" PRIx64 " to 0x%" PRIx64, (uint64_t)sp, (uint64_t)(sp & ~0xfull));
sp &= ~(0xfull); // 16-byte alignment
@@ -402,7 +402,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread,
reg_value.SetUInt64 (return_addr);
if (log)
- log->Printf("Pushing the return address onto the stack: new SP 0x%llx, return address 0x%llx", (uint64_t)sp, (uint64_t)return_addr);
+ log->Printf("Pushing the return address onto the stack: new SP 0x%" PRIx64 ", return address 0x%" PRIx64, (uint64_t)sp, (uint64_t)return_addr);
const RegisterInfo *pc_reg_info = reg_ctx->GetRegisterInfoByName("rip");
Error error (reg_ctx->WriteRegisterValueToMemory(pc_reg_info, sp, pc_reg_info->byte_size, reg_value));
@@ -412,7 +412,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread,
// %rsp is set to the actual stack value.
if (log)
- log->Printf("Writing SP (0x%llx) down", (uint64_t)sp);
+ log->Printf("Writing SP (0x%" PRIx64 ") down", (uint64_t)sp);
if (!reg_ctx->WriteRegisterFromUnsigned (reg_ctx->GetRegisterInfoByName("rsp"), sp))
return false;
@@ -420,7 +420,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread,
// %rip is set to the address of the called function.
if (log)
- log->Printf("Writing new IP (0x%llx) down", (uint64_t)func_addr);
+ log->Printf("Writing new IP (0x%" PRIx64 ") down", (uint64_t)func_addr);
if (!reg_ctx->WriteRegisterFromUnsigned (pc_reg_info, func_addr))
return false;
diff --git a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp
index 378d9c5638a..0c313571ced 100644
--- a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp
+++ b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp
@@ -232,7 +232,7 @@ InstructionLLVM::CalculateMnemonicOperandsAndComment (const ExecutionContext* ex
if (!EDEvaluateOperand(&operand_value, operand, IPRegisterReader, &rra))
{
- comment.Printf("0x%*.*llx ", addr_nibble_size, addr_nibble_size, operand_value);
+ comment.Printf("0x%*.*" PRIx64 " ", addr_nibble_size, addr_nibble_size, operand_value);
AddSymbolicInfo (exe_ctx, comment, operand_value, GetAddress());
}
}
@@ -257,7 +257,7 @@ InstructionLLVM::CalculateMnemonicOperandsAndComment (const ExecutionContext* ex
{
uint64_t operand_value = PC + atoi(++pos);
// Put the address value into the operands.
- comment.Printf("0x%*.*llx ", addr_nibble_size, addr_nibble_size, operand_value);
+ comment.Printf("0x%*.*" PRIx64 " ", addr_nibble_size, addr_nibble_size, operand_value);
AddSymbolicInfo (exe_ctx, comment, operand_value, GetAddress());
}
}
@@ -278,7 +278,7 @@ InstructionLLVM::CalculateMnemonicOperandsAndComment (const ExecutionContext* ex
}
uint64_t operand_value = PC + atoi(++pos);
// Put the address value into the comment.
- comment.Printf("0x%*.*llx ", addr_nibble_size, addr_nibble_size, operand_value);
+ comment.Printf("0x%*.*" PRIx64 " ", addr_nibble_size, addr_nibble_size, operand_value);
// And the original token string into the operands.
// llvm::StringRef Str(pos - 1);
// RStrip(Str, '\n');
diff --git a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
index f44465c7ccb..7522a1ced16 100644
--- a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
+++ b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
@@ -271,7 +271,7 @@ public:
const uint64_t uval64 = data.GetU64(&offset);
m_opcode.SetOpcode64(uval64);
m_opcode_name.assign (".quad");
- mnemonic_strm.Printf("0x%16.16llx", uval64);
+ mnemonic_strm.Printf("0x%16.16" PRIx64, uval64);
}
break;
default:
@@ -644,7 +644,7 @@ const char *DisassemblerLLVMC::SymbolLookup (uint64_t value,
m_inst->AppendComment(ss.GetString());
}
}
- //printf ("DisassemblerLLVMC::SymbolLookup (value=0x%16.16llx, type=%llu, pc=0x%16.16llx, name=\"%s\") m_exe_ctx=%p, m_inst=%p\n", value, *type_ptr, pc, remove_this_prior_to_checkin.c_str(), m_exe_ctx, m_inst);
+ //printf ("DisassemblerLLVMC::SymbolLookup (value=0x%16.16" PRIx64 ", type=%" PRIu64 ", pc=0x%16.16" PRIx64 ", name=\"%s\") m_exe_ctx=%p, m_inst=%p\n", value, *type_ptr, pc, remove_this_prior_to_checkin.c_str(), m_exe_ctx, m_inst);
}
}
diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
index 194f21e0067..f88f2c95815 100644
--- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
+++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
@@ -402,7 +402,7 @@ DynamicLoaderDarwinKernel::OSKextLoadedKextSummary::LoadImageUsingMemoryModule (
{
char uuidbuf[64];
s->Printf ("Kernel UUID: %s\n", module_sp->GetUUID().GetAsCString(uuidbuf, sizeof (uuidbuf)));
- s->Printf ("Load Address: 0x%llx\n", address);
+ s->Printf ("Load Address: 0x%" PRIx64 "\n", address);
if (module_sp->GetFileSpec().GetDirectory().IsEmpty())
{
s->Printf ("Loaded kernel file %s\n", module_sp->GetFileSpec().GetFilename().AsCString());
@@ -723,7 +723,7 @@ DynamicLoaderDarwinKernel::ReadKextSummaries (const Address &kext_summary_addr,
{
image_infos[i].reference_list = 0;
}
-// printf ("[%3u] %*.*s: address=0x%16.16llx, size=0x%16.16llx, version=0x%16.16llx, load_tag=0x%8.8x, flags=0x%8.8x\n",
+// printf ("[%3u] %*.*s: address=0x%16.16" PRIx64 ", size=0x%16.16" PRIx64 ", version=0x%16.16" PRIx64 ", load_tag=0x%8.8x, flags=0x%8.8x\n",
// i,
// KERNEL_MODULE_MAX_NAME, KERNEL_MODULE_MAX_NAME, (char *)name_data,
// image_infos[i].address,
@@ -793,7 +793,7 @@ DynamicLoaderDarwinKernel::OSKextLoadedKextSummary::PutToLog (Log *log) const
{
if (u)
{
- log->Printf("\taddr=0x%16.16llx size=0x%16.16llx version=0x%16.16llx load-tag=0x%8.8x flags=0x%8.8x ref-list=0x%16.16llx uuid=%2.2X%2.2X%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X name=\"%s\"",
+ log->Printf("\taddr=0x%16.16" PRIx64 " size=0x%16.16" PRIx64 " version=0x%16.16" PRIx64 " load-tag=0x%8.8x flags=0x%8.8x ref-list=0x%16.16" PRIx64 " uuid=%2.2X%2.2X%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X name=\"%s\"",
address, size, version, load_tag, flags, reference_list,
u[ 0], u[ 1], u[ 2], u[ 3], u[ 4], u[ 5], u[ 6], u[ 7],
u[ 8], u[ 9], u[10], u[11], u[12], u[13], u[14], u[15],
@@ -801,7 +801,7 @@ DynamicLoaderDarwinKernel::OSKextLoadedKextSummary::PutToLog (Log *log) const
}
else
{
- log->Printf("\t[0x%16.16llx - 0x%16.16llx) version=0x%16.16llx load-tag=0x%8.8x flags=0x%8.8x ref-list=0x%16.16llx name=\"%s\"",
+ log->Printf("\t[0x%16.16" PRIx64 " - 0x%16.16" PRIx64 ") version=0x%16.16" PRIx64 " load-tag=0x%8.8x flags=0x%8.8x ref-list=0x%16.16" PRIx64 " name=\"%s\"",
address, address+size, version, load_tag, flags, reference_list,
name);
}
@@ -819,7 +819,7 @@ DynamicLoaderDarwinKernel::PutToLog(Log *log) const
return;
Mutex::Locker locker(m_mutex);
- log->Printf("gLoadedKextSummaries = 0x%16.16llx { version=%u, entry_size=%u, entry_count=%u }",
+ log->Printf("gLoadedKextSummaries = 0x%16.16" PRIx64 " { version=%u, entry_size=%u, entry_count=%u }",
m_kext_summary_header_addr.GetFileAddress(),
m_kext_summary_header.version,
m_kext_summary_header.entry_size,
diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
index 4723da8b184..466e6643a18 100644
--- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
+++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
@@ -469,7 +469,7 @@ DynamicLoaderMacOSXDYLD::UpdateImageLoadAddress (Module *module, DYLDImageInfo&
else
{
Host::SystemLog (Host::eSystemLogWarning,
- "warning: unable to find and load segment named '%s' at 0x%llx in '%s/%s' in macosx dynamic loader plug-in.\n",
+ "warning: unable to find and load segment named '%s' at 0x%" PRIx64 " in '%s/%s' in macosx dynamic loader plug-in.\n",
info.segments[i].name.AsCString("<invalid>"),
(uint64_t)new_section_load_addr,
image_object_file->GetFileSpec().GetDirectory().AsCString(),
@@ -795,7 +795,7 @@ DynamicLoaderMacOSXDYLD::AddModulesUsingImageInfos (DYLDImageInfo::collection &i
{
if (log)
{
- log->Printf ("Adding new image at address=0x%16.16llx.", image_infos[idx].address);
+ log->Printf ("Adding new image at address=0x%16.16" PRIx64 ".", image_infos[idx].address);
image_infos[idx].PutToLog (log.get());
}
@@ -907,7 +907,7 @@ DynamicLoaderMacOSXDYLD::RemoveModulesUsingImageInfosAddress (lldb::addr_t image
{
if (log)
{
- log->Printf ("Removing module at address=0x%16.16llx.", image_infos[idx].address);
+ log->Printf ("Removing module at address=0x%16.16" PRIx64 ".", image_infos[idx].address);
image_infos[idx].PutToLog (log.get());
}
@@ -1376,12 +1376,12 @@ DynamicLoaderMacOSXDYLD::Segment::PutToLog (Log *log, lldb::addr_t slide) const
if (log)
{
if (slide == 0)
- log->Printf ("\t\t%16s [0x%16.16llx - 0x%16.16llx)",
+ log->Printf ("\t\t%16s [0x%16.16" PRIx64 " - 0x%16.16" PRIx64 ")",
name.AsCString(""),
vmaddr + slide,
vmaddr + slide + vmsize);
else
- log->Printf ("\t\t%16s [0x%16.16llx - 0x%16.16llx) slide = 0x%llx",
+ log->Printf ("\t\t%16s [0x%16.16" PRIx64 " - 0x%16.16" PRIx64 ") slide = 0x%" PRIx64,
name.AsCString(""),
vmaddr + slide,
vmaddr + slide + vmsize,
@@ -1416,7 +1416,7 @@ DynamicLoaderMacOSXDYLD::DYLDImageInfo::PutToLog (Log *log) const
{
if (u)
{
- log->Printf("\t modtime=0x%8.8llx uuid=%2.2X%2.2X%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X path='%s/%s' (UNLOADED)",
+ log->Printf("\t modtime=0x%8.8" PRIx64 " uuid=%2.2X%2.2X%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X path='%s/%s' (UNLOADED)",
mod_date,
u[ 0], u[ 1], u[ 2], u[ 3],
u[ 4], u[ 5], u[ 6], u[ 7],
@@ -1426,7 +1426,7 @@ DynamicLoaderMacOSXDYLD::DYLDImageInfo::PutToLog (Log *log) const
file_spec.GetFilename().AsCString());
}
else
- log->Printf("\t modtime=0x%8.8llx path='%s/%s' (UNLOADED)",
+ log->Printf("\t modtime=0x%8.8" PRIx64 " path='%s/%s' (UNLOADED)",
mod_date,
file_spec.GetDirectory().AsCString(),
file_spec.GetFilename().AsCString());
@@ -1435,7 +1435,7 @@ DynamicLoaderMacOSXDYLD::DYLDImageInfo::PutToLog (Log *log) const
{
if (u)
{
- log->Printf("\taddress=0x%16.16llx modtime=0x%8.8llx uuid=%2.2X%2.2X%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X path='%s/%s'",
+ log->Printf("\taddress=0x%16.16" PRIx64 " modtime=0x%8.8" PRIx64 " uuid=%2.2X%2.2X%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X path='%s/%s'",
address,
mod_date,
u[ 0], u[ 1], u[ 2], u[ 3],
@@ -1447,7 +1447,7 @@ DynamicLoaderMacOSXDYLD::DYLDImageInfo::PutToLog (Log *log) const
}
else
{
- log->Printf("\taddress=0x%16.16llx modtime=0x%8.8llx path='%s/%s'",
+ log->Printf("\taddress=0x%16.16" PRIx64 " modtime=0x%8.8" PRIx64 " path='%s/%s'",
address,
mod_date,
file_spec.GetDirectory().AsCString(),
@@ -1470,7 +1470,7 @@ DynamicLoaderMacOSXDYLD::PutToLog(Log *log) const
return;
Mutex::Locker locker(m_mutex);
- log->Printf("dyld_all_image_infos = { version=%d, count=%d, addr=0x%8.8llx, notify=0x%8.8llx }",
+ log->Printf("dyld_all_image_infos = { version=%d, count=%d, addr=0x%8.8" PRIx64 ", notify=0x%8.8" PRIx64 " }",
m_dyld_all_image_infos.version,
m_dyld_all_image_infos.dylib_info_count,
(uint64_t)m_dyld_all_image_infos.dylib_info_addr,
diff --git a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp
index 7f41cfac580..bb3db11663b 100644
--- a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp
+++ b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp
@@ -113,7 +113,7 @@ AuxVector::DumpToLog(LogSP log) const
log->PutCString("AuxVector: ");
for (iterator I = begin(); I != end(); ++I)
{
- log->Printf(" %s [%llu]: %llx", GetEntryName(*I), I->type, I->value);
+ log->Printf(" %s [%" PRIu64 "]: %" PRIx64, GetEntryName(*I), I->type, I->value);
}
}
diff --git a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
index 404f4b1927b..6b9b8d6baa2 100644
--- a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
+++ b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
@@ -303,11 +303,11 @@ DYLDRendezvous::DumpToLog(LogSP log) const
return;
log->PutCString("DYLDRendezvous:");
- log->Printf(" Address: %llx", GetRendezvousAddress());
+ log->Printf(" Address: %" PRIx64, GetRendezvousAddress());
log->Printf(" Version: %d", GetVersion());
- log->Printf(" Link : %llx", GetLinkMapAddress());
- log->Printf(" Break : %llx", GetBreakAddress());
- log->Printf(" LDBase : %llx", GetLDBase());
+ log->Printf(" Link : %" PRIx64, GetLinkMapAddress());
+ log->Printf(" Break : %" PRIx64, GetBreakAddress());
+ log->Printf(" LDBase : %" PRIx64, GetLDBase());
log->Printf(" State : %s",
(state == eConsistent) ? "consistent" :
(state == eAdd) ? "add" :
@@ -322,10 +322,10 @@ DYLDRendezvous::DumpToLog(LogSP log) const
for (int i = 1; I != E; ++I, ++i)
{
log->Printf("\n SOEntry [%d] %s", i, I->path.c_str());
- log->Printf(" Base : %llx", I->base_addr);
- log->Printf(" Path : %llx", I->path_addr);
- log->Printf(" Dyn : %llx", I->dyn_addr);
- log->Printf(" Next : %llx", I->next);
- log->Printf(" Prev : %llx", I->prev);
+ log->Printf(" Base : %" PRIx64, I->base_addr);
+ log->Printf(" Path : %" PRIx64, I->path_addr);
+ log->Printf(" Dyn : %" PRIx64, I->dyn_addr);
+ log->Printf(" Next : %" PRIx64, I->next);
+ log->Printf(" Prev : %" PRIx64, I->prev);
}
}
diff --git a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
index aaa3cd34f77..44b8468428c 100644
--- a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
@@ -111,7 +111,7 @@ ItaniumABILanguageRuntime::GetDynamicTypeAndAddress (ValueObject &in_value,
{
LogSP log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT));
if (log)
- log->Printf ("0x%16.16llx: static-type = '%s' has vtable symbol '%s'\n",
+ log->Printf ("0x%16.16" PRIx64 ": static-type = '%s' has vtable symbol '%s'\n",
original_ptr,
in_value.GetTypeName().GetCString(),
name);
@@ -149,14 +149,14 @@ ItaniumABILanguageRuntime::GetDynamicTypeAndAddress (ValueObject &in_value,
if (num_matches == 0)
{
if (log)
- log->Printf("0x%16.16llx: is not dynamic\n", original_ptr);
+ log->Printf("0x%16.16" PRIx64 ": is not dynamic\n", original_ptr);
return false;
}
if (num_matches == 1)
{
type_sp = class_types.GetTypeAtIndex(0);
if (log)
- log->Printf ("0x%16.16llx: static-type = '%s' has dynamic type: uid={0x%llx}, type-name='%s'\n",
+ log->Printf ("0x%16.16" PRIx64 ": static-type = '%s' has dynamic type: uid={0x%" PRIx64 "}, type-name='%s'\n",
original_ptr,
in_value.GetTypeName().AsCString(),
type_sp->GetID(),
@@ -175,7 +175,7 @@ ItaniumABILanguageRuntime::GetDynamicTypeAndAddress (ValueObject &in_value,
if (type_sp)
{
if (log)
- log->Printf ("0x%16.16llx: static-type = '%s' has multiple matching dynamic types: uid={0x%llx}, type-name='%s'\n",
+ log->Printf ("0x%16.16" PRIx64 ": static-type = '%s' has multiple matching dynamic types: uid={0x%" PRIx64 "}, type-name='%s'\n",
original_ptr,
in_value.GetTypeName().AsCString(),
type_sp->GetID(),
@@ -192,7 +192,7 @@ ItaniumABILanguageRuntime::GetDynamicTypeAndAddress (ValueObject &in_value,
if (ClangASTContext::IsCXXClassType(type_sp->GetClangFullType()))
{
if (log)
- log->Printf ("0x%16.16llx: static-type = '%s' has multiple matching dynamic types, picking this one: uid={0x%llx}, type-name='%s'\n",
+ log->Printf ("0x%16.16" PRIx64 ": static-type = '%s' has multiple matching dynamic types, picking this one: uid={0x%" PRIx64 "}, type-name='%s'\n",
original_ptr,
in_value.GetTypeName().AsCString(),
type_sp->GetID(),
@@ -206,7 +206,7 @@ ItaniumABILanguageRuntime::GetDynamicTypeAndAddress (ValueObject &in_value,
if (i == num_matches)
{
if (log)
- log->Printf ("0x%16.16llx: static-type = '%s' has multiple matching dynamic types, didn't find a C++ match\n",
+ log->Printf ("0x%16.16" PRIx64 ": static-type = '%s' has multiple matching dynamic types, didn't find a C++ match\n",
original_ptr,
in_value.GetTypeName().AsCString());
return false;
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
index 10b2602c7cf..f81b75ec154 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
@@ -413,7 +413,7 @@ AppleObjCRuntimeV1::UpdateISAToDescriptorMapIfNeeded()
ClassDescriptorSP descriptor_sp (new ClassDescriptorV1(isa, process_sp));
if (log && log->GetVerbose())
- log->Printf("AppleObjCRuntimeV1 added (ObjCISA)0x%llx from _objc_debug_class_hash to isa->descriptor cache", isa);
+ log->Printf("AppleObjCRuntimeV1 added (ObjCISA)0x%" PRIx64 " from _objc_debug_class_hash to isa->descriptor cache", isa);
m_isa_to_descriptor_cache[isa] = descriptor_sp;
}
@@ -435,7 +435,7 @@ AppleObjCRuntimeV1::UpdateISAToDescriptorMapIfNeeded()
ClassDescriptorSP descriptor_sp (new ClassDescriptorV1(isa, process_sp));
if (log && log->GetVerbose())
- log->Printf("AppleObjCRuntimeV1 added (ObjCISA)0x%llx from _objc_debug_class_hash to isa->descriptor cache", isa);
+ log->Printf("AppleObjCRuntimeV1 added (ObjCISA)0x%" PRIx64 " from _objc_debug_class_hash to isa->descriptor cache", isa);
m_isa_to_descriptor_cache[isa] = descriptor_sp;
}
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
index 9fb6f4e7ab5..fa34407644b 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -1800,7 +1800,7 @@ AppleObjCRuntimeV2::GetClassDescriptor (ValueObject& valobj)
{
lldb::LogSP log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
if (log)
- log->Printf("0x%llx: AppleObjCRuntimeV2::GetClassDescriptor() ISA was not in class descriptor cache 0x%llx",
+ log->Printf("0x%" PRIx64 ": AppleObjCRuntimeV2::GetClassDescriptor() ISA was not in class descriptor cache 0x%" PRIx64,
isa_pointer,
isa);
}
@@ -1875,7 +1875,7 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapIfNeeded()
ClassDescriptorSP descriptor_sp = ClassDescriptorSP(new ClassDescriptorV2(*this, elt.second));
if (log && log->GetVerbose())
- log->Printf("AppleObjCRuntimeV2 added (ObjCISA)0x%llx (%s) from dynamic table to isa->descriptor cache", elt.second, elt.first.AsCString());
+ log->Printf("AppleObjCRuntimeV2 added (ObjCISA)0x%" PRIx64 " (%s) from dynamic table to isa->descriptor cache", elt.second, elt.first.AsCString());
m_isa_to_descriptor_cache[elt.second] = descriptor_sp;
}
@@ -1915,7 +1915,7 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapIfNeeded()
ClassDescriptorSP descriptor_sp = ClassDescriptorSP(new ClassDescriptorV2(*this, objc_isa));
if (log && log->GetVerbose())
- log->Printf("AppleObjCRuntimeV2 added (ObjCISA)0x%llx (%s) from static table to isa->descriptor cache", objc_isa, descriptor_sp->GetClassName().AsCString());
+ log->Printf("AppleObjCRuntimeV2 added (ObjCISA)0x%" PRIx64 " (%s) from static table to isa->descriptor cache", objc_isa, descriptor_sp->GetClassName().AsCString());
m_isa_to_descriptor_cache[objc_isa] = descriptor_sp;
}
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
index 25a2bfa4f7f..52c9eade773 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
@@ -301,13 +301,13 @@ AppleObjCTrampolineHandler::AppleObjCVTables::VTableRegion::AddressInRegion (lld
void
AppleObjCTrampolineHandler::AppleObjCVTables::VTableRegion::Dump (Stream &s)
{
- s.Printf ("Header addr: 0x%llx Code start: 0x%llx Code End: 0x%llx Next: 0x%llx\n",
+ s.Printf ("Header addr: 0x%" PRIx64 " Code start: 0x%" PRIx64 " Code End: 0x%" PRIx64 " Next: 0x%" PRIx64 "\n",
m_header_addr, m_code_start_addr, m_code_end_addr, m_next_region);
size_t num_elements = m_descriptors.size();
for (size_t i = 0; i < num_elements; i++)
{
s.Indent();
- s.Printf ("Code start: 0x%llx Flags: %d\n", m_descriptors[i].code_start, m_descriptors[i].flags);
+ s.Printf ("Code start: 0x%" PRIx64 " Flags: %d\n", m_descriptors[i].code_start, m_descriptors[i].flags);
}
}
@@ -616,7 +616,7 @@ AppleObjCTrampolineHandler::SetupDispatchFunction (Thread &thread, ValueList &di
impl_code_address = sc.symbol->GetAddress();
//lldb::addr_t addr = impl_code_address.GetOpcodeLoadAddress (exe_ctx.GetTargetPtr());
- //printf ("Getting address for our_utility_function: 0x%llx.\n", addr);
+ //printf ("Getting address for our_utility_function: 0x%" PRIx64 ".\n", addr);
}
else
{
@@ -882,7 +882,7 @@ AppleObjCTrampolineHandler::GetStepThroughDispatchPlan (Thread &thread, bool sto
{
if (log)
{
- log->Printf("Resolving call for class - 0x%llx and selector - 0x%llx",
+ log->Printf("Resolving call for class - 0x%" PRIx64 " and selector - 0x%" PRIx64,
isa_addr, sel_addr);
}
ObjCLanguageRuntime *objc_runtime = m_process_sp->GetObjCLanguageRuntime ();
@@ -896,7 +896,7 @@ AppleObjCTrampolineHandler::GetStepThroughDispatchPlan (Thread &thread, bool sto
// Yup, it was in the cache, so we can run to that address directly.
if (log)
- log->Printf ("Found implementation address in cache: 0x%llx", impl_addr);
+ log->Printf ("Found implementation address in cache: 0x%" PRIx64, impl_addr);
ret_plan_sp.reset (new ThreadPlanRunToAddress (thread, impl_addr, stop_others));
}
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp
index 4e2280a038b..bdbcf091da7 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp
@@ -627,7 +627,7 @@ AppleObjCTypeVendor::FindTypes (const ConstString &name,
if (metadata)
isa_value = metadata->GetISAPtr();
- log->Printf("AOCTV::FT [%u] Found %s (isa 0x%llx) in the ASTContext",
+ log->Printf("AOCTV::FT [%u] Found %s (isa 0x%" PRIx64 ") in the ASTContext",
current_id,
dumper.GetCString(),
isa_value);
@@ -670,7 +670,7 @@ AppleObjCTypeVendor::FindTypes (const ConstString &name,
if (!iface_decl)
{
if (log)
- log->Printf("AOCTV::FT [%u] Couldn't get the Objective-C interface for isa 0x%llx",
+ log->Printf("AOCTV::FT [%u] Couldn't get the Objective-C interface for isa 0x%" PRIx64,
current_id,
(uint64_t)isa);
@@ -682,7 +682,7 @@ AppleObjCTypeVendor::FindTypes (const ConstString &name,
if (log)
{
ASTDumper dumper(new_iface_type);
- log->Printf("AOCTV::FT [%u] Created %s (isa 0x%llx)",
+ log->Printf("AOCTV::FT [%u] Created %s (isa 0x%" PRIx64 ")",
current_id,
dumper.GetCString(),
(uint64_t)isa);
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
index 7ffac108ebe..3b778e83383 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
@@ -108,8 +108,8 @@ AppleThreadPlanStepThroughObjCTrampoline::GetDescription (Stream *s,
s->Printf("Step through ObjC trampoline");
else
{
- s->Printf ("Stepping to implementation of ObjC method - obj: 0x%llx, isa: 0x%llx, sel: 0x%llx",
- m_input_values.GetValueAtIndex(0)->GetScalar().ULongLong(), m_isa_addr, m_sel_addr);
+ s->Printf ("Stepping to implementation of ObjC method - obj: 0x%llx, isa: 0x%" PRIx64 ", sel: 0x%" PRIx64,
+ m_input_values.GetValueAtIndex(0)->GetScalar().ULongLong(), m_isa_addr, m_sel_addr);
}
}
@@ -178,7 +178,7 @@ AppleThreadPlanStepThroughObjCTrampoline::ShouldStop (Event *event_ptr)
if (m_trampoline_handler->AddrIsMsgForward(target_addr))
{
if (log)
- log->Printf ("Implementation lookup returned msgForward function: 0x%llx, stopping.", target_addr);
+ log->Printf ("Implementation lookup returned msgForward function: 0x%" PRIx64 ", stopping.", target_addr);
SymbolContext sc = m_thread.GetStackFrameAtIndex(0)->GetSymbolContext(eSymbolContextEverything);
m_run_to_sp.reset(new ThreadPlanStepOut (m_thread,
@@ -194,13 +194,13 @@ AppleThreadPlanStepThroughObjCTrampoline::ShouldStop (Event *event_ptr)
}
if (log)
- log->Printf("Running to ObjC method implementation: 0x%llx", target_addr);
+ log->Printf("Running to ObjC method implementation: 0x%" PRIx64, target_addr);
ObjCLanguageRuntime *objc_runtime = GetThread().GetProcess()->GetObjCLanguageRuntime();
assert (objc_runtime != NULL);
objc_runtime->AddToMethodCache (m_isa_addr, m_sel_addr, target_addr);
if (log)
- log->Printf("Adding {isa-addr=0x%llx, sel-addr=0x%llx} = addr=0x%llx to cache.", m_isa_addr, m_sel_addr, target_addr);
+ log->Printf("Adding {isa-addr=0x%" PRIx64 ", sel-addr=0x%" PRIx64 "} = addr=0x%" PRIx64 " to cache.", m_isa_addr, m_sel_addr, target_addr);
// Extract the target address from the value:
diff --git a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
index 399578558c0..08748f70b08 100644
--- a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
+++ b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
@@ -273,7 +273,7 @@ ObjectContainerBSDArchive::CreateInstance
if (file && data_sp && ObjectContainerBSDArchive::MagicBytesMatch(data))
{
Timer scoped_timer (__PRETTY_FUNCTION__,
- "ObjectContainerBSDArchive::CreateInstance (module = %s/%s, file = %p, file_offset = 0x%8.8llx, file_size = 0x%8.8llx)",
+ "ObjectContainerBSDArchive::CreateInstance (module = %s/%s, file = %p, file_offset = 0x%8.8" PRIx64 ", file_size = 0x%8.8" PRIx64 ")",
module_sp->GetFileSpec().GetDirectory().AsCString(),
module_sp->GetFileSpec().GetFilename().AsCString(),
file, (uint64_t) offset, (uint64_t) length);
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index f1a502747de..e357aff0e64 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -1186,9 +1186,9 @@ ObjectFileELF::DumpELFHeader(Stream *s, const ELFHeader &header)
DumpELFHeader_e_type(s, header.e_type);
s->Printf("\ne_machine = 0x%4.4x\n", header.e_machine);
s->Printf("e_version = 0x%8.8x\n", header.e_version);
- s->Printf("e_entry = 0x%8.8llx\n", header.e_entry);
- s->Printf("e_phoff = 0x%8.8llx\n", header.e_phoff);
- s->Printf("e_shoff = 0x%8.8llx\n", header.e_shoff);
+ s->Printf("e_entry = 0x%8.8" PRIx64 "\n", header.e_entry);
+ s->Printf("e_phoff = 0x%8.8" PRIx64 "\n", header.e_phoff);
+ s->Printf("e_shoff = 0x%8.8" PRIx64 "\n", header.e_shoff);
s->Printf("e_flags = 0x%8.8x\n", header.e_flags);
s->Printf("e_ehsize = 0x%4.4x\n", header.e_ehsize);
s->Printf("e_phentsize = 0x%4.4x\n", header.e_phentsize);
@@ -1246,11 +1246,11 @@ void
ObjectFileELF::DumpELFProgramHeader(Stream *s, const ELFProgramHeader &ph)
{
DumpELFProgramHeader_p_type(s, ph.p_type);
- s->Printf(" %8.8llx %8.8llx %8.8llx", ph.p_offset, ph.p_vaddr, ph.p_paddr);
- s->Printf(" %8.8llx %8.8llx %8.8x (", ph.p_filesz, ph.p_memsz, ph.p_flags);
+ s->Printf(" %8.8" PRIx64 " %8.8" PRIx64 " %8.8" PRIx64, ph.p_offset, ph.p_vaddr, ph.p_paddr);
+ s->Printf(" %8.8" PRIx64 " %8.8" PRIx64 " %8.8x (", ph.p_filesz, ph.p_memsz, ph.p_flags);
DumpELFProgramHeader_p_flags(s, ph.p_flags);
- s->Printf(") %8.8llx", ph.p_align);
+ s->Printf(") %8.8" PRIx64, ph.p_align);
}
//----------------------------------------------------------------------
@@ -1331,11 +1331,11 @@ ObjectFileELF::DumpELFSectionHeader(Stream *s, const ELFSectionHeader &sh)
{
s->Printf("%8.8x ", sh.sh_name);
DumpELFSectionHeader_sh_type(s, sh.sh_type);
- s->Printf(" %8.8llx (", sh.sh_flags);
+ s->Printf(" %8.8" PRIx64 " (", sh.sh_flags);
DumpELFSectionHeader_sh_flags(s, sh.sh_flags);
- s->Printf(") %8.8llx %8.8llx %8.8llx", sh.sh_addr, sh.sh_offset, sh.sh_size);
+ s->Printf(") %8.8" PRIx64 " %8.8" PRIx64 " %8.8" PRIx64, sh.sh_addr, sh.sh_offset, sh.sh_size);
s->Printf(" %8.8x %8.8x", sh.sh_link, sh.sh_info);
- s->Printf(" %8.8llx %8.8llx", sh.sh_addralign, sh.sh_entsize);
+ s->Printf(" %8.8" PRIx64 " %8.8" PRIx64, sh.sh_addralign, sh.sh_entsize);
}
//----------------------------------------------------------------------
diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
index 0881fa3018c..8447a88d1dc 100644
--- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
@@ -787,7 +787,7 @@ ObjectFilePECOFF::DumpOptCOFFHeader(Stream *s, const coff_opt_header_t& header)
s->Printf (" entry = 0x%8.8x\n", header.entry);
s->Printf (" code_offset = 0x%8.8x\n", header.code_offset);
s->Printf (" data_offset = 0x%8.8x\n", header.data_offset);
- s->Printf (" image_base = 0x%16.16llx\n", header.image_base);
+ s->Printf (" image_base = 0x%16.16" PRIx64 "\n", header.image_base);
s->Printf (" sect_alignment = 0x%8.8x\n", header.sect_alignment);
s->Printf (" file_alignment = 0x%8.8x\n", header.file_alignment);
s->Printf (" major_os_system_version = 0x%4.4x\n", header.major_os_system_version);
@@ -802,10 +802,10 @@ ObjectFilePECOFF::DumpOptCOFFHeader(Stream *s, const coff_opt_header_t& header)
s->Printf (" checksum = 0x%8.8x\n", header.checksum);
s->Printf (" subsystem = 0x%4.4x\n", header.subsystem);
s->Printf (" dll_flags = 0x%4.4x\n", header.dll_flags);
- s->Printf (" stack_reserve_size = 0x%16.16llx\n", header.stack_reserve_size);
- s->Printf (" stack_commit_size = 0x%16.16llx\n", header.stack_commit_size);
- s->Printf (" heap_reserve_size = 0x%16.16llx\n", header.heap_reserve_size);
- s->Printf (" heap_commit_size = 0x%16.16llx\n", header.heap_commit_size);
+ s->Printf (" stack_reserve_size = 0x%16.16" PRIx64 "\n", header.stack_reserve_size);
+ s->Printf (" stack_commit_size = 0x%16.16" PRIx64 "\n", header.stack_commit_size);
+ s->Printf (" heap_reserve_size = 0x%16.16" PRIx64 "\n", header.heap_reserve_size);
+ s->Printf (" heap_commit_size = 0x%16.16" PRIx64 "\n", header.heap_commit_size);
s->Printf (" loader_flags = 0x%8.8x\n", header.loader_flags);
s->Printf (" num_data_dir_entries = 0x%8.8zx\n", header.data_dirs.size());
uint32_t i;
diff --git a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
index b7a0bb929cc..ca00a63a053 100644
--- a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
+++ b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
@@ -133,7 +133,7 @@ OperatingSystemPython::GetDynamicRegisterInfo ()
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
if (log)
- log->Printf ("OperatingSystemPython::GetDynamicRegisterInfo() fetching thread register definitions from python for pid %llu", m_process->GetID());
+ log->Printf ("OperatingSystemPython::GetDynamicRegisterInfo() fetching thread register definitions from python for pid %" PRIu64, m_process->GetID());
auto object_sp = m_interpreter->OSPlugin_QueryForRegisterInfo(m_interpreter->MakeScriptObject(m_python_object));
if (!object_sp)
@@ -180,7 +180,7 @@ OperatingSystemPython::UpdateThreadList (ThreadList &old_thread_list, ThreadList
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
if (log)
- log->Printf ("OperatingSystemPython::UpdateThreadList() fetching thread data from python for pid %llu", m_process->GetID());
+ log->Printf ("OperatingSystemPython::UpdateThreadList() fetching thread data from python for pid %" PRIu64, m_process->GetID());
auto object_sp = m_interpreter->OSPlugin_QueryForThreadsInfo(m_interpreter->MakeScriptObject(m_python_object));
if (!object_sp)
@@ -255,7 +255,7 @@ OperatingSystemPython::CreateRegisterContextForThread (Thread *thread, lldb::add
// The registers data is in contiguous memory, just create the register
// context using the address provided
if (log)
- log->Printf ("OperatingSystemPython::CreateRegisterContextForThread (tid = 0x%llx, reg_data_addr = 0x%llx) creating memory register context", thread->GetID(), reg_data_addr);
+ log->Printf ("OperatingSystemPython::CreateRegisterContextForThread (tid = 0x%" PRIx64 ", reg_data_addr = 0x%" PRIx64 ") creating memory register context", thread->GetID(), reg_data_addr);
reg_ctx_sp.reset (new RegisterContextMemory (*thread, 0, *GetDynamicRegisterInfo (), reg_data_addr));
}
else
@@ -263,7 +263,7 @@ OperatingSystemPython::CreateRegisterContextForThread (Thread *thread, lldb::add
// No register data address is provided, query the python plug-in to let
// it make up the data as it sees fit
if (log)
- log->Printf ("OperatingSystemPython::CreateRegisterContextForThread (tid = 0x%llx) fetching register data from python", thread->GetID());
+ log->Printf ("OperatingSystemPython::CreateRegisterContextForThread (tid = 0x%" PRIx64 ") fetching register data from python", thread->GetID());
auto object_sp = m_interpreter->OSPlugin_QueryForRegisterContextData (m_interpreter->MakeScriptObject(m_python_object),
thread->GetID());
diff --git a/lldb/source/Plugins/Process/Linux/ProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/ProcessLinux.cpp
index 0c645f3645d..6a766d7ceb1 100644
--- a/lldb/source/Plugins/Process/Linux/ProcessLinux.cpp
+++ b/lldb/source/Plugins/Process/Linux/ProcessLinux.cpp
@@ -99,7 +99,7 @@ ProcessLinux::UpdateThreadList(ThreadList &old_thread_list, ThreadList &new_thre
{
LogSP log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_THREAD));
if (log && log->GetMask().Test(POSIX_LOG_VERBOSE))
- log->Printf ("ProcessLinux::%s() (pid = %i)", __FUNCTION__, GetID());
+ log->Printf ("ProcessLinux::%s() (pid = %" PRIu64 ")", __FUNCTION__, GetID());
// Update the process thread list with this new thread.
// FIXME: We should be using tid, not pid.
@@ -110,7 +110,7 @@ ProcessLinux::UpdateThreadList(ThreadList &old_thread_list, ThreadList &new_thre
}
if (log && log->GetMask().Test(POSIX_LOG_VERBOSE))
- log->Printf ("ProcessLinux::%s() updated pid = %i", __FUNCTION__, GetID());
+ log->Printf ("ProcessLinux::%s() updated pid = %" PRIu64, __FUNCTION__, GetID());
new_thread_list.AddThread(thread_sp);
return new_thread_list.GetSize(false) > 0;
diff --git a/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp b/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp
index 7e4aeea954d..9f661cd3b3b 100644
--- a/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp
+++ b/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp
@@ -177,7 +177,7 @@ DoReadMemory(lldb::pid_t pid,
if (log)
ProcessPOSIXLog::IncNestLevel();
if (log && ProcessPOSIXLog::AtTopNestLevel() && log->GetMask().Test(POSIX_LOG_MEMORY))
- log->Printf ("ProcessMonitor::%s(%d, %d, %p, %p, %d, _)", __FUNCTION__,
+ log->Printf ("ProcessMonitor::%s(%" PRIu64 ", %d, %p, %p, %zd, _)", __FUNCTION__,
pid, word_size, (void*)vm_addr, buf, size);
assert(sizeof(data) >= word_size);
@@ -232,7 +232,7 @@ DoWriteMemory(lldb::pid_t pid,
if (log)
ProcessPOSIXLog::IncNestLevel();
if (log && ProcessPOSIXLog::AtTopNestLevel() && log->GetMask().Test(POSIX_LOG_MEMORY))
- log->Printf ("ProcessMonitor::%s(%d, %d, %p, %p, %d, _)", __FUNCTION__,
+ log->Printf ("ProcessMonitor::%s(%" PRIu64 ", %d, %p, %p, %zd, _)", __FUNCTION__,
pid, word_size, (void*)vm_addr, buf, size);
for (bytes_written = 0; bytes_written < size; bytes_written += remainder)
@@ -434,7 +434,7 @@ ReadRegOperation::Execute(ProcessMonitor *monitor)
m_result = true;
}
if (log)
- log->Printf ("ProcessMonitor::%s() reg %s: 0x%x", __FUNCTION__,
+ log->Printf ("ProcessMonitor::%s() reg %s: 0x%" PRIx64, __FUNCTION__,
POSIXThread::GetRegisterNameFromOffset(m_offset), data);
}
@@ -1098,7 +1098,7 @@ ProcessMonitor::Launch(LaunchArgs *args)
// FIXME: by using pids instead of tids, we can only support one thread.
inferior.reset(new POSIXThread(process, pid));
if (log)
- log->Printf ("ProcessMonitor::%s() adding pid = %i", __FUNCTION__, pid);
+ log->Printf ("ProcessMonitor::%s() adding pid = %" PRIu64, __FUNCTION__, pid);
process.GetThreadList().AddThread(inferior);
// Let our process instance know the thread has stopped.
@@ -1183,7 +1183,7 @@ ProcessMonitor::Attach(AttachArgs *args)
// Update the process thread list with the attached thread.
inferior.reset(new POSIXThread(process, pid));
if (log)
- log->Printf ("ProcessMonitor::%s() adding tid = %i", __FUNCTION__, pid);
+ log->Printf ("ProcessMonitor::%s() adding tid = %" PRIu64, __FUNCTION__, pid);
process.GetThreadList().AddThread(inferior);
// Let our process instance know the thread has stopped.
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
index f7adc7ae707..8e658a50022 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
@@ -166,7 +166,7 @@ CommunicationKDP::SendRequestPacketNoLock (const PacketStreamType &request_packe
return true;
if (log)
- log->Printf ("error: failed to send packet entire packet %llu of %llu bytes sent", (uint64_t)bytes_written, (uint64_t)packet_size);
+ log->Printf ("error: failed to send packet entire packet %" PRIu64 " of %" PRIu64 " bytes sent", (uint64_t)bytes_written, (uint64_t)packet_size);
}
return false;
}
@@ -210,7 +210,7 @@ CommunicationKDP::WaitForPacketWithTimeoutMicroSecondsNoLock (DataExtractor &pac
size_t bytes_read = Read (buffer, sizeof(buffer), timeout_usec, status, &error);
if (log)
- log->Printf ("%s: Read (buffer, (sizeof(buffer), timeout_usec = 0x%x, status = %s, error = %s) => bytes_read = %llu",
+ log->Printf ("%s: Read (buffer, (sizeof(buffer), timeout_usec = 0x%x, status = %s, error = %s) => bytes_read = %" PRIu64,
__PRETTY_FUNCTION__,
timeout_usec,
Communication::ConnectionStatusAsCString (status),
@@ -876,7 +876,7 @@ CommunicationKDP::DumpPacket (Stream &s, const DataExtractor& packet)
const addr_t region_addr = packet.GetPointer (&offset);
const uint32_t region_size = packet.GetU32 (&offset);
const uint32_t region_prot = packet.GetU32 (&offset);
- s.Printf("\n\tregion[%llu] = { range = [0x%16.16llx - 0x%16.16llx), size = 0x%8.8x, prot = %s }", region_addr, region_addr, region_addr + region_size, region_size, GetPermissionsAsCString (region_prot));
+ s.Printf("\n\tregion[%" PRIu64 "] = { range = [0x%16.16" PRIx64 " - 0x%16.16" PRIx64 "), size = 0x%8.8x, prot = %s }", region_addr, region_addr, region_addr + region_size, region_size, GetPermissionsAsCString (region_prot));
}
}
break;
@@ -997,7 +997,7 @@ CommunicationKDP::DumpPacket (Stream &s, const DataExtractor& packet)
{
const uint64_t addr = packet.GetU64 (&offset);
const uint32_t size = packet.GetU32 (&offset);
- s.Printf(" (addr = 0x%16.16llx, size = %u)", addr, size);
+ s.Printf(" (addr = 0x%16.16" PRIx64 ", size = %u)", addr, size);
m_last_read_memory_addr = addr;
}
break;
@@ -1006,7 +1006,7 @@ CommunicationKDP::DumpPacket (Stream &s, const DataExtractor& packet)
{
const uint64_t addr = packet.GetU64 (&offset);
const uint32_t size = packet.GetU32 (&offset);
- s.Printf(" (addr = 0x%16.16llx, size = %u, bytes = \n", addr, size);
+ s.Printf(" (addr = 0x%16.16" PRIx64 ", size = %u, bytes = \n", addr, size);
if (size > 0)
DataExtractor::DumpHexBytes(&s, packet.GetData(&offset, size), size, 32, addr);
}
@@ -1051,7 +1051,7 @@ CommunicationKDP::DumpPacket (Stream &s, const DataExtractor& packet)
case KDP_BREAKPOINT_REMOVE64:
{
const uint64_t addr = packet.GetU64 (&offset);
- s.Printf(" (addr = 0x%16.16llx)", addr);
+ s.Printf(" (addr = 0x%16.16" PRIx64 ")", addr);
}
break;
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
index 3a7a0798e42..991cf680cad 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
@@ -448,7 +448,7 @@ ProcessKDP::UpdateThreadList (ThreadList &old_thread_list, ThreadList &new_threa
// locker will keep a mutex locked until it goes out of scope
LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_THREAD));
if (log && log->GetMask().Test(KDP_LOG_VERBOSE))
- log->Printf ("ProcessKDP::%s (pid = %llu)", __FUNCTION__, GetID());
+ log->Printf ("ProcessKDP::%s (pid = %" PRIu64 ")", __FUNCTION__, GetID());
// Even though there is a CPU mask, it doesn't mean to can see each CPU
// indivudually, there is really only one. Lets call this thread 1.
@@ -744,7 +744,7 @@ ProcessKDP::AsyncThread (void *arg)
LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PROCESS));
if (log)
- log->Printf ("ProcessKDP::AsyncThread (arg = %p, pid = %llu) thread starting...", arg, pid);
+ log->Printf ("ProcessKDP::AsyncThread (arg = %p, pid = %" PRIu64 ") thread starting...", arg, pid);
Listener listener ("ProcessKDP::AsyncThread");
EventSP event_sp;
@@ -758,13 +758,13 @@ ProcessKDP::AsyncThread (void *arg)
while (!done)
{
if (log)
- log->Printf ("ProcessKDP::AsyncThread (pid = %llu) listener.WaitForEvent (NULL, event_sp)...",
+ log->Printf ("ProcessKDP::AsyncThread (pid = %" PRIu64 ") listener.WaitForEvent (NULL, event_sp)...",
pid);
if (listener.WaitForEvent (NULL, event_sp))
{
uint32_t event_type = event_sp->GetType();
if (log)
- log->Printf ("ProcessKDP::AsyncThread (pid = %llu) Got an event of type: %d...",
+ log->Printf ("ProcessKDP::AsyncThread (pid = %" PRIu64 ") Got an event of type: %d...",
pid,
event_type);
@@ -806,7 +806,7 @@ ProcessKDP::AsyncThread (void *arg)
case eBroadcastBitAsyncThreadShouldExit:
if (log)
- log->Printf ("ProcessKDP::AsyncThread (pid = %llu) got eBroadcastBitAsyncThreadShouldExit...",
+ log->Printf ("ProcessKDP::AsyncThread (pid = %" PRIu64 ") got eBroadcastBitAsyncThreadShouldExit...",
pid);
done = true;
is_running = false;
@@ -814,7 +814,7 @@ ProcessKDP::AsyncThread (void *arg)
default:
if (log)
- log->Printf ("ProcessKDP::AsyncThread (pid = %llu) got unknown event 0x%8.8x",
+ log->Printf ("ProcessKDP::AsyncThread (pid = %" PRIu64 ") got unknown event 0x%8.8x",
pid,
event_type);
done = true;
@@ -826,7 +826,7 @@ ProcessKDP::AsyncThread (void *arg)
else
{
if (log)
- log->Printf ("ProcessKDP::AsyncThread (pid = %llu) listener.WaitForEvent (NULL, event_sp) => false",
+ log->Printf ("ProcessKDP::AsyncThread (pid = %" PRIu64 ") listener.WaitForEvent (NULL, event_sp) => false",
pid);
done = true;
}
@@ -834,7 +834,7 @@ ProcessKDP::AsyncThread (void *arg)
}
if (log)
- log->Printf ("ProcessKDP::AsyncThread (arg = %p, pid = %llu) thread exiting...",
+ log->Printf ("ProcessKDP::AsyncThread (arg = %p, pid = %" PRIu64 ") thread exiting...",
arg,
pid);
@@ -965,7 +965,7 @@ public:
}
else
{
- result.AppendErrorWithFormat ("invalid command byte 0x%llx, valid values are 1 - 255", command_byte);
+ result.AppendErrorWithFormat ("invalid command byte 0x%" PRIx64 ", valid values are 1 - 255", command_byte);
result.SetStatus (eReturnStatusFailed);
}
}
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
index 3e42cf50d74..920fccf351c 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
@@ -78,7 +78,7 @@ ThreadKDP::WillResume (StateType resume_state)
lldb::LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_STEP));
if (log)
- log->Printf ("Resuming thread: %4.4llx with state: %s.", GetID(), StateAsCString(resume_state));
+ log->Printf ("Resuming thread: %4.4" PRIx64 " with state: %s.", GetID(), StateAsCString(resume_state));
return true;
}
diff --git a/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp b/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp
index 0fbb5f309c4..18e271a42c2 100644
--- a/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp
+++ b/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp
@@ -39,7 +39,7 @@ POSIXThread::POSIXThread(Process &process, lldb::tid_t tid)
{
LogSP log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_THREAD));
if (log && log->GetMask().Test(POSIX_LOG_VERBOSE))
- log->Printf ("POSIXThread::%s (tid = %i)", __FUNCTION__, tid);
+ log->Printf ("POSIXThread::%s (tid = %" PRIi64 ")", __FUNCTION__, tid);
}
POSIXThread::~POSIXThread()
@@ -242,7 +242,7 @@ POSIXThread::BreakNotify(const ProcessMessage &message)
assert(GetRegisterContext());
lldb::addr_t pc = GetRegisterContext()->GetPC();
if (log)
- log->Printf ("POSIXThread::%s () PC=0x%8.8llx", __FUNCTION__, pc);
+ log->Printf ("POSIXThread::%s () PC=0x%8.8" PRIx64, __FUNCTION__, pc);
lldb::BreakpointSiteSP bp_site(GetProcess()->GetBreakpointSiteList().FindByAddress(pc));
assert(bp_site);
lldb::break_id_t bp_id = bp_site->GetID();
diff --git a/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp b/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
index 7666d646a4a..402bc634966 100644
--- a/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
+++ b/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
@@ -106,7 +106,7 @@ ProcessPOSIX::DoAttachToProcessWithID(lldb::pid_t pid)
LogSP log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_PROCESS));
if (log && log->GetMask().Test(POSIX_LOG_VERBOSE))
- log->Printf ("ProcessPOSIX::%s(pid = %i)", __FUNCTION__, GetID());
+ log->Printf ("ProcessPOSIX::%s(pid = %" PRIi64 ")", __FUNCTION__, GetID());
m_monitor = new ProcessMonitor(this, pid, error);
@@ -380,7 +380,7 @@ ProcessPOSIX::RefreshStateAfterStop()
// fixed when this code is fixed to handle multiple threads.
lldb::tid_t tid = message.GetTID();
if (log)
- log->Printf ("ProcessPOSIX::%s() pid = %i", __FUNCTION__, tid);
+ log->Printf ("ProcessPOSIX::%s() pid = %" PRIi64, __FUNCTION__, tid);
POSIXThread *thread = static_cast<POSIXThread*>(
GetThreadList().FindThreadByID(tid, false).get());
@@ -448,7 +448,7 @@ ProcessPOSIX::DoDeallocateMemory(lldb::addr_t addr)
InferiorCallMunmap(this, addr, pos->second))
m_addr_to_mmap_size.erase (pos);
else
- error.SetErrorStringWithFormat("unable to deallocate memory at 0x%llx", addr);
+ error.SetErrorStringWithFormat("unable to deallocate memory at 0x%" PRIx64, addr);
return error;
}
@@ -503,7 +503,7 @@ ProcessPOSIX::UpdateThreadList(ThreadList &old_thread_list, ThreadList &new_thre
{
LogSP log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_THREAD));
if (log && log->GetMask().Test(POSIX_LOG_VERBOSE))
- log->Printf ("ProcessPOSIX::%s() (pid = %i)", __FUNCTION__, GetID());
+ log->Printf ("ProcessPOSIX::%s() (pid = %" PRIi64 ")", __FUNCTION__, GetID());
// Update the process thread list with this new thread.
// FIXME: We should be using tid, not pid.
@@ -514,7 +514,7 @@ ProcessPOSIX::UpdateThreadList(ThreadList &old_thread_list, ThreadList &new_thre
}
if (log && log->GetMask().Test(POSIX_LOG_VERBOSE))
- log->Printf ("ProcessPOSIX::%s() updated pid = %i", __FUNCTION__, GetID());
+ log->Printf ("ProcessPOSIX::%s() updated pid = %" PRIi64, __FUNCTION__, GetID());
new_thread_list.AddThread(thread_sp);
return new_thread_list.GetSize(false) > 0;
diff --git a/lldb/source/Plugins/Process/POSIX/RegisterContext_i386.cpp b/lldb/source/Plugins/Process/POSIX/RegisterContext_i386.cpp
index 9485164c2b6..c0bb9b13fd2 100644
--- a/lldb/source/Plugins/Process/POSIX/RegisterContext_i386.cpp
+++ b/lldb/source/Plugins/Process/POSIX/RegisterContext_i386.cpp
@@ -620,7 +620,7 @@ RegisterContext_i386::LogGPR(const char *title)
for (uint32_t i=0; i<k_num_gpr_registers; i++)
{
uint32_t reg = gpr_eax + i;
- log->Printf("%12s = 0x%8.8x", g_register_infos[reg].name, (&user.regs)[reg]);
+ log->Printf("%12s = 0x%8.8" PRIx64, g_register_infos[reg].name, ((uint64_t*)&user.regs)[reg]);
}
}
}
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp
index 773154b1602..7d97dbd3e41 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp
@@ -491,7 +491,7 @@ RegisterContextDarwin_x86_64::LogGPR(Log *log, const char *format, ...)
for (uint32_t i=0; i<k_num_gpr_registers; i++)
{
uint32_t reg = gpr_rax + i;
- log->Printf("%12s = 0x%16.16llx", g_register_infos[reg].name, (&gpr.rax)[reg]);
+ log->Printf("%12s = 0x%16.16" PRIx64, g_register_infos[reg].name, (&gpr.rax)[reg]);
}
}
}
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
index e34bf90d6ed..f79daa92efa 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
@@ -213,8 +213,8 @@ RegisterContextLLDB::InitializeZerothFrame()
m_cfa = cfa_regval + cfa_offset;
- UnwindLogMsg ("cfa_regval = 0x%16.16llx (cfa_regval = 0x%16.16llx, cfa_offset = %i)", m_cfa, cfa_regval, cfa_offset);
- UnwindLogMsg ("initialized frame current pc is 0x%llx cfa is 0x%llx using %s UnwindPlan",
+ UnwindLogMsg ("cfa_regval = 0x%16.16" PRIx64 " (cfa_regval = 0x%16.16" PRIx64 ", cfa_offset = %i)", m_cfa, cfa_regval, cfa_offset);
+ UnwindLogMsg ("initialized frame current pc is 0x%" PRIx64 " cfa is 0x%" PRIx64 " using %s UnwindPlan",
(uint64_t) m_current_pc.GetLoadAddress (exe_ctx.GetTargetPtr()),
(uint64_t) m_cfa,
m_full_unwind_plan_sp->GetSourceName().GetCString());
@@ -254,12 +254,12 @@ RegisterContextLLDB::InitializeNonZerothFrame()
if (log)
{
- UnwindLogMsg ("pc = 0x%16.16llx", pc);
+ UnwindLogMsg ("pc = 0x%16.16" PRIx64, pc);
addr_t reg_val;
if (ReadGPRValue (eRegisterKindGeneric, LLDB_REGNUM_GENERIC_FP, reg_val))
- UnwindLogMsg ("fp = 0x%16.16llx", reg_val);
+ UnwindLogMsg ("fp = 0x%16.16" PRIx64, reg_val);
if (ReadGPRValue (eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP, reg_val))
- UnwindLogMsg ("sp = 0x%16.16llx", reg_val);
+ UnwindLogMsg ("sp = 0x%16.16" PRIx64, reg_val);
}
// A pc of 0x0 means it's the end of the stack crawl
@@ -297,7 +297,7 @@ RegisterContextLLDB::InitializeNonZerothFrame()
// pc and see if we can get any further.
if (GetNextFrame().get() && GetNextFrame()->IsValid() && GetNextFrame()->IsFrameZero())
{
- UnwindLogMsg ("had a pc of 0x%llx which is not in executable memory but on frame 1 -- allowing it once.",
+ UnwindLogMsg ("had a pc of 0x%" PRIx64 " which is not in executable memory but on frame 1 -- allowing it once.",
(uint64_t) pc);
m_frame_type = eSkipFrame;
}
@@ -363,7 +363,7 @@ RegisterContextLLDB::InitializeNonZerothFrame()
return;
}
- UnwindLogMsg ("initialized frame cfa is 0x%llx", (uint64_t) m_cfa);
+ UnwindLogMsg ("initialized frame cfa is 0x%" PRIx64, (uint64_t) m_cfa);
return;
}
m_frame_type = eNotAValidFrame;
@@ -506,7 +506,7 @@ RegisterContextLLDB::InitializeNonZerothFrame()
m_cfa = cfa_regval + cfa_offset;
- UnwindLogMsg ("cfa_regval = 0x%16.16llx (cfa_regval = 0x%16.16llx, cfa_offset = %i)", m_cfa, cfa_regval, cfa_offset);
+ UnwindLogMsg ("cfa_regval = 0x%16.16" PRIx64 " (cfa_regval = 0x%16.16" PRIx64 ", cfa_offset = %i)", m_cfa, cfa_regval, cfa_offset);
// A couple of sanity checks..
if (cfa_regval == LLDB_INVALID_ADDRESS || cfa_regval == 0 || cfa_regval == 1)
@@ -544,7 +544,7 @@ RegisterContextLLDB::InitializeNonZerothFrame()
}
}
- UnwindLogMsg ("initialized frame current pc is 0x%llx cfa is 0x%llx",
+ UnwindLogMsg ("initialized frame current pc is 0x%" PRIx64 " cfa is 0x%" PRIx64,
(uint64_t) m_current_pc.GetLoadAddress (exe_ctx.GetTargetPtr()), (uint64_t) m_cfa);
}
diff --git a/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp b/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
index a15b8a90034..7db57294dcd 100644
--- a/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
+++ b/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
@@ -215,14 +215,14 @@ StopInfoMachException::GetDescription ()
if (exc_desc)
strm.PutCString(exc_desc);
else
- strm.Printf("EXC_??? (%llu)", m_value);
+ strm.Printf("EXC_??? (%" PRIu64 ")", m_value);
if (m_exc_data_count >= 1)
{
if (code_desc)
strm.Printf(" (%s=%s", code_label, code_desc);
else
- strm.Printf(" (%s=%llu", code_label, m_exc_code);
+ strm.Printf(" (%s=%" PRIu64, code_label, m_exc_code);
}
if (m_exc_data_count >= 2)
@@ -230,7 +230,7 @@ StopInfoMachException::GetDescription ()
if (subcode_desc)
strm.Printf(", %s=%s", subcode_label, subcode_desc);
else
- strm.Printf(", %s=0x%llx", subcode_label, m_exc_subcode);
+ strm.Printf(", %s=0x%" PRIx64, subcode_label, m_exc_subcode);
}
if (m_exc_data_count > 0)
diff --git a/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp b/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp
index 459a729b8c9..128dbf7b539 100644
--- a/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp
+++ b/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp
@@ -53,7 +53,7 @@ UnwindLLDB::DoGetFrameCount()
{
TimeValue now(TimeValue::Now());
uint64_t delta_t = now - time_value;
- printf ("%u frames in %llu.%09llu ms (%g frames/sec)\n",
+ printf ("%u frames in %" PRIu64 ".%09llu ms (%g frames/sec)\n",
FRAME_COUNT,
delta_t / TimeValue::NanoSecPerSec,
delta_t % TimeValue::NanoSecPerSec,
diff --git a/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp b/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp
index ffce985c26b..d011314b096 100644
--- a/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp
+++ b/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp
@@ -176,7 +176,7 @@ UnwindMacOSXFrameBackchain::GetStackFrameData_i386 (const ExecutionContext &exe_
// printf(" ------------------ ------------------ \n");
// for (i=0; i<m_cursors.size(); ++i)
// {
-// printf("[%3u] 0x%16.16llx 0x%16.16llx\n", i, m_cursors[i].pc, m_cursors[i].fp);
+// printf("[%3u] 0x%16.16" PRIx64 " 0x%16.16" PRIx64 "\n", i, m_cursors[i].pc, m_cursors[i].fp);
// }
return m_cursors.size();
}
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
index d1102b7e6ac..fd9cecaa397 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
@@ -92,7 +92,7 @@ GDBRemoteCommunication::History::Dump (lldb_private::Stream &strm) const
const Entry &entry = m_packets[idx];
if (entry.type == ePacketTypeInvalid || entry.packet.empty())
break;
- strm.Printf ("history[%u] tid=0x%4.4llx <%4u> %s packet: %s\n",
+ strm.Printf ("history[%u] tid=0x%4.4" PRIx64 " <%4u> %s packet: %s\n",
entry.packet_idx,
entry.tid,
entry.bytes_transmitted,
@@ -116,7 +116,7 @@ GDBRemoteCommunication::History::Dump (lldb_private::Log *log) const
const Entry &entry = m_packets[idx];
if (entry.type == ePacketTypeInvalid || entry.packet.empty())
break;
- log->Printf ("history[%u] tid=0x%4.4llx <%4u> %s packet: %s",
+ log->Printf ("history[%u] tid=0x%4.4" PRIx64 " <%4u> %s packet: %s",
entry.packet_idx,
entry.tid,
entry.bytes_transmitted,
@@ -298,7 +298,7 @@ GDBRemoteCommunication::WaitForPacketWithTimeoutMicroSecondsNoLock (StringExtrac
size_t bytes_read = Read (buffer, sizeof(buffer), timeout_usec, status, &error);
if (log)
- log->Printf ("%s: Read (buffer, (sizeof(buffer), timeout_usec = 0x%x, status = %s, error = %s) => bytes_read = %llu",
+ log->Printf ("%s: Read (buffer, (sizeof(buffer), timeout_usec = 0x%x, status = %s, error = %s) => bytes_read = %" PRIu64,
__PRETTY_FUNCTION__,
timeout_usec,
Communication::ConnectionStatusAsCString (status),
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index e9f1abc85c3..42bf768b17b 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -1198,7 +1198,7 @@ GDBRemoteCommunicationClient::SendAttach
if (pid != LLDB_INVALID_PROCESS_ID)
{
char packet[64];
- const int packet_len = ::snprintf (packet, sizeof(packet), "vAttach;%llx", pid);
+ const int packet_len = ::snprintf (packet, sizeof(packet), "vAttach;%" PRIx64, pid);
assert (packet_len < sizeof(packet));
if (SendPacketAndWaitForResponse (packet, packet_len, response, false))
{
@@ -1225,7 +1225,7 @@ GDBRemoteCommunicationClient::AllocateMemory (size_t size, uint32_t permissions)
{
m_supports_alloc_dealloc_memory = eLazyBoolYes;
char packet[64];
- const int packet_len = ::snprintf (packet, sizeof(packet), "_M%llx,%s%s%s",
+ const int packet_len = ::snprintf (packet, sizeof(packet), "_M%" PRIx64 ",%s%s%s",
(uint64_t)size,
permissions & lldb::ePermissionsReadable ? "r" : "",
permissions & lldb::ePermissionsWritable ? "w" : "",
@@ -1252,7 +1252,7 @@ GDBRemoteCommunicationClient::DeallocateMemory (addr_t addr)
{
m_supports_alloc_dealloc_memory = eLazyBoolYes;
char packet[64];
- const int packet_len = ::snprintf(packet, sizeof(packet), "_m%llx", (uint64_t)addr);
+ const int packet_len = ::snprintf(packet, sizeof(packet), "_m%" PRIx64, (uint64_t)addr);
assert (packet_len < sizeof(packet));
StringExtractorGDBRemote response;
if (SendPacketAndWaitForResponse (packet, packet_len, response, false))
@@ -1285,7 +1285,7 @@ GDBRemoteCommunicationClient::GetMemoryRegionInfo (lldb::addr_t addr,
{
m_supports_memory_region_info = eLazyBoolYes;
char packet[64];
- const int packet_len = ::snprintf(packet, sizeof(packet), "qMemoryRegionInfo:%llx", (uint64_t)addr);
+ const int packet_len = ::snprintf(packet, sizeof(packet), "qMemoryRegionInfo:%" PRIx64, (uint64_t)addr);
assert (packet_len < sizeof(packet));
StringExtractorGDBRemote response;
if (SendPacketAndWaitForResponse (packet, packet_len, response, false))
@@ -1618,7 +1618,7 @@ GDBRemoteCommunicationClient::GetProcessInfo (lldb::pid_t pid, ProcessInstanceIn
if (m_supports_qProcessInfoPID)
{
char packet[32];
- const int packet_len = ::snprintf (packet, sizeof (packet), "qProcessInfoPID:%llu", pid);
+ const int packet_len = ::snprintf (packet, sizeof (packet), "qProcessInfoPID:%" PRIu64, pid);
assert (packet_len < sizeof(packet));
StringExtractorGDBRemote response;
if (SendPacketAndWaitForResponse (packet, packet_len, response, false))
@@ -1688,9 +1688,9 @@ GDBRemoteCommunicationClient::FindProcesses (const ProcessInstanceInfoMatch &mat
}
if (match_info.GetProcessInfo().ProcessIDIsValid())
- packet.Printf("pid:%llu;",match_info.GetProcessInfo().GetProcessID());
+ packet.Printf("pid:%" PRIu64 ";",match_info.GetProcessInfo().GetProcessID());
if (match_info.GetProcessInfo().ParentProcessIDIsValid())
- packet.Printf("parent_pid:%llu;",match_info.GetProcessInfo().GetParentProcessID());
+ packet.Printf("parent_pid:%" PRIu64 ";",match_info.GetProcessInfo().GetParentProcessID());
if (match_info.GetProcessInfo().UserIDIsValid())
packet.Printf("uid:%u;",match_info.GetProcessInfo().GetUserID());
if (match_info.GetProcessInfo().GroupIDIsValid())
@@ -1813,7 +1813,7 @@ GDBRemoteCommunicationClient::TestPacketSpeed (const uint32_t num_packets)
end_time = TimeValue::Now();
total_time_nsec = end_time.GetAsNanoSecondsSinceJan1_1970() - start_time.GetAsNanoSecondsSinceJan1_1970();
packets_per_second = (((float)num_packets)/(float)total_time_nsec) * (float)TimeValue::NanoSecPerSec;
- printf ("%u qSpeedTest(send=%-5u, recv=%-5u) in %llu.%9.9llu sec for %f packets/sec.\n",
+ printf ("%u qSpeedTest(send=%-5u, recv=%-5u) in %" PRIu64 ".%9.9" PRIu64 " sec for %f packets/sec.\n",
num_packets,
send_size,
recv_size,
@@ -1837,7 +1837,7 @@ GDBRemoteCommunicationClient::TestPacketSpeed (const uint32_t num_packets)
end_time = TimeValue::Now();
total_time_nsec = end_time.GetAsNanoSecondsSinceJan1_1970() - start_time.GetAsNanoSecondsSinceJan1_1970();
packets_per_second = (((float)num_packets)/(float)total_time_nsec) * (float)TimeValue::NanoSecPerSec;
- printf ("%u 'qC' packets packets in 0x%llu%9.9llu sec for %f packets/sec.\n",
+ printf ("%u 'qC' packets packets in 0x%" PRIu64 "%9.9" PRIu64 " sec for %f packets/sec.\n",
num_packets,
total_time_nsec / TimeValue::NanoSecPerSec,
total_time_nsec % TimeValue::NanoSecPerSec,
@@ -1957,7 +1957,7 @@ GDBRemoteCommunicationClient::GetThreadStopInfo (lldb::tid_t tid, StringExtracto
if (m_supports_qThreadStopInfo)
{
char packet[256];
- int packet_len = ::snprintf(packet, sizeof(packet), "qThreadStopInfo%llx", tid);
+ int packet_len = ::snprintf(packet, sizeof(packet), "qThreadStopInfo%" PRIx64, tid);
assert (packet_len < sizeof(packet));
if (SendPacketAndWaitForResponse(packet, packet_len, response, false))
{
@@ -1993,7 +1993,7 @@ GDBRemoteCommunicationClient::SendGDBStoppointTypePacket (GDBStoppointType type,
char packet[64];
const int packet_len = ::snprintf (packet,
sizeof(packet),
- "%c%i,%llx,%x",
+ "%c%i,%" PRIx64 ",%x",
insert ? 'Z' : 'z',
type,
addr,
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
index 115d55774c7..e83ea40c91e 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
@@ -280,7 +280,7 @@ GDBRemoteCommunicationServer::Handle_qHostInfo (StringExtractorGDBRemote &packet
static void
CreateProcessInfoResponse (const ProcessInstanceInfo &proc_info, StreamString &response)
{
- response.Printf ("pid:%llu;ppid:%llu;uid:%i;gid:%i;euid:%i;egid:%i;",
+ response.Printf ("pid:%" PRIu64 ";ppid:%" PRIu64 ";uid:%i;gid:%i;euid:%i;egid:%i;",
proc_info.GetProcessID(),
proc_info.GetParentProcessID(),
proc_info.GetUserID(),
@@ -646,7 +646,7 @@ GDBRemoteCommunicationServer::Handle_qC (StringExtractorGDBRemote &packet)
{
lldb::pid_t pid = m_process_launch_info.GetProcessID();
StreamString response;
- response.Printf("QC%llx", pid);
+ response.Printf("QC%" PRIx64, pid);
if (m_is_platform)
{
// If we launch a process and this GDB server is acting as a platform,
@@ -712,7 +712,7 @@ GDBRemoteCommunicationServer::Handle_qLaunchGDBServer (StringExtractorGDBRemote
{
uint16_t port = (intptr_t)accept_thread_result;
char response[256];
- const int response_len = ::snprintf (response, sizeof(response), "pid:%llu;port:%u;", debugserver_pid, port);
+ const int response_len = ::snprintf (response, sizeof(response), "pid:%" PRIu64 ";port:%u;", debugserver_pid, port);
assert (response_len < sizeof(response));
//m_port_to_pid_map[port] = debugserver_launch_info.GetProcessID();
success = SendPacketNoLock (response, response_len) > 0;
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
index a1cac219051..7c4a51e3cc5 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
@@ -155,7 +155,7 @@ GDBRemoteRegisterContext::GetPrimordialRegister(const lldb_private::RegisterInfo
int packet_len = 0;
const uint32_t reg = reg_info->kinds[eRegisterKindLLDB];
if (gdb_comm.GetThreadSuffixSupported())
- packet_len = ::snprintf (packet, sizeof(packet), "p%x;thread:%4.4llx;", reg, m_thread.GetID());
+ packet_len = ::snprintf (packet, sizeof(packet), "p%x;thread:%4.4" PRIx64 ";", reg, m_thread.GetID());
else
packet_len = ::snprintf (packet, sizeof(packet), "p%x", reg);
assert (packet_len < (sizeof(packet) - 1));
@@ -196,7 +196,7 @@ GDBRemoteRegisterContext::ReadRegisterBytes (const RegisterInfo *reg_info, DataE
{
// Get all registers in one packet
if (thread_suffix_supported)
- packet_len = ::snprintf (packet, sizeof(packet), "g;thread:%4.4llx;", m_thread.GetID());
+ packet_len = ::snprintf (packet, sizeof(packet), "g;thread:%4.4" PRIx64 ";", m_thread.GetID());
else
packet_len = ::snprintf (packet, sizeof(packet), "g");
assert (packet_len < (sizeof(packet) - 1));
@@ -311,7 +311,7 @@ GDBRemoteRegisterContext::SetPrimordialRegister(const lldb_private::RegisterInfo
lldb::endian::InlHostByteOrder());
if (gdb_comm.GetThreadSuffixSupported())
- packet.Printf (";thread:%4.4llx;", m_thread.GetID());
+ packet.Printf (";thread:%4.4" PRIx64 ";", m_thread.GetID());
// Invalidate just this register
m_reg_valid[reg] = false;
@@ -337,7 +337,7 @@ GDBRemoteRegisterContext::SyncThreadState(Process *process)
StreamString packet;
StringExtractorGDBRemote response;
- packet.Printf ("QSyncThreadState:%4.4llx;", m_thread.GetID());
+ packet.Printf ("QSyncThreadState:%4.4" PRIx64 ";", m_thread.GetID());
if (gdb_comm.SendPacketAndWaitForResponse(packet.GetString().c_str(),
packet.GetString().size(),
response,
@@ -397,7 +397,7 @@ GDBRemoteRegisterContext::WriteRegisterBytes (const lldb_private::RegisterInfo *
lldb::endian::InlHostByteOrder());
if (thread_suffix_supported)
- packet.Printf (";thread:%4.4llx;", m_thread.GetID());
+ packet.Printf (";thread:%4.4" PRIx64 ";", m_thread.GetID());
// Invalidate all register values
InvalidateIfNeeded (true);
@@ -510,7 +510,7 @@ GDBRemoteRegisterContext::ReadAllRegisterValues (lldb::DataBufferSP &data_sp)
{
int packet_len = 0;
if (thread_suffix_supported)
- packet_len = ::snprintf (packet, sizeof(packet), "g;thread:%4.4llx", m_thread.GetID());
+ packet_len = ::snprintf (packet, sizeof(packet), "g;thread:%4.4" PRIx64, m_thread.GetID());
else
packet_len = ::snprintf (packet, sizeof(packet), "g");
assert (packet_len < (sizeof(packet) - 1));
@@ -527,7 +527,7 @@ GDBRemoteRegisterContext::ReadAllRegisterValues (lldb::DataBufferSP &data_sp)
if (thread_suffix_supported)
{
char thread_id_cstr[64];
- ::snprintf (thread_id_cstr, sizeof(thread_id_cstr), ";thread:%4.4llx;", m_thread.GetID());
+ ::snprintf (thread_id_cstr, sizeof(thread_id_cstr), ";thread:%4.4" PRIx64 ";", m_thread.GetID());
response_str.append (thread_id_cstr);
}
data_sp.reset (new DataBufferHeap (response_str.c_str(), response_str.size()));
@@ -650,7 +650,7 @@ GDBRemoteRegisterContext::WriteAllRegisterValues (const lldb::DataBufferSP &data
lldb::endian::InlHostByteOrder());
if (thread_suffix_supported)
- packet.Printf (";thread:%4.4llx;", m_thread.GetID());
+ packet.Printf (";thread:%4.4" PRIx64 ";", m_thread.GetID());
m_reg_valid[reg] = false;
if (gdb_comm.SendPacketAndWaitForResponse(packet.GetString().c_str(),
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index e538254739d..94699797107 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -468,10 +468,10 @@ ProcessGDBRemote::DoConnectRemote (Stream *strm, const char *remote_url)
SetPrivateState (state);
}
else
- error.SetErrorStringWithFormat ("Process %llu was reported after connecting to '%s', but state was not stopped: %s", pid, remote_url, StateAsCString (state));
+ error.SetErrorStringWithFormat ("Process %" PRIu64 " was reported after connecting to '%s', but state was not stopped: %s", pid, remote_url, StateAsCString (state));
}
else
- error.SetErrorStringWithFormat ("Process %llu was reported after connecting to '%s', but no stop reply packet was received", pid, remote_url);
+ error.SetErrorStringWithFormat ("Process %" PRIu64 " was reported after connecting to '%s', but no stop reply packet was received", pid, remote_url);
}
if (error.Success()
@@ -960,7 +960,7 @@ ProcessGDBRemote::DoAttachToProcessWithID (lldb::pid_t attach_pid, const Process
if (error.Success())
{
char packet[64];
- const int packet_len = ::snprintf (packet, sizeof(packet), "vAttach;%llx", attach_pid);
+ const int packet_len = ::snprintf (packet, sizeof(packet), "vAttach;%" PRIx64, attach_pid);
SetID (attach_pid);
m_async_broadcaster.BroadcastEvent (eBroadcastBitAsyncContinue, new EventDataBytes (packet, packet_len));
}
@@ -1092,7 +1092,7 @@ ProcessGDBRemote::DoResume ()
if (m_gdb_comm.GetVContSupported ('c'))
{
for (tid_collection::const_iterator t_pos = m_continue_c_tids.begin(), t_end = m_continue_c_tids.end(); t_pos != t_end; ++t_pos)
- continue_packet.Printf(";c:%4.4llx", *t_pos);
+ continue_packet.Printf(";c:%4.4" PRIx64, *t_pos);
}
else
continue_packet_error = true;
@@ -1103,7 +1103,7 @@ ProcessGDBRemote::DoResume ()
if (m_gdb_comm.GetVContSupported ('C'))
{
for (tid_sig_collection::const_iterator s_pos = m_continue_C_tids.begin(), s_end = m_continue_C_tids.end(); s_pos != s_end; ++s_pos)
- continue_packet.Printf(";C%2.2x:%4.4llx", s_pos->second, s_pos->first);
+ continue_packet.Printf(";C%2.2x:%4.4" PRIx64, s_pos->second, s_pos->first);
}
else
continue_packet_error = true;
@@ -1114,7 +1114,7 @@ ProcessGDBRemote::DoResume ()
if (m_gdb_comm.GetVContSupported ('s'))
{
for (tid_collection::const_iterator t_pos = m_continue_s_tids.begin(), t_end = m_continue_s_tids.end(); t_pos != t_end; ++t_pos)
- continue_packet.Printf(";s:%4.4llx", *t_pos);
+ continue_packet.Printf(";s:%4.4" PRIx64, *t_pos);
}
else
continue_packet_error = true;
@@ -1125,7 +1125,7 @@ ProcessGDBRemote::DoResume ()
if (m_gdb_comm.GetVContSupported ('S'))
{
for (tid_sig_collection::const_iterator s_pos = m_continue_S_tids.begin(), s_end = m_continue_S_tids.end(); s_pos != s_end; ++s_pos)
- continue_packet.Printf(";S%2.2x:%4.4llx", s_pos->second, s_pos->first);
+ continue_packet.Printf(";S%2.2x:%4.4" PRIx64, s_pos->second, s_pos->first);
}
else
continue_packet_error = true;
@@ -1331,7 +1331,7 @@ ProcessGDBRemote::UpdateThreadList (ThreadList &old_thread_list, ThreadList &new
// locker will keep a mutex locked until it goes out of scope
LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_THREAD));
if (log && log->GetMask().Test(GDBR_LOG_VERBOSE))
- log->Printf ("ProcessGDBRemote::%s (pid = %llu)", __FUNCTION__, GetID());
+ log->Printf ("ProcessGDBRemote::%s (pid = %" PRIu64 ")", __FUNCTION__, GetID());
size_t num_thread_ids = m_thread_ids.size();
// The "m_thread_ids" thread ID list should always be updated after each stop
@@ -1880,7 +1880,7 @@ ProcessGDBRemote::DoDestroy ()
|| reason == eStopReasonException)
{
if (log)
- log->Printf ("ProcessGDBRemote::DoDestroy() - thread: %lld stopped with reason: %s.",
+ log->Printf ("ProcessGDBRemote::DoDestroy() - thread: %" PRId64 " stopped with reason: %s.",
thread_sp->GetID(),
stop_info_sp->GetDescription());
stop_looks_like_crash = true;
@@ -1915,7 +1915,7 @@ ProcessGDBRemote::DoDestroy ()
&& reason != eStopReasonException)
{
if (log)
- log->Printf ("ProcessGDBRemote::DoDestroy() - Suspending thread: %lld before running.",
+ log->Printf ("ProcessGDBRemote::DoDestroy() - Suspending thread: %" PRId64 " before running.",
thread_sp->GetID());
thread_sp->SetResumeState(eStateSuspended);
}
@@ -2026,7 +2026,7 @@ ProcessGDBRemote::DoReadMemory (addr_t addr, void *buf, size_t size, Error &erro
}
char packet[64];
- const int packet_len = ::snprintf (packet, sizeof(packet), "m%llx,%llx", (uint64_t)addr, (uint64_t)size);
+ const int packet_len = ::snprintf (packet, sizeof(packet), "m%" PRIx64 ",%" PRIx64, (uint64_t)addr, (uint64_t)size);
assert (packet_len + 1 < sizeof(packet));
StringExtractorGDBRemote response;
if (m_gdb_comm.SendPacketAndWaitForResponse(packet, packet_len, response, true))
@@ -2062,7 +2062,7 @@ ProcessGDBRemote::DoWriteMemory (addr_t addr, const void *buf, size_t size, Erro
}
StreamString packet;
- packet.Printf("M%llx,%llx:", addr, (uint64_t)size);
+ packet.Printf("M%" PRIx64 ",%" PRIx64 ":", addr, (uint64_t)size);
packet.PutBytesAsRawHex8(buf, size, lldb::endian::InlHostByteOrder(), lldb::endian::InlHostByteOrder());
StringExtractorGDBRemote response;
if (m_gdb_comm.SendPacketAndWaitForResponse(packet.GetData(), packet.GetSize(), response, true))
@@ -2119,7 +2119,7 @@ ProcessGDBRemote::DoAllocateMemory (size_t size, uint32_t permissions, Error &er
}
if (allocated_addr == LLDB_INVALID_ADDRESS)
- error.SetErrorStringWithFormat("unable to allocate %llu bytes of memory with permissions %s", (uint64_t)size, GetPermissionsAsCString (permissions));
+ error.SetErrorStringWithFormat("unable to allocate %" PRIu64 " bytes of memory with permissions %s", (uint64_t)size, GetPermissionsAsCString (permissions));
else
error.Clear();
return allocated_addr;
@@ -2165,7 +2165,7 @@ ProcessGDBRemote::DoDeallocateMemory (lldb::addr_t addr)
case eLazyBoolYes:
if (!m_gdb_comm.DeallocateMemory (addr))
- error.SetErrorStringWithFormat("unable to deallocate memory at 0x%llx", addr);
+ error.SetErrorStringWithFormat("unable to deallocate memory at 0x%" PRIx64, addr);
break;
case eLazyBoolNo:
@@ -2176,7 +2176,7 @@ ProcessGDBRemote::DoDeallocateMemory (lldb::addr_t addr)
InferiorCallMunmap(this, addr, pos->second))
m_addr_to_mmap_size.erase (pos);
else
- error.SetErrorStringWithFormat("unable to deallocate memory at 0x%llx", addr);
+ error.SetErrorStringWithFormat("unable to deallocate memory at 0x%" PRIx64, addr);
}
break;
}
@@ -2209,12 +2209,12 @@ ProcessGDBRemote::EnableBreakpoint (BreakpointSite *bp_site)
user_id_t site_id = bp_site->GetID();
const addr_t addr = bp_site->GetLoadAddress();
if (log)
- log->Printf ("ProcessGDBRemote::EnableBreakpoint (size_id = %llu) address = 0x%llx", site_id, (uint64_t)addr);
+ log->Printf ("ProcessGDBRemote::EnableBreakpoint (size_id = %" PRIu64 ") address = 0x%" PRIx64, site_id, (uint64_t)addr);
if (bp_site->IsEnabled())
{
if (log)
- log->Printf ("ProcessGDBRemote::EnableBreakpoint (size_id = %llu) address = 0x%llx -- SUCCESS (already enabled)", site_id, (uint64_t)addr);
+ log->Printf ("ProcessGDBRemote::EnableBreakpoint (size_id = %" PRIu64 ") address = 0x%" PRIx64 " -- SUCCESS (already enabled)", site_id, (uint64_t)addr);
return error;
}
else
@@ -2252,7 +2252,7 @@ ProcessGDBRemote::EnableBreakpoint (BreakpointSite *bp_site)
if (log)
{
const char *err_string = error.AsCString();
- log->Printf ("ProcessGDBRemote::EnableBreakpoint() error for breakpoint at 0x%8.8llx: %s",
+ log->Printf ("ProcessGDBRemote::EnableBreakpoint() error for breakpoint at 0x%8.8" PRIx64 ": %s",
bp_site->GetLoadAddress(),
err_string ? err_string : "NULL");
}
@@ -2271,7 +2271,7 @@ ProcessGDBRemote::DisableBreakpoint (BreakpointSite *bp_site)
user_id_t site_id = bp_site->GetID();
LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_BREAKPOINTS));
if (log)
- log->Printf ("ProcessGDBRemote::DisableBreakpoint (site_id = %llu) addr = 0x%8.8llx", site_id, (uint64_t)addr);
+ log->Printf ("ProcessGDBRemote::DisableBreakpoint (site_id = %" PRIu64 ") addr = 0x%8.8" PRIx64, site_id, (uint64_t)addr);
if (bp_site->IsEnabled())
{
@@ -2300,7 +2300,7 @@ ProcessGDBRemote::DisableBreakpoint (BreakpointSite *bp_site)
else
{
if (log)
- log->Printf ("ProcessGDBRemote::DisableBreakpoint (site_id = %llu) addr = 0x%8.8llx -- SUCCESS (already disabled)", site_id, (uint64_t)addr);
+ log->Printf ("ProcessGDBRemote::DisableBreakpoint (site_id = %" PRIu64 ") addr = 0x%8.8" PRIx64 " -- SUCCESS (already disabled)", site_id, (uint64_t)addr);
return error;
}
@@ -2337,11 +2337,11 @@ ProcessGDBRemote::EnableWatchpoint (Watchpoint *wp)
addr_t addr = wp->GetLoadAddress();
LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_WATCHPOINTS));
if (log)
- log->Printf ("ProcessGDBRemote::EnableWatchpoint(watchID = %llu)", watchID);
+ log->Printf ("ProcessGDBRemote::EnableWatchpoint(watchID = %" PRIu64 ")", watchID);
if (wp->IsEnabled())
{
if (log)
- log->Printf("ProcessGDBRemote::EnableWatchpoint(watchID = %llu) addr = 0x%8.8llx: watchpoint already enabled.", watchID, (uint64_t)addr);
+ log->Printf("ProcessGDBRemote::EnableWatchpoint(watchID = %" PRIu64 ") addr = 0x%8.8" PRIx64 ": watchpoint already enabled.", watchID, (uint64_t)addr);
return error;
}
@@ -2381,12 +2381,12 @@ ProcessGDBRemote::DisableWatchpoint (Watchpoint *wp)
addr_t addr = wp->GetLoadAddress();
if (log)
- log->Printf ("ProcessGDBRemote::DisableWatchpoint (watchID = %llu) addr = 0x%8.8llx", watchID, (uint64_t)addr);
+ log->Printf ("ProcessGDBRemote::DisableWatchpoint (watchID = %" PRIu64 ") addr = 0x%8.8" PRIx64, watchID, (uint64_t)addr);
if (!wp->IsEnabled())
{
if (log)
- log->Printf ("ProcessGDBRemote::DisableWatchpoint (watchID = %llu) addr = 0x%8.8llx -- SUCCESS (already disabled)", watchID, (uint64_t)addr);
+ log->Printf ("ProcessGDBRemote::DisableWatchpoint (watchID = %" PRIu64 ") addr = 0x%8.8" PRIx64 " -- SUCCESS (already disabled)", watchID, (uint64_t)addr);
// See also 'class WatchpointSentry' within StopInfo.cpp.
// This disabling attempt might come from the user-supplied actions, we'll route it in order for
// the watchpoint object to intelligently process this action.
@@ -2580,7 +2580,7 @@ ProcessGDBRemote::StartDebugserverProcess (const char *debugserver_url, const Pr
m_debugserver_pid = LLDB_INVALID_PROCESS_ID;
if (error.Fail() || log)
- error.PutToLog(log.get(), "Host::LaunchProcess (launch_info) => pid=%llu, path='%s'", m_debugserver_pid, debugserver_path);
+ error.PutToLog(log.get(), "Host::LaunchProcess (launch_info) => pid=%" PRIu64 ", path='%s'", m_debugserver_pid, debugserver_path);
}
else
{
@@ -2625,7 +2625,7 @@ ProcessGDBRemote::MonitorDebugserverProcess
TargetSP target_sp (Debugger::FindTargetWithProcess(process));
if (log)
- log->Printf ("ProcessGDBRemote::MonitorDebugserverProcess (baton=%p, pid=%llu, signo=%i (0x%x), exit_status=%i)", callback_baton, debugserver_pid, signo, signo, exit_status);
+ log->Printf ("ProcessGDBRemote::MonitorDebugserverProcess (baton=%p, pid=%" PRIu64 ", signo=%i (0x%x), exit_status=%i)", callback_baton, debugserver_pid, signo, signo, exit_status);
if (target_sp)
{
@@ -2786,7 +2786,7 @@ ProcessGDBRemote::AsyncThread (void *arg)
LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PROCESS));
if (log)
- log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %llu) thread starting...", __FUNCTION__, arg, process->GetID());
+ log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64 ") thread starting...", __FUNCTION__, arg, process->GetID());
Listener listener ("ProcessGDBRemote::AsyncThread");
EventSP event_sp;
@@ -2801,14 +2801,14 @@ ProcessGDBRemote::AsyncThread (void *arg)
while (!done)
{
if (log)
- log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %llu) listener.WaitForEvent (NULL, event_sp)...", __FUNCTION__, arg, process->GetID());
+ log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64 ") listener.WaitForEvent (NULL, event_sp)...", __FUNCTION__, arg, process->GetID());
if (listener.WaitForEvent (NULL, event_sp))
{
const uint32_t event_type = event_sp->GetType();
if (event_sp->BroadcasterIs (&process->m_async_broadcaster))
{
if (log)
- log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %llu) Got an event of type: %d...", __FUNCTION__, arg, process->GetID(), event_type);
+ log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64 ") Got an event of type: %d...", __FUNCTION__, arg, process->GetID(), event_type);
switch (event_type)
{
@@ -2821,7 +2821,7 @@ ProcessGDBRemote::AsyncThread (void *arg)
const char *continue_cstr = (const char *)continue_packet->GetBytes ();
const size_t continue_cstr_len = continue_packet->GetByteSize ();
if (log)
- log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %llu) got eBroadcastBitAsyncContinue: %s", __FUNCTION__, arg, process->GetID(), continue_cstr);
+ log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64 ") got eBroadcastBitAsyncContinue: %s", __FUNCTION__, arg, process->GetID(), continue_cstr);
if (::strstr (continue_cstr, "vAttach") == NULL)
process->SetPrivateState(eStateRunning);
@@ -2865,13 +2865,13 @@ ProcessGDBRemote::AsyncThread (void *arg)
case eBroadcastBitAsyncThreadShouldExit:
if (log)
- log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %llu) got eBroadcastBitAsyncThreadShouldExit...", __FUNCTION__, arg, process->GetID());
+ log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64 ") got eBroadcastBitAsyncThreadShouldExit...", __FUNCTION__, arg, process->GetID());
done = true;
break;
default:
if (log)
- log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %llu) got unknown event 0x%8.8x", __FUNCTION__, arg, process->GetID(), event_type);
+ log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64 ") got unknown event 0x%8.8x", __FUNCTION__, arg, process->GetID(), event_type);
done = true;
break;
}
@@ -2888,14 +2888,14 @@ ProcessGDBRemote::AsyncThread (void *arg)
else
{
if (log)
- log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %llu) listener.WaitForEvent (NULL, event_sp) => false", __FUNCTION__, arg, process->GetID());
+ log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64 ") listener.WaitForEvent (NULL, event_sp) => false", __FUNCTION__, arg, process->GetID());
done = true;
}
}
}
if (log)
- log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %llu) thread exiting...", __FUNCTION__, arg, process->GetID());
+ log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64 ") thread exiting...", __FUNCTION__, arg, process->GetID());
process->m_async_thread = LLDB_INVALID_HOST_THREAD;
return NULL;
diff --git a/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
index 36fa418cf2b..001cc60aea1 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
@@ -97,7 +97,7 @@ ThreadGDBRemote::WillResume (StateType resume_state)
int signo = GetResumeSignal();
lldb::LogSP log(lldb_private::GetLogIfAnyCategoriesSet (GDBR_LOG_THREAD));
if (log)
- log->Printf ("Resuming thread: %4.4llx with state: %s.", GetID(), StateAsCString(resume_state));
+ log->Printf ("Resuming thread: %4.4" PRIx64 " with state: %s.", GetID(), StateAsCString(resume_state));
ProcessSP process_sp (GetProcess());
if (process_sp)
diff --git a/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp b/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp
index 5b346144ea5..4827dd8c1eb 100644
--- a/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp
+++ b/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp
@@ -163,7 +163,7 @@ ProcessMachCore::GetDynamicLoaderAddress (lldb::addr_t addr)
}
// TODO: swap header if needed...
- //printf("0x%16.16llx: magic = 0x%8.8x, file_type= %u\n", vaddr, header.magic, header.filetype);
+ //printf("0x%16.16" PRIx64 ": magic = 0x%8.8x, file_type= %u\n", vaddr, header.magic, header.filetype);
if (header.magic == llvm::MachO::HeaderMagic32 ||
header.magic == llvm::MachO::HeaderMagic64)
{
@@ -175,14 +175,14 @@ ProcessMachCore::GetDynamicLoaderAddress (lldb::addr_t addr)
switch (header.filetype)
{
case llvm::MachO::HeaderFileTypeDynamicLinkEditor:
- //printf("0x%16.16llx: file_type = MH_DYLINKER\n", vaddr);
+ //printf("0x%16.16" PRIx64 ": file_type = MH_DYLINKER\n", vaddr);
// Address of dyld "struct mach_header" in the core file
m_dyld_plugin_name = DynamicLoaderMacOSXDYLD::GetPluginNameStatic();
m_dyld_addr = addr;
return true;
case llvm::MachO::HeaderFileTypeExecutable:
- //printf("0x%16.16llx: file_type = MH_EXECUTE\n", vaddr);
+ //printf("0x%16.16" PRIx64 ": file_type = MH_EXECUTE\n", vaddr);
// Check MH_EXECUTABLE file types to see if the dynamic link object flag
// is NOT set. If it isn't, then we have a mach_kernel.
if ((header.flags & llvm::MachO::HeaderFlagBitIsDynamicLinkObject) == 0)
@@ -256,7 +256,7 @@ ProcessMachCore::DoLoadCore ()
ranges_are_sorted = false;
vm_addr = section->GetFileAddress();
VMRangeToFileOffset::Entry *last_entry = m_core_aranges.Back();
-// printf ("LC_SEGMENT[%u] arange=[0x%16.16llx - 0x%16.16llx), frange=[0x%8.8x - 0x%8.8x)\n",
+// printf ("LC_SEGMENT[%u] arange=[0x%16.16" PRIx64 " - 0x%16.16" PRIx64 "), frange=[0x%8.8x - 0x%8.8x)\n",
// i,
// range_entry.GetRangeBase(),
// range_entry.GetRangeEnd(),
@@ -413,7 +413,7 @@ ProcessMachCore::DoReadMemory (addr_t addr, void *buf, size_t size, Error &error
}
else
{
- error.SetErrorStringWithFormat ("core file does not contain 0x%llx", addr);
+ error.SetErrorStringWithFormat ("core file does not contain 0x%" PRIx64, addr);
}
}
return 0;
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp
index 57ef6ba4eb4..81dc58cc312 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp
@@ -243,7 +243,7 @@ DWARFDebugArangeSet::Dump(Stream *s) const
DescriptorConstIter pos;
DescriptorConstIter end = m_arange_descriptors.end();
for (pos = m_arange_descriptors.begin(); pos != end; ++pos)
- s->Printf("[0x%*.*llx - 0x%*.*llx)\n",
+ s->Printf("[0x%*.*" PRIx64 " - 0x%*.*" PRIx64 ")\n",
hex_width, hex_width, pos->address,
hex_width, hex_width, pos->end_address());
}
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
index ec212fdc137..94519a472f1 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
@@ -118,7 +118,7 @@ DWARFDebugAranges::Dump (Log *log) const
{
const RangeToDIE::Entry *entry = m_aranges.GetEntryAtIndex(i);
if (entry)
- log->Printf ("0x%8.8x: [0x%llx - 0x%llx)",
+ log->Printf ("0x%8.8x: [0x%" PRIx64 " - 0x%" PRIx64 ")",
entry->data,
entry->GetRangeBase(),
entry->GetRangeEnd());
@@ -143,7 +143,7 @@ DWARFDebugAranges::Sort (bool minimize)
if (log)
{
orig_arange_size = m_aranges.GetSize();
- log->Printf ("DWARFDebugAranges::Sort(minimize = %u) with %llu entries", minimize, (uint64_t)orig_arange_size);
+ log->Printf ("DWARFDebugAranges::Sort(minimize = %u) with %" PRIu64 " entries", minimize, (uint64_t)orig_arange_size);
}
m_aranges.Sort();
@@ -155,7 +155,7 @@ DWARFDebugAranges::Sort (bool minimize)
{
const size_t new_arange_size = m_aranges.GetSize();
const size_t delta = orig_arange_size - new_arange_size;
- log->Printf ("DWARFDebugAranges::Sort() %llu entries after minimizing (%llu entries combined for %llu bytes saved)",
+ log->Printf ("DWARFDebugAranges::Sort() %" PRIu64 " entries after minimizing (%" PRIu64 " entries combined for %" PRIu64 " bytes saved)",
(uint64_t)new_arange_size,
(uint64_t)delta,
(uint64_t)delta * sizeof(Range));
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
index 529ba9b2c04..71c6c71e475 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
@@ -1077,7 +1077,7 @@ DWARFDebugInfoEntry::DumpAttribute
{
case DW_AT_stmt_list:
if ( verbose ) s.PutCString(" ( ");
- s.Printf( "0x%8.8llx", form_value.Unsigned());
+ s.Printf( "0x%8.8" PRIx64, form_value.Unsigned());
if ( verbose ) s.PutCString(" )");
break;
@@ -1761,7 +1761,7 @@ DWARFDebugInfoEntry::BuildFunctionAddressRangeTable
hi_pc = GetAttributeValueAsUnsigned(dwarf2Data, cu, DW_AT_high_pc, DW_INVALID_ADDRESS);
if (hi_pc != DW_INVALID_ADDRESS)
{
- // printf("BuildAddressRangeTable() 0x%8.8x: [0x%16.16llx - 0x%16.16llx)\n", m_offset, lo_pc, hi_pc); // DEBUG ONLY
+ // printf("BuildAddressRangeTable() 0x%8.8x: [0x%16.16" PRIx64 " - 0x%16.16" PRIx64 ")\n", m_offset, lo_pc, hi_pc); // DEBUG ONLY
debug_aranges->AppendRange (GetOffset(), lo_pc, hi_pc);
}
}
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp
index d21753c9e78..77fd4eed5d9 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp
@@ -100,7 +100,7 @@ DumpStateToFile (dw_offset_t offset, const DWARFDebugLine::State& state, void* u
}
else
{
- log->Printf( "0x%16.16llx %6u %6u %6u%s\n", state.address, state.line, state.column, state.file, state.end_sequence ? " END" : "");
+ log->Printf( "0x%16.16" PRIx64 " %6u %6u %6u%s\n", state.address, state.line, state.column, state.file, state.end_sequence ? " END" : "");
}
}
@@ -236,7 +236,7 @@ DWARFDebugLine::DumpStatementOpcodes(Log *log, const DataExtractor& debug_line_d
case DW_LNE_set_address :
{
row.address = debug_line_data.GetMaxU64(&offset, arg_size);
- log->Printf( "0x%8.8x: DW_LNE_set_address (0x%llx)", op_offset, row.address);
+ log->Printf( "0x%8.8x: DW_LNE_set_address (0x%" PRIx64 ")", op_offset, row.address);
}
break;
@@ -314,7 +314,7 @@ DWARFDebugLine::DumpStatementOpcodes(Log *log, const DataExtractor& debug_line_d
{
uint8_t adjust_opcode = 255 - prologue.opcode_base;
dw_addr_t addr_offset = (adjust_opcode / prologue.line_range) * prologue.min_inst_length;
- log->Printf( "0x%8.8x: DW_LNS_const_add_pc (0x%8.8llx)", op_offset, addr_offset);
+ log->Printf( "0x%8.8x: DW_LNS_const_add_pc (0x%8.8" PRIx64 ")", op_offset, addr_offset);
row.address += addr_offset;
}
break;
@@ -362,7 +362,7 @@ DWARFDebugLine::DumpStatementOpcodes(Log *log, const DataExtractor& debug_line_d
uint8_t adjust_opcode = opcode - prologue.opcode_base;
dw_addr_t addr_offset = (adjust_opcode / prologue.line_range) * prologue.min_inst_length;
int32_t line_offset = prologue.line_base + (adjust_opcode % prologue.line_range);
- log->Printf("0x%8.8x: address += 0x%llx, line += %i\n", op_offset, (uint64_t)addr_offset, line_offset);
+ log->Printf("0x%8.8x: address += 0x%" PRIx64 ", line += %i\n", op_offset, (uint64_t)addr_offset, line_offset);
row.address += addr_offset;
row.line += line_offset;
row.Dump (log);
@@ -1122,7 +1122,7 @@ DWARFDebugLine::Row::Reset(bool default_is_stmt)
void
DWARFDebugLine::Row::Dump(Log *log) const
{
- log->Printf( "0x%16.16llx %6u %6u %6u %3u %s%s%s%s%s",
+ log->Printf( "0x%16.16" PRIx64 " %6u %6u %6u %3u %s%s%s%s%s",
address,
line,
column,
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp
index 7dfbc64a7ae..4df4d2478c8 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp
@@ -32,11 +32,11 @@ bool
DWARFDebugPubnames::Extract(const DataExtractor& data)
{
Timer scoped_timer (__PRETTY_FUNCTION__,
- "DWARFDebugPubnames::Extract (byte_size = %llu)",
+ "DWARFDebugPubnames::Extract (byte_size = %" PRIu64 ")",
(uint64_t)data.GetByteSize());
LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_PUBNAMES));
if (log)
- log->Printf("DWARFDebugPubnames::Extract (byte_size = %llu)", (uint64_t)data.GetByteSize());
+ log->Printf("DWARFDebugPubnames::Extract (byte_size = %" PRIu64 ")", (uint64_t)data.GetByteSize());
if (data.ValidOffset(0))
{
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
index 6ccd5601aab..3288404b236 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
@@ -295,7 +295,7 @@ DWARFFormValue::Dump(Stream &s, const DataExtractor* debug_str_data, const DWARF
switch (m_form)
{
case DW_FORM_exprloc:
- case DW_FORM_block: s.Printf("<0x%llx> ", uvalue); break;
+ case DW_FORM_block: s.Printf("<0x%" PRIx64 "> ", uvalue); break;
case DW_FORM_block1: s.Printf("<0x%2.2x> ", (uint8_t)uvalue); break;
case DW_FORM_block2: s.Printf("<0x%4.4x> ", (uint16_t)uvalue); break;
case DW_FORM_block4: s.Printf("<0x%8.8x> ", (uint32_t)uvalue); break;
@@ -343,8 +343,8 @@ DWARFFormValue::Dump(Stream &s, const DataExtractor* debug_str_data, const DWARF
case DW_FORM_ref1: cu_relative_offset = true; if (verbose) s.Printf("cu + 0x%2.2x", (uint8_t)uvalue); break;
case DW_FORM_ref2: cu_relative_offset = true; if (verbose) s.Printf("cu + 0x%4.4x", (uint16_t)uvalue); break;
case DW_FORM_ref4: cu_relative_offset = true; if (verbose) s.Printf("cu + 0x%4.4x", (uint32_t)uvalue); break;
- case DW_FORM_ref8: cu_relative_offset = true; if (verbose) s.Printf("cu + 0x%8.8llx", uvalue); break;
- case DW_FORM_ref_udata: cu_relative_offset = true; if (verbose) s.Printf("cu + 0x%llx", uvalue); break;
+ case DW_FORM_ref8: cu_relative_offset = true; if (verbose) s.Printf("cu + 0x%8.8" PRIx64, uvalue); break;
+ case DW_FORM_ref_udata: cu_relative_offset = true; if (verbose) s.Printf("cu + 0x%" PRIx64, uvalue); break;
// All DW_FORM_indirect attributes should be resolved prior to calling this function
case DW_FORM_indirect: s.PutCString("DW_FORM_indirect"); break;
@@ -359,7 +359,7 @@ DWARFFormValue::Dump(Stream &s, const DataExtractor* debug_str_data, const DWARF
if (verbose)
s.PutCString(" => ");
- s.Printf("{0x%8.8llx}", (uvalue + (cu ? cu->GetOffset() : 0)));
+ s.Printf("{0x%8.8" PRIx64 "}", (uvalue + (cu ? cu->GetOffset() : 0)));
}
}
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationDescription.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationDescription.cpp
index bb72efd41ad..81492a992f2 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationDescription.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationDescription.cpp
@@ -71,7 +71,7 @@ print_dwarf_exp_op (Stream &s,
{
uint = data.GetULEB128(offset_ptr);
sint = data.GetSLEB128(offset_ptr);
- s.Printf("%llu %lli", uint, sint);
+ s.Printf("%" PRIu64 " %" PRIi64, uint, sint);
return 0;
}
if (opcode_class != DRC_ONEOPERAND)
@@ -156,16 +156,16 @@ print_dwarf_exp_op (Stream &s,
switch (size)
{
- case -1: sint = (int8_t) data.GetU8(offset_ptr); s.Printf("%+lli", sint); break;
- case -2: sint = (int16_t) data.GetU16(offset_ptr); s.Printf("%+lli", sint); break;
- case -4: sint = (int32_t) data.GetU32(offset_ptr); s.Printf("%+lli", sint); break;
- case -8: sint = (int64_t) data.GetU64(offset_ptr); s.Printf("%+lli", sint); break;
- case -128: sint = data.GetSLEB128(offset_ptr); s.Printf("%+lli", sint); break;
- case 1: uint = data.GetU8(offset_ptr); s.Printf("0x%2.2llx", uint); break;
- case 2: uint = data.GetU16(offset_ptr); s.Printf("0x%4.4llx", uint); break;
- case 4: uint = data.GetU32(offset_ptr); s.Printf("0x%8.8llx", uint); break;
- case 8: uint = data.GetU64(offset_ptr); s.Printf("0x%16.16llx", uint); break;
- case 128: uint = data.GetULEB128(offset_ptr); s.Printf("0x%llx", uint); break;
+ case -1: sint = (int8_t) data.GetU8(offset_ptr); s.Printf("%+" PRIi64, sint); break;
+ case -2: sint = (int16_t) data.GetU16(offset_ptr); s.Printf("%+" PRIi64, sint); break;
+ case -4: sint = (int32_t) data.GetU32(offset_ptr); s.Printf("%+" PRIi64, sint); break;
+ case -8: sint = (int64_t) data.GetU64(offset_ptr); s.Printf("%+" PRIi64, sint); break;
+ case -128: sint = data.GetSLEB128(offset_ptr); s.Printf("%+" PRIi64, sint); break;
+ case 1: uint = data.GetU8(offset_ptr); s.Printf("0x%2.2" PRIx64, uint); break;
+ case 2: uint = data.GetU16(offset_ptr); s.Printf("0x%4.4" PRIx64, uint); break;
+ case 4: uint = data.GetU32(offset_ptr); s.Printf("0x%8.8" PRIx64, uint); break;
+ case 8: uint = data.GetU64(offset_ptr); s.Printf("0x%16.16" PRIx64, uint); break;
+ case 128: uint = data.GetULEB128(offset_ptr); s.Printf("0x%" PRIx64, uint); break;
}
return 0;
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index e70a225e448..ca7d24a568d 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -126,14 +126,14 @@ public:
{
StreamString log_strm;
const size_t n = m_dies.size();
- log_strm.Printf("DIEStack[%llu]:\n", (uint64_t)n);
+ log_strm.Printf("DIEStack[%" PRIu64 "]:\n", (uint64_t)n);
for (size_t i=0; i<n; i++)
{
DWARFCompileUnit *cu = m_dies[i].cu;
const DWARFDebugInfoEntry *die = m_dies[i].die;
std::string qualified_name;
die->GetQualifiedName(dwarf, cu, qualified_name);
- log_strm.Printf ("[%llu] 0x%8.8x: %s name='%s'\n",
+ log_strm.Printf ("[%" PRIu64 "] 0x%8.8x: %s name='%s'\n",
(uint64_t)i,
die->GetOffset(),
DW_TAG_value_to_name(die->Tag()),
@@ -1856,12 +1856,12 @@ SymbolFileDWARF::ParseChildMembers
else
{
if (name)
- GetObjectFile()->GetModule()->ReportError ("0x%8.8llx: DW_TAG_member '%s' refers to type 0x%8.8llx which was unable to be parsed",
+ GetObjectFile()->GetModule()->ReportError ("0x%8.8" PRIx64 ": DW_TAG_member '%s' refers to type 0x%8.8" PRIx64 " which was unable to be parsed",
MakeUserID(die->GetOffset()),
name,
encoding_uid);
else
- GetObjectFile()->GetModule()->ReportError ("0x%8.8llx: DW_TAG_member refers to type 0x%8.8llx which was unable to be parsed",
+ GetObjectFile()->GetModule()->ReportError ("0x%8.8" PRIx64 ": DW_TAG_member refers to type 0x%8.8" PRIx64 " which was unable to be parsed",
MakeUserID(die->GetOffset()),
encoding_uid);
}
@@ -2192,7 +2192,7 @@ SymbolFileDWARF::ResolveClangOpaqueTypeDefinition (lldb::clang_type_t clang_type
if (log)
{
GetObjectFile()->GetModule()->LogMessageVerboseBacktrace (log.get(),
- "0x%8.8llx: %s '%s' resolving forward declaration...",
+ "0x%8.8" PRIx64 ": %s '%s' resolving forward declaration...",
MakeUserID(die->GetOffset()),
DW_TAG_value_to_name(tag),
type->GetName().AsCString());
@@ -2389,7 +2389,7 @@ SymbolFileDWARF::ResolveClangOpaqueTypeDefinition (lldb::clang_type_t clang_type
if (log)
{
GetObjectFile()->GetModule()->LogMessage (log.get(),
- "SymbolFileDWARF::ResolveClangOpaqueTypeDefinition (clang_type = %p) caching layout info for record_decl = %p, bit_size = %llu, alignment = %llu, field_offsets[%u], base_offsets[%u], vbase_offsets[%u])",
+ "SymbolFileDWARF::ResolveClangOpaqueTypeDefinition (clang_type = %p) caching layout info for record_decl = %p, bit_size = %" PRIu64 ", alignment = %" PRIu64 ", field_offsets[%u], base_offsets[%u], vbase_offsets[%u])",
clang_type,
record_decl,
layout_info.bit_size,
@@ -2525,7 +2525,7 @@ uint32_t
SymbolFileDWARF::ResolveSymbolContext (const Address& so_addr, uint32_t resolve_scope, SymbolContext& sc)
{
Timer scoped_timer(__PRETTY_FUNCTION__,
- "SymbolFileDWARF::ResolveSymbolContext (so_addr = { section = %p, offset = 0x%llx }, resolve_scope = 0x%8.8x)",
+ "SymbolFileDWARF::ResolveSymbolContext (so_addr = { section = %p, offset = 0x%" PRIx64 " }, resolve_scope = 0x%8.8x)",
so_addr.GetSection().get(),
so_addr.GetOffset(),
resolve_scope);
@@ -4339,7 +4339,7 @@ SymbolFileDWARF::ResolveNamespaceDIE (DWARFCompileUnit *dwarf_cu, const DWARFDeb
if (namespace_name)
{
GetObjectFile()->GetModule()->LogMessage (log.get(),
- "ASTContext => %p: 0x%8.8llx: DW_TAG_namespace with DW_AT_name(\"%s\") => clang::NamespaceDecl *%p (original = %p)",
+ "ASTContext => %p: 0x%8.8" PRIx64 ": DW_TAG_namespace with DW_AT_name(\"%s\") => clang::NamespaceDecl *%p (original = %p)",
GetClangASTContext().getASTContext(),
MakeUserID(die->GetOffset()),
namespace_name,
@@ -4349,7 +4349,7 @@ SymbolFileDWARF::ResolveNamespaceDIE (DWARFCompileUnit *dwarf_cu, const DWARFDeb
else
{
GetObjectFile()->GetModule()->LogMessage (log.get(),
- "ASTContext => %p: 0x%8.8llx: DW_TAG_namespace (anonymous) => clang::NamespaceDecl *%p (original = %p)",
+ "ASTContext => %p: 0x%8.8" PRIx64 ": DW_TAG_namespace (anonymous) => clang::NamespaceDecl *%p (original = %p)",
GetClangASTContext().getASTContext(),
MakeUserID(die->GetOffset()),
namespace_decl,
@@ -4623,7 +4623,7 @@ SymbolFileDWARF::FindCompleteObjCDefinitionTypeForDIE (const DWARFDebugInfoEntry
Type *resolved_type = ResolveType (type_cu, type_die, false);
if (resolved_type && resolved_type != DIE_IS_BEING_PARSED)
{
- DEBUG_PRINTF ("resolved 0x%8.8llx (cu 0x%8.8llx) from %s to 0x%8.8llx (cu 0x%8.8llx)\n",
+ DEBUG_PRINTF ("resolved 0x%8.8" PRIx64 " (cu 0x%8.8" PRIx64 ") from %s to 0x%8.8" PRIx64 " (cu 0x%8.8" PRIx64 ")\n",
MakeUserID(die->GetOffset()),
MakeUserID(dwarf_cu->GetOffset()),
m_obj_file->GetFileSpec().GetFilename().AsCString(),
@@ -4884,7 +4884,7 @@ SymbolFileDWARF::FindDefinitionTypeForDIE (DWARFCompileUnit* cu,
Type *resolved_type = ResolveType (type_cu, type_die, false);
if (resolved_type && resolved_type != DIE_IS_BEING_PARSED)
{
- DEBUG_PRINTF ("resolved 0x%8.8llx (cu 0x%8.8llx) from %s to 0x%8.8llx (cu 0x%8.8llx)\n",
+ DEBUG_PRINTF ("resolved 0x%8.8" PRIx64 " (cu 0x%8.8" PRIx64 ") from %s to 0x%8.8" PRIx64 " (cu 0x%8.8" PRIx64 ")\n",
MakeUserID(die->GetOffset()),
MakeUserID(dwarf_cu->GetOffset()),
m_obj_file->GetFileSpec().GetFilename().AsCString(),
@@ -5210,7 +5210,7 @@ SymbolFileDWARF::CopyUniqueClassMethodTypes (Type *class_type,
if (src_child_type)
{
if (log)
- log->Printf ("uniquing type %p (uid=0x%llx) from 0x%8.8x for 0x%8.8x", src_child_type, src_child_type->GetID(), src_die->GetOffset(), dst_die->GetOffset());
+ log->Printf ("uniquing type %p (uid=0x%" PRIx64 ") from 0x%8.8x for 0x%8.8x", src_child_type, src_child_type->GetID(), src_die->GetOffset(), dst_die->GetOffset());
m_die_to_type[dst_die] = src_child_type;
}
else
@@ -5253,7 +5253,7 @@ SymbolFileDWARF::CopyUniqueClassMethodTypes (Type *class_type,
if (src_child_type)
{
if (log)
- log->Printf ("uniquing type %p (uid=0x%llx) from 0x%8.8x for 0x%8.8x", src_child_type, src_child_type->GetID(), src_die->GetOffset(), dst_die->GetOffset());
+ log->Printf ("uniquing type %p (uid=0x%" PRIx64 ") from 0x%8.8x for 0x%8.8x", src_child_type, src_child_type->GetID(), src_die->GetOffset(), dst_die->GetOffset());
m_die_to_type[dst_die] = src_child_type;
}
else
@@ -5413,7 +5413,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
}
}
- DEBUG_PRINTF ("0x%8.8llx: %s (\"%s\") type => 0x%8.8x\n", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type_name_cstr, encoding_uid);
+ DEBUG_PRINTF ("0x%8.8" PRIx64 ": %s (\"%s\") type => 0x%8.8x\n", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type_name_cstr, encoding_uid);
switch (tag)
{
@@ -5626,7 +5626,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
}
}
- DEBUG_PRINTF ("0x%8.8llx: %s (\"%s\")\n", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type_name_cstr);
+ DEBUG_PRINTF ("0x%8.8" PRIx64 ": %s (\"%s\")\n", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type_name_cstr);
int tag_decl_kind = -1;
AccessType default_accessibility = eAccessNone;
@@ -5689,7 +5689,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
if (log)
{
GetObjectFile()->GetModule()->LogMessage (log.get(),
- "SymbolFileDWARF(%p) - 0x%8.8x: %s type \"%s\" is an incomplete objc type, complete type is 0x%8.8llx",
+ "SymbolFileDWARF(%p) - 0x%8.8x: %s type \"%s\" is an incomplete objc type, complete type is 0x%8.8" PRIx64,
this,
die->GetOffset(),
DW_TAG_value_to_name(tag),
@@ -5743,7 +5743,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
if (log)
{
GetObjectFile()->GetModule()->LogMessage (log.get(),
- "SymbolFileDWARF(%p) - 0x%8.8x: %s type \"%s\" is a forward declaration, complete type is 0x%8.8llx",
+ "SymbolFileDWARF(%p) - 0x%8.8x: %s type \"%s\" is a forward declaration, complete type is 0x%8.8" PRIx64,
this,
die->GetOffset(),
DW_TAG_value_to_name(tag),
@@ -5950,7 +5950,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
}
}
- DEBUG_PRINTF ("0x%8.8llx: %s (\"%s\")\n", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type_name_cstr);
+ DEBUG_PRINTF ("0x%8.8" PRIx64 ": %s (\"%s\")\n", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type_name_cstr);
clang_type_t enumerator_clang_type = NULL;
clang_type = m_forward_decl_die_to_clang_type.lookup (die);
@@ -6109,7 +6109,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
}
}
- DEBUG_PRINTF ("0x%8.8llx: %s (\"%s\")\n", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type_name_cstr);
+ DEBUG_PRINTF ("0x%8.8" PRIx64 ": %s (\"%s\")\n", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type_name_cstr);
clang_type_t return_clang_type = NULL;
Type *func_type = NULL;
@@ -6260,7 +6260,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
}
else
{
- GetObjectFile()->GetModule()->ReportWarning ("0x%8.8llx: DW_AT_specification(0x%8.8x) has no decl\n",
+ GetObjectFile()->GetModule()->ReportWarning ("0x%8.8" PRIx64 ": DW_AT_specification(0x%8.8x) has no decl\n",
MakeUserID(die->GetOffset()),
specification_die_offset);
}
@@ -6283,7 +6283,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
}
else
{
- GetObjectFile()->GetModule()->ReportWarning ("0x%8.8llx: DW_AT_abstract_origin(0x%8.8x) has no decl\n",
+ GetObjectFile()->GetModule()->ReportWarning ("0x%8.8" PRIx64 ": DW_AT_abstract_origin(0x%8.8x) has no decl\n",
MakeUserID(die->GetOffset()),
abstract_origin_die_offset);
}
@@ -6312,7 +6312,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
{
clang::CXXMethodDecl *cxx_method_decl;
// REMOVE THE CRASH DESCRIPTION BELOW
- Host::SetCrashDescriptionWithFormat ("SymbolFileDWARF::ParseType() is adding a method %s to class %s in DIE 0x%8.8llx from %s/%s",
+ Host::SetCrashDescriptionWithFormat ("SymbolFileDWARF::ParseType() is adding a method %s to class %s in DIE 0x%8.8" PRIx64 " from %s/%s",
type_name_cstr,
class_type->GetName().GetCString(),
MakeUserID(die->GetOffset()),
@@ -6498,7 +6498,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
}
}
- DEBUG_PRINTF ("0x%8.8llx: %s (\"%s\")\n", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type_name_cstr);
+ DEBUG_PRINTF ("0x%8.8" PRIx64 ": %s (\"%s\")\n", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type_name_cstr);
Type *element_type = ResolveTypeUID(type_die_offset);
@@ -7216,7 +7216,7 @@ SymbolFileDWARF::ParseVariables
}
else
{
- GetObjectFile()->GetModule()->ReportError ("parent 0x%8.8llx %s with no valid compile unit in symbol context for 0x%8.8llx %s.\n",
+ GetObjectFile()->GetModule()->ReportError ("parent 0x%8.8" PRIx64 " %s with no valid compile unit in symbol context for 0x%8.8" PRIx64 " %s.\n",
MakeUserID(sc_parent_die->GetOffset()),
DW_TAG_value_to_name (parent_tag),
MakeUserID(orig_die->GetOffset()),
@@ -7260,7 +7260,7 @@ SymbolFileDWARF::ParseVariables
break;
default:
- GetObjectFile()->GetModule()->ReportError ("didn't find appropriate parent DIE for variable list for 0x%8.8llx %s.\n",
+ GetObjectFile()->GetModule()->ReportError ("didn't find appropriate parent DIE for variable list for 0x%8.8" PRIx64 " %s.\n",
MakeUserID(orig_die->GetOffset()),
DW_TAG_value_to_name (orig_die->Tag()));
break;
@@ -7490,7 +7490,7 @@ SymbolFileDWARF::LayoutRecordType (const clang::RecordDecl *record_decl,
if (log)
GetObjectFile()->GetModule()->LogMessage (log.get(),
- "SymbolFileDWARF::LayoutRecordType (record_decl = %p, bit_size = %llu, alignment = %llu, field_offsets[%u],base_offsets[%u], vbase_offsets[%u]) success = %i",
+ "SymbolFileDWARF::LayoutRecordType (record_decl = %p, bit_size = %" PRIu64 ", alignment = %" PRIu64 ", field_offsets[%u],base_offsets[%u], vbase_offsets[%u]) success = %i",
record_decl,
bit_size,
alignment,
diff --git a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
index 84cd77ae1fa..ccbde2be07b 100644
--- a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
+++ b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
@@ -271,7 +271,7 @@ UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly (AddressRange&
{
StreamString strm;
lldb::addr_t base_addr = range.GetBaseAddress().GetLoadAddress(thread.CalculateTarget().get());
- strm.Printf ("Resulting unwind rows for [0x%llx - 0x%llx):", base_addr, base_addr + range.GetByteSize());
+ strm.Printf ("Resulting unwind rows for [0x%" PRIx64 " - 0x%" PRIx64 "):", base_addr, base_addr + range.GetByteSize());
unwind_plan.Dump(strm, &thread, base_addr);
log->PutCString (strm.GetData());
}
@@ -403,7 +403,7 @@ UnwindAssemblyInstEmulation::ReadMemory (EmulateInstruction *instruction,
if (log && log->GetVerbose ())
{
StreamString strm;
- strm.Printf ("UnwindAssemblyInstEmulation::ReadMemory (addr = 0x%16.16llx, dst = %p, dst_len = %llu, context = ",
+ strm.Printf ("UnwindAssemblyInstEmulation::ReadMemory (addr = 0x%16.16" PRIx64 ", dst = %p, dst_len = %" PRIu64 ", context = ",
addr,
dst,
(uint64_t)dst_len);
diff --git a/lldb/source/Symbol/Block.cpp b/lldb/source/Symbol/Block.cpp
index 1cda1caaa3a..42ade8c9ab3 100644
--- a/lldb/source/Symbol/Block.cpp
+++ b/lldb/source/Symbol/Block.cpp
@@ -89,7 +89,7 @@ Block::Dump(Stream *s, addr_t base_addr, int32_t depth, bool show_context) const
const Block* parent_block = GetParent();
if (parent_block)
{
- s->Printf(", parent = {0x%8.8llx}", parent_block->GetID());
+ s->Printf(", parent = {0x%8.8" PRIx64 "}", parent_block->GetID());
}
if (m_inlineInfoSP.get() != NULL)
{
@@ -194,7 +194,7 @@ Block::DumpSymbolContext(Stream *s)
Function *function = CalculateSymbolContextFunction();
if (function)
function->DumpSymbolContext(s);
- s->Printf(", Block{0x%8.8llx}", GetID());
+ s->Printf(", Block{0x%8.8" PRIx64 "}", GetID());
}
void
@@ -408,7 +408,7 @@ Block::AddRange (const Range& range)
const Declaration &func_decl = func_type->GetDeclaration();
if (func_decl.GetLine())
{
- log->Printf ("warning: %s/%s:%u block {0x%8.8llx} has range[%u] [0x%llx - 0x%llx) which is not contained in parent block {0x%8.8llx} in function {0x%8.8llx} from %s/%s",
+ log->Printf ("warning: %s/%s:%u block {0x%8.8" PRIx64 "} has range[%u] [0x%" PRIx64 " - 0x%" PRIx64 ") which is not contained in parent block {0x%8.8" PRIx64 "} in function {0x%8.8" PRIx64 "} from %s/%s",
func_decl.GetFile().GetDirectory().GetCString(),
func_decl.GetFile().GetFilename().GetCString(),
func_decl.GetLine(),
@@ -423,7 +423,7 @@ Block::AddRange (const Range& range)
}
else
{
- log->Printf ("warning: block {0x%8.8llx} has range[%u] [0x%llx - 0x%llx) which is not contained in parent block {0x%8.8llx} in function {0x%8.8llx} from %s/%s",
+ log->Printf ("warning: block {0x%8.8" PRIx64 "} has range[%u] [0x%" PRIx64 " - 0x%" PRIx64 ") which is not contained in parent block {0x%8.8" PRIx64 "} in function {0x%8.8" PRIx64 "} from %s/%s",
GetID(),
(uint32_t)m_ranges.GetSize(),
block_start_addr,
diff --git a/lldb/source/Symbol/ClangASTImporter.cpp b/lldb/source/Symbol/ClangASTImporter.cpp
index bd669fccf21..a400813482f 100644
--- a/lldb/source/Symbol/ClangASTImporter.cpp
+++ b/lldb/source/Symbol/ClangASTImporter.cpp
@@ -66,12 +66,12 @@ ClangASTImporter::CopyDecl (clang::ASTContext *dst_ast,
user_id = metadata->GetUserID();
if (NamedDecl *named_decl = dyn_cast<NamedDecl>(decl))
- log->Printf(" [ClangASTImporter] WARNING: Failed to import a %s '%s', metadata 0x%llx",
+ log->Printf(" [ClangASTImporter] WARNING: Failed to import a %s '%s', metadata 0x%" PRIx64,
decl->getDeclKindName(),
named_decl->getNameAsString().c_str(),
user_id);
else
- log->Printf(" [ClangASTImporter] WARNING: Failed to import a %s, metadata 0x%llx",
+ log->Printf(" [ClangASTImporter] WARNING: Failed to import a %s, metadata 0x%" PRIx64,
decl->getDeclKindName(),
user_id);
}
@@ -467,7 +467,7 @@ clang::Decl
from_named_decl->printName(name_stream);
name_stream.flush();
- log->Printf(" [ClangASTImporter] Imported (%sDecl*)%p, named %s (from (Decl*)%p), metadata 0x%llx",
+ log->Printf(" [ClangASTImporter] Imported (%sDecl*)%p, named %s (from (Decl*)%p), metadata 0x%" PRIx64,
from->getDeclKindName(),
to,
name_string.c_str(),
@@ -476,7 +476,7 @@ clang::Decl
}
else
{
- log->Printf(" [ClangASTImporter] Imported (%sDecl*)%p (from (Decl*)%p), metadata 0x%llx",
+ log->Printf(" [ClangASTImporter] Imported (%sDecl*)%p (from (Decl*)%p), metadata 0x%" PRIx64,
from->getDeclKindName(),
to,
from,
diff --git a/lldb/source/Symbol/ClangASTType.cpp b/lldb/source/Symbol/ClangASTType.cpp
index 3e9b4664ad8..07adb017477 100644
--- a/lldb/source/Symbol/ClangASTType.cpp
+++ b/lldb/source/Symbol/ClangASTType.cpp
@@ -811,7 +811,7 @@ ClangASTType::DumpValue
}
// If we have gotten here we didn't get find the enumerator in the
// enum decl, so just print the integer.
- s->Printf("%lli", enum_value);
+ s->Printf("%" PRIi64, enum_value);
}
return;
@@ -1010,7 +1010,7 @@ ClangASTType::DumpTypeValue (clang::ASTContext *ast_context,
// If we have gotten here we didn't get find the enumerator in the
// enum decl, so just print the integer.
- s->Printf("%lli", enum_value);
+ s->Printf("%" PRIi64, enum_value);
return true;
}
// format was not enum, just fall through and dump the value as requested....
diff --git a/lldb/source/Symbol/CompileUnit.cpp b/lldb/source/Symbol/CompileUnit.cpp
index fbcf45b72fe..751b09ec5a6 100644
--- a/lldb/source/Symbol/CompileUnit.cpp
+++ b/lldb/source/Symbol/CompileUnit.cpp
@@ -78,7 +78,7 @@ void
CompileUnit::DumpSymbolContext(Stream *s)
{
GetModule()->DumpSymbolContext(s);
- s->Printf(", CompileUnit{0x%8.8llx}", GetID());
+ s->Printf(", CompileUnit{0x%8.8" PRIx64 "}", GetID());
}
diff --git a/lldb/source/Symbol/Function.cpp b/lldb/source/Symbol/Function.cpp
index 0f060ddda9f..34f2ea560a9 100644
--- a/lldb/source/Symbol/Function.cpp
+++ b/lldb/source/Symbol/Function.cpp
@@ -370,7 +370,7 @@ Function::Dump(Stream *s, bool show_context) const
}
else if (m_type_uid != LLDB_INVALID_UID)
{
- s->Printf(", type_uid = 0x%8.8llx", m_type_uid);
+ s->Printf(", type_uid = 0x%8.8" PRIx64, m_type_uid);
}
s->EOL();
@@ -426,7 +426,7 @@ void
Function::DumpSymbolContext(Stream *s)
{
m_comp_unit->DumpSymbolContext(s);
- s->Printf(", Function{0x%8.8llx}", GetID());
+ s->Printf(", Function{0x%8.8" PRIx64 "}", GetID());
}
size_t
diff --git a/lldb/source/Symbol/ObjectFile.cpp b/lldb/source/Symbol/ObjectFile.cpp
index f627f410928..6e4ee9b58bf 100644
--- a/lldb/source/Symbol/ObjectFile.cpp
+++ b/lldb/source/Symbol/ObjectFile.cpp
@@ -34,7 +34,7 @@ ObjectFile::FindPlugin (const lldb::ModuleSP &module_sp, const FileSpec* file, a
if (module_sp)
{
Timer scoped_timer (__PRETTY_FUNCTION__,
- "ObjectFile::FindPlugin (module = %s/%s, file = %p, file_offset = 0x%8.8llx, file_size = 0x%8.8llx)",
+ "ObjectFile::FindPlugin (module = %s/%s, file = %p, file_offset = 0x%8.8" PRIx64 ", file_size = 0x%8.8" PRIx64 ")",
module_sp->GetFileSpec().GetDirectory().AsCString(),
module_sp->GetFileSpec().GetFilename().AsCString(),
file, (uint64_t) file_offset, (uint64_t) file_size);
@@ -114,7 +114,7 @@ ObjectFile::FindPlugin (const lldb::ModuleSP &module_sp,
if (module_sp)
{
Timer scoped_timer (__PRETTY_FUNCTION__,
- "ObjectFile::FindPlugin (module = %s/%s, process = %p, header_addr = 0x%llx)",
+ "ObjectFile::FindPlugin (module = %s/%s, process = %p, header_addr = 0x%" PRIx64 ")",
module_sp->GetFileSpec().GetDirectory().AsCString(),
module_sp->GetFileSpec().GetFilename().AsCString(),
process_sp.get(), header_addr);
@@ -162,7 +162,7 @@ ObjectFile::ObjectFile (const lldb::ModuleSP &module_sp,
{
if (m_file)
{
- log->Printf ("%p ObjectFile::ObjectFile () module = %s/%s, file = %s/%s, offset = 0x%8.8llx, size = %llu\n",
+ log->Printf ("%p ObjectFile::ObjectFile () module = %s/%s, file = %s/%s, offset = 0x%8.8" PRIx64 ", size = %" PRIu64 "\n",
this,
module_sp->GetFileSpec().GetDirectory().AsCString(),
module_sp->GetFileSpec().GetFilename().AsCString(),
@@ -173,7 +173,7 @@ ObjectFile::ObjectFile (const lldb::ModuleSP &module_sp,
}
else
{
- log->Printf ("%p ObjectFile::ObjectFile () module = %s/%s, file = <NULL>, offset = 0x%8.8llx, size = %llu\n",
+ log->Printf ("%p ObjectFile::ObjectFile () module = %s/%s, file = <NULL>, offset = 0x%8.8" PRIx64 ", size = %" PRIu64 "\n",
this,
module_sp->GetFileSpec().GetDirectory().AsCString(),
module_sp->GetFileSpec().GetFilename().AsCString(),
@@ -204,7 +204,7 @@ ObjectFile::ObjectFile (const lldb::ModuleSP &module_sp,
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT));
if (log)
{
- log->Printf ("%p ObjectFile::ObjectFile () module = %s/%s, process = %p, header_addr = 0x%llx\n",
+ log->Printf ("%p ObjectFile::ObjectFile () module = %s/%s, process = %p, header_addr = 0x%" PRIx64 "\n",
this,
module_sp->GetFileSpec().GetDirectory().AsCString(),
module_sp->GetFileSpec().GetFilename().AsCString(),
diff --git a/lldb/source/Symbol/Symbol.cpp b/lldb/source/Symbol/Symbol.cpp
index 8b2bd20aaf6..6f2420dcca9 100644
--- a/lldb/source/Symbol/Symbol.cpp
+++ b/lldb/source/Symbol/Symbol.cpp
@@ -206,14 +206,14 @@ Symbol::GetDescription (Stream *s, lldb::DescriptionLevel level, Target *target)
}
}
else
- s->Printf (", value = 0x%16.16llx", m_addr_range.GetBaseAddress().GetOffset());
+ s->Printf (", value = 0x%16.16" PRIx64, m_addr_range.GetBaseAddress().GetOffset());
}
else
{
if (m_size_is_sibling)
- s->Printf (", sibling = %5llu", m_addr_range.GetBaseAddress().GetOffset());
+ s->Printf (", sibling = %5" PRIu64, m_addr_range.GetBaseAddress().GetOffset());
else
- s->Printf (", value = 0x%16.16llx", m_addr_range.GetBaseAddress().GetOffset());
+ s->Printf (", value = 0x%16.16" PRIx64, m_addr_range.GetBaseAddress().GetOffset());
}
if (m_mangled.GetDemangledName())
s->Printf(", name=\"%s\"", m_mangled.GetDemangledName().AsCString());
@@ -251,7 +251,7 @@ Symbol::Dump(Stream *s, Target *target, uint32_t index) const
const char *format = m_size_is_sibling ?
" Sibling -> [%5llu] 0x%8.8x %s\n":
- " 0x%16.16llx 0x%8.8x %s\n";
+ " 0x%16.16" PRIx64 " 0x%8.8x %s\n";
s->Printf( format,
GetByteSize(),
m_flags,
@@ -260,8 +260,8 @@ Symbol::Dump(Stream *s, Target *target, uint32_t index) const
else
{
const char *format = m_size_is_sibling ?
- "0x%16.16llx Sibling -> [%5llu] 0x%8.8x %s\n":
- "0x%16.16llx 0x%16.16llx 0x%8.8x %s\n";
+ "0x%16.16" PRIx64 " Sibling -> [%5llu] 0x%8.8x %s\n":
+ "0x%16.16" PRIx64 " 0x%16.16" PRIx64 " 0x%8.8x %s\n";
s->Printf( format,
m_addr_range.GetBaseAddress().GetOffset(),
GetByteSize(),
diff --git a/lldb/source/Symbol/SymbolContext.cpp b/lldb/source/Symbol/SymbolContext.cpp
index f0b5380e708..a47ca5493ae 100644
--- a/lldb/source/Symbol/SymbolContext.cpp
+++ b/lldb/source/Symbol/SymbolContext.cpp
@@ -157,7 +157,7 @@ SymbolContext::DumpStopContext
if (function_offset)
{
dumped_something = true;
- s->Printf(" + %llu", function_offset);
+ s->Printf(" + %" PRIu64, function_offset);
}
}
@@ -174,7 +174,7 @@ SymbolContext::DumpStopContext
const addr_t inlined_function_offset = addr.GetOffset() - block_range.GetBaseAddress().GetOffset();
if (inlined_function_offset)
{
- s->Printf(" + %llu", inlined_function_offset);
+ s->Printf(" + %" PRIu64, inlined_function_offset);
}
}
const Declaration &call_site = inlined_block_info->GetCallSite();
@@ -217,7 +217,7 @@ SymbolContext::DumpStopContext
if (symbol_offset)
{
dumped_something = true;
- s->Printf(" + %llu", symbol_offset);
+ s->Printf(" + %" PRIu64, symbol_offset);
}
}
}
@@ -496,7 +496,7 @@ SymbolContext::GetParentOfInlinedScope (const Address &curr_frame_pc,
if (log)
{
- log->Printf ("warning: inlined block 0x%8.8llx doesn't have a range that contains file address 0x%llx",
+ log->Printf ("warning: inlined block 0x%8.8" PRIx64 " doesn't have a range that contains file address 0x%" PRIx64,
curr_inlined_block->GetID(), curr_frame_pc.GetFileAddress());
}
#ifdef LLDB_CONFIGURATION_DEBUG
@@ -516,7 +516,7 @@ SymbolContext::GetParentOfInlinedScope (const Address &curr_frame_pc,
if (objfile)
{
Host::SystemLog (Host::eSystemLogWarning,
- "warning: inlined block 0x%8.8llx doesn't have a range that contains file address 0x%llx in %s/%s\n",
+ "warning: inlined block 0x%8.8" PRIx64 " doesn't have a range that contains file address 0x%" PRIx64 " in %s/%s\n",
curr_inlined_block->GetID(),
curr_frame_pc.GetFileAddress(),
objfile->GetFileSpec().GetDirectory().GetCString(),
@@ -525,7 +525,7 @@ SymbolContext::GetParentOfInlinedScope (const Address &curr_frame_pc,
else
{
Host::SystemLog (Host::eSystemLogWarning,
- "warning: inlined block 0x%8.8llx doesn't have a range that contains file address 0x%llx\n",
+ "warning: inlined block 0x%8.8" PRIx64 " doesn't have a range that contains file address 0x%" PRIx64 "\n",
curr_inlined_block->GetID(),
curr_frame_pc.GetFileAddress());
}
diff --git a/lldb/source/Symbol/Type.cpp b/lldb/source/Symbol/Type.cpp
index 199c4e625fb..c2d1cddcc36 100644
--- a/lldb/source/Symbol/Type.cpp
+++ b/lldb/source/Symbol/Type.cpp
@@ -150,7 +150,7 @@ Type::GetDescription (Stream *s, lldb::DescriptionLevel level, bool show_name)
}
else if (m_encoding_uid != LLDB_INVALID_UID)
{
- s->Printf(", type_uid = 0x%8.8llx", m_encoding_uid);
+ s->Printf(", type_uid = 0x%8.8" PRIx64, m_encoding_uid);
switch (m_encoding_uid_type)
{
case eEncodingInvalid: break;
@@ -257,7 +257,7 @@ Type::DumpValue
{
s->PutChar('(');
if (verbose)
- s->Printf("Type{0x%8.8llx} ", GetID());
+ s->Printf("Type{0x%8.8" PRIx64 "} ", GetID());
DumpTypeName (s);
s->PutCString(") ");
}
diff --git a/lldb/source/Symbol/UnwindPlan.cpp b/lldb/source/Symbol/UnwindPlan.cpp
index 9bccaa8ea8f..c089a7bb8db 100644
--- a/lldb/source/Symbol/UnwindPlan.cpp
+++ b/lldb/source/Symbol/UnwindPlan.cpp
@@ -164,9 +164,9 @@ UnwindPlan::Row::Dump (Stream& s, const UnwindPlan* unwind_plan, Thread* thread,
const RegisterInfo *reg_info = unwind_plan->GetRegisterInfo (thread, GetCFARegister());
if (base_addr != LLDB_INVALID_ADDRESS)
- s.Printf ("0x%16.16llx: CFA=", base_addr + GetOffset());
+ s.Printf ("0x%16.16" PRIx64 ": CFA=", base_addr + GetOffset());
else
- s.Printf ("0x%8.8llx: CFA=", GetOffset());
+ s.Printf ("0x%8.8" PRIx64 ": CFA=", GetOffset());
if (reg_info)
s.Printf ("%s", reg_info->name);
diff --git a/lldb/source/Symbol/UnwindTable.cpp b/lldb/source/Symbol/UnwindTable.cpp
index 7b31120fac4..f128066684f 100644
--- a/lldb/source/Symbol/UnwindTable.cpp
+++ b/lldb/source/Symbol/UnwindTable.cpp
@@ -140,7 +140,7 @@ UnwindTable::Dump (Stream &s)
const_iterator end = m_unwinds.end();
for (const_iterator pos = begin; pos != end; ++pos)
{
- s.Printf ("[%u] 0x%16.16llx\n", (unsigned)std::distance (begin, pos), pos->first);
+ s.Printf ("[%u] 0x%16.16" PRIx64 "\n", (unsigned)std::distance (begin, pos), pos->first);
}
s.EOL();
}
diff --git a/lldb/source/Target/Memory.cpp b/lldb/source/Target/Memory.cpp
index a011bd25d66..1e3bfc1450d 100644
--- a/lldb/source/Target/Memory.cpp
+++ b/lldb/source/Target/Memory.cpp
@@ -326,7 +326,7 @@ AllocatedBlock::ReserveBlock (uint32_t size)
}
LogSP log (GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
if (log)
- log->Printf ("AllocatedBlock::ReserveBlock (size = %u (0x%x)) => 0x%16.16llx", size, size, (uint64_t)addr);
+ log->Printf ("AllocatedBlock::ReserveBlock (size = %u (0x%x)) => 0x%16.16" PRIx64, size, size, (uint64_t)addr);
return addr;
}
@@ -343,7 +343,7 @@ AllocatedBlock::FreeBlock (addr_t addr)
}
LogSP log (GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
if (log)
- log->Printf ("AllocatedBlock::FreeBlock (addr = 0x%16.16llx) => %i", (uint64_t)addr, success);
+ log->Printf ("AllocatedBlock::FreeBlock (addr = 0x%16.16" PRIx64 ") => %i", (uint64_t)addr, success);
return success;
}
@@ -390,7 +390,7 @@ AllocatedMemoryCache::AllocatePage (uint32_t byte_size,
LogSP log (GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
if (log)
{
- log->Printf ("Process::DoAllocateMemory (byte_size = 0x%8.8zx, permissions = %s) => 0x%16.16llx",
+ log->Printf ("Process::DoAllocateMemory (byte_size = 0x%8.8zx, permissions = %s) => 0x%16.16" PRIx64,
page_byte_size,
GetPermissionsAsCString(permissions),
(uint64_t)addr);
@@ -428,7 +428,7 @@ AllocatedMemoryCache::AllocateMemory (size_t byte_size,
}
LogSP log (GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
if (log)
- log->Printf ("AllocatedMemoryCache::AllocateMemory (byte_size = 0x%8.8zx, permissions = %s) => 0x%16.16llx", byte_size, GetPermissionsAsCString(permissions), (uint64_t)addr);
+ log->Printf ("AllocatedMemoryCache::AllocateMemory (byte_size = 0x%8.8zx, permissions = %s) => 0x%16.16" PRIx64, byte_size, GetPermissionsAsCString(permissions), (uint64_t)addr);
return addr;
}
@@ -449,7 +449,7 @@ AllocatedMemoryCache::DeallocateMemory (lldb::addr_t addr)
}
LogSP log (GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
if (log)
- log->Printf("AllocatedMemoryCache::DeallocateMemory (addr = 0x%16.16llx) => %i", (uint64_t)addr, success);
+ log->Printf("AllocatedMemoryCache::DeallocateMemory (addr = 0x%16.16" PRIx64 ") => %i", (uint64_t)addr, success);
return success;
}
diff --git a/lldb/source/Target/ObjCLanguageRuntime.cpp b/lldb/source/Target/ObjCLanguageRuntime.cpp
index f61e5c0c799..2b37cb06c22 100644
--- a/lldb/source/Target/ObjCLanguageRuntime.cpp
+++ b/lldb/source/Target/ObjCLanguageRuntime.cpp
@@ -43,7 +43,7 @@ ObjCLanguageRuntime::AddToMethodCache (lldb::addr_t class_addr, lldb::addr_t sel
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
if (log)
{
- log->Printf ("Caching: class 0x%llx selector 0x%llx implementation 0x%llx.", class_addr, selector, impl_addr);
+ log->Printf ("Caching: class 0x%" PRIx64 " selector 0x%" PRIx64 " implementation 0x%" PRIx64 ".", class_addr, selector, impl_addr);
}
m_impl_cache.insert (std::pair<ClassAndSel,lldb::addr_t> (ClassAndSel(class_addr, selector), impl_addr));
}
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index b6aa066e492..ee44a8c5029 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -167,10 +167,10 @@ ProcessInstanceInfo::Dump (Stream &s, Platform *platform) const
{
const char *cstr;
if (m_pid != LLDB_INVALID_PROCESS_ID)
- s.Printf (" pid = %llu\n", m_pid);
+ s.Printf (" pid = %" PRIu64 "\n", m_pid);
if (m_parent_pid != LLDB_INVALID_PROCESS_ID)
- s.Printf (" parent = %llu\n", m_parent_pid);
+ s.Printf (" parent = %" PRIu64 "\n", m_parent_pid);
if (m_executable)
{
@@ -257,7 +257,7 @@ ProcessInstanceInfo::DumpAsTableRow (Stream &s, Platform *platform, bool show_ar
if (m_pid != LLDB_INVALID_PROCESS_ID)
{
const char *cstr;
- s.Printf ("%-6llu %-6llu ", m_pid, m_parent_pid);
+ s.Printf ("%-6" PRIu64 " %-6" PRIu64 " ", m_pid, m_parent_pid);
if (verbose)
@@ -1406,7 +1406,7 @@ Process::SetProcessExitStatus (void *callback_baton,
{
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_PROCESS));
if (log)
- log->Printf ("Process::SetProcessExitStatus (baton=%p, pid=%llu, exited=%i, signal=%i, exit_status=%i)\n",
+ log->Printf ("Process::SetProcessExitStatus (baton=%p, pid=%" PRIu64 ", exited=%i, signal=%i, exit_status=%i)\n",
callback_baton,
pid,
exited,
@@ -1707,7 +1707,7 @@ Process::UnloadImage (uint32_t image_token)
frame_sp->CalculateExecutionContext (exe_ctx);
bool unwind_on_error = true;
StreamString expr;
- expr.Printf("dlclose ((void *)0x%llx)", image_addr);
+ expr.Printf("dlclose ((void *)0x%" PRIx64 ")", image_addr);
const char *prefix = "extern \"C\" int dlclose(void* handle);\n";
lldb::ValueObjectSP result_valobj_sp;
ClangUserExpression::Evaluate (exe_ctx,
@@ -1861,7 +1861,7 @@ Process::DisableBreakpointSiteByID (lldb::user_id_t break_id)
}
else
{
- error.SetErrorStringWithFormat("invalid breakpoint site ID: %llu", break_id);
+ error.SetErrorStringWithFormat("invalid breakpoint site ID: %" PRIu64, break_id);
}
return error;
@@ -1879,7 +1879,7 @@ Process::EnableBreakpointSiteByID (lldb::user_id_t break_id)
}
else
{
- error.SetErrorStringWithFormat("invalid breakpoint site ID: %llu", break_id);
+ error.SetErrorStringWithFormat("invalid breakpoint site ID: %" PRIu64, break_id);
}
return error;
}
@@ -1983,11 +1983,11 @@ Process::EnableSoftwareBreakpoint (BreakpointSite *bp_site)
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_BREAKPOINTS));
const addr_t bp_addr = bp_site->GetLoadAddress();
if (log)
- log->Printf ("Process::EnableSoftwareBreakpoint (site_id = %d) addr = 0x%llx", bp_site->GetID(), (uint64_t)bp_addr);
+ log->Printf ("Process::EnableSoftwareBreakpoint (site_id = %d) addr = 0x%" PRIx64, bp_site->GetID(), (uint64_t)bp_addr);
if (bp_site->IsEnabled())
{
if (log)
- log->Printf ("Process::EnableSoftwareBreakpoint (site_id = %d) addr = 0x%llx -- already enabled", bp_site->GetID(), (uint64_t)bp_addr);
+ log->Printf ("Process::EnableSoftwareBreakpoint (site_id = %d) addr = 0x%" PRIx64 " -- already enabled", bp_site->GetID(), (uint64_t)bp_addr);
return error;
}
@@ -2002,7 +2002,7 @@ Process::EnableSoftwareBreakpoint (BreakpointSite *bp_site)
if (bp_opcode_size == 0)
{
- error.SetErrorStringWithFormat ("Process::GetSoftwareBreakpointTrapOpcode() returned zero, unable to get breakpoint trap for address 0x%llx", bp_addr);
+ error.SetErrorStringWithFormat ("Process::GetSoftwareBreakpointTrapOpcode() returned zero, unable to get breakpoint trap for address 0x%" PRIx64, bp_addr);
}
else
{
@@ -2028,7 +2028,7 @@ Process::EnableSoftwareBreakpoint (BreakpointSite *bp_site)
bp_site->SetEnabled(true);
bp_site->SetType (BreakpointSite::eSoftware);
if (log)
- log->Printf ("Process::EnableSoftwareBreakpoint (site_id = %d) addr = 0x%llx -- SUCCESS",
+ log->Printf ("Process::EnableSoftwareBreakpoint (site_id = %d) addr = 0x%" PRIx64 " -- SUCCESS",
bp_site->GetID(),
(uint64_t)bp_addr);
}
@@ -2045,7 +2045,7 @@ Process::EnableSoftwareBreakpoint (BreakpointSite *bp_site)
error.SetErrorString("Unable to read memory at breakpoint address.");
}
if (log && error.Fail())
- log->Printf ("Process::EnableSoftwareBreakpoint (site_id = %d) addr = 0x%llx -- FAILED: %s",
+ log->Printf ("Process::EnableSoftwareBreakpoint (site_id = %d) addr = 0x%" PRIx64 " -- FAILED: %s",
bp_site->GetID(),
(uint64_t)bp_addr,
error.AsCString());
@@ -2061,7 +2061,7 @@ Process::DisableSoftwareBreakpoint (BreakpointSite *bp_site)
addr_t bp_addr = bp_site->GetLoadAddress();
lldb::user_id_t breakID = bp_site->GetID();
if (log)
- log->Printf ("Process::DisableBreakpoint (breakID = %llu) addr = 0x%llx", breakID, (uint64_t)bp_addr);
+ log->Printf ("Process::DisableBreakpoint (breakID = %" PRIu64 ") addr = 0x%" PRIx64, breakID, (uint64_t)bp_addr);
if (bp_site->IsHardware())
{
@@ -2115,7 +2115,7 @@ Process::DisableSoftwareBreakpoint (BreakpointSite *bp_site)
// SUCCESS
bp_site->SetEnabled(false);
if (log)
- log->Printf ("Process::DisableSoftwareBreakpoint (site_id = %d) addr = 0x%llx -- SUCCESS", bp_site->GetID(), (uint64_t)bp_addr);
+ log->Printf ("Process::DisableSoftwareBreakpoint (site_id = %d) addr = 0x%" PRIx64 " -- SUCCESS", bp_site->GetID(), (uint64_t)bp_addr);
return error;
}
else
@@ -2135,12 +2135,12 @@ Process::DisableSoftwareBreakpoint (BreakpointSite *bp_site)
else
{
if (log)
- log->Printf ("Process::DisableSoftwareBreakpoint (site_id = %d) addr = 0x%llx -- already disabled", bp_site->GetID(), (uint64_t)bp_addr);
+ log->Printf ("Process::DisableSoftwareBreakpoint (site_id = %d) addr = 0x%" PRIx64 " -- already disabled", bp_site->GetID(), (uint64_t)bp_addr);
return error;
}
if (log)
- log->Printf ("Process::DisableSoftwareBreakpoint (site_id = %d) addr = 0x%llx -- FAILED: %s",
+ log->Printf ("Process::DisableSoftwareBreakpoint (site_id = %d) addr = 0x%" PRIx64 " -- FAILED: %s",
bp_site->GetID(),
(uint64_t)bp_addr,
error.AsCString());
@@ -2490,7 +2490,7 @@ Process::AllocateMemory(size_t size, uint32_t permissions, Error &error)
addr_t allocated_addr = DoAllocateMemory (size, permissions, error);
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
if (log)
- log->Printf("Process::AllocateMemory(size=%4zu, permissions=%s) => 0x%16.16llx (m_stop_id = %u m_memory_id = %u)",
+ log->Printf("Process::AllocateMemory(size=%4zu, permissions=%s) => 0x%16.16" PRIx64 " (m_stop_id = %u m_memory_id = %u)",
size,
GetPermissionsAsCString (permissions),
(uint64_t)allocated_addr,
@@ -2535,14 +2535,14 @@ Process::DeallocateMemory (addr_t ptr)
#if defined (USE_ALLOCATE_MEMORY_CACHE)
if (!m_allocated_memory_cache.DeallocateMemory(ptr))
{
- error.SetErrorStringWithFormat ("deallocation of memory at 0x%llx failed.", (uint64_t)ptr);
+ error.SetErrorStringWithFormat ("deallocation of memory at 0x%" PRIx64 " failed.", (uint64_t)ptr);
}
#else
error = DoDeallocateMemory (ptr);
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
if (log)
- log->Printf("Process::DeallocateMemory(addr=0x%16.16llx) => err = %s (m_stop_id = %u, m_memory_id = %u)",
+ log->Printf("Process::DeallocateMemory(addr=0x%16.16" PRIx64 ") => err = %s (m_stop_id = %u, m_memory_id = %u)",
ptr,
error.AsCString("SUCCESS"),
m_mod_id.GetStopID(),
@@ -3450,9 +3450,9 @@ Process::StartPrivateStateThread (bool force)
// events make it to clients (into the DCProcess event queue).
char thread_name[1024];
if (already_running)
- snprintf(thread_name, sizeof(thread_name), "<lldb.process.internal-state-override(pid=%llu)>", GetID());
+ snprintf(thread_name, sizeof(thread_name), "<lldb.process.internal-state-override(pid=%" PRIu64 ")>", GetID());
else
- snprintf(thread_name, sizeof(thread_name), "<lldb.process.internal-state(pid=%llu)>", GetID());
+ snprintf(thread_name, sizeof(thread_name), "<lldb.process.internal-state(pid=%" PRIu64 ")>", GetID());
// Create the private state thread, and start it running.
m_private_state_thread = Host::ThreadCreate (thread_name, Process::PrivateStateThread, this, NULL);
@@ -3601,7 +3601,7 @@ Process::HandlePrivateEvent (EventSP &event_sp)
{
if (log)
{
- log->Printf ("Process::%s (pid = %llu) broadcasting new state %s (old state %s) to %s",
+ log->Printf ("Process::%s (pid = %" PRIu64 ") broadcasting new state %s (old state %s) to %s",
__FUNCTION__,
GetID(),
StateAsCString(new_state),
@@ -3620,7 +3620,7 @@ Process::HandlePrivateEvent (EventSP &event_sp)
{
if (log)
{
- log->Printf ("Process::%s (pid = %llu) suppressing state %s (old state %s): should_broadcast == false",
+ log->Printf ("Process::%s (pid = %" PRIu64 ") suppressing state %s (old state %s): should_broadcast == false",
__FUNCTION__,
GetID(),
StateAsCString(new_state),
@@ -3646,7 +3646,7 @@ Process::RunPrivateStateThread ()
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
if (log)
- log->Printf ("Process::%s (arg = %p, pid = %llu) thread starting...", __FUNCTION__, this, GetID());
+ log->Printf ("Process::%s (arg = %p, pid = %" PRIu64 ") thread starting...", __FUNCTION__, this, GetID());
bool exit_now = false;
while (!exit_now)
@@ -3656,7 +3656,7 @@ Process::RunPrivateStateThread ()
if (event_sp->BroadcasterIs(&m_private_state_control_broadcaster))
{
if (log)
- log->Printf ("Process::%s (arg = %p, pid = %llu) got a control event: %d", __FUNCTION__, this, GetID(), event_sp->GetType());
+ log->Printf ("Process::%s (arg = %p, pid = %" PRIu64 ") got a control event: %d", __FUNCTION__, this, GetID(), event_sp->GetType());
switch (event_sp->GetType())
{
@@ -3681,13 +3681,13 @@ Process::RunPrivateStateThread ()
if (m_public_state.GetValue() == eStateAttaching)
{
if (log)
- log->Printf ("Process::%s (arg = %p, pid = %llu) woke up with an interrupt while attaching - forwarding interrupt.", __FUNCTION__, this, GetID());
+ log->Printf ("Process::%s (arg = %p, pid = %" PRIu64 ") woke up with an interrupt while attaching - forwarding interrupt.", __FUNCTION__, this, GetID());
BroadcastEvent (eBroadcastBitInterrupt, NULL);
}
else
{
if (log)
- log->Printf ("Process::%s (arg = %p, pid = %llu) woke up with an interrupt - Halting.", __FUNCTION__, this, GetID());
+ log->Printf ("Process::%s (arg = %p, pid = %" PRIu64 ") woke up with an interrupt - Halting.", __FUNCTION__, this, GetID());
Halt();
}
continue;
@@ -3705,7 +3705,7 @@ Process::RunPrivateStateThread ()
internal_state == eStateDetached )
{
if (log)
- log->Printf ("Process::%s (arg = %p, pid = %llu) about to exit with internal state %s...", __FUNCTION__, this, GetID(), StateAsCString(internal_state));
+ log->Printf ("Process::%s (arg = %p, pid = %" PRIu64 ") about to exit with internal state %s...", __FUNCTION__, this, GetID(), StateAsCString(internal_state));
break;
}
@@ -3713,7 +3713,7 @@ Process::RunPrivateStateThread ()
// Verify log is still enabled before attempting to write to it...
if (log)
- log->Printf ("Process::%s (arg = %p, pid = %llu) thread exiting...", __FUNCTION__, this, GetID());
+ log->Printf ("Process::%s (arg = %p, pid = %" PRIu64 ") thread exiting...", __FUNCTION__, this, GetID());
m_private_state_control_wait.SetValue (true, eBroadcastAlways);
m_private_state_thread = LLDB_INVALID_HOST_THREAD;
@@ -3871,7 +3871,7 @@ void
Process::ProcessEventData::Dump (Stream *s) const
{
if (m_process_sp)
- s->Printf(" process = %p (pid = %llu), ", m_process_sp.get(), m_process_sp->GetID());
+ s->Printf(" process = %p (pid = %" PRIu64 "), ", m_process_sp.get(), m_process_sp->GetID());
s->Printf("state = %s", StateAsCString(GetState()));
}
@@ -4022,7 +4022,7 @@ Process::GetAsyncProfileData (char *buf, size_t buf_size, Error &error)
{
LogSP log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
if (log)
- log->Printf ("Process::GetProfileData (buf = %p, size = %llu)", buf, (uint64_t)buf_size);
+ log->Printf ("Process::GetProfileData (buf = %p, size = %" PRIu64 ")", buf, (uint64_t)buf_size);
if (bytes_available > buf_size)
{
memcpy(buf, m_profile_data.c_str(), buf_size);
@@ -4052,7 +4052,7 @@ Process::GetSTDOUT (char *buf, size_t buf_size, Error &error)
{
LogSP log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
if (log)
- log->Printf ("Process::GetSTDOUT (buf = %p, size = %llu)", buf, (uint64_t)buf_size);
+ log->Printf ("Process::GetSTDOUT (buf = %p, size = %" PRIu64 ")", buf, (uint64_t)buf_size);
if (bytes_available > buf_size)
{
memcpy(buf, m_stdout_data.c_str(), buf_size);
@@ -4078,7 +4078,7 @@ Process::GetSTDERR (char *buf, size_t buf_size, Error &error)
{
LogSP log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
if (log)
- log->Printf ("Process::GetSTDERR (buf = %p, size = %llu)", buf, (uint64_t)buf_size);
+ log->Printf ("Process::GetSTDERR (buf = %p, size = %" PRIu64 ")", buf, (uint64_t)buf_size);
if (bytes_available > buf_size)
{
memcpy(buf, m_stderr_data.c_str(), buf_size);
@@ -4360,7 +4360,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
{
StreamString s;
thread_plan_sp->GetDescription(&s, lldb::eDescriptionLevelVerbose);
- log->Printf ("Process::RunThreadPlan(): Resuming thread %u - 0x%4.4llx to run thread plan \"%s\".",
+ log->Printf ("Process::RunThreadPlan(): Resuming thread %u - 0x%4.4" PRIx64 " to run thread plan \"%s\".",
thread->GetIndexID(),
thread->GetID(),
s.GetData());
@@ -4614,7 +4614,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
if (run_others)
{
if (first_timeout)
- log->Printf ("Process::RunThreadPlan(): Running function with timeout: %lld timed out, "
+ log->Printf ("Process::RunThreadPlan(): Running function with timeout: %" PRId64 " timed out, "
"trying for %d usec with all threads enabled.",
computed_timeout, timeout_usec);
else
@@ -4861,11 +4861,11 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
continue;
}
- ts.Printf("<0x%4.4llx ", thread->GetID());
+ ts.Printf("<0x%4.4" PRIx64 " ", thread->GetID());
RegisterContext *register_context = thread->GetRegisterContext().get();
if (register_context)
- ts.Printf("[ip 0x%llx] ", register_context->GetPC());
+ ts.Printf("[ip 0x%" PRIx64 "] ", register_context->GetPC());
else
ts.Printf("[ip unknown] ");
@@ -5013,7 +5013,7 @@ Process::GetStatus (Stream &strm)
{
int exit_status = GetExitStatus();
const char *exit_description = GetExitDescription();
- strm.Printf ("Process %llu exited with status = %i (0x%8.8x) %s\n",
+ strm.Printf ("Process %" PRIu64 " exited with status = %i (0x%8.8x) %s\n",
GetID(),
exit_status,
exit_status,
@@ -5024,12 +5024,12 @@ Process::GetStatus (Stream &strm)
if (state == eStateConnected)
strm.Printf ("Connected to remote target.\n");
else
- strm.Printf ("Process %llu %s\n", GetID(), StateAsCString (state));
+ strm.Printf ("Process %" PRIu64 " %s\n", GetID(), StateAsCString (state));
}
}
else
{
- strm.Printf ("Process %llu is running.\n", GetID());
+ strm.Printf ("Process %" PRIu64 " is running.\n", GetID());
}
}
diff --git a/lldb/source/Target/SectionLoadList.cpp b/lldb/source/Target/SectionLoadList.cpp
index 27ed75e2d25..68aa7f0c1bc 100644
--- a/lldb/source/Target/SectionLoadList.cpp
+++ b/lldb/source/Target/SectionLoadList.cpp
@@ -64,7 +64,7 @@ SectionLoadList::SetSectionLoadAddress (const lldb::SectionSP &section, addr_t l
if (log)
{
const FileSpec &module_file_spec (section->GetModule()->GetFileSpec());
- log->Printf ("SectionLoadList::%s (section = %p (%s%s%s.%s), load_addr = 0x%16.16llx)",
+ log->Printf ("SectionLoadList::%s (section = %p (%s%s%s.%s), load_addr = 0x%16.16" PRIx64 ")",
__FUNCTION__,
section.get(),
module_file_spec.GetDirectory().AsCString(),
@@ -112,7 +112,7 @@ SectionLoadList::SetSectionLoadAddress (const lldb::SectionSP &section, addr_t l
ModuleSP curr_module_sp (ats_pos->second->GetModule());
if (curr_module_sp)
{
- module_sp->ReportWarning ("address 0x%16.16llx maps to more than one section: %s.%s and %s.%s",
+ module_sp->ReportWarning ("address 0x%16.16" PRIx64 " maps to more than one section: %s.%s and %s.%s",
load_addr,
module_sp->GetFileSpec().GetFilename().GetCString(),
section->GetName().GetCString(),
@@ -174,7 +174,7 @@ SectionLoadList::SetSectionUnloaded (const lldb::SectionSP &section_sp, addr_t l
if (log)
{
const FileSpec &module_file_spec (section_sp->GetModule()->GetFileSpec());
- log->Printf ("SectionLoadList::%s (section = %p (%s%s%s.%s), load_addr = 0x%16.16llx)",
+ log->Printf ("SectionLoadList::%s (section = %p (%s%s%s.%s), load_addr = 0x%16.16" PRIx64 ")",
__FUNCTION__,
section_sp.get(),
module_file_spec.GetDirectory().AsCString(),
@@ -254,7 +254,7 @@ SectionLoadList::Dump (Stream &s, Target *target)
addr_to_sect_collection::const_iterator pos, end;
for (pos = m_addr_to_sect.begin(), end = m_addr_to_sect.end(); pos != end; ++pos)
{
- s.Printf("addr = 0x%16.16llx, section = %p: ", pos->first, pos->second.get());
+ s.Printf("addr = 0x%16.16" PRIx64 ", section = %p: ", pos->first, pos->second.get());
pos->second->Dump (&s, target, 0);
}
}
diff --git a/lldb/source/Target/StackFrame.cpp b/lldb/source/Target/StackFrame.cpp
index 4fb4ea9c7fd..1a9434fc9d3 100644
--- a/lldb/source/Target/StackFrame.cpp
+++ b/lldb/source/Target/StackFrame.cpp
@@ -1298,7 +1298,7 @@ StackFrame::Dump (Stream *strm, bool show_frame_index, bool show_fullpaths)
strm->Printf("frame #%u: ", m_frame_index);
ExecutionContext exe_ctx (shared_from_this());
Target *target = exe_ctx.GetTargetPtr();
- strm->Printf("0x%0*llx ",
+ strm->Printf("0x%0*" PRIx64 " ",
target ? (target->GetArchitecture().GetAddressByteSize() * 2) : 16,
GetFrameCodeAddress().GetLoadAddress(target));
GetSymbolContext(eSymbolContextEverything);
diff --git a/lldb/source/Target/StackFrameList.cpp b/lldb/source/Target/StackFrameList.cpp
index 575063eeadb..082fddd09ed 100644
--- a/lldb/source/Target/StackFrameList.cpp
+++ b/lldb/source/Target/StackFrameList.cpp
@@ -205,7 +205,7 @@ StackFrameList::ResetCurrentInlinedDepth ()
m_current_inlined_depth = num_inlined_functions + 1;
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
if (log && log->GetVerbose())
- log->Printf ("ResetCurrentInlinedDepth: setting inlined depth: %d 0x%llx.\n", m_current_inlined_depth, curr_pc);
+ log->Printf ("ResetCurrentInlinedDepth: setting inlined depth: %d 0x%" PRIx64 ".\n", m_current_inlined_depth, curr_pc);
}
break;
@@ -370,7 +370,7 @@ StackFrameList::GetFramesUpTo(uint32_t end_idx)
//curr_frames->m_current_inlined_depth = prev_frames->m_current_inlined_depth;
//curr_frames->m_current_inlined_pc = prev_frames->m_current_inlined_pc;
- //printf ("GetFramesUpTo: Copying current inlined depth: %d 0x%llx.\n", curr_frames->m_current_inlined_depth, curr_frames->m_current_inlined_pc);
+ //printf ("GetFramesUpTo: Copying current inlined depth: %d 0x%" PRIx64 ".\n", curr_frames->m_current_inlined_depth, curr_frames->m_current_inlined_pc);
#if defined (DEBUG_STACK_FRAMES)
s.PutCString("\nprev_frames:\n");
diff --git a/lldb/source/Target/StackID.cpp b/lldb/source/Target/StackID.cpp
index 1b55b722d3c..9e8c315d070 100644
--- a/lldb/source/Target/StackID.cpp
+++ b/lldb/source/Target/StackID.cpp
@@ -24,14 +24,14 @@ using namespace lldb_private;
void
StackID::Dump (Stream *s)
{
- s->Printf("StackID (pc = 0x%16.16llx, cfa = 0x%16.16llx, symbol_scope = %p", (uint64_t)m_pc, (uint64_t)m_cfa, m_symbol_scope);
+ s->Printf("StackID (pc = 0x%16.16" PRIx64 ", cfa = 0x%16.16" PRIx64 ", symbol_scope = %p", (uint64_t)m_pc, (uint64_t)m_cfa, m_symbol_scope);
if (m_symbol_scope)
{
SymbolContext sc;
m_symbol_scope->CalculateSymbolContext (&sc);
if (sc.block)
- s->Printf(" (Block {0x%8.8llx})", sc.block->GetID());
+ s->Printf(" (Block {0x%8.8" PRIx64 "})", sc.block->GetID());
else if (sc.symbol)
s->Printf(" (Symbol{0x%8.8x})", sc.symbol->GetID());
}
diff --git a/lldb/source/Target/StopInfo.cpp b/lldb/source/Target/StopInfo.cpp
index 9d9bfd21b89..bae1e4af990 100644
--- a/lldb/source/Target/StopInfo.cpp
+++ b/lldb/source/Target/StopInfo.cpp
@@ -165,7 +165,7 @@ public:
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
if (log)
- log->Printf ("Process::%s could not find breakpoint site id: %lld...", __FUNCTION__, m_value);
+ log->Printf ("Process::%s could not find breakpoint site id: %" PRId64 "...", __FUNCTION__, m_value);
m_should_stop = true;
}
@@ -219,9 +219,9 @@ public:
strm.Printf ("breakpoint %d which has been deleted.", m_break_id);
}
else if (m_address == LLDB_INVALID_ADDRESS)
- strm.Printf("breakpoint site %lli which has been deleted - unknown address", m_value);
+ strm.Printf("breakpoint site %" PRIi64 " which has been deleted - unknown address", m_value);
else
- strm.Printf("breakpoint site %lli which has been deleted - was at 0x%llx", m_value, m_address);
+ strm.Printf("breakpoint site %" PRIi64 " which has been deleted - was at 0x%" PRIx64, m_value, m_address);
m_description.swap (strm.GetString());
}
@@ -397,7 +397,7 @@ protected:
LogSP log_process(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
if (log_process)
- log_process->Printf ("Process::%s could not find breakpoint site id: %lld...", __FUNCTION__, m_value);
+ log_process->Printf ("Process::%s could not find breakpoint site id: %" PRId64 "...", __FUNCTION__, m_value);
}
if (log)
log->Printf ("Process::%s returning from action with m_should_stop: %d.", __FUNCTION__, m_should_stop);
@@ -475,7 +475,7 @@ public:
if (m_description.empty())
{
StreamString strm;
- strm.Printf("watchpoint %lli", m_value);
+ strm.Printf("watchpoint %" PRIi64, m_value);
m_description.swap (strm.GetString());
}
return m_description.c_str();
@@ -509,7 +509,7 @@ protected:
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
if (log)
- log->Printf ("Process::%s could not find watchpoint location id: %lld...",
+ log->Printf ("Process::%s could not find watchpoint location id: %" PRId64 "...",
__FUNCTION__, GetValue());
m_should_stop = true;
@@ -666,7 +666,7 @@ protected:
LogSP log_process(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
if (log_process)
- log_process->Printf ("Process::%s could not find watchpoint id: %lld...", __FUNCTION__, m_value);
+ log_process->Printf ("Process::%s could not find watchpoint id: %" PRId64 "...", __FUNCTION__, m_value);
}
if (log)
log->Printf ("Process::%s returning from action with m_should_stop: %d.", __FUNCTION__, m_should_stop);
@@ -737,7 +737,7 @@ public:
if (signal_name)
strm.Printf("signal %s", signal_name);
else
- strm.Printf("signal %lli", m_value);
+ strm.Printf("signal %" PRIi64, m_value);
m_description.swap (strm.GetString());
}
return m_description.c_str();
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index ec88710a843..47a587d102a 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -527,7 +527,7 @@ Target::CreateWatchpoint(lldb::addr_t addr, size_t size, const ClangASTType *typ
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_WATCHPOINTS));
if (log)
- log->Printf("Target::%s (addr = 0x%8.8llx size = %llu type = %u)\n",
+ log->Printf("Target::%s (addr = 0x%8.8" PRIx64 " size = %" PRIu64 " type = %u)\n",
__FUNCTION__, addr, (uint64_t)size, kind);
WatchpointSP wp_sp;
@@ -541,7 +541,7 @@ Target::CreateWatchpoint(lldb::addr_t addr, size_t size, const ClangASTType *typ
if (size == 0)
error.SetErrorString("cannot set a watchpoint with watch_size of 0");
else
- error.SetErrorStringWithFormat("invalid watch address: %llu", addr);
+ error.SetErrorStringWithFormat("invalid watch address: %" PRIu64, addr);
return wp_sp;
}
@@ -1244,12 +1244,12 @@ Target::ReadMemory (const Address& addr,
{
ModuleSP addr_module_sp (resolved_addr.GetModule());
if (addr_module_sp && addr_module_sp->GetFileSpec())
- error.SetErrorStringWithFormat("%s[0x%llx] can't be resolved, %s in not currently loaded",
+ error.SetErrorStringWithFormat("%s[0x%" PRIx64 "] can't be resolved, %s in not currently loaded",
addr_module_sp->GetFileSpec().GetFilename().AsCString(),
resolved_addr.GetFileAddress(),
addr_module_sp->GetFileSpec().GetFilename().AsCString());
else
- error.SetErrorStringWithFormat("0x%llx can't be resolved", resolved_addr.GetFileAddress());
+ error.SetErrorStringWithFormat("0x%" PRIx64 " can't be resolved", resolved_addr.GetFileAddress());
}
else
{
@@ -1259,9 +1259,9 @@ Target::ReadMemory (const Address& addr,
if (error.Success())
{
if (bytes_read == 0)
- error.SetErrorStringWithFormat("read memory from 0x%llx failed", load_addr);
+ error.SetErrorStringWithFormat("read memory from 0x%" PRIx64 " failed", load_addr);
else
- error.SetErrorStringWithFormat("only %llu of %llu bytes were read from memory at 0x%llx", (uint64_t)bytes_read, (uint64_t)dst_len, load_addr);
+ error.SetErrorStringWithFormat("only %" PRIu64 " of %" PRIu64 " bytes were read from memory at 0x%" PRIx64, (uint64_t)bytes_read, (uint64_t)dst_len, load_addr);
}
}
if (bytes_read)
@@ -2015,9 +2015,9 @@ Target::RunStopHooks ()
cur_hook_sp->GetCommands().GetStringAtIndex(0) :
NULL);
if (cmd)
- result.AppendMessageWithFormat("\n- Hook %llu (%s)\n", cur_hook_sp->GetID(), cmd);
+ result.AppendMessageWithFormat("\n- Hook %" PRIu64 " (%s)\n", cur_hook_sp->GetID(), cmd);
else
- result.AppendMessageWithFormat("\n- Hook %llu\n", cur_hook_sp->GetID());
+ result.AppendMessageWithFormat("\n- Hook %" PRIu64 "\n", cur_hook_sp->GetID());
any_thread_matched = true;
}
@@ -2042,7 +2042,7 @@ Target::RunStopHooks ()
if ((result.GetStatus() == eReturnStatusSuccessContinuingNoResult) ||
(result.GetStatus() == eReturnStatusSuccessContinuingResult))
{
- result.AppendMessageWithFormat ("Aborting stop hooks, hook %llu set the program running.", cur_hook_sp->GetID());
+ result.AppendMessageWithFormat ("Aborting stop hooks, hook %" PRIu64 " set the program running.", cur_hook_sp->GetID());
keep_going = false;
}
}
@@ -2100,7 +2100,7 @@ Target::StopHook::GetDescription (Stream *s, lldb::DescriptionLevel level) const
s->SetIndentLevel(indent_level + 2);
- s->Printf ("Hook: %llu\n", GetID());
+ s->Printf ("Hook: %" PRIu64 "\n", GetID());
if (m_active)
s->Indent ("State: enabled\n");
else
diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp
index b595dc627a9..4c6995cf073 100644
--- a/lldb/source/Target/Thread.cpp
+++ b/lldb/source/Target/Thread.cpp
@@ -260,7 +260,7 @@ Thread::Thread (Process &process, lldb::tid_t tid) :
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT));
if (log)
- log->Printf ("%p Thread::Thread(tid = 0x%4.4llx)", this, GetID());
+ log->Printf ("%p Thread::Thread(tid = 0x%4.4" PRIx64 ")", this, GetID());
CheckInWithManager();
QueueFundamentalPlan(true);
@@ -271,7 +271,7 @@ Thread::~Thread()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT));
if (log)
- log->Printf ("%p Thread::~Thread(tid = 0x%4.4llx)", this, GetID());
+ log->Printf ("%p Thread::~Thread(tid = 0x%4.4" PRIx64 ")", this, GetID());
/// If you hit this assert, it means your derived class forgot to call DoDestroy in its destructor.
assert (m_destroy_called);
}
@@ -544,10 +544,10 @@ Thread::ShouldStop (Event* event_ptr)
if (GetResumeState () == eStateSuspended)
{
if (log)
- log->Printf ("Thread::%s for tid = 0x%4.4llx, should_stop = 0 (ignore since thread was suspended)",
+ log->Printf ("Thread::%s for tid = 0x%4.4" PRIx64 ", should_stop = 0 (ignore since thread was suspended)",
__FUNCTION__,
GetID ());
-// log->Printf ("Thread::%s for tid = 0x%4.4llx, pc = 0x%16.16llx, should_stop = 0 (ignore since thread was suspended)",
+// log->Printf ("Thread::%s for tid = 0x%4.4" PRIx64 ", pc = 0x%16.16" PRIx64 ", should_stop = 0 (ignore since thread was suspended)",
// __FUNCTION__,
// GetID (),
// GetRegisterContext()->GetPC());
@@ -557,10 +557,10 @@ Thread::ShouldStop (Event* event_ptr)
if (GetTemporaryResumeState () == eStateSuspended)
{
if (log)
- log->Printf ("Thread::%s for tid = 0x%4.4llx, should_stop = 0 (ignore since thread was suspended)",
+ log->Printf ("Thread::%s for tid = 0x%4.4" PRIx64 ", should_stop = 0 (ignore since thread was suspended)",
__FUNCTION__,
GetID ());
-// log->Printf ("Thread::%s for tid = 0x%4.4llx, pc = 0x%16.16llx, should_stop = 0 (ignore since thread was suspended)",
+// log->Printf ("Thread::%s for tid = 0x%4.4" PRIx64 ", pc = 0x%16.16" PRIx64 ", should_stop = 0 (ignore since thread was suspended)",
// __FUNCTION__,
// GetID (),
// GetRegisterContext()->GetPC());
@@ -570,7 +570,7 @@ Thread::ShouldStop (Event* event_ptr)
if (ThreadStoppedForAReason() == false)
{
if (log)
- log->Printf ("Thread::%s for tid = 0x%4.4llx, pc = 0x%16.16llx, should_stop = 0 (ignore since no stop reason)",
+ log->Printf ("Thread::%s for tid = 0x%4.4" PRIx64 ", pc = 0x%16.16" PRIx64 ", should_stop = 0 (ignore since no stop reason)",
__FUNCTION__,
GetID (),
GetRegisterContext()->GetPC());
@@ -579,7 +579,7 @@ Thread::ShouldStop (Event* event_ptr)
if (log)
{
- log->Printf ("Thread::%s for tid = 0x%4.4llx, pc = 0x%16.16llx",
+ log->Printf ("Thread::%s for tid = 0x%4.4" PRIx64 ", pc = 0x%16.16" PRIx64,
__FUNCTION__,
GetID (),
GetRegisterContext()->GetPC());
@@ -776,21 +776,21 @@ Thread::ShouldReportStop (Event* event_ptr)
if (thread_state == eStateSuspended || thread_state == eStateInvalid)
{
if (log)
- log->Printf ("Thread::ShouldReportStop() tid = 0x%4.4llx: returning vote %i (state was suspended or invalid)\n", GetID(), eVoteNoOpinion);
+ log->Printf ("Thread::ShouldReportStop() tid = 0x%4.4" PRIx64 ": returning vote %i (state was suspended or invalid)\n", GetID(), eVoteNoOpinion);
return eVoteNoOpinion;
}
if (temp_thread_state == eStateSuspended || temp_thread_state == eStateInvalid)
{
if (log)
- log->Printf ("Thread::ShouldReportStop() tid = 0x%4.4llx: returning vote %i (temporary state was suspended or invalid)\n", GetID(), eVoteNoOpinion);
+ log->Printf ("Thread::ShouldReportStop() tid = 0x%4.4" PRIx64 ": returning vote %i (temporary state was suspended or invalid)\n", GetID(), eVoteNoOpinion);
return eVoteNoOpinion;
}
if (!ThreadStoppedForAReason())
{
if (log)
- log->Printf ("Thread::ShouldReportStop() tid = 0x%4.4llx: returning vote %i (thread didn't stop for a reason.)\n", GetID(), eVoteNoOpinion);
+ log->Printf ("Thread::ShouldReportStop() tid = 0x%4.4" PRIx64 ": returning vote %i (thread didn't stop for a reason.)\n", GetID(), eVoteNoOpinion);
return eVoteNoOpinion;
}
@@ -798,13 +798,13 @@ Thread::ShouldReportStop (Event* event_ptr)
{
// Don't use GetCompletedPlan here, since that suppresses private plans.
if (log)
- log->Printf ("Thread::ShouldReportStop() tid = 0x%4.4llx: returning vote for complete stack's back plan\n", GetID());
+ log->Printf ("Thread::ShouldReportStop() tid = 0x%4.4" PRIx64 ": returning vote for complete stack's back plan\n", GetID());
return m_completed_plan_stack.back()->ShouldReportStop (event_ptr);
}
else
{
if (log)
- log->Printf ("Thread::ShouldReportStop() tid = 0x%4.4llx: returning vote for current plan\n", GetID());
+ log->Printf ("Thread::ShouldReportStop() tid = 0x%4.4" PRIx64 ": returning vote for current plan\n", GetID());
return GetCurrentPlan()->ShouldReportStop (event_ptr);
}
}
@@ -825,7 +825,7 @@ Thread::ShouldReportRun (Event* event_ptr)
{
// Don't use GetCompletedPlan here, since that suppresses private plans.
if (log)
- log->Printf ("Current Plan for thread %d (0x%4.4llx): %s being asked whether we should report run.",
+ log->Printf ("Current Plan for thread %d (0x%4.4" PRIx64 "): %s being asked whether we should report run.",
GetIndexID(),
GetID(),
m_completed_plan_stack.back()->GetName());
@@ -835,7 +835,7 @@ Thread::ShouldReportRun (Event* event_ptr)
else
{
if (log)
- log->Printf ("Current Plan for thread %d (0x%4.4llx): %s being asked whether we should report run.",
+ log->Printf ("Current Plan for thread %d (0x%4.4" PRIx64 "): %s being asked whether we should report run.",
GetIndexID(),
GetID(),
GetCurrentPlan()->GetName());
@@ -870,7 +870,7 @@ Thread::PushPlan (ThreadPlanSP &thread_plan_sp)
{
StreamString s;
thread_plan_sp->GetDescription (&s, lldb::eDescriptionLevelFull);
- log->Printf("Pushing plan: \"%s\", tid = 0x%4.4llx.",
+ log->Printf("Pushing plan: \"%s\", tid = 0x%4.4" PRIx64 ".",
s.GetData(),
thread_plan_sp->GetThread().GetID());
}
@@ -889,7 +889,7 @@ Thread::PopPlan ()
ThreadPlanSP &plan = m_plan_stack.back();
if (log)
{
- log->Printf("Popping plan: \"%s\", tid = 0x%4.4llx.", plan->GetName(), plan->GetThread().GetID());
+ log->Printf("Popping plan: \"%s\", tid = 0x%4.4" PRIx64 ".", plan->GetName(), plan->GetThread().GetID());
}
m_completed_plan_stack.push_back (plan);
plan->WillPop();
@@ -1054,7 +1054,7 @@ Thread::DiscardThreadPlansUpToPlan (ThreadPlan *up_to_plan_ptr)
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
if (log)
{
- log->Printf("Discarding thread plans for thread tid = 0x%4.4llx, up to %p", GetID(), up_to_plan_ptr);
+ log->Printf("Discarding thread plans for thread tid = 0x%4.4" PRIx64 ", up to %p", GetID(), up_to_plan_ptr);
}
int stack_size = m_plan_stack.size();
@@ -1095,7 +1095,7 @@ Thread::DiscardThreadPlans(bool force)
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
if (log)
{
- log->Printf("Discarding thread plans for thread (tid = 0x%4.4llx, force %d)", GetID(), force);
+ log->Printf("Discarding thread plans for thread (tid = 0x%4.4" PRIx64 ", force %d)", GetID(), force);
}
if (force)
@@ -1311,7 +1311,7 @@ Thread::DumpThreadPlans (lldb_private::Stream *s) const
uint32_t stack_size = m_plan_stack.size();
int i;
s->Indent();
- s->Printf ("Plan Stack for thread #%u: tid = 0x%4.4llx, stack_size = %d\n", GetIndexID(), GetID(), stack_size);
+ s->Printf ("Plan Stack for thread #%u: tid = 0x%4.4" PRIx64 ", stack_size = %d\n", GetIndexID(), GetID(), stack_size);
for (i = stack_size - 1; i >= 0; i--)
{
s->IndentMore();
@@ -1437,7 +1437,7 @@ Thread::ReturnFromFrameWithIndex (uint32_t frame_idx, lldb::ValueObjectSP return
if (!frame_sp)
{
- return_error.SetErrorStringWithFormat("Could not find frame with index %d in thread 0x%llx.", frame_idx, GetID());
+ return_error.SetErrorStringWithFormat("Could not find frame with index %d in thread 0x%" PRIx64 ".", frame_idx, GetID());
}
return ReturnFromFrame(frame_sp, return_value_sp, broadcast);
diff --git a/lldb/source/Target/ThreadList.cpp b/lldb/source/Target/ThreadList.cpp
index 8d3f4a84273..fe38b5769f9 100644
--- a/lldb/source/Target/ThreadList.cpp
+++ b/lldb/source/Target/ThreadList.cpp
@@ -202,7 +202,7 @@ ThreadList::ShouldStop (Event *event_ptr)
if (log)
{
log->PutCString("");
- log->Printf ("ThreadList::%s: %llu threads", __FUNCTION__, (uint64_t)m_threads.size());
+ log->Printf ("ThreadList::%s: %" PRIu64 " threads", __FUNCTION__, (uint64_t)m_threads.size());
}
for (pos = threads_copy.begin(); pos != end; ++pos)
@@ -241,7 +241,7 @@ ThreadList::ShouldReportStop (Event *event_ptr)
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
if (log)
- log->Printf ("ThreadList::%s %llu threads", __FUNCTION__, (uint64_t)m_threads.size());
+ log->Printf ("ThreadList::%s %" PRIu64 " threads", __FUNCTION__, (uint64_t)m_threads.size());
// Run through the threads and ask whether we should report this event.
// For stopping, a YES vote wins over everything. A NO vote wins over NO opinion.
@@ -266,7 +266,7 @@ ThreadList::ShouldReportStop (Event *event_ptr)
else
{
if (log)
- log->Printf ("ThreadList::%s thread 0x%4.4llx: voted %s, but lost out because result was %s",
+ log->Printf ("ThreadList::%s thread 0x%4.4" PRIx64 ": voted %s, but lost out because result was %s",
__FUNCTION__,
thread_sp->GetID (),
GetVoteAsCString (vote),
@@ -309,7 +309,7 @@ ThreadList::ShouldReportRun (Event *event_ptr)
break;
case eVoteNo:
if (log)
- log->Printf ("ThreadList::ShouldReportRun() thread %d (0x%4.4llx) says don't report.",
+ log->Printf ("ThreadList::ShouldReportRun() thread %d (0x%4.4" PRIx64 ") says don't report.",
(*pos)->GetIndexID(),
(*pos)->GetID());
result = eVoteNo;
diff --git a/lldb/source/Target/ThreadPlan.cpp b/lldb/source/Target/ThreadPlan.cpp
index 8dcbe85c3a2..1bf7d59ba89 100644
--- a/lldb/source/Target/ThreadPlan.cpp
+++ b/lldb/source/Target/ThreadPlan.cpp
@@ -139,7 +139,7 @@ ThreadPlan::WillResume (StateType resume_state, bool current_plan)
addr_t pc = reg_ctx->GetPC();
addr_t sp = reg_ctx->GetSP();
addr_t fp = reg_ctx->GetFP();
- log->Printf("%s Thread #%u: tid = 0x%4.4llx, pc = 0x%8.8llx, sp = 0x%8.8llx, fp = 0x%8.8llx, "
+ log->Printf("%s Thread #%u: tid = 0x%4.4" PRIx64 ", pc = 0x%8.8" PRIx64 ", sp = 0x%8.8" PRIx64 ", fp = 0x%8.8" PRIx64 ", "
"plan = '%s', state = %s, stop others = %d",
__FUNCTION__,
m_thread.GetIndexID(),
diff --git a/lldb/source/Target/ThreadPlanBase.cpp b/lldb/source/Target/ThreadPlanBase.cpp
index fcb868302da..f8e4b6a156a 100644
--- a/lldb/source/Target/ThreadPlanBase.cpp
+++ b/lldb/source/Target/ThreadPlanBase.cpp
@@ -107,7 +107,7 @@ ThreadPlanBase::ShouldStop (Event *event_ptr)
// at this point. Don't force the discard, however, so Master plans can stay
// in place if they want to.
if (log)
- log->Printf("Base plan discarding thread plans for thread tid = 0x%4.4llx (breakpoint hit.)", m_thread.GetID());
+ log->Printf("Base plan discarding thread plans for thread tid = 0x%4.4" PRIx64 " (breakpoint hit.)", m_thread.GetID());
m_thread.DiscardThreadPlans(false);
return true;
}
@@ -135,7 +135,7 @@ ThreadPlanBase::ShouldStop (Event *event_ptr)
// If we crashed, discard thread plans and stop. Don't force the discard, however,
// since on rerun the target may clean up this exception and continue normally from there.
if (log)
- log->Printf("Base plan discarding thread plans for thread tid = 0x%4.4llx (exception.)", m_thread.GetID());
+ log->Printf("Base plan discarding thread plans for thread tid = 0x%4.4" PRIx64 " (exception.)", m_thread.GetID());
m_thread.DiscardThreadPlans(false);
return true;
@@ -143,7 +143,7 @@ ThreadPlanBase::ShouldStop (Event *event_ptr)
if (stop_info_sp->ShouldStop(event_ptr))
{
if (log)
- log->Printf("Base plan discarding thread plans for thread tid = 0x%4.4llx (signal.)", m_thread.GetID());
+ log->Printf("Base plan discarding thread plans for thread tid = 0x%4.4" PRIx64 " (signal.)", m_thread.GetID());
m_thread.DiscardThreadPlans(false);
return true;
}
diff --git a/lldb/source/Target/ThreadPlanCallFunction.cpp b/lldb/source/Target/ThreadPlanCallFunction.cpp
index 8a85bf05396..a17b3b6ce72 100644
--- a/lldb/source/Target/ThreadPlanCallFunction.cpp
+++ b/lldb/source/Target/ThreadPlanCallFunction.cpp
@@ -68,7 +68,7 @@ ThreadPlanCallFunction::ConstructorSetup (Thread &thread,
if (!error.Success())
{
if (log)
- log->Printf ("ThreadPlanCallFunction(%p): Trying to put the stack in unreadable memory at: 0x%llx.", this, m_function_sp);
+ log->Printf ("ThreadPlanCallFunction(%p): Trying to put the stack in unreadable memory at: 0x%" PRIx64 ".", this, m_function_sp);
return false;
}
@@ -283,7 +283,7 @@ ThreadPlanCallFunction::DoTakedown (bool success)
}
}
if (log)
- log->Printf ("ThreadPlanCallFunction(%p): DoTakedown called for thread 0x%4.4llx, m_valid: %d complete: %d.\n", this, m_thread.GetID(), m_valid, IsPlanComplete());
+ log->Printf ("ThreadPlanCallFunction(%p): DoTakedown called for thread 0x%4.4" PRIx64 ", m_valid: %d complete: %d.\n", this, m_thread.GetID(), m_valid, IsPlanComplete());
m_takedown_done = true;
m_stop_address = m_thread.GetStackFrameAtIndex(0)->GetRegisterContext()->GetPC();
m_real_stop_info_sp = GetPrivateStopReason();
@@ -297,7 +297,7 @@ ThreadPlanCallFunction::DoTakedown (bool success)
else
{
if (log)
- log->Printf ("ThreadPlanCallFunction(%p): DoTakedown called as no-op for thread 0x%4.4llx, m_valid: %d complete: %d.\n", this, m_thread.GetID(), m_valid, IsPlanComplete());
+ log->Printf ("ThreadPlanCallFunction(%p): DoTakedown called as no-op for thread 0x%4.4" PRIx64 ", m_valid: %d complete: %d.\n", this, m_thread.GetID(), m_valid, IsPlanComplete());
}
}
@@ -317,7 +317,7 @@ ThreadPlanCallFunction::GetDescription (Stream *s, DescriptionLevel level)
else
{
TargetSP target_sp (m_thread.CalculateTarget());
- s->Printf("Thread plan to call 0x%llx", m_function_addr.GetLoadAddress(target_sp.get()));
+ s->Printf("Thread plan to call 0x%" PRIx64, m_function_addr.GetLoadAddress(target_sp.get()));
}
}
diff --git a/lldb/source/Target/ThreadPlanShouldStopHere.cpp b/lldb/source/Target/ThreadPlanShouldStopHere.cpp
index 9528e629b34..7ae20f517c3 100644
--- a/lldb/source/Target/ThreadPlanShouldStopHere.cpp
+++ b/lldb/source/Target/ThreadPlanShouldStopHere.cpp
@@ -60,11 +60,11 @@ ThreadPlanShouldStopHere::InvokeShouldStopHereCallback ()
{
StreamString s;
return_plan->GetDescription (&s, lldb::eDescriptionLevelFull);
- log->Printf ("ShouldStopHere callback found a step out plan from 0x%llx: %s.", current_addr, s.GetData());
+ log->Printf ("ShouldStopHere callback found a step out plan from 0x%" PRIx64 ": %s.", current_addr, s.GetData());
}
else
{
- log->Printf ("ShouldStopHere callback didn't find a step out plan from: 0x%llx.", current_addr);
+ log->Printf ("ShouldStopHere callback didn't find a step out plan from: 0x%" PRIx64 ".", current_addr);
}
}
return return_plan;
diff --git a/lldb/source/Target/ThreadPlanStepOut.cpp b/lldb/source/Target/ThreadPlanStepOut.cpp
index 4e628e7d0b0..540539e524b 100644
--- a/lldb/source/Target/ThreadPlanStepOut.cpp
+++ b/lldb/source/Target/ThreadPlanStepOut.cpp
@@ -148,7 +148,7 @@ ThreadPlanStepOut::GetDescription (Stream *s, lldb::DescriptionLevel level)
else if (m_step_through_inline_plan_sp)
s->Printf ("Stepping out by stepping through inlined function.");
else
- s->Printf ("Stepping out from address 0x%llx to return address 0x%llx using breakpoint site %d",
+ s->Printf ("Stepping out from address 0x%" PRIx64 " to return address 0x%" PRIx64 " using breakpoint site %d",
(uint64_t)m_step_from_insn,
(uint64_t)m_return_addr,
m_return_bp_id);
diff --git a/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp b/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp
index 3d4aa7c4af7..59244e5cc5d 100644
--- a/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp
+++ b/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp
@@ -48,7 +48,7 @@ ThreadPlanStepOverBreakpoint::~ThreadPlanStepOverBreakpoint ()
void
ThreadPlanStepOverBreakpoint::GetDescription (Stream *s, lldb::DescriptionLevel level)
{
- s->Printf("Single stepping past breakpoint site %llu at 0x%llx", m_breakpoint_site_id, (uint64_t)m_breakpoint_addr);
+ s->Printf("Single stepping past breakpoint site %" PRIu64 " at 0x%" PRIx64, m_breakpoint_site_id, (uint64_t)m_breakpoint_addr);
}
bool
diff --git a/lldb/source/Target/ThreadPlanStepRange.cpp b/lldb/source/Target/ThreadPlanStepRange.cpp
index 73db0440087..25de2b35bed 100644
--- a/lldb/source/Target/ThreadPlanStepRange.cpp
+++ b/lldb/source/Target/ThreadPlanStepRange.cpp
@@ -190,7 +190,7 @@ ThreadPlanStepRange::InRange ()
}
if (!ret_value && log)
- log->Printf ("Step range plan out of range to 0x%llx", pc_load_addr);
+ log->Printf ("Step range plan out of range to 0x%" PRIx64, pc_load_addr);
return ret_value;
}
diff --git a/lldb/source/Target/ThreadPlanStepThrough.cpp b/lldb/source/Target/ThreadPlanStepThrough.cpp
index 003d199e379..21e1eeb8d3c 100644
--- a/lldb/source/Target/ThreadPlanStepThrough.cpp
+++ b/lldb/source/Target/ThreadPlanStepThrough.cpp
@@ -65,7 +65,7 @@ ThreadPlanStepThrough::ThreadPlanStepThrough (Thread &thread, StackID &m_stack_i
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
if (log)
{
- log->Printf ("Setting backstop breakpoint %d at address: 0x%llx", m_backstop_bkpt_id, m_backstop_addr);
+ log->Printf ("Setting backstop breakpoint %d at address: 0x%" PRIx64, m_backstop_bkpt_id, m_backstop_addr);
}
}
}
@@ -103,11 +103,11 @@ ThreadPlanStepThrough::LookForPlanToStepThroughFromCurrentPC()
{
StreamString s;
m_sub_plan_sp->GetDescription(&s, lldb::eDescriptionLevelFull);
- log->Printf ("Found step through plan from 0x%llx: %s", current_address, s.GetData());
+ log->Printf ("Found step through plan from 0x%" PRIx64 ": %s", current_address, s.GetData());
}
else
{
- log->Printf ("Couldn't find step through plan from address 0x%llx.", current_address);
+ log->Printf ("Couldn't find step through plan from address 0x%" PRIx64 ".", current_address);
}
}
}
diff --git a/lldb/source/Target/ThreadPlanStepUntil.cpp b/lldb/source/Target/ThreadPlanStepUntil.cpp
index b48c5f16999..1e454e73b04 100644
--- a/lldb/source/Target/ThreadPlanStepUntil.cpp
+++ b/lldb/source/Target/ThreadPlanStepUntil.cpp
@@ -133,21 +133,21 @@ ThreadPlanStepUntil::GetDescription (Stream *s, lldb::DescriptionLevel level)
else
{
if (m_until_points.size() == 1)
- s->Printf ("Stepping from address 0x%llx until we reach 0x%llx using breakpoint %d",
+ s->Printf ("Stepping from address 0x%" PRIx64 " until we reach 0x%" PRIx64 " using breakpoint %d",
(uint64_t)m_step_from_insn,
(uint64_t) (*m_until_points.begin()).first,
(*m_until_points.begin()).second);
else
{
until_collection::iterator pos, end = m_until_points.end();
- s->Printf ("Stepping from address 0x%llx until we reach one of:",
+ s->Printf ("Stepping from address 0x%" PRIx64 " until we reach one of:",
(uint64_t)m_step_from_insn);
for (pos = m_until_points.begin(); pos != end; pos++)
{
- s->Printf ("\n\t0x%llx (bp: %d)", (uint64_t) (*pos).first, (*pos).second);
+ s->Printf ("\n\t0x%" PRIx64 " (bp: %d)", (uint64_t) (*pos).first, (*pos).second);
}
}
- s->Printf(" stepped out address is 0x%llx.", (uint64_t) m_return_addr);
+ s->Printf(" stepped out address is 0x%" PRIx64 ".", (uint64_t) m_return_addr);
}
}
diff --git a/lldb/source/Target/ThreadSpec.cpp b/lldb/source/Target/ThreadSpec.cpp
index fda54546186..cb54469ba90 100644
--- a/lldb/source/Target/ThreadSpec.cpp
+++ b/lldb/source/Target/ThreadSpec.cpp
@@ -140,7 +140,7 @@ ThreadSpec::GetDescription (Stream *s, lldb::DescriptionLevel level) const
else
{
if (GetTID() != LLDB_INVALID_THREAD_ID)
- s->Printf("tid: 0x%llx ", GetTID());
+ s->Printf("tid: 0x%" PRIx64 " ", GetTID());
if (GetIndex() != UINT32_MAX)
s->Printf("index: %d ", GetIndex());
OpenPOWER on IntegriCloud