This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Rework/simplify linux native asynchronous support.
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Thu, 16 Apr 2009 12:33:05 -0600
- Subject: Re: Rework/simplify linux native asynchronous support.
- References: <200904071707.44176.pedro@codesourcery.com>
- Reply-to: tromey at redhat dot com
>>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:
Pedro> Let's start over... This patch rewrites the linux native
Pedro> asynchronous mode support, by making it use mostly the same
Pedro> code paths and data structures as the synchronous support.
Nice. I read through this patch, and I liked the parts I understood :)
Pedro> Conceptually, it is as if target_wait, which is modeled on
Pedro> wait/waitpid, had a WNOHANG mode (gdbserver's target_wait
Pedro> implementation *does* have one such `options' parameter, and
Pedro> I'm not discarding adding one such thing to GDB's target_wait
Pedro> too).
This sounds like a good idea to me. (Again, as far as I understand
the implications.)
Pedro> gdb/linux-nat.c | 908 +++++++++++++++-----------------------------------------
Pedro> 1 file changed, 244 insertions(+), 664 deletions(-)
Cool.
I seem to remember that there was a reason not to use the async event
handler code from event-loop.c. It would be nice if there were a
comment somewhere in the file explaining why the pipe approach is used
instead.
I also didn't understand the call to async_file_flush in
async_file_mark.
I don't know this code very well. So if these should be clear given
more study, feel free to let me know.
Tom