aboutsummaryrefslogtreecommitdiff
path: root/sim/bpf/sim-if.c
diff options
context:
space:
mode:
Diffstat (limited to 'sim/bpf/sim-if.c')
-rw-r--r--sim/bpf/sim-if.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sim/bpf/sim-if.c b/sim/bpf/sim-if.c
index 436cc86..150f5cd 100644
--- a/sim/bpf/sim-if.c
+++ b/sim/bpf/sim-if.c
@@ -111,6 +111,8 @@ bpf_free_state (SIM_DESC sd)
sim_state_free (sd);
}
+extern const SIM_MACH * const bpf_sim_machs[];
+
/* Create an instance of the simulator. */
SIM_DESC
@@ -125,6 +127,9 @@ sim_open (SIM_OPEN_KIND kind,
SIM_DESC sd = sim_state_alloc (kind, callback);
+ /* Set default options before parsing user options. */
+ STATE_MACHS (sd) = bpf_sim_machs;
+
if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK)
goto error;