X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fjit.c;h=e77c03ad59b649a727426a995053ba5feb45f096;hb=aed57c537116ae91f553ac835b3f96d1f87b3bb0;hp=e6b3cc25ca42c0accae6b8ef0adb9d24345ed209;hpb=64cc34d87089ff24b43e0a8760be132b7afa6f34;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/jit.c b/gdb/jit.c index e6b3cc25ca..e77c03ad59 100644 --- a/gdb/jit.c +++ b/gdb/jit.c @@ -1,6 +1,6 @@ /* Handle JIT code generation in the inferior for GDB, the GNU Debugger. - Copyright (C) 2009-2018 Free Software Foundation, Inc. + Copyright (C) 2009-2019 Free Software Foundation, Inc. This file is part of GDB. @@ -986,9 +986,7 @@ jit_unregister_code (struct objfile *objfile) static struct objfile * jit_find_objf_with_entry_addr (CORE_ADDR entry_addr) { - struct objfile *objf; - - ALL_OBJFILES (objf) + for (objfile *objf : all_objfiles (current_program_space)) { struct jit_objfile_data *objf_data; @@ -1464,7 +1462,8 @@ free_objfile_data (struct objfile *objfile, void *data) if (ps_data != NULL && ps_data->objfile == objfile) { ps_data->objfile = NULL; - delete_breakpoint (ps_data->jit_breakpoint); + if (ps_data->jit_breakpoint != NULL) + delete_breakpoint (ps_data->jit_breakpoint); ps_data->cached_code_address = 0; } }