From: Tom de Vries <tdevries@suse.de>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH][gdb] Fix cc-with-dwz regression
Date: Fri, 21 Feb 2020 13:02:00 -0000 [thread overview]
Message-ID: <77ef6dfc-97a9-19a7-81be-bf179c358627@suse.de> (raw)
In-Reply-To: <87lfoxnr9t.fsf@tromey.com>
[-- Attachment #1: Type: text/plain, Size: 882 bytes --]
On 20-02-2020 17:43, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
>
> Tom> Hi,
> Tom> I noticed a regression with board cc-with-dwz:
> Tom> ...
> Tom> FAIL: gdb.cp/m-static.exp: static const int initialized elsewhere
> Tom> FAIL: gdb.cp/m-static.exp: info variable everywhere
> Tom> ...
>
> Tom> The problem started with commit 0494dbecdf "Consolidate partial symtab
> Tom> dependency reading".
>
> Thank you for doing this.
>
> Tom> The commit replaces the dwarf2_psymtab::expand_psymtab specific reading of
> Tom> dependencies, which contains a "dependencies[i]->user == NULL" test, with a
> Tom> generic partial_symtab::read_dependencies call, which does not test the user
> Tom> field.
>
> Can we simply add this to the base class?
> I think only the DWARF reader ever sets the "user" field anyway.
Ack, updated.
OK like this?
Thanks,
- Tom
[-- Attachment #2: 0001-gdb-Fix-cc-with-dwz-regression.patch --]
[-- Type: text/x-patch, Size: 1580 bytes --]
[gdb] Fix cc-with-dwz regression
I noticed a regression with board cc-with-dwz:
...
FAIL: gdb.cp/m-static.exp: static const int initialized elsewhere
FAIL: gdb.cp/m-static.exp: info variable everywhere
...
The problem started with commit 0494dbecdf "Consolidate partial symtab
dependency reading".
The commit replaces the dwarf2_psymtab::expand_psymtab specific reading of
dependencies, which contains a "dependencies[i]->user == NULL" test, with a
generic partial_symtab::read_dependencies call, which does not test the user
field.
This patch fixes the regression by adding back the test, in the generic
partial_symtab::read_dependencies.
Build and reg-tested on x86_64-linux.
Tested natively, as well as with boards cc-with-dwz and cc-with-dwz-m.
The patch fixes all 33 regressions with cc-with-dwz, and all 2929 regression
with cc-with-dwz-m.
gdb/ChangeLog:
2020-02-21 Tom de Vries <tdevries@suse.de>
PR gdb/25534
* psymtab.c (partial_symtab::read_dependencies): Don't read dependency
if dependencies[i]->user != NULL.
---
gdb/psymtab.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index 56576b3bce..fd7fc8feff 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -1688,7 +1688,8 @@ partial_symtab::read_dependencies (struct objfile *objfile)
{
for (int i = 0; i < number_of_dependencies; ++i)
{
- if (!dependencies[i]->readin_p ())
+ if (!dependencies[i]->readin_p ()
+ && dependencies[i]->user == NULL)
{
/* Inform about additional files to be read in. */
if (info_verbose)
next prev parent reply other threads:[~2020-02-21 13:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-20 14:25 Tom de Vries
2020-02-20 16:43 ` Tom Tromey
2020-02-21 13:02 ` Tom de Vries [this message]
2020-02-21 14:43 ` Tom Tromey
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=77ef6dfc-97a9-19a7-81be-bf179c358627@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/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