#include "addrmap.h"
#include "arch-utils.h"
#include "exec.h"
-#include "observer.h"
+#include "observable.h"
#include "complaints.h"
#include "psymtab.h"
#include "solist.h"
#include "gdb_bfd.h"
#include "btrace.h"
+#include "common/pathstuff.h"
#include <vector>
objfile::~objfile ()
{
/* First notify observers that this objfile is about to be freed. */
- observer_notify_free_objfile (this);
+ gdb::observers::free_objfile.notify (this);
/* Free all separate debug objfiles. */
free_objfile_separate_debug (this);
debug_objfile;
debug_objfile = objfile_separate_debug_iterate (objfile, debug_objfile))
{
- struct section_addr_info *objfile_addrs;
- struct cleanup *my_cleanups;
-
- objfile_addrs = build_section_addr_info_from_objfile (objfile);
- my_cleanups = make_cleanup (xfree, objfile_addrs);
+ section_addr_info objfile_addrs
+ = build_section_addr_info_from_objfile (objfile);
/* Here OBJFILE_ADDRS contain the correct absolute addresses, the
relative ones must be already created according to debug_objfile. */
- addr_info_make_relative (objfile_addrs, debug_objfile->obfd);
+ addr_info_make_relative (&objfile_addrs, debug_objfile->obfd);
gdb_assert (debug_objfile->num_sections
== gdb_bfd_count_sections (debug_objfile->obfd));
objfile_addrs);
changed |= objfile_relocate1 (debug_objfile, new_debug_offsets.data ());
-
- do_cleanups (my_cleanups);
}
/* Relocate breakpoints as necessary, after things are relocated. */