summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/ThreadPlanStepInRange.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Target/ThreadPlanStepInRange.cpp')
-rw-r--r--lldb/source/Target/ThreadPlanStepInRange.cpp47
1 files changed, 25 insertions, 22 deletions
diff --git a/lldb/source/Target/ThreadPlanStepInRange.cpp b/lldb/source/Target/ThreadPlanStepInRange.cpp
index 2065fa55fa6..ff6553e4557 100644
--- a/lldb/source/Target/ThreadPlanStepInRange.cpp
+++ b/lldb/source/Target/ThreadPlanStepInRange.cpp
@@ -148,7 +148,7 @@ bool ThreadPlanStepInRange::ShouldStop(Event *event_ptr) {
s.Address(
m_thread.GetRegisterContext()->GetPC(),
m_thread.CalculateTarget()->GetArchitecture().GetAddressByteSize());
- log->Printf("ThreadPlanStepInRange reached %s.", s.GetData());
+ LLDB_LOGF(log, "ThreadPlanStepInRange reached %s.", s.GetData());
}
if (IsPlanComplete())
@@ -197,13 +197,14 @@ bool ThreadPlanStepInRange::ShouldStop(Event *event_ptr) {
CheckShouldStopHereAndQueueStepOut(frame_order, m_status);
if (log) {
if (m_sub_plan_sp)
- log->Printf("ShouldStopHere found plan to step out of this frame.");
+ LLDB_LOGF(log,
+ "ShouldStopHere found plan to step out of this frame.");
else
- log->Printf("ShouldStopHere no plan to step out of this frame.");
+ LLDB_LOGF(log, "ShouldStopHere no plan to step out of this frame.");
}
} else if (log) {
- log->Printf(
- "Thought I stepped out, but in fact arrived at a trampoline.");
+ LLDB_LOGF(
+ log, "Thought I stepped out, but in fact arrived at a trampoline.");
}
} else if (frame_order == eFrameCompareEqual && InSymbol()) {
// If we are not in a place we should step through, we're done. One
@@ -237,9 +238,10 @@ bool ThreadPlanStepInRange::ShouldStop(Event *event_ptr) {
if (log) {
if (m_sub_plan_sp)
- log->Printf("Found a step through plan: %s", m_sub_plan_sp->GetName());
+ LLDB_LOGF(log, "Found a step through plan: %s",
+ m_sub_plan_sp->GetName());
else
- log->Printf("No step through plan found.");
+ LLDB_LOGF(log, "No step through plan found.");
}
// If not, give the "should_stop" callback a chance to push a plan to get
@@ -289,8 +291,7 @@ bool ThreadPlanStepInRange::ShouldStop(Event *event_ptr) {
if (bytes_to_skip != 0) {
func_start_address.Slide(bytes_to_skip);
log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP);
- if (log)
- log->Printf("Pushing past prologue ");
+ LLDB_LOGF(log, "Pushing past prologue ");
m_sub_plan_sp = m_thread.QueueThreadPlanForRunToAddress(
false, func_start_address, true, m_status);
@@ -373,11 +374,12 @@ bool ThreadPlanStepInRange::FrameMatchesAvoidCriteria() {
if (log) {
std::string match;
regex_match.GetMatchAtIndex(frame_function_name, 0, match);
- log->Printf("Stepping out of function \"%s\" because it matches "
- "the avoid regexp \"%s\" - match substring: \"%s\".",
- frame_function_name,
- avoid_regexp_to_use->GetText().str().c_str(),
- match.c_str());
+ LLDB_LOGF(log,
+ "Stepping out of function \"%s\" because it matches "
+ "the avoid regexp \"%s\" - match substring: \"%s\".",
+ frame_function_name,
+ avoid_regexp_to_use->GetText().str().c_str(),
+ match.c_str());
}
}
return return_value;
@@ -424,10 +426,11 @@ bool ThreadPlanStepInRange::DefaultShouldStopHereCallback(
should_stop_here = false;
}
if (log && !should_stop_here)
- log->Printf("Stepping out of frame %s which did not match step into "
- "target %s.",
- sc.GetFunctionName().AsCString(),
- step_in_range_plan->m_step_into_target.AsCString());
+ LLDB_LOGF(log,
+ "Stepping out of frame %s which did not match step into "
+ "target %s.",
+ sc.GetFunctionName().AsCString(),
+ step_in_range_plan->m_step_into_target.AsCString());
}
}
@@ -496,10 +499,10 @@ bool ThreadPlanStepInRange::DoWillResume(lldb::StateType resume_state,
bool step_without_resume = m_thread.DecrementCurrentInlinedDepth();
if (step_without_resume) {
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
- if (log)
- log->Printf("ThreadPlanStepInRange::DoWillResume: returning false, "
- "inline_depth: %d",
- m_thread.GetCurrentInlinedDepth());
+ LLDB_LOGF(log,
+ "ThreadPlanStepInRange::DoWillResume: returning false, "
+ "inline_depth: %d",
+ m_thread.GetCurrentInlinedDepth());
SetStopInfo(StopInfo::CreateStopReasonToTrace(m_thread));
// FIXME: Maybe it would be better to create a InlineStep stop reason, but
OpenPOWER on IntegriCloud