GDB (xrefs)
|
#include "defs.h"
#include <ctype.h>
#include "gdb_obstack.h"
#include "symtab.h"
#include "buildsym.h"
#include "dictionary.h"
Go to the source code of this file.
Classes | |
struct | dict_vector |
struct | dictionary_hashed |
struct | dictionary_hashed_expandable |
struct | dictionary_linear |
struct | dictionary_linear_expandable |
struct | dictionary |
Macros | |
#define | DICT_VECTOR(d) (d)->vector |
#define | DICT_HASHED_NBUCKETS(d) (d)->data.hashed.nbuckets |
#define | DICT_HASHED_BUCKETS(d) (d)->data.hashed.buckets |
#define | DICT_HASHED_BUCKET(d, i) DICT_HASHED_BUCKETS (d) [i] |
#define | DICT_HASHED_EXPANDABLE_NSYMS(d) (d)->data.hashed_expandable.nsyms |
#define | DICT_LINEAR_NSYMS(d) (d)->data.linear.nsyms |
#define | DICT_LINEAR_SYMS(d) (d)->data.linear.syms |
#define | DICT_LINEAR_SYM(d, i) DICT_LINEAR_SYMS (d) [i] |
#define | DICT_LINEAR_EXPANDABLE_CAPACITY(d) (d)->data.linear_expandable.capacity |
#define | DICT_EXPANDABLE_INITIAL_CAPACITY 10 |
#define | DICT_HASHTABLE_SIZE(n) ((n)/5 + 1) |
#define | DICT_ITERATOR_DICT(iter) (iter)->dict |
#define | DICT_ITERATOR_INDEX(iter) (iter)->index |
#define | DICT_ITERATOR_CURRENT(iter) (iter)->current |
Enumerations | |
enum | dict_type { DICT_HASHED, DICT_HASHED_EXPANDABLE, DICT_LINEAR, DICT_LINEAR_EXPANDABLE } |
Variables | |
static const struct dict_vector | dict_hashed_vector |
static const struct dict_vector | dict_hashed_expandable_vector |
static const struct dict_vector | dict_linear_vector |
static const struct dict_vector | dict_linear_expandable_vector |
#define DICT_EXPANDABLE_INITIAL_CAPACITY 10 |
Definition at line 202 of file dictionary.c.
Referenced by dict_create_hashed_expandable(), and dict_create_linear_expandable().
#define DICT_HASHED_BUCKET | ( | d, | |
i | |||
) | DICT_HASHED_BUCKETS (d) [i] |
Definition at line 187 of file dictionary.c.
Referenced by iter_match_first_hashed(), and iterator_hashed_advance().
#define DICT_HASHED_BUCKETS | ( | d | ) | (d)->data.hashed.buckets |
Definition at line 186 of file dictionary.c.
Referenced by dict_create_hashed(), dict_create_hashed_expandable(), expand_hashtable(), free_hashed_expandable(), and insert_symbol_hashed().
#define DICT_HASHED_EXPANDABLE_NSYMS | ( | d | ) | (d)->data.hashed_expandable.nsyms |
Definition at line 189 of file dictionary.c.
Referenced by add_symbol_hashed_expandable(), dict_create_hashed_expandable(), and size_hashed_expandable().
#define DICT_HASHED_NBUCKETS | ( | d | ) | (d)->data.hashed.nbuckets |
Definition at line 185 of file dictionary.c.
Referenced by add_symbol_hashed_expandable(), dict_create_hashed(), dict_create_hashed_expandable(), expand_hashtable(), insert_symbol_hashed(), iter_match_first_hashed(), iterator_hashed_advance(), and size_hashed().
#define DICT_HASHTABLE_SIZE | ( | n | ) | ((n)/5 + 1) |
Definition at line 207 of file dictionary.c.
Referenced by add_symbol_hashed_expandable(), and dict_create_hashed().
#define DICT_ITERATOR_CURRENT | ( | iter | ) | (iter)->current |
Definition at line 220 of file dictionary.c.
Referenced by iter_match_first_hashed(), iter_match_next_hashed(), iterator_hashed_advance(), and iterator_next_hashed().
#define DICT_ITERATOR_DICT | ( | iter | ) | (iter)->dict |
Definition at line 214 of file dictionary.c.
Referenced by dict_iter_match_next(), dict_iterator_next(), iter_match_first_hashed(), iter_match_first_linear(), iter_match_next_linear(), iterator_first_hashed(), iterator_first_linear(), iterator_hashed_advance(), and iterator_next_linear().
#define DICT_ITERATOR_INDEX | ( | iter | ) | (iter)->index |
Definition at line 217 of file dictionary.c.
Referenced by iter_match_first_linear(), iter_match_next_linear(), iterator_first_hashed(), iterator_first_linear(), iterator_hashed_advance(), and iterator_next_linear().
#define DICT_LINEAR_EXPANDABLE_CAPACITY | ( | d | ) | (d)->data.linear_expandable.capacity |
Definition at line 197 of file dictionary.c.
Referenced by add_symbol_linear_expandable(), and dict_create_linear_expandable().
#define DICT_LINEAR_NSYMS | ( | d | ) | (d)->data.linear.nsyms |
Definition at line 193 of file dictionary.c.
Referenced by add_symbol_linear_expandable(), dict_create_linear(), dict_create_linear_expandable(), iter_match_next_linear(), iterator_first_linear(), iterator_next_linear(), and size_linear().
#define DICT_LINEAR_SYM | ( | d, | |
i | |||
) | DICT_LINEAR_SYMS (d) [i] |
Definition at line 195 of file dictionary.c.
Referenced by add_symbol_linear_expandable(), iter_match_next_linear(), iterator_first_linear(), and iterator_next_linear().
#define DICT_LINEAR_SYMS | ( | d | ) | (d)->data.linear.syms |
Definition at line 194 of file dictionary.c.
Referenced by add_symbol_linear_expandable(), dict_create_linear(), dict_create_linear_expandable(), and free_linear_expandable().
#define DICT_VECTOR | ( | d | ) | (d)->vector |
Definition at line 181 of file dictionary.c.
Referenced by dict_add_symbol(), dict_create_hashed(), dict_create_hashed_expandable(), dict_create_linear(), dict_create_linear_expandable(), dict_free(), dict_iter_match_first(), dict_iter_match_next(), dict_iterator_first(), dict_iterator_next(), and dict_size().
enum dict_type |
Enumerator | |
---|---|
DICT_HASHED | |
DICT_HASHED_EXPANDABLE | |
DICT_LINEAR | |
DICT_LINEAR_EXPANDABLE |
Definition at line 89 of file dictionary.c.
|
static |
Definition at line 734 of file dictionary.c.
References DICT_HASHED_EXPANDABLE_NSYMS, DICT_HASHED_NBUCKETS, DICT_HASHTABLE_SIZE, expand_hashtable(), and insert_symbol_hashed().
|
static |
Definition at line 935 of file dictionary.c.
References DICT_LINEAR_EXPANDABLE_CAPACITY, DICT_LINEAR_NSYMS, DICT_LINEAR_SYM, DICT_LINEAR_SYMS, and xrealloc().
|
static |
Definition at line 599 of file dictionary.c.
References _, and internal_error().
void dict_add_pending | ( | struct dictionary * | dict, |
const struct pending * | symbol_list | ||
) |
Definition at line 504 of file dictionary.c.
References dict_add_symbol(), pending::next, pending::nsyms, and pending::symbol.
Referenced by augment_type_symtab(), and finish_block_internal().
void dict_add_symbol | ( | struct dictionary * | dict, |
struct symbol * | sym | ||
) |
Definition at line 495 of file dictionary.c.
References add_symbol(), and DICT_VECTOR.
Referenced by add_class_symtab_symbol(), add_symbol(), and dict_add_pending().
struct dictionary* dict_create_hashed | ( | struct obstack * | obstack, |
const struct pending * | symbol_list | ||
) |
Definition at line 356 of file dictionary.c.
References DICT_HASHED_BUCKETS, DICT_HASHED_NBUCKETS, dict_hashed_vector, DICT_HASHTABLE_SIZE, DICT_VECTOR, insert_symbol_hashed(), pending::next, pending::nsyms, and pending::symbol.
Referenced by finish_block_internal().
struct dictionary* dict_create_hashed_expandable | ( | void | ) |
Definition at line 400 of file dictionary.c.
References DICT_EXPANDABLE_INITIAL_CAPACITY, DICT_HASHED_BUCKETS, DICT_HASHED_EXPANDABLE_NSYMS, dict_hashed_expandable_vector, DICT_HASHED_NBUCKETS, DICT_VECTOR, xcalloc(), and xmalloc().
Referenced by finish_block_internal(), get_java_class_symtab(), and new_block().
struct dictionary* dict_create_linear | ( | struct obstack * | obstack, |
const struct pending * | symbol_list | ||
) |
Definition at line 420 of file dictionary.c.
References DICT_LINEAR_NSYMS, DICT_LINEAR_SYMS, dict_linear_vector, DICT_VECTOR, pending::next, pending::nsyms, and pending::symbol.
Referenced by finalize_symtab(), finish_block_internal(), and get_java_class_symtab().
struct dictionary* dict_create_linear_expandable | ( | void | ) |
Definition at line 465 of file dictionary.c.
References DICT_EXPANDABLE_INITIAL_CAPACITY, DICT_LINEAR_EXPANDABLE_CAPACITY, dict_linear_expandable_vector, DICT_LINEAR_NSYMS, DICT_LINEAR_SYMS, DICT_VECTOR, and xmalloc().
Referenced by new_block().
int dict_empty | ( | struct dictionary * | dict | ) |
Definition at line 580 of file dictionary.c.
References dict_iterator_first().
void dict_free | ( | struct dictionary * | dict | ) |
Definition at line 487 of file dictionary.c.
References DICT_VECTOR.
Referenced by jv_per_objfile_free().
Definition at line 793 of file dictionary.c.
References hash(), msymbol_hash_iw(), startswith(), string, and SYMBOL_HASH_NEXT.
Referenced by insert_symbol_hashed(), and iter_match_first_hashed().
struct symbol* dict_iter_match_first | ( | const struct dictionary * | dict, |
const char * | name, | ||
symbol_compare_ftype * | compare, | ||
struct dict_iterator * | iterator | ||
) |
Definition at line 551 of file dictionary.c.
References DICT_VECTOR.
Referenced by block_iter_match_first(), block_iter_match_step(), and dict_iter_name_first().
struct symbol* dict_iter_match_next | ( | const char * | name, |
symbol_compare_ftype * | compare, | ||
struct dict_iterator * | iterator | ||
) |
Definition at line 560 of file dictionary.c.
References DICT_ITERATOR_DICT, and DICT_VECTOR.
Referenced by block_iter_match_next(), block_iter_match_step(), and dict_iter_name_next().
struct symbol* dict_iter_name_first | ( | const struct dictionary * | dict, |
const char * | name, | ||
struct dict_iterator * | iterator | ||
) |
Definition at line 537 of file dictionary.c.
References dict_iter_match_first(), and strcmp_iw().
Referenced by block_iter_name_first(), block_iter_name_step(), and block_lookup_symbol_primary().
struct symbol* dict_iter_name_next | ( | const char * | name, |
struct dict_iterator * | iterator | ||
) |
Definition at line 545 of file dictionary.c.
References dict_iter_match_next(), and strcmp_iw().
Referenced by block_iter_name_next(), block_iter_name_step(), and block_lookup_symbol_primary().
struct symbol* dict_iterator_first | ( | const struct dictionary * | dict, |
struct dict_iterator * | iterator | ||
) |
Definition at line 520 of file dictionary.c.
References DICT_VECTOR.
Referenced by block_iterator_first(), block_iterator_step(), and dict_empty().
struct symbol* dict_iterator_next | ( | struct dict_iterator * | iterator | ) |
Definition at line 530 of file dictionary.c.
References DICT_ITERATOR_DICT, and DICT_VECTOR.
Referenced by block_iterator_next(), and block_iterator_step().
int dict_size | ( | const struct dictionary * | dict | ) |
|
static |
Definition at line 753 of file dictionary.c.
References DICT_HASHED_BUCKETS, DICT_HASHED_NBUCKETS, symbol::hash_next, insert_symbol_hashed(), xcalloc(), and xfree().
Referenced by add_symbol_hashed_expandable().
|
static |
Definition at line 727 of file dictionary.c.
References DICT_HASHED_BUCKETS, and xfree().
|
static |
Definition at line 927 of file dictionary.c.
References DICT_LINEAR_SYMS, and xfree().
|
static |
Definition at line 593 of file dictionary.c.
|
static |
Definition at line 706 of file dictionary.c.
References dict_hash(), DICT_HASHED_BUCKETS, DICT_HASHED_NBUCKETS, symbol::hash_next, and SYMBOL_SEARCH_NAME.
Referenced by add_symbol_hashed_expandable(), dict_create_hashed(), and expand_hashtable().
|
static |
Definition at line 655 of file dictionary.c.
References dict_hash(), DICT_HASHED_BUCKET, DICT_HASHED_NBUCKETS, DICT_ITERATOR_CURRENT, DICT_ITERATOR_DICT, symbol::hash_next, and SYMBOL_SEARCH_NAME.
|
static |
Definition at line 885 of file dictionary.c.
References DICT_ITERATOR_DICT, DICT_ITERATOR_INDEX, and iter_match_next_linear().
|
static |
Definition at line 685 of file dictionary.c.
References DICT_ITERATOR_CURRENT, symbol::hash_next, and SYMBOL_SEARCH_NAME.
|
static |
Definition at line 896 of file dictionary.c.
References DICT_ITERATOR_DICT, DICT_ITERATOR_INDEX, DICT_LINEAR_NSYMS, DICT_LINEAR_SYM, and SYMBOL_SEARCH_NAME.
Referenced by iter_match_first_linear().
|
static |
Definition at line 608 of file dictionary.c.
References DICT_ITERATOR_DICT, DICT_ITERATOR_INDEX, and iterator_hashed_advance().
|
static |
Definition at line 865 of file dictionary.c.
References DICT_ITERATOR_DICT, DICT_ITERATOR_INDEX, DICT_LINEAR_NSYMS, and DICT_LINEAR_SYM.
|
static |
Definition at line 633 of file dictionary.c.
References DICT_HASHED_BUCKET, DICT_HASHED_NBUCKETS, DICT_ITERATOR_CURRENT, DICT_ITERATOR_DICT, and DICT_ITERATOR_INDEX.
Referenced by iterator_first_hashed(), and iterator_next_hashed().
|
static |
Definition at line 617 of file dictionary.c.
References DICT_ITERATOR_CURRENT, and iterator_hashed_advance().
|
static |
Definition at line 874 of file dictionary.c.
References DICT_ITERATOR_DICT, DICT_ITERATOR_INDEX, DICT_LINEAR_NSYMS, and DICT_LINEAR_SYM.
|
static |
Definition at line 719 of file dictionary.c.
References DICT_HASHED_NBUCKETS.
|
static |
Definition at line 747 of file dictionary.c.
References DICT_HASHED_EXPANDABLE_NSYMS.
|
static |
Definition at line 919 of file dictionary.c.
References DICT_LINEAR_NSYMS.
|
static |
Definition at line 303 of file dictionary.c.
Referenced by dict_create_hashed_expandable().
|
static |
Definition at line 291 of file dictionary.c.
Referenced by dict_create_hashed().
|
static |
Definition at line 327 of file dictionary.c.
Referenced by dict_create_linear_expandable().
|
static |
Definition at line 315 of file dictionary.c.
Referenced by dict_create_linear().