Debugging c programs
This tutorial is designed to help the programmer to learn learn the debugging techniques in the c programming language. This tutorial assumes that you already know how to compile and execute programs.
What is debugging
Debugging is a methodical process of finding and reducing the number of bugs or defects in a C program.
What is a debugger
A debugger is a computer program that is used to test and debug other programs.
Debugging techniques
There are various ways to watch a running user-space programs. you can run a debugger on it and step through the program, add print statements, or add a tool to analyze the program. here we describe some methods use to debug programs that run on Linux
• Debugging by Printing
• Including Debugging Macros
• Debugging using User-space tools
• Debugging using kernel tools
There are various ways to track down user-space and kernel bugs using debug tools on Linux.
User-space tools
• Debugging with MEMWATCH
• Debugging with YAMD
• Debugging with strace
• Debugging with gdb
kernel tools
• Kernel source level debugger (kgdb)
• Built-in kernel debugger (kdb)
We
provide Debugging C programs-Free Online tutorials for the educational purposes only. We do not
responsiable
for the correctness of its contents. the risk of using it lies
entirelywith the user.