2007-06-13 Markus Deuling <deuling@de.ibm.com>
[deliverable/binutils-gdb.git] / gdb / printcmd.c
index 6da10aa19629432b7fc2d09117604fd1fcc1cbc9..b03c65ea09452cf07d1ea040bd6b55547211a9bf 100644 (file)
@@ -346,9 +346,9 @@ print_scalar_formatted (const void *valaddr, struct type *type,
 
   /* If the value is a pointer, and pointers and addresses are not the
      same, then at this point, the value's length (in target bytes) is
-     TARGET_ADDR_BIT/TARGET_CHAR_BIT, not TYPE_LENGTH (type).  */
+     gdbarch_addr_bit/TARGET_CHAR_BIT, not TYPE_LENGTH (type).  */
   if (TYPE_CODE (type) == TYPE_CODE_PTR)
-    len = TARGET_ADDR_BIT / TARGET_CHAR_BIT;
+    len = gdbarch_addr_bit (current_gdbarch) / TARGET_CHAR_BIT;
 
   /* 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
@@ -669,7 +669,7 @@ deprecated_print_address_numeric (CORE_ADDR addr, int use_local,
     fputs_filtered (paddress (addr), stream);
   else
     {
-      int addr_bit = TARGET_ADDR_BIT;
+      int addr_bit = gdbarch_addr_bit (current_gdbarch);
 
       if (addr_bit < (sizeof (CORE_ADDR) * HOST_CHAR_BIT))
        addr &= ((CORE_ADDR) 1 << addr_bit) - 1;
This page took 0.024435 seconds and 4 git commands to generate.