9. Kaleidoscope: Adding Debug Information — LLVM 20.0.0git documentation
Welcome to Chapter 9 of the “Implementing a language with LLVM” tutorial. In chapters 1 through 8, we’ve built a decent little programming language with functions and variables. What happens if something goes wrong though, how do you debug your program? Source level debugging uses formatted data that helps a debugger translate from binary and the state of the machine back to the source that the programmer wrote. In LLVM we generally use a format called DWARF. DWARF is a compact encoding that represents types, source locations, and variable locations. The short summary of this chapter is that we’ll go through the various things you have to add to a programming language to support debug info, and how you translate that into DWARF. Caveat: For now we can’t debug via the JIT, so we’ll need to compile our program down to something small and standalone. As part of this we’ll make a few modifications to the running of the language and how programs are compiled. This means that we’ll have a so
9. Kaleidoscope: Adding Debug Information — LLVM 23.0.0git documentation Navigation index next | previous | LLVM Home | Documentation >> Getting Started/Tutorials » LLVM Tutorial: Table of Contents » My First Language Frontend with LLVM Tutorial » 9. Kaleidoscope: Adding Debug Information Documentation Getting Started/Tutorials User Guides Reference Getting Involved Contributing to LLVM Submitting Bug Reports Mailing Lists Discord Meetups and Social Events Additional Links FAQ Glossary Publications Github Repository This Page Show Source Quick search 9. Kaleidoscope: Addin
Explore this link on the map →saved by
related reading
- 1. Kaleidoscope: Kaleidoscope Introduction and the Lexer — LLVM 23.0.0git documentationllvm.org
- 2. Kaleidoscope: Implementing a Parser and AST — LLVM 23.0.0git documentationllvm.org
- A Gentle Introduction to LLVM IR · mcyoungmcyoung.xyz
- Understanding static single assignment formsblog.yossarian.net
- A Gentle Introduction to LLVM IR · mcyoungmcyoung.xyz
- Reading 9: Debuggingweb.mit.edu
- CSC 151 - Hypothesis-driven debuggingeikmeier.sites.grinnell.edu
- Writing a C compiler in 500 lines of Pythonvgel.me
- Reading 9: Avoiding Debuggingweb.mit.edu
- CS107 GDB and Debuggingweb.stanford.edu
- The Debugger's Toolkit - by Addy Osmani - Elevateaddyo.substack.com
- Your Debugger Sucksrobert.ocallahan.org