aboutsummaryrefslogtreecommitdiff
path: root/gdb/interps.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2013-12-10 16:06:53 -0800
committerDoug Evans <dje@google.com>2013-12-10 16:06:53 -0800
commit34dc884e1711a3d00c6815bf32aa5823390ff1f6 (patch)
treede333541b18e75ac91c08e55b1ea4d388edca40b /gdb/interps.c
parentf2c7d7ee5b94a3ff4fe86d47e9a529cc50bfb7c5 (diff)
downloadgdb-34dc884e1711a3d00c6815bf32aa5823390ff1f6.zip
gdb-34dc884e1711a3d00c6815bf32aa5823390ff1f6.tar.gz
gdb-34dc884e1711a3d00c6815bf32aa5823390ff1f6.tar.bz2
Delete interp_exec_p.
* interps.h (interp_exec_p): Delete. * interps.c (interp_exec_p): Delete. (interp_exec): Update. Assert interp->procs->exec_proc != NULL. * mi/mi-interp.c (mi_cmd_interpreter_exec): Update.
Diffstat (limited to 'gdb/interps.c')
-rw-r--r--gdb/interps.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/gdb/interps.c b/gdb/interps.c
index 5a0fde3..cae3659 100644
--- a/gdb/interps.c
+++ b/gdb/interps.c
@@ -347,20 +347,13 @@ interp_set_quiet (struct interp *interp, int quiet)
/* interp_exec - This executes COMMAND_STR in the current
interpreter. */
-int
-interp_exec_p (struct interp *interp)
-{
- return interp->procs->exec_proc != NULL;
-}
struct gdb_exception
interp_exec (struct interp *interp, const char *command_str)
{
- if (interp->procs->exec_proc != NULL)
- {
- return interp->procs->exec_proc (interp->data, command_str);
- }
- return exception_none;
+ gdb_assert (interp->procs->exec_proc != NULL);
+
+ return interp->procs->exec_proc (interp->data, command_str);
}
/* A convenience routine that nulls out all the common command hooks.