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:
parent
b825f3a90e
commit
09ce46f230
5 changed files with 31 additions and 32 deletions
|
@ -116,9 +116,8 @@ struct syscall
|
|||
const char *name;
|
||||
};
|
||||
|
||||
/* Return a pretty printed form of TARGET_OPTIONS.
|
||||
Space for the result is malloc'd, caller must free. */
|
||||
extern char *target_options_to_string (int target_options);
|
||||
/* Return a pretty printed form of TARGET_OPTIONS. */
|
||||
extern std::string target_options_to_string (int target_options);
|
||||
|
||||
/* Possible types of events that the inferior handler will have to
|
||||
deal with. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue