* elf-m10300.c (mn10300_elf_relax_section): Allow for the
[deliverable/binutils-gdb.git] / gdb / printcmd.c
index c95b156a58d166ebcb2268357174f32300b0fa25..eeffa6ea7d509aa7dd985bd7f99e2e01c5987be9 100644 (file)
@@ -407,7 +407,7 @@ print_scalar_formatted (const void *valaddr, struct type *type,
   /* If we are printing it as unsigned, truncate it in case it is actually
      a negative signed value (e.g. "print/u (short)-1" should print 65535
      (if shorts are 16 bits) instead of 4294967295).  */
-  if (options->format != 'd')
+  if (options->format != 'd' || TYPE_UNSIGNED (type))
     {
       if (len < sizeof (LONGEST))
        val_long &= ((LONGEST) 1 << HOST_CHAR_BIT * len) - 1;
This page took 0.026141 seconds and 4 git commands to generate.