From: Andrew Burgess <andrew.burgess@embecosm.com>
To: Tom de Vries <tdevries@suse.de>
Cc: Sterling Augustine <saugustine@google.com>,
Eric Christopher <echristo@gmail.com>,
gdb-patches <gdb-patches@sourceware.org>
Subject: Re: Recent commit in binutils-gdb
Date: Thu, 30 Apr 2020 14:24:27 +0100 [thread overview]
Message-ID: <20200430132427.GM3522@embecosm.com> (raw)
In-Reply-To: <725b0ecd-7cfe-b93e-f9c8-953fca8c2502@suse.de>
* Tom de Vries <tdevries@suse.de> [2020-04-30 07:49:56 +0200]:
> On 30-04-2020 06:10, Sterling Augustine via Gdb-patches wrote:
> > The commit was proposed here:
> >
> > https://sourceware.org/pipermail/gdb/2020-March/000012.html
> >
>
> With reproducer:
> ...
> $ cat b.cpp
> namespace hide { struct Bar { int y; }; }
> struct Foo { hide::Bar* b; };
>
> inline void x() { hide::Bar b; }
>
> static Foo aFoo;
>
> void * f() {
> return aFoo.b;
> }
>
> int main() {
> f();
> return 0;
> }
> $ g++ -fdebug-types-section b.cpp -g
> $ ./build/gdb/gdb -ex "b f" -ex run -ex "ptype hide::Bar" ./a.out
> ...
>
> I can reproduce this problem before the recent commit 770479f223e "gdb:
> Fix toplevel types with -fdebug-types-section", but not after.
>
> Also, when I revert commit 770479f223e, and leave this one in place, it
> doesn't fix the problem. That seems to be because the proposed commit:
> ...
> @@ -10954,6 +10954,7 @@ dwarf2_cu::setup_type_unit_groups (struct
> die_info *die)
> compunit_language (cust),
> 0, cust));
>
> + list_in_scope = get_builder ()->get_file_symbols ();
> auto &file_names = line_header->file_names ();
> for (i = 0; i < file_names.size (); ++i)
> {
> ...
> and the actual commit differ (note the different in context before):
> ...
> @@ -10942,6 +10942,7 @@ dwarf2_cu::setup_type_unit_groups (struct
> die_info *die)
> = XOBNEWVEC (&COMPUNIT_OBJFILE (cust)->objfile_obstack,
> struct symtab *, line_header->file_names_size ());
>
> + list_in_scope = get_builder ()->get_file_symbols ();
> auto &file_names = line_header->file_names ();
> for (i = 0; i < file_names.size (); ++i)
> {
> ...
>
> In summary, the problem was fixed by an earlier commit, and this commit
> was misapplied. I think we should probably revert this one.
FWIW I agree.
Thanks,
Andrew
next prev parent reply other threads:[~2020-04-30 13:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-30 0:50 Simon Marchi
2020-04-30 1:57 ` Eric Christopher
2020-04-30 4:10 ` Sterling Augustine
2020-04-30 5:49 ` Tom de Vries
2020-04-30 13:24 ` Andrew Burgess [this message]
2020-04-30 17:01 ` Tom de Vries
2020-04-30 19:24 ` Eric Christopher
2020-04-30 16:17 ` Simon Marchi
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=20200430132427.GM3522@embecosm.com \
--to=andrew.burgess@embecosm.com \
--cc=echristo@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=saugustine@google.com \
--cc=tdevries@suse.de \
/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