summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Process')
-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
20 files changed, 111 insertions, 111 deletions
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;
OpenPOWER on IntegriCloud