[Lldb-commits] [lldb] r223082 - Added a new regular expression to the "_regexp-break" command ("b" by default):

Greg Clayton gclayton at apple.com
Mon Dec 1 14:34:03 PST 2014


Author: gclayton
Date: Mon Dec  1 16:34:03 2014
New Revision: 223082

URL: http://llvm.org/viewvc/llvm-project?rev=223082&view=rev
Log:
Added a new regular expression to the "_regexp-break" command ("b" by default):

(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'


Modified:
    lldb/trunk/source/Interpreter/CommandInterpreter.cpp

Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=223082&r1=223081&r2=223082&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Mon Dec  1 16:34:03 2014
@@ -424,6 +424,7 @@ CommandInterpreter::LoadCommandDictionar
     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'"},





More information about the lldb-commits mailing list