diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-08-08 19:00:08 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-08-08 19:00:08 +0000 |
commit | f786f615100c8763f19ddec9943156cd2b94a763 (patch) | |
tree | bdc95d5e9346fafb98185d4a0a8cb657f831e765 /gdb/mi/mi-interp.c | |
parent | c938e9b01dd1735e2cf1f55f65117f701de560cc (diff) | |
download | gdb-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/mi/mi-interp.c')
-rw-r--r-- | gdb/mi/mi-interp.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c index e00e329..b72d7ef 100644 --- a/gdb/mi/mi-interp.c +++ b/gdb/mi/mi-interp.c @@ -60,6 +60,7 @@ static int mi_interp_query_hook (const char *ctlstr, va_list ap); static char *mi_interp_read_one_line_hook (char *prompt, int repeat, char *anno); +static void mi3_command_loop (void); static void mi2_command_loop (void); static void mi1_command_loop (void); @@ -133,10 +134,12 @@ mi_interpreter_resume (void *data) /* If we're _the_ interpreter, take control. */ if (current_interp_named_p (INTERP_MI1)) command_loop_hook = mi1_command_loop; - else if (current_interp_named_p (INTERP_MI)) + else if (current_interp_named_p (INTERP_MI2)) command_loop_hook = mi2_command_loop; + else if (current_interp_named_p (INTERP_MI3)) + command_loop_hook = mi3_command_loop; else - return 0; + command_loop_hook = mi2_command_loop; return 1; } @@ -334,6 +337,12 @@ mi2_command_loop (void) } static void +mi3_command_loop (void) +{ + mi_command_loop (3); +} + +static void mi_command_loop (int mi_version) { #if 0 |