* linux-nat.c (linux_nat_xfer_partial): Preserve errno around
a function call.
2011-03-02 Michael Snyder <msnyder@vmware.com>
+ * linux-nat.c (linux_nat_xfer_partial): Preserve errno around
+ a function call.
+
* record.c (record_restore): Move printf to before error return.
2011-03-02 Yao Qi <yao@codesourcery.com>
static int
linux_thread_alive (ptid_t ptid)
{
- int err;
+ int err, tmp_errno;
gdb_assert (is_lwp (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;