[Lldb-commits] [lldb] r177119 - Log the match substring as well in the case where we match the step-avoid regexp.
Jim Ingham
jingham at apple.com
Thu Mar 14 15:00:18 PDT 2013
Author: jingham
Date: Thu Mar 14 17:00:18 2013
New Revision: 177119
URL: http://llvm.org/viewvc/llvm-project?rev=177119&view=rev
Log:
Log the match substring as well in the case where we match the step-avoid regexp.
Modified:
lldb/trunk/source/Target/ThreadPlanStepInRange.cpp
Modified: lldb/trunk/source/Target/ThreadPlanStepInRange.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanStepInRange.cpp?rev=177119&r1=177118&r2=177119&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlanStepInRange.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanStepInRange.cpp Thu Mar 14 17:00:18 2013
@@ -275,14 +275,22 @@ ThreadPlanStepInRange::FrameMatchesAvoid
const char *frame_function_name = sc.GetFunctionName().GetCString();
if (frame_function_name)
{
- bool return_value = avoid_regexp_to_use->Execute(frame_function_name);
+ size_t num_matches = 0;
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
+ if (log)
+ num_matches = 1;
+ bool return_value = avoid_regexp_to_use->Execute(frame_function_name, num_matches);
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\".",
+ {
+ std::string match;
+ avoid_regexp_to_use->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());
+ avoid_regexp_to_use->GetText(),
+ match.c_str());
+ }
}
return return_value;
More information about the lldb-commits
mailing list