1255667Semaste.Dd 7 June, 2012 \" DATE 2255667Semaste.Dt LLDB 1 \" Program name and manual section number 3255667Semaste.Os Darwin \" Operating System 4255667Semaste.Sh NAME \" Section Header - required - don't modify 5255667Semaste.Nm lldb 6255667Semaste.Nd The debugger 7255667Semaste.Sh SYNOPSIS \" Section Header - required - don't modify 8255667Semaste.Nm lldb 9255667Semaste.Op Fl hvdexw 10255667Semaste.Op Fl a Ar arch 11255667Semaste.Op Fl l Ar script-language 12255667Semaste.Op Fl s Ar lldb-commands 13255667Semaste.Op Fl n Ar process-name 14255667Semaste.Op Fl p Ar pid 15255667Semaste.Ar [[--] <PROGRAM-ARG1> <PROGRAM-ARG2> ...] 16255667Semaste.Sh DESCRIPTION \" Section Header - required - don't modify 17255667Semaste.Nm 18255667Semasteis the command line interface for the LLDB debugger library. 19255667Semaste.Nm 20255667Semastecan debug C, C++, Objective-C, and Objective-C++ programs. 21255667Semaste.Pp 22255667SemasteThe following options are available: 23255667Semaste.Bl -tag -width indent 24255667Semaste.It Fl h, -help 25255667SemastePrints out the usage information for the 26255667Semaste.Nm 27255667Semastedebugger. The \fB\-\-help\fR text may be more up-to-date and 28255667Semasteauthoritative than the command line options described in this man 29255667Semastepage. 30255667Semaste.It Fl v, -version 31255667SemastePrints out the version number of the 32255667Semaste.Nm 33255667Semastedebugger. 34255667Semaste.It Fl a, -arch Ar arch 35255667SemasteSpecifies which architecture 36255667Semaste.Nm 37255667Semastewill use when launching the specified program (assuming the provided 38255667Semasteexecutable is built for multiple architectures.) 39255667Semaste.It Fl f, -file Ar filename 40255667SemasteSpecifies the executable file that 41255667Semaste.nm 42255667Semastewill be launching / attaching to. 43255667Semaste.It Fl n, -attach-name Ar process-name 44255667SemasteSpecifies the name of a currently-running process to attach to. 45255667Semaste(or the name of a process to wait for if \fB\-w\fR is used.) 46255667Semaste.It Fl w, -wait-for 47255667SemasteWhen used in concert with \&\fB\-n process-name\-E\fR, indicates that 48255667Semaste.Nm 49255667Semasteshould wait for a new process of that name to be started -- and attach 50255667Semasteto it as early in the process-launch as possible. 51255667Semaste.It Fl p, -attach-pid Ar pid 52255667SemasteSpecifies a currently running process that 53255667Semaste.Nm 54255667Semasteshould attach to. 55255667Semaste.It Fl l, -script-language Ar language 56255667SemasteTells the debugger to use the specified scripting language for 57255667Semasteuser-defined scripts, rather than the default. Valid scripting 58255667Semastelanguages that can be specified include Python, Perl, Ruby and Tcl. 59255667SemasteCurrently only the Python extensions have been implemented. 60255667Semaste.It Fl d, -debug 61255667SemasteTells the debugger to print out extra information for debugging itself. 62255667Semaste.It Fl s, -source Ar filename 63255667SemasteTells 64255667Semaste.Nm 65255667Semasteto read in and execute the file "\fBfilename\fR", which 66255667Semasteshould contain 67255667Semaste.Nm 68255667Semastecommands. 69255667Semaste.It Fl e, -editor 70255667SemasteInstructs 71255667Semaste.Nm 72255667Semasteto open source files using the host's "external editor" mechanism. 73255667Semaste.It Fl x, -no-lldbinit 74255667SemasteDo not automatically parse any '.lldbinit' files. 75255667Semaste.Pp 76255667Semaste(If you don't provide -f then the first argument will be the file to be debugged 77255667Semasteso 'lldb -- <filename> [<ARG1> [<ARG2>]]' also works. 78255667SemasteRemember to end the options with "--" if any of your arguments have a "-" in them.) 79255667Semaste.El 80255667Semaste.Sh USING LLDB 81255667SemasteIn 82255667Semaste.Nm 83255667Semastethere is a \fBhelp\fR command which can be used to find descriptions and examples of 84255667Semasteall 85255667Semaste.Nm 86255667Semastecommands. To get help on "\fBbreakpoint set\fR" you would type "\fBhelp breakpoint set\fR". 87255667Semaste.Pp 88255667SemasteThere is also an \fBapropos\fR command which will search the help text of all commands 89255667Semastefor a given term -- this is useful for locating a command by topic. For instance, "\fBapropos breakpoint\fR" 90255667Semastewill list any command that has the word \fBbreakpoint\fR in its help text. 91255667Semaste.Sh FILES 92255667Semaste.Nm 93255667Semastewill read settings/aliases/commands from three files at startup, if they exist. 94255667Semaste.Pp 95255667SemasteFirst, it will read a \fB~/.lldbinit-\fIdebugger\fR command file. If you are using the 96255667Semaste.Nm 97255667Semastecommand line interface, this is \fB~/.lldbinit-lldb\fR. If you are using 98255667Semaste.Nm 99255667Semasteinside a GUI debugger like 100255667Semaste.Nm Xcode 101255667Semastethis will be \fB~/.lldbinit-Xcode\fR. This is a useful place to put settings that you 102255667Semastewant to apply only when a given 103255667Semaste.Nm 104255667Semastecommand interpreter is used. 105255667Semaste.Pp 106255667SemasteSecond, \fB~/.lldbinit\fR is read. 107255667Semaste.Pp 108255667SemasteThird, an \fR.lldbinit\fR file in the current working directory (where 109255667Semaste.Nm 110255667Semasteis started) will be read. 111255667Semaste.Sh SEE ALSO 112255667SemasteThe LLDB project page http://lldb.llvm.org/ has many different resources for 113255667Semaste.Nm 114255667Semasteusers -- the gdb/lldb command equivalence page http://lldb.llvm.org/lldb-gdb.html can 115255667Semastebe especially helpful for users coming from gdb. 116255667Semaste.Sh BUGS 117255667SemasteTo report bugs, please visit http://llvm.org/bugs/ 118255667Semaste.Sh AUTHOR 119255667SemasteMaintained by the LLDB Team, http://lldb.llvm.org/ 120