summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/CommandInterpreter.cpp
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2012-08-23 00:32:22 +0000
committerJohnny Chen <johnny.chen@apple.com>2012-08-23 00:32:22 +0000
commitb417dcdbee0d46fec05dba48d56069d4d10a6b2d (patch)
treeead16a3b3ab8e5e91f800b6303d183ea7bb64dfd /lldb/source/Interpreter/CommandInterpreter.cpp
parent754a9369db5d566ec4ec14139c3276bddfbe44c8 (diff)
downloadbcm5719-llvm-b417dcdbee0d46fec05dba48d56069d4d10a6b2d.tar.gz
bcm5719-llvm-b417dcdbee0d46fec05dba48d56069d4d10a6b2d.zip
rdar://problem/12022371
Make it so that "b 245" should set a breakpoint at line 245 of the current file. Also add a simple test file. llvm-svn: 162419
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r--lldb/source/Interpreter/CommandInterpreter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index 6ae9793cbd4..7ea69a320cf 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -362,11 +362,12 @@ CommandInterpreter::LoadCommandDictionary ()
std::auto_ptr<CommandObjectRegexCommand>
break_regex_cmd_ap(new CommandObjectRegexCommand (*this,
"_regexp-break",
- "Set a breakpoint using a regular expression to specify the location.",
- "_regexp-break [<filename>:<linenum>]\n_regexp-break [<address>]\n_regexp-break <...>", 2));
+ "Set a breakpoint using a regular expression to specify the location, where <linenum> is in decimal and <address> is in hex.",
+ "_regexp-break [<filename>:<linenum>]\n_regexp-break [<linenum>]\n_regexp-break [<address>]\n_regexp-break <...>", 2));
if (break_regex_cmd_ap.get())
{
if (break_regex_cmd_ap->AddRegexCommand("^(.*[^[:space:]])[[:space:]]*:[[:space:]]*([[:digit:]]+)[[:space:]]*$", "breakpoint set --file '%1' --line %2") &&
+ break_regex_cmd_ap->AddRegexCommand("^([[:digit:]]+)[[:space:]]*$", "breakpoint set --line %1") &&
break_regex_cmd_ap->AddRegexCommand("^(0x[[:xdigit:]]+)[[:space:]]*$", "breakpoint set --address %1") &&
break_regex_cmd_ap->AddRegexCommand("^[\"']?([-+]\\[.*\\])[\"']?[[:space:]]*$", "breakpoint set --name '%1'") &&
break_regex_cmd_ap->AddRegexCommand("^$", "breakpoint list --full") &&
OpenPOWER on IntegriCloud