summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/CommandInterpreter.cpp
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2019-05-17 01:03:21 +0000
committerDavide Italiano <davide@freebsd.org>2019-05-17 01:03:21 +0000
commitd768ee214075e534b25b7ee8325d59a7f6b0d2b9 (patch)
tree2002c0b962bf2f6bd44be46ddb2376635d8727ae /lldb/source/Interpreter/CommandInterpreter.cpp
parent9427961c89f43a007bd6c31b195fa65f72bbd808 (diff)
downloadbcm5719-llvm-d768ee214075e534b25b7ee8325d59a7f6b0d2b9.tar.gz
bcm5719-llvm-d768ee214075e534b25b7ee8325d59a7f6b0d2b9.zip
[CommandInterpreter] Accept blanks after `all` or [0-9]+ for bt.
Previously "bt all " would've failed as the regex didn't match them. Over the shoulder review by Jonas Devlieghere. <rdar://problem/50824935> llvm-svn: 360966
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r--lldb/source/Interpreter/CommandInterpreter.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index df583bc72dc..4a132622faa 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -758,12 +758,12 @@ void CommandInterpreter::LoadCommandDictionary() {
// command if you wanted to backtrace three frames you would do "bt -c 3"
// but the intention is to have this emulate the gdb "bt" command and so
// now "bt 3" is the preferred form, in line with gdb.
- if (bt_regex_cmd_up->AddRegexCommand("^([[:digit:]]+)$",
+ if (bt_regex_cmd_up->AddRegexCommand("^([[:digit:]]+)\\s*$",
"thread backtrace -c %1") &&
- bt_regex_cmd_up->AddRegexCommand("^-c ([[:digit:]]+)$",
+ bt_regex_cmd_up->AddRegexCommand("^-c ([[:digit:]]+)\\s*$",
"thread backtrace -c %1") &&
- bt_regex_cmd_up->AddRegexCommand("^all$", "thread backtrace all") &&
- bt_regex_cmd_up->AddRegexCommand("^$", "thread backtrace")) {
+ bt_regex_cmd_up->AddRegexCommand("^all\\s*$", "thread backtrace all") &&
+ bt_regex_cmd_up->AddRegexCommand("^\\s*$", "thread backtrace")) {
CommandObjectSP command_sp(bt_regex_cmd_up.release());
m_command_dict[command_sp->GetCommandName()] = command_sp;
}
OpenPOWER on IntegriCloud