This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
RFA: symfile.c: Fix for GDB crash when rereading symbols
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: RFA: symfile.c: Fix for GDB crash when rereading symbols
- From: "Peter.Schauer" <Peter dot Schauer at regent dot e-technik dot tu-muenchen dot de>
- Date: Tue, 14 Mar 2000 11:46:12 MET
symfile.c:reread_symbols does not clear the new msymbol hash tables in the
objfile, causing stale pointers and a GDB crash during the reread.exp
test on Solaris.
Here is a fix:
* symfile.c (reread_symbols): Clear msymbol hash table.
*** gdb/symfile.c.orig Thu Feb 3 05:14:35 2000
--- gdb/symfile.c Tue Mar 14 10:00:27 2000
***************
*** 1775,1780 ****
--- 1775,1784 ----
objfile->free_psymtabs = NULL;
objfile->msymbols = NULL;
objfile->minimal_symbol_count = 0;
+ memset (&objfile->msymbol_hash, 0,
+ sizeof (objfile->msymbol_hash));
+ memset (&objfile->msymbol_demangled_hash, 0,
+ sizeof (objfile->msymbol_demangled_hash));
objfile->fundamental_types = NULL;
if (objfile->sf != NULL)
{
--
Peter Schauer pes@regent.e-technik.tu-muenchen.de