index.html revision 24943d2ee8bfaa7cf5893e4709143924157a5c1e
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 2 "http://www.w3.org/TR/html4/strict.dtd"> 3<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ --> 4<html> 5<head> 6 <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> 7 <title>The LLDB Debugger</title> 8 <link type="text/css" rel="stylesheet" href="menu.css"> 9 <link type="text/css" rel="stylesheet" href="content.css"> 10</head> 11 12<body> 13<!--#include virtual="menu.html.incl"--> 14<div id="content"> 15 <!--*********************************************************************--> 16 <h1>The LLDB Debugger</h1> 17 <!--*********************************************************************--> 18 19 <p>LLDB is a next generation, high-performance debugger. It is built as a set 20 of reusable components which highly leverage existing libraries in the 21 larger LLVM Project, such as the Clang expression parser and LLVM 22 disassembler.</p> 23 <p>LLDB is in early development, but is mature enough to support basic 24 debugging scenarios on Mac OS X in C, Objective-C and C++.</p> 25 26 <p>All of the code in the LLDB project is available under the standard 27 <a href="http://llvm.org/docs/DeveloperPolicy.html#license">LLVM 28 License</a>, an open source "BSD-style" license.</p> 29 30 <!--=====================================================================--> 31 <h2 id="goals">Goals</h2> 32 <!--=====================================================================--> 33 34 <p>The current state of the art in open source debuggers are that 35 they work in the common cases for C applications, but don't 36 handle many "hard cases" properly. For example, C++ expression 37 parsing, handling overloading, templates, multi-threading, and 38 other non-trivial scenarios all work in some base cases, but 39 don't work reliably.</p> 40 41 <p>The goal of LLDB is to provide an amazing debugging experience that "just 42 works". We aim to solve these long-standing problems where debuggers get 43 confused, so that you can think about debugging your problem, not 44 about deficiencies in the debugger.</p> 45 46 <p>With a long view, there is no good reason for a debugger to 47 reinvent its own C/C++ parser, type system, know all the 48 target calling convention details, implement its own disassembler, 49 etc. By using the existing libraries vended by the LLVM 50 project, we believe that many of these problems will be defined 51 away, and the debugger can focus on important issues like 52 process control, efficient symbol reading and indexing, thread 53 management, and other debugger-specific problems.</p> 54 55 <p>Some more specific goals include:</p> 56 57 <ul> 58 <li>Build libraries for inclusion in IDEs, command line tools, and 59 other analysis tools</li> 60 <li>High performance and efficient memory use</li> 61 <li>Extensible: Python scriptable and use a plug-in architecture</li> 62 <li>Reuse existing compiler technology where it makes sense</li> 63 <li>Excellent multi-threaded debugging support</li> 64 <li>Great support for C, Objective-C and C++</li> 65 <li>Retargetable to support multiple platforms</li> 66 <li>Provide a base for debugger research and other innovation</li> 67 </ul> 68 69 <!--=====================================================================--> 70 <h2 id="why">Why a new debugger?</h2> 71 <!--=====================================================================--> 72 73 <p>In order to achieve our goals we decided to start with a fresh architecture 74 that would support modern multi-threaded programs, handle debugging symbols 75 in an efficient manner, use compiler based code knowledge and have plug-in 76 support for functionality and extensions. Additionally we want the debugger 77 capabilities to be available to other analysis tools, be they scripts or 78 compiled programs, without requiring them to be GPL.</p> 79 80 <!--=====================================================================--> 81 <h2 id="features">Features</h2> 82 <!--=====================================================================--> 83 84 <p>LLDB supports a broad variety of basic debugging features such as 85 reading DWARF, supporting step, next, finish, backtraces, etc. Some 86 more interested bits are:</p> 87 88 <ul> 89 <li>Plug-in architecture for portability and extensibility: 90 <ul> 91 <li>Object file parsers for executable file formats. Support currently 92 includes Mach-O (32 and 64-bit) & ELF (32-bit).</li> 93 <li>Object container parsers to extract object files contained within a file. 94 Support currently includes universal Mach-O files & BSD Archives. 95 </li> 96 <li>Debug symbol file parsers to incrementally extract debug information from 97 object files. Support currently includes DWARF & Mach-O symbol 98 tables.</li> 99 <li>Symbol vendor plug-ins collect data from a variety of different sources 100 for an executable object.</li> 101 <li>Disassembly plug-ins for each architecture. Support currently includes 102 an LLVM disassembler for <a 103 href="http://blog.llvm.org/2010/01/x86-disassembler.html">i386, 104 x86_64</a>, & ARM/Thumb.</li> 105 <li>Debugger plug-ins implement the host and target specific functions 106 required to debug.</li> 107 </ul> 108 <li>SWIG-generated script bridging allows Python to access and control the 109 public API of the debugger library.</li> 110 <li>A remote protocol server, debugserver, implements Mac OS X debugging on 111 i386 and x86_64.</li> 112 <li>A command line debugger - the lldb executable itself.</li> 113 <li>A framework API to the library.</li> 114 </ul> 115 116 <!--=====================================================================--> 117 <h2 id="requirements">Platform Support</h2> 118 <!--=====================================================================--> 119 120 <p>LLDB is known to work on the following platforms, but ports to new 121 platforms are welcome:</p> 122 123 <li>Machine Architectures: 124 <ul> 125 <li>Mac OS X i386 and X86-64</li> 126 </ul></li> 127 128 <!--=====================================================================--> 129 <h2 id="status">Current Status</h2> 130 <!--=====================================================================--> 131 132 <p>LLDB is in early development and supports basic debugging scenarios on 133 Mac OS X. The public API has not been finalized, and different parts are 134 at different levels of maturity. We welcome any help fleshing out missing 135 pieces and improving the code.</p> 136 137 <p>What works well:</p> 138 <ul> 139 <li>Process control, including external process control via debugserver 140 (which is included as part of the lldb project)</li> 141 <li>Breakpoints: Source-line, symbolic, C++ mangled names, module 142 scoping</li> 143 <li>Symbol reading and object file introspection</li> 144 <li>Script bridging</li> 145 <li>Thread inspection and stepping</li> 146 <li>Disassembly of i386, x86_64, & ARM/Thumb machine code, and 147 backtracing on i386 & x86_64</li> 148 <li>The basic command line prompt system, shared library tracking, 149 source listings.</li> 150 </ul> 151 152 <p>What is still pretty new:</p> 153 <ul> 154 <li>The public API to the library</li> 155 <li>Expression evaluation</li> 156 <li>Objective-C support: stepping into/over, printing the description of 157 an object ("po")</li> 158 <li>Breakpoint actions & scripts</li> 159 <li>Attaching to existing processes</li> 160 </ul> 161 162 <p>What isn't there yet:</p> 163 <ul> 164 <li>Regression test suite</li> 165 <li>Operating system support hasn't been fully modularized yet</li> 166 <li><a href="http://clang.llvm.org/docs/LanguageExtensions.html#blocks">Blocks</a> support</li> 167 <li>Calling functions in expressions</li> 168 <li>Objective-C 2.0 Support: Printing properties, synthetic properties, 169 Objective-C expressions, KVO, dynamic types, dot syntax, runtime data</li> 170 <li>C++ support: Method access, handling demangled names, dynamic types</li> 171 <li>Exception support: Breaking by name, thrown object, thrower</li> 172</li> 173 </ul> 174 175 <!--=====================================================================--> 176 <h2>Get it and get involved!</h2> 177 <!--=====================================================================--> 178 179 <p>To check out the code, use:</p> 180 181 <ul> 182 <li>svn co http://llvm.org/svn/llvm-project/lldb/trunk lldb</li> 183 </ul> 184 185 <p>Note that LLDB currently only builds out of the box on Darwin with 186 Xcode, but patches to improve portability are definitely welcome.</p> 187 188 <p>Discussions about LLDB should go to the <a 189 href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev">lldb-dev</a> mailing 190 list. Commit messages for the lldb SVN module are automatically sent to the 191 <a 192 href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits">lldb-commits</a> 193 mailing list, and this is also the preferred mailing list for patch 194 submissions.</p> 195</div> 196</body> 197</html> 198