[plug] how can a core file be read?

Petter Reinholdtsen pere at hungry.com
Fri Nov 19 09:20:02 WST 1999


> I've surfed the man pages and found dbx, but still can't figure out
> how to use it to get more information from a core file.
> 
> I'd like to find out what caused the coredump.  Any ideas?

I assume you are running Linux, as this is the Plug list.

Given the path <path> to the program that crashed, and the path to the
core file <core> that was the result of the crash, run the GNU
Debugger

  gdb <path> <core>

and give command 'bt' (backtrace).  Unless the stack is corrupted or
you program is multithreaded, this should give you the list of
function calls that lead to the crash.  If you are lucky, and the
program was compiled with debug information (-g), you will get the
params, filename and line number of the function call.  You can move
up and down in the stack using 'up', and 'down'.  To print the content
of variables, use 'p <varname>'.

If you are really lucky, 'ddd' is installed on your machine, and you
will have a nice GUI for gdb.

Happy hacking,
-- 
##>  Petter Reinholdtsen  <##  |  pere at td.org.uit.no

 


More information about the plug mailing list