From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102313 invoked by alias); 13 Sep 2018 04:50: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 102295 invoked by uid 89); 13 Sep 2018 04:50:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=await X-HELO: gateway34.websitewelcome.com Received: from gateway34.websitewelcome.com (HELO gateway34.websitewelcome.com) (192.185.148.212) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 13 Sep 2018 04:50:57 +0000 Received: from cm15.websitewelcome.com (cm15.websitewelcome.com [100.42.49.9]) by gateway34.websitewelcome.com (Postfix) with ESMTP id A6BC82BA9 for ; Wed, 12 Sep 2018 23:50:55 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id 0JaTgb8w0bXuJ0Jabgu2pT; Wed, 12 Sep 2018 23:50:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=e8yDjFCBoG+bRNvtHfZSIbL3TWxR7DAA7WVnKYr0wJA=; b=ifLRgDysnHqSGhVXNFk7RA5h2D 5RNeFizk9qHAgUy2ipYG+89E/8wjBrCflJ0TSuv4n0ce+RL7/jKw4NVr1MjUJ/xe1clDgG6jlvo9w UTHIWnvx3LN8+AqgOqBi3+lUX; Received: from 97-122-189-157.hlrn.qwest.net ([97.122.189.157]:58780 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1g0JaT-003r5r-IQ; Wed, 12 Sep 2018 23:50:41 -0500 From: Tom Tromey To: Simon Marchi Cc: Tom Tromey , Simon Marchi , gdb-patches@sourceware.org Subject: Re: [PATCH 2/3] python: Add Progspace.objfiles method References: <20180912193617.16523-1-simon.marchi@ericsson.com> <20180912193617.16523-2-simon.marchi@ericsson.com> <874leujrxz.fsf@tromey.com> <3d6d1484e08f5a40da317520443fb58d@polymtl.ca> Date: Thu, 13 Sep 2018 04:50:00 -0000 In-Reply-To: <3d6d1484e08f5a40da317520443fb58d@polymtl.ca> (Simon Marchi's message of "Wed, 12 Sep 2018 18:58:27 -0400") Message-ID: <87efdyhufz.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2018-09/txt/msg00408.txt.bz2 >>>>> "Simon" == Simon Marchi writes: >> Finally, I have another ancient and unfinished series that adds a bunch >> of methods to Inferior. If you're working in this area I can send it; >> I'd be happy to rebase it. Simon> Sure! I looked at this and it's in rougher shape. See submit/python/inferior-additions on github. So maybe it can be mined as a source for some things but it isn't close to landing. It adds these methods to Inferior: attach, continue, stop, kill, and select. It also adds a constructor so you can make a new inferior. However nowadays I tend to think that inferior-control things, like stop, should return some kind of promise that resolves when the request completes. I think the code on the branch, on the other hand, supposes that your code will wait for an event after making a request. My experience from JS is that the promise-based approach is much simpler to program and reason about, and now that Python has async+await, I think gdb should try to follow. (If possible, I haven't looked at how extensions deal with this stuff. And I used the JS terms which are probably different in Python.) Maybe the constructor patch could be completed pretty easily though. Tom