aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-04-06 00:08:12 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-04-06 00:08:12 +0000
commit9f743ef6ffbfd6cb5c135a7dfef27b637b894084 (patch)
treea3fe79b04506d06d2d80e51a862936f4f477c3d4
parent9182c5bc256d7aee1964ce5b0cb9f93475713496 (diff)
downloadgdb-9f743ef6ffbfd6cb5c135a7dfef27b637b894084.zip
gdb-9f743ef6ffbfd6cb5c135a7dfef27b637b894084.tar.gz
gdb-9f743ef6ffbfd6cb5c135a7dfef27b637b894084.tar.bz2
gdb/
Fix crash regression on systems featuring .gdb_index. * objfiles.c (free_objfile): Move the forget_cached_source_info_for_objfile call earlier. Comment it. Extend the comment for objfile_free_data.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/objfiles.c9
2 files changed, 13 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 777947d..848a072 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2011-04-06 Jan Kratochvil <jan.kratochvil@redhat.com>
+ Fix crash regression on systems featuring .gdb_index.
+ * objfiles.c (free_objfile): Move the
+ forget_cached_source_info_for_objfile call earlier. Comment it.
+ Extend the comment for objfile_free_data.
+
+2011-04-06 Jan Kratochvil <jan.kratochvil@redhat.com>
+
Fix regression of displaying the debug format.
* buildsym.c (end_symtab): Set symtab's debugformat and producer from
subfile.
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 1664e42..db01f42 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -583,6 +583,10 @@ free_objfile (struct objfile *objfile)
lists. */
preserve_values (objfile);
+ /* It still may reference data modules have associated with the objfile and
+ the symbol file data. */
+ forget_cached_source_info_for_objfile (objfile);
+
/* First do any symbol file specific actions required when we are
finished with a particular symbol file. Note that if the objfile
is using reusable symbol information (via mmalloc) then each of
@@ -595,7 +599,8 @@ free_objfile (struct objfile *objfile)
(*objfile->sf->sym_finish) (objfile);
}
- /* Discard any data modules have associated with the objfile. */
+ /* Discard any data modules have associated with the objfile. The function
+ still may reference objfile->obfd. */
objfile_free_data (objfile);
gdb_bfd_unref (objfile->obfd);
@@ -637,8 +642,6 @@ free_objfile (struct objfile *objfile)
clear_current_source_symtab_and_line ();
}
- forget_cached_source_info_for_objfile (objfile);
-
/* The last thing we do is free the objfile struct itself. */
xfree (objfile->name);