English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

6 answers

If you want to see all the steps it is trying to do. You can try gdb.

you can also try
strace -o yourprogram

This will log all the calls the program made into the logfile

2006-11-10 19:54:24 · answer #1 · answered by QA 2 · 0 0

Use "lint" to check your code before you compile your code.

If you need to track down runtime errors, use "gdb" The GNU Debugger and "strace" to trace the system calls and signals. Both have their strengths. You can find more information on these in their man pages (at the prompt type "man gdb" and press enter, then space bar to page down or "q" to quit).

Once you have an idea of where the program is going wrong you can insert commands into your code to print the values of your variables to a log file while it is running and then you will find where your algorithm needs to be corrected or improved.

There are lots of tutorials available for free on the web. It is an excellent resource.

Good luck.

2006-11-09 21:33:39 · answer #2 · answered by codemonkey 1 · 0 0

1# If you want to use an IDE in Linux then use Kdevelop.
Just go to terminal type kdevelop ( make sure KDE development tools are already installed).

2# For compiling you can use G++ compiler.

3# For debugging GDB (it is a command line debugger).

4# IF you need debugger with GUI then go for "Electric fence", or
" ddd ".

2006-11-12 06:27:03 · answer #3 · answered by the_init 1 · 0 0

GDB is the way! It's a highly powerful tool to trace / debug a gnu C prog!

2006-11-10 19:45:48 · answer #4 · answered by Flashy V 2 · 0 0

shweta try this link

http://www.google.co.uk/search?hl=en&q=trace+a+C+program+in+fedora+or+red+hat+linux+platform&btnG=Google+Search&meta=

2006-11-09 21:17:25 · answer #5 · answered by Joe_Young 6 · 0 0

try to find files with .C extension.

2006-11-09 21:05:32 · answer #6 · answered by doctor4allfammy 2 · 0 0

fedest.com, questions and answers