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] [spu] Fix "info spu event" output formatting


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

commit 968ae51bac6201d2c63e0c2b4405832dca0795f0
Author: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Date:   Tue May 8 14:13:12 2018 +0200

    [spu] Fix "info spu event" output formatting
    
    The formatting of the output of the "info spu event" command changed, causing
    spurious test suite failures.  Use phex instead of phex_nz to get back the
    expected format, and fix emission of new line characters.
    
    gdb/ChangeLog:
    2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
    
    	* spu-tdep.c (info_spu_event_command): Fix output formatting.

Diff:
---
 gdb/ChangeLog  | 4 ++++
 gdb/spu-tdep.c | 8 +++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2c32f94..32038c5 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* spu-tdep.c (info_spu_event_command): Fix output formatting.
+
 2018-05-07  Tom Tromey  <tom@tromey.com>
 
 	* configure: Rebuild.
diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c
index 4a68de0..2567c24 100644
--- a/gdb/spu-tdep.c
+++ b/gdb/spu-tdep.c
@@ -2097,9 +2097,11 @@ info_spu_event_command (const char *args, int from_tty)
   ui_out_emit_tuple tuple_emitter (current_uiout, "SPUInfoEvent");
 
   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));
+  current_uiout->field_fmt ("event_status", "0x%s", phex (event_status, 4));
+  current_uiout->text ("\n");
+  current_uiout->text (_("Event Mask   "));
+  current_uiout->field_fmt ("event_mask", "0x%s", phex (event_mask, 4));
+  current_uiout->text ("\n");
 }
 
 static void


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