summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/ThreadPlanStepInRange.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2013-03-14 21:44:36 +0000
committerJim Ingham <jingham@apple.com>2013-03-14 21:44:36 +0000
commit3101ba3300856fe3fba5f2f819d42388651a8f61 (patch)
tree74b66cd1c046f77e1106be2ab0d155906b2d416d /lldb/source/Target/ThreadPlanStepInRange.cpp
parent9eb40a97f7152eb17469b407ea55723ce2c254a9 (diff)
downloadbcm5719-llvm-3101ba3300856fe3fba5f2f819d42388651a8f61.tar.gz
bcm5719-llvm-3101ba3300856fe3fba5f2f819d42388651a8f61.zip
Add some logging to track cases where “step-in” steps out due to the avoid-regexp and the step-in target.
llvm-svn: 177117
Diffstat (limited to 'lldb/source/Target/ThreadPlanStepInRange.cpp')
-rw-r--r--lldb/source/Target/ThreadPlanStepInRange.cpp25
1 files changed, 21 insertions, 4 deletions
diff --git a/lldb/source/Target/ThreadPlanStepInRange.cpp b/lldb/source/Target/ThreadPlanStepInRange.cpp
index d4b917fd076..c21eb690cd1 100644
--- a/lldb/source/Target/ThreadPlanStepInRange.cpp
+++ b/lldb/source/Target/ThreadPlanStepInRange.cpp
@@ -274,7 +274,19 @@ ThreadPlanStepInRange::FrameMatchesAvoidRegexp ()
{
const char *frame_function_name = sc.GetFunctionName().GetCString();
if (frame_function_name)
- return avoid_regexp_to_use->Execute(frame_function_name);
+ {
+ bool return_value = avoid_regexp_to_use->Execute(frame_function_name);
+ if (return_value)
+ {
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
+ if (log)
+ log->Printf ("Stepping out of function %s because it matches the avoid regexp \"%s\".",
+ frame_function_name,
+ avoid_regexp_to_use->GetText());
+
+ }
+ return return_value;
+ }
}
}
return false;
@@ -285,12 +297,12 @@ ThreadPlanStepInRange::DefaultShouldStopHereCallback (ThreadPlan *current_plan,
{
bool should_step_out = false;
StackFrame *frame = current_plan->GetThread().GetStackFrameAtIndex(0).get();
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
if (flags.Test(eAvoidNoDebug))
{
if (!frame->HasDebugInformation())
{
- LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
if (log)
log->Printf ("Stepping out of frame with no debug info");
@@ -321,13 +333,18 @@ ThreadPlanStepInRange::DefaultShouldStopHereCallback (ThreadPlan *current_plan,
else if (strstr (function_name, target_name) == NULL)
should_step_out = true;
}
+ if (log && should_step_out)
+ 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());
}
}
if (!should_step_out)
{
- ThreadPlanStepInRange *step_in_range_plan = static_cast<ThreadPlanStepInRange *> (current_plan);
- should_step_out = step_in_range_plan->FrameMatchesAvoidRegexp ();
+ ThreadPlanStepInRange *step_in_range_plan = static_cast<ThreadPlanStepInRange *> (current_plan);
+ // Don't log the should_step_out here, it's easier to do it in FrameMatchesAvoidRegexp.
+ should_step_out = step_in_range_plan->FrameMatchesAvoidRegexp ();
}
}
OpenPOWER on IntegriCloud