The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 11-08-2008
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,754
compile -g and then get into gdb - example
Code:
gcc -g -o myprog myprog.c
gdb myprog
gdb> break main
gdb> r [any command line args go here]
... commands as needed here
the step command step one line at a time, print <variable name> displays a variable.
help lets you see all of the commands.