Remove unnecessary null_cleanup
[deliverable/binutils-gdb.git] / gdb / jit.c
index 1b772ab175c4b25df5bd6d06359cfff70ae03f30..03b6bd80c6924cbfaa57d9e0f5e72f727e5e5faa 100644 (file)
--- a/gdb/jit.c
+++ b/gdb/jit.c
@@ -1171,12 +1171,8 @@ static void
 jit_dealloc_cache (struct frame_info *this_frame, void *cache)
 {
   struct jit_unwind_private *priv_data = (struct jit_unwind_private *) cache;
-  struct gdbarch *frame_arch;
-  int i;
 
   gdb_assert (priv_data->regcache != NULL);
-  frame_arch = get_frame_arch (priv_data->this_frame);
-
   regcache_xfree (priv_data->regcache);
   xfree (priv_data);
 }
@@ -1486,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.024768 seconds and 4 git commands to generate.