gdb: Introduce global_symbol_searcher
authorAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 10 Oct 2019 09:48:01 +0000 (10:48 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 27 Nov 2019 12:01:47 +0000 (12:01 +0000)
commit470c0b1c9a1d69e3c4f9281600399b1dadd40614
treef4921dd9501d85702a5d164d042e874a25f49c73
parent7f3bf38453acbabf7286dd7f8ce2688282e7b9cd
gdb: Introduce global_symbol_searcher

Introduce a new class to wrap up the parameters needed for the
function search_symbols, which has now become a member function of
this new class.

The motivation is that search_symbols already takes a lot of
parameters, and a future commit is going to add even more.  This
commit hopefully makes collecting the state required for a search
easier.

As part of this conversion the list of filenames in which to search
has been converted to a std::vector.

There should be no user visible changes after this commit.

gdb/ChangeLog:

* python/python.c (gdbpy_rbreak): Convert to using
global_symbol_searcher.
* symtab.c (file_matches): Convert return type to bool, change
file list to std::vector, update header comment.
(search_symbols): Rename to...
(global_symbol_searcher::search): ...this and update now its
a member function of global_symbol_searcher.  Take account of the
changes to file_matches.
(symtab_symbol_info): Convert to using global_symbol_searcher.
(rbreak_command): Likewise.
(search_module_symbols): Likewise.
* symtab.h (enum symbol_search): Update comment.
(search_symbols): Remove declaration.
(class global_symbol_searcher): New class.

Change-Id: I488ab292a892d9e9e84775c632c5f198b6ad3710
gdb/ChangeLog
gdb/python/python.c
gdb/symtab.c
gdb/symtab.h
This page took 0.024357 seconds and 4 git commands to generate.