This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

[patch] Regression: Re: FYI: clean up symtab producer and debugformat lifetimes


Hi Tom,

On Mon, 04 Apr 2011 16:28:53 +0200, Tom Tromey wrote:
> I'm checking this in on the trunk.

symtab is not subfile.

This and several other regressions on all the tested platforms:
-PASS: gdb.base/included.exp: list integer
+XPASS: gdb.base/included.exp: list integer
-PASS: gdb.base/included.exp: info variables integer
+XPASS: gdb.base/included.exp: info variables integer

Due to:
(gdb) info source
Compiled with unknown debugging format.

4b11999f6f77676a5913d772e3b29e04fa057047 is the first bad commit
commit 4b11999f6f77676a5913d772e3b29e04fa057047
Author: Tom Tromey <tromey@redhat.com>
Date:   Mon Apr 4 14:29:26 2011 +0000

        * xcoffread.c (read_xcoff_symtab): Make `debugfmt' const.
        * symtab.h (struct symtab) <producer, debugformat>: Now const.
        * symmisc.c (free_symtab): Don't free debugformat.
        * buildsym.h (struct subfile) <producer, debugformat>: Now const.
        (record_debugformat, record_producer): Document.
        * buildsym.c (end_symtab): Don't save debugformat and producer
        names on obstack.
        (end_symtab): Don't free debugformat and producer fields.
        (record_debugformat): Don't call xstrdup.
        (record_producer): Likewise.

:040000 040000 264d42cf955972c5478af0b3515c24683d8d6521 cf07823a615c5afdf0a0f14a60ea77fe5e7baddd M      gdb
bisect run success

No regressions on {x86_64,x86_64-m32,i686}-fedora{13,14,15,-rawhide}-linux-gnu
together with the objfile-data (to be posted along) fix against yesterday.

I will check it in today.


Thanks,
Jan


gdb/
2011-04-05  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.

--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -1109,6 +1109,12 @@ end_symtab (CORE_ADDR end_addr, struct objfile *objfile, int section)
 	     the symbols.  */
 	  symtab->language = subfile->language;
 
+	  /* Save the debug format string (if any) in the symtab.  */
+	  symtab->debugformat = subfile->debugformat;
+
+	  /* Similarly for the producer.  */
+	  symtab->producer = subfile->producer;
+
 	  /* All symtabs for the main file and the subfiles share a
 	     blockvector, so we need to clear primary for everything
 	     but the main file.  */


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