sim: constify prog_name
[deliverable/binutils-gdb.git] / sim / h8300 / compile.c
index 44d60f6d1524de8eafcab2ca4e3b4e1b59b41876..348cdbbd42a6741c7964d5d87d905edaeef65b78 100644 (file)
@@ -17,6 +17,7 @@
  * AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
+#include "config.h"
 #include <signal.h>
 #ifdef HAVE_TIME_H
 #include <time.h>
@@ -1858,15 +1859,6 @@ init_pointers (SIM_DESC sd)
     }
 }
 
-/* Grotty global variable for use by control_c signal handler.  */
-static SIM_DESC control_c_sim_desc;
-
-static void
-control_c (int sig)
-{
-  sim_engine_set_run_state (control_c_sim_desc, sim_stopped, SIGINT);
-}
-
 int
 sim_stop (SIM_DESC sd)
 {
@@ -1900,7 +1892,6 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
   int cycles = 0;
   int insts = 0;
   int tick_start = get_now ();
-  void (*prev) ();
   int poll_count = 0;
   int res;
   int tmp;
@@ -1916,9 +1907,6 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
 
   init_pointers (sd);
 
-  control_c_sim_desc = sd;
-  prev = signal (SIGINT, control_c);
-
   if (step)
     {
       sim_engine_set_run_state (sd, sim_stopped, SIGTRAP);
@@ -4603,7 +4591,6 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
     h8_set_exr (sd, (trace<<7) | intMask);
 
   h8_set_mask (sd, oldmask);
-  signal (SIGINT, prev);
 }
 
 int
@@ -4715,7 +4702,7 @@ sim_store_register (SIM_DESC sd, int rn, unsigned char *value, int length)
       h8_set_ticks (sd, longval);
       break;
     }
-  return -1;
+  return length;
 }
 
 int
@@ -4987,7 +4974,7 @@ sim_close (SIM_DESC sd, int quitting)
 /* Called by gdb to load a program into memory.  */
 
 SIM_RC
-sim_load (SIM_DESC sd, char *prog, bfd *abfd, int from_tty)
+sim_load (SIM_DESC sd, const char *prog, bfd *abfd, int from_tty)
 {
   bfd *prog_bfd;
 
@@ -5107,13 +5094,6 @@ sim_create_inferior (SIM_DESC sd, struct bfd *abfd, char **argv, char **env)
   return SIM_RC_OK;
 }
 
-void
-sim_do_command (SIM_DESC sd, char *cmd)
-{
-  (*sim_callback->printf_filtered) (sim_callback,
-                                   "This simulator does not accept any commands.\n");
-}
-
 void
 sim_set_callbacks (struct host_callback_struct *ptr)
 {
This page took 0.02426 seconds and 4 git commands to generate.