aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r--gdb/infcmd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 4c4781f..821ae5f 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -55,6 +55,8 @@
#include "valprint.h"
#include "inline-frame.h"
+extern void disconnect_or_stop_tracing (int from_tty);
+
/* Functions exported for general use, in inferior.h: */
void all_registers_info (char *, int);
@@ -2505,6 +2507,8 @@ detach_command (char *args, int from_tty)
if (ptid_equal (inferior_ptid, null_ptid))
error (_("The program is not being run."));
+ disconnect_or_stop_tracing (from_tty);
+
target_detach (args, from_tty);
/* If the solist is global across inferiors, don't clear it when we