From 247fccdeb54a09a14287b2e829511803ad9d7cc1 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Mon, 25 Aug 1997 23:14:25 +0000 Subject: Add ABFD argument to sim_open call. Pass through to sim_config so that image properties such as endianness can be checked. More strongly document the expected behavour of each of the sim_* interfaces. Add default endian argument to simulator config macro SIM_AC_OPTION_ENDIAN. Use in sim_config. --- sim/mn10300/interp.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'sim/mn10300/interp.c') diff --git a/sim/mn10300/interp.c b/sim/mn10300/interp.c index 997b032..2246d75 100644 --- a/sim/mn10300/interp.c +++ b/sim/mn10300/interp.c @@ -284,9 +284,10 @@ compare_simops (arg1, arg2) } SIM_DESC -sim_open (kind,cb,argv) +sim_open (kind, cb, abfd, argv) SIM_OPEN_KIND kind; host_callback *cb; + struct _bfd *abfd; char **argv; { struct simops *s; @@ -331,7 +332,7 @@ sim_open (kind,cb,argv) if (h->opcode == s->opcode && h->mask == s->mask && h->ops == s) - continue; + break; else h = h->next; } @@ -404,6 +405,8 @@ sim_resume (sd, step, siggnal) else State.exception = 0; + State.exited = 0; + do { unsigned long insn, extension; @@ -854,7 +857,10 @@ sim_stop_reason (sd, reason, sigrc) enum sim_stop *reason; int *sigrc; { - *reason = sim_stopped; + if (State.exited) + *reason = sim_exited; + else + *reason = sim_stopped; if (State.exception == SIGQUIT) *sigrc = 0; else -- cgit v1.1