This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [David Carlton <carlton@math.Stanford.EDU>] Re: [RFA] dwarf2read.c: set TYPE_DOMAIN_TYPE correctly for methods
- From: David Carlton <carlton at math dot stanford dot edu>
- To: Daniel Jacobowitz <drow at mvista dot com>
- Cc: gdb-patches at sources dot redhat dot com, Andrew Cagney <ac131313 at ges dot redhat dot com>
- Date: 28 Aug 2002 15:47:00 -0700
- Subject: Re: [David Carlton <carlton@math.Stanford.EDU>] Re: [RFA] dwarf2read.c: set TYPE_DOMAIN_TYPE correctly for methods
- References: <ro17kiahb81.fsf@jackfruit.Stanford.EDU><20020828224247.GA27335@nevyn.them.org>
On Wed, 28 Aug 2002 18:42:47 -0400, Daniel Jacobowitz <drow@mvista.com> said:
>> + /* NOTE: carlton/2002-08-22: Previously, the second argument to
>> + smash_to_method_type was die->type rather than type, and the
>> + type argument to dwarf2_add_member_fn didn't exst. This is
>> + incorrect: the second argument to smash_to_method_type should
>> + be the type of the class that this is a method of, whereas
>> + die->type is the type of the method itself. So we need to
>> + pass that type in from read_structure_scope explicitly. See
>> + PR gdb/653. */
> I'd rather a comment like:
> /* TYPE is the domain of this method, and DIE->TYPE is the type
> of the method itself (TYPE_CODE_METHOD). */
> There's no point in cluttering up the code with history of this sort
> unless you have low confidence in the change's effect on some odd
> corner-case. That's just my personal judgement, though.
I agree. I'd originally put in the excessively verbose comment
because Andrew complained about my putting too much information in the
ChangeLog instead of a comment, but I think that your version of the
comment is better.
> If you agree, mind committing it with that or a similar change?
Great, will do (unless Andrew complains about the new version of the
comment).
David Carlton
carlton@math.stanford.edu