The free_objfile observable is never called with a nullptr objfile.
Change-Id: I1e990edeb45bc38009ccb129c623911097ab65fe
Approved-By: Tom Tromey <tom@tromey.com>
static void
disable_breakpoints_in_freed_objfile (struct objfile *objfile)
{
- if (objfile == NULL)
- return;
-
/* OBJF_SHARED|OBJF_USERLOADED objfiles are dynamic modules manually
managed by the user with add-symbol-file/remove-symbol-file.
Similarly to how breakpoints in shared libraries are handled in
static void
clear_dangling_display_expressions (struct objfile *objfile)
{
- struct program_space *pspace;
-
- /* With no symbol file we cannot have a block or expression from it. */
- if (objfile == NULL)
- return;
- pspace = objfile->pspace;
+ program_space *pspace = objfile->pspace;
if (objfile->separate_debug_objfile_backlink)
{
objfile = objfile->separate_debug_objfile_backlink;
symfile_free_objfile (struct objfile *objfile)
{
/* Remove the target sections owned by this objfile. */
- if (objfile != NULL)
- current_program_space->remove_target_sections ((void *) objfile);
+ current_program_space->remove_target_sections (objfile);
}
/* Wrapper around the quick_symbol_functions expand_symtabs_matching "method".