diff options
author | Andrew Cagney <cagney@redhat.com> | 2001-06-18 17:57:43 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2001-06-18 17:57:43 +0000 |
commit | f15b3135fe08cb545a238c8e89bab9562bb46d59 (patch) | |
tree | a03cbd2b7d9d5b72977845b4fbc79d2ece532953 /gdb/infrun.c | |
parent | 28ac158ebcd63ac09d64b3e2b865eeb956b96717 (diff) | |
download | gdb-f15b3135fe08cb545a238c8e89bab9562bb46d59.tar.gz |
Recognize -i=mi0, -i=mi1 and -i=mi.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index 9f2daef2c92..ba623338438 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 |