From c7efed60efa205d0f4715cabb3b1452dcf0e6fb8 Mon Sep 17 00:00:00 2001 From: Charlie Turner Date: Sat, 24 Jan 2015 21:51:21 +0000 Subject: [PATCH] Fixup debug information references. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227020 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/tutorial/LangImpl1.rst | 9 ++++++++- docs/tutorial/LangImpl7.rst | 2 +- docs/tutorial/LangImpl9.rst | 13 ++++--------- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/docs/tutorial/LangImpl1.rst b/docs/tutorial/LangImpl1.rst index 3333ce8706f..f4b019166af 100644 --- a/docs/tutorial/LangImpl1.rst +++ b/docs/tutorial/LangImpl1.rst @@ -73,7 +73,14 @@ in the various pieces. The structure of the tutorial is: about this is how easy and trivial it is to construct SSA form in LLVM: no, LLVM does *not* require your front-end to construct SSA form! -- `Chapter #8 `_: Conclusion and other useful LLVM +- `Chapter #8 `_: Extending the Language: Debug + Information - Having built a decent little programming language with + control flow, functions and mutable variables, we consider what it + takes to add debug information to standalone executables. This debug + information will allow you to set breakpoints in Kaleidoscope + functions, print out argument variables, and call functions - all + from within the debugger! +- `Chapter #9 `_: Conclusion and other useful LLVM tidbits - This chapter wraps up the series by talking about potential ways to extend the language, but also includes a bunch of pointers to info about "special topics" like adding garbage diff --git a/docs/tutorial/LangImpl7.rst b/docs/tutorial/LangImpl7.rst index 141f1389630..7c2c4c41719 100644 --- a/docs/tutorial/LangImpl7.rst +++ b/docs/tutorial/LangImpl7.rst @@ -856,5 +856,5 @@ Here is the code: .. literalinclude:: ../../examples/Kaleidoscope/Chapter7/toy.cpp :language: c++ -`Next: Conclusion and other useful LLVM tidbits `_ +`Next: Extending the Language: Debug Information `_ diff --git a/docs/tutorial/LangImpl9.rst b/docs/tutorial/LangImpl9.rst index c5140a12e5c..33987687dee 100644 --- a/docs/tutorial/LangImpl9.rst +++ b/docs/tutorial/LangImpl9.rst @@ -14,9 +14,10 @@ grown our little Kaleidoscope language from being a useless toy, to being a semi-interesting (but probably still useless) toy. :) It is interesting to see how far we've come, and how little code it has -taken. We built the entire lexer, parser, AST, code generator, and an -interactive run-loop (with a JIT!) by-hand in under 1000 lines of -(non-comment/non-blank) code. +taken. We built the entire lexer, parser, AST, code generator, an +interactive run-loop (with a JIT!), and emitted debug information in +standalone executables - all in under 1000 lines of (non-comment/non-blank) +code. Our little language supports a couple of interesting features: it supports user defined binary and unary operators, it uses JIT @@ -68,12 +69,6 @@ For example, try adding: collection, note that LLVM fully supports `Accurate Garbage Collection <../GarbageCollection.html>`_ including algorithms that move objects and need to scan/update the stack. -- **debugger support** - LLVM supports generation of `DWARF Debug - info <../SourceLevelDebugging.html>`_ which is understood by common - debuggers like GDB. Adding support for debug info is fairly - straightforward. The best way to understand it is to compile some - C/C++ code with "``clang -g -O0``" and taking a look at what it - produces. - **exception handling support** - LLVM supports generation of `zero cost exceptions <../ExceptionHandling.html>`_ which interoperate with code compiled in other languages. You could also generate code by