Analyzing Crash dumps in Linux using GDB

GDB is a common tool for debugging applications in Linux development environment.

Before generating the core dump use -g compiler option for compiling the application for enabling debugging symbols.

1. set ulimit -c unlimited  in cmd to enable core dump.
2. Then run the application, after application crashes it generates code dump with core.pid file name.
3. Load the application in gdb ex: gdb <path to application>
4. In this step load the core dump by using core-file <path to core dump> command
5.Just use bt for getting the backtrace of the crash which will give you exact location where app has crashed.

Use GDB instead of logging which will save your time for debugging !!!!



Comments

Popular posts from this blog

Getting backtrace during stack corruption

.b4s playlist parser WINAMP XML PlaylistFormat