* breakpoint.h (enum enable): New enum shlib_disabled for
[deliverable/binutils-gdb.git] / gdb / remote-sim.c
index f2df37a48e75c3d9a3e59869f818b88c42492b27..d0f0f50daa9a1a7948e3b928288f7618db774a01 100644 (file)
@@ -34,11 +34,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "gdbcore.h"
 #include "remote-sim.h"
 #include "remote-utils.h"
+#include "callback.h"
 
 /* Naming convention:
 
    sim_* are the interface to the simulator (see remote-sim.h).
-
+   sim_callback_* are the stuff which the simulator can see inside GDB.
    gdbsim_* are stuff which is internal to gdb.  */
 
 /* Forward data declarations */
@@ -95,6 +96,7 @@ int regno;
     }
 }
 
+
 static void
 gdbsim_store_register (regno)
 int regno;
@@ -150,7 +152,7 @@ gdbsim_load (prog, fromtty)
   program_loaded = 1;
 
   if (sim_load (prog, fromtty) != 0)
-    gr_load_image (prog, fromtty);
+    generic_load (prog, fromtty);
 }
 
 
@@ -200,12 +202,6 @@ gdbsim_create_inferior (exec_file, args, env)
 
   inferior_pid = 42;
   insert_breakpoints ();       /* Needed to get correct instruction in cache */
-
-  /* FIXME: This needs to be done in a target-specific fashion.
-     What you see here works for the PPC simulator tiemann 9/9/1995.
-     Also, the fact that we can find the addresses for breakpoints without
-     this mechanism suggests some redundant code that could be merged.  */     
-  add_text_to_loadinfo (entry_pt, entry_pt+exec_bfd->sections->_cooked_size);
   proceed (entry_pt, TARGET_SIGNAL_DEFAULT, 0);
 }
 
@@ -222,11 +218,13 @@ gdbsim_open (args, from_tty)
   if (sr_get_debug ())
     printf_filtered ("gdbsim_open: args \"%s\"\n", args ? args : "(null)");
 
+  sim_set_callbacks (&default_callback);
+  default_callback.init (&default_callback);
+
   sim_open (args);
 
   push_target (&gdbsim_ops);
   target_fetch_registers (-1);
-
   printf_filtered ("Connected to the simulator.\n");
 }
 
This page took 0.028285 seconds and 4 git commands to generate.