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.
This commit is contained in:
parent
8d0fd02a11
commit
b276f1bbc9
5 changed files with 38 additions and 15 deletions
|
@ -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
|
||||
|
|
|
@ -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)))
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue