From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129328 invoked by alias); 19 Jan 2018 03:26: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 129314 invoked by uid 89); 19 Jan 2018 03:26:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=disappears, Hx-languages-length:1125, opportunity X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 19 Jan 2018 03:26:07 +0000 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 w0J3Q1GQ006988 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 18 Jan 2018 22:26:05 -0500 Received: by simark.ca (Postfix, from userid 112) id 0B47D1E5B7; Thu, 18 Jan 2018 22:26:01 -0500 (EST) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 283EA1E074; Thu, 18 Jan 2018 22:26:00 -0500 (EST) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 19 Jan 2018 03:26:00 -0000 From: Simon Marchi To: Pedro Alves Cc: Simon Marchi , gdb-patches@sourceware.org Subject: Re: [PATCH 3/3] Make linux_nat_detach/thread_db_detach use the inferior parameter In-Reply-To: References: <1514699454-18587-1-git-send-email-simon.marchi@ericsson.com> <1514699454-18587-3-git-send-email-simon.marchi@ericsson.com> Message-ID: <759f6cbb9e7986add398911fe9bac732@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.2 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Fri, 19 Jan 2018 03:26:01 +0000 X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg00386.txt.bz2 On 2018-01-18 12:06, Pedro Alves wrote: > On 12/31/2017 05:50 AM, Simon Marchi wrote: >> This patch makes these two functions actually use the inferior >> parameter >> added by the previous patch, instead of reading inferior_ptid. I >> chose >> these two, because they are the one actually used when I detach on my >> GNU/Linux system, so they were easy to test. >> >> I took the opportunity to pass the inferior being detached to >> inf_ptrace_detach_success, so it could use it too. From there, it >> made >> sense to add an overload of detach_inferior that takes the inferior >> directly rather than the pid, to avoid having to pass inf->pid only >> for >> the callee to look up the inferior structure by pid. > > Looks fine to me. > > (FWIW, the 'detach_inferior(int)' overload disappears in > my multi-target branch). Ah, good to know it goes in the same direction. I'm sending the series through the buildbot again (see if that new assert is hit somewhere), and will send a v2 tomorrow if all goes well. Thanks for reviewing. Simon