X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Finfcmd.c;h=58ba1cb8d01cdb4b6cc30f90ee6bc0c1de91499d;hb=630008884535a5b26828325e48e729034c110536;hp=e9dcb46f6e3c696b4b07e907933850c5c9961f7c;hpb=8980e177bb62ec64875b335cf8733b41f3aae2fd;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/infcmd.c b/gdb/infcmd.c index e9dcb46f6e..58ba1cb8d0 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -2998,6 +2998,13 @@ detach_command (char *args, int from_tty) target_detach (args, from_tty); + /* The current inferior process was just detached successfully. Get + rid of breakpoints that no longer make sense. Note we don't do + this within target_detach because that is also used when + following child forks, and in that case we will want to transfer + breakpoints to the child, not delete them. */ + breakpoint_init_inferior (inf_exited); + /* If the solist is global across inferiors, don't clear it when we detach from a single inferior. */ if (!gdbarch_has_global_solist (target_gdbarch ()))