• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 277
  • Last Modified:

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
0
sandy_wu
Asked:
sandy_wu
  • 2
1 Solution
 
ahoffmannCommented:
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now