How to Debug a segfault

  • To debug segfaults enable core dumps:
ulimit -c unlimited
  • In the same console as you ran ulimit run whatever program segfaulted.
  • After it segfaults look for a core file
  • Then run GNU_Debugger:
gdb <prog_name> core
  • then run a stack backtrace in gdb
(gdb) bt
  • You should get a good idea about what caused the problem.
plu/debug.txt · Last modified: 2016/04/14 18:37 by gunn
CC Attribution-Share Alike 4.0 International Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0