From: Gary Benson <gbenson@redhat.com>
To: Pedro Alves <pedro@palves.net>
Cc: Luis Machado <luis.machado@linaro.org>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2] Reject ambiguous C++ field accesses
Date: Tue, 13 Oct 2020 09:47:32 +0100 [thread overview]
Message-ID: <20201013084732.GA9883@blade.nx> (raw)
In-Reply-To: <4485500b-c151-225c-ff46-9842b5fbc2f0@palves.net>
Pedro Alves wrote:
> On 8/28/20 9:22 PM, Pedro Alves wrote:
> > gdb/ChangeLog:
> >
> > * valops.c (struct struct_field_searcher): New.
> > (update_search_result): Rename to ...
> > (struct_field_searcher::update_result): ... this. Simplify
> > prototype. Record all found fields.
> > (do_search_struct_field): Rename to ...
> > (struct_field_searcher::search): ... this. Simplify prototype.
> > Maintain stack of visited baseclass path. Call update_result for
> > fields too. Keep searching fields in baseclasses instead of
> > stopping at the first found field.
> > (search_struct_field): Use struct_field_searcher. When looking
> > for fields, report ambiguous access attempts.
> >
> > gdb/testsuite/ChangeLog:
> >
> > PR c++/26550
> > * gdb.cp/ambiguous.cc (marker1): Delete.
> > (main): Initialize all the fields of the locals. Replace marker1
> > call with a "set breakpoint here" marker.
> > * gdb.cp/ambiguous.exp: Modernize. Use gdb_continue_to_breakpoint
> > instead of running to marker1. Add tests printing all the
> > variables and all the fields of the variables.
> > (test_ambiguous): New proc, expecting the new GDB output when a
> > field access is ambiguous. Change all "warning: X ambiguous"
> > tests to use it.
>
> I've merged this now.
Thanks Pedro.
Cheers,
Gary
--
Gary Benson - he / him / his
Principal Software Engineer, Red Hat
next prev parent reply other threads:[~2020-10-13 8:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-27 18:02 [PATCH] " Pedro Alves
2020-08-27 18:45 ` Luis Machado
2020-08-27 19:12 ` Pedro Alves
2020-08-27 19:58 ` Luis Machado
2020-08-28 14:35 ` Gary Benson
2020-08-28 20:22 ` [PATCH v2] " Pedro Alves
2020-10-12 17:12 ` Pedro Alves
2020-10-13 8:47 ` Gary Benson [this message]
2020-08-28 20:12 ` [PATCH] " Pedro Alves
2020-08-28 14:38 ` Gary Benson
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=20201013084732.GA9883@blade.nx \
--to=gbenson@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=luis.machado@linaro.org \
--cc=pedro@palves.net \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).