summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Carlton <carlton@bactrian.org>2002-09-03 17:32:11 +0000
committerDavid Carlton <carlton@bactrian.org>2002-09-03 17:32:11 +0000
commit1af7bc241a896fb2d1b9a52ad72625f573d3318d (patch)
tree88f31bcc71b920b47dd8d3ba081438658d13ffac
parent1df024f54b75505dfbd23e0c9c36114e884d1a2e (diff)
downloadgdb-1af7bc241a896fb2d1b9a52ad72625f573d3318d.tar.gz
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.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/dwarf2read.c11
2 files changed, 13 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 65904f8024e..a64519e2369 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+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
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 0d96e1ff74d..4ef683c13dc 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -803,7 +803,8 @@ static void dwarf2_attach_fields_to_type (struct field_info *,
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 *,
@@ -2259,7 +2260,7 @@ dwarf2_attach_fields_to_type (struct field_info *fip, struct type *type,
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;
@@ -2327,7 +2328,9 @@ dwarf2_add_member_fn (struct field_info *fip, struct die_info *die,
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),
@@ -2516,7 +2519,7 @@ read_structure_scope (struct die_info *die, struct objfile *objfile,
{
/* 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)
{