manpagez: man pages & more
man lldb(1)
Home | html | info | man

lldb(1)                   BSD General Commands Manual                  lldb(1)


     lldb -- The debugger


     lldb [-hvdexw] [-a arch] [-c core-file] [-l script-language]
          [-s lldb-commands] [-n process-name] [-p pid] [[--] <PROGRAM-ARG1>
          <PROGRAM-ARG2> ...]


     lldb is the command line interface for the LLDB debugger library.  lldb
     can debug C, C++, Objective-C, Objective-C++ and Swift programs.

     The following options are available:

     -h, --help
             Prints out the usage information for the lldb debugger.  The
             --help text may be more up-to-date and authoritative than the
             command line options described in this man page.

     -v, --version
             Prints out the version number of the lldb debugger.

     -a, --arch arch
             Specifies which architecture lldb will use when launching the
             specified program (assuming the provided executable is built for
             multiple architectures.)

     -f, --file filename
             Specifies the executable file that lldb will be launching /
             attaching to.

     -n, --attach-name process-name
             Specifies the name of a currently-running process to attach to.
             (or the name of a process to wait for if -w is used.)

     -w, --wait-for
             When used in concert with -n process-name, indicates that lldb
             should wait for a new process of that name to be started -- and
             attach to it as early in the process-launch as possible.

     -p, --attach-pid pid
             Specifies a currently running process that lldb should attach to.

     -c, --core core-file
             Specifies the core file to examine.

     -l, --script-language language
             Tells the debugger to use the specified scripting language for
             user-defined scripts, rather than the default.  Valid scripting
             languages that can be specified include Python, Perl, Ruby and
             Tcl.  Currently only the Python extensions have been implemented.

     -d, --debug
             Tells the debugger to print out extra information for debugging

     -s, --source filename
             Tells lldb to read in and execute the file "filename", which
             should contain lldb commands.

     -e, --editor
             Instructs lldb to open source files using the host's "external
             editor" mechanism.

     -x, --no-lldbinit
             Do not automatically parse any '.lldbinit' files.

             (If you do not provide -f then the first argument will be the
             file to be debugged so 'lldb -- <filename> [<ARG1> [<ARG2>]]'
             also works.  Remember to end the options with "--" if any of your
             arguments have a "-" in them.)


     In lldb there is a help command which can be used to find descriptions
     and examples of all lldb commands.  To get help on "breakpoint set" you
     would type "help breakpoint set".

     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 command by
     topic.  For instance, "apropos breakpoint" will list any command that has
     the word "breakpoint" in its help text.


     lldb will read settings/aliases/commands from three files at startup, if
     they exist.

     First, it will read a ~/.lldbinit-debugger command file.  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.

     Second, ~/.lldbinit is read.

     Third, an .lldbinit file in the current working directory (where lldb is
     started) will be read.


     The LLDB project page has many different resources
     for lldb users -- the gdb/lldb command equivalence page can be especially helpful for users
     coming from gdb.


     To report bugs, please visit


     Maintained by the LLDB Team,

BSD                            December 16, 2015                           BSD

Mac OS X 10.11.6 - Generated Thu Feb 2 18:14:00 CST 2017
© 2000-2021
Individual documents may contain additional copyright information.