gdb/fortran: Don't include module symbols when searching for types
authorAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 9 Jul 2019 14:49:07 +0000 (15:49 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 28 Aug 2019 12:33:55 +0000 (13:33 +0100)
commitd8f27c6018adbb32a3ebba39a5abac44a6b9e67c
treea5f5fecd2027826bd2b9cea0a51a9530b54b53cb
parent1f20c35ea4a0095e6a9d9b7819f6c437a0c4cfc1
gdb/fortran: Don't include module symbols when searching for types

Currently the 'info types' command will return symbols that correspond
to Fortran modules.  This is because the symbols are created with
domain MODULE_DOMAIN and address_class LOC_TYPEDEF.  The address_class
LOC_TYPEDEF is the same address_class used for type symbols which is
why the modules show up when listing types.

This commit explicitly prevents symbols in the MODULE_DOMAIN from
appearing when we search for symbols in the TYPES_DOMAIN, this
prevents the Fortran module symbols from appearing in the output of
'info types'.

gdb/ChangeLog:

* symtab.c (search_symbols): Don't include MODULE_DOMAIN symbols
when searching for types.

gdb/testsuite/ChangeLog:

* gdb.fortran/info-types.exp: Add module.
* gdb.fortran/info-types.f90: Update expected results.
gdb/ChangeLog
gdb/symtab.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.fortran/info-types.exp
gdb/testsuite/gdb.fortran/info-types.f90
This page took 0.024436 seconds and 4 git commands to generate.