commands: apropos - Find a list of debugger commands related to a particular word/subject. breakpoint - operating on breakpoints. Also see _regexp-break. command - managing or customizing the debugger commands. disassemble - Disassemble bytes in the current function, or elsewhere in the executable program as specified by the user. expression - Evaluate an expression (ObjC++ or Swift) in the current program context, using user defined variables and variables currently in scope. frame - operating on the current thread's frames. language - managing language-specific functionality.'. log - operating on logs. memory - operating on memory. watchpoint - operating on watchpoints. process - operating on a process. plugin - managing or customizing plugin commands. register - commands to access thread registers. source - accessing source file information target - operating on debugger targets. thread - operating on one or more threads within a running process. type - operating on the type system script - Pass an expression to the script interpreter for evaluation and return the results. Drop into the interactive interpreter if no expression is given. settings - manipulating internal settable debugger variables. platform - manage and create platforms. gdb-remote - Connect to a remote GDB server. If no hostname is provided, localhost is assumed. kdp-remote - Connect to a remote KDP server. udp port 41139 is the default port number. bugreport - creating domain specific bugreports. gui - Switch into the curses based GUI mode. help - Show a list of all debugger commands, or give details about specific commands. version - Show version of LLDB debugger. quit - Quit out of the LLDB debugger. Current command abbreviations 'help command alias' add-dsym -- ('target symbols add') Add a debug symbol file to one of the target's current modules by specifying a path to a debug symbols file, or using the options to specify a module to download symbols for. bt -- ('_regexp-bt') Show a backtrace. An optional argument is accepted; if that argument is a number, it specifies the number of frames to display. If that argument is 'all', full backtraces of all threads are displayed. c -- ('process continue') Continue execution of all threads in the current process. di -- ('disassemble') Disassemble bytes in the current function, or elsewhere in the executable program as specified by the user. dis display -- ('_regexp-display') Add an expression evaluation stop-hook. env -- ('_regexp-env') Implements a shortcut to viewing and setting environment variables. f -- ('frame select') Select a frame by index from within the current thread and make it the current frame. file -- ('target create') Create a target using the argument as the main executable. finish -- ('thread step-out') Finish executing the function of the currently selected frame and return to its call site in specified thread (current thread, if none specified). image -- ('target modules') commands for accessing information for one or more target modules. j -- ('_regexp-jump') Sets the program counter to a new address. jump l -- ('_regexp-list') Implements the GDB 'list' command in all of its forms except FILE:FUNCTION and maps them to the appropriate 'source list' commands. list n -- ('thread step-over') Source level single step in specified thread (current thread, if none specified), stepping over calls. next s -- ('thread step-in') Source level single step in specified thread (current thread, if none specified). step ni -- ('thread step-inst-over') Single step one instruction in specified thread (current thread, if none specified), stepping over calls. nexti si -- ('thread step-inst') Single step one instruction in specified thread (current thread, if none specified). stepi -- call -- ('expression --') Evaluate an expression (ObjC++ or Swift) in the current program context, using user defined variables and variables currently in scope. p print po -- ('expression -O -- ') Evaluate an expression (ObjC++ or Swift) in the current program context, using user defined variables and variables currently in scope. r -- ('process launch -X true --') Launch the executable in the debugger. run b -- ('_regexp-break') Set a breakpoint using a regular expression to specify the location, whereFor more information on any command, typelinenum
is in decimal andaddress
is in hex. rbreak -- ('breakpoint set -r %1') Sets a breakpoint or set of breakpoints in the executable. repl -- ('expression -r -- ') Evaluate an expression (ObjC++ or Swift) in the current program context, using user defined variables and variables currently in scope. t -- ('thread select') Select a thread as the currently active thread. tbreak -- ('_regexp-tbreak') Set a one shot breakpoint using a regular expression to specify the location, wherelinenum
is in decimal andaddress
> is in hex. undisplay -- ('_regexp-undisplay') Remove an expression evaluation stop-hook. up -- ('_regexp-up') Go up "n" frames in the stack (1 frame by default). down -- ('_regexp-down') Go down "n" frames in the stack (1 frame by default). x -- ('memory read') Read from the memory of the process being debugged. attach -- ('_regexp-attach') Attach to a process id if in decimal, otherwise treat the argument as a process name to attach to. detach -- ('process detach') Detach from the current process being debugged. kill -- ('process kill') Terminate the current process being debugged. continue -- ('process continue') Continue execution of all threads in the current process. q -- ('quit') Quit out of the LLDB debugger. exit
help command-name
.
lldb -- The debugger
lldb [-hvdexw] [-a arch] [-c core-file] [-l script-language] [-s lldb-commands] [-n process-name] [-p pid] [[--]
lldb is the command line interface for the LLDB debugger library. lldb can debug C, C++, Objective-C, Objective-C++ and Swift programs.
-h |
There is also an apropos command which will search the help text of all commands for a given term - this is useful for locating a com- mand by topic. For instance, "apropos breakpoint" will list any command that has the word "breakpoint" in its help text.
~/.lldbinit-debugger
. If you are using the lldb command line interface, this is ~/.lldbinit-lldb. If
you are using lldb inside a GUI debugger like Xcode this will be ~/.lldbinit-Xcode. This is a useful place to put settings that you want
to apply only when a given lldb command interpreter is used.
~/.lldbinit
.lldbinit
in the current working directory (where lldb is started) will be read.Maintained by the LLDB Team, http://lldb.llvm.org/