Search code examples
debugginggdbcoredumpdbx

Why do we need to pass the program path along with the core file to the debugger?


Is it relevant that the program is exactly the same build as the one which crashed to generate the core file?

dbx <program path> <core path>

Solution

  • The program contains the symbol table, which is used to translate locations in the core dump to program statements and variable names. If you use a different build, these locations usually will have changed, so many, perhaps most, symbolic references won't work correctly when debugging.