core files are created in the current working directory of a process. Check with getcwd()
, set with chdir(
).
dbx [ -a ProcessID ] [ -B DebugFile ] [ -c CommandFile ] [ -I Directory ] [ -E DebugEnvironment ] [ -p oldpath=newpath:...| pathfile ] [ -u ] [ -F ] [ -r ] [ -x ] [ -v ] [ -C CoreFile | ObjectFile [ CoreFile ] ]
Load your program into dbx with dbx /path/to/progname /path/to/corefile
and you can start looking at your stack trace ("where" command, etc).
If you don't specify a corefile
dbx will automatically load a matching file named "core" if its in the same directory as the program loaded (and they match signatures).
Read the man page on dbx, it gives all the debugging commands you'll need.
Also note that your program will have needed to be compiled with debugging symbols enabled (and not later 'strip'ed) in order for the stack trace to be the most useful. Without debugging symbols you'll see the function names in the stack trace, but not much else.