X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fjv-valprint.c;h=8715257614185f227f6fb214474ab27a3716d335;hb=4566dfcf80c82eafb52f417657fb81931520271d;hp=f25cd09905fadc96ddfc6e47f720f64e063c2b7f;hpb=d4cad8db8c3e700898454d5b67276378955e4bec;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/jv-valprint.c b/gdb/jv-valprint.c index f25cd09905..8715257614 100644 --- a/gdb/jv-valprint.c +++ b/gdb/jv-valprint.c @@ -1,5 +1,7 @@ /* Support for printing Java values for GDB, the GNU debugger. - Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + + Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free + Software Foundation, Inc. This file is part of GDB. @@ -110,14 +112,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; } @@ -290,9 +300,6 @@ java_print_value_fields (struct type *type, char *valaddr, CORE_ADDR address, java_print_value_fields (baseclass, base_valaddr, address + boffset, stream, format, recurse + 1, pretty); fputs_filtered (", ", stream); - - flush_it: - ; } } @@ -301,7 +308,6 @@ java_print_value_fields (struct type *type, char *valaddr, CORE_ADDR address, fprintf_filtered (stream, ""); else { - extern int inspect_it; int fields_seen = 0; for (i = n_baseclasses; i < len; i++) @@ -450,7 +456,7 @@ java_val_print (struct type *type, char *valaddr, int embedded_offset, CORE_ADDR address, struct ui_file *stream, int format, int deref_ref, int recurse, enum val_prettyprint pretty) { - register unsigned int i = 0; /* Number of characters printed */ + unsigned int i = 0; /* Number of characters printed */ struct type *target_type; CORE_ADDR addr; @@ -469,7 +475,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; }