Is there any gcc option I can set that will give me the line number of the segmentation fault?
I know I can:
Here's a complete shell/gdb session
$ gcc -ggdb myproj.c $ gdb a.out gdb> run --some-option=foo --other-option=bar (gdb will say your program hit a segfault) gdb> bt (gdb prints a stack trace) gdb> q [are you sure, your program is still running]? y $ emacs myproj.c # heh, I know what the error is now...
Happy hacking :-)