From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 46878 invoked by alias); 19 Sep 2016 04:19:20 -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 46839 invoked by uid 89); 19 Sep 2016 04:19:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.0 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=GDB's, GDBs, mourned, Hx-languages-length:1924 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 Sep 2016 04:19:09 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 138C93F723 for ; Mon, 19 Sep 2016 04:19:08 +0000 (UTC) Received: from localhost (unused-10-15-17-193.yyz.redhat.com [10.15.17.193]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8J4J7cm011425 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 19 Sep 2016 00:19:07 -0400 From: Sergio Durigan Junior To: Pedro Alves Cc: GDB Patches Subject: Re: [PATCH] Consolidate target_mourn_inferior between GDB and gdbserver References: <1473655918-2101-1-git-send-email-sergiodj@redhat.com> X-URL: http://blog.sergiodj.net Date: Mon, 19 Sep 2016 04:19:00 -0000 In-Reply-To: (Pedro Alves's message of "Thu, 15 Sep 2016 16:51:50 +0100") Message-ID: <87h99cjzd0.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2016-09/txt/msg00201.txt.bz2 On Thursday, September 15 2016, Pedro Alves wrote: > On 09/12/2016 05:51 AM, Sergio Durigan Junior wrote: >> This patch consolidates the API of target_mourn_inferior between GDB >> and gdbserver, in my continuing efforts to make sharing the >> fork_inferior function possible between both. >> >> GDB's version of the function did not care about the inferior's ptid >> being mourned, but gdbserver's needed to know this information. Since >> it actually makes sense to pass the ptid as an argument, instead of >> depending on a global value directly (which GDB's version did), I >> decided to make the generic API to accept it. I then went on and >> extended all calls being made on GDB to include a ptid argument (which >> ended up being inferior_ptid most of the times, anyway), and now we >> have a more sane interface. >> >> On GDB's side, after talking to Pedro a bit about it, we decided that >> just an assertion to make sure that the ptid being passed is equal to >> inferior_ptid would be enough for now, on the GDB side. We can remove >> the assertion and perform more operations later if we ever pass >> anything different than inferior_ptid. >> >> Regression tested on our BuildBot, everything OK. >> > > Thanks, patch is OK. > >> I'd appreciate a special look at gdb/windows-nat.c's modification >> because I wasn't really sure what to do there. It seemed to me that >> maybe I should build a ptid out of the process information there, but >> then I am almost sure the assertion on GDB's side would trigger. > > Just leave it passing inferior_ptid like all other places, which is > a no-op. We're certain the assertion does not fail this way. Thanks, pushed. bc1e6c81d5b77d78282c47f6fd7f697e564a6eb6 -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/