mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-28 10:00:51 +00:00
Add ABFD argument to sim_create_inferior. Document.
Add file sim-hload.c - generic load for hardware only simulators. Review each simulators sim_open, sim_load, sim_create_inferior so that they more closely match required behavour.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user