1837097 Members
2105 Online
110112 Solutions
New Discussion

Re: read a core file

 
Marcia Ferreira_5
Occasional Contributor

read a core file

Hi guys

I´m trying to run an C application and this result a core file.
I tryed to read this core dump with "gdb" and nothing happenned;
How can I open this file, using "gdb" or another dump reader application ?

rgds
Marcia Ferreir
3 REPLIES 3
harry d brown jr
Honored Contributor

Re: read a core file

Can you provide the syntax you used when invoking gdb? And any error messages it might have displayed?

Also, which compiler did you use on your C program? and what was the error message when it core dumped?

live free or die
harry d brown jr
Live Free or Die
Stephen Keane
Honored Contributor

Re: read a core file

gdb will only be able to usefully debug the core file if the C application that generated it was built with debugging symbols. If the C application has been stripped, then you are not going to get a lot of sense out of gdb.

The usual method would be to start gdb

# gdb

then type in the command

(gdb) core-file core

this will load the core file

then you need to tell gdb where the C application is

(gdb) file foo

Where foo is the name of your C application. You may also need to tell gdb where any shared libraries can be located.

Eric Antunes
Honored Contributor

Re: read a core file

Hi Marcia,

Try to assign points to those who are helping you.

PS (PT): quantos mais pontos assignar, mais respostas receberá... :)

Eric Antun
Each and every day is a good day to learn.