LLDB-SERVER(1)
π LLDB-SERVER(1) π
bestie. sit down. we're talking about lldb-server, and it's literally the whole manual for it, from the LLDB docs. this is the server half of the LLVM debugger and it's genuinely iconic, no cap π
πΈ NAME πΈ
lldb-server β LLDB Documentation π«Ά
β¨ SYNOPSIS β¨
lldb-server v[ersion]
lldb-server g[dbserver] [options]
lldb-server p[latform] [options]
π DESCRIPTION π
okay so lldb-server is the server counterpart of the LLVM debugger. the server is the one running and monitoring the debugged program (main character energy, honestly), while you interface with it via a client β either one running locally, or one connecting remotely. two halves of one slay.
also, 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. that's the vibe check β first thing you say decides everything.
v[ersion]β printslldb-serverversion and exits. short, sweet, gone. π¨g[dbserver]β runs the server using the gdb-remote protocol. LLDB can afterwards connect to the server using thegdb-remotecommand.p[latform]β runs the platform server. LLDB can afterwards connect to the server usingplatform select, followed byplatform connect.
π¦ 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. if host is empty,localhostwill be used. if port is zero, a random port will be selected, and written as specified by the--pipeor--named-pipeoptions.--fd<fd> β communicate over the given file descriptor instead of sockets. not me avoiding the network entirely π--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 not waiting to be picked, she's picking π₯
π 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.
π 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 the target options are used, lldb-server is started without a specific target. it can be afterwards instructed by the client to launch or attach. lowkey mysterious of her π
π 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 vs. here-for-the-whole-party energy.--listen<host>:<port> β hostname and port to listen on. Obligatory. if 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...> β 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. this port is used for multiple connections.
β EXAMPLES β
the server can be started in several modes. pick your fighter π«Ά
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.
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. sneaky. she's got a mind of her own π
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 lurk, bestie, it's worth it π¦
πΈ Author πΈ
LLVM project π
π Copyright π
2007-2026, The LLDB Team
and that's the whole thing, fr fr. this page is from the LLDB docs β LLDB-SERVER(1) β dated Jul 16, 2026. that's the entire read, you ate it, go forth and debug π
β¨π
π¦ where this page comes from
- fedora 44: lldb 22.1.8-4.fc44 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- fedora 44: lldb 22.1.8-4.fc44 Β· 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