From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id E33073829BDC for ; Mon, 30 May 2022 12:45:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E33073829BDC Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 24UCjPvq019244 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 May 2022 08:45:30 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 24UCjPvq019244 Received: from [10.0.0.11] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (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 5DDF41E143; Mon, 30 May 2022 08:45:25 -0400 (EDT) Message-ID: <0ad5c21e-60fa-e52d-f70c-d2bc62e0ac74@polymtl.ca> Date: Mon, 30 May 2022 08:45:24 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH] Use current_inferior ()->pid for AIX Content-Language: en-US To: Aditya Vidyadhar Kamath Cc: Sangamesh Mallayya , Simon Marchi via Gdb-patches References: <5f142468-bc68-9128-d4d6-80cf36f12a48@polymtl.ca> <87169b93-8be2-5ccd-6b58-51b395a367bd@polymtl.ca> <4516dbf7-2655-39c5-0614-8235df05248e@polymtl.ca> From: Simon Marchi In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 30 May 2022 12:45:25 +0000 X-Spam-Status: No, score=-3032.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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, 30 May 2022 12:45:34 -0000 Hi, Re-adding gdb-patches, since it's information useful to everybody. On 2022-05-29 23:41, Aditya Vidyadhar Kamath wrote: > Hi Simon, > > Thank you so much for the feedback. Yes it makes sense. As I was trying to fix this we need one more information that will help us.  > > Once an inferior finishes its execution where is the inferior_ptid's pid variable set to 0. Or who is the one [file name or function name] that updates inferior_ptid class variable pid to 0.  This is done in the mourn_inferior target method. Many targets call the generic_mourn_inferior function, which calls switch_to_no_thread, which sets current_thread_ to nullptr and inferior_ptid to null_ptid. Simon