[Lldb-commits] [lldb] [lldb] Support any flag to _regexp-bt (PR #116260)

via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 14 10:02:57 PST 2024


================
@@ -851,8 +851,7 @@ void CommandInterpreter::LoadCommandDictionary() {
     // now "bt 3" is the preferred form, in line with gdb.
     if (bt_regex_cmd_up->AddRegexCommand("^([[:digit:]]+)[[:space:]]*$",
                                          "thread backtrace -c %1") &&
-        bt_regex_cmd_up->AddRegexCommand("^-c ([[:digit:]]+)[[:space:]]*$",
----------------
jimingham wrote:

`.` captures spaces, so this would mean:

_regex_bt -<RET>

would be rejected, but

_regex_bt -<SPACE><RET>

would not but then would fail since `thread backtrace -` isn't valid.  That would be odd.  

Instead of .+ this should be  [[^:space:]]+

Other than that, LGTM.

https://github.com/llvm/llvm-project/pull/116260


More information about the lldb-commits mailing list