I've currently started using linux, and am not able to trace the program as in TURBO C using F7 line by line.
I tried google it out and found that can be done using inbuilt debugger(gdb).
but when i enter gdb and type run it just runs the program as it is till the end.
So where should i enter commands like print 'varname' or step. because when I type it after run it says prog1 not running.
Please give me detailed solution as to how to add breakpoints and trace the program line by line checking the value for different variable.