diff options
Diffstat (limited to 'gdb/cli/cli-utils.h')
-rw-r--r-- | gdb/cli/cli-utils.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/gdb/cli/cli-utils.h b/gdb/cli/cli-utils.h index 0c25a7e..a77954c 100644 --- a/gdb/cli/cli-utils.h +++ b/gdb/cli/cli-utils.h @@ -149,17 +149,14 @@ remove_trailing_whitespace (const char *start, char *s) } /* A helper function to extract an argument from *ARG. An argument is - delimited by whitespace. The return value is either NULL if no - argument was found, or an xmalloc'd string. */ + delimited by whitespace. The return value is empty if no argument + was found. */ -extern char *extract_arg (char **arg); +extern std::string extract_arg (char **arg); -/* A const-correct version of the above. +/* A const-correct version of the above. */ - Since the returned value is xmalloc'd, it eventually needs to be - xfree'ed, which prevents us from making it const as well. */ - -extern char *extract_arg (const char **arg); +extern std::string extract_arg (const char **arg); /* A helper function that looks for an argument at the start of a string. The argument must also either be at the end of the string, |