This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[review] [gdb/symtab] Prefer var def over decl
- From: "Luis Machado (Code Review)" <gerrit at gnutoolchain-gerrit dot osci dot io>
- To: Tom de Vries <tdevries at suse dot de>, gdb-patches at sourceware dot org
- Cc: Andrew Burgess <andrew dot burgess at embecosm dot com>
- Date: Fri, 18 Oct 2019 09:31:16 -0400
- Subject: [review] [gdb/symtab] Prefer var def over decl
- Auto-submitted: auto-generated
- References: <gerrit.1571043046000.Id92326cb8ef9903b121ef9e320658eb565d0f5a9@gnutoolchain-gerrit.osci.io>
- Reply-to: luis dot machado at linaro dot org, tdevries at suse dot de, andrew dot burgess at embecosm dot com, gdb-patches at sourceware dot org
Luis Machado has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/29
......................................................................
Patch Set 2: Code-Review+1
(2 comments)
I've noticed a couple nits.
If PR91507 is fixed, do we need to patch GDB up? Or do we want to adapt GDB to the broken output from older GCC as well?
I'm inclined to at least add some comment to the code stating GCC's broken behavior and why we're fixing it in this particular way.
Otherwise this looks good to me.
https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/29/2/gdb/block.c
File gdb/block.c:
https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/29/2/gdb/block.c@737
PS2, Line 737: /* Return true if symbol A is a better match than symbol B for DOMAIN. */
The comment is a bit misleading. Maybe "Return symbol A if it is a better match than symbol B for DOMAIN. Otherwise return B."
It seems the default, if everything fails, is to return A? Maybe add that to the comment as well.
https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/29/2/gdb/testsuite/gdb.dwarf2/varval.exp
File gdb/testsuite/gdb.dwarf2/varval.exp:
https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/29/2/gdb/testsuite/gdb.dwarf2/varval.exp@209
PS2, Line 209:
Spurious new line?