[prev] 10 [next]

Exercise 1: 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
  • display the values of variable
  • continue execution after the breakpoint