From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 117803 invoked by alias); 31 Jul 2017 20:26:49 -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 117787 invoked by uid 89); 31 Jul 2017 20:26:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.8 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=work, work! X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 31 Jul 2017 20:26:47 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id v6VKQeEh006036 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 31 Jul 2017 16:26:45 -0400 Received: by simark.ca (Postfix, from userid 112) id 92D0F1EA08; Mon, 31 Jul 2017 16:26:40 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 41D051E043; Mon, 31 Jul 2017 16:26:30 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 31 Jul 2017 20:26:00 -0000 From: Simon Marchi To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [RFA v2 24/24] Remove make_cleanup_freeargv and gdb_buildargv In-Reply-To: <20170725172107.9799-25-tom@tromey.com> References: <20170725172107.9799-1-tom@tromey.com> <20170725172107.9799-25-tom@tromey.com> Message-ID: <80c9ece7d66ba2ad238df33b1c329f8e@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.0 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 31 Jul 2017 20:26:40 +0000 X-IsSubscribed: yes X-SW-Source: 2017-07/txt/msg00459.txt.bz2 On 2017-07-25 19:21, Tom Tromey wrote: > After the previous patches in this series, make_cleanup_freeargv and > gdb_buildargv are now unused and can be removed. > > ChangeLog > 2017-07-25 Tom Tromey > > * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv): > Remove. > * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove. > --- > gdb/ChangeLog | 6 ++++++ > gdb/utils.c | 27 --------------------------- > gdb/utils.h | 4 ---- > 3 files changed, 6 insertions(+), 31 deletions(-) > > diff --git a/gdb/ChangeLog b/gdb/ChangeLog > index 4168f39..9ac62bc 100644 > --- a/gdb/ChangeLog > +++ b/gdb/ChangeLog > @@ -1,5 +1,11 @@ > 2017-07-25 Tom Tromey > > + * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv): > + Remove. > + * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove. > + > +2017-07-25 Tom Tromey > + > * python/py-param.c (compute_enum_values): Use gdb_argv. > > 2017-07-25 Tom Tromey > diff --git a/gdb/utils.c b/gdb/utils.c > index 8a7a60f..96ae709 100644 > --- a/gdb/utils.c > +++ b/gdb/utils.c > @@ -136,18 +136,6 @@ show_pagination_enabled (struct ui_file *file, > int from_tty, > because while they use the "cleanup API" they are not part of the > "cleanup API". */ > > -static void > -do_freeargv (void *arg) > -{ > - freeargv ((char **) arg); > -} > - > -struct cleanup * > -make_cleanup_freeargv (char **arg) > -{ > - return make_cleanup (do_freeargv, arg); > -} > - > /* Helper function for make_cleanup_ui_out_redirect_pop. */ > > static void > @@ -2877,21 +2865,6 @@ gdb_argv::reset (const char *s) > m_argv = argv; > } > > -/* Call libiberty's buildargv, and return the result. > - If buildargv fails due to out-of-memory, call nomem. > - Therefore, the returned value is guaranteed to be non-NULL, > - unless the parameter itself is NULL. */ > - > -char ** > -gdb_buildargv (const char *s) > -{ > - char **argv = buildargv (s); > - > - if (s != NULL && argv == NULL) > - malloc_failure (0); > - return argv; > -} > - > int > compare_positive_ints (const void *ap, const void *bp) > { > diff --git a/gdb/utils.h b/gdb/utils.h > index 88cab4b..c922a22 100644 > --- a/gdb/utils.h > +++ b/gdb/utils.h > @@ -85,8 +85,6 @@ extern int parse_pid_to_attach (const char *args); > > extern int parse_escape (struct gdbarch *, const char **); > > -char **gdb_buildargv (const char *); > - > /* A wrapper for an array of char* that was allocated in the way that > 'buildargv' does, and should be freed with 'freeargv'. */ > > @@ -207,8 +205,6 @@ private: > > /* Cleanup utilities. */ > > -extern struct cleanup *make_cleanup_freeargv (char **); > - > struct ui_out; > extern struct cleanup * > make_cleanup_ui_out_redirect_pop (struct ui_out *uiout); LGTM, thanks a lot for your work! Simon