aboutsummaryrefslogtreecommitdiff
path: root/sim/ppc
diff options
context:
space:
mode:
Diffstat (limited to 'sim/ppc')
-rw-r--r--sim/ppc/ChangeLog4
-rw-r--r--sim/ppc/sim_calls.c19
2 files changed, 14 insertions, 9 deletions
diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index 1b6ad7c..9efa7a8 100644
--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -11,6 +11,10 @@ Wed Aug 27 10:15:48 1997 Andrew Cagney <cagney@b1.cygnus.com>
Tue Aug 26 10:41:35 1997 Andrew Cagney <cagney@b1.cygnus.com>
* sim_calls.c (sim_kill): Delete.
+ (sim_create_inferior): Add ABFD argument.
+ (entry_point): Delete variable.
+ (sim_load): Move setting of PC from here.
+ (sim_create_inferior): To here.
Mon Aug 25 16:17:06 1997 Andrew Cagney <cagney@b1.cygnus.com>
diff --git a/sim/ppc/sim_calls.c b/sim/ppc/sim_calls.c
index 228b7c7..7b6c4d4 100644
--- a/sim/ppc/sim_calls.c
+++ b/sim/ppc/sim_calls.c
@@ -53,10 +53,6 @@ static device *root_device;
static const char *register_names[] = REGISTER_NAMES;
static host_callback *callbacks;
-/* For communication between sim_load and sim_create_inferior.
- This can be made to go away, please do. */
-static unsigned_word entry_point;
-
SIM_DESC
sim_open (SIM_OPEN_KIND kind,
host_callback *callback,
@@ -114,9 +110,7 @@ sim_load (SIM_DESC sd, char *prog, bfd *abfd, int from_tty)
psim_init(simulator);
/* get the start address */
- if (abfd != NULL)
- entry_point = bfd_get_start_address (abfd);
- else
+ if (abfd == NULL)
{
abfd = bfd_openr (argv[0], 0);
if (abfd == NULL)
@@ -129,7 +123,6 @@ sim_load (SIM_DESC sd, char *prog, bfd *abfd, int from_tty)
error ("psim: \"%s\" is not an object file: %s\n",
argv[0], errmsg);
}
- entry_point = bfd_get_start_address (abfd);
bfd_close (abfd);
}
@@ -199,10 +192,18 @@ sim_info (SIM_DESC sd, int verbose)
SIM_RC
-sim_create_inferior (SIM_DESC sd, char **argv, char **envp)
+sim_create_inferior (SIM_DESC sd,
+ struct _bfd *abfd,
+ char **argv,
+ char **envp)
{
+ unsigned_word entry_point;
TRACE(trace_gdb, ("sim_create_inferior(start_address=0x%x, ...)\n",
entry_point));
+ if (abfd != NULL)
+ entry_point = bfd_get_start_address (abfd);
+ else
+ entry_point = 0xfff00000; /* ??? */
psim_init(simulator);
psim_stack(simulator, argv, envp);