aboutsummaryrefslogtreecommitdiff
path: root/gdb/defs.h
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2010-05-02 21:14:59 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2010-05-02 21:14:59 +0000
commita0b31db1be5fd8d14d9279fcb1672c9e0aa4ab24 (patch)
tree901b40b39a9c80a61339aa3e94c5fffef6f126be /gdb/defs.h
parent02a45ac0286988ad48c8ddbd430a1dede51036e1 (diff)
downloadgdb-a0b31db1be5fd8d14d9279fcb1672c9e0aa4ab24.zip
gdb-a0b31db1be5fd8d14d9279fcb1672c9e0aa4ab24.tar.gz
gdb-a0b31db1be5fd8d14d9279fcb1672c9e0aa4ab24.tar.bz2
gdb/
* ada-lang.c (lim_warning): Change ATTR_FORMAT to ATTRIBUTE_PRINTF. * amd64-tdep.c (amd64_insn_length_fprintf): Likewise. * cli-out.c (cli_field_fmt): New ATTRIBUTE_PRINTF. (cli_message, out_field_fmt): Change ATTR_FORMAT to ATTRIBUTE_PRINTF. * complaints.c (find_complaint): New ATTRIBUTE_PRINTF. (vcomplaint): Change ATTR_FORMAT to ATTRIBUTE_PRINTF. * complaints.h (complaint, internal_complaint): Likewise. * defs.h: Change ATTR_FORMAT to ATTRIBUTE_PRINTF in the top comment. (ATTR_FORMAT): Remove. (query, nquery, yquery, vprintf_filtered, vfprintf_filtered) (fprintf_filtered, fprintfi_filtered, printf_filtered, printfi_filtered) (vprintf_unfiltered, vfprintf_unfiltered, fprintf_unfiltered) (printf_unfiltered, xasprintf, xvasprintf, xstrprintf, xstrvprintf) (xsnprintf, verror, error, vfatal, fatal, internal_verror) (internal_error, internal_vwarning, internal_warning, warning) (vwarning): Change ATTR_FORMAT to ATTRIBUTE_PRINTF. * disasm.c (fprintf_disasm): Likewise. * exceptions.c (throw_it): Likewise. * exceptions.h (exception_fprintf, throw_verror, throw_vfatal) (throw_error): Likewise. * language.h (type_error, range_error): Likewise. * linespec.c (cplusplus_error): Likewise. * mi/mi-interp.c (mi_interp_query_hook): Likewise. * mi/mi-out.c (mi_field_fmt, mi_message): Likewise. * monitor.c (monitor_debug): Likewise. * parser-defs.h (parser_fprintf): Likewise. * serial.h (serial_printf): Likewise. * tui/tui-hooks.c (tui_query_hook): Likewise. * ui-out.c (default_field_fmt, default_message, uo_field_fmt) (uo_message): Likewise. * ui-out.h (ui_out_field_fmt, ui_out_message): Likewise. * utils.c (vfprintf_maybe_filtered, internal_vproblem, defaulted_query): Likewise. * xml-support.h (gdb_xml_debug, gdb_xml_error): Likewise.
Diffstat (limited to 'gdb/defs.h')
-rw-r--r--gdb/defs.h67
1 files changed, 30 insertions, 37 deletions
diff --git a/gdb/defs.h b/gdb/defs.h
index 71e8b3a..c58f698 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -1,4 +1,5 @@
-/* *INDENT-OFF* */ /* ATTR_FORMAT confuses indent, avoid running it for now */
+/* *INDENT-OFF* */ /* ATTRIBUTE_PRINTF confuses indent, avoid running it
+ for now. */
/* Basic, host-specific, and target-specific definitions for GDB.
Copyright (C) 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009,
@@ -296,14 +297,6 @@ struct cleanup
#endif
#endif
-#ifndef ATTR_FORMAT
-#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 4))
-#define ATTR_FORMAT(type, x, y) __attribute__ ((format(type, x, y)))
-#else
-#define ATTR_FORMAT(type, x, y) /* nothing */
-#endif
-#endif
-
/* Be conservative and use enum bitfields only with GCC.
This is copied from gcc 3.3.1, system.h. */
@@ -404,9 +397,9 @@ extern void null_cleanup (void *);
extern int myread (int, char *, int);
-extern int query (const char *, ...) ATTR_FORMAT (printf, 1, 2);
-extern int nquery (const char *, ...) ATTR_FORMAT (printf, 1, 2);
-extern int yquery (const char *, ...) ATTR_FORMAT (printf, 1, 2);
+extern int query (const char *, ...) ATTRIBUTE_PRINTF (1, 2);
+extern int nquery (const char *, ...) ATTRIBUTE_PRINTF (1, 2);
+extern int yquery (const char *, ...) ATTRIBUTE_PRINTF (1, 2);
extern void init_page_info (void);
@@ -492,25 +485,25 @@ extern void puts_filtered_tabular (char *string, int width, int right);
extern void puts_debug (char *prefix, char *string, char *suffix);
-extern void vprintf_filtered (const char *, va_list) ATTR_FORMAT (printf, 1, 0);
+extern void vprintf_filtered (const char *, va_list) ATTRIBUTE_PRINTF (1, 0);
-extern void vfprintf_filtered (struct ui_file *, const char *, va_list) ATTR_FORMAT (printf, 2, 0);
+extern void vfprintf_filtered (struct ui_file *, const char *, va_list) ATTRIBUTE_PRINTF (2, 0);
-extern void fprintf_filtered (struct ui_file *, const char *, ...) ATTR_FORMAT (printf, 2, 3);
+extern void fprintf_filtered (struct ui_file *, const char *, ...) ATTRIBUTE_PRINTF (2, 3);
-extern void fprintfi_filtered (int, struct ui_file *, const char *, ...) ATTR_FORMAT (printf, 3, 4);
+extern void fprintfi_filtered (int, struct ui_file *, const char *, ...) ATTRIBUTE_PRINTF (3, 4);
-extern void printf_filtered (const char *, ...) ATTR_FORMAT (printf, 1, 2);
+extern void printf_filtered (const char *, ...) ATTRIBUTE_PRINTF (1, 2);
-extern void printfi_filtered (int, const char *, ...) ATTR_FORMAT (printf, 2, 3);
+extern void printfi_filtered (int, const char *, ...) ATTRIBUTE_PRINTF (2, 3);
-extern void vprintf_unfiltered (const char *, va_list) ATTR_FORMAT (printf, 1, 0);
+extern void vprintf_unfiltered (const char *, va_list) ATTRIBUTE_PRINTF (1, 0);
-extern void vfprintf_unfiltered (struct ui_file *, const char *, va_list) ATTR_FORMAT (printf, 2, 0);
+extern void vfprintf_unfiltered (struct ui_file *, const char *, va_list) ATTRIBUTE_PRINTF (2, 0);
-extern void fprintf_unfiltered (struct ui_file *, const char *, ...) ATTR_FORMAT (printf, 2, 3);
+extern void fprintf_unfiltered (struct ui_file *, const char *, ...) ATTRIBUTE_PRINTF (2, 3);
-extern void printf_unfiltered (const char *, ...) ATTR_FORMAT (printf, 1, 2);
+extern void printf_unfiltered (const char *, ...) ATTRIBUTE_PRINTF (1, 2);
extern void print_spaces (int, struct ui_file *);
@@ -900,19 +893,19 @@ extern void *xzalloc (size_t);
/* Like asprintf/vasprintf but get an internal_error if the call
fails. */
-extern void xasprintf (char **ret, const char *format, ...) ATTR_FORMAT (printf, 2, 3);
+extern void xasprintf (char **ret, const char *format, ...) ATTRIBUTE_PRINTF (2, 3);
extern void xvasprintf (char **ret, const char *format, va_list ap)
- ATTR_FORMAT (printf, 2, 0);
+ ATTRIBUTE_PRINTF (2, 0);
/* Like asprintf and vasprintf, but return the string, throw an error
if no memory. */
-extern char *xstrprintf (const char *format, ...) ATTR_FORMAT (printf, 1, 2);
+extern char *xstrprintf (const char *format, ...) ATTRIBUTE_PRINTF (1, 2);
extern char *xstrvprintf (const char *format, va_list ap)
- ATTR_FORMAT (printf, 1, 0);
+ ATTRIBUTE_PRINTF (1, 0);
/* Like snprintf, but throw an error if the output buffer is too small. */
extern int xsnprintf (char *str, size_t size, const char *format, ...)
- ATTR_FORMAT (printf, 3, 4);
+ ATTRIBUTE_PRINTF (3, 4);
extern int parse_escape (struct gdbarch *, char **);
@@ -929,36 +922,36 @@ extern char *quit_pre_print;
extern char *warning_pre_print;
extern NORETURN void verror (const char *fmt, va_list ap)
- ATTR_NORETURN ATTR_FORMAT (printf, 1, 0);
+ ATTR_NORETURN ATTRIBUTE_PRINTF (1, 0);
-extern NORETURN void error (const char *fmt, ...) ATTR_NORETURN ATTR_FORMAT (printf, 1, 2);
+extern NORETURN void error (const char *fmt, ...) ATTR_NORETURN ATTRIBUTE_PRINTF (1, 2);
extern NORETURN void error_stream (struct ui_file *) ATTR_NORETURN;
extern NORETURN void vfatal (const char *fmt, va_list ap)
- ATTR_NORETURN ATTR_FORMAT (printf, 1, 0);
+ ATTR_NORETURN ATTRIBUTE_PRINTF (1, 0);
-extern NORETURN void fatal (const char *fmt, ...) ATTR_NORETURN ATTR_FORMAT (printf, 1, 2);
+extern NORETURN void fatal (const char *fmt, ...) ATTR_NORETURN ATTRIBUTE_PRINTF (1, 2);
extern NORETURN void internal_verror (const char *file, int line,
const char *, va_list ap)
- ATTR_NORETURN ATTR_FORMAT (printf, 3, 0);
+ ATTR_NORETURN ATTRIBUTE_PRINTF (3, 0);
extern NORETURN void internal_error (const char *file, int line,
- const char *, ...) ATTR_NORETURN ATTR_FORMAT (printf, 3, 4);
+ const char *, ...) ATTR_NORETURN ATTRIBUTE_PRINTF (3, 4);
extern void internal_vwarning (const char *file, int line,
const char *, va_list ap)
- ATTR_FORMAT (printf, 3, 0);
+ ATTRIBUTE_PRINTF (3, 0);
extern void internal_warning (const char *file, int line,
- const char *, ...) ATTR_FORMAT (printf, 3, 4);
+ const char *, ...) ATTRIBUTE_PRINTF (3, 4);
extern NORETURN void nomem (long) ATTR_NORETURN;
-extern void warning (const char *, ...) ATTR_FORMAT (printf, 1, 2);
+extern void warning (const char *, ...) ATTRIBUTE_PRINTF (1, 2);
-extern void vwarning (const char *, va_list args) ATTR_FORMAT (printf, 1, 0);
+extern void vwarning (const char *, va_list args) ATTRIBUTE_PRINTF (1, 0);
/* List of known OS ABIs. If you change this, make sure to update the
table in osabi.c. */