]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: Split print_symbol_info into two parts
authorAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 24 Sep 2019 22:22:05 +0000 (23:22 +0100)
committerSimon Marchi <simon.marchi@polymtl.ca>
Thu, 21 Nov 2019 04:11:40 +0000 (23:11 -0500)
commitce8ccaa665ee9c235dffc179f9e8fc047fad9548
tree754d6e1ecdff6d3e6481f12032cfa770900fae87
parent2c05882ed4ac31c21cd07b8ce28cdbcb423764bf
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
gdb/ChangeLog
gdb/symtab.c
gdb/symtab.h