summaryrefslogtreecommitdiff
path: root/gdbsupport/print-utils.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gdbsupport/print-utils.cc')
-rw-r--r--gdbsupport/print-utils.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdbsupport/print-utils.cc b/gdbsupport/print-utils.cc
index 0ef8cb829a1..73ff1afda30 100644
--- a/gdbsupport/print-utils.cc
+++ b/gdbsupport/print-utils.cc
@@ -168,6 +168,10 @@ phex (ULONGEST l, int sizeof_l)
str = get_print_cell ();
xsnprintf (str, PRINT_CELL_SIZE, "%04x", (unsigned short) (l & 0xffff));
break;
+ case 1:
+ str = get_print_cell ();
+ xsnprintf (str, PRINT_CELL_SIZE, "%02x", (unsigned short) (l & 0xff));
+ break;
default:
str = phex (l, sizeof (l));
break;
@@ -206,6 +210,10 @@ phex_nz (ULONGEST l, int sizeof_l)
str = get_print_cell ();
xsnprintf (str, PRINT_CELL_SIZE, "%x", (unsigned short) (l & 0xffff));
break;
+ case 1:
+ str = get_print_cell ();
+ xsnprintf (str, PRINT_CELL_SIZE, "%x", (unsigned short) (l & 0xff));
+ break;
default:
str = phex_nz (l, sizeof (l));
break;