+2021-05-03 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * armdefs.h (ARMul_ConsolePrint): Use format attribute.
+ * wrapper.c (op_printf): Likewise.
+
2021-05-01 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
+#include <ansidecl.h>
#define FALSE 0
#define TRUE 1
extern void ARMul_UndefInstr (ARMul_State *, ARMword);
extern void ARMul_FixCPSR (ARMul_State *, ARMword, ARMword);
extern void ARMul_FixSPSR (ARMul_State *, ARMword, ARMword);
-extern void ARMul_ConsolePrint (ARMul_State *, const char *, ...);
+extern void ARMul_ConsolePrint (ARMul_State *, const char *, ...)
+ ATTRIBUTE_PRINTF (2, 3);
extern void ARMul_SelectProcessor (ARMul_State *, unsigned);
static struct disassemble_info info;
static char opbuf[1000];
-static int
-op_printf (char *buf, char *fmt, ...)
+static int ATTRIBUTE_PRINTF (2, 3)
+op_printf (char *buf, const char *fmt, ...)
{
int ret;
va_list ap;
+2021-05-03 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * interp.c (sim_open): Adjust format string specifier.
+
2021-05-02 Mike Frysinger <vapier@gentoo.org>
* bfin-sim.c: Include ansidecl.h.
if (sim_core_read_buffer (sd, NULL, read_map, &c, 4, 1) == 0)
{
bu16 emuexcpt = 0x25;
- sim_do_commandf (sd, "memory-size 0x%lx", BFIN_DEFAULT_MEM_SIZE);
+ sim_do_commandf (sd, "memory-size 0x%x", BFIN_DEFAULT_MEM_SIZE);
sim_write (sd, 0, (void *)&emuexcpt, 2);
}
+2021-05-03 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * hw-events.h (hw_event_queue_schedule_tracef): Use format attribute.
+ (hw_event_queue_schedule_vtracef): Likewise.
+ * hw-tree.h (hw_tree_vparse): Likewise.
+ * sim-profile.c (profile_vprintf): Likewise.
+ * sim-trace.c (dis_printf): Likewise.
+ * sim-trace.h (trace_printf): Likewise.
+ (trace_vprintf): Likewise.
+ * sim-utils.h (sim_do_commandf): Likewise.
+ * hw-events.c (hw_event_queue_schedule): Use
+ hw_event_queue_schedule_tracef.
+
2021-05-02 Simon Marchi <simon.marchi@polymtl.ca>
* sim-options.c (standard_option_handler): Add default cases to
hw_event_callback *callback,
void *data)
{
- struct hw_event *event;
- va_list dummy;
- memset (&dummy, 0, sizeof dummy);
- event = hw_event_queue_schedule_vtracef (me, delta_time, callback, data,
- NULL, dummy);
- return event;
+ return hw_event_queue_schedule_tracef (me, delta_time, callback, data, NULL);
}
struct hw_event *
hw_event_callback *handler,
void *data,
const char *fmt,
- ...) ATTRIBUTE_PRINTF (5, 6);
+ ...) ATTRIBUTE_NULL_PRINTF (5, 6);
struct hw_event *hw_event_queue_schedule_vtracef
(struct hw *me,
hw_event_callback *handler,
void *data,
const char *fmt,
- va_list ap);
+ va_list ap) ATTRIBUTE_NULL_PRINTF (5, 0);
void hw_event_queue_deschedule
struct hw *hw_tree_vparse
(struct hw *root,
const char *fmt,
- va_list ap);
+ va_list ap) ATTRIBUTE_PRINTF (2, 0);
void hw_tree_finish
\f
/* Profiling output hooks. */
-static void
+static void ATTRIBUTE_PRINTF (3, 0)
profile_vprintf (SIM_DESC sd, sim_cpu *cpu, const char *fmt, va_list ap)
{
FILE *fp = PROFILE_FILE (CPU_PROFILE_DATA (cpu));
return 0;
}
-static int
+static int ATTRIBUTE_PRINTF (2, 3)
dis_printf (SIM_CPU *cpu, const char *fmt, ...)
{
SIM_DESC sd = CPU_STATE (cpu);
\f
extern void trace_printf (SIM_DESC, sim_cpu *, const char *, ...)
- ATTRIBUTE_PRINTF (3, 4);
+ ATTRIBUTE_PRINTF (3, 4);
-extern void trace_vprintf (SIM_DESC, sim_cpu *, const char *, va_list);
+extern void trace_vprintf (SIM_DESC, sim_cpu *, const char *, va_list)
+ ATTRIBUTE_PRINTF (3, 0);
/* Debug support.
This is included here because there isn't enough of it to justify
int lma_p, sim_write_fn do_load);
/* Internal version of sim_do_command, include formatting */
-void sim_do_commandf (SIM_DESC sd, const char *fmt, ...);
+void sim_do_commandf (SIM_DESC sd, const char *fmt, ...)
+ ATTRIBUTE_PRINTF (2, 3);
/* These are defined in callback.c as cover functions to the vprintf
+2021-05-03 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * trace.c (op_printf): Likewise.
+
2021-05-01 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.
static char opbuf[1000];
-static int
+static int ATTRIBUTE_PRINTF (2, 3)
op_printf (char *buf, char *fmt, ...)
{
int ret;
+2021-05-03 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * interp.c (sim_open): Adjust format string specifier.
+
2021-05-01 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.
/* Allocate core managed memory */
/* "Mirror" the ROM addresses below 1MB. */
- sim_do_commandf (sd, "memory region 0,0x100000,0x%lx", V850_ROM_SIZE);
+ sim_do_commandf (sd, "memory region 0,0x100000,0x%x", V850_ROM_SIZE);
/* Chunk of ram adjacent to rom */
- sim_do_commandf (sd, "memory region 0x100000,0x%lx", V850_LOW_END-0x100000);
+ sim_do_commandf (sd, "memory region 0x100000,0x%x", V850_LOW_END-0x100000);
/* peripheral I/O region - mirror 1K across 4k (0x1000) */
sim_do_command (sd, "memory region 0xfff000,0x1000,1024");
/* similarly if in the internal RAM region */