Resolve printf formatting warnings on Linux:

- use macros from inttypes.h for format strings instead of OS-specific types

Patch from Matt Kopec!

llvm-svn: 168945
This commit is contained in:
Daniel Malea
2012-11-29 21:49:15 +00:00
parent 05d3bf77a1
commit d01b2953fa
149 changed files with 686 additions and 679 deletions

View File

@@ -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;