Web | This Site

GDB Tutorial
GDB Resources
Selected Reading
© 2011 TutorialsPoint.COM

| Home |  | References |  | About TP |  | Advertising

# What is GNU Debugger - GDB

A debugger is a program that runs other programs, allowing the user to exercise control over these programs, and to examine variables when problems arise. GNU Debugger which is called gdb is the most popular debugger for UNIX systems to debug C and C++ Programs.

GNU Debugger helps you in finding out followings:

- If a core dump happened then what statement or expression did the program crash on?
- If an error occurs while executing a function, what line of the program contains the call to that function, and what are the parameters?
- What are the values of program variables at a particular point during execution of the program?
- What is the result of a particular expression in a program?

## How GDB Debugs?

GDB allows you to do things like run the program up to a certain point then stop and print out the values of certain variables at that point, or step through the program one line at a time and print out the values of each variable after executing each line.

GDB uses a simple command line interface.

## Note the Followings:

- Even though GDB can help you in finding out memory leakage related bugs but it is not a tool to detect memory leakages

- GDB cannot be used for programs that do not compile without errors and it does not help in fixing those errors.

Advertisement

Online Image Processing

Indian Baby Names