CS107 GDB and Debugging
In CS106A and CS106B, you may have used a graphical debugger; these debuggers were built into the program you used to write your code, and allowed you to set breakpoints, step through your code, and see variable values, among other features. In CS107, the debugger we are using is a separate program from your text editor, called gdb (the "GNU Debugger"). It is a command-line debugger, meaning that you interact with it on the command line using text-based commands. But it shares many similarities with debuggers you might have already used; it also allows you to set breakpoints, step through your code, and see variable values. We recommend familiarizing yourself with how to use gdb as soon as possible. This page will list the basic gdb commands you will need to use as you progress through CS107. However, it takes practice to become proficient in using the tool, and gdb is a large program that has a tremendous number of features. See the bottom of the page for more resources to help you ma
CS107 GDB and Debugging GDB and Debugging --> Written by Chris Gregg and Nate Hardison, with modifications by Nick Troccoli and Lisa Yan Click here for a walkthrough video. gdb Reference Card . In CS106A and CS106B, you may have used a graphical debugger; these debuggers were built into the program you used to write your code, and allowed you to set breakpoints, step through your code, and see variable values, among other features. In CS107, the debugger we are using is a separate program from your text editor, called gdb (the "GNU Debugger"). It is a command-line debugger, meaning that you in
Explore this link on the map →related reading
- CS107 Lab 6: Runtime Stackweb.stanford.edu
- CS106B Backtracking Warmupweb.stanford.edu
- Notes on Data Structures and Programming Techniques (CPSC 223, Spring 2022)cs.yale.edu
- CS111 Assignment 3 FAQweb.stanford.edu
- 9. Kaleidoscope: Adding Debug Information — LLVM 23.0.0git documentationllvm.org
- Reading 13: Debuggingweb.mit.edu
- Reading 9: Debuggingweb.mit.edu
- Stepping through code and inspecting variables to isolate bugs | Apple Developer Documentationdeveloper.apple.com
- The Debugger's Toolkit - by Addy Osmani - Elevateaddyo.substack.com
- CS107E Assignment 4: Stack and Heapcs107e.github.io
- Computers can be understood - Made of Bugsblog.nelhage.com
- Debug code with Visual Studio Codecode.visualstudio.com