diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2019-09-24 23:22:05 +0100 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2019-11-27 12:01:48 +0000 |
commit | 5f512a7dd0df1205630e9edfaa84f2e9a8fb8771 (patch) | |
tree | cedd04985fcb599854b25e0f5dc7b2cc4147b7c2 /gdb/symtab.h | |
parent | 470c0b1c9a1d69e3c4f9281600399b1dadd40614 (diff) | |
download | binutils-5f512a7dd0df1205630e9edfaa84f2e9a8fb8771.zip binutils-5f512a7dd0df1205630e9edfaa84f2e9a8fb8771.tar.gz binutils-5f512a7dd0df1205630e9edfaa84f2e9a8fb8771.tar.bz2 |
gdb: Split print_symbol_info into two parts
Split the function print_symbol_info into two parts, the new worker
core returns a string, which print_symbol_info then prints. This will
be useful in a later commit when some new MI commands will be added
which will use the worker core to fill some MI output fields.
There should be no user visible changes after this commit.
gdb/ChangeLog:
* symtab.c (symbol_to_info_string): New function, most content
moved from print_symbol_info, but updated to return a std::string.
(print_symbol_info): Update to use symbol_to_info_string and print
returned string.
* symtab.h (symbol_to_info_string): Declare new function.
Change-Id: I6454ce43cacb61d32fbadb9e3655e70823085777
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r-- | gdb/symtab.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h index 680c334..a52f2a5 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -2140,6 +2140,14 @@ extern std::vector<module_symbol_search> search_module_symbols (const char *module_regexp, const char *regexp, const char *type_regexp, search_domain kind); +/* Convert a global or static symbol SYM (based on BLOCK, which should be + either GLOBAL_BLOCK or STATIC_BLOCK) into a string for use in 'info' + type commands (e.g. 'info variables', 'info functions', etc). KIND is + the type of symbol that was searched for which gave us SYM. */ + +extern std::string symbol_to_info_string (struct symbol *sym, int block, + enum search_domain kind); + extern bool treg_matches_sym_type_name (const compiled_regex &treg, const struct symbol *sym); |