how to debug in linux ?

I wrote a programmer with c++ under linux, it has a  Segmentation fault, how can i debug it with gdb? I compile them with g++ -p -g -c a.c;
when i run the programmer, it corrupt, and generate a file "core", I use gdb -c core, and type "where", but it just show some address, how can i let it show somthing I can understand??


thanks a lot
sandy_wuAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
ahoffmannConnect With a Mentor Commented:
gdb a.out
gdb -c core a.out
0
 
moonbeam012200Commented:
0
 
moonbeam012200Commented:
For a difinitive reverence see ...
http://www.gnu.org/manual/gdb-4.17/html_mono/gdb.html
0
 
sandy_wuAuthor Commented:
Thank U guys!
Thank U moonbeam for the URL! it is useful, but i can only give the score to one guy!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.