/* Support for printing C++ values for GDB, the GNU debugger.
Copyright (C) 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
- 2000, 2001, 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2008
+ Free Software Foundation, Inc.
This file is part of GDB.
(TYPE_FIELD_TYPE (type, i),
unpack_field_as_long (type, valaddr + offset, i));
- common_val_print (v, stream, format, 0, recurse + 1, pretty);
+ common_val_print (v, stream, format, 0, recurse + 1, pretty,
+ current_language);
}
}
else
val_print (TYPE_FIELD_TYPE (type, i),
valaddr, offset + TYPE_FIELD_BITPOS (type, i) / 8,
address + TYPE_FIELD_BITPOS (type, i) / 8,
- stream, format, 0, recurse + 1, pretty);
+ stream, format, 0, recurse + 1, pretty,
+ current_language);
}
}
annotate_field_end ();
}
val_print (type, value_contents_all (val),
value_embedded_offset (val), VALUE_ADDRESS (val),
- stream, format, 0, recurse, pretty);
+ stream, format, 0, recurse, pretty, current_language);
}
}
void
-cp_print_class_member (const gdb_byte *valaddr, struct type *domain,
+cp_print_class_member (const gdb_byte *valaddr, struct type *type,
struct ui_file *stream, char *prefix)
{
/* VAL is a byte offset into the structure type DOMAIN.
Find the name of the field for that offset and
print it. */
+ struct type *domain = TYPE_DOMAIN_TYPE (type);
+ LONGEST val = extract_signed_integer (valaddr, TYPE_LENGTH (type));
unsigned int fieldno;
- LONGEST val = unpack_long (builtin_type_long, valaddr);
-
/* Pointers to data members are usually byte offsets into an object.
Because a data member can have offset zero, and a NULL pointer to
member must be distinct from any valid non-NULL pointer to