2003-05-23 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Sat, 24 May 2003 03:21:42 +0000 (03:21 +0000)
committerAndrew Cagney <cagney@redhat.com>
Sat, 24 May 2003 03:21:42 +0000 (03:21 +0000)
* p-valprint.c (pascal_val_print): Replace extract_address with
the inline equivalent extract_unsigned_integer.
* jv-valprint.c (java_value_print): Ditto.
* ada-valprint.c (ada_val_print_1): Ditto.
* ada-lang.h (EXTRACT_ADDRESS): Ditto.

gdb/ChangeLog
gdb/ada-lang.h
gdb/ada-valprint.c
gdb/jv-valprint.c
gdb/p-valprint.c

index a2c02d8b7819d8b3549793c9ea9e37f698ad91c0..0eb991f168cbd582db5bbf6bb1df15d523076145 100644 (file)
@@ -1,3 +1,11 @@
+2003-05-23  Andrew Cagney  <cagney@redhat.com>
+
+       * p-valprint.c (pascal_val_print): Replace extract_address with
+       the inline equivalent extract_unsigned_integer.
+       * jv-valprint.c (java_value_print): Ditto.
+       * ada-valprint.c (ada_val_print_1): Ditto.
+       * ada-lang.h (EXTRACT_ADDRESS): Ditto.
+
 2003-05-23  Theodore A. Roth  <troth@openavr.org>
 
        * blockframe.c (frameless_look_for_prologue): Remove unused
index ae863bd055779300bc09cd2a795ad50320e59c52..54e56bb0529cb0cf3af36b3a8a7824d94ab53080 100644 (file)
@@ -27,9 +27,9 @@ struct partial_symbol;
 
 struct block;
 
-/* A macro to reorder the bytes of an address depending on the endiannes
-   of the target */
-#define EXTRACT_ADDRESS(x) ((void *) extract_address (&(x), sizeof (x)))
+/* A macro to reorder the bytes of an address depending on the
+   endiannes of the target.  */
+#define EXTRACT_ADDRESS(x) ((void *) extract_unsigned_integer (&(x), sizeof (x)))
 /* A macro to reorder the bytes of an int depending on the endiannes
    of the target */
 #define EXTRACT_INT(x) ((int) extract_signed_integer (&(x), sizeof (x)))
index 11c42bf9e67184f49664f453c13725c9627ee7d2..f5f411898b2716dfe07e5c211ddf8431e8654984 100644 (file)
@@ -742,9 +742,11 @@ ada_val_print_1 (struct type *type, char *valaddr0, int embedded_offset,
       if (addressprint)
        {
          fprintf_filtered (stream, "@");
+         /* Extract an address, assume that the address is unsigned.  */
          print_address_numeric
-           (extract_address (valaddr,
-                             TARGET_PTR_BIT / HOST_CHAR_BIT), 1, stream);
+           (extract_unsigned_integer (valaddr,
+                                      TARGET_PTR_BIT / HOST_CHAR_BIT),
+            1, stream);
          if (deref_ref)
            fputs_filtered (": ", stream);
        }
index 8620175bbbaccd1f21ba169c8025e4a41add1db5..ef258475fde737629cc2ba2926525ecbe651d30c 100644 (file)
@@ -110,14 +110,22 @@ java_value_print (struct value *val, struct ui_file *stream, int format,
                {
                  read_memory (address, buf, sizeof (buf));
                  address += TARGET_PTR_BIT / HOST_CHAR_BIT;
-                 element = extract_address (buf, sizeof (buf));
+                 /* FIXME: cagney/2003-05-24: Bogus or what.  It
+                     pulls a host sized pointer out of the target and
+                     then extracts that as an address (while assuming
+                     that the address is unsigned)!  */
+                 element = extract_unsigned_integer (buf, sizeof (buf));
                }
 
              for (reps = 1; i + reps < length; reps++)
                {
                  read_memory (address, buf, sizeof (buf));
                  address += TARGET_PTR_BIT / HOST_CHAR_BIT;
-                 next_element = extract_address (buf, sizeof (buf));
+                 /* FIXME: cagney/2003-05-24: Bogus or what.  It
+                     pulls a host sized pointer out of the target and
+                     then extracts that as an address (while assuming
+                     that the address is unsigned)!  */
+                 next_element = extract_unsigned_integer (buf, sizeof (buf));
                  if (next_element != element)
                    break;
                }
@@ -468,7 +476,8 @@ java_val_print (struct type *type, char *valaddr, int embedded_offset,
          /* Print the unmangled name if desired.  */
          /* Print vtable entry - we only get here if we ARE using
             -fvtable_thunks.  (Otherwise, look under TYPE_CODE_STRUCT.) */
-         print_address_demangle (extract_address (valaddr, TYPE_LENGTH (type)),
+         /* Extract an address, assume that it is unsigned.  */
+         print_address_demangle (extract_unsigned_integer (valaddr, TYPE_LENGTH (type)),
                                  stream, demangle);
          break;
        }
index 84189dd2894877a8727caaa157934757d14f9ef0..ddd508ac0448316537354a783e41945c9c8428b1 100644 (file)
@@ -141,7 +141,8 @@ pascal_val_print (struct type *type, char *valaddr, int embedded_offset,
          /* Print the unmangled name if desired.  */
          /* Print vtable entry - we only get here if we ARE using
             -fvtable_thunks.  (Otherwise, look under TYPE_CODE_STRUCT.) */
-         print_address_demangle (extract_address (valaddr + embedded_offset, TYPE_LENGTH (type)),
+         /* Extract the address, assume that it is unsigned.  */
+         print_address_demangle (extract_unsigned_integer (valaddr + embedded_offset, TYPE_LENGTH (type)),
                                  stream, demangle);
          break;
        }
@@ -272,9 +273,11 @@ pascal_val_print (struct type *type, char *valaddr, int embedded_offset,
       if (addressprint)
        {
          fprintf_filtered (stream, "@");
+         /* Extract the address, assume that it is unsigned.  */
          print_address_numeric
-           (extract_address (valaddr + embedded_offset,
-                             TARGET_PTR_BIT / HOST_CHAR_BIT), 1, stream);
+           (extract_unsigned_integer (valaddr + embedded_offset,
+                                      TARGET_PTR_BIT / HOST_CHAR_BIT),
+            1, stream);
          if (deref_ref)
            fputs_filtered (": ", stream);
        }
@@ -312,10 +315,11 @@ pascal_val_print (struct type *type, char *valaddr, int embedded_offset,
          /* Print the unmangled name if desired.  */
          /* Print vtable entry - we only get here if NOT using
             -fvtable_thunks.  (Otherwise, look under TYPE_CODE_PTR.) */
-         print_address_demangle (extract_address (
-                                                   valaddr + embedded_offset + TYPE_FIELD_BITPOS (type, VTBL_FNADDR_OFFSET) / 8,
-                 TYPE_LENGTH (TYPE_FIELD_TYPE (type, VTBL_FNADDR_OFFSET))),
-                                 stream, demangle);
+         /* Extract the address, assume that it is unsigned.  */
+         print_address_demangle
+           (extract_unsigned_integer (valaddr + embedded_offset + TYPE_FIELD_BITPOS (type, VTBL_FNADDR_OFFSET) / 8,
+                                      TYPE_LENGTH (TYPE_FIELD_TYPE (type, VTBL_FNADDR_OFFSET))),
+            stream, demangle);
        }
       else
        {