This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v8] C++ify gdb/common/environ.c
- From: Simon Marchi <simon dot marchi at polymtl dot ca>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>, Pedro Alves <palves at redhat dot com>
- Date: Tue, 20 Jun 2017 14:46:48 +0200
- Subject: Re: [PATCH v8] C++ify gdb/common/environ.c
- Authentication-results: sourceware.org; auth=none
- References: <20170413040455.23996-1-sergiodj@redhat.com> <20170620032740.30497-1-sergiodj@redhat.com>
On 2017-06-20 05:27, Sergio Durigan Junior wrote:
+/* Create a gdb_environ object using the host's environment
+ variables. */
This comment (about from_host_environ) should probably go in the header
file, with a /* See common/environ.h. */ here.
+ /* Return the value in the environment for the variable VAR. The
+ return pointer is only valid as long as VAR is not
return -> returned?
+ removed/replaced from the environment. */
What if another variable is set and it causes reallocation of the
vector? We could be safe and say "as long as the gdb_environ object is
not modified".
Otherwise, LGTM.
Simon