aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r--gdb/infcmd.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 12a305d..3c4aa32 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -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