]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/docs/lldb.1
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[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 - do not modify
5 .Nm lldb
6 .Nd The debugger
7 .Sh SYNOPSIS         \" Section Header - required - do not 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 - do not 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.
29 The
30 .Fl -help
31 text may be more up-to-date and
32 authoritative than the command line options described in this man
33 page.
34 .It Fl v, -version
35 Prints out the version number of the
36 .Nm
37 debugger.
38 .It Fl a, -arch Ar arch
39 Specifies which architecture
40 .Nm
41 will use when launching the specified program (assuming the provided
42 executable is built for multiple architectures.)
43 .It Fl f, -file Ar filename
44 Specifies the executable file that
45 .Nm
46 will be launching / attaching to.
47 .It Fl n, -attach-name Ar process-name
48 Specifies the name of a currently-running process to attach to.
49 (or the name of a process to wait for if
50 .Fl w
51 is used.)
52 .It Fl w, -wait-for
53 When used in concert with
54 .Fl n Ar process-name ,
55 indicates that
56 .Nm
57 should wait for a new process of that name to be started -- and attach
58 to it as early in the process-launch as possible.
59 .It Fl p, -attach-pid Ar pid
60 Specifies a currently running process that
61 .Nm
62 should attach to.
63 .It Fl c, -core Ar core-file
64 Specifies the core file to examine.
65 .It Fl l, -script-language Ar language
66 Tells the debugger to use the specified scripting language for
67 user-defined scripts, rather than the default.
68 Valid scripting
69 languages that can be specified include Python, Perl, Ruby and Tcl.
70 Currently only the Python extensions have been implemented.
71 .It Fl d, -debug
72 Tells the debugger to print out extra information for debugging itself.
73 .It Fl s, -source Ar filename
74 Tells
75 .Nm
76 to read in and execute the file
77 .Qq Ar filename ,
78 which should contain
79 .Nm
80 commands.
81 .It Fl e, -editor
82 Instructs
83 .Nm
84 to open source files using the host's "external editor" mechanism.
85 .It Fl x, -no-lldbinit
86 Do not automatically parse any '.lldbinit' files.
87 .Pp
88 (If you do not provide -f then the first argument will be the file to
89 be debugged
90 so 'lldb -- <filename> [<ARG1> [<ARG2>]]' also works.
91 Remember to end the options with "--" if any of your arguments have
92 a "-" in them.)
93 .El
94 .Sh USING LLDB
95 In
96 .Nm
97 there is a
98 .Cm help
99 command which can be used to find descriptions and examples of all
100 .Nm
101 commands.
102 To get help on
103 .Qq Cm breakpoint set
104 you would type
105 .Qq Cm help breakpoint set .
106 .Pp
107 There is also an
108 .Cm apropos
109 command which will search the help text of all commands
110 for a given term -- this is useful for locating a command by topic.
111 For instance,
112 .Qq Cm apropos breakpoint
113 will list any command that has the word
114 .Qq Cm breakpoint
115 in its help text.
116 .Sh FILES
117 .Nm
118 will read settings/aliases/commands from three files at startup, if they exist.
119 .Pp
120 First, it will read a
121 .Pa ~/.lldbinit-debugger
122 command file.
123 If you are using the
124 .Nm
125 command line interface, this is
126 .Pa ~/.lldbinit-lldb .
127 If you are using
128 .Nm
129 inside a GUI debugger like
130 .Nm Xcode
131 this will be
132 .Pa ~/.lldbinit-Xcode .
133 This is a useful place to put settings that you want to apply only when a given
134 .Nm
135 command interpreter is used.
136 .Pp
137 Second,
138 .Pa ~/.lldbinit
139 is read.
140 .Pp
141 Third, an
142 .Pa .lldbinit
143 file in the current working directory (where
144 .Nm
145 is started) will be read.
146 .Sh SEE ALSO
147 The LLDB project page http://lldb.llvm.org/ has many different resources for
148 .Nm
149 users -- the gdb/lldb command equivalence page http://lldb.llvm.org/lldb-gdb.html can
150 be especially helpful for users coming from gdb.
151 .Sh BUGS
152 To report bugs, please visit http://llvm.org/bugs/
153 .Sh AUTHOR
154 Maintained by the LLDB Team, http://lldb.llvm.org/