LLDB-SERVER(1)
π LLDB-SERVER(1) π
okay bestie, welcome to the lldb-server page, straight out of the LLDB manual set β¨ this is the server-side bestie of the LLVM debugger and she is thriving.
π NAME π
lldb-server β LLDB Documentation π
β¨ SYNOPSIS β¨
lldb-server v[ersion]
lldb-server g[dbserver] [options]
lldb-server p[latform] [options]
π¦ DESCRIPTION π¦
so lldb-server is literally the server counterpart of the LLVM debugger, no cap. she runs and monitors the program being debugged while you, the user, interface with her through a client β either running locally or connecting remotely. it's giving long-distance relationship but make it debugging π
okay so important legal lore: 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 specifies a command to run. like, pick your fighter:
v[ersion]β printslldb-serverversion and exits. short and sweet, she said bye πg[dbserver]β runs the server using the gdb-remote protocol. LLDB can afterwards connect to the server using thegdb-remotecommand. iconic.p[latform]β runs the platform server. LLDB can afterwards connect to the server usingplatform select, followed byplatform connect. two-step slay β¨
πΈ GDBSERVER COMMAND πΈ
lldb-server g[dbserver] [options] [[host]:port] [[--] program args...]
π CONNECTION
host:portβ specifies the hostname and TCP port to listen on. obligatory unless another listening option is used, bestie. ifhostis empty,localhostwill be used. ifportis zero, a random port will be selected, and written as specified by--pipeor--named-pipeoptions. surprise port, but make it documented π--fd <fd>β communicate over the given file descriptor instead of sockets.--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β connect to the client instead of passively waiting for a connection. in this case,[host]:portdenotes the remote address to connect to. she's making the first move, honestly relatable π«Ά
π GENERAL OPTIONS
--helpβ prints out the usage information and exits.--log-channels <channel1 categories...:channel2 categories...>β channels to log. a colon-separated list of entries. each entry starts with a channel followed by a space-separated list of categories.--log-file <file>β destination file to log to. if empty, log tostderr.--setsidβ runlldb-serverin a new session. new session, new me π
π 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 target options are used, lldb-server is started without a specific target. it can be afterwards instructed by the client to launch or attach. she's flexible like that β¨
π§ PLATFORM COMMAND π§
lldb-server p[latform] [options] --server --listen [[host]:port]
π CONNECTION
--serverβ run in server mode, handling multiple connections. if this is not specified,lldb-serverwill accept only one connection and exit when it is finished. one-and-done energy vs. main character with a whole social calendar, your choice π--listen <host>:<port>β hostname and port to listen on. obligatory. ifportis 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...>β channels to log. a colon-separated list of entries. each entry starts with a channel followed by a space-separated list of categories.--log-file <file>β destination file to log to. if empty, log tostderr.
π₯ GDB-SERVER CONNECTIONS
--gdbserver-port <port>β define a port to be used for gdb-server connections. can be specified multiple times to allow multiple ports. has no effect if--min-gdbserver-portand--max-gdbserver-portare specified. (so those two just override her, rude but valid)--min-gdbserver-port <port>--max-gdbserver-port <port>β specify the range of ports that can be used for gdb-server connections. both options need to be specified simultaneously. overrides--gdbserver-port.--port-offset <offset>β add the specified offset to port numbers returned by server. this is useful if the server is running behind a firewall, and a range of ports is redirected to it with an offset. firewall girlies rise up π₯
π EXAMPLES π
the server can be started in several modes, and honestly each one is a vibe.
in order to 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 will launch the new executable and stop it immediately, waiting for the client to connect. so dramatic, she's literally holding the door open for you π
lldb-server g :1234 /path/to/program program-argument -- --program-option
for convenience, passing the executable after -- is also supported.
lldb-server g :1234 -- /path/to/program program-argument --program-option
in order to attach to a running process, pass --attach along with the process identifier or name. the process will be stopped immediately after starting the server. note that terminating the server will usually cause the process to be detached and continue execution.
lldb-server g :1234 --attach 12345 lldb-server g :1234 --attach program-name
use gdb-remote command to connect to the server:
(lldb) gdb-remote 1234
lldb-server can also be started without an inferior. in this case, the client can select the target after connecting to the server. note that some commands (e.g. target create) will disconnect and launch a local lldb-server instead. she said "not me being replaced by a local" π
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 read, bestie, iykyk π
βοΈ AUTHOR βοΈ
LLVM project π«Ά
Β©οΈ COPYRIGHT Β©οΈ
2007-2026, The LLDB Team
and that's the whole page, angel π this was LLDB-SERVER(1) from the LLDB manual set, page 19, dated Mar 11, 2026 β version 19 energy, still slaying. go debug something iconic, no cap. π¦β¨π
π¦ where this page comes from
- fedora 43: lldb19 19.1.7-16.fc43 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- fedora 43: lldb19 19.1.7-16.fc43 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms