X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fsymtab.h;h=d0465987749511b43211a7ab91fa7673f5ad9388;hb=491144b5e21bbfd41969c175aebb663976f59058;hp=f38e544cdb46f4d5cf6347af88d95e3bc2efa32e;hpb=4acfdd20c9ef3c0368868b4221554f0abef04196;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/symtab.h b/gdb/symtab.h index f38e544cdb..d046598774 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -497,7 +497,7 @@ extern void symbol_set_language (struct general_symbol_info *symbol, symbol_set_names (&(symbol)->ginfo, linkage_name, len, copy_name, \ (objfile)->per_bfd) extern void symbol_set_names (struct general_symbol_info *symbol, - const char *linkage_name, int len, int copy_name, + const char *linkage_name, int len, bool copy_name, struct objfile_per_bfd_storage *per_bfd); /* Now come lots of name accessor macros. Short version as to when to @@ -544,7 +544,7 @@ extern const char *symbol_demangled_name #define SYMBOL_PRINT_NAME(symbol) \ (demangle ? SYMBOL_NATURAL_NAME (symbol) : SYMBOL_LINKAGE_NAME (symbol)) -extern int demangle; +extern bool demangle; /* Macro that returns the name to be used when sorting and searching symbols. In C++, we search for the demangled form of a name, @@ -2064,7 +2064,7 @@ extern unsigned int symtab_create_debug; extern unsigned int symbol_lookup_debug; -extern int basenames_may_differ; +extern bool basenames_may_differ; int compare_filenames_for_search (const char *filename, const char *search_name); @@ -2092,11 +2092,30 @@ std::vector find_pcs_for_symtab_line typedef bool (symbol_found_callback_ftype) (struct block_symbol *bsym); -void iterate_over_symbols (const struct block *block, +/* Iterate over the symbols named NAME, matching DOMAIN, in BLOCK. + + For each symbol that matches, CALLBACK is called. The symbol is + passed to the callback. + + If CALLBACK returns false, the iteration ends and this function + returns false. Otherwise, the search continues, and the function + eventually returns true. */ + +bool iterate_over_symbols (const struct block *block, const lookup_name_info &name, const domain_enum domain, gdb::function_view callback); +/* Like iterate_over_symbols, but if all calls to CALLBACK return + true, then calls CALLBACK one additional time with a block_symbol + that has a valid block but a NULL symbol. */ + +bool iterate_over_symbols_terminated + (const struct block *block, + const lookup_name_info &name, + const domain_enum domain, + gdb::function_view callback); + /* Storage type used by demangle_for_lookup. demangle_for_lookup either returns a const char * pointer that points to either of the fields of this type, or a pointer to the input NAME. This is done