aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-04-22 16:50:32 -0600
committerTom Tromey <tom@tromey.com>2021-04-22 19:44:12 -0600
commitdbc0e7ce6537812b0fafb4865520a1d35b1931dc (patch)
tree4a2e855fc67d53ec47dcbe22d540fc83d5050cd8
parent432ce4cf6800a3693656fde1306d83ce767e2b2a (diff)
downloadgdb-dbc0e7ce6537812b0fafb4865520a1d35b1931dc.zip
gdb-dbc0e7ce6537812b0fafb4865520a1d35b1931dc.tar.gz
gdb-dbc0e7ce6537812b0fafb4865520a1d35b1931dc.tar.bz2
Fix sim build failure
On x86-64 Fedora 32, the sim was failing to build. sim_events_schedule was passing a 'dummy' argument to sim_events_schedule_vtracef, which caused an error because the format parameter was NULL. However, removing this dummy argument caused an error because too few arguments were being passed -- catch 22. This patch fixes the build problem by using sim_events_schedule_tracef instead. sim/common/ChangeLog 2021-04-22 Tom Tromey <tom@tromey.com> * sim-events.c (sim_events_schedule): Use sim_events_schedule_tracef.
-rw-r--r--sim/common/ChangeLog5
-rw-r--r--sim/common/sim-events.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index c6a0b83..119bbda 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,8 @@
+2021-04-22 Tom Tromey <tom@tromey.com>
+
+ * sim-events.c (sim_events_schedule): Use
+ sim_events_schedule_tracef.
+
2021-04-22 Simon Marchi <simon.marchi@polymtl.ca>
* callback.c (os_printf_filtered, os_vprintf_filtered,
diff --git a/sim/common/sim-events.c b/sim/common/sim-events.c
index 207c867..60e4c55 100644
--- a/sim/common/sim-events.c
+++ b/sim/common/sim-events.c
@@ -469,10 +469,7 @@ sim_events_schedule (SIM_DESC sd,
sim_event_handler *handler,
void *data)
{
- va_list dummy;
- memset (&dummy, 0, sizeof dummy);
- return sim_events_schedule_vtracef (sd, delta_time, handler, data,
- NULL, dummy);
+ return sim_events_schedule_tracef (sd, delta_time, handler, data, NULL);
}
#endif