From: David Carlton <carlton@math.stanford.edu>
To: gdb-patches@sources.redhat.com
Cc: carlton@math.stanford.edu
Subject: [RFA] dwarf2read.c: set TYPE_DOMAIN_TYPE correctly for methods
Date: Thu, 22 Aug 2002 13:36:00 -0000 [thread overview]
Message-ID: <ro1r8gqpr6h.fsf@jackfruit.Stanford.EDU> (raw)
I've figured out what caused the regression that I turned up in PR
gdb/653; here's a patch that fixes it.
David Carlton
carlton@math.stanford.edu
2002-08-22 David Carlton <carlton@math.stanford.edu>
* dwarf2read.c (dwarf2_add_member_fn): Add back in the type
argument that was deleted on 2002-06-14: it was needed after all,
as PR gdb/653 demonstrates. Update call to smash_to_method_type.
(read_structure_scope): Update call to dwarf2_add_member_fn.
Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.65
diff -u -p -r1.65 dwarf2read.c
--- dwarf2read.c 20 Aug 2002 18:45:30 -0000 1.65
+++ dwarf2read.c 22 Aug 2002 20:13:53 -0000
@@ -803,7 +803,8 @@ static void dwarf2_attach_fields_to_type
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 fie
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,7 @@ dwarf2_add_member_fn (struct field_info
struct type *return_type = TYPE_TARGET_TYPE (die->type);
int nparams = TYPE_NFIELDS (die->type);
- smash_to_method_type (fnp->type, die->type,
+ smash_to_method_type (fnp->type, type,
TYPE_TARGET_TYPE (die->type),
TYPE_FIELDS (die->type),
TYPE_NFIELDS (die->type),
@@ -2516,7 +2517,7 @@ read_structure_scope (struct die_info *d
{
/* 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)
{
next reply other threads:[~2002-08-22 20:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-22 13:36 David Carlton [this message]
2002-08-22 13:52 ` Daniel Jacobowitz
2002-08-22 13:56 ` David Carlton
2002-08-22 14:19 ` Andrew Cagney
2002-08-22 14:26 ` David Carlton
2002-08-22 14:39 ` Andrew Cagney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ro1r8gqpr6h.fsf@jackfruit.Stanford.EDU \
--to=carlton@math.stanford.edu \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox