Add a symbol's value to the computed frag offset, rather than overwriting it.
[deliverable/binutils-gdb.git] / gdb / maint.c
index 10cf6bbde5f2ed19a997824597891171ca39c3d3..725c6c5d64a05b37060fa78611d0b19297de6a06 100644 (file)
 #include "objfiles.h"
 #include "value.h"
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 extern void _initialize_maint_cmds PARAMS ((void));
 
 static void maintenance_command PARAMS ((char *, int));
@@ -351,13 +347,13 @@ maintenance_translate_address (arg, from_tty)
     sym = lookup_minimal_symbol_by_pc (address);
 
   if (sym)
-    printf_filtered ("%s+%u\n",
+    printf_filtered ("%s+%s\n",
                     SYMBOL_SOURCE_NAME (sym),
-                    address - SYMBOL_VALUE_ADDRESS (sym));
+                    paddr_u (address - SYMBOL_VALUE_ADDRESS (sym)));
   else if (sect)
-    printf_filtered ("no symbol at %s:0x%08x\n", sect->name, address);
+    printf_filtered ("no symbol at %s:0x%s\n", sect->name, paddr (address));
   else
-    printf_filtered ("no symbol at 0x%08x\n", address);
+    printf_filtered ("no symbol at 0x%s\n", paddr (address));
 
   return;
 }
This page took 0.023704 seconds and 4 git commands to generate.