/* 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.
int i;
char *name;
- type = VALUE_TYPE (val);
- address = VALUE_ADDRESS (val) + VALUE_OFFSET (val);
+ type = value_type (val);
+ address = VALUE_ADDRESS (val) + value_offset (val);
if (is_object_type (type))
{
type = type_from_class (java_class_from_object (val));
type = lookup_pointer_type (type);
- val = value_at (type, address, NULL);
+ val = value_at (type, address);
}
}
else
{
VALUE_LAZY (v) = 1;
- VALUE_OFFSET (v) = 0;
+ v->offset = 0;
}
- VALUE_OFFSET (next_v) = VALUE_OFFSET (v);
+ next_v->offset = value_offset (v);
for (reps = 1; i + reps < length; reps++)
{
VALUE_LAZY (next_v) = 1;
- VALUE_OFFSET (next_v) += TYPE_LENGTH (el_type);
+ next_v->offset += TYPE_LENGTH (el_type);
if (memcmp (VALUE_CONTENTS (v), VALUE_CONTENTS (next_v),
TYPE_LENGTH (el_type)) != 0)
break;
else
fprintf_filtered (stream, "%d..%d: ", i, i + reps - 1);
- val_print (VALUE_TYPE (v), VALUE_CONTENTS (v), 0, 0,
+ val_print (value_type (v), VALUE_CONTENTS (v), 0, 0,
stream, format, 2, 1, pretty);
things_printed++;
java_print_value_fields (baseclass, base_valaddr, address + boffset,
stream, format, recurse + 1, pretty);
fputs_filtered (", ", stream);
-
- flush_it:
- ;
}
}
fputs_filtered ("<optimized out>", stream);
else
{
- struct type *t = check_typedef (VALUE_TYPE (v));
+ struct type *t = check_typedef (value_type (v));
if (TYPE_CODE (t) == TYPE_CODE_STRUCT)
v = value_addr (v);
- val_print (VALUE_TYPE (v),
+ val_print (value_type (v),
VALUE_CONTENTS (v), 0, VALUE_ADDRESS (v),
stream, format, 0, recurse + 1, pretty);
}
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;