From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5351 invoked by alias); 19 May 2016 14:56:09 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 5334 invoked by uid 89); 19 May 2016 14:56:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 19 May 2016 14:55:57 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B28D4A4CC1 for ; Thu, 19 May 2016 14:48:16 +0000 (UTC) Received: from cascais.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u4JEmBLs009731 for ; Thu, 19 May 2016 10:48:16 -0400 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 5/6] Make gdb/linux-nat.c consider a waitstatus pending on the infrun side Date: Thu, 19 May 2016 14:56:00 -0000 Message-Id: <1463669290-30415-6-git-send-email-palves@redhat.com> In-Reply-To: <1463669290-30415-1-git-send-email-palves@redhat.com> References: <1463669290-30415-1-git-send-email-palves@redhat.com> X-SW-Source: 2016-05/txt/msg00332.txt.bz2 Working on the fix for gdb/19828, I saw gdb.threads/attach-many-short-lived-threads.exp fail once in an unusual way. Unfortunately I didn't keep debug logs, but it's an issue similar to what's been fixed in remote.c a while ago -- linux-nat.c was not fetching the pending status from the right place. gdb/ChangeLog: yyyy-mm-dd Pedro Alves PR gdb/19828 * linux-nat.c (get_pending_status): If the thread reported the event to the core and it's pending, use the pending status signal number. --- gdb/linux-nat.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index ea2e4dc..f2bdddc 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -1330,7 +1330,10 @@ get_pending_status (struct lwp_info *lp, int *status) { struct thread_info *tp = find_thread_ptid (lp->ptid); - signo = tp->suspend.stop_signal; + if (tp->suspend.waitstatus_pending_p) + signo = tp->suspend.waitstatus.value.sig; + else + signo = tp->suspend.stop_signal; } else if (!target_is_non_stop_p ()) { -- 2.5.5