summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/linux-kthread.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gdb/linux-kthread.c b/gdb/linux-kthread.c
index fff6dccf8d..438a910915 100644
--- a/gdb/linux-kthread.c
+++ b/gdb/linux-kthread.c
@@ -1384,12 +1384,21 @@ linux_kthread_thread_alive (struct target_ops *ops, ptid_t ptid)
{
enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
struct target_ops *beneath = find_target_beneath (ops);
+ process_t *ps;
// DEBUG (INIT, 1, "()+\n");
// DEBUG (INIT, 1, "()-\n");
//return beneath->to_thread_alive (beneath, ptid);
- return (lkd_proc_get_by_ptid (ptid) != NULL);
+ ps = lkd_proc_get_by_ptid (ptid);
+
+ if (!ps)
+ {
+ DEBUG (INIT, 1, "Prune thread ps(%p)\n",ps);
+ return 0;
+ }
+
+ return 1;
}
static void