/* See progspace.h. */
+void
+program_space::map_symbol_filenames (symbol_filename_listener fun,
+ bool need_fullname)
+{
+ for (objfile &objfile : objfiles ())
+ objfile.map_symbol_filenames (fun, need_fullname);
+}
+
+/* See progspace.h. */
+
void
program_space::add_objfile (std::unique_ptr<objfile> &&objfile,
struct objfile *before)
#include "solib.h"
#include "target.h"
#include "gdb_bfd.h"
+#include "quick-symbol.h"
#include "registry.h"
#include "gdbsupport/safe-iterator.h"
#include "gdbsupport/intrusive_list.h"
(iterate_over_objfiles_in_search_order_cb_ftype cb,
objfile *current_objfile);
+ /* Wrapper around the quick_symbol_functions map_symbol_filenames
+ "method". Map function FUN over every file, in every objfile in
+ this program space. See
+ quick_symbol_functions.map_symbol_filenames for details. */
+ void map_symbol_filenames (symbol_filename_listener fun, bool need_fullname);
+
/* Add OBJFILE to the list of objfiles, putting it just before
BEFORE. If BEFORE is nullptr, it will go at the end of the
list. */
objfile->pspace ()->remove_target_sections (objfile);
}
-/* Wrapper around the quick_symbol_functions map_symbol_filenames "method".
- Map function FUN over every file.
- See quick_symbol_functions.map_symbol_filenames for details. */
-
-void
-map_symbol_filenames (symbol_filename_listener fun, bool need_fullname)
-{
- for (objfile &objfile : current_program_space->objfiles ())
- objfile.map_symbol_filenames (fun, need_fullname);
-}
-
#if GDB_SELF_TEST
namespace selftests {
extern scoped_restore_tmpl<int> increment_reading_symtab (void);
-void map_symbol_filenames (symbol_filename_listener fun, bool need_fullname);
-
/* Target-agnostic function to load the sections of an executable into memory.
ARGS should be in the form "EXECUTABLE [OFFSET]", where OFFSET is an
if (!group_by_objfile)
{
data.reset_output ();
- map_symbol_filenames (data, true /*need_fullname*/);
+ current_program_space->map_symbol_filenames (data,
+ true /*need_fullname*/);
}
}
datum.word = text;
datum.text_len = text_len;
datum.list = &list;
- map_symbol_filenames (datum, false /*need_fullname*/);
+ current_program_space->map_symbol_filenames (datum, false /*need_fullname*/);
return list;
}