2012-01-24 22:36:37 +01:00
|
|
|
/* Some commonly-used VEC types.
|
|
|
|
|
2014-01-01 04:54:24 +01:00
|
|
|
Copyright (C) 2012-2014 Free Software Foundation, Inc.
|
2012-01-24 22:36:37 +01:00
|
|
|
|
|
|
|
This file is part of GDB.
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
|
|
|
|
|
|
#ifndef GDB_VECS_H
|
|
|
|
#define GDB_VECS_H
|
|
|
|
|
|
|
|
#include "vec.h"
|
|
|
|
|
2012-07-19 01:37:58 +02:00
|
|
|
typedef char *char_ptr;
|
|
|
|
typedef const char *const_char_ptr;
|
2012-04-27 22:47:57 +02:00
|
|
|
|
2012-01-24 22:36:37 +01:00
|
|
|
DEF_VEC_P (char_ptr);
|
|
|
|
|
2012-04-20 18:57:17 +02:00
|
|
|
DEF_VEC_P (const_char_ptr);
|
|
|
|
|
2013-06-26 10:01:57 +02:00
|
|
|
DEF_VEC_I (int);
|
|
|
|
|
gdb/
Code cleanup.
* charset.c (find_charset_names): Remove variables ix and elt.
Use free_char_ptr_vec.
* elfread.c (build_id_to_debug_filename): New variables debugdir_vec,
back_to and ix. Use dirnames_to_char_ptr_vec. Remove variable
debugdir_end. New variable debugdir_len.
* gdb_vecs.h (free_char_ptr_vec, make_cleanup_free_char_ptr_vec)
(dirnames_to_char_ptr_vec_append, dirnames_to_char_ptr_vec): New
declarations.
* progspace.c (clear_program_space_solib_cache): Remove variables ix
and elt. Use free_char_ptr_vec.
* source.c (add_path): Remove variables argv, arg and argv_index.
New variables dir_vec, back_to, ix and name.
Use dirnames_to_char_ptr_vec_append. Use freeargv instead of
make_cleanup_freeargv. Remove variable separator. Simplify the code
no longer expecting DIRNAME_SEPARATOR.
(openp): Remove variable p, p1 and len. New variables dir_vec,
back_to, ix and dir. Use dirnames_to_char_ptr_vec. Simplify the code
no longer expecting DIRNAME_SEPARATOR.
* symfile.c (find_separate_debug_file): New variables debugdir_vec,
back_to and ix. Use dirnames_to_char_ptr_vec. Remove variable
debugdir_end.
* utils.c (free_char_ptr_vec, do_free_char_ptr_vec)
(make_cleanup_free_char_ptr_vec, dirnames_to_char_ptr_vec_append)
(dirnames_to_char_ptr_vec): New functions.
2012-04-17 17:47:09 +02:00
|
|
|
extern void free_char_ptr_vec (VEC (char_ptr) *char_ptr_vec);
|
|
|
|
|
|
|
|
extern struct cleanup *
|
|
|
|
make_cleanup_free_char_ptr_vec (VEC (char_ptr) *char_ptr_vec);
|
|
|
|
|
2014-01-17 19:23:29 +01:00
|
|
|
extern VEC (char_ptr) *delim_string_to_char_ptr_vec (const char *str,
|
|
|
|
char delimiter);
|
|
|
|
|
gdb/
Code cleanup.
* charset.c (find_charset_names): Remove variables ix and elt.
Use free_char_ptr_vec.
* elfread.c (build_id_to_debug_filename): New variables debugdir_vec,
back_to and ix. Use dirnames_to_char_ptr_vec. Remove variable
debugdir_end. New variable debugdir_len.
* gdb_vecs.h (free_char_ptr_vec, make_cleanup_free_char_ptr_vec)
(dirnames_to_char_ptr_vec_append, dirnames_to_char_ptr_vec): New
declarations.
* progspace.c (clear_program_space_solib_cache): Remove variables ix
and elt. Use free_char_ptr_vec.
* source.c (add_path): Remove variables argv, arg and argv_index.
New variables dir_vec, back_to, ix and name.
Use dirnames_to_char_ptr_vec_append. Use freeargv instead of
make_cleanup_freeargv. Remove variable separator. Simplify the code
no longer expecting DIRNAME_SEPARATOR.
(openp): Remove variable p, p1 and len. New variables dir_vec,
back_to, ix and dir. Use dirnames_to_char_ptr_vec. Simplify the code
no longer expecting DIRNAME_SEPARATOR.
* symfile.c (find_separate_debug_file): New variables debugdir_vec,
back_to and ix. Use dirnames_to_char_ptr_vec. Remove variable
debugdir_end.
* utils.c (free_char_ptr_vec, do_free_char_ptr_vec)
(make_cleanup_free_char_ptr_vec, dirnames_to_char_ptr_vec_append)
(dirnames_to_char_ptr_vec): New functions.
2012-04-17 17:47:09 +02:00
|
|
|
extern void dirnames_to_char_ptr_vec_append (VEC (char_ptr) **vecp,
|
|
|
|
const char *dirnames);
|
|
|
|
|
|
|
|
extern VEC (char_ptr) *dirnames_to_char_ptr_vec (const char *dirnames);
|
|
|
|
|
2012-01-24 22:36:37 +01:00
|
|
|
#endif /* GDB_VECS_H */
|