gdb/
[deliverable/binutils-gdb.git] / gdb / infcmd.c
index 12a305de2c3380bbaac2ef35407a80fe9695c0b9..3c4aa329d69f16dd86475fb355ea86dacaf443f8 100644 (file)
@@ -468,6 +468,10 @@ run_command_1 (char *args, int from_tty, int tbreak_at_main)
   kill_if_already_running (from_tty);
   clear_breakpoint_hit_counts ();
 
+  /* Clean up any leftovers from other runs.  Some other things from
+     this function should probably be moved into target_pre_inferior.  */
+  target_pre_inferior (from_tty);
+
   /* Purge old solib objfiles. */
   objfile_purge_solibs ();
 
@@ -1847,6 +1851,10 @@ attach_command (char *args, int from_tty)
        error (_("Not killed."));
     }
 
+  /* Clean up any leftovers from other runs.  Some other things from
+     this function should probably be moved into target_pre_inferior.  */
+  target_pre_inferior (from_tty);
+
   /* Clear out solib state. Otherwise the solib state of the previous
      inferior might have survived and is entirely wrong for the new
      target.  This has been observed on Linux using glibc 2.3. How to
This page took 0.023111 seconds and 4 git commands to generate.