LLDB-SERVER(1)

๐Ÿ“ฆ
version 20.1.8 ยท 4 versions
, in fedora 43, fedora 44

โœจ LLDB-SERVER(1) โ€” the lldb-server glow-up โœจ

okay bestie, welcome to LLDB-SERVER(1), aka the manual page for lldb-server from the LLDB crew ๐Ÿ’– this is the whole thing, nothing skipped, let's go ๐Ÿซถ


๐ŸŒธ NAME ๐ŸŒธ

lldb-server โ€” LLDB Documentation. that's it, that's the name, iconic ๐Ÿ’…


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

lldb-server v[ersion]
lldb-server g[dbserver] [options]
lldb-server p[latform] [options]

๐Ÿ’œ DESCRIPTION ๐Ÿ’œ

lldb-server is the server counterpart of the LLVM debugger, no cap. The server is the one that runs and monitors the debugged program, while you (the user) vibe with it through a client โ€” either running locally or connecting remotely. it's giving long-distance relationship but make it debugging ๐Ÿ˜ญ

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. main character decision energy.

  • v[ersion] โ€” Prints lldb-server version and exits. short and sweet, a little goodbye kiss ๐Ÿ’‹
  • g[dbserver] โ€” Runs the server using the gdb-remote protocol. LLDB can afterwards connect to the server using the gdb-remote command. the classic route, fr fr.
  • p[latform] โ€” Runs the platform server. LLDB can afterwards connect to the server using platform select, followed by platform connect. fancy platform girlies rise up ๐ŸŒˆ

๐Ÿ”ฅ 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, localhost will be used. If port is zero, a random port will be selected, and written as specified by --pipe or --named-pipe options. slay, autopick.
  • --fd <fd> โ€” Communicate over the given file descriptor instead of sockets. not like other girls (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]:port denotes the remote address to connect to. she's making the first move, obsessed ๐Ÿ’…

๐ŸŽ€ GENERAL OPTIONS ๐ŸŽ€

  • --help โ€” Prints out the usage information and exits. the "what does this button do" option ๐Ÿซถ
  • --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 to stderr.
  • --setsid โ€” Run lldb-server in 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. indecisive queen energy, and we respect it ๐Ÿ’–


๐Ÿงš 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-server will accept only one connection and exit when it is finished. one-and-done vs. social butterfly, pick your vibe.
  • --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 to stderr.

๐Ÿฆ‹ 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. choose 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 bestie: terminating the server will usually cause the process to be detached and continue execution. she'll keep going without you ๐Ÿ˜ญ
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.

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 many different resources for lldb-server users. go read, bestie, iykyk ๐Ÿ“š


๐Ÿ’– AUTHOR ๐Ÿ’–

LLVM project ๐Ÿ‘‘


2007-2025, The LLDB Team ๐Ÿ’œ


and that's a wrap on LLDB-SERVER(1) from the LLDB manual, dated Sep 03, 2025 (page 20, for the record-keepers ๐Ÿซถ). stan a debugger server. bye bestie, go debug something gorgeous ๐Ÿ’…โœจ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from