LLDB-SERVER(1)
π lldb-server β the LLDB docs, bestie edition
okay so this is lldb-server(1), straight out of the LLDB manual, and i'm gonna walk you through it like we're texting at 2am π«Ά no cap, it's actually so good.
β¨ NAME β¨
lldb-server β the server half of the LLVM debugger. literally the main character energy of remote debugging π
β¨ SYNOPSIS β¨
lldb-server v[ersion]
lldb-server g[dbserver] [options]
lldb-server p[latform] [options]
β¨ DESCRIPTION β¨
so lldb-server is the server counterpart of the LLVM debugger π The server is the one that runs and monitors the debugged program, while you β the user β talk to it through a client. And that client can be running locally or connecting remotely. either way, she's serving.
ngl, the license situation is actually iconic: all of the code in the LLDB project is available under the Apache 2.0 License with LLVM exceptions. periodt.
β¨ COMMANDS β¨
The first argument to lldb-server tells it which command to run. like a vibe check, but for what she's about to do:
v[ersion]β prints thelldb-serverversion and then dips. that's it, that's the whole job πg[dbserver]β runs the server using the gdb-remote protocol. after that, LLDB can connect to the server using thegdb-remotecommand. slay.p[latform]β runs the platform server. LLDB can then connect usingplatform select, followed byplatform connect. yes bestie, in that order π
πΈ GDBSERVER COMMAND πΈ
lldb-server g[dbserver] [options] [[host]:port] [[--] program args...]
π CONNECTION
host:portβ tells her the hostname and TCP port to listen on. This one is obligatory unless you're using another listening option. Ifhostis empty,localhostgets used. Ifportis zero, a random port is selected, and it gets written out as specified by the--pipeor--named-pipeoptions. cute, right? π--fd <fd>β communicate over the given file descriptor instead of sockets. no sockets, just vibes.--named-pipe <name>β write the listening port number to the specified named pipe.--pipe <fd>β write the listening port number to the specified pipe (fd).--reverse-connectβ she connects to the client instead of passively waiting for a connection. in that case,[host]:portdenotes the remote address to connect to. bold of her, honestly.
βοΈ GENERAL OPTIONS
--helpβ prints out the usage information and exits.--log-channels <channel1 categories...:channel2 categories...>β the channels to log. It's a colon-separated list of entries, and each entry starts with a channel followed by a space-separated list of categories. iykyk π--log-file <file>β the destination file to log to. If it's empty, log tostderr.--setsidβ runlldb-serverin a new session. independent queen β¨
π― TARGET SELECTION
--attach <pid-or-name>β attach to the process given by a (numeric) process id or a name.-- program argsβ launch a program for debugging.
π«Ά if neither of those target options is used, lldb-server starts up without a specific target. the client can then instruct it to launch or attach afterwards. no pressure, she's flexible.
π¦ PLATFORM COMMAND π¦
lldb-server p[latform] [options] --server --listen [[host]:port]
π CONNECTION
--serverβ run in server mode, handling multiple connections. If you don't specify this,lldb-serverwill accept only one connection and exit when it's finished. one and done, diva behavior π--listen <host>:<port>β hostname and port to listen on. Obligatory. If the port is zero, a random port will be used.--socket-file <path>β write the listening socket port number to the specified file.
βοΈ GENERAL OPTIONS
--log-channels <channel1 categories...:channel2 categories...>β the channels to log. Colon-separated list of entries; each entry starts with a channel followed by a space-separated list of categories. (yes it's the same as above, she's consistent π)--log-file <file>β the destination file to log to. If it's empty, log tostderr.
π GDB-SERVER CONNECTIONS
--gdbserver-port <port>β define a port to be used for gdb-server connections. this port is used for multiple connections. multi-tasking icon.
π EXAMPLES π
the server can be started in several modes. let's go through them, bestie:
launch a new process inside the debugger β pass the path to it and the arguments to the debugged executable as positional arguments. To disambiguate between arguments passed to lldb and arguments passed to the debugged executable, arguments starting with a - must be passed after --. The server launches the new executable and stops it immediately, waiting for the client to connect. π
lldb-server g :1234 /path/to/program program-argument -- --program-option
convenience alert β passing the executable after -- is also supported β¨
lldb-server g :1234 -- /path/to/program program-argument --program-option
attach to a running process β pass --attach along with the process identifier or name. The process gets stopped immediately after starting the server. β οΈ but note: terminating the server will usually cause the process to be detached and continue execution. so like, be aware.
lldb-server g :1234 --attach 12345
lldb-server g :1234 --attach program-name
connect to the server β use the gdb-remote command, obviously π
(lldb) gdb-remote 1234
no inferior, no problem β lldb-server can also be started without one. In that case, the client can select the target after connecting to the server. heads up though: some commands (e.g. target create) will disconnect and launch a local lldb-server instead π
lldb-server g :1234
(lldb) gdb-remote 1234
(lldb) process launch a.out
π SEE ALSO π
The LLDB project page <https://lldb.llvm.org> has many different resources for lldb-server users. go look, it's giving library of alexandria but make it debugging π
π Author
LLVM project π
Β©οΈ Copyright
2007-2026, The LLDB Team
okay that's the whole page, no notes π
this was lldb-server(1) from the LLDB manual, version 21, dated May 15, 2026 β mwah, go debug something iconic, bestie π¦β¨π
π¦ where this page comes from
- fedora 44: lldb21 21.1.8-5.fc44 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- fedora 44: lldb21 21.1.8-5.fc44 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms