From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 83922 invoked by alias); 12 Sep 2018 22:22:59 -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 83903 invoked by uid 89); 12 Sep 2018 22:22:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=submitting, finishing, yours 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; Wed, 12 Sep 2018 22:22:57 +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 w8CMMpXM016868 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 12 Sep 2018 18:22:55 -0400 Received: by simark.ca (Postfix, from userid 112) id 1008A1E5A4; Wed, 12 Sep 2018 18:22:51 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 4B3E21E4B5; Wed, 12 Sep 2018 18:22:50 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 12 Sep 2018 22:22:00 -0000 From: Simon Marchi To: Tom Tromey Cc: Simon Marchi , gdb-patches@sourceware.org Subject: Re: [PATCH 1/3] python: Add Inferior.progspace property In-Reply-To: <87h8iujstp.fsf@tromey.com> References: <20180912193617.16523-1-simon.marchi@ericsson.com> <87h8iujstp.fsf@tromey.com> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.6 X-IsSubscribed: yes X-SW-Source: 2018-09/txt/msg00381.txt.bz2 On 2018-09-12 17:42, Tom Tromey wrote: >>>>>> "Simon" == Simon Marchi writes: > > Simon> This patch adds a progspace property to the gdb.Inferior type, > which > Simon> allows getting the gdb.Progspace object associated to that > inferior. > Simon> In conjunction with the following patch, this will allow scripts > iterate > Simon> on objfiles associated with a particular inferior. > > I did this a long time ago, plus a bit more. > I think it would be good to compare approaches. > > Old thread here: > https://sourceware.org/ml/gdb-patches/2014-06/msg00616.html > > I rebaesd it - see the python/progspace-submit branch in my github. > I haven't re-tested it yet. Oh wow, that's much more complete than what I have. I also spotted some other areas of improvement, but I know that if I try to bite too much in one go I never finish and submit what I have. That's why I sent just these two by themselves. If you intend on finishing and submitting that patch I'll drop mine. Otherwise, I'll go ahead and maybe submit yours chunk by chunk, adding tests in the process. As far as the gdb.Inferior.progspace part is concerned, our two versions are essentially identical. > Simon> While modifying py-inferior.exp, I added some checks for the > other > Simon> Inferior properties, when the Inferior is no longer valid. This > doesn't > Simon> seem tested at the moment. > > This could go in immediately if you were so inclined. Ok, I'll push an obvious patch for that. Simon