From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 71F9A3858D1E for ; Thu, 19 Oct 2023 14:50:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 71F9A3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 71F9A3858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697727020; cv=none; b=pPbD6zazQGGwXbWtGBRLgDFR+R3uxjSMP9tCivUfLlJud44B9KjNgHNnly64jK+/Wk/F+pEwSjshkfQfZSP9USvdb06Kssd9DnY5eiToh4E2r3WMHGe62r7YlGwSNpNyxaNv/uR6GkeO/5Agv4Yy/62WcMccX8mi+hn2FQK/EIA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697727020; c=relaxed/simple; bh=RLaPuKauTJmyd/yFc8EhKEzxIGsoy5+N+hxOMJBQzY0=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=F46jr4Aopzmk47uueS8viWiAzS8O8BQJTK+u8NwoJolHgTviThQoQ1CqNPDw4PAojEtAr2EKWDsPx5bjmvIufQ9aHf5fzLZTkpA8aZSubGT4wSdFY1MinJSsfgnQ+XW77psH2EKLsAzojRqOLn3U/C1FOzOBX21R3Xp8XYaEjfo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1697727019; bh=RLaPuKauTJmyd/yFc8EhKEzxIGsoy5+N+hxOMJBQzY0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=VbiYqMLKbEQ7pBHdrO5yVCj5L0D05YblhJ+k0HRB/5F0HFhJnrdhbpwGpc0khLKui UnIuoPcA5Hxmmws3lU49wnBuf8mQOCpSRhwEF6Ym4f68kjbEt2R9khYcTDo9fN5mj+ Ccu5kowGLSon5qHimy/Xua4/cz65KVfKmpTEPheg= Received: from [172.16.0.192] (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id A4C9C1E00F; Thu, 19 Oct 2023 10:50:18 -0400 (EDT) Message-ID: <45628223-acab-488e-8b21-794b3bf95f21@simark.ca> Date: Thu, 19 Oct 2023 10:50:18 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 12/24] gdb: make solib-svr4 not use so_list internally Content-Language: fr To: Lancelot SIX , Simon Marchi Cc: gdb-patches@sourceware.org References: <20231010204213.111285-1-simon.marchi@efficios.com> <20231010204213.111285-13-simon.marchi@efficios.com> <20231019110853.476ixbcgbml6xwgy@khazad-dum> From: Simon Marchi In-Reply-To: <20231019110853.476ixbcgbml6xwgy@khazad-dum> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 10/19/23 07:08, Lancelot SIX wrote: > Hi Simon, > >> @@ -1050,48 +1034,25 @@ library_list_start_library (struct gdb_xml_parser *parser, >> ULONGEST *l_ldp >> = (ULONGEST *) xml_find_attribute (attributes, "l_ld")->value.get (); >> >> - so_list *new_elem = new so_list; >> - lm_info_svr4 *li = new lm_info_svr4; >> - new_elem->lm_info = li; >> + lm_info_svr4_up li = gdb::make_unique (); >> li->lm_addr = *lmp; >> li->l_addr_inferior = *l_addrp; >> li->l_ld = *l_ldp; > > Just a thought for future changes to continue the c++-ification, adding > a proper ctor (or ctors) to lm_info_svr4 would probably make things > cleaner. > > Otherwise, things looks reasonable to me. Ok, I'll look into doing a patch on top instead of inserting one in the middle, since I don't want to deal with conflicts again. Simon