X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fjit.c;h=59da4e0cee1d8c2e42d680f3ba3bb73ab3d86bd4;hb=268e4f09144c48e02f01d82ab3aab359457df214;hp=2018e2c6f0d2826354817b15f085735add479e81;hpb=f65fe5704af56aca58fd5547d0841a9512e540af;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/jit.c b/gdb/jit.c index 2018e2c6f0..59da4e0cee 100644 --- a/gdb/jit.c +++ b/gdb/jit.c @@ -951,18 +951,6 @@ jit_register_code (struct gdbarch *gdbarch, 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 * @@ -1380,7 +1368,7 @@ jit_inferior_exit_hook (struct inferior *inf) = (struct jit_objfile_data *) objfile_data (objf, jit_objfile_data); if (objf_data != NULL && objf_data->addr != 0) - jit_unregister_code (objf); + objf->unlink (); } } @@ -1414,7 +1402,7 @@ jit_event_handler (struct gdbarch *gdbarch) "entry at address: %s\n"), paddress (gdbarch, entry_addr)); else - jit_unregister_code (objf); + objf->unlink (); break; default: