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
Who is Participating?

Improve company productivity with a Business Account.Sign Up

ahoffmannConnect With a Mentor Commented:
gdb a.out
gdb -c core a.out
For a difinitive reverence see ...
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!
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.