--- gdb/procfs.c-orig 2002-02-14 02:57:36.000000000 +0100+++ gdb/procfs.c 2002-06-26 10:16:34.000000000 +0200@@ -1748,6 +1748,30 @@win = (write (pi->ctl_fd, (char *) &cmd, sizeof (cmd)) == sizeof (cmd));}#else /* ioctl method */+#ifdef PIOCTRUN+ /*+ * If we single step AND the PIOCTRUN ioctl is supported, then use+ * this. This cures the problem when single stepping a+ * multi-threaded program, when all the other threads (than the+ * current single stepped one), may run free while single stepping.+ *+ * Note that only the PRSTEP flag is of interrest here (PRCFAULT and+ * PRCSIG are not allowed).+ */+ if (step) {+ /* Structure from proc(4) on Tru64 5.1A. */+ struct {+ long pr_count; /* number of threads to run */+ tid_t pr_error_thread; /* set by kernel if error is detected */+ struct prrun thread_1; /* prrun struct, containing thread ID of 1st thread to run in thread_1.pr_tid */+ } prrun;+ memset(&prrun, 0, sizeof (prrun));+ prrun.pr_count = 1;+ prrun.thread_1.pr_flags = PRSTEP;+ prrun.thread_1.pr_tid = pi->prstatus.pr_tid;+ win = (ioctl (pi->ctl_fd, PIOCTRUN, &prrun) >= 0);+ } else+#endif{prrun_t prrun;