aboutsummaryrefslogtreecommitdiff
path: root/gdb/interps.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-08-08 19:00:08 +0000
committerAndrew Cagney <cagney@redhat.com>2003-08-08 19:00:08 +0000
commitf786f615100c8763f19ddec9943156cd2b94a763 (patch)
treebdc95d5e9346fafb98185d4a0a8cb657f831e765 /gdb/interps.c
parentc938e9b01dd1735e2cf1f55f65117f701de560cc (diff)
downloadgdb-f786f615100c8763f19ddec9943156cd2b94a763.zip
gdb-f786f615100c8763f19ddec9943156cd2b94a763.tar.gz
gdb-f786f615100c8763f19ddec9943156cd2b94a763.tar.bz2
2003-08-08 Andrew Cagney <cagney@redhat.com>
* interps.c (interp_set): Check for a NULL "old_interp". Index: mi/ChangeLog 2003-08-08 Andrew Cagney <cagney@redhat.com> * mi-main.c (captured_mi_execute_command): Add "mi2" and "mi3" to interpreters that hack around CLI. * mi-interp.c (mi3_command_loop): New function. (mi_interpreter_resume): Check for "mi3", default to "mi2".
Diffstat (limited to 'gdb/interps.c')
-rw-r--r--gdb/interps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/interps.c b/gdb/interps.c
index 6df1d4b..82e9af6 100644
--- a/gdb/interps.c
+++ b/gdb/interps.c
@@ -183,7 +183,7 @@ interp_set (struct interp *interp)
if (interp->procs->resume_proc != NULL
&& (!interp->procs->resume_proc (interp->data)))
{
- if (!interp_set (old_interp))
+ if (old_interp == NULL || !interp_set (old_interp))
internal_error (__FILE__, __LINE__,
"Failed to initialize new interp \"%s\" %s",
interp->name, "and could not restore old interp!\n");