summaryrefslogtreecommitdiffstats
path: root/gdb/lynx-nat.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1995-07-21 23:52:45 +0000
committerJeff Law <law@redhat.com>1995-07-21 23:52:45 +0000
commitf8c90568d5ffbdf706241e32f3625e6aa69eec13 (patch)
tree4e24cf366e26a059620ed88f3ecd5f6ccd01285a /gdb/lynx-nat.c
parent549b77a94579c47f10e0f78c8206c11011ee8d66 (diff)
downloadppe42-binutils-f8c90568d5ffbdf706241e32f3625e6aa69eec13.tar.gz
ppe42-binutils-f8c90568d5ffbdf706241e32f3625e6aa69eec13.zip
* lynx-nat.c (child_thread_alive): New function. Somehow I
forgot to check this in with all the other thread_alive changes.
Diffstat (limited to 'gdb/lynx-nat.c')
-rw-r--r--gdb/lynx-nat.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/lynx-nat.c b/gdb/lynx-nat.c
index 883496ed7b..4b2d288eee 100644
--- a/gdb/lynx-nat.c
+++ b/gdb/lynx-nat.c
@@ -696,6 +696,23 @@ child_wait (pid, ourstatus)
}
}
+/* Return nonzero if the given thread is still alive. */
+int
+child_thread_alive (pid)
+ int pid;
+{
+ /* Arggh. Apparently pthread_kill only works for threads within
+ the process that calls pthread_kill.
+
+ We want to avoid the lynx signal extensions as they simply don't
+ map well to the generic gdb interface we want to keep.
+
+ All we want to do is determine if a particular thread is alive;
+ it appears as if we can just make a harmless thread specific
+ ptrace call to do that. */
+ return (ptrace (PTRACE_THREADUSER, pid, 0, 0) != -1);
+}
+
/* Resume execution of the inferior process.
If STEP is nonzero, single-step it.
If SIGNAL is nonzero, give it that signal. */
OpenPOWER on IntegriCloud