summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter
diff options
context:
space:
mode:
authorStella Stamenova <stilis@microsoft.com>2019-05-17 18:52:42 +0000
committerStella Stamenova <stilis@microsoft.com>2019-05-17 18:52:42 +0000
commit5bac70634326af3fd753d891ae8b8c756f46a2a0 (patch)
treeb80db3978ad23570f041f10f850a32e8a479604e /lldb/source/Interpreter
parentbf161e67838a31180569abdcc58f9e9e0285b625 (diff)
downloadbcm5719-llvm-5bac70634326af3fd753d891ae8b8c756f46a2a0.tar.gz
bcm5719-llvm-5bac70634326af3fd753d891ae8b8c756f46a2a0.zip
[CommandInterpreter] Fix trailing blanks after `all` or [0-9]+ for bt
The change that was committed for this used \\s to match spaces which does not work correctly on all platforms. Using [:space:] makes the test pass on both Linux and Windows llvm-svn: 361064
Diffstat (limited to 'lldb/source/Interpreter')
-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 4a132622faa..ae4ba9aac30 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:]]+)\\s*$",
+ if (bt_regex_cmd_up->AddRegexCommand("^([[:digit:]]+)[[:space:]]*$",
"thread backtrace -c %1") &&
- bt_regex_cmd_up->AddRegexCommand("^-c ([[:digit:]]+)\\s*$",
+ bt_regex_cmd_up->AddRegexCommand("^-c ([[:digit:]]+)[[:space:]]*$",
"thread backtrace -c %1") &&
- bt_regex_cmd_up->AddRegexCommand("^all\\s*$", "thread backtrace all") &&
- bt_regex_cmd_up->AddRegexCommand("^\\s*$", "thread backtrace")) {
+ bt_regex_cmd_up->AddRegexCommand("^all[[:space:]]*$", "thread backtrace all") &&
+ bt_regex_cmd_up->AddRegexCommand("^[[:space:]]*$", "thread backtrace")) {
CommandObjectSP command_sp(bt_regex_cmd_up.release());
m_command_dict[command_sp->GetCommandName()] = command_sp;
}
OpenPOWER on IntegriCloud