binutils-gdb/gdb/cli
Simon Marchi 5d10a2041e gdb: add string_file::release method
A common pattern for string_file is to want to move out the internal
string buffer, because it is the result of the computation that we want
to return.  It is the reason why string_file::string returns a non-const
reference, as explained in the comment.  I think it would make sense to
have a dedicated method for that instead and make string_file::string
return a const reference.

This allows removing the explicit std::move in the typical case.  Note
that compile_program::compute was missing a move, meaning that the
resulting string was copied.  With the new version, it's not possible to
forget to move.

Change-Id: Ieaefa35b73daa7930b2f3a26988b6e3b4121bb79
2022-01-26 10:01:40 -05:00
..
cli-cmds.c Move gdb_regex to gdbsupport 2022-01-18 10:14:43 -07:00
cli-cmds.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
cli-decode.c Fix another crash with gdb parameters in Python 2022-01-26 06:49:51 -07:00
cli-decode.h Move gdb_regex to gdbsupport 2022-01-18 10:14:43 -07:00
cli-dump.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
cli-interp.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
cli-interp.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
cli-logging.c Use filtered output in ordinary commands 2022-01-05 11:36:33 -07:00
cli-option.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
cli-option.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
cli-script.c Simplify execute_control_commands_to_string 2022-01-05 10:19:45 -07:00
cli-script.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
cli-setshow.c gdb: add string_file::release method 2022-01-26 10:01:40 -05:00
cli-setshow.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
cli-style.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
cli-style.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
cli-utils.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
cli-utils.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00