[Lldb-commits] [lldb] update lldb-server platform help parsing (PR #162730)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 23 02:53:22 PDT 2025


================
@@ -0,0 +1,41 @@
+# UNSUPPORTED: system-windows
+
+RUN: %platformserver --help 2>&1 | FileCheck %s
+RUN: %platformserver -h 2>&1 | FileCheck %s
+RUN: %lldb-server p --help 2>&1 | FileCheck %s
+RUN: %lldb-server p -h 2>&1 | FileCheck %s
+RUN: %lldb-server platform --help 2>&1 | FileCheck %s
+RUN: %lldb-server platform -h 2>&1 | FileCheck %s
+
+CHECK: OVERVIEW: lldb-server platform
+CHECK: USAGE: lldb-server {{p|platform}} [options] --listen <{{[[]}}host]:port> {{[[]}}[--] program args...]
----------------
DavidSpickett wrote:

I think you forgot to update the changes, but in any case:
* I did not realise that's how regex character `[]` worked, TIL.
* Couldn't you just write `[` here?

`{{[[]}}` is a regex `[[]` and that could be written as a non-regex `[`.

What am I missing here that needs the regex? Is `[` special to FileCheck? You have `[options]` there, and that didn't need a regex. Only certain combinations of `[...]` are special?

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


More information about the lldb-commits mailing list