public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: Simon Marchi <simark@simark.ca>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Environment variable convenience function
Date: Tue, 25 Apr 2023 08:59:20 -0700	[thread overview]
Message-ID: <8c0f108d-d2fb-b5b7-b767-e636db7bff25@redhat.com> (raw)
In-Reply-To: <331951a0-2148-3489-3dd9-5961489af0bc@simark.ca>

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 <cough>a while ago</cough>. 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?

> I'm wondering if, to avoid confusion, this one should be named something
> like _gdb_env, and an hypothetical future function that reads the
> inferior's environment would be named something like _inferior_env.

Yes, I completely agree. I've updated my patch to follow this. I will send
a v2.

Thank you for the feedback!
Keith


  reply	other threads:[~2023-04-25 15:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-23 17:07 Keith Seitz
2023-04-23 20:20 ` Simon Marchi
2023-04-25 15:59   ` Keith Seitz [this message]
2023-04-25 18:56     ` Simon Marchi
2023-04-24 11:53 ` Eli Zaretskii
2023-04-25 16:02   ` Keith Seitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8c0f108d-d2fb-b5b7-b767-e636db7bff25@redhat.com \
    --to=keiths@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simark@simark.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).