mirror of
https://github.com/intel/llvm.git
synced 2026-01-15 12:25:46 +08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user