sim: mn10300: drop global callback handle
authorMike Frysinger <vapier@gentoo.org>
Sat, 21 Nov 2015 04:41:51 +0000 (20:41 -0800)
committerMike Frysinger <vapier@gentoo.org>
Sun, 22 Nov 2015 05:53:23 +0000 (00:53 -0500)
It's used in one place and can easily be replaced by using the sim state.

sim/mn10300/ChangeLog
sim/mn10300/interp.c
sim/mn10300/mn10300_sim.h

index 7a9d3b3bef0e23b5397e76cbe3fbf485d4d2f30d..920625ed54bbc1c9cb088360b5619359d4f4b81c 100644 (file)
@@ -1,3 +1,10 @@
+2015-11-21  Mike Frysinger  <vapier@gentoo.org>
+
+       * interp.c (mn10300_callback): Delete.
+       (sim_open): Delete mn10300_callback assignment.
+       (program_interrupt): Call sim_io_printf.
+       * mn10300_sim.h (mn10300_callback): Delete.
+
 2015-11-17  Mike Frysinger  <vapier@gentoo.org>
 
        * sim-main.h (WITH_CORE): Delete.
index f3941ae0d2dcf7e6c6bbe780e93f97e188e06eb3..4940acc6e7cbc52a47ca7d524bef2c7b9f6a8a01 100644 (file)
@@ -24,7 +24,6 @@
 #include "bfd.h"
 
 
-host_callback *mn10300_callback;
 struct _state State;
 
 
@@ -97,7 +96,6 @@ sim_open (SIM_OPEN_KIND kind,
 {
   int i;
   SIM_DESC sd = sim_state_alloc (kind, cb);
-  mn10300_callback = cb;
 
   SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);
 
@@ -418,10 +416,7 @@ program_interrupt (SIM_DESC sd,
 
   /* avoid infinite recursion */
   if (in_interrupt)
-    {
-      (*mn10300_callback->printf_filtered) (mn10300_callback, 
-                                           "ERROR: recursion in program_interrupt during software exception dispatch.");
-    }
+    sim_io_printf (sd, "ERROR: recursion in program_interrupt during software exception dispatch.");
   else
     {
       in_interrupt = 1;
index 6e8f53a4f2277a5bc8b20e8073ca1e82e844054c..f70d486612bce2a2bbd694f748445d2821f5fe3c 100644 (file)
@@ -8,7 +8,6 @@
 #include "bfd.h"
 #include "sim-fpu.h"
 
-extern host_callback *mn10300_callback;
 extern SIM_DESC simulator;
 
 typedef unsigned8 uint8;