This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Is there any real need for a prompt stack?
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 30 Aug 2011 18:56:01 +0100
- Subject: Is there any real need for a prompt stack?
I'm looking at fixing these regressions in async mode, compared
to sync mode, apparently recently introduced (I suspect w/ the
set_prompt stuff)
Running ../../../src/gdb/testsuite/gdb.base/default.exp ...
FAIL: gdb.base/default.exp: info set (incomplete output)
FAIL: gdb.base/default.exp: show prompt
FAIL: gdb.base/default.exp: show (incomplete output)
and wondering, is there any real need for a prompt stack?
push_prompt and pop_prompt already internally break the abstraction
by special casing async mode, and switching between anotation levels,
which appear to be 2 or the 3 the major users of push/pop in the
first place. It looks like we can rip the stack out, and just
end up with a function that returns the current prompt, based
on the current annotation level, and the sync_execution, more_to_come
and new_async_prompt globals.
Has anyone tried that and understood why it wouldn't work?
--
Pedro Alves