This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Fix c++/14819 (implicit this)
- From: Tom Tromey <tromey at redhat dot com>
- To: Keith Seitz <keiths at redhat dot com>
- Cc: "gdb-patches\ at sourceware dot org ml" <gdb-patches at sourceware dot org>
- Date: Thu, 21 Nov 2013 14:06:36 -0700
- Subject: Re: [RFA] Fix c++/14819 (implicit this)
- Authentication-results: sourceware.org; auth=none
- References: <52795E6A dot 2050506 at redhat dot com> <87vc05o28v dot fsf at fleche dot redhat dot com> <52841CD1 dot 1080401 at redhat dot com> <87iovttv37 dot fsf at fleche dot redhat dot com> <528E5E17 dot 80603 at redhat dot com>
>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:
Keith> 2013-11-21 Keith Seitz <keiths@redhat.com>
Keith> PR c++/14819
Keith> * c-exp.y (classify_inner_name): If no matching symbol was
Keith> found, try looking up the token as a base class.
Keith> Likewise if a constructor was found.
Keith> * cp-namespace.c (find_type_baseclass_by_name): New function.
Keith> * cp-support.h (find_type_baseclass_by_name): Declare.
Keith> * valops.c (value_struct_elt_for_reference): If we get
Keith> a non-static field, try to get a value based on the
Keith> current instance, if any.
Keith> testsuite/ChangeLog
Keith> 2013-11-21 Keith Seitz <keiths@redhat.com>
Keith> PR c++/14819
Keith> * gdb.cp/impl-this.cc: New file.
Keith> * gdb.cp/impl-this.exp: New file.
Thanks, Keith. I appreciate your research into my questions.
Keith> +struct type *
Keith> +find_type_baseclass_by_name (struct type *parent_type, const char *name)
Keith> +{
Keith> + int i;
Keith> +
Keith> + CHECK_TYPEDEF (parent_type);
Keith> + for (i = 0; i < TYPE_N_BASECLASSES (parent_type); ++i)
Keith> + {
Keith> + struct type *type = TYPE_BASECLASS (parent_type, i);
I think a check_typedef call is needed here.
Ok with that change.
Tom