From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by sourceware.org (Postfix) with ESMTPS id 830DE3851C0D for ; Thu, 25 Jun 2020 21:18:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 830DE3851C0D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=alves.ped@gmail.com Received: by mail-wr1-f66.google.com with SMTP id z13so7337221wrw.5 for ; Thu, 25 Jun 2020 14:18:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=D8B7fAM9UDiaN9i7YOriPhou0f7FImmM8+TyiALU63Y=; b=YXHfMp4w6OjBJzf/HL52y7QO1kYD8S7/C0wmJ5fyULjFFgSEIAosLa4sdBzuph8uH3 alV6yLROCXoExHyDii0bqOkcUiIYOG/f1Jof22NpewDRt8LCVwkYBgjPdEJTPjWX+WAo lM6e7OEX35PM/j8saNBaW91L6XABsWGTUOLJXfpl7DLnSsIoY4n9yhr+/4h2bEsH5k88 Bttpxb36FJVPgPURFoatSCFL5lhbkudeIoJVKDP1LGn7myds/K+QFEum/3W5QtA0k2qT VJBTMB88gurmLuMu0m8HDp3/hggy4JvZqfCKLJqhUvkNjP8RpwlckiGk+HkSDyz/tP/2 WYcA== X-Gm-Message-State: AOAM5309NEyqNMtcsGbYdC9BHZgCfMoG6MVm7QftSuMSET+8Mee3dYu2 6yYOGtA76d9P9pmYtq9kuWlB0QocuXs= X-Google-Smtp-Source: ABdhPJxg9RYsDpU6E5AnqhsC7M82YdRPdvdnTH+UNLGcwncIWNy7CwJ1AWvZNRsxOS+SOfzlslCUyg== X-Received: by 2002:a05:6000:1c8:: with SMTP id t8mr168372wrx.73.1593119880143; Thu, 25 Jun 2020 14:18:00 -0700 (PDT) Received: from ?IPv6:2001:8a0:f922:c400:56ee:75ff:fe8d:232b? ([2001:8a0:f922:c400:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id u74sm14591441wmu.31.2020.06.25.14.17.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Jun 2020 14:17:58 -0700 (PDT) Subject: Re: [PATCH] gdb: make inferior::terminal a unique ptr To: Simon Marchi , Simon Marchi , gdb-patches@sourceware.org References: <20200625155517.32173-1-simon.marchi@efficios.com> <362a9ac5-7417-8250-ff07-28d31df97f08@palves.net> <7c472cde-988f-4e13-ccf9-d7144c4e593d@simark.ca> From: Pedro Alves Message-ID: <4a26f526-42bd-4019-e12a-e1e7d0d2ff75@palves.net> Date: Thu, 25 Jun 2020 22:17:57 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <7c472cde-988f-4e13-ccf9-d7144c4e593d@simark.ca> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 21:18:03 -0000 On 6/25/20 7:42 PM, Simon Marchi wrote: > On 2020-06-25 1:32 p.m., Pedro Alves wrote: >> This reminds me of this patch: >> >> https://github.com/palves/gdb/commit/f240d57e3e659d13a01d9dda79120e2ce6bc7e74 >> >> IMO, the code is more readable with that. WDYT? > > I thought about doing something similar... but I limited myself to the original > intent of removing the manual free-ing. Otherwise, it never ends, there is just > an infinity of such refactors we can do. So right you are. That patch is part of the series to make GDB always put the inferior on a separate session. Someday I'll find time to finish it... > But I think your patch looks good. > I've sent it as a proper patch now: https://sourceware.org/pipermail/gdb-patches/2020-June/169896.html Thanks, Pedro Alves