+2002-09-03 David Carlton <carlton@math.stanford.edu>
+
+ * dwarf2read.c (dwarf2_add_member_fn): Add the 'type'
+ argument (PR gdb/653). Update call to smash_to_method_type.
+ (read_structure_scope): Update call to dwarf2_add_member_fn.
+
2002-09-03 Michal Ludvig <mludvig@suse.cz>
* x86-64-linux-tdep.c: Include gdb_string.h
struct type *, struct objfile *);
static void dwarf2_add_member_fn (struct field_info *,
- struct die_info *, struct objfile *objfile,
+ struct die_info *, struct type *,
+ struct objfile *objfile,
const struct comp_unit_head *);
static void dwarf2_attach_fn_fields_to_type (struct field_info *,
static void
dwarf2_add_member_fn (struct field_info *fip, struct die_info *die,
- struct objfile *objfile,
+ struct type *type, struct objfile *objfile,
const struct comp_unit_head *cu_header)
{
struct attribute *attr;
struct type *return_type = TYPE_TARGET_TYPE (die->type);
int nparams = TYPE_NFIELDS (die->type);
- smash_to_method_type (fnp->type, die->type,
+ /* TYPE is the domain of this method, and DIE->TYPE is the type
+ of the method itself (TYPE_CODE_METHOD). */
+ smash_to_method_type (fnp->type, type,
TYPE_TARGET_TYPE (die->type),
TYPE_FIELDS (die->type),
TYPE_NFIELDS (die->type),
{
/* C++ member function. */
process_die (child_die, objfile, cu_header);
- dwarf2_add_member_fn (&fi, child_die, objfile, cu_header);
+ dwarf2_add_member_fn (&fi, child_die, type, objfile, cu_header);
}
else if (child_die->tag == DW_TAG_inheritance)
{