1.Dd 7 June, 2012 \" DATE 2.Dt LLDB 1 \" Program name and manual section number 3.Os Darwin \" Operating System 4.Sh NAME \" Section Header - required - don't modify 5.Nm lldb 6.Nd The debugger 7.Sh SYNOPSIS \" Section Header - required - don't modify 8.Nm lldb 9.Op Fl hvdexw 10.Op Fl a Ar arch 11.Op Fl l Ar script-language 12.Op Fl s Ar lldb-commands 13.Op Fl n Ar process-name 14.Op Fl p Ar pid 15.Ar [[--] <PROGRAM-ARG1> <PROGRAM-ARG2> ...] 16.Sh DESCRIPTION \" Section Header - required - don't modify 17.Nm 18is the command line interface for the LLDB debugger library. 19.Nm 20can debug C, C++, Objective-C, and Objective-C++ programs. 21.Pp 22The following options are available: 23.Bl -tag -width indent 24.It Fl h, -help 25Prints out the usage information for the 26.Nm 27debugger. The \fB\-\-help\fR text may be more up-to-date and 28authoritative than the command line options described in this man 29page. 30.It Fl v, -version 31Prints out the version number of the 32.Nm 33debugger. 34.It Fl a, -arch Ar arch 35Specifies which architecture 36.Nm 37will use when launching the specified program (assuming the provided 38executable is built for multiple architectures.) 39.It Fl f, -file Ar filename 40Specifies the executable file that 41.nm 42will be launching / attaching to. 43.It Fl n, -attach-name Ar process-name 44Specifies the name of a currently-running process to attach to. 45(or the name of a process to wait for if \fB\-w\fR is used.) 46.It Fl w, -wait-for 47When used in concert with \&\fB\-n process-name\-E\fR, indicates that 48.Nm 49should wait for a new process of that name to be started -- and attach 50to it as early in the process-launch as possible. 51.It Fl p, -attach-pid Ar pid 52Specifies a currently running process that 53.Nm 54should attach to. 55.It Fl l, -script-language Ar language 56Tells the debugger to use the specified scripting language for 57user-defined scripts, rather than the default. Valid scripting 58languages that can be specified include Python, Perl, Ruby and Tcl. 59Currently only the Python extensions have been implemented. 60.It Fl d, -debug 61Tells the debugger to print out extra information for debugging itself. 62.It Fl s, -source Ar filename 63Tells 64.Nm 65to read in and execute the file "\fBfilename\fR", which 66should contain 67.Nm 68commands. 69.It Fl e, -editor 70Instructs 71.Nm 72to open source files using the host's "external editor" mechanism. 73.It Fl x, -no-lldbinit 74Do not automatically parse any '.lldbinit' files. 75.Pp 76(If you don't provide -f then the first argument will be the file to be debugged 77so 'lldb -- <filename> [<ARG1> [<ARG2>]]' also works. 78Remember to end the options with "--" if any of your arguments have a "-" in them.) 79.El 80.Sh USING LLDB 81In 82.Nm 83there is a \fBhelp\fR command which can be used to find descriptions and examples of 84all 85.Nm 86commands. To get help on "\fBbreakpoint set\fR" you would type "\fBhelp breakpoint set\fR". 87.Pp 88There is also an \fBapropos\fR command which will search the help text of all commands 89for a given term -- this is useful for locating a command by topic. For instance, "\fBapropos breakpoint\fR" 90will list any command that has the word \fBbreakpoint\fR in its help text. 91.Sh FILES 92.Nm 93will read settings/aliases/commands from three files at startup, if they exist. 94.Pp 95First, it will read a \fB~/.lldbinit-\fIdebugger\fR command file. If you are using the 96.Nm 97command line interface, this is \fB~/.lldbinit-lldb\fR. If you are using 98.Nm 99inside a GUI debugger like 100.Nm Xcode 101this will be \fB~/.lldbinit-Xcode\fR. This is a useful place to put settings that you 102want to apply only when a given 103.Nm 104command interpreter is used. 105.Pp 106Second, \fB~/.lldbinit\fR is read. 107.Pp 108Third, an \fR.lldbinit\fR file in the current working directory (where 109.Nm 110is started) will be read. 111.Sh SEE ALSO 112The LLDB project page http://lldb.llvm.org/ has many different resources for 113.Nm 114users -- the gdb/lldb command equivalence page http://lldb.llvm.org/lldb-gdb.html can 115be especially helpful for users coming from gdb. 116.Sh BUGS 117To report bugs, please visit http://llvm.org/bugs/ 118.Sh AUTHOR 119Maintained by the LLDB Team, http://lldb.llvm.org/ 120