Re: SegFault

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kolpur Srinivasa Chary wrote:
Hi,

I got segmentation fault when I compiled a program with gcc, so I have
run the executable file to gdb.
When I tried running the program through gdb, it displayed the following message

Program received signal SIGSEGV, Segmentation fault.
0x08048ccb in main ()

But why is it not telling me the line number at which segfault
occured? Please help me regarding this issue.

You have to compile with debug information turned on, try adding "-g3" to your build, also avoid adding strip or "-s" to your build.

Tom

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux