The LanguageType enum - (see lldb-enumerations.h) + (see lldb-enumerations.h) contains a list of every language known to LLDB. It is the one place where support for a language must live that will need to merge cleanly with core LLDB if you @@ -72,8 +72,8 @@
Add a TypeSystem for the Language
- Both Module - and Target + Both Module + and Target support the retrieval of a TypeSystem instance via GetTypeSystemForLanguage(). For Module, this method is directly on the Module instance. For Target, this is @@ -116,7 +116,7 @@ Expression Evaluation support is enabled by implementing the relevant methods on a TypeSystem-derived class. Search for "Expression" in the - TypeSystem header + TypeSystem header to find relevant methods to implement.
@@ -160,7 +160,7 @@ Your TypeSystem will need an approach for creating types based on a set of Modules. If your type info is going to come from DWARF info, you will want to subclass - DWARFASTParser. + DWARFASTParser.Building LLDB
- We first need to checkout the source trees into the appropriate locations. Both - Clang and LLDB build as subprojects of LLVM. This means we will be checking out - the source for both Clang and LLDB into the tools subdirectory of LLVM. We - will be setting up a directory hierarchy looking something like this: -
--
- llvm - | - `-- tools - | - +-- clang - | - `-- lldb -- -
- For reference, we will call the root of the LLVM project tree $llvm, and the - roots of the Clang and LLDB source trees $clang and $lldb respectively. -
-Change to the directory where you want to do development work and checkout LLVM:
-> svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
-
- Now switch to LLVM’s tools subdirectory and checkout both Clang and LLDB:
-
- > cd $llvm/tools
-
> svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
-
> svn co http://llvm.org/svn/llvm-project/lldb/trunk lldb
-
-
- - In general, building the LLDB trunk revision requires trunk revisions of both - LLVM and Clang. -
-- It is highly recommended that you build the system out of tree. Create a second - build directory and configure the LLVM project tree to your specifications as - outlined in LLVM’s Getting Started Guide. A typical build procedure - might be: -
-
- > cd $llvm/..
+ LLDB requires both LLVM and Clang to build. We first need to checkout the source tree,
+ which contains all three. Change to the directory where you want to do development
+ work and clone the repository:
+ > git clone https://github.com/llvm/llvm-project.git
+
> cd llvm-project
> mkdir build
> cd build
@@ -309,7 +272,7 @@
ninja on your system. To build using ninja:
- > cmake ../llvm -G Ninja
+ > cmake ../llvm -G Ninja -DLLVM_ENABLE_PROJECTS='clang;lldb'
> ninja lldb
> ninja check-lldb
@@ -318,7 +281,7 @@
two additional arguments to cmake before running ninja:
- > cmake ../llvm -G Ninja -DLLDB_EXPORT_ALL_SYMBOLS=1 -DCMAKE_BUILD_TYPE=Debug
+ > cmake ../llvm -G Ninja -DLLVM_ENABLE_PROJECTS='clang;lldb' -DLLDB_EXPORT_ALL_SYMBOLS=1 -DCMAKE_BUILD_TYPE=Debug
Using CMake + Unix Makefiles
If you do not have Ninja, you can still use CMake to generate Unix Makefiles that build LLDB:
Index: lldb/www/index.html
===================================================================
--- lldb/www/index.html
+++ lldb/www/index.html
@@ -110,7 +110,7 @@
To check out the code, use:
- - svn co http://llvm.org/svn/llvm-project/lldb/trunk lldb
+ - git clone https://github.com/llvm/llvm-project.git
Note that LLDB generally builds from top-of-trunk
Index: lldb/www/python-reference.html
===================================================================
--- lldb/www/python-reference.html
+++ lldb/www/python-reference.html
@@ -515,11 +515,11 @@
its operations.
There is a longer discussion of scripted thread plans and the state machine, and several interesting examples
of their use in:
- scripted_step.py
+ scripted_step.py
And for a MUCH fuller discussion of the whole state machine, see:
- ThreadPlan.h
+ ThreadPlan.h
If you are reading those comments it is useful to know that scripted thread plans are set to be
"MasterPlans", and not "OkayToDiscard".
@@ -795,7 +795,7 @@
A more interesting template has been created in the source repository that can help you to create lldb command quickly:
- cmdtemplate.py + cmdtemplate.py
A commonly required facility is being able to create a command that does some token substitution, and then runs a different debugger command
(usually, it po'es the result of an expression evaluated on its argument). For instance, given the following program:
Index: lldb/www/scripting.html
===================================================================
--- lldb/www/scripting.html
+++ lldb/www/scripting.html
@@ -160,7 +160,7 @@
objects are used, among other things, to wrap up program variables and values.
There are many useful methods defined in the SBValue class to allow you to get
information or children values out of SBValues. For complete information, see
- the header file SBValue.h. The
+ the header file SBValue.h. The
SBValue methods that we use in our DFS function are
GetChildMemberWithName()
,
GetSummary()
, and GetValue()
.
-dictionary.c - Sample dictionary program, with bug
+tree_utils.py - Example Python functions using LLDB's API, including DFS
+dictionary.c - Sample dictionary program, with bug
The text for "Romeo and Juliet" can be obtained from the Gutenberg Project (http://www.gutenberg.org).
Index: lldb/www/sidebar.incl =================================================================== --- lldb/www/sidebar.incl +++ lldb/www/sidebar.incl @@ -50,8 +50,7 @@