


For example, changing to the frame main allows to print the variables/parameters that are visible only in that scope. These commands don't change the state of program execution (the execution remains where it stopped in the topmost frame), but they allow you to examine the runtime state from the perspective of another stack frame. The up, down, and frame n commands allow you to change the selected frame.With an argument N, backtrace N shows only the N innermost frames and backtrace -N shows only the N outermost. Use backtrace to display all of the stack frames from the current point of execution back to main.Here is a reminder of some commands introduced in previous labs, assignments and lectures: Share your most productive gdb tips with your labmates to get a few new tricks into everyone's repertoire! Examining Stack Frames Gdb is an indispensible tool when working on assignment 6, particularly for Binary Bomb. Note: there will be compiler warnings when you make this starter project - this is expected for some of the exercises! Exercises 1) GDB Tips and Tricks (10 min) git clone /afs/ir/class/cs107/repos/lab7/shared lab7 Get StartedĬlone the repo by using the command below to create a lab6 directory containing the project files. Lecture Correction: %rip is a register that stores the address of the next instruction to execute, not the currently-executing instruction. Share with them anything fun you did over the weekend! diagnose symptoms of stack mismanagementįind an open computer and somebody new to sit with.observe and understand the correct operation of the runtime stack.Become more familiar with useful GDB commands and tricks when working with assembly.This lab is designed to give you a chance to: Lab written by Julie Zelenski, with modifications by Nick Troccoli Learning Goals
