aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-07-06 03:53:11 +0000
committerAndrew Cagney <cagney@redhat.com>2001-07-06 03:53:11 +0000
commit9dc5e2a93611891cdef625066665571ee0007d07 (patch)
treebaa6097f28affd552596446f3d31c404b50c3da2 /gdb/breakpoint.c
parent7fb088be89cfb0c624cb9e4498808d69e1719568 (diff)
downloadgdb-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/breakpoint.c')
-rw-r--r--gdb/breakpoint.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index cee302e..ed152be 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -1889,7 +1889,7 @@ print_it_typical (bpstat bs)
#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, ", ");
@@ -2034,7 +2034,7 @@ print_it_typical (bpstat bs)
{
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");
@@ -2064,7 +2064,7 @@ print_it_typical (bpstat bs)
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");
@@ -2088,7 +2088,7 @@ print_it_typical (bpstat bs)
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");
@@ -2102,7 +2102,7 @@ print_it_typical (bpstat bs)
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 = ");
@@ -2139,7 +2139,7 @@ print_it_typical (bpstat bs)
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;
@@ -2147,7 +2147,7 @@ print_it_typical (bpstat bs)
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;
@@ -2354,7 +2354,7 @@ watchpoint_check (PTR p)
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);
@@ -3481,7 +3481,7 @@ print_one_breakpoint (struct breakpoint *b,
#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
@@ -4509,7 +4509,7 @@ mention (struct breakpoint *b)
#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;
@@ -4520,7 +4520,7 @@ mention (struct breakpoint *b)
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;
@@ -4583,7 +4583,7 @@ mention (struct breakpoint *b)
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");