Index: gdb/nto-procfs.c =================================================================== RCS file: /cvs/src/src/gdb/nto-procfs.c,v retrieving revision 1.34 diff -u -p -r1.34 nto-procfs.c --- gdb/nto-procfs.c 23 Oct 2008 17:53:17 -0000 1.34 +++ gdb/nto-procfs.c 23 Oct 2008 19:47:17 -0000 @@ -580,7 +580,7 @@ do_attach (ptid_t ptid) && status.flags & _DEBUG_FLAG_STOPPED) SignalKill (nto_node (), PIDGET (ptid), 0, SIGCONT, 0, 0); nto_init_solib_absolute_prefix (); - return ptid; + return ptid_build (PIDGET (ptid), 0, status.tid); } /* Ask the user what to do when an interrupt is received. */ @@ -1085,6 +1085,7 @@ procfs_create_inferior (char *exec_file, close (fds[2]); inferior_ptid = do_attach (pid_to_ptid (pid)); + procfs_find_new_threads (); inf = add_inferior (pid); inf->attach_flag = 0;