This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH]: Fix gdb's prompt for continue in TUI SingleKey mode
On Mon, Nov 12, 2012 at 4:44 PM, Tom Tromey <firstname.lastname@example.org> wrote:
> I don't know this code at all, but I think checking immediate_quit here
> is weird. Partly this is because I think most uses of immediate_quit in
> gdb are incorrect, and I'd like to try to phase them out -- but having
> the TUI depend on it makes this harder. Is there some other way to do
I agree this is weird but I have not found any better solution without
changing the core gdb.
The problem is that the TUI must know that a gdb command is being executed.
This way, if it interacts with the user, it has to be in the mode
where a prompt is displayed.
If we add some boolean predicate function that tells us we are executing some
command (whatever the command, a user, a set, a show, ...) this would
be fine for me.
Some kind of 'is_executing_command_p'.
Another way is to get an observer that allows the TUI to know when a command
is finished. This way, it could do switch the TUI back to the
SingleKey once the command
is done. Adding an observer for this looks a little bit overkill.
If anybody has a better solution, I would appreciate it too!