diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/ada-lang.h | 6 | ||||
-rw-r--r-- | gdb/ada-valprint.c | 6 | ||||
-rw-r--r-- | gdb/jv-valprint.c | 15 | ||||
-rw-r--r-- | gdb/p-valprint.c | 18 |
5 files changed, 38 insertions, 15 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a2c02d8..0eb991f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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 diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h index ae863bd..54e56bb 100644 --- a/gdb/ada-lang.h +++ b/gdb/ada-lang.h @@ -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))) diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c index 11c42bf..f5f4118 100644 --- a/gdb/ada-valprint.c +++ b/gdb/ada-valprint.c @@ -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); } diff --git a/gdb/jv-valprint.c b/gdb/jv-valprint.c index 8620175..ef25847 100644 --- a/gdb/jv-valprint.c +++ b/gdb/jv-valprint.c @@ -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; } diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c index 84189dd..ddd508a 100644 --- a/gdb/p-valprint.c +++ b/gdb/p-valprint.c @@ -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 { |