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