[Lldb-commits] [lldb] r183476 - Make the "SearchFilterByModuleListAndCU" work correctly for searches at the CompUnit

Jim Ingham jingham at apple.com
Thu Jun 6 18:13:00 PDT 2013


Author: jingham
Date: Thu Jun  6 20:13:00 2013
New Revision: 183476

URL: http://llvm.org/viewvc/llvm-project?rev=183476&view=rev
Log:
Make the "SearchFilterByModuleListAndCU" work correctly for searches at the CompUnit
level.  Fixes a bug in "break set --source-pattern-regexp" when a shared library is
specified.  

Also cleaned up the help text for --source-pattern-regexp so it is a little clearer.

<rdar://problem/14084261>

Modified:
    lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
    lldb/trunk/source/Core/SearchFilter.cpp

Modified: lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp?rev=183476&r1=183475&r2=183476&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp Thu Jun  6 20:13:00 2013
@@ -667,7 +667,9 @@ CommandObjectBreakpointSet::CommandOptio
         "Can be repeated multiple times to make one breakpoint for multiple symbols." },
 
     { LLDB_OPT_SET_9, true, "source-pattern-regexp", 'p', required_argument, NULL, 0, eArgTypeRegularExpression,
-        "Set the breakpoint specifying a regular expression to match a pattern in the source text in a given source file." },
+        "Set the breakpoint by specifying a regular expression which is matched against the source text in a source file or files "
+        "specified with the -f option.  The -f option can be specified more than once.  "
+        "If no source files are specified, uses the current \"default source file\"" },
 
     { LLDB_OPT_SET_10, true, "language-exception", 'E', required_argument, NULL, 0, eArgTypeLanguage,
         "Set the breakpoint on exceptions thrown by the specified language (without options, on throw but not catch.)" },

Modified: lldb/trunk/source/Core/SearchFilter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/SearchFilter.cpp?rev=183476&r1=183475&r2=183476&view=diff
==============================================================================
--- lldb/trunk/source/Core/SearchFilter.cpp (original)
+++ lldb/trunk/source/Core/SearchFilter.cpp Thu Jun  6 20:13:00 2013
@@ -688,7 +688,20 @@ SearchFilterByModuleListAndCU::CompUnitP
 bool
 SearchFilterByModuleListAndCU::CompUnitPasses (CompileUnit &compUnit)
 {
-    return m_cu_spec_list.FindFileIndex(0, compUnit, false) != UINT32_MAX;
+    bool in_cu_list = m_cu_spec_list.FindFileIndex(0, compUnit, false) != UINT32_MAX;
+    if (in_cu_list)
+    {
+        ModuleSP module_sp(compUnit.GetModule());
+        if (module_sp)
+        {
+            bool module_passes = SearchFilterByModuleList::ModulePasses(module_sp);
+            return module_passes;
+        }
+        else
+            return true;
+    }
+    else
+        return false;
 }
 
 void





More information about the lldb-commits mailing list