diff options
Diffstat (limited to 'gdb/utils.c')
-rw-r--r-- | gdb/utils.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/utils.c b/gdb/utils.c index a7c22ee..ae28c04 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -1178,6 +1178,17 @@ xfree (void *ptr) /* Like asprintf/vasprintf but get an internal_error if the call fails. */ +char * +xstrprintf (const char *format, ...) +{ + char *ret; + va_list args; + va_start (args, format); + xvasprintf (&ret, format, args); + va_end (args); + return ret; +} + void xasprintf (char **ret, const char *format, ...) { |