Index: linux-nat.c =================================================================== RCS file: /cvs/src/src/gdb/linux-nat.c,v retrieving revision 1.197 diff -u -p -u -p -r1.197 linux-nat.c --- linux-nat.c 1 Mar 2011 00:40:22 -0000 1.197 +++ linux-nat.c 2 Mar 2011 18:00:39 -0000 @@ -4032,7 +4032,7 @@ linux_nat_xfer_partial (struct target_op static int linux_thread_alive (ptid_t ptid) { - int err; + int err, tmp_errno; gdb_assert (is_lwp (ptid)); @@ -4040,12 +4040,12 @@ linux_thread_alive (ptid_t ptid) running thread errors out claiming that the thread doesn't exist. */ err = kill_lwp (GET_LWP (ptid), 0); - + tmp_errno = errno; if (debug_linux_nat) fprintf_unfiltered (gdb_stdlog, "LLTA: KILL(SIG0) %s (%s)\n", target_pid_to_str (ptid), - err ? safe_strerror (err) : "OK"); + err ? safe_strerror (tmp_errno) : "OK"); if (err != 0) return 0;