2014-11-24 23:01:11 +08:00
|
|
|
.Dd June 7, 2012 \" DATE
|
2012-06-08 11:34:09 +08:00
|
|
|
.Dt LLDB 1 \" Program name and manual section number
|
2015-07-31 22:26:15 +08:00
|
|
|
.Os
|
2014-11-24 23:01:11 +08:00
|
|
|
.Sh NAME \" Section Header - required - don't modify
|
2012-06-08 11:34:09 +08:00
|
|
|
.Nm lldb
|
|
|
|
.Nd The debugger
|
|
|
|
.Sh SYNOPSIS \" Section Header - required - don't modify
|
|
|
|
.Nm lldb
|
|
|
|
.Op Fl hvdexw
|
|
|
|
.Op Fl a Ar arch
|
|
|
|
.Op Fl l Ar script-language
|
|
|
|
.Op Fl s Ar lldb-commands
|
|
|
|
.Op Fl n Ar process-name
|
|
|
|
.Op Fl p Ar pid
|
|
|
|
.Ar [[--] <PROGRAM-ARG1> <PROGRAM-ARG2> ...]
|
|
|
|
.Sh DESCRIPTION \" Section Header - required - don't modify
|
|
|
|
.Nm
|
2014-11-24 23:01:11 +08:00
|
|
|
is the command line interface for the LLDB debugger library.
|
2012-06-08 11:34:09 +08:00
|
|
|
.Nm
|
|
|
|
can debug C, C++, Objective-C, and Objective-C++ programs.
|
|
|
|
.Pp
|
|
|
|
The following options are available:
|
|
|
|
.Bl -tag -width indent
|
2014-11-24 23:01:11 +08:00
|
|
|
.It Fl h, -help
|
|
|
|
Prints out the usage information for the
|
2012-06-08 11:34:09 +08:00
|
|
|
.Nm
|
2015-07-31 22:26:15 +08:00
|
|
|
debugger. The
|
|
|
|
.Fl -help
|
|
|
|
text may be more up-to-date and
|
2012-06-09 07:49:32 +08:00
|
|
|
authoritative than the command line options described in this man
|
|
|
|
page.
|
2014-11-24 23:01:11 +08:00
|
|
|
.It Fl v, -version
|
|
|
|
Prints out the version number of the
|
|
|
|
.Nm
|
2012-06-08 11:34:09 +08:00
|
|
|
debugger.
|
|
|
|
.It Fl a, -arch Ar arch
|
2014-11-24 23:01:11 +08:00
|
|
|
Specifies which architecture
|
2012-06-08 11:34:09 +08:00
|
|
|
.Nm
|
|
|
|
will use when launching the specified program (assuming the provided
|
|
|
|
executable is built for multiple architectures.)
|
|
|
|
.It Fl f, -file Ar filename
|
|
|
|
Specifies the executable file that
|
2014-11-24 23:01:11 +08:00
|
|
|
.Nm
|
2012-06-08 11:34:09 +08:00
|
|
|
will be launching / attaching to.
|
|
|
|
.It Fl n, -attach-name Ar process-name
|
|
|
|
Specifies the name of a currently-running process to attach to.
|
2015-07-31 22:26:15 +08:00
|
|
|
(or the name of a process to wait for if
|
|
|
|
.Fl w
|
|
|
|
is used.)
|
2012-06-08 11:34:09 +08:00
|
|
|
.It Fl w, -wait-for
|
2015-07-31 22:26:15 +08:00
|
|
|
When used in concert with
|
|
|
|
.Fl n Ar process-name ,
|
|
|
|
indicates that
|
2012-06-08 11:34:09 +08:00
|
|
|
.Nm
|
|
|
|
should wait for a new process of that name to be started -- and attach
|
|
|
|
to it as early in the process-launch as possible.
|
|
|
|
.It Fl p, -attach-pid Ar pid
|
|
|
|
Specifies a currently running process that
|
|
|
|
.Nm
|
|
|
|
should attach to.
|
|
|
|
.It Fl l, -script-language Ar 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.
|
|
|
|
.It Fl d, -debug
|
|
|
|
Tells the debugger to print out extra information for debugging itself.
|
|
|
|
.It Fl s, -source Ar filename
|
2014-11-24 23:01:11 +08:00
|
|
|
Tells
|
2012-06-08 11:34:09 +08:00
|
|
|
.Nm
|
2015-07-31 22:26:15 +08:00
|
|
|
to read in and execute the file
|
|
|
|
.Qq Ar filename ,
|
|
|
|
which should contain
|
2012-06-08 11:34:09 +08:00
|
|
|
.Nm
|
|
|
|
commands.
|
|
|
|
.It Fl e, -editor
|
|
|
|
Instructs
|
|
|
|
.Nm
|
|
|
|
to open source files using the host's "external editor" mechanism.
|
|
|
|
.It Fl x, -no-lldbinit
|
|
|
|
Do not automatically parse any '.lldbinit' files.
|
|
|
|
.Pp
|
|
|
|
(If you don't 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.)
|
|
|
|
.El
|
2012-06-09 07:49:32 +08:00
|
|
|
.Sh USING LLDB
|
|
|
|
In
|
|
|
|
.Nm
|
2015-07-31 22:26:15 +08:00
|
|
|
there is a
|
|
|
|
.Cm help
|
|
|
|
command which can be used to find descriptions and examples of all
|
2012-06-09 07:49:32 +08:00
|
|
|
.Nm
|
2015-07-31 22:26:15 +08:00
|
|
|
commands. To get help on
|
|
|
|
.Qq Cm breakpoint set
|
|
|
|
you would type
|
|
|
|
.Qq Cm help breakpoint set .
|
2012-06-09 07:49:32 +08:00
|
|
|
.Pp
|
2015-07-31 22:26:15 +08:00
|
|
|
There is also an
|
|
|
|
.Cm 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,
|
|
|
|
.Qq Cm apropos breakpoint
|
|
|
|
will list any command that has the word
|
|
|
|
.Qq Cm breakpoint
|
|
|
|
in its help text.
|
2012-06-09 07:49:32 +08:00
|
|
|
.Sh FILES
|
|
|
|
.Nm
|
|
|
|
will read settings/aliases/commands from three files at startup, if they exist.
|
|
|
|
.Pp
|
2015-07-31 22:26:15 +08:00
|
|
|
First, it will read a
|
|
|
|
.Pa ~/.lldbinit-debugger
|
|
|
|
command file. If you are using the
|
2012-06-09 07:49:32 +08:00
|
|
|
.Nm
|
2015-07-31 22:26:15 +08:00
|
|
|
command line interface, this is
|
|
|
|
.Pa ~/.lldbinit-lldb .
|
|
|
|
If you are using
|
2012-06-09 07:49:32 +08:00
|
|
|
.Nm
|
|
|
|
inside a GUI debugger like
|
|
|
|
.Nm Xcode
|
2015-07-31 22:26:15 +08:00
|
|
|
this will be
|
|
|
|
.Pa ~/.lldbinit-Xcode .
|
|
|
|
This is a useful place to put settings that you want to apply only when a given
|
2012-06-09 07:49:32 +08:00
|
|
|
.Nm
|
|
|
|
command interpreter is used.
|
|
|
|
.Pp
|
2015-07-31 22:26:15 +08:00
|
|
|
Second,
|
|
|
|
.Pa ~/.lldbinit
|
|
|
|
is read.
|
2012-06-09 07:49:32 +08:00
|
|
|
.Pp
|
2015-07-31 22:26:15 +08:00
|
|
|
Third, an
|
|
|
|
.Pa .lldbinit
|
|
|
|
file in the current working directory (where
|
2012-06-09 07:49:32 +08:00
|
|
|
.Nm
|
|
|
|
is started) will be read.
|
2012-06-08 11:34:09 +08:00
|
|
|
.Sh SEE ALSO
|
|
|
|
The LLDB project page http://lldb.llvm.org/ has many different resources for
|
|
|
|
.Nm
|
|
|
|
users -- the gdb/lldb command equivalence page http://lldb.llvm.org/lldb-gdb.html can
|
|
|
|
be especially helpful for users coming from gdb.
|
|
|
|
.Sh BUGS
|
|
|
|
To report bugs, please visit http://llvm.org/bugs/
|
|
|
|
.Sh AUTHOR
|
|
|
|
Maintained by the LLDB Team, http://lldb.llvm.org/
|