+ entry_info ei {};
+
+ /* The name and language of any "main" found in this objfile. The
+ name can be NULL, which means that the information was not
+ recorded. */
+
+ const char *name_of_main = NULL;
+ enum language language_of_main = language_unknown;
+
+ /* Each file contains a pointer to an array of minimal symbols for all
+ global symbols that are defined within the file. The array is
+ terminated by a "null symbol", one that has a NULL pointer for the
+ name and a zero value for the address. This makes it easy to walk
+ through the array when passed a pointer to somewhere in the middle
+ of it. There is also a count of the number of symbols, which does
+ not include the terminating null symbol. */
+
+ gdb::unique_xmalloc_ptr<minimal_symbol> msymbols;
+ int minimal_symbol_count = 0;
+
+ /* The number of minimal symbols read, before any minimal symbol
+ de-duplication is applied. Note in particular that this has only
+ a passing relationship with the actual size of the table above;
+ use minimal_symbol_count if you need the true size. */
+
+ int n_minsyms = 0;
+
+ /* This is true if minimal symbols have already been read. Symbol
+ readers can use this to bypass minimal symbol reading. Also, the
+ minimal symbol table management code in minsyms.c uses this to
+ suppress new minimal symbols. You might think that MSYMBOLS or
+ MINIMAL_SYMBOL_COUNT could be used for this, but it is possible
+ for multiple readers to install minimal symbols into a given
+ per-BFD. */
+
+ bool minsyms_read : 1;
+
+ /* This is a hash table used to index the minimal symbols by (mangled)
+ name. */
+
+ minimal_symbol *msymbol_hash[MINIMAL_SYMBOL_HASH_SIZE] {};
+
+ /* This hash table is used to index the minimal symbols by their
+ demangled names. Uses a language-specific hash function via
+ search_name_hash. */
+
+ minimal_symbol *msymbol_demangled_hash[MINIMAL_SYMBOL_HASH_SIZE] {};
+
+ /* All the different languages of symbols found in the demangled
+ hash table. */
+ std::bitset<nr_languages> demangled_hash_languages;
+};
+
+/* An iterator that first returns a parent objfile, and then each
+ separate debug objfile. */
+
+class separate_debug_iterator
+{
+public:
+
+ explicit separate_debug_iterator (struct objfile *objfile)
+ : m_objfile (objfile),
+ m_parent (objfile)
+ {
+ }
+
+ bool operator!= (const separate_debug_iterator &other)
+ {
+ return m_objfile != other.m_objfile;
+ }
+
+ separate_debug_iterator &operator++ ();
+
+ struct objfile *operator* ()
+ {
+ return m_objfile;
+ }
+
+private:
+
+ struct objfile *m_objfile;
+ struct objfile *m_parent;
+};
+
+/* A range adapter wrapping separate_debug_iterator. */
+
+class separate_debug_range
+{
+public:
+
+ explicit separate_debug_range (struct objfile *objfile)
+ : m_objfile (objfile)
+ {
+ }
+
+ separate_debug_iterator begin ()
+ {
+ return separate_debug_iterator (m_objfile);
+ }
+
+ separate_debug_iterator end ()
+ {
+ return separate_debug_iterator (nullptr);
+ }
+
+private:
+
+ struct objfile *m_objfile;