aboutsummaryrefslogtreecommitdiff
path: root/gdb/linux-nat.c
diff options
context:
space:
mode:
authorSergio Durigan Junior <sergiodj@redhat.com>2019-09-26 14:24:30 -0400
committerSergio Durigan Junior <sergiodj@redhat.com>2019-09-26 14:24:30 -0400
commit50fa3001ce25e221ca2e54564b5589d29c4bed19 (patch)
tree4f99db1e48244cf2e3d86b867a90314dcf6d7777 /gdb/linux-nat.c
parent381beca6146ac68b57edf47d28cdb335fbd11635 (diff)
downloadgdb-50fa3001ce25e221ca2e54564b5589d29c4bed19.zip
gdb-50fa3001ce25e221ca2e54564b5589d29c4bed19.tar.gz
gdb-50fa3001ce25e221ca2e54564b5589d29c4bed19.tar.bz2
Revert "Improve ptrace-error detection on Linux targets"
This reverts commit 381beca6146ac68b57edf47d28cdb335fbd11635. The patch hasn't been fully reviewed yet, and Pedro would like to see more fixes.
Diffstat (limited to 'gdb/linux-nat.c')
-rw-r--r--gdb/linux-nat.c9
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;
}