This is the mail archive of the gdb-patches@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]

Re: [RFA 08/10] More use of std::vector in linespec.c


On 2018-04-01 12:35 PM, Tom Tromey wrote:
> This changes some spots in linespec.c to take a std::vector.  This
> patch spilled out to objc-lang.c a bit as well.  This change allows
> for the removal of some cleanups.
> 
> 2018-03-31  Tom Tromey  <tom@tromey.com>
> 
> 	* utils.c (compare_strings): Remove.
> 	* utils.h (compare_strings): Remove.
> 	* objc-lang.h (find_imps): Update.
> 	* objc-lang.c (find_methods): Take a std::vector.
> 	(uniquify_strings, find_imps): Likewise.
> 	* linespec.c (find_methods): Take a std::vector.
> 	(decode_objc): Use std::vector.
> 	(add_all_symbol_names_from_pspace, find_superclass_methods): Take
> 	a std::vector.
> 	(find_method, find_function_symbols): Use std::vector.
> ---
>  gdb/ChangeLog   | 13 +++++++++++++
>  gdb/linespec.c  | 47 ++++++++++++++++++-----------------------------
>  gdb/objc-lang.c | 44 ++++++++++++--------------------------------
>  gdb/objc-lang.h |  4 ++--
>  gdb/utils.c     | 11 -----------
>  gdb/utils.h     |  1 -
>  6 files changed, 45 insertions(+), 75 deletions(-)
> 
> diff --git a/gdb/linespec.c b/gdb/linespec.c
> index 48168eaaa6..96a3117293 100644
> --- a/gdb/linespec.c
> +++ b/gdb/linespec.c
> @@ -379,7 +379,7 @@ static void add_matching_symbols_to_info (const char *name,
>  
>  static void add_all_symbol_names_from_pspace (struct collect_info *info,
>  					      struct program_space *pspace,
> -					      VEC (const_char_ptr) *names,
> +					      const std::vector<const char *> &names,

This line is now too long, otherwise LGTM.

Simon


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