LLDB-SERVER(1)
π lldb-server β the LLDB manual, but make it bestie-friendly
okay so this is the lldb-server page from the LLDB manual β yeah, LLDB Documentation, that's the one. sit down, grab a boba, we're learning β¨
πΈ SYNOPSIS πΈ
lldb-server v[ersion]
lldb-server g[dbserver] [options]
lldb-server p[latform] [options]
π DESCRIPTION π
so lldb-server is literally the server half of the LLVM debugger π«Ά it's the one doing the actual work β running and monitoring the program being debugged β while you, the main character, sit on the client side talking to it. client can be chillin' locally or connecting remotely, whatever vibes.
and good news for the lawyers in the chat: all of the code in the LLDB project is available under the Apache 2.0 License with LLVM exceptions. slay.
π COMMANDS π
the first argument to lldb-server tells it which command to run. pick one:
v[ersion]β printslldb-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 it with thegdb-remotecommand. iconic.p[latform]β runs the platform server. LLDB can then connect usingplatform select, followed byplatform connect. the two-step combo, iykyk π
π GDBSERVER COMMAND π
lldb-server g[dbserver] [options] [[host]:port] [[--] program args...]
π CONNECTION π
host:portβ the hostname and TCP port to listen on. this one's obligatory unless you're using another listening option (no skipping, bestie). ifhostis empty,localhostgets used. ifportis zero, a random port is selected and written out as specified by the--pipeor--named-pipeoptions. cute lil randomizer moment β¨--fd <fd>β communicate over the given file descriptor instead of sockets. no socket, no problem.--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β flips the whole thing: connect to the client instead of passively waiting for a connection π in this case,[host]:portdenotes the remote address to connect to.
βοΈ GENERAL OPTIONS βοΈ
--helpβ prints out the usage information and exits. the classic escape hatch.--log-channels <channel1 categories...:channel2 categories...>β 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. yes, exactly like that, don't @ me.--log-file <file>β destination file to log to. if it's empty, log tostderr.--setsidβ runlldb-serverin a new session. fresh start energy π±
π― 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 with no specific target. it can be instructed afterwards by the client to launch or attach. it's just vibing, waiting for direction π
π¦ 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, no cap.--listen <host>:<port>β hostname and port to listen on. obligatory (fr fr, you can't skip it). 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. colon-separated list of entries, each entry is a channel followed by a space-separated list of categories. same deal as before π--log-file <file>β 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. multitasking queen π
π EXAMPLES π
the server can be started in several modes, so let's run through them π
launching a new process inside the debugger β pass the path to it and the args 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. so polite of it π«Ά
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
attaching to a running process β pass --attach along with the process identifier or name. the process gets stopped immediately after starting the server. π note: terminating the server will usually cause the process to be detached and continue execution. so like, don't be surprised when it keeps going after you dip.
lldb-server g :1234 --attach 12345
lldb-server g :1234 --attach program-name
connecting to the server β use the gdb-remote command:
(lldb) gdb-remote 1234
starting with no inferior at all β lldb-server can also be started without one. in that case the client can select the target after connecting to the server. π but heads up: some commands (e.g. target create) will disconnect and launch a local lldb-server instead. plot twist.
lldb-server g :1234
(lldb) gdb-remote 1234
(lldb) process launch a.out
π SEE ALSO π
the LLDB project page https://lldb.llvm.org has so many different resources for lldb-server users. go browse, bestie, it's giving library π
π AUTHOR π
LLVM project β yeah, the whole LLVM project. collective slay.
π COPYRIGHT π
2007-2026, The LLDB Team
okay that's the whole page, you're officially educated π§ and yeah β the footer says this was the 23rd entry of the LLDB manual, dated Oct 06, 2026, so go forth, debug your little heart out, and remember: every server deserves a client that texts back πβ¨ππ¦
π¦ where this page comes from
- centos-stream 9: lldb 23.1.3-1.el9 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- centos-stream 9: lldb 23.1.3-1.el9 Β· 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