aboutsummaryrefslogtreecommitdiff
path: root/bfd/coff-arm.c
diff options
context:
space:
mode:
authorPaul N. Hilfinger <hilfinger@adacore.com>2010-10-07 07:13:51 +0000
committerPaul N. Hilfinger <hilfinger@adacore.com>2010-10-07 07:13:51 +0000
commit40658b9446ce0507f120bdc69c51c3dfbfd35381 (patch)
treebf7dc4987b4885a535d3481cf952858337588741 /bfd/coff-arm.c
parentc4d840bdd6f9e19843bd35835cc08e992fe5e1db (diff)
downloadgdb-40658b9446ce0507f120bdc69c51c3dfbfd35381.zip
gdb-40658b9446ce0507f120bdc69c51c3dfbfd35381.tar.gz
gdb-40658b9446ce0507f120bdc69c51c3dfbfd35381.tar.bz2
Rework symbol searches to move Ada-specific stuff to ada-lang.c.
This is a clean-up of some of our symbol-lookup machinery to pull some kludgy Ada-specific definitions out of psymtab.c. In place of map_ada_symtabs and ada_lookup_partial_symbol, we have a method map_matching_symbols, which searches through all symbol tables and partial symbol tables looking for a symbol that matches according to a matching function that is passed as a parameter. This requires some care, because partial symbol tables speed up searches by binary search, while full symbol tables use hashing. To call map_matching_symbols, therefore, you may need to supply both a matching function that is compatible with the dictionary hash function and an ordering relation that is compatible with strcmp_iw, which is used to order partial symbol tables. Having added this general routine to psymtab.c, we use it in ada-lang.c to rework add_non_local_symbols (now renamed add_nonlocal_symbols). Changelog: gdb/ * ada-lang.c (full_match): Declare. (ada_match_name): Rename to match_name (we should avoid prefixing static symbols with "ada_"). (match_name): New name for ada_match_name. (struct ada_psym_data): Remove and replace with... (struct match_data): User data for map_matching_symbols. (ada_add_psyms): Remove. (aux_add_nonlocal_symbols): New function, used as callback for map_matching_symbols. (compare_names): Ordering function adopted from strcmp_iw for Ada-encoded symbols. (ada_add_non_local_symbols): Rename to add_nonlocal_symbols. (add_nonlocal_symbols): Renamed from ada_add_non_local_symbols. Rework to use map_matching_symbols instead of map_ada_symtabs. (ada_lookup_symbol_list): Use add_nonlocal_symbols. * psymtab.c: Include dependency on dictionary.h. (match_partial_symbol): New function. (ada_lookup_partial_symbol): Remove. (map_block): New function, auxiliary to map_matching_symbols_psymtab. (map_matching_symbols_psymtab): New function. (psym_functions): Replace map_ada_symtabs with map_matching_symbols_psymtab. * symfile.h: Replace map_ada_symtabs definition with map_matching_symbols.
Diffstat (limited to 'bfd/coff-arm.c')
0 files changed, 0 insertions, 0 deletions