This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RFA: symfile.c: Fix for GDB crash when rereading symbols


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]