return result;
}
+/* See objfiles.h. */
+
+void
+objfile::unlink ()
+{
+ delete this;
+}
+
/* Free all separate debug objfile of OBJFILE, but don't free OBJFILE
itself. */
for (child = objfile->separate_debug_objfile; child;)
{
struct objfile *next_child = child->separate_debug_objfile_link;
- delete child;
+ child->unlink ();
child = next_child;
}
}
gdb_assert (so->objfile == NULL);
for (objfile *objfile : current_program_space->objfiles_safe ())
- delete objfile;
+ objfile->unlink ();
clear_symtab_users (0);
}
\f
be soon. */
if (!(objf->flags & OBJF_USERLOADED) && (objf->flags & OBJF_SHARED))
- delete objf;
+ objf->unlink ();
}
}