diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-04-27 20:07:01 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-04-27 20:07:01 +0000 |
commit | 0133421afd5a6d8633c1fbbdb77af734960d7c73 (patch) | |
tree | ccd514a96cd96965544dea692f048d90e1ebf3d3 /gdb/symfile.c | |
parent | 1d2ca237d83678be5c4782309b1c820636c9f60a (diff) | |
download | gdb-0133421afd5a6d8633c1fbbdb77af734960d7c73.zip gdb-0133421afd5a6d8633c1fbbdb77af734960d7c73.tar.gz gdb-0133421afd5a6d8633c1fbbdb77af734960d7c73.tar.bz2 |
gdb/
* objfiles.c: Include solist.h.
(free_all_objfiles): New variable so. Check stale solist objfiles.
* symfile.c (symbol_file_clear): Swap the order of free_all_objfiles
and no_shared_libraries.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r-- | gdb/symfile.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c index eda26cc..4f70445 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -1228,13 +1228,12 @@ symbol_file_clear (int from_tty) : !query (_("Discard symbol table? ")))) error (_("Not confirmed.")); - free_all_objfiles (); - - /* solib descriptors may have handles to objfiles. Since their - storage has just been released, we'd better wipe the solib - descriptors as well. */ + /* solib descriptors may have handles to objfiles. Wipe them before their + objfiles get stale by free_all_objfiles. */ no_shared_libraries (NULL, from_tty); + free_all_objfiles (); + gdb_assert (symfile_objfile == NULL); if (from_tty) printf_unfiltered (_("No symbol file now.\n")); |