diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-06-20 15:21:26 +0545 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-06-21 13:56:24 -0400 |
commit | ccd4b2953bb039e91b301a616c5f7c6f542b6b10 (patch) | |
tree | 12330d9581425b0dc8dfe659cb6028c90354a4b7 /sim/common/sim-model.c | |
parent | f55b33d51b056c665568c6204bd3ced7f1ec15c8 (diff) | |
download | gdb-ccd4b2953bb039e91b301a616c5f7c6f542b6b10.zip gdb-ccd4b2953bb039e91b301a616c5f7c6f542b6b10.tar.gz gdb-ccd4b2953bb039e91b301a616c5f7c6f542b6b10.tar.bz2 |
sim: common: add basic model assert
If the configured in default doesn't match a known value, throw an
assertion failure rather than segfaulting deeper down.
Diffstat (limited to 'sim/common/sim-model.c')
-rw-r--r-- | sim/common/sim-model.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sim/common/sim-model.c b/sim/common/sim-model.c index a33bd2a..db5f323 100644 --- a/sim/common/sim-model.c +++ b/sim/common/sim-model.c @@ -204,6 +204,7 @@ sim_model_init (SIM_DESC sd) { /* Set the default model. */ const MODEL *model = sim_model_lookup (WITH_DEFAULT_MODEL); + SIM_ASSERT (model != NULL); sim_model_set (sd, NULL, model); } |