From: Pedro Alves <pedro@palves.net>
To: Gary Benson <gbenson@redhat.com>, Luis Machado <luis.machado@linaro.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2] Reject ambiguous C++ field accesses
Date: Mon, 12 Oct 2020 18:12:51 +0100 [thread overview]
Message-ID: <4485500b-c151-225c-ff46-9842b5fbc2f0@palves.net> (raw)
In-Reply-To: <517539b0-54de-7196-9ef6-81c88a0b5f0b@palves.net>
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 Alves
next prev parent reply other threads:[~2020-10-12 17:13 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 [this message]
2020-10-13 8:47 ` Gary Benson via Gdb-patches
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=4485500b-c151-225c-ff46-9842b5fbc2f0@palves.net \
--to=pedro@palves.net \
--cc=gbenson@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=luis.machado@linaro.org \
/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