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 A153D3858D1E for ; Tue, 25 Apr 2023 18:56:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A153D3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca Received: from [10.0.0.170] (unknown [167.248.160.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 583EB1E0D3; Tue, 25 Apr 2023 14:56:24 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1682448984; bh=S7sFD3txICFXcUJrDsrCrLqkZVPTZcq0OurQl91DOB4=; h=Date:Subject:To:References:From:In-Reply-To:From; b=G8JVUQ3Rq7oGi55euL896J2lwjhvF9O/pbqAeDPRfwdZ7Ep2s7O0FItzxwejWSB7b hxHi2glxApkFaI84mDJ5rl/axrAtq9GQm9xzLQDwFC/dXuaiHlZ5ZcLobtUUeOBz2Q U42wOvPuOZREkMJhQyU4RcYLO3RQhcvZU7ZicEb0= Message-ID: <8e04feb2-8552-9b89-ff73-1998f52cf98e@simark.ca> Date: Tue, 25 Apr 2023 14:56:23 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH] Environment variable convenience function Content-Language: fr To: Keith Seitz , gdb-patches@sourceware.org References: <20230423170755.1103121-1-keiths@redhat.com> <331951a0-2148-3489-3dd9-5961489af0bc@simark.ca> <8c0f108d-d2fb-b5b7-b767-e636db7bff25@redhat.com> From: Simon Marchi In-Reply-To: <8c0f108d-d2fb-b5b7-b767-e636db7bff25@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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 4/25/23 11:59, Keith Seitz wrote: > On 4/23/23 13:20, Simon Marchi wrote: >> On 4/23/23 13:07, Keith Seitz via Gdb-patches wrote: >> >> I have the feeling that I've seen this before, and had some thoughts >> about the name, but I'm not sure I shared it, so here it is. I think it >> would be good to disambibuate whether this function reads from GDB's own >> environment or the current inferior's environment. Looking at the >> implementation it seems, to be GDB's environment. > > You probably did see this before -- I submitted an RFC which included > this feature/patch a while ago. I don't recall seeing your > comments before, so I am glad that you're (re)sending them along! > >> Should we introduce a function that reads the environment of the current >> inferior, how would it be named? > > That is a good idea. I will get that on my TODO list. I presume it would > be acceptable to post a follow-up patch? Indeed, I'm not suggestion you do it (unless you want to). I just want to make sure we keep room for further improvements. Simon