brock@burningtown:~/csci235/labs/clab_make$ gdb blastoff GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.3) 7.7.1 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from blastoff...done. (gdb) list 1 #include 2 #include 3 4 #include "countDown.h" 5 6 int main (int argc, char *argv[]) { 7 int n ; 8 puts("Mission control: Initialize countdown sequence!") ; 9 int numRead = scanf("%d", &n) ; 10 if (numRead < 1) { (gdb) break 9 Breakpoint 1 at 0x400606: file blastoff.c, line 9. (gdb) run Starting program: /home/brock/public_html/classes/Fall2017/csci235/labs/clab_make/blastoff Mission control: Initialize countdown sequence! Breakpoint 1, main (argc=1, argv=0x7fffffffea58) at blastoff.c:9 9 int numRead = scanf("%d", &n) ; (gdb) step __isoc99_scanf (format=0x400748 "%d") at isoc99_scanf.c:27 27 isoc99_scanf.c: No such file or directory. (gdb) fin Run till exit from #0 __isoc99_scanf (format=0x400748 "%d") at isoc99_scanf.c:27 12 0x000000000040061c in main (argc=1, argv=0x7fffffffea58) at blastoff.c:9 9 int numRead = scanf("%d", &n) ; Value returned is $1 = 1 (gdb) step 10 if (numRead < 1) { (gdb) step 14 countDown(n) ; (gdb) step countDown (start=12) at countDown.c:4 4 for (int i=start; i>0; --i) { (gdb) step 5 printf("%2d\n", i) ; (gdb) step __printf (format=0x40075e "%2d\n") at printf.c:28 28 printf.c: No such file or directory. (gdb) fin Run till exit from #0 __printf (format=0x40075e "%2d\n") at printf.c:28 12 countDown (start=12) at countDown.c:4 4 for (int i=start; i>0; --i) { Value returned is $2 = 3 (gdb) step 5 printf("%2d\n", i) ; (gdb) next 11 4 for (int i=start; i>0; --i) { (gdb) n 5 printf("%2d\n", i) ; (gdb) n 10 4 for (int i=start; i>0; --i) { (gdb) n 5 printf("%2d\n", i) ; (gdb) n 9 4 for (int i=start; i>0; --i) { (gdb) n 5 printf("%2d\n", i) ; (gdb) n 8 4 for (int i=start; i>0; --i) { (gdb) n 5 printf("%2d\n", i) ; (gdb) print i $3 = 7 (gdb) fin Run till exit from #0 countDown (start=12) at countDown.c:5 7 6 5 4 3 2 1 blastoff! main (argc=1, argv=0x7fffffffea58) at blastoff.c:15 15 return 0 ; (gdb)