Use gdbpy_ref in gdbpy_breakpoint_cond_says_stop
[deliverable/binutils-gdb.git] / gdb / jit.c
index 81a2c26ccf6c59a8cffd862013faa60dfe74bd9b..d9258e86ae1a0dae803bfe0a6efa497e316e5b41 100644 (file)
--- 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-2016 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -1482,7 +1482,11 @@ free_objfile_data (struct objfile *objfile, void *data)
        = ((struct jit_program_space_data *)
           program_space_data (objfile->pspace, jit_program_space_data));
       if (ps_data != NULL && ps_data->objfile == objfile)
-       ps_data->objfile = NULL;
+       {
+         ps_data->objfile = NULL;
+         delete_breakpoint (ps_data->jit_breakpoint);
+         ps_data->cached_code_address = 0;
+       }
     }
 
   xfree (data);
This page took 0.027079 seconds and 4 git commands to generate.