mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 12:23:31 +08:00
sim: mips: add printf attribute to trace func
This helps catch format errors in code, although they're all clean at this point already.
This commit is contained in:
@ -1,3 +1,8 @@
|
||||
2021-06-16 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* interp.c (dotrace): Make comment const.
|
||||
* sim-main.h (dotrace): Likewise. Add ATTRIBUTE_PRINTF.
|
||||
|
||||
2021-06-16 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* interp.c (sim_monitor): Change ap type to address_word*.
|
||||
|
@ -1722,7 +1722,7 @@ dotrace (SIM_DESC sd,
|
||||
int type,
|
||||
SIM_ADDR address,
|
||||
int width,
|
||||
char *comment,...)
|
||||
const char *comment, ...)
|
||||
{
|
||||
if (STATE & simTRACE) {
|
||||
va_list ap;
|
||||
|
@ -965,7 +965,7 @@ address_word micromips_instruction_decode (SIM_DESC sd, sim_cpu * cpu,
|
||||
int instruction_size);
|
||||
|
||||
#if WITH_TRACE_ANY_P
|
||||
void dotrace (SIM_DESC sd, sim_cpu *cpu, FILE *tracefh, int type, SIM_ADDR address, int width, char *comment, ...);
|
||||
void dotrace (SIM_DESC sd, sim_cpu *cpu, FILE *tracefh, int type, SIM_ADDR address, int width, const char *comment, ...) ATTRIBUTE_PRINTF (7, 8);
|
||||
extern FILE *tracefh;
|
||||
#else
|
||||
#define dotrace(sd, cpu, tracefh, type, address, width, comment, ...)
|
||||
|
Reference in New Issue
Block a user