diff options
Diffstat (limited to 'gdb/linux-nat.c')
-rw-r--r-- | gdb/linux-nat.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 2c7ded7..cd5cf18 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -1132,7 +1132,7 @@ attach_proc_task_lwp_callback (ptid_t ptid) else { std::string reason - = linux_ptrace_attach_fail_reason_lwp (ptid, err); + = linux_ptrace_attach_fail_reason_string (ptid, err); warning (_("Cannot attach to lwp %d: %s"), lwpid, reason.c_str ()); @@ -1187,9 +1187,8 @@ linux_nat_target::attach (const char *args, int from_tty) } catch (const gdb_exception_error &ex) { - int saved_errno = errno; pid_t pid = parse_pid_to_attach (args); - std::string reason = linux_ptrace_attach_fail_reason (pid, saved_errno); + std::string reason = linux_ptrace_attach_fail_reason (pid); if (!reason.empty ()) throw_error (ex.error, "warning: %s\n%s", reason.c_str (), @@ -4568,10 +4567,6 @@ Enables printf debugging output."), sigemptyset (&blocked_mask); lwp_lwpid_htab_create (); - - /* Set the proper function to generate a message when ptrace - fails. */ - inf_ptrace_me_fail_reason = linux_ptrace_me_fail_reason; } |