non-blocking reads/writes and event loops
Andrew Cagney
ac131313@cygnus.com
Mon Jun 12 19:02:00 GMT 2000
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
are restartable.
However, making GDB responsive to more than one active target may force
the issue, regardless of any GUI.
Andrew
More information about the Gdb
mailing list