This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: libSegFault and just in time debugging

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....

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]