mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-17 16:05:56 +08:00
Make target_options_to_string return an std::string
Return an std::string instead of a char *, saving some manual freeing. I only manually tested with "set debug target 1" and "set debug lin-lwp 1", since this only deals with debug output. gdb/ChangeLog: * target.h (target_options_to_string): Return an std::string. * target.c (str_comma_list_concat_elem): Return void, use std::string. (do_option): Likewise. (target_options_to_string): Return an std::string. * linux-nat.c (linux_nat_target::wait): Adjust. * target-debug.h (target_debug_print_options): Adjust.
This commit is contained in:
@ -203,10 +203,9 @@ target_debug_print_struct_target_waitstatus_p (struct target_waitstatus *status)
|
||||
static void
|
||||
target_debug_print_options (int options)
|
||||
{
|
||||
char *str = target_options_to_string (options);
|
||||
std::string str = target_options_to_string (options);
|
||||
|
||||
fputs_unfiltered (str, gdb_stdlog);
|
||||
xfree (str);
|
||||
fputs_unfiltered (str.c_str (), gdb_stdlog);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user