Rework/simplify linux native asynchronous support.
Tom Tromey
tromey@redhat.com
Thu Apr 16 18:33:00 GMT 2009
>>>>> "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
More information about the Gdb-patches
mailing list