Added a new regular expression to the "_regexp-break" command ("b" by default):
authorGreg Clayton <gclayton@apple.com>
Mon, 1 Dec 2014 22:34:03 +0000 (22:34 +0000)
committerGreg Clayton <gclayton@apple.com>
Mon, 1 Dec 2014 22:34:03 +0000 (22:34 +0000)
(lldb) b /break here/

This will set a source level regular expression breakpoint on any text between the first '/' and the last '/'. The equivalent command will be:

(lldb) breakpoint set --source-pattern-regexp 'break here'

llvm-svn: 223082

lldb/source/Interpreter/CommandInterpreter.cpp

index 3580bdb..895106a 100644 (file)
@@ -424,6 +424,7 @@ CommandInterpreter::LoadCommandDictionary ()
     m_command_dict["watchpoint"]= CommandObjectSP (new CommandObjectMultiwordWatchpoint (*this));
 
     const char *break_regexes[][2] = {{"^(.*[^[:space:]])[[:space:]]*:[[:space:]]*([[:digit:]]+)[[:space:]]*$", "breakpoint set --file '%1' --line %2"},
+                                      {"^/([^/]+)/$", "breakpoint set --source-pattern-regexp '%1'"},
                                       {"^([[:digit:]]+)[[:space:]]*$", "breakpoint set --line %1"},
                                       {"^\\*?(0x[[:xdigit:]]+)[[:space:]]*$", "breakpoint set --address %1"},
                                       {"^[\"']?([-+]?\\[.*\\])[\"']?[[:space:]]*$", "breakpoint set --name '%1'"},