/*!
\defgroup chapter_attach_gdb Starting A gdb Session From A Running Program
\ingroup book_attach_gdb
*/
/*!
\page page_attach_gdb
\ingroup chapter_attach_gdb

A running program can initiate a gdb session by calling the function <code>attach_gdb()</code>.

For example,

\code
  Debug(
    if (counter == 31523 && ptr == (void*)0x40013fa0)	// When to start debugging?
      attach_gdb();
  );

  ptr->foobar++;	// The debugging will start at this line.
\endcode

The function <code>attach_gdb()</code> opens an xterm (or whatever is configured in the rcfile)
and starts the gdb session inside it.

After exiting gdb the application will continue running.

In order for <code>attach_gdb()</code> to work, you will need to call
<code>\link chapter_rcfile read_rcfile() \endlink</code>
at the start of your application.

*/
