* p-valprint.c (pascal_val_print): Use extract_typed_address
authorUlrich Weigand <uweigand@de.ibm.com>
Mon, 18 May 2009 13:45:51 +0000 (13:45 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Mon, 18 May 2009 13:45:51 +0000 (13:45 +0000)
to extract reference value.

gdb/ChangeLog
gdb/p-valprint.c

index 55cace3..5e9931b 100644 (file)
@@ -1,5 +1,10 @@
 2009-05-18  Ulrich Weigand  <uweigand@de.ibm.com>
 
+       * p-valprint.c (pascal_val_print): Use extract_typed_address
+       to extract reference value.
+
+2009-05-18  Ulrich Weigand  <uweigand@de.ibm.com>
+
        * doublest.c (NAN): Remove unused define.
        (extract_floating_by_length, deprecated_extract_floating): Remove.
        (store_floating_by_length, deprecated_store_floating): Remove.
index 2d1cb08..68ff54a 100644 (file)
@@ -251,11 +251,10 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
       elttype = check_typedef (TYPE_TARGET_TYPE (type));
       if (options->addressprint)
        {
+         CORE_ADDR addr
+           = extract_typed_address (valaddr + embedded_offset, type);
          fprintf_filtered (stream, "@");
-         /* Extract the address, assume that it is unsigned.  */
-         fputs_filtered (paddress (
-           extract_unsigned_integer (valaddr + embedded_offset,
-              gdbarch_ptr_bit (current_gdbarch) / HOST_CHAR_BIT)), stream);
+         fputs_filtered (paddress (addr), stream);
          if (options->deref_ref)
            fputs_filtered (": ", stream);
        }