flâneur — a map of the web's best reading

9. Kaleidoscope: Adding Debug Information — LLVM 20.0.0git documentation

llvm.org · 10,492 words · saved by 1 readers

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