This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Avoid some crashes at SIGINT
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 27 Feb 2008 12:08:48 -0800
- Subject: Re: [RFC] Avoid some crashes at SIGINT
- References: <20080227025444.GA22935@caradoc.them.org>
> The new interface is gdb_call_async_signal_handler. SIGINT handlers,
> when running in non-async mode or otherwise wanting an "immediate"
> reaction, can call this and pass it the async handler's token instead
> of duplicating the async handler's code. Then for POSIX platforms
> the function is called immediately and for Windows it is deferred
> to gdb_select. The event loop always uses gdb_select and so do
> the remote targets which had SIGINT handlers.
This is pretty clever. I also looked at the patch, and it looked
sensible to me. But I admit that I'm not completely familiar with
this part of the code.
> Some day, we may want to use the same mechanism that I've added here
> for POSIX platforms too. That will close the race conditions of where
> we are when the signal arrives. That requires async GDB; Vladimir has
> been looking at Nick's and Apple's patches for this again. For now,
> I left the POSIX platform behavior unchanged.
I look forward to this.
--
Joel