2011-03-31 Thiago Jung Bauermann <bauerman@br.ibm.com>
[deliverable/binutils-gdb.git] / gdb / ui-out.c
index 2cd1a5471f36371056ef5ed80fbb41bee04d1c67..59aaa24ea4fc3524682e246e9c7ac85589721d35 100644 (file)
@@ -492,23 +492,8 @@ ui_out_field_core_addr (struct ui_out *uiout,
                        struct gdbarch *gdbarch,
                        CORE_ADDR address)
 {
-  /* Maximum size string returned by hex_string_custom is 50 chars.
-     This buffer must be bigger than that, for safety.  */
-  char addstr[64];
-  int addr_bit = gdbarch_addr_bit (gdbarch);
-
-  if (addr_bit < (sizeof (CORE_ADDR) * HOST_CHAR_BIT))
-    address &= ((CORE_ADDR) 1 << addr_bit) - 1;
-
-  /* FIXME: cagney/2002-05-03: Need local_address_string() function
-     that returns the language localized string formatted to a width
-     based on gdbarch_addr_bit.  */
-  if (addr_bit <= 32)
-    strcpy (addstr, hex_string_custom (address, 8));
-  else
-    strcpy (addstr, hex_string_custom (address, 16));
-
-  ui_out_field_string (uiout, fldname, addstr);
+  ui_out_field_string (uiout, fldname,
+                      print_core_address (gdbarch, address));
 }
 
 void
This page took 0.02452 seconds and 4 git commands to generate.