diff options
author | Andrew Cagney <cagney@redhat.com> | 2001-07-06 03:53:11 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2001-07-06 03:53:11 +0000 |
commit | 9dc5e2a93611891cdef625066665571ee0007d07 (patch) | |
tree | baa6097f28affd552596446f3d31c404b50c3da2 /gdb/infrun.c | |
parent | 7fb088be89cfb0c624cb9e4498808d69e1719568 (diff) | |
download | gdb-9dc5e2a93611891cdef625066665571ee0007d07.zip gdb-9dc5e2a93611891cdef625066665571ee0007d07.tar.gz gdb-9dc5e2a93611891cdef625066665571ee0007d07.tar.bz2 |
Replace:
if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0)
with:
if (ui_out_is_mi_like_p (uiout))
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 e355622..8b126db 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -3308,7 +3308,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 && strncmp (interpreter_p, "mi", 2) == 0) + if (ui_out_is_mi_like_p (uiout)) ui_out_field_string (uiout, "reason", "end-stepping-range"); #endif break; @@ -3320,7 +3320,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 && strncmp (interpreter_p, "mi", 2) == 0) + if (ui_out_is_mi_like_p (uiout)) ui_out_field_string (uiout, "reason", "exited-signalled"); ui_out_text (uiout, "\nProgram terminated with signal "); annotate_signal_name (); @@ -3354,7 +3354,7 @@ print_stop_reason (enum inferior_stop_reason stop_reason, int stop_info) annotate_exited (stop_info); if (stop_info) { - if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0) + if (ui_out_is_mi_like_p (uiout)) 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); @@ -3362,7 +3362,7 @@ print_stop_reason (enum inferior_stop_reason stop_reason, int stop_info) } else { - if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0) + if (ui_out_is_mi_like_p (uiout)) ui_out_field_string (uiout, "reason", "exited-normally"); ui_out_text (uiout, "\nProgram exited normally.\n"); } @@ -3548,12 +3548,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 && strncmp (interpreter_p, "mi", 2) == 0) + if (ui_out_is_mi_like_p (uiout)) source_flag = LOC_AND_ADDRESS; #endif #ifdef UI_OUT - if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0) + if (ui_out_is_mi_like_p (uiout)) ui_out_field_int (uiout, "thread-id", pid_to_thread_id (inferior_ptid)); #endif |