By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,384 Members | 927 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,384 IT Pros & Developers. It's quick & easy.

Debuging using core dump and PC

P: n/a
I'm trying to debug my application which is crashing at unknown
location .
In case of normal crash , i can trace the instruction due to which
program crashes using
PC (program counter) printed by OS at the time of crash.
For which i use "gdb exename corefile".
But in this case my program crashes with PC=0x000000 ,
so that I could not trace the instruction due to which program is
crashing .
So Please Suggest me some steps/way using which i can trace instruction
due to which Application
is crashing .
Thanks in advance .

Regards,
Yogesh D.

Apr 17 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
gogo said:
I'm trying to debug my application which is crashing at unknown
location .
In case of normal crash , i can trace the instruction due to which
program crashes using
PC (program counter) printed by OS at the time of crash.
For which i use "gdb exename corefile".
But in this case my program crashes with PC=0x000000 ,
so that I could not trace the instruction due to which program is
crashing .
So Please Suggest me some steps/way using which i can trace instruction
due to which Application
is crashing .


Start by identifying input data that reproduces the problem reliably. Then
ignore the core dump, and start debugging the program using that data as
your input. At each stage, check your understanding of the line of code
that is about to execute, and predict its effect. Then execute the line,
and check that your prediction is borne out. If it isn't, investigate, and
correct the code if necessary (in which case, start again, first checking
that the input data still reproduces the problem).

At the end of this process you will find your bug.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Apr 17 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.