aboutsummaryrefslogtreecommitdiff
path: root/sim/tic80
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1997-09-01 03:26:31 +0000
committerAndrew Cagney <cagney@redhat.com>1997-09-01 03:26:31 +0000
commit4b2a6aed8413d6e7d7b25d918896ae637266d9d5 (patch)
treefc0f49b0104f94778be3465dc74f0f206afef7aa /sim/tic80
parent9f3f3525396695352bffc5f9cda3ae542e3b83f7 (diff)
downloadgdb-4b2a6aed8413d6e7d7b25d918896ae637266d9d5.zip
gdb-4b2a6aed8413d6e7d7b25d918896ae637266d9d5.tar.gz
gdb-4b2a6aed8413d6e7d7b25d918896ae637266d9d5.tar.bz2
Use sim_state_alloc to create common sim object.
Diffstat (limited to 'sim/tic80')
-rw-r--r--sim/tic80/ChangeLog5
-rw-r--r--sim/tic80/sim-calls.c10
2 files changed, 6 insertions, 9 deletions
diff --git a/sim/tic80/ChangeLog b/sim/tic80/ChangeLog
index ea81861..0ac08b2 100644
--- a/sim/tic80/ChangeLog
+++ b/sim/tic80/ChangeLog
@@ -1,3 +1,8 @@
+Mon Sep 1 11:06:30 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * sim-calls.c (sim_open): Use sim_state_alloc
+ (simulation): Delete.
+
Sat Aug 30 09:40:47 1997 Andrew Cagney <cagney@b1.cygnus.com>
* insns (do_trap): Unsigned `i' for unsigned iterator.
diff --git a/sim/tic80/sim-calls.c b/sim/tic80/sim-calls.c
index 095ddf1..32da79b 100644
--- a/sim/tic80/sim-calls.c
+++ b/sim/tic80/sim-calls.c
@@ -44,21 +44,13 @@
#define SIM_ADDR unsigned
-/* Structures used by the simulator, for gdb just have static structures */
-
-struct sim_state simulation = { 0 };
-
-
SIM_DESC
sim_open (SIM_OPEN_KIND kind,
host_callback *callback,
struct _bfd *abfd,
char **argv)
{
- SIM_DESC sd = &simulation;
- STATE_OPEN_KIND (sd) = kind;
- STATE_MAGIC (sd) = SIM_MAGIC_NUMBER;
- STATE_CALLBACK (&simulation) = callback;
+ SIM_DESC sd = sim_state_alloc (kind, callback);
if (sim_pre_argv_init (sd, argv[0]) != SIM_RC_OK)
return 0;