After #185537, `lldb-server` would crash with an assertion because it calls`exit()` instead of returning from `main`. This means that we never get an opportunity to call `Terminate` before the static `SystemLifetimeManager` is destroyed. I could've created a static RAII object to wrap this in (similar to what Aiden did in #186133) but that's not necessary. I updated the helper functions to return an `llvm::Error` while `main_gdbserver` and `main_platform` now return an `int`. Fixes #186207
26 lines
1.3 KiB
Plaintext
26 lines
1.3 KiB
Plaintext
RUN: not %platformserver 2>&1 | FileCheck --check-prefixes=NO_LISTEN,ALL %s
|
|
NO_LISTEN: error: either --listen or --child-platform-fd is required
|
|
|
|
RUN: not %lldb-server platform --listen 2>&1 | FileCheck --check-prefixes=LISTEN_MISSING,ALL %s
|
|
LISTEN_MISSING: error: --listen: missing argument
|
|
|
|
RUN: not %lldb-server p --bogus 2>&1 | FileCheck --check-prefixes=BOGUS,ALL %s
|
|
BOGUS: error: unknown argument '--bogus'
|
|
|
|
RUN: not %platformserver --gdbserver-port 2>&1 | FileCheck --check-prefixes=GDBPORT_MISSING,ALL %s
|
|
GDBPORT_MISSING: error: --gdbserver-port: missing argument
|
|
|
|
RUN: not %platformserver --gdbserver-port notanumber --listen :1234 2>&1 | FileCheck --check-prefixes=GDBPORT_INVALID %s
|
|
GDBPORT_INVALID: error: invalid --gdbserver-port value
|
|
|
|
RUN: not %platformserver --socket-file 2>&1 | FileCheck --check-prefixes=SOCKETFILE_MISSING,ALL %s
|
|
SOCKETFILE_MISSING: error: --socket-file: missing argument
|
|
|
|
RUN: not %platformserver --log-file 2>&1 | FileCheck --check-prefixes=LOGFILE_MISSING,ALL %s
|
|
LOGFILE_MISSING: error: --log-file: missing argument
|
|
|
|
RUN: not %platformserver --log-channels 2>&1 | FileCheck --check-prefixes=LOGCHANNELS_MISSING,ALL %s
|
|
LOGCHANNELS_MISSING: error: --log-channels: missing argument
|
|
|
|
ALL: Use 'lldb-server{{(\.exe)?}} {{p|platform}} --help' for a complete list of options.
|