This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Remove some uses of is_mi_like_p from spu-tdep.c


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=40c03530b197d8d6ef550283ecd6684e8d49301b

commit 40c03530b197d8d6ef550283ecd6684e8d49301b
Author: Tom Tromey <tom@tromey.com>
Date:   Sat Apr 28 22:39:08 2018 -0600

    Remove some uses of is_mi_like_p from spu-tdep.c
    
    There were a few spots in spu-tdep.c where a use of is_mi_like_p was
    not needed.
    
    ChangeLog
    2018-04-30  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.

Diff:
---
 gdb/ChangeLog  |  5 +++++
 gdb/spu-tdep.c | 22 ++++++----------------
 2 files changed, 11 insertions(+), 16 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 69a43d6..84a2ddf 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
 2018-04-30  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.
+
+2018-04-30  Tom Tromey  <tom@tromey.com>
+
 	* python/py-framefilter.c (py_print_single_arg)
 	(enumerate_locals, py_print_args, py_print_frame): Remove some
 	uses of is_mi_like_p.
diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c
index 783ef5b..772ec73 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");
     }
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]