[review v3] [gdb/symtab] Prefer var def over decl

Joel Brobecker (Code Review) gerrit@gnutoolchain-gerrit.osci.io
Mon Nov 11 16:45:00 GMT 2019


Joel Brobecker has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/29
......................................................................


Patch Set 3:

> > > The patch itself seems perfectly fine to me.  I appreciated the comment
> > > and the test case -- those help a lot.
> > > 
> > > However, I wonder why gdb is even making a symbol for a declaration in the
> > > first place.  For some other kinds of declarations, gdb doesn't bother, so
> > > I was wondering if it's possible to simply ignore them in general.
> > 
> > Another way to ask the same question is what would it mean to have a type which has a declaration, but no definition. Wouldn't we still want to know about that type?
> 
> The thing with types is that we can list them using info types, which makes them visible.
> 
> Variable declarations by themselves are not visible, only variable definitions. But the declaration can help to add information that's not available at the definition, as I've tried to explain in more detail at the previous comment.

At this stage of the discussion, I think it shows that the subject is a little bit delicate and maybe we should start viewing the resolution for the 9.x branch separately from the resolution in master, because 9.x should be imminent.

For me, the current patch is OK for 9.x, as it seems its impact is relatively controlled.

The ignore.patch fix, on the other hand, seems a little too risky for inclusion this late before we branch 9.x.


-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: Id92326cb8ef9903b121ef9e320658eb565d0f5a9
Gerrit-Change-Number: 29
Gerrit-PatchSet: 3
Gerrit-Owner: Tom de Vries <tdevries@suse.de>
Gerrit-Reviewer: Andrew Burgess <andrew.burgess@embecosm.com>
Gerrit-Reviewer: Luis Machado <luis.machado@linaro.org>
Gerrit-Reviewer: Tom de Vries <tdevries@suse.de>
Gerrit-CC: Joel Brobecker <brobecker@adacore.com>
Gerrit-CC: Tom Tromey <tromey@sourceware.org>
Gerrit-Comment-Date: Mon, 11 Nov 2019 16:45:16 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment



More information about the Gdb-patches mailing list