aboutsummaryrefslogtreecommitdiff
path: root/gdb/defs.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-08-09 14:57:30 +0000
committerAndrew Cagney <cagney@redhat.com>2003-08-09 14:57:30 +0000
commit9ebf4acf536cf0f7583ac669ee55bcdeb12296b3 (patch)
tree5e71a10d8d7a02c80176e6c3ab10bf35538313c1 /gdb/defs.h
parent3771659b8b8b47b9fe8247afbbf5a7da9431a4d0 (diff)
downloadgdb-9ebf4acf536cf0f7583ac669ee55bcdeb12296b3.zip
gdb-9ebf4acf536cf0f7583ac669ee55bcdeb12296b3.tar.gz
gdb-9ebf4acf536cf0f7583ac669ee55bcdeb12296b3.tar.bz2
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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/defs.h b/gdb/defs.h
index 86808e1..5909497 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. */