From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 50D0D3854175 for ; Mon, 4 Jul 2022 19:28:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 50D0D3854175 Received: from [172.16.0.95] (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 4FD921E220; Mon, 4 Jul 2022 15:28:54 -0400 (EDT) Message-ID: Date: Mon, 4 Jul 2022 15:28:53 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: Fw: RE: [PATCH] Use current_inferior ()->pid for AIX Content-Language: fr To: Aditya Vidyadhar Kamath , Ulrich Weigand , Joel Brobecker via Gdb-patches Cc: Sangamesh Mallayya References: <5f142468-bc68-9128-d4d6-80cf36f12a48@polymtl.ca> <87169b93-8be2-5ccd-6b58-51b395a367bd@polymtl.ca> <4516dbf7-2655-39c5-0614-8235df05248e@polymtl.ca> <0ad5c21e-60fa-e52d-f70c-d2bc62e0ac74@polymtl.ca> From: Simon Marchi In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jul 2022 19:28:56 -0000 On 6/27/22 08:55, Aditya Vidyadhar Kamath via Gdb-patches wrote: > Hi, > > We have worked our way out through the pid!=0 assertion failure. > > Currently we also plan to come out soon with the patches for fork support as well in AIX. > > It will be great if we could get a review to the patch [Forwarded in this email] whenever you find time. > > Have a nice day ahead. > > Thanks and regards, > Aditya Hi Aditya, I looked at your patch, and unfortunately I don't understand how it improves things. In my past messages, I tried to explain that the root of the problem is that the wait methods code is relying on the entry value of inferior_ptid, when it shouldn't. I don't see how adding one more reference to inferior_ptid in rs6000_nat_target::wait helps. Given your goal is to support forks (and thus multi-process, I suppose?), try to write the code in the wait method in such a way that it doesn't rely on the inferior_ptid value or current inferior value on entry. The typical pattern for the wait methods is that they fetch some event (using waitpid in your case) and then figure out which inferior from the inferior list this event applies to. Simon