This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Remove char_ptr typedef


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ec1f2d91e07522a77cbef7a438e132ff4a2a7839

commit ec1f2d91e07522a77cbef7a438e132ff4a2a7839
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date:   Sun Apr 1 14:23:17 2018 -0400

    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.

Diff:
---
 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 148b187..ed039e6 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 8bb7015..141d05e 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 954d039..24bb914 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 (),


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]