2010-06-10 10:48:57 +08:00
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
|
|
<link href="style.css" rel="stylesheet" type="text/css" />
|
|
|
|
<title>LLDB Homepage</title>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<div class="www_title">
|
|
|
|
The <strong>LLDB</strong> Debugger
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="container">
|
|
|
|
<div id="content">
|
2010-06-12 07:04:20 +08:00
|
|
|
|
|
|
|
<!--#include virtual="sidebar.incl"-->
|
|
|
|
|
2010-06-10 10:48:57 +08:00
|
|
|
<div id="middle">
|
|
|
|
<div class="post">
|
|
|
|
<h1 class ="postheader">What is LLDB?</h1>
|
|
|
|
<div class="postcontent">
|
|
|
|
<p>LLDB is a next generation, high-performance debugger. It is built as a set
|
|
|
|
of reusable components which highly leverage existing libraries in the
|
|
|
|
larger LLVM Project, such as the Clang expression parser and LLVM
|
|
|
|
disassembler.</p>
|
2012-02-23 02:01:09 +08:00
|
|
|
<p>LLDB is the default debugger in Xcode on Mac OS X and supports
|
|
|
|
debugging C, Objective-C and C++ on the desktop and iOS devices and simulator.</p>
|
2010-06-10 10:48:57 +08:00
|
|
|
|
|
|
|
<p>All of the code in the LLDB project is available under the standard
|
|
|
|
<a href="http://llvm.org/docs/DeveloperPolicy.html#license">LLVM
|
|
|
|
License</a>, an open source "BSD-style" license.</p>
|
|
|
|
</div>
|
|
|
|
<div class="postfooter"></div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="post">
|
|
|
|
<h1 class ="postheader">Why a new debugger?</h1>
|
|
|
|
<div class="postcontent">
|
|
|
|
<p>In order to achieve our goals we decided to start with a fresh architecture
|
|
|
|
that would support modern multi-threaded programs, handle debugging symbols
|
|
|
|
in an efficient manner, use compiler based code knowledge and have plug-in
|
|
|
|
support for functionality and extensions. Additionally we want the debugger
|
|
|
|
capabilities to be available to other analysis tools, be they scripts or
|
|
|
|
compiled programs, without requiring them to be GPL.</p>
|
|
|
|
</div>
|
|
|
|
<div class="postfooter"></div>
|
|
|
|
</div>
|
|
|
|
|
2012-02-23 02:01:09 +08:00
|
|
|
<div class="post">
|
|
|
|
<h1 class ="postheader">Compiler Integration Benefits</h1>
|
|
|
|
<div class="postcontent">
|
|
|
|
<p>LLDB currently converts debug information into clang types so that
|
|
|
|
it can leverage the clang compiler infrastructure.
|
|
|
|
This allows LLDB to support the latest C, C++, Objective C and Objective C++
|
|
|
|
language features and runtimes in expressions without having to reimplement <b>any</b>
|
|
|
|
of this functionality. It also leverages the compiler to take care of all ABI
|
|
|
|
details when making functions calls for expressions, when disassembling
|
|
|
|
instructions and extracting instruciton details, and much more.
|
|
|
|
<p>The major benefits include:</p>
|
|
|
|
<ul>
|
|
|
|
<li>Up to date language support for C, C++, Objective C</li>
|
|
|
|
<li>Multi-line expressions that can declare local variables and types</li>
|
|
|
|
<li>Utilitize the JIT for expressions when supported</li>
|
|
|
|
<li>Evaluate expression Intermediate Representation (IR) when JIT can't be used</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="post">
|
|
|
|
<h1 class ="postheader">Reusability</h1>
|
|
|
|
<div class="postcontent">
|
|
|
|
<p>The LLDB debugger APIs are exposed as a C++ object oriented interface in a shared library.
|
|
|
|
The <b>lldb</b> command line tool links to, and uses this public API. On Mac OS X the shared library
|
2012-02-23 03:02:32 +08:00
|
|
|
is exposed as a framework named <b>LLDB.framework</b>, and unix systems expose it as <b>lldb.so</b>.
|
2012-02-23 02:01:09 +08:00
|
|
|
The entire API is also then exposed through Python script bindings which allow the API to be used
|
|
|
|
within the LLDB embedded script interpreter, and also in any python script that loads the <b>lldb.py</b>
|
|
|
|
module in standard python script files. See the <a href="python-reference.html">Python Reference</a> page for more details on how
|
|
|
|
and where Python can be used with the LLDB API.</p>
|
|
|
|
<p>Sharing the LLDB API allows LLDB to not only be used for debugging, but also for symbolication,
|
|
|
|
disassembly, object and symbol file introspection, and much more.
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2010-06-10 10:48:57 +08:00
|
|
|
<div class="post">
|
|
|
|
<h1 class ="postheader">Platform Support</h1>
|
|
|
|
<div class="postcontent">
|
|
|
|
|
|
|
|
<p>LLDB is known to work on the following platforms, but ports to new
|
|
|
|
platforms are welcome:</p>
|
|
|
|
<ul>
|
2012-02-23 02:01:09 +08:00
|
|
|
<li>Mac OS X desktop user space debugging for i386 and x86-64</li>
|
|
|
|
<li>iOS simulator debugging on i386</li>
|
|
|
|
<li>iOS device debugging on ARM</li>
|
2010-06-10 10:48:57 +08:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="postfooter"></div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="post">
|
|
|
|
<h1 class ="postheader">Get it and get involved!</h1>
|
|
|
|
<div class="postcontent">
|
|
|
|
|
|
|
|
<p>To check out the code, use:</p>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li>svn co http://llvm.org/svn/llvm-project/lldb/trunk lldb</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<p>Note that LLDB currently only builds out of the box on Mac OS X with
|
|
|
|
Xcode, but patches to improve portability are definitely welcome.</p>
|
|
|
|
|
|
|
|
<p>Discussions about LLDB should go to the <a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev">lldb-dev</a> mailing
|
|
|
|
list. Commit messages for the lldb SVN module are automatically sent to the
|
|
|
|
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits">lldb-commits</a>
|
|
|
|
mailing list, and this is also the preferred mailing list for patch
|
|
|
|
submissions.</p>
|
|
|
|
</div>
|
|
|
|
<div class="postfooter"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|