This is the mail archive of the gdb-patches@sourceware.org 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: [RFC] Avoid some crashes at SIGINT


> 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


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