index.html revision 04720ae5361db1a0e6af189f9b1fab0e7b79aadb
1854bb53438d1e966d468795b983de79f5f5605abGreg Clayton<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2854bb53438d1e966d468795b983de79f5f5605abGreg Clayton<html xmlns="http://www.w3.org/1999/xhtml">
3854bb53438d1e966d468795b983de79f5f5605abGreg Clayton<head>
4854bb53438d1e966d468795b983de79f5f5605abGreg Clayton<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
5854bb53438d1e966d468795b983de79f5f5605abGreg Clayton<link href="style.css" rel="stylesheet" type="text/css" />
6854bb53438d1e966d468795b983de79f5f5605abGreg Clayton<title>LLDB Homepage</title>
7854bb53438d1e966d468795b983de79f5f5605abGreg Clayton</head>
8854bb53438d1e966d468795b983de79f5f5605abGreg Clayton
9854bb53438d1e966d468795b983de79f5f5605abGreg Clayton<body>
10854bb53438d1e966d468795b983de79f5f5605abGreg Clayton    <div class="www_title">
11854bb53438d1e966d468795b983de79f5f5605abGreg Clayton      The <strong>LLDB</strong> Debugger
12854bb53438d1e966d468795b983de79f5f5605abGreg Clayton    </div>
13854bb53438d1e966d468795b983de79f5f5605abGreg Clayton    
14854bb53438d1e966d468795b983de79f5f5605abGreg Clayton<div id="container">
15854bb53438d1e966d468795b983de79f5f5605abGreg Clayton	<div id="content">
161c3318a8bab749fe584139ee951d1a07e23705c2Chris Lattner        
171c3318a8bab749fe584139ee951d1a07e23705c2Chris Lattner        <!--#include virtual="sidebar.incl"-->
181c3318a8bab749fe584139ee951d1a07e23705c2Chris Lattner
19854bb53438d1e966d468795b983de79f5f5605abGreg Clayton		<div id="middle">
20854bb53438d1e966d468795b983de79f5f5605abGreg Clayton			<div class="post">
21854bb53438d1e966d468795b983de79f5f5605abGreg Clayton				<h1 class ="postheader">What is LLDB?</h1>
22854bb53438d1e966d468795b983de79f5f5605abGreg Clayton				<div class="postcontent">
23854bb53438d1e966d468795b983de79f5f5605abGreg Clayton                    <p>LLDB is a next generation, high-performance debugger. It is built as a set
24854bb53438d1e966d468795b983de79f5f5605abGreg Clayton                        of reusable components which highly leverage existing libraries in the
25854bb53438d1e966d468795b983de79f5f5605abGreg Clayton                        larger LLVM Project, such as the Clang expression parser and LLVM
26854bb53438d1e966d468795b983de79f5f5605abGreg Clayton                        disassembler.</p>
2704720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton                    <p>LLDB is the default debugger in Xcode on Mac OS X and supports
2804720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton                        debugging C, Objective-C and C++ on the desktop and iOS devices and simulator.</p>
29854bb53438d1e966d468795b983de79f5f5605abGreg Clayton
30854bb53438d1e966d468795b983de79f5f5605abGreg Clayton                    <p>All of the code in the LLDB project is available under the standard
31854bb53438d1e966d468795b983de79f5f5605abGreg Clayton                        <a href="http://llvm.org/docs/DeveloperPolicy.html#license">LLVM
32854bb53438d1e966d468795b983de79f5f5605abGreg Clayton                        License</a>, an open source "BSD-style" license.</p>
33854bb53438d1e966d468795b983de79f5f5605abGreg Clayton                </div>
34854bb53438d1e966d468795b983de79f5f5605abGreg Clayton    			<div class="postfooter"></div>
35854bb53438d1e966d468795b983de79f5f5605abGreg Clayton			</div>
36854bb53438d1e966d468795b983de79f5f5605abGreg Clayton
37854bb53438d1e966d468795b983de79f5f5605abGreg Clayton			<div class="post">
38854bb53438d1e966d468795b983de79f5f5605abGreg Clayton				<h1 class ="postheader">Why a new debugger?</h1>
39854bb53438d1e966d468795b983de79f5f5605abGreg Clayton				<div class="postcontent">
40854bb53438d1e966d468795b983de79f5f5605abGreg Clayton					  <p>In order to achieve our goals we decided to start with a fresh architecture
41854bb53438d1e966d468795b983de79f5f5605abGreg Clayton					     that would support modern multi-threaded programs, handle debugging symbols
42854bb53438d1e966d468795b983de79f5f5605abGreg Clayton					     in an efficient manner, use compiler based code knowledge and have plug-in
43854bb53438d1e966d468795b983de79f5f5605abGreg Clayton					     support for functionality and extensions. Additionally we want the debugger
44854bb53438d1e966d468795b983de79f5f5605abGreg Clayton					     capabilities to be available to other analysis tools, be they scripts or
45854bb53438d1e966d468795b983de79f5f5605abGreg Clayton					     compiled programs, without requiring them to be GPL.</p>
46854bb53438d1e966d468795b983de79f5f5605abGreg Clayton				</div>
47854bb53438d1e966d468795b983de79f5f5605abGreg Clayton				<div class="postfooter"></div>
48854bb53438d1e966d468795b983de79f5f5605abGreg Clayton			</div>
49854bb53438d1e966d468795b983de79f5f5605abGreg Clayton
50854bb53438d1e966d468795b983de79f5f5605abGreg Clayton			<div class="post">
5104720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton				<h1 class ="postheader">Compiler Integration Benefits</h1>
5204720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton				<div class="postcontent">
5304720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton						<p>LLDB currently converts debug information into clang types so that
5404720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton						it can leverage the clang compiler infrastructure.
5504720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton						This allows LLDB to support the latest C, C++, Objective C and Objective C++
5604720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton						language features and runtimes in expressions without having to reimplement <b>any</b> 
5704720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton						of this functionality. It also leverages the compiler to take care of all ABI
5804720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton						details when making functions calls for expressions, when disassembling
5904720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton						instructions and extracting instruciton details, and much more. 
6004720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton				   	<p>The major benefits include:</p>
6104720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton				   	<ul>
6204720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton					   	<li>Up to date language support for C, C++, Objective C</li>
6304720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton					   	<li>Multi-line expressions that can declare local variables and types</li>
6404720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton					   	<li>Utilitize the JIT for expressions when supported</li>
6504720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton					   	<li>Evaluate expression Intermediate Representation (IR) when JIT can't be used</li>
6604720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton				    </ul>
6704720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton				</div>
6804720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton			</div>
6904720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton
7004720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton			<div class="post">
7104720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton				<h1 class ="postheader">Reusability</h1>
7204720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton				<div class="postcontent">
7304720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton				   	<p>The LLDB debugger APIs are exposed as a C++ object oriented interface in a shared library. 
7404720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton					The <b>lldb</b> command line tool links to, and uses this public API. On Mac OS X the shared library
7504720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton					is exposed a framework name <b>LLDB.framework</b>, and unix systems expose it is <b>lldb.so</b>.
7604720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton					The entire API is also then exposed through Python script bindings which allow the API to be used
7704720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton					within the LLDB embedded script interpreter, and also in any python script that loads the <b>lldb.py</b>
7804720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton					module in standard python script files. See the <a href="python-reference.html">Python Reference</a> page for more details on how 
7904720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton					and where Python can be used with the LLDB API.</p>
8004720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton					<p>Sharing the LLDB API allows LLDB to not only be used for debugging, but also for symbolication,
8104720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton						disassembly, object and symbol file introspection, and much more.
8204720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton				</div>
8304720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton			</div>
8404720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton
8504720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton			<div class="post">
86854bb53438d1e966d468795b983de79f5f5605abGreg Clayton				<h1 class ="postheader">Platform Support</h1>
87854bb53438d1e966d468795b983de79f5f5605abGreg Clayton				<div class="postcontent">
88854bb53438d1e966d468795b983de79f5f5605abGreg Clayton
89854bb53438d1e966d468795b983de79f5f5605abGreg Clayton				   	<p>LLDB is known to work on the following platforms, but ports to new
90854bb53438d1e966d468795b983de79f5f5605abGreg Clayton				       platforms are welcome:</p>
91854bb53438d1e966d468795b983de79f5f5605abGreg Clayton				   	<ul>
9204720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton					   	<li>Mac OS X desktop user space debugging for i386 and x86-64</li>
9304720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton					   	<li>iOS simulator debugging on i386</li>
9404720ae5361db1a0e6af189f9b1fab0e7b79aadbGreg Clayton					   	<li>iOS device debugging on ARM</li>
95854bb53438d1e966d468795b983de79f5f5605abGreg Clayton				    </ul>
96854bb53438d1e966d468795b983de79f5f5605abGreg Clayton				</div>
97854bb53438d1e966d468795b983de79f5f5605abGreg Clayton				<div class="postfooter"></div>
98854bb53438d1e966d468795b983de79f5f5605abGreg Clayton			</div>
99854bb53438d1e966d468795b983de79f5f5605abGreg Clayton
100854bb53438d1e966d468795b983de79f5f5605abGreg Clayton
101854bb53438d1e966d468795b983de79f5f5605abGreg Clayton			<div class="post">
102854bb53438d1e966d468795b983de79f5f5605abGreg Clayton				<h1 class ="postheader">Get it and get involved!</h1>
103854bb53438d1e966d468795b983de79f5f5605abGreg Clayton				<div class="postcontent">
104854bb53438d1e966d468795b983de79f5f5605abGreg Clayton
105854bb53438d1e966d468795b983de79f5f5605abGreg Clayton				    <p>To check out the code, use:</p>
106854bb53438d1e966d468795b983de79f5f5605abGreg Clayton
107854bb53438d1e966d468795b983de79f5f5605abGreg Clayton				    <ul>
108854bb53438d1e966d468795b983de79f5f5605abGreg Clayton				        <li>svn co http://llvm.org/svn/llvm-project/lldb/trunk lldb</li>
109854bb53438d1e966d468795b983de79f5f5605abGreg Clayton				    </ul>
110854bb53438d1e966d468795b983de79f5f5605abGreg Clayton
111854bb53438d1e966d468795b983de79f5f5605abGreg Clayton				    <p>Note that LLDB currently only builds out of the box on Mac OS X with
112854bb53438d1e966d468795b983de79f5f5605abGreg Clayton				        Xcode, but patches to improve portability are definitely welcome.</p>
113854bb53438d1e966d468795b983de79f5f5605abGreg Clayton
114854bb53438d1e966d468795b983de79f5f5605abGreg Clayton				    <p>Discussions about LLDB should go to the <a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev">lldb-dev</a> mailing
115854bb53438d1e966d468795b983de79f5f5605abGreg Clayton				        list.  Commit messages for the lldb SVN module are automatically sent to the
116854bb53438d1e966d468795b983de79f5f5605abGreg Clayton				        <a  href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits">lldb-commits</a>
117854bb53438d1e966d468795b983de79f5f5605abGreg Clayton				        mailing list, and this is also the preferred mailing list for patch
118854bb53438d1e966d468795b983de79f5f5605abGreg Clayton				        submissions.</p>
119854bb53438d1e966d468795b983de79f5f5605abGreg Clayton			    </div>
120854bb53438d1e966d468795b983de79f5f5605abGreg Clayton				<div class="postfooter"></div>
121854bb53438d1e966d468795b983de79f5f5605abGreg Clayton			</div>
122854bb53438d1e966d468795b983de79f5f5605abGreg Clayton		</div>
123854bb53438d1e966d468795b983de79f5f5605abGreg Clayton	</div>
124854bb53438d1e966d468795b983de79f5f5605abGreg Clayton</div>
125854bb53438d1e966d468795b983de79f5f5605abGreg Clayton</body>
126854bb53438d1e966d468795b983de79f5f5605abGreg Clayton</html>