diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-11-24 19:01:51 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-11-24 19:01:51 +0000 |
commit | 2edb89d30e939aeafb135c42ad96e80716f984b9 (patch) | |
tree | b6aa082c918612c2c7640a2f4f04cb5c7647629f /gdb/symfile.h | |
parent | f6df29bc29c8eb8ec95a14c0f96906ead96c4107 (diff) | |
download | gdb-2edb89d30e939aeafb135c42ad96e80716f984b9.zip gdb-2edb89d30e939aeafb135c42ad96e80716f984b9.tar.gz gdb-2edb89d30e939aeafb135c42ad96e80716f984b9.tar.bz2 |
gdb/
Code cleanup.
* dictionary.c
(struct dict_vector) <iter_match_first, iter_match_next>
(iter_match_first_hashed, iter_match_next_hashed)
(iter_match_first_linear, iter_match_next_linear)
(dict_iter_match_first, dict_iter_match_next, iter_match_first_hashed)
(iter_match_next_hashed, iter_match_first_linear)
(iter_match_next_linear): Use symbol_compare_ftype.
* dictionary.h: Include symfile.h.
(dict_iter_match_first, dict_iter_match_next): Use
symbol_compare_ftype.
* dwarf2read.c (dw2_map_matching_symbols): Likewise.
* psymtab.c (match_partial_symbol, match_partial_symbol, map_block)
(map_matching_symbols_psymtab): Likewise.
* symfile.h (symbol_compare_ftype): New typedef.
(struct quick_symbol_functions) <map_matching_symbols): Use
symbol_compare_ftype.
Diffstat (limited to 'gdb/symfile.h')
-rw-r--r-- | gdb/symfile.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gdb/symfile.h b/gdb/symfile.h index c9f4e65..e989d5c 100644 --- a/gdb/symfile.h +++ b/gdb/symfile.h @@ -32,6 +32,11 @@ struct obj_section; struct obstack; struct block; +/* Comparison function for symbol look ups. */ + +typedef int (symbol_compare_ftype) (const char *string1, + const char *string2); + /* Partial symbols are stored in the psymbol_cache and pointers to them are kept in a dynamically grown array that is obtained from malloc and grown as necessary via realloc. Each objfile typically @@ -234,9 +239,8 @@ struct quick_symbol_functions int (*callback) (struct block *, struct symbol *, void *), void *data, - int (*match) (const char *, const char *), - int (*ordered_compare) (const char *, - const char *)); + symbol_compare_ftype *match, + symbol_compare_ftype *ordered_compare); /* Expand all symbol tables in OBJFILE matching some criteria. |