Eliminate interp::quiet_p
This commit removes interp::quiet_p / interp_quiet_p /
interp_set_quiet, because AFAICS, it doesn't really do anything.
interp_quiet is only ever checked inside interp_set nowadays:
if (!first_time && !interp_quiet_p (interp))
{
xsnprintf (buffer, sizeof (buffer),
"Switching to interpreter \"%.24s\".\n", interp->name);
current_uiout->text (buffer);
}
I did a bit of archaelogy, and found that back in
4a8f6654 (2003), it
was also called in another place, to decide whether to print the CLI
prompt.
AFAICS, that condition is always false today, making that if/then
block always dead code. If we remove that code, then there are no
interp_quiet_p uses left in the tree, so we can remove it all.
There are two paths that lead to interp_set calls:
#1 - When installing the top level interpreter. In this case,
FIRST_TIME is true.
#2 - In interpreter_exec_cmd. In this case, the interpreter is always
set quiet before interp_set is called.
Grepping a gdb.log of an x86_64 GNU/Linux run for "Switching to
interpreter" (before this patch) doesn't find any hits.
I suspect the intention of this message was to support something like
a "set interpreter ..." command that would change the interpreter
permanently. But there's no such command.
Tested on x86_64 Fedora 23.
gdb/ChangeLog:
2017-02-08 Pedro Alves <palves@redhat.com>
* interps.c (interp::interp): Remove reference to quiet_p.
(interp_set): Make static. Remove dead "Switching to" output
code.
(interp_quiet_p, interp_set_quiet): Delete.
(interpreter_exec_cmd): Don't set the interpreter quiet.
* interps.h (interp_quiet_p): Make static.
(class interp) <quiet_p>: Remove field