From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 84795 invoked by alias); 20 Jun 2017 12:46:51 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 84780 invoked by uid 89); 20 Jun 2017 12:46:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=Hx-languages-length:666 X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 20 Jun 2017 12:46:50 +0000 Received: by simark.ca (Postfix, from userid 33) id 7900A1E5A2; Tue, 20 Jun 2017 08:46:48 -0400 (EDT) To: Sergio Durigan Junior Subject: Re: [PATCH v8] C++ify gdb/common/environ.c X-PHP-Originating-Script: 33:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 20 Jun 2017 12:46:00 -0000 From: Simon Marchi Cc: GDB Patches , Pedro Alves In-Reply-To: <20170620032740.30497-1-sergiodj@redhat.com> References: <20170413040455.23996-1-sergiodj@redhat.com> <20170620032740.30497-1-sergiodj@redhat.com> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.2.5 X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg00569.txt.bz2 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