Hi, The circumstances are, detach from a remote target that doesn't have threads. Remote.c leaves the PID arbitrarily as "42000", and target_detach calls remove_breakpoints_pid, which crashes because find_inferior_pid returns NULL. The patch just adds a test for NULL.