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

Chad Smith via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 23 07:54:26 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...]
----------------
cs01 wrote:

The actual help text looks like this:

```
> ./bin/lldb-server p -h
OVERVIEW: lldb-server platform

USAGE: lldb-server p [options] --listen <[host]:port> [[--] program args...]
```

The regex is only needed with the double brackets, so there were a couple that were unnecesary. Should be fixed now. 

It's only needed at the `[[--]` part because `[[` is interpreted by FileCheck as variable substitution. For example in `cross-project-tests/dtlto/link-archive-thin.test` PID is substituted:
```
## JSON jobs description.
OUTPUTS-DAG: my.[[PID:[a-zA-Z0-9_]+]].dist-file.json

## Individual summary index files.
OUTPUTS-DAG: start.1.[[PID]].native.o.thinlto.bc{{$}}
OUTPUTS-DAG:   dog.2.[[PID]].native.o.thinlto.bc{{$}}
OUTPUTS-DAG:   foo.3.[[PID]].native.o.thinlto.bc{{$}}
OUTPUTS-DAG:   bar.4.[[PID]].native.o.thinlto.bc{{$}}
```

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


More information about the lldb-commits mailing list