summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/ThreadPlanStepInRange.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-04-03 21:37:16 +0000
committerGreg Clayton <gclayton@apple.com>2013-04-03 21:37:16 +0000
commitbc43cab51d8ceaebb0b56605f6b609ec3c0055e8 (patch)
tree5ba947cb76729bbbdb8f4bd31ce63500a41ddf3e /lldb/source/Target/ThreadPlanStepInRange.cpp
parentd3254b446211d3f1a455c4f2247dc910df68d69f (diff)
downloadbcm5719-llvm-bc43cab51d8ceaebb0b56605f6b609ec3c0055e8.tar.gz
bcm5719-llvm-bc43cab51d8ceaebb0b56605f6b609ec3c0055e8.zip
<rdar://problem/13384801>
Make lldb_private::RegularExpression thread safe everywhere. This was done by removing the m_matches array from the lldb_private::RegularExpression class and putting it into the new lldb_private::RegularExpression::Match class. When executing a regular expression you now have the option to create a lldb_private::RegularExpression::Match object and pass a pointer in if you want to get parenthesized matching. If you don't want any matching, you pass in NULL. The lldb_private::RegularExpression::Match object is initialized with the number of matches you desire. Any matching strings are now extracted from the lldb_private::RegularExpression::Match objects. This makes the regular expression objects thread safe and as a result many more regex objects were turned into static objects that end up using a local lldb_private::RegularExpression::Match object when executing. llvm-svn: 178702
Diffstat (limited to 'lldb/source/Target/ThreadPlanStepInRange.cpp')
-rw-r--r--lldb/source/Target/ThreadPlanStepInRange.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lldb/source/Target/ThreadPlanStepInRange.cpp b/lldb/source/Target/ThreadPlanStepInRange.cpp
index 36751cda58b..e6da7a037c0 100644
--- a/lldb/source/Target/ThreadPlanStepInRange.cpp
+++ b/lldb/source/Target/ThreadPlanStepInRange.cpp
@@ -279,13 +279,16 @@ ThreadPlanStepInRange::FrameMatchesAvoidRegexp ()
Log *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);
+
+ RegularExpression::Match regex_match(num_matches);
+
+ bool return_value = avoid_regexp_to_use->Execute(frame_function_name, &regex_match);
if (return_value)
{
if (log)
{
std::string match;
- avoid_regexp_to_use->GetMatchAtIndex(frame_function_name,0, 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(),
OpenPOWER on IntegriCloud