RFC: clear quit_flag in quit, not throw_exception
Tom Tromey
tromey@redhat.com
Thu Aug 9 20:20:00 GMT 2012
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
Pedro> If the unrelated exception/error unwinds things all the way up to
Pedro> the top prompt, managing to bypass all QUIT calls, then we'll end
Pedro> up with a dangling quit until the next command it entered
Pedro> (resulting in a spurious, delayed "Quit"), it seems to me. If
Pedro> that analysis is correct, maybe we should also clear or handle
Pedro> these somehow somewhere near the top loop?
Thanks for noticing this.
I looked into the problem in more detail, and I think it is a crazy
morass.
The quit_flag part is all solvable. Maybe I will tackle it.
However, the immediate_quit part is really quite bad. I started by
changing the current places that set and clear immediate_quit to use a
cleanup instead. However, remote_start_remote remains a big problem --
it is just wrong. I think a fix here would be to only set and clear
immediate_quit around I/O primitives. But, finding all those and
applying the change is troublesome.
One idea I had was that maybe we could simply not have immediate_quit,
but instead rely on EINTR and sprinkle more QUIT calls around. In my
initial experiment, this didn't seem to work, but I haven't gone back
yet to understand why.
Maybe someone else has a more workable idea.
Tom
More information about the Gdb-patches
mailing list