Tuesday, February 14, 2012

What is GDB?

GDB is a gnu debugger. It will be used to debug the application/program in *nix systems. It is very help full for finding the root caus for the application run time problems. It is available almost in all *nix systems. To use GDB debugger, need to compile the application/program with -g option, so that compiler will create the all symbols for the debugging. GDB will not work if the application compiled without -g option.

gcc -g program-name

gcc command is used for compiling the application for the gdb debugging symbols.

gdb binary-file

gdb command is used to attach the binary file to the gdb. or just use gdb in the command line then attache binary file and use file gdb command to attach the binary file to gdb.

GDB commands



No comments:

Popular Posts