The debugger we will look at here is the GNU debugger gdb. You can run it in command mode where you type all the commands directly into a command window. Our brief tour of gdb will concentrate on this mode. However there are some good GUI (Graphical User Interfaces) to gdb that allow you to look at the source and the state of variables in graphics windows. In the department we have ddd. To debug our Zoo program:-
A window will open which by default has 3 panes, one of which will show the source. First press the button at the top of the screen marked Run to start the program and the repeatedly press Next (not Nexti) to step the program one source statement at a time.