I use GDB to debug C / C ++ programs very often, and I am knowledgeable enough about how this works and what it can do.
However, every time I often encounter problems, when in a mysterious way I can not get GDB to correctly load characters from the main file.
I currently have a binary executable in the NFS shared directory. The executable is definitely compiled with the -g3 flag. The executable crashed and dumped the kernel file into the / home directory of my Linux box.
For some reason, I can't get GDB to load characters from the main file.
When I try:
$ gdb <executable_file> <core_file>
GDB is loading, but I cannot get backtracking, and no debugging symbols are loading.
If I run GDB, and then at the GDB prompt, I type core <core file name>, it loads the main file, and I see that the main file is definitely associated with the binary executable that crashed earlier. However, GDB reports “Failed to read the correct image of the object file from memory”, so I cannot get meaningful backtracking and the debugging symbols are not loading.
Does anyone know what could be causing this? Usually I have no problem for GDB to load the main file correctly and read in debugging symbols, but in this case it does not work. Maybe because the binary executable is stored on a shared NFS mount?
source
share