[RFA 7/8] Use unique_xmalloc_ptr in execute_gdb_command
Fri Dec 2 14:49:00 GMT 2016
On 11/29/2016 05:05 AM, Tom Tromey wrote:
> This replaces a cleanup in execute_gdb_command with an instance of
> unique_xmalloc_ptr. std::string was not used because execute_command
> and execute_command_to_string don't accept a "const char *" (in fact
> the reason for copying the string at all).
You can do:
std::string copy (arg);
to_string_res = execute_command_to_string (©, from_tty);
That's fine in C++11.
More information about the Gdb-patches