We help IT Professionals succeed at work.


shisuck asked
my application caused a segment fault and stoped.  it also dumped the core.  how do I find out specifics from the core dumped???????   can I debug it?  can I look at it? etc etc etc?
Watch Question

just type:

gdb <applicationname> core

then the debugger (gdb) loads the application and the core file.
If you compiled your application with the '-g' flag then gdb can show you the stack and line numbers with the command 'where'.
There are also severl other useful commands. print <varname> for example shows the content of a variable.

On other UNIXes (Solaris,ReliantUNIX,...) the debugger is dbx.

The command "file" is also quite useful for finding out what program left that specific core-file.
Actually it's a quite nice command overall.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.