This is the mail archive of the
mailing list for the GDB project.
Re: non-blocking reads/writes and event loops
- To: Jim Ingham <jingham at apple dot com>
- Subject: Re: non-blocking reads/writes and event loops
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Tue, 13 Jun 2000 12:01:46 +1000
- CC: GDB Discussion <gdb at sourceware dot cygnus dot com>
- Organization: Cygnus Solutions
- References: <B56A728C.firstname.lastname@example.org>
Jim Ingham wrote:
> So my vote is to eradicate ALL the blocking behavior, and make GDB a pure
> event driven application. In the cases where you can't avoid blocking calls
> (like ptrace calls, for instance) we should consider spinning a helper
> thread, and doing the work there. I am not in favor of a thread-happy
> approach for gdb, but the careful use of short-lived threads to do
> particular tasks is a lot more stable than forcing interrupt-driven
> programming on the unhappy GUI's that attempt to use gdb...
Thing is, it is hard.
It means completly inverting the expression evaluator. I've seen an
outline for how to do it so that just inferior calls are async. Making
GDB fine-grain event based means that even memory and register transfers
However, making GDB responsive to more than one active target may force
the issue, regardless of any GUI.