diff options
Diffstat (limited to 'sim/h8300')
-rw-r--r-- | sim/h8300/ChangeLog | 5 | ||||
-rw-r--r-- | sim/h8300/compile.c | 16 |
2 files changed, 19 insertions, 2 deletions
diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog index 47b8e22..920424b 100644 --- a/sim/h8300/ChangeLog +++ b/sim/h8300/ChangeLog @@ -1,6 +1,11 @@ Tue Aug 26 10:38:43 1997 Andrew Cagney <cagney@b1.cygnus.com> * compile.c (sim_kill): Delete. + (sim_create_inferior): Add ABFD argument. + (sim_load): Move setting of PC from here. + (sim_create_inferior): To here. + (sim_open, sim_load, set_h8300h): Add fixme explaining why much of + the sim_load code should be moved to sim_open. Mon Aug 25 17:50:22 1997 Andrew Cagney <cagney@b1.cygnus.com> diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c index 370fe4605..08dbbcc 100644 --- a/sim/h8300/compile.c +++ b/sim/h8300/compile.c @@ -2009,6 +2009,9 @@ void set_h8300h (flag) int flag; { + /* FIXME: Much of the code in sim_load can be moved to sim_open. + This function being replaced by a sim_open:ARGV configuration + option */ h8300hmode = flag; } @@ -2019,6 +2022,8 @@ sim_open (kind, ptr, abfd, argv) struct _bfd *abfd; char **argv; { + /* FIXME: Much of the code in sim_load can be moved here */ + sim_kind = kind; myname = argv[0]; sim_callback = ptr; @@ -2045,6 +2050,9 @@ sim_load (sd, prog, abfd, from_tty) { bfd *prog_bfd; + /* FIXME: The code below that sets a specific variant of the h8/300 + being simulated should be moved to sim_open(). */ + /* See if the file is for the h8/300 or h8/300h. */ /* ??? This may not be the most efficient way. The z8k simulator does this via a different mechanism (INIT_EXTRA_SYMTAB_INFO). */ @@ -2109,7 +2117,6 @@ sim_load (sd, prog, abfd, from_tty) return SIM_RC_FAIL; } - cpu.pc = bfd_get_start_address (prog_bfd); /* Close the bfd if we opened it. */ if (abfd == NULL && prog_bfd != NULL) bfd_close (prog_bfd); @@ -2117,11 +2124,16 @@ sim_load (sd, prog, abfd, from_tty) } 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) + cpu.pc = bfd_get_start_address (abfd); + else + cpu.pc = 0; return SIM_RC_OK; } |