2012-01-24 21:36:37 +00:00
|
|
|
/* Some commonly-used VEC types.
|
|
|
|
|
|
|
|
Copyright (C) 2012 Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
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-18 23:37:58 +00:00
|
|
|
typedef char *char_ptr;
|
|
|
|
typedef const char *const_char_ptr;
|
2012-04-27 20:47:57 +00:00
|
|
|
|
2012-01-24 21:36:37 +00:00
|
|
|
DEF_VEC_P (char_ptr);
|
|
|
|
|
2012-04-20 16:57:17 +00:00
|
|
|
DEF_VEC_P (const_char_ptr);
|
|
|
|
|
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 15:47:09 +00: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);
|
|
|
|
|
|
|
|
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 21:36:37 +00:00
|
|
|
#endif /* GDB_VECS_H */
|