Do you get segmentation faults for the application or for gdb? If the former, try the backtrace (bt) command and see where and why it crashes.