Change boolean options to bool instead of int
[deliverable/binutils-gdb.git] / gdb / symtab.h
index f38e544cdb46f4d5cf6347af88d95e3bc2efa32e..d0465987749511b43211a7ab91fa7673f5ad9388 100644 (file)
@@ -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<CORE_ADDR> 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<symbol_found_callback_ftype> 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<symbol_found_callback_ftype> 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
This page took 0.026976 seconds and 4 git commands to generate.