#ifdef UI_OUT
annotate_breakpoint (bs->breakpoint_at->number);
ui_out_text (uiout, "\nBreakpoint ");
- if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0)
+ if (ui_out_is_mi_like_p (uiout))
ui_out_field_string (uiout, "reason", "breakpoint-hit");
ui_out_field_int (uiout, "bkptno", bs->breakpoint_at->number);
ui_out_text (uiout, ", ");
{
annotate_watchpoint (bs->breakpoint_at->number);
#ifdef UI_OUT
- if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0)
+ if (ui_out_is_mi_like_p (uiout))
ui_out_field_string (uiout, "reason", "watchpoint-trigger");
mention (bs->breakpoint_at);
ui_out_tuple_begin (uiout, "value");
case bp_read_watchpoint:
#ifdef UI_OUT
- if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0)
+ if (ui_out_is_mi_like_p (uiout))
ui_out_field_string (uiout, "reason", "read-watchpoint-trigger");
mention (bs->breakpoint_at);
ui_out_tuple_begin (uiout, "value");
if (bs->old_val != NULL)
{
annotate_watchpoint (bs->breakpoint_at->number);
- if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0)
+ if (ui_out_is_mi_like_p (uiout))
ui_out_field_string (uiout, "reason", "access-watchpoint-trigger");
mention (bs->breakpoint_at);
ui_out_tuple_begin (uiout, "value");
else
{
mention (bs->breakpoint_at);
- if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0)
+ if (ui_out_is_mi_like_p (uiout))
ui_out_field_string (uiout, "reason", "access-watchpoint-trigger");
ui_out_tuple_begin (uiout, "value");
ui_out_text (uiout, "\nValue = ");
case bp_finish:
#ifdef UI_OUT
- if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0)
+ if (ui_out_is_mi_like_p (uiout))
ui_out_field_string (uiout, "reason", "function-finished");
#endif
return PRINT_UNKNOWN;
case bp_until:
#ifdef UI_OUT
- if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0)
+ if (ui_out_is_mi_like_p (uiout))
ui_out_field_string (uiout, "reason", "location-reached");
#endif
return PRINT_UNKNOWN;
will be deleted already. So we have no choice but print the
information here. */
#ifdef UI_OUT
- if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0)
+ if (ui_out_is_mi_like_p (uiout))
ui_out_field_string (uiout, "reason", "watchpoint-scope");
ui_out_text (uiout, "\nWatchpoint ");
ui_out_field_int (uiout, "wpnum", bs->breakpoint_at->number);
#ifdef UI_OUT
/* Output the count also if it is zero, but only if this is
mi. FIXME: Should have a better test for this. */
- if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0)
+ if (ui_out_is_mi_like_p (uiout))
if (show_breakpoint_hit_counts && b->hit_count == 0)
ui_out_field_int (uiout, "times", b->hit_count);
#endif
#endif
case bp_breakpoint:
#ifdef UI_OUT
- if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0)
+ if (ui_out_is_mi_like_p (uiout))
{
say_where = 0;
break;
break;
case bp_hardware_breakpoint:
#ifdef UI_OUT
- if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0)
+ if (ui_out_is_mi_like_p (uiout))
{
say_where = 0;
break;
do_cleanups (old_chain);
#endif
#ifdef UI_OUT
- if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0)
+ if (ui_out_is_mi_like_p (uiout))
return;
#endif
printf_filtered ("\n");
/* 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;
/* 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 ();
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);
}
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");
}
#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