]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/symtab.c
Fix regression 'info variables' does not show minimal symbols.
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Tue, 30 Oct 2018 20:20:52 +0000 (21:20 +0100)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Tue, 20 Nov 2018 20:54:39 +0000 (21:54 +0100)
commita8462bbf0bb1c2ef55c87d32bfde6d0a962de87c
treebd73dbb6f91a5fe7d5a709f5f14f838a105c02ae
parent4399bce99b9d1b4e52c386a1953c53337d22b457
Fix regression 'info variables' does not show minimal symbols.

12615cba8411c8 Add [-q] [-t TYPEREGEXP] [NAMEREGEXP] args to info [args|functions|locals|variables]
introduced a regression that minimal symbols were not listed anymore, due to a wrong
condition checking the absence of a type regexp in the loop scanning the minimal symbols.

Instead, before entering the loop scanning the minimal symbols, check that we
do not have a type regexp, as we will never match a minimal symbol with
this type regexp.

With the fix in this patch, for this part of the code, we basically go back
to the GDB 8.2 logic, with just the addition of
  && !treg.has_value ())
to 'enter' in the minsym case.
This should ensure that at least there is no regression compared to 8.2,
when not using the new type matching argument, as there was no treg in 8.2.

2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

* symtab.c (search_symbols): Properly check absence of type regexp
before entering the loop scanning the minimal symbols.
gdb/ChangeLog
gdb/symtab.c