From 8b554809c07fb6e177dfdac4a4a1d6e622edb89d Mon Sep 17 00:00:00 2001 From: Jackie Smith Cashion Date: Wed, 10 Apr 1996 08:53:24 +0000 Subject: [PATCH] Wed Apr 10 09:51:38 1996 James G. Smith * interp.c (sim_do_command): Complain if callback structure not initialised. --- sim/mips/ChangeLog | 5 +++++ sim/mips/interp.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog index f221324da06..f3ffe86591b 100644 --- a/sim/mips/ChangeLog +++ b/sim/mips/ChangeLog @@ -1,3 +1,8 @@ +Wed Apr 10 09:51:38 1996 James G. Smith + + * interp.c (sim_do_command): Complain if callback structure not + initialised. + Thu Mar 28 13:50:51 1996 James G. Smith * interp.c (Convert): Provide round-to-nearest and round-to-zero diff --git a/sim/mips/interp.c b/sim/mips/interp.c index d1e9feb569d..120044169f6 100644 --- a/sim/mips/interp.c +++ b/sim/mips/interp.c @@ -1235,6 +1235,11 @@ sim_do_command (cmd) { struct t_sim_command *cptr; + if (callback == NULL) { + fprintf(stderr,"Simulator not enabled: \"target sim\" should be used to activate\n"); + return; + } + if (!(cmd && *cmd != '\0')) cmd = "help"; -- 2.30.2