From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id OHtSHnmpfV+TRQAAWB0awg (envelope-from ) for ; Wed, 07 Oct 2020 07:41:45 -0400 Received: by simark.ca (Postfix, from userid 112) id 6F6181EF48; Wed, 7 Oct 2020 07:41:45 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 9D1B71E58E for ; Wed, 7 Oct 2020 07:41:44 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 535DA3857C40; Wed, 7 Oct 2020 11:41:44 +0000 (GMT) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by sourceware.org (Postfix) with ESMTPS id 83E503857C40 for ; Wed, 7 Oct 2020 11:41:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 83E503857C40 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-wm1-f65.google.com with SMTP id f21so1960863wml.3 for ; Wed, 07 Oct 2020 04:41:42 -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=HzNXjs96FFqa8nWiFd96k3R6n0GBbjj9GZpkVzkJYjM=; b=rclqfaiLAYdHVo8UX9jklX+uzyoDdv6bU6lyoFT42mjFQEAzYzVwhbdv+Laqn5SoG+ 62HDcM1ekFNSOSMzIe2FWVAMjQbYsBNGHnWrpZHG/ALp1L+rHtIVmv0jtd8VdfrqszAc yRq+YVwsrfykzsT72DJivVoqDrXoloZT9Zaa+BGgEnrg+jUz0t+48wjJ5DPaH4jLkRDl KtREuIdquVkbTnCZ/9a+B1QvyqSwaRmG9bOuSdWAKz5FAw9yhukgtPUDiyk5FZCMAt5H m6LIiVBHg6yCkqW2zShatFjt1CS0MI0zn2krt/Ak2wZMj6P5926Faty6PXd3I3RjxUbQ n44g== X-Gm-Message-State: AOAM5311qdYDgqQVkb3kraSHCsIJqF6Njt7BfDrfhitd1w+o9IyfL7jt 32kAs2Fr5c/xrXF6xchJpsbLEvtNc+ukVA== X-Google-Smtp-Source: ABdhPJzcn2H2xQCBjF2VKuzbDZWLsCMsCBGZMnt7TBnFr8/l2IcgvJmp9ArwJhUMiaFWIM3DDs4/zA== X-Received: by 2002:a05:600c:1081:: with SMTP id e1mr2999888wmd.156.1602070900111; Wed, 07 Oct 2020 04:41:40 -0700 (PDT) Received: from ?IPv6:2001:8a0:f91e:6d00:c80a:ea25:47ef:5f73? ([2001:8a0:f91e:6d00:c80a:ea25:47ef:5f73]) by smtp.gmail.com with ESMTPSA id v4sm2311931wmg.35.2020.10.07.04.41.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Oct 2020 04:41:38 -0700 (PDT) Subject: Re: [PATCH] gdb: Have allocate_target_description return a unique_ptr To: Andrew Burgess , gdb-patches@sourceware.org References: <20201005194728.699823-1-andrew.burgess@embecosm.com> From: Pedro Alves Message-ID: <3de137cb-13c6-cd7b-23a0-52d7af358425@palves.net> Date: Wed, 7 Oct 2020 12:41:37 +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: <20201005194728.699823-1-andrew.burgess@embecosm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 10/5/20 8:47 PM, Andrew Burgess wrote: > --- a/gdb/features/rs6000/powerpc-601.c > +++ b/gdb/features/rs6000/powerpc-601.c > @@ -9,7 +9,7 @@ struct target_desc *tdesc_powerpc_601; > static void > initialize_tdesc_powerpc_601 (void) > { > - struct target_desc *result = allocate_target_description (); > + struct target_desc *result = allocate_target_description ().release (); > struct tdesc_feature *feature; > Curious that you didn't tweak target-descriptions.c to output the more pedantically correct: target_desc_up result = allocate_target_description (); ... feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core"); ... tdesc_powerpc_601 = result.release (); Anyhow, I like this change too, with or without the change above. Pedro Alves