diff options
author | Michael Meissner <gnu@the-meissners.org> | 1997-05-05 18:10:05 +0000 |
---|---|---|
committer | Michael Meissner <gnu@the-meissners.org> | 1997-05-05 18:10:05 +0000 |
commit | 23b04e791d8abbf69a05b23632cbf22022ec0533 (patch) | |
tree | 5ad9d0f9d548aeb61af857a102a829cb981675be /sim/common/sim-trace.h | |
parent | 654b08453944a65e47f58cf1cad92d22bac7f5ac (diff) | |
download | gdb-23b04e791d8abbf69a05b23632cbf22022ec0533.zip gdb-23b04e791d8abbf69a05b23632cbf22022ec0533.tar.gz gdb-23b04e791d8abbf69a05b23632cbf22022ec0533.tar.bz2 |
Add printf attribute support
Diffstat (limited to 'sim/common/sim-trace.h')
-rw-r--r-- | sim/common/sim-trace.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sim/common/sim-trace.h b/sim/common/sim-trace.h index 2a98808..b400b2d 100644 --- a/sim/common/sim-trace.h +++ b/sim/common/sim-trace.h @@ -23,6 +23,12 @@ with this program; if not, write to the Free Software Foundation, Inc., #ifndef SIM_TRACE_H #define SIM_TRACE_H +#ifndef __attribute__ +#if !defined(__GNUC__) || (__GNUC__ < 2) || (__GNUC__ == 2 && __GNU_MINOR__ < 7) +#define __attribute__(attr) +#endif +#endif + /* Maximum number of traceable entities. */ #ifndef MAX_TRACE_VALUES #define MAX_TRACE_VALUES 12 @@ -105,7 +111,8 @@ struct _sim_cpu; /* Non-zero if "--trace-fpu" specified for CPU. */ #define TRACE_FPU_P(cpu) TRACE_P (cpu, TRACE_FPU_IDX) -extern void trace_printf PARAMS ((SIM_DESC, sim_cpu *, const char *, ...)); +extern void trace_printf PARAMS ((SIM_DESC, sim_cpu *, const char *, ...)) + __attribute__((format (printf, 3, 4))); /* Debug support. This is included here because there isn't enough of it to justify @@ -119,6 +126,7 @@ extern void trace_printf PARAMS ((SIM_DESC, sim_cpu *, const char *, ...)); /* Non-zero if "--debug-insn" specified. */ #define DEBUG_INSN_P(cpu) DEBUG_P (cpu, DEBUG_INSN_IDX) -extern void debug_printf PARAMS ((struct _sim_cpu *, const char *, ...)); +extern void debug_printf PARAMS ((struct _sim_cpu *, const char *, ...)) + __attribute__((format (printf, 2, 3))); #endif /* SIM_TRACE_H */ |