From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 121849 invoked by alias); 21 Mar 2017 15:24:33 -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 121695 invoked by uid 89); 21 Mar 2017 15:24:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy= X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 21 Mar 2017 15:24:17 +0000 Received: by simark.ca (Postfix, from userid 33) id 1681F1E165; Tue, 21 Mar 2017 11:24:10 -0400 (EDT) To: Pedro Alves Subject: Re: [PATCH 3/3] windows: Use ptid from regcache in register fetch/store X-PHP-Originating-Script: 33:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 21 Mar 2017 15:24:00 -0000 From: Simon Marchi Cc: gdb-patches@sourceware.org, Simon Marchi In-Reply-To: <419e195c-66dd-3d05-d945-2dc0646e6a44@redhat.com> References: <20170318170801.22988-1-simon.marchi@polymtl.ca> <20170318170801.22988-3-simon.marchi@polymtl.ca> <41e56d7a-3bf6-71d5-6f5e-03c721ee4ff9@redhat.com> <80d736666fe9a1484f57f8c60a1f64df@polymtl.ca> <419e195c-66dd-3d05-d945-2dc0646e6a44@redhat.com> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.2.4 X-IsSubscribed: yes X-SW-Source: 2017-03/txt/msg00374.txt.bz2 On 2017-03-21 10:27, Pedro Alves wrote: >>> Did you look for the history around these comments? I wonder whether >>> these NULL checks still make sense here if we always reference the >>> regcache's thread. The equivalent code in gdbserver doesn't seem to >>> have them. >> >> All I know is that this is the patch that introduced them: >> https://sourceware.org/ml/gdb-patches/2003-12/msg00479.html >> >> The PR 1048 seems to refer to a pre-bugzilla bug tracking system. Do >> we >> still have them somewhere? > > Here: > > > https://sourceware.org/gdb/wiki/DeveloperTips?highlight=%28gnats%29#Finding_Gnats_bug_entries_in_the_Bugzilla_database > > gnats 1048 + 7105 -> bugzilla 8153: > > https://sourceware.org/bugzilla/show_bug.cgi?id=8153 Ah, thanks! >> From what I understand, it's the use case where you attach to a >> process >> whose main thread has already exited. If the patch introduced these >> NULL checks, I suppose it's because they were necessary back then to >> work around the Windows bug. I have no idea if they are still >> necessary, or if the Microsoft people fixed it. > > [...] > >> In any case, the fact >> of whether the checks are needed is not impacted by the current patch: >> in the end, we call thread_rec with the same pid with which we would >> have called it before, so we should get the same result. > > You're right. > >> >> I'll wait for your input on this before sending a new version. >> > > I don't have further input. Thanks, I'll push the patch including the fixes and send the final version for reference.