This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
Re: symtab/1534: gdb current segfaults when debugee a.out changes
- From: David Carlton <carlton at kealia dot com>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 23 Jan 2004 17:18:01 -0000
- Subject: Re: symtab/1534: gdb current segfaults when debugee a.out changes
- Reply-to: David Carlton <carlton at kealia dot com>
The following reply was made to PR symtab/1534; it has been noted by GNATS.
From: David Carlton <carlton@kealia.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: rrh@cray.com, gdb-gnats@sources.redhat.com
Subject: Re: symtab/1534: gdb current segfaults when debugee a.out changes
Date: Fri, 23 Jan 2004 09:13:12 -0800
On 23 Jan 2004 14:58:00 -0000, Daniel Jacobowitz <drow@mvista.com> said:
> I'm pretty sure this is yours.
Given that I wrote several of the functions in that backtrace, I'm
inclined to agree. :-)
> The symtab is on the objfile's obstacks, which are wiped when it is
> reloaded, so you probably need to wipe the symtab pointer too. See
> reread_symbols.
Thanks for the diagnosis. Robert, can you see if this patch helps?
Index: symfile.c
===================================================================
RCS file: /cvs/src/src/gdb/symfile.c,v
retrieving revision 1.116
diff -u -p -r1.116 symfile.c
--- symfile.c 19 Jan 2004 19:56:02 -0000 1.116
+++ symfile.c 23 Jan 2004 17:09:52 -0000
@@ -1918,6 +1918,7 @@ reread_symbols (void)
objfile->symtabs = NULL;
objfile->psymtabs = NULL;
objfile->free_psymtabs = NULL;
+ objfile->cp_namespace_symtab = NULL;
objfile->msymbols = NULL;
objfile->sym_private = NULL;
objfile->minimal_symbol_count = 0;