public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: Tom Tromey <tom@tromey.com>, Simon Marchi <simon.marchi@ericsson.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 3/3] Remove usage of VEC(char_ptr) in gdbscm_parse_function_args
Date: Sun, 01 Apr 2018 18:25:00 -0000	[thread overview]
Message-ID: <da57e79d-d3e9-6054-886c-dc9836362c1b@polymtl.ca> (raw)
In-Reply-To: <87370eevq4.fsf@tromey.com>

On 2018-04-01 12:29 PM, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simon.marchi@ericsson.com> writes:
> 
> Simon> From: Simon Marchi <simon.marchi@polymtl.ca>
> 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 <simon.marchi@polymtl.ca>
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  <simon.marchi@polymtl.ca>
+
+	* common/gdb_vecs.h (char_ptr): Remove.
+	* tracepoint.c (encode_actions_1): Remove usage of char_ptr.
+
 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>

 	* 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

  reply	other threads:[~2018-04-01 18:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-21 21:25 [PATCH 1/3] Use std::vector in uploaded_tp Simon Marchi
2018-03-21 21:25 ` [PATCH 3/3] Remove usage of VEC(char_ptr) in gdbscm_parse_function_args Simon Marchi
2018-04-01 16:29   ` Tom Tromey
2018-04-01 18:25     ` Simon Marchi [this message]
2018-04-02  2:23       ` Tom Tromey
2018-03-21 21:25 ` [PATCH 2/3] Use std::vector and std::string instead of VEC(char_ptr) in gdbserver tdesc Simon Marchi
2018-03-30 21:20 ` [PATCH 1/3] Use std::vector in uploaded_tp Simon Marchi

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=da57e79d-d3e9-6054-886c-dc9836362c1b@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@ericsson.com \
    --cc=tom@tromey.com \
    /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).