aboutsummaryrefslogtreecommitdiff
path: root/sim/sh
diff options
context:
space:
mode:
Diffstat (limited to 'sim/sh')
-rw-r--r--sim/sh/ChangeLog3
-rw-r--r--sim/sh/interp.c8
2 files changed, 9 insertions, 2 deletions
diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog
index 7eed84e..d1a38ba 100644
--- a/sim/sh/ChangeLog
+++ b/sim/sh/ChangeLog
@@ -1,6 +1,9 @@
Tue Aug 26 10:41:55 1997 Andrew Cagney <cagney@b1.cygnus.com>
* interp.c (sim_kill): Delete.
+ (sim_create_inferior): Add ABFD argument.
+ (sim_load): Move setting of PC from here.
+ (sim_create_inferior): To here.
Mon Aug 25 17:50:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
diff --git a/sim/sh/interp.c b/sim/sh/interp.c
index d9ae631..da50d24 100644
--- a/sim/sh/interp.c
+++ b/sim/sh/interp.c
@@ -1242,18 +1242,22 @@ sim_load (sd, prog, abfd, from_tty)
sim_kind == SIM_OPEN_DEBUG);
if (prog_bfd == NULL)
return SIM_RC_FAIL;
- saved_state.asregs.pc = bfd_get_start_address (prog_bfd);
if (abfd == NULL)
bfd_close (prog_bfd);
return SIM_RC_OK;
}
SIM_RC
-sim_create_inferior (sd, argv, env)
+sim_create_inferior (sd, abfd, argv, env)
SIM_DESC sd;
+ struct _bfd *abfd;
char **argv;
char **env;
{
+ if (abfd != NULL)
+ saved_state.asregs.pc = bfd_get_start_address (abfd);
+ else
+ saved_state.asregs.pc = 0;
return SIM_RC_OK;
}