diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-05-02 21:14:59 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-05-02 21:14:59 +0000 |
commit | a0b31db1be5fd8d14d9279fcb1672c9e0aa4ab24 (patch) | |
tree | 901b40b39a9c80a61339aa3e94c5fffef6f126be /gdb | |
parent | 02a45ac0286988ad48c8ddbd430a1dede51036e1 (diff) | |
download | gdb-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')
-rw-r--r-- | gdb/ChangeLog | 37 | ||||
-rw-r--r-- | gdb/ada-lang.c | 2 | ||||
-rw-r--r-- | gdb/amd64-tdep.c | 2 | ||||
-rw-r--r-- | gdb/cli-out.c | 6 | ||||
-rw-r--r-- | gdb/complaints.c | 4 | ||||
-rw-r--r-- | gdb/complaints.h | 4 | ||||
-rw-r--r-- | gdb/defs.h | 67 | ||||
-rw-r--r-- | gdb/disasm.c | 2 | ||||
-rw-r--r-- | gdb/exceptions.c | 2 | ||||
-rw-r--r-- | gdb/exceptions.h | 8 | ||||
-rw-r--r-- | gdb/language.h | 4 | ||||
-rw-r--r-- | gdb/linespec.c | 2 | ||||
-rw-r--r-- | gdb/mi/mi-interp.c | 2 | ||||
-rw-r--r-- | gdb/mi/mi-out.c | 4 | ||||
-rw-r--r-- | gdb/monitor.c | 2 | ||||
-rw-r--r-- | gdb/parser-defs.h | 2 | ||||
-rw-r--r-- | gdb/serial.h | 2 | ||||
-rw-r--r-- | gdb/tui/tui-hooks.c | 2 | ||||
-rw-r--r-- | gdb/ui-out.c | 8 | ||||
-rw-r--r-- | gdb/ui-out.h | 4 | ||||
-rw-r--r-- | gdb/utils.c | 6 | ||||
-rw-r--r-- | gdb/xml-support.h | 4 |
22 files changed, 103 insertions, 73 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2871572..96a88e5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,40 @@ +2010-05-02 Jan Kratochvil <jan.kratochvil@redhat.com> + + * 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. + 2010-05-02 Pedro Alves <pedro@codesourcery.com> * cli-out.c (cli_table_begin, cli_table_body, cli_table_end) diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 9da0609..7238a44 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -501,7 +501,7 @@ cond_offset_target (CORE_ADDR address, long offset) /* FIXME: cagney/2004-10-10: This function is mimicking the behavior provided by "complaint". */ -static void lim_warning (const char *format, ...) ATTR_FORMAT (printf, 1, 2); +static void lim_warning (const char *format, ...) ATTRIBUTE_PRINTF (1, 2); static void lim_warning (const char *format, ...) diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index b0926ad..21d66c5 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -1026,7 +1026,7 @@ amd64_skip_prefixes (gdb_byte *insn) This function is a nop, we don't want to print anything, we just want to compute the length of the insn. */ -static int ATTR_FORMAT (printf, 2, 3) +static int ATTRIBUTE_PRINTF (2, 3) amd64_insn_length_fprintf (void *stream, const char *format, ...) { return 0; diff --git a/gdb/cli-out.c b/gdb/cli-out.c index 67a8a22..b284a4b 100644 --- a/gdb/cli-out.c +++ b/gdb/cli-out.c @@ -38,7 +38,7 @@ static void field_separator (void); static void out_field_fmt (struct ui_out *uiout, int fldno, const char *fldname, - const char *format,...) ATTR_FORMAT (printf, 4, 5); + const char *format,...) ATTRIBUTE_PRINTF (4, 5); /* These are the CLI output functions */ @@ -209,7 +209,7 @@ cli_field_string (struct ui_out *uiout, /* This is the only field function that does not align. */ -static void +static void ATTRIBUTE_PRINTF (6, 0) cli_field_fmt (struct ui_out *uiout, int fldno, int width, enum ui_align align, const char *fldname, @@ -244,7 +244,7 @@ cli_text (struct ui_out *uiout, const char *string) fputs_filtered (string, data->stream); } -static void ATTR_FORMAT (printf, 3,0) +static void ATTRIBUTE_PRINTF (3, 0) cli_message (struct ui_out *uiout, int verbosity, const char *format, va_list args) { diff --git a/gdb/complaints.c b/gdb/complaints.c index 16495f2..fa63418 100644 --- a/gdb/complaints.c +++ b/gdb/complaints.c @@ -120,7 +120,7 @@ get_complaints (struct complaints **c) return (*c); } -static struct complain * +static struct complain * ATTRIBUTE_PRINTF (4, 0) find_complaint (struct complaints *complaints, const char *file, int line, const char *fmt) { @@ -164,7 +164,7 @@ static int stop_whining = 0; /* Print a complaint, and link the complaint block into a chain for later handling. */ -static void ATTR_FORMAT (printf, 4, 0) +static void ATTRIBUTE_PRINTF (4, 0) vcomplaint (struct complaints **c, const char *file, int line, const char *fmt, va_list args) { diff --git a/gdb/complaints.h b/gdb/complaints.h index 54222ca..4ff8d9b 100644 --- a/gdb/complaints.h +++ b/gdb/complaints.h @@ -31,10 +31,10 @@ extern struct complaints *symfile_complaints; /* Register a complaint. */ extern void complaint (struct complaints **complaints, const char *fmt, - ...) ATTR_FORMAT (printf, 2, 3); + ...) ATTRIBUTE_PRINTF (2, 3); extern void internal_complaint (struct complaints **complaints, const char *file, int line, const char *fmt, - ...) ATTR_FORMAT (printf, 4, 5); + ...) ATTRIBUTE_PRINTF (4, 5); /* Clear out / initialize all complaint counters that have ever been incremented. If LESS_VERBOSE is 1, be less verbose about @@ -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. */ diff --git a/gdb/disasm.c b/gdb/disasm.c index 9abd119..0e43b0f 100644 --- a/gdb/disasm.c +++ b/gdb/disasm.c @@ -335,7 +335,7 @@ do_assembly_only (struct gdbarch *gdbarch, struct ui_out *uiout, /* Initialize the disassemble info struct ready for the specified stream. */ -static int ATTR_FORMAT (printf, 2, 3) +static int ATTRIBUTE_PRINTF (2, 3) fprintf_disasm (void *stream, const char *format, ...) { va_list args; diff --git a/gdb/exceptions.c b/gdb/exceptions.c index 6dd0156..5f67224 100644 --- a/gdb/exceptions.c +++ b/gdb/exceptions.c @@ -374,7 +374,7 @@ print_any_exception (struct ui_file *file, const char *prefix, } } -NORETURN static void ATTR_NORETURN ATTR_FORMAT (printf, 3, 0) +NORETURN static void ATTR_NORETURN ATTRIBUTE_PRINTF (3, 0) throw_it (enum return_reason reason, enum errors error, const char *fmt, va_list ap) { diff --git a/gdb/exceptions.h b/gdb/exceptions.h index 6b3cbeb..e5b8ade 100644 --- a/gdb/exceptions.h +++ b/gdb/exceptions.h @@ -153,7 +153,7 @@ int exceptions_state_mc_action_iter_1 (void); extern void exception_print (struct ui_file *file, struct gdb_exception e); extern void exception_fprintf (struct ui_file *file, struct gdb_exception e, const char *prefix, - ...) ATTR_FORMAT (printf, 3, 4); + ...) ATTRIBUTE_PRINTF (3, 4); /* Throw an exception (as described by "struct gdb_exception"). Will execute a LONG JUMP to the inner most containing exception handler @@ -168,11 +168,11 @@ extern void exception_fprintf (struct ui_file *file, struct gdb_exception e, extern NORETURN void throw_exception (struct gdb_exception exception) ATTR_NORETURN; extern NORETURN void throw_verror (enum errors, const char *fmt, va_list ap) - ATTR_NORETURN ATTR_FORMAT (printf, 2, 0); + ATTR_NORETURN ATTRIBUTE_PRINTF (2, 0); extern NORETURN void throw_vfatal (const char *fmt, va_list ap) - ATTR_NORETURN ATTR_FORMAT (printf, 1, 0); + ATTR_NORETURN ATTRIBUTE_PRINTF (1, 0); extern NORETURN void throw_error (enum errors error, const char *fmt, - ...) ATTR_NORETURN ATTR_FORMAT (printf, 2, 3); + ...) ATTR_NORETURN ATTRIBUTE_PRINTF (2, 3); /* Instead of deprecated_throw_reason, code should use catch_exception and throw_exception. */ diff --git a/gdb/language.h b/gdb/language.h index e0096f5..9c6d501 100644 --- a/gdb/language.h +++ b/gdb/language.h @@ -461,9 +461,9 @@ extern void binop_type_check (struct value *, struct value *, int); /* Error messages */ -extern void type_error (const char *, ...) ATTR_FORMAT (printf, 1, 2); +extern void type_error (const char *, ...) ATTRIBUTE_PRINTF (1, 2); -extern void range_error (const char *, ...) ATTR_FORMAT (printf, 1, 2); +extern void range_error (const char *, ...) ATTRIBUTE_PRINTF (1, 2); /* Data: Does this value represent "truth" to the current language? */ diff --git a/gdb/linespec.c b/gdb/linespec.c index c5ea28a..00203a1 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -80,7 +80,7 @@ static struct symtabs_and_lines find_method (int funfirstline, static NORETURN void cplusplus_error (const char *name, const char *fmt, ...) - ATTR_NORETURN ATTR_FORMAT (printf, 2, 3); + ATTR_NORETURN ATTRIBUTE_PRINTF (2, 3); static int total_number_of_methods (struct type *type); diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c index af225e7..33429c4 100644 --- a/gdb/mi/mi-interp.c +++ b/gdb/mi/mi-interp.c @@ -44,7 +44,7 @@ static void mi_command_loop (int mi_version); so we can report interesting things that happened "behind the mi's back" in this command */ static int mi_interp_query_hook (const char *ctlstr, va_list ap) - ATTR_FORMAT (printf, 1, 0); + ATTRIBUTE_PRINTF (1, 0); static void mi3_command_loop (void); static void mi2_command_loop (void); diff --git a/gdb/mi/mi-out.c b/gdb/mi/mi-out.c index 25f3bbc..3613789 100644 --- a/gdb/mi/mi-out.c +++ b/gdb/mi/mi-out.c @@ -55,12 +55,12 @@ static void mi_field_string (struct ui_out *uiout, int fldno, int width, static void mi_field_fmt (struct ui_out *uiout, int fldno, int width, enum ui_align align, const char *fldname, const char *format, - va_list args) ATTR_FORMAT (printf, 6, 0); + va_list args) ATTRIBUTE_PRINTF (6, 0); static void mi_spaces (struct ui_out *uiout, int numspaces); static void mi_text (struct ui_out *uiout, const char *string); static void mi_message (struct ui_out *uiout, int verbosity, const char *format, va_list args) - ATTR_FORMAT (printf, 3, 0); + ATTRIBUTE_PRINTF (3, 0); static void mi_wrap_hint (struct ui_out *uiout, char *identstring); static void mi_flush (struct ui_out *uiout); diff --git a/gdb/monitor.c b/gdb/monitor.c index aca34cc..b11450e 100644 --- a/gdb/monitor.c +++ b/gdb/monitor.c @@ -119,7 +119,7 @@ static ptid_t monitor_ptid; /* Monitor specific debugging information. Typically only useful to the developer of a new monitor interface. */ -static void monitor_debug (const char *fmt, ...) ATTR_FORMAT(printf, 1, 2); +static void monitor_debug (const char *fmt, ...) ATTRIBUTE_PRINTF (1, 2); static int monitor_debug_p = 0; diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h index a37bbca..864f789 100644 --- a/gdb/parser-defs.h +++ b/gdb/parser-defs.h @@ -318,7 +318,7 @@ extern void print_subexp_standard (struct expression *, int *, /* Function used to avoid direct calls to fprintf in the code generated by the bison parser. */ -extern void parser_fprintf (FILE *, const char *, ...) ATTR_FORMAT (printf, 2 ,3); +extern void parser_fprintf (FILE *, const char *, ...) ATTRIBUTE_PRINTF (2, 3); extern int exp_uses_objfile (struct expression *exp, struct objfile *objfile); diff --git a/gdb/serial.h b/gdb/serial.h index ecb3577..7690501 100644 --- a/gdb/serial.h +++ b/gdb/serial.h @@ -87,7 +87,7 @@ extern int serial_write (struct serial *scb, const char *str, int len); /* Write a printf style string onto the serial port. */ extern void serial_printf (struct serial *desc, - const char *,...) ATTR_FORMAT (printf, 2, 3); + const char *,...) ATTRIBUTE_PRINTF (2, 3); /* Allow pending output to drain. */ diff --git a/gdb/tui/tui-hooks.c b/gdb/tui/tui-hooks.c index 8cf95d3..f2706e9 100644 --- a/gdb/tui/tui-hooks.c +++ b/gdb/tui/tui-hooks.c @@ -64,7 +64,7 @@ tui_new_objfile_hook (struct objfile* objfile) tui_display_main (); } -static int ATTR_FORMAT (printf, 1, 0) +static int ATTRIBUTE_PRINTF (1, 0) tui_query_hook (const char *msg, va_list argp) { int retval; diff --git a/gdb/ui-out.c b/gdb/ui-out.c index c79e54e..85dc601 100644 --- a/gdb/ui-out.c +++ b/gdb/ui-out.c @@ -177,12 +177,12 @@ static void default_field_fmt (struct ui_out *uiout, int fldno, int width, enum ui_align align, const char *fldname, const char *format, - va_list args) ATTR_FORMAT (printf, 6, 0); + va_list args) ATTRIBUTE_PRINTF (6, 0); static void default_spaces (struct ui_out *uiout, int numspaces); static void default_text (struct ui_out *uiout, const char *string); static void default_message (struct ui_out *uiout, int verbosity, const char *format, - va_list args) ATTR_FORMAT (printf, 3, 0); + va_list args) ATTRIBUTE_PRINTF (3, 0); static void default_wrap_hint (struct ui_out *uiout, char *identstring); static void default_flush (struct ui_out *uiout); @@ -245,12 +245,12 @@ static void uo_field_skip (struct ui_out *uiout, int fldno, int width, static void uo_field_fmt (struct ui_out *uiout, int fldno, int width, enum ui_align align, const char *fldname, const char *format, va_list args) - ATTR_FORMAT (printf, 6, 0); + ATTRIBUTE_PRINTF (6, 0); static void uo_spaces (struct ui_out *uiout, int numspaces); static void uo_text (struct ui_out *uiout, const char *string); static void uo_message (struct ui_out *uiout, int verbosity, const char *format, va_list args) - ATTR_FORMAT (printf, 3, 0); + ATTRIBUTE_PRINTF (3, 0); static void uo_wrap_hint (struct ui_out *uiout, char *identstring); static void uo_flush (struct ui_out *uiout); static int uo_redirect (struct ui_out *uiout, struct ui_file *outstream); diff --git a/gdb/ui-out.h b/gdb/ui-out.h index 30a96c9..f65f42b 100644 --- a/gdb/ui-out.h +++ b/gdb/ui-out.h @@ -124,7 +124,7 @@ extern void ui_out_field_stream (struct ui_out *uiout, const char *fldname, extern void ui_out_field_fmt (struct ui_out *uiout, const char *fldname, const char *format, ...) - ATTR_FORMAT (printf, 3, 4); + ATTRIBUTE_PRINTF (3, 4); extern void ui_out_field_skip (struct ui_out *uiout, const char *fldname); @@ -134,7 +134,7 @@ extern void ui_out_text (struct ui_out *uiout, const char *string); extern void ui_out_message (struct ui_out *uiout, int verbosity, const char *format, ...) - ATTR_FORMAT (printf, 3, 4); + ATTRIBUTE_PRINTF (3, 4); extern struct ui_stream *ui_out_stream_new (struct ui_out *uiout); diff --git a/gdb/utils.c b/gdb/utils.c index e225a3f..fcffabe 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -92,7 +92,7 @@ void (*deprecated_error_begin_hook) (void); /* Prototypes for local functions */ static void vfprintf_maybe_filtered (struct ui_file *, const char *, - va_list, int) ATTR_FORMAT (printf, 2, 0); + va_list, int) ATTRIBUTE_PRINTF (2, 0); static void fputs_maybe_filtered (const char *, struct ui_file *, int); @@ -916,7 +916,7 @@ struct internal_problem has been reported, and assuming GDB didn't quit, the caller can either allow execution to resume or throw an error. */ -static void ATTR_FORMAT (printf, 4, 0) +static void ATTRIBUTE_PRINTF (4, 0) internal_vproblem (struct internal_problem *problem, const char *file, int line, const char *fmt, va_list ap) { @@ -1452,7 +1452,7 @@ gdb_print_host_address (const void *addr, struct ui_file *stream) ARGS are the arguments passed along with the CTLSTR argument to printf. */ -static int ATTR_FORMAT (printf, 1, 0) +static int ATTRIBUTE_PRINTF (1, 0) defaulted_query (const char *ctlstr, const char defchar, va_list args) { int answer; diff --git a/gdb/xml-support.h b/gdb/xml-support.h index ba2928d..64672c3 100644 --- a/gdb/xml-support.h +++ b/gdb/xml-support.h @@ -199,13 +199,13 @@ int gdb_xml_parse (struct gdb_xml_parser *parser, const char *buffer); /* Issue a debugging message from one of PARSER's handlers. */ void gdb_xml_debug (struct gdb_xml_parser *parser, const char *format, ...) - ATTR_FORMAT (printf, 2, 0); + ATTRIBUTE_PRINTF (2, 0); /* Issue an error message from one of PARSER's handlers, and stop parsing. */ void gdb_xml_error (struct gdb_xml_parser *parser, const char *format, ...) - ATTR_NORETURN ATTR_FORMAT (printf, 2, 0); + ATTR_NORETURN ATTRIBUTE_PRINTF (2, 0); /* Parse an integer attribute into a ULONGEST. */ |