How To Debug C/c++ Pgm In Linux? (step-by-step Execution)?
In linux we can compile a c/c++ pgm using cc / g++ command. But it will not execute sequentially (Unlike Turbo C ) so if we want to compile pgm sequentially what must be the solution
Related Posts:
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.


1 Response to “How To Debug C/c++ Pgm In Linux? (step-by-step Execution)?”.
You can use gdb (the GNU debugger) to step through programs on Linux. to start debugging.
Create a breakpoint at
..
First, be sure to compile with the -g flag to include debugging information.
Then, run gdb
A few of the commands available are:
> run
Starts the program
> break
> step
Executes the current line of the program.
> print
Prints out the value of
There are a lot more commands available, and can be found by using the help command in gdb. Additionally, there are a *ton* of gdb resources and guides available on the web.
Hope this helps!
Leave a comment.