gdb/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Fri, 18 Sep 2009 17:33:51 +0000 (17:33 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Fri, 18 Sep 2009 17:33:51 +0000 (17:33 +0000)
* objfiles.c (free_objfile): Clear SYMFILE_OBJFILE if it is OBJFILE.
* rs6000-nat.c (vmap_ldinfo): Only assertion check SYMFILE_OBJFILE now.
* symfile.c (syms_from_objfile, symbol_file_clear): Likewise.

gdb/ChangeLog
gdb/objfiles.c
gdb/rs6000-nat.c
gdb/symfile.c

index 34865017c41e5b59223d05f0f5d046224d0bfa11..427f61f062f35df6a20dce0815cfaed6fdc8f216 100644 (file)
@@ -1,4 +1,10 @@
-2009-09-19  Ulrich Weigand  <uweigand@de.ibm.com>
+2009-09-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * objfiles.c (free_objfile): Clear SYMFILE_OBJFILE if it is OBJFILE.
+       * rs6000-nat.c (vmap_ldinfo): Only assertion check SYMFILE_OBJFILE now.
+       * symfile.c (syms_from_objfile, symbol_file_clear): Likewise.
+
+2009-09-18  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * rs6000-tdep.c (rs6000_builtin_type_vec128): Add v2_double
        union member.
index 1f7489f22d8f4b96f6a633b6690f04854bb77189..8dcca702a76f5b742649afb644104c8a06e1656c 100644 (file)
@@ -459,8 +459,8 @@ free_objfile (struct objfile *objfile)
 
   unlink_objfile (objfile);
 
-  /* If we are going to free the runtime common objfile, mark it
-     as unallocated.  */
+  if (objfile == symfile_objfile)
+    symfile_objfile = NULL;
 
   if (objfile == rt_common_objfile)
     rt_common_objfile = NULL;
index 7fa7c4107c26c5f5f9087dde622b167decf590ac..82730464f943594e7673cee511ff07d24a094201 100644 (file)
@@ -915,7 +915,7 @@ If in fact that file has symbols which the mapped files listed by\n\
 symbols to the proper address)."),
               symfile_objfile->name);
       free_objfile (symfile_objfile);
-      symfile_objfile = NULL;
+      gdb_assert (symfile_objfile == NULL);
     }
   breakpoint_re_set ();
 }
index 2f3441cbb44738b91b1a0b3d70f9501fbdcd9e52..2458201122ed9fc7bb2a986c0f5ffcbab9d46f1a 100644 (file)
@@ -786,7 +786,7 @@ syms_from_objfile (struct objfile *objfile,
       if (symfile_objfile != NULL)
        {
          free_objfile (symfile_objfile);
-         symfile_objfile = NULL;
+         gdb_assert (symfile_objfile == NULL);
        }
 
       /* Currently we keep symbols from the add-symbol-file command.
@@ -1150,7 +1150,7 @@ symbol_file_clear (int from_tty)
      descriptors as well.  */
   no_shared_libraries (NULL, from_tty);
 
-  symfile_objfile = NULL;
+  gdb_assert (symfile_objfile == NULL);
   if (from_tty)
     printf_unfiltered (_("No symbol file now.\n"));
 }
This page took 0.052453 seconds and 4 git commands to generate.