[prev] 53 [next]

Exercise 3: Monitoring Program Execution

Use GDB to examine the execution of the following:
  • iterative factorial function (fac0.c)
  • recursive factorial function (fac.c)
  • iterative list traversal (List.c)
Do each of the following:
  • set a breakpoint
  • run the program with command line arguments
  • check the stack
  • print the values of variable
  • step though the next line of code
  • continue execution after the breakpoint