Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting stack traces on Unix systems, automatically

Tags:

What methods are there for automatically getting a stack trace on Unix systems? I don't mean just getting a core file or attaching interactively with GDB, but having a SIGSEGV handler that dumps a backtrace to a text file.

Bonus points for the following optional features:

  • Extra information gathering at crash time (eg. config files).
  • Email a crash info bundle to the developers.
  • Ability to add this in a dlopened shared library
  • Not requiring a GUI