diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-08-09 14:57:30 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-08-09 14:57:30 +0000 |
commit | 03ad7f9247ba431b5079e4e526c166618b8c3e1f (patch) | |
tree | 0688ac43de01d9890d3284538769f4ad664bf85b /gdb/defs.h | |
parent | cff12bf115fab24d5db82e40f2ab818e47dc2d6d (diff) | |
download | gdb-03ad7f9247ba431b5079e4e526c166618b8c3e1f.tar.gz |
2003-08-09 Andrew Cagney <cagney@redhat.com>
* defs.h (xstrprintf): Declare.
* utils.c (xstrprintf): New function.
* breakpoint.c (insert_breakpoints): Replace sprintf and
non-literal format strings, with xstrprintf and cleanups.
(delete_breakpoint,breakpoint_re_set): Ditto.
(commands_command, insert_breakpoints): Ditto.
(bpstat_stop_status, break_at_finish_at_depth_command_1): Ditto.
(break_at_finish_command_1): Ditto.
Diffstat (limited to 'gdb/defs.h')
-rw-r--r-- | gdb/defs.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/defs.h b/gdb/defs.h index 86808e14cb3..59094972594 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -855,6 +855,9 @@ extern void xfree (void *); extern void xasprintf (char **ret, const char *format, ...) ATTR_FORMAT (printf, 2, 3); extern void xvasprintf (char **ret, const char *format, va_list ap); +/* Like asprintf, but return the string, throw an error if no memory. */ +extern char *xstrprintf (const char *format, ...) ATTR_FORMAT (printf, 1, 2); + extern int parse_escape (char **); /* Message to be printed before the error message, when an error occurs. */ |