Lecture 8 Flashcards
What does the gdb Run
command do?
Execute the program
What does break do?
Sets a breakpoint, a place for the program to stop
What does next do?
Runs until the next instruction in the this function
What does step do?
Stops at the next instruction call anywhere
What does continue do?
run until the next breakpoint
What does print do?
show the value of a variable
What does set do?
Change the value of a variable
What does jump do?
Start executing at a different line number
What is enable/disable?
Turn breakpoints on or off
What is the anatomy of a running program?
Executable code of the program
Global Variables
Call Stack
Heap
What two parts of the anatomy of a running program are created at compile time?
Executable code of the program
Global Variables
What is the executable?
the instructions to run
What is the call stack?
where we track function calls
What is the heap?
where dynamic memory allocation happens. Space that lives beyond the end of a function.
What do we use the call stack for?
We use it to track which function we’re currently using.