aboutsummaryrefslogtreecommitdiff
path: root/sim/tic80/sim-calls.c
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/sim-calls.c
parent9f3f3525396695352bffc5f9cda3ae542e3b83f7 (diff)
downloadfsf-binutils-gdb-4b2a6aed8413d6e7d7b25d918896ae637266d9d5.zip
fsf-binutils-gdb-4b2a6aed8413d6e7d7b25d918896ae637266d9d5.tar.gz
fsf-binutils-gdb-4b2a6aed8413d6e7d7b25d918896ae637266d9d5.tar.bz2
Use sim_state_alloc to create common sim object.
Diffstat (limited to 'sim/tic80/sim-calls.c')
-rw-r--r--sim/tic80/sim-calls.c10
1 files changed, 1 insertions, 9 deletions
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;