From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta34.uswest2.a.cloudfilter.net (omta34.uswest2.a.cloudfilter.net [35.89.44.33]) by sourceware.org (Postfix) with ESMTPS id 7F6F13858D33 for ; Thu, 18 Apr 2024 15:03:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7F6F13858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7F6F13858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.33 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713452610; cv=none; b=MG/QT0LmwE/8eANhqgMknpgLNDSBDTuDoY+jQQvAsHsYX9cUOilDCgmt3ED87e2jfaQKswe0KzHUV71KUb7bP+CF3NRMrIM32d2xc94yawFwWI18UZSp79lJHOfAomDZU0iwwwVaJyze6roBEvP2mjqELgMmXK6SjZNE7W8LMXY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713452610; c=relaxed/simple; bh=ELnAaJi7FEXCXhOxTvjyC5wTomt3ECJ5+AWg6a+ZHIA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=B4wRwTLmLVu+Usha8jL01q/HdMY+IJPKNEYkP6XOinaVdxypSms3VDRalmczu7aCpwfrm7FFlIhwJK6mJzV6IRWZU+Qmiy1VAjdTzAhqQ/Xv4FSBDkCMO27WWySMrFdfpH6g5tKTyBXcUHzjDNu3XZ6SabAT/pDNTS2Do4hNLks= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-6006a.ext.cloudfilter.net ([10.0.30.182]) by cmsmtp with ESMTPS id x7sPrkUZUHXmAxTIFrYxfo; Thu, 18 Apr 2024 15:03:19 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id xTIErV6lfEKylxTIFrU3C1; Thu, 18 Apr 2024 15:03:19 +0000 X-Authority-Analysis: v=2.4 cv=Bombw5X5 c=1 sm=1 tr=0 ts=66213637 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=raytVjVEu-sA:10 a=Qbun_eYptAEA:10 a=VnNF1IyMAAAA:8 a=k3jOHwW8rUyOFPG1YT8A:9 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=0DnHY9iLuDc02MHiiqxXSYj8vbqCPOyB79a4JSudbFE=; b=FzBAJIbmLIejo9hNGUAbDud3qj rgUJM2i6vCgEWaQkHFOAzSQkYTMvtr/M2A5qmJ/KcRpIFL2ak4n8VxKvGmSearaoAUmGWbYgtJuKg CO7cY1h2wwKhvdc1VEbz37Boy; Received: from 97-122-82-115.hlrn.qwest.net ([97.122.82.115]:54752 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1rxTIE-002CFl-1h; Thu, 18 Apr 2024 09:03:18 -0600 From: Tom Tromey To: Aditya Kamath1 Cc: Ulrich Weigand , Aditya Kamath1 via Gdb-patches , Sangamesh Mallayya Subject: Re: [PATCH] Fix AIX thread exit events not being reported and UI to show kernel thread ID. References: X-Attribution: Tom Date: Thu, 18 Apr 2024 09:03:17 -0600 In-Reply-To: (Aditya Kamath1's message of "Thu, 18 Apr 2024 13:26:31 +0000") Message-ID: <87frvizpai.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.82.115 X-Source-L: No X-Exim-ID: 1rxTIE-002CFl-1h X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-82-115.hlrn.qwest.net (murgatroyd) [97.122.82.115]:54752 X-Source-Auth: tom+tromey.com X-Email-Count: 3 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfFyBk+MRQHYR5Lvco84nQ+CMVQCigPr2CyYcfH4sRqbaO9CgVo0Z4WxXmPa4Yo7lrEt8P3ujiU5F9GebnYTVrB+xXooagUYTOaByfGltZ0SnStRLrDQE OuJXO5l4dNRVTrZCv4ocFgEFpTZqLsp+KlQtgVE+6y3UiMBfk5xSoi125qvEMXWchCx7NhvsHLEqHb2sRpPAjQvsJJTSO3ImPqg= X-Spam-Status: No, score=-3015.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,JMQ_SPF_NEUTRAL,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: >>>>> Aditya Kamath1 writes: > Please find attached the patch. (See: > 0001-Fix-AIX-thread-exit-events-not-being-reported-and-UI.patch) Thanks for the patch. > So, consider program 1 pasted below this email. Is there some existing gdb test case that is fixed by this patch? If not then I think it would be better if the patch came with a new test. I can't really comment on the AIX parts of the patch, but I noticed a few little oddities. > static int > -pcmp (const void *p1v, const void *p2v) > +pcmp (struct pd_thread p1v, struct pd_thread p2v) > { > - struct pd_thread *p1 = (struct pd_thread *) p1v; > - struct pd_thread *p2 = (struct pd_thread *) p2v; > - return p1->pthid < p2->pthid ? -1 : p1->pthid > p2->pthid; > + return p1v.pthid < p2v.pthid; > } Comparison functions passed to std::sort should return bool and (ordinarily) use const reference parameter types. Personally I'd probably just make this a lambda or maybe an operator< but it's up to you. > pcount = 0; Declaring this earlier and initializing it here is a bit strange now that the logic has changed. > psize = 1; This isn't needed any more, I think; and I'm surprised the compiler didn't complain about it. > if (status == PTHDB_SUCCESS && detachstate == PDS_DETACHED) > /* i18n: Like "Thread-Id %d, [state] running, detached" */ > - buf.printf (_(", detached")); > + buf.printf (_("[detached]")); > pthdb_pthread_cancelpend (data->pd_session, pdtid, &cancelpend); > if (status == PTHDB_SUCCESS && cancelpend) > /* i18n: Like "Thread-Id %d, [state] running, cancel pending" */ > - buf.printf (_(", cancel pending")); > + buf.printf (_("[cancel pending]")); The comments before these printfs are wrong now. Tom