jit_bfd_try_read_symtab (code_entry, entry_addr, gdbarch);
}
-/* This function unregisters JITed code and frees the corresponding
- objfile. */
-
-static void
-jit_unregister_code (struct objfile *objfile)
-{
- if (jit_debug)
- fprintf_unfiltered (gdb_stdlog, "jit_unregister_code (%s)\n",
- host_address_to_string (objfile));
- delete objfile;
-}
-
/* Look up the objfile with this code entry address. */
static struct objfile *
= (struct jit_objfile_data *) objfile_data (objf, jit_objfile_data);
if (objf_data != NULL && objf_data->addr != 0)
- jit_unregister_code (objf);
+ objf->unlink ();
}
}
"entry at address: %s\n"),
paddress (gdbarch, entry_addr));
else
- jit_unregister_code (objf);
+ objf->unlink ();
break;
default: