From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 72571 invoked by alias); 1 Apr 2018 18:25:01 -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 72522 invoked by uid 89); 1 Apr 2018 18:25:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.4 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_STOCKGEN,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= 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; Sun, 01 Apr 2018 18:24:59 +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 w31IOo6q020819 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 1 Apr 2018 14:24:55 -0400 Received: from [10.0.0.11] (unknown [192.222.164.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 108481E519; Sun, 1 Apr 2018 14:24:50 -0400 (EDT) Subject: Re: [PATCH 3/3] Remove usage of VEC(char_ptr) in gdbscm_parse_function_args To: Tom Tromey , Simon Marchi Cc: gdb-patches@sourceware.org References: <1521667509-303-1-git-send-email-simon.marchi@ericsson.com> <1521667509-303-3-git-send-email-simon.marchi@ericsson.com> <87370eevq4.fsf@tromey.com> From: Simon Marchi Message-ID: Date: Sun, 01 Apr 2018 18:25:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <87370eevq4.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Sun, 1 Apr 2018 18:24:50 +0000 X-IsSubscribed: yes X-SW-Source: 2018-04/txt/msg00027.txt.bz2 On 2018-04-01 12:29 PM, Tom Tromey wrote: >>>>>> "Simon" == Simon Marchi writes: > > Simon> From: Simon Marchi > Simon> This is a straightforward replacement, no change in behavior are > Simon> intended/expected. > > Simon> This is the last usage of VEC(char_ptr), so it can now be removed. > > I think perhaps the char_ptr typedef could be removed now too. > > Tom > Indeed! I pushed this: >From ec1f2d91e07522a77cbef7a438e132ff4a2a7839 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Sun, 1 Apr 2018 14:23:17 -0400 Subject: [PATCH] Remove char_ptr typedef Now that all instances of VEC(char_ptr) are gone, we can remove the typedef. There is just one usage left, that is trivial to replace. Tested by rebuilding on an enable-targets=all build. gdb/ChangeLog: * common/gdb_vecs.h (char_ptr): Remove. * tracepoint.c (encode_actions_1): Remove usage of char_ptr. --- gdb/ChangeLog | 5 +++++ gdb/common/gdb_vecs.h | 1 - gdb/tracepoint.c | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 148b1876de59..ed039e62701d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2018-04-01 Simon Marchi + + * common/gdb_vecs.h (char_ptr): Remove. + * tracepoint.c (encode_actions_1): Remove usage of char_ptr. + 2018-03-30 Simon Marchi * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC diff --git a/gdb/common/gdb_vecs.h b/gdb/common/gdb_vecs.h index 8bb70158f47e..141d05e0189a 100644 --- a/gdb/common/gdb_vecs.h +++ b/gdb/common/gdb_vecs.h @@ -22,7 +22,6 @@ #include "vec.h" -typedef char *char_ptr; typedef const char *const_char_ptr; DEF_VEC_P (const_char_ptr); diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index 954d039caf78..24bb91418a01 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -1382,7 +1382,7 @@ encode_actions_1 (struct command_line *action, case OP_VAR_VALUE: { struct symbol *sym = exp->elts[2].symbol; - char_ptr name = (char_ptr) SYMBOL_NATURAL_NAME (sym); + const char *name = SYMBOL_NATURAL_NAME (sym); collect->collect_symbol (exp->elts[2].symbol, target_gdbarch (), -- 2.16.3