[review] gdb/fortran: Add new 'info modules' command

Tom Tromey (Code Review) gerrit@gnutoolchain-gerrit.osci.io
Wed Oct 30 13:50:00 GMT 2019


Tom Tromey has posted comments on this change.

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


Patch Set 1: Code-Review+2

(3 comments)

Thanks.  This looks good.  I found some small nits.

https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/261/1/gdb/doc/gdb.texinfo 
File gdb/doc/gdb.texinfo:

https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/261/1/gdb/doc/gdb.texinfo@18789 
PS1, Line 18789: 
18780 | quote characters.  If needed, use backslash to escape the meaning
18781 | of special characters or quotes.
18782 | 
18783 | If both @var{regexp} and @var{type_regexp} are provided, an argument
18784 | is printed only if its name matches @var{regexp} and its type matches
18785 | @var{type_regexp}.
18786 | 
18787 | @kindex info modules
18788 | @cindex modules
18789 | @item info modules [-q] [@var{regexp}]

I think elsewhere we've used @r{[} and @r{]} for the brackets.


https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/261/1/gdb/symtab.c 
File gdb/symtab.c:

https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/261/1/gdb/symtab.c@4496 
PS1, Line 4496: 
4469 | search_symbols (const char *regexp, enum search_domain kind,
     | ...
4487 |     = {mst_file_bss, mst_text_gnu_ifunc, mst_unknown};
4488 |   enum minimal_symbol_type ourtype;
4489 |   enum minimal_symbol_type ourtype2;
4490 |   enum minimal_symbol_type ourtype3;
4491 |   enum minimal_symbol_type ourtype4;
4492 |   std::vector<symbol_search> result;
4493 |   gdb::optional<compiled_regex> preg;
4494 |   gdb::optional<compiled_regex> treg;
4495 | 
4496 |   gdb_assert (kind <= MODULES_DOMAIN);

Maybe this is more future-proof as `kind != ALL_DOMAIN`?


https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/261/1/gdb/symtab.c@4853 
PS1, Line 4853: 
4844 | symtab_symbol_info (bool quiet, bool exclude_minsyms,
4845 | 		    const char *regexp, enum search_domain kind,
4846 | 		    const char *t_regexp, int from_tty)
4847 | {
4848 |   static const char * const classnames[] =
4849 |     {"variable", "function", "type", "module"};
4850 |   const char *last_filename = "";
4851 |   int first = 1;
4852 | 
4853 |   gdb_assert (kind <= MODULES_DOMAIN);

Likewise.



-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I2b781dd5a06bcad04620ccdc45f01a0f711adfad
Gerrit-Change-Number: 261
Gerrit-PatchSet: 1
Gerrit-Owner: Andrew Burgess <andrew.burgess@embecosm.com>
Gerrit-Reviewer: Andrew Burgess <andrew.burgess@embecosm.com>
Gerrit-Reviewer: Tom Tromey <tromey@sourceware.org>
Gerrit-Comment-Date: Wed, 30 Oct 2019 13:50:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment



More information about the Gdb-patches mailing list