Module Name: src
Committed By: kamil
Date: Tue Oct 6 23:14:47 UTC 2020
Modified Files:
src/external/gpl3/gdb/dist/gdb: inf-ptrace.c nbsd-nat.c
Log Message:
Undo local patches
They are no longer needed (and are wrong).
To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/external/gpl3/gdb/dist/gdb/inf-ptrace.c
cvs rdiff -u -r1.17 -r1.18 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl3/gdb/dist/gdb/inf-ptrace.c
diff -u src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.21 src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.22
--- src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.21 Tue Sep 15 02:05:18 2020
+++ src/external/gpl3/gdb/dist/gdb/inf-ptrace.c Tue Oct 6 23:14:47 2020
@@ -263,12 +263,10 @@ get_ptrace_pid (ptid_t ptid)
{
pid_t pid;
-#ifndef __NetBSD__
/* If we have an LWPID to work with, use it. Otherwise, we're
dealing with a non-threaded program/target. */
pid = ptid.lwp ();
if (pid == 0)
-#endif
pid = ptid.pid ();
return pid;
}
@@ -293,7 +291,6 @@ inf_ptrace_target::resume (ptid_t ptid,
else
request = PT_CONTINUE;
- int sig;
if (step)
{
/* If this system does not support PT_STEP, a higher level
@@ -302,23 +299,13 @@ inf_ptrace_target::resume (ptid_t ptid,
all possible successor instructions), so we don't have to
worry about that here. */
request = PT_STEP;
-#if __NetBSD__
- /*
- * On NetBSD the data field of PT_STEP contains the thread
- * to be stepped; all other threads are continued if this value is > 0
- */
- sig = ptid.lwp ();
-#else
- sig = 0;
-#endif
- } else
- sig = gdb_signal_to_host (signal);
+ }
/* An address of (PTRACE_TYPE_ARG3)1 tells ptrace to continue from
where it was. If GDB wanted it to start some other way, we have
already written a new program counter value to the child. */
errno = 0;
- gdb_ptrace (request, ptid, (PTRACE_TYPE_ARG3)1, sig);
+ gdb_ptrace (request, ptid, (PTRACE_TYPE_ARG3)1, gdb_signal_to_host (signal));
if (errno != 0)
perror_with_name (("ptrace"));
}
@@ -476,15 +463,6 @@ inf_ptrace_target::xfer_partial (enum ta
/* If the PT_IO request is somehow not supported, fallback on
using PT_WRITE_D/PT_READ_D. Otherwise we will return zero
to indicate failure. */
- if (errno == EACCES)
- {
- fprintf_unfiltered (gdb_stderr, "Cannot %s process at %p (%s). "
- "Is PaX MPROTECT active? See security(7), "
- "sysctl(7), paxctl(8)\n", writebuf ? "write to" :
- "read from", piod.piod_offs,
- strerror(errno));
- return TARGET_XFER_E_IO; /* Some other error perhaps? */
- }
if (errno != EINVAL)
return TARGET_XFER_EOF;
}
Index: src/external/gpl3/gdb/dist/gdb/nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.17 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.18
--- src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.17 Sat Sep 19 21:45:45 2020
+++ src/external/gpl3/gdb/dist/gdb/nbsd-nat.c Tue Oct 6 23:14:47 2020
@@ -587,9 +587,6 @@ nbsd_nat_target::wait (ptid_t ptid, stru
siginfo_t *si = &psi.psi_siginfo;
int lwp = psi.psi_lwpid;
- // XXX: should the kernel return this?
- if (lwp == 0)
- lwp = pid;
int signo = si->si_signo;
const int code = si->si_code;