segfault

John Fine johnsfine@verizon.net
Tue Dec 9 17:04:00 GMT 2008


For most segfaults, I find it easier to use ulimit to make coredumps 
temporarily unlimited, then rerun the original program to fail again, 
but now that will generate a core file.

Then open the image and core file together in gdb.  You don't need much 
gdb knowledge (more than I remember right now, but still not much) to 
get a backtrace (call stack from the failure point up through main).  
Usually that is enough to identify the exact bug.

If it isn't, then you build with more debug info and use gdb in more 
challenging ways.


Leonardo Santagostini wrote:
> Thanks for the answers, i will do the following things:
>
> 1) To read and learn how to use the GDB :D !!
> 2) Compile -g3 RGPVISAServer
> 3) Attach gdb to a runnig RGPVISAServer process to see what is doing wrong.
>
> Well, after finish i will publish my error, thanks for support me !!!!
>
>   



More information about the Gcc-help mailing list