This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
remote.c and a re-entrant event-loop
- To: GDB Discussion <gdb at sources dot redhat dot com>
- Subject: remote.c and a re-entrant event-loop
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Mon, 19 Feb 2001 17:56:52 -0500
Hello,
Ref:
non-blocking reads/writes and event loops
http://sources.redhat.com/ml/gdb/2000-06/msg00088.html
remote.c's "async", "extended-async" back ends
http://sources.redhat.com/ml/gdb/2001-02/msg00016.html
In http://sources.redhat.com/ml/gdb/2000-06/msg00144.html I sketched out
two possible ways of progressing the event-loop problem vis:
o invert the targets first
Would involve re-entering the
event-loop
o invert the expression evaluator first
Would involve wrapping targets
Thinking over this again. I would argue that right now we have the
first case - a re-entrant event loop - only it is carefully hidden in
select/read and timers in serial.c, /proc, ...
Assuming that is accepted as the current reality, can I propose that the
real event loop be made re-entrant so that the existing code is at least
able to use that instead of the current hacks. It also gives people
motivated to work on the event loop problem the freedom to evolve things
in which ever direction suits them (from the top or bottom). (but more
on that later :-)
Andrew
PS: What has this to do with remote.c? It is the other reason why
remote.c can't be simplified. In the end you still end up needing code
for the blocking and async cases.