Patchwork [pushed,spu] Fix "info spu event" output formatting

login
register
mail settings
Submitter Ulrich Weigand
Date May 8, 2018, 12:15 p.m.
Message ID <20180508121547.2E8D9D804F5@oc3748833570.ibm.com>
Download mbox | patch
Permalink /patch/27150/
State New
Headers show

Comments

Ulrich Weigand - May 8, 2018, 12:15 p.m.
Hello,

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.

Tested on spu-elf, pushed to mainline.

Bye,
Ulrich

gdb/ChangeLog:
2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>

	* spu-tdep.c (info_spu_event_command): Fix output formatting.

Patch

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