aboutsummaryrefslogtreecommitdiff
path: root/gdb/interps.h
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2017-02-08 18:08:18 +0000
committerPedro Alves <palves@redhat.com>2017-02-08 18:08:18 +0000
commita474bd8eeea16b2b6aa7089dedb142d86c22a4d7 (patch)
tree3953113c2b500dd0d8b1db8414a8a478c7e7b472 /gdb/interps.h
parent604c4576fdcfc4e7c28f569b3748a1b6b4e0dbd4 (diff)
downloadfsf-binutils-gdb-a474bd8eeea16b2b6aa7089dedb142d86c22a4d7.zip
fsf-binutils-gdb-a474bd8eeea16b2b6aa7089dedb142d86c22a4d7.tar.gz
fsf-binutils-gdb-a474bd8eeea16b2b6aa7089dedb142d86c22a4d7.tar.bz2
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
Diffstat (limited to 'gdb/interps.h')
-rw-r--r--gdb/interps.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/gdb/interps.h b/gdb/interps.h
index e564980..1b9580c 100644
--- a/gdb/interps.h
+++ b/gdb/interps.h
@@ -39,7 +39,6 @@ extern int interp_resume (struct interp *interp);
extern int interp_suspend (struct interp *interp);
extern struct gdb_exception interp_exec (struct interp *interp,
const char *command);
-extern int interp_quiet_p (struct interp *interp);
class interp
{
@@ -86,12 +85,9 @@ public:
/* Has the init method been run? */
bool inited;
-
- bool quiet_p;
};
extern void interp_add (struct ui *ui, struct interp *interp);
-extern void interp_set (struct interp *interp, bool top_level);
/* Look up the interpreter for NAME, creating one if none exists yet.
If NAME is not a interpreter type previously registered with