This is the mail archive of the
mailing list for the GDB project.
RE: libSegFault and just in time debugging
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Michael Snyder'" <msnyder at sonic dot net>, <gdb at sourceware dot org>
- Date: Sat, 30 Jun 2007 18:27:00 +0100
- Subject: RE: libSegFault and just in time debugging
- References: <email@example.com>
On 29 June 2007 20:11, Michael Snyder wrote:
> What if, instead of doing that, libSegFault (or another similar library)
> were to open a socket to a daemon and say "I caught a crash -- what
> do you want me to do?". And then wait for a reply. All that can be
> done with async-signal-safe function calls.
> The daemon, because it is NOT in a signal handler, can do anything
> it wants, eg. open a GUI window and say "Program XYZ has crashed:
> would you like to debug it?" User clicks a button, daemon fires up
> gdb, attaches to crashing program, then responds to the signal handler
> library with a message saying "get out of the way, please...". The
> library removes itself from the signal vector, re-raises the signal,
> and returns. And gdb finds itself at the point where the signal was
> originally raised.
Implementation-wise, wouldn't it be easier to just build a mini-gdbserver[*]
into libsegfault itself? It would save having to do the get-out-of-the-way
[*] - sorry, vague terminology here - i mean a remote protocol talker, like
the embedded targets use, not the big i'm-a-separate-process gdbserver.
Can't think of a witty .sigline today....