Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [RFA 3/6] Remove some uses of is_mi_like_p from spu-tdep.c
Date: Mon, 30 Apr 2018 14:07:00 -0000	[thread overview]
Message-ID: <20180430140732.21601-4-tom@tromey.com> (raw)
In-Reply-To: <20180430140732.21601-1-tom@tromey.com>

There were a few spots in spu-tdep.c where a use of is_mi_like_p was
not needed.

ChangeLog
2018-04-29  Tom Tromey  <tom@tromey.com>

	* spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
	(info_spu_event_command): Remove some uses of is_mi_like_p.
---
 gdb/ChangeLog  |  5 +++++
 gdb/spu-tdep.c | 22 ++++++----------------
 2 files changed, 11 insertions(+), 16 deletions(-)

diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c
index 783ef5b247..772ec7339d 100644
--- a/gdb/spu-tdep.c
+++ b/gdb/spu-tdep.c
@@ -2096,18 +2096,10 @@ info_spu_event_command (const char *args, int from_tty)
  
   ui_out_emit_tuple tuple_emitter (current_uiout, "SPUInfoEvent");
 
-  if (current_uiout->is_mi_like_p ())
-    {
-      current_uiout->field_fmt ("event_status",
-				"0x%s", phex_nz (event_status, 4));
-      current_uiout->field_fmt ("event_mask",
-				"0x%s", phex_nz (event_mask, 4));
-    }
-  else
-    {
-      printf_filtered (_("Event Status 0x%s\n"), phex (event_status, 4));
-      printf_filtered (_("Event Mask   0x%s\n"), phex (event_mask, 4));
-    }
+  current_uiout->text (_("Event Status "));
+  current_uiout->field_fmt ("event_status", "0x%s", phex_nz (event_status, 4));
+  current_uiout->text (_("\nEvent Mask   "));
+  current_uiout->field_fmt ("event_mask", "0x%s", phex_nz (event_mask, 4));
 }
 
 static void
@@ -2226,8 +2218,7 @@ info_spu_mailbox_list (gdb_byte *buf, int nr, enum bfd_endian byte_order,
 	current_uiout->field_fmt (field, "0x%s", phex (val, 4));
       }
 
-      if (!current_uiout->is_mi_like_p ())
-	printf_filtered ("\n");
+      current_uiout->text ("\n");
     }
 }
 
@@ -2454,8 +2445,7 @@ info_spu_dma_cmdlist (gdb_byte *buf, int nr, enum bfd_endian byte_order)
 	  current_uiout->field_skip ("error_p");
       }
 
-      if (!current_uiout->is_mi_like_p ())
-	printf_filtered ("\n");
+      current_uiout->text ("\n");
     }
 }
 
-- 
2.13.6


  reply	other threads:[~2018-04-30 14:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-30 14:07 [RFA 0/6] Remove some uses of is_mi_like_p Tom Tromey
2018-04-30 14:07 ` Tom Tromey [this message]
2018-04-30 14:07 ` [RFA 5/6] Remove some is_mi_like_p from breakpoint code Tom Tromey
2018-04-30 14:07 ` [RFA 6/6] Remove a use of is_mi_like_p from darwin-nat-info.c Tom Tromey
2018-04-30 14:07 ` [RFA 2/6] Remove some uses of is_mi_like_p from py-framefilter.c Tom Tromey
2018-04-30 14:07 ` [RFA 1/6] Make do_is_mi_like_p const Tom Tromey
2018-04-30 14:07 ` [RFA 4/6] Remove a use of is_mi_like_p from tracepoint.c Tom Tromey
2018-04-30 18:36 ` [RFA 0/6] Remove some uses of is_mi_like_p Pedro Alves
2018-04-30 18:52   ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180430140732.21601-4-tom@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox