aboutsummaryrefslogtreecommitdiff
path: root/sim/arm/wrapper.c
diff options
context:
space:
mode:
Diffstat (limited to 'sim/arm/wrapper.c')
-rw-r--r--sim/arm/wrapper.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sim/arm/wrapper.c b/sim/arm/wrapper.c
index 86be8c6..5c2eea0 100644
--- a/sim/arm/wrapper.c
+++ b/sim/arm/wrapper.c
@@ -175,11 +175,16 @@ sim_resume (sd, step, siggnal)
}
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)
+ ARMul_SetPC (state, bfd_get_start_address (abfd));
+ else
+ ARMul_SetPC (state, 0); /* ??? */
return SIM_RC_OK;
}
@@ -290,10 +295,10 @@ sim_load (sd, prog, abfd, from_tty)
bfd *prog_bfd;
prog_bfd = sim_load_file (sd, myname, sim_callback, prog, abfd,
- sim_kind == SIM_OPEN_DEBUG);
+ sim_kind == SIM_OPEN_DEBUG,
+ 0, sim_write);
if (prog_bfd == NULL)
return SIM_RC_FAIL;
- ARMul_SetPC (state, bfd_get_start_address (prog_bfd));
if (abfd == NULL)
bfd_close (prog_bfd);
return SIM_RC_OK;