aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-06-18 17:57:43 +0000
committerAndrew Cagney <cagney@redhat.com>2001-06-18 17:57:43 +0000
commitb30bf9ee99a2fd704f3a335d185041e7432f3105 (patch)
tree8e750381e3675422a8e7a3c5f62141faf912e679 /gdb/infrun.c
parent6f9efd975101f3a93625952de6de81ae36ef8c4b (diff)
downloadgdb-b30bf9ee99a2fd704f3a335d185041e7432f3105.zip
gdb-b30bf9ee99a2fd704f3a335d185041e7432f3105.tar.gz
gdb-b30bf9ee99a2fd704f3a335d185041e7432f3105.tar.bz2
Recognize -i=mi0, -i=mi1 and -i=mi.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 9f2daef..ba62333 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -3334,7 +3334,7 @@ print_stop_reason (enum inferior_stop_reason stop_reason, int stop_info)
/* Print a message only if not in the middle of doing a "step n"
operation for n > 1 */
if (!step_multi || !stop_step)
- if (interpreter_p && strcmp (interpreter_p, "mi") == 0)
+ if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0)
ui_out_field_string (uiout, "reason", "end-stepping-range");
#endif
break;
@@ -3346,7 +3346,7 @@ print_stop_reason (enum inferior_stop_reason stop_reason, int stop_info)
/* The inferior was terminated by a signal. */
#ifdef UI_OUT
annotate_signalled ();
- if (interpreter_p && strcmp (interpreter_p, "mi") == 0)
+ if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0)
ui_out_field_string (uiout, "reason", "exited-signalled");
ui_out_text (uiout, "\nProgram terminated with signal ");
annotate_signal_name ();
@@ -3380,7 +3380,7 @@ print_stop_reason (enum inferior_stop_reason stop_reason, int stop_info)
annotate_exited (stop_info);
if (stop_info)
{
- if (interpreter_p && strcmp (interpreter_p, "mi") == 0)
+ if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0)
ui_out_field_string (uiout, "reason", "exited");
ui_out_text (uiout, "\nProgram exited with code ");
ui_out_field_fmt (uiout, "exit-code", "0%o", (unsigned int) stop_info);
@@ -3388,7 +3388,7 @@ print_stop_reason (enum inferior_stop_reason stop_reason, int stop_info)
}
else
{
- if (interpreter_p && strcmp (interpreter_p, "mi") == 0)
+ if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0)
ui_out_field_string (uiout, "reason", "exited-normally");
ui_out_text (uiout, "\nProgram exited normally.\n");
}
@@ -3574,12 +3574,12 @@ and/or watchpoints.\n");
#ifdef UI_OUT
/* For mi, have the same behavior every time we stop:
print everything but the source line. */
- if (interpreter_p && strcmp (interpreter_p, "mi") == 0)
+ if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0)
source_flag = LOC_AND_ADDRESS;
#endif
#ifdef UI_OUT
- if (interpreter_p && strcmp (interpreter_p, "mi") == 0)
+ if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0)
ui_out_field_int (uiout, "thread-id",
pid_to_thread_id (inferior_ptid));
#endif