title: How to run gdb against a daemon in the background?
body: <p>I'm trying to debug a server I wrote with gdb as it segfaults under very specific and rare conditions. </p>
  
  <p>Is there any way I can make gdb run in the background (via quiet or batch mode?), follow children (as my server is a daemon and detaches from the main PID) and automatically dump the core and the backtrace (to a designated file) once the program crashes?</p>