This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Bug in DWARF debug output generator
- To: gcc-patches at gcc dot gnu dot org
- Subject: Bug in DWARF debug output generator
- From: "Eric Schweitz" <schweitz at nortelnetworks dot com>
- Date: Wed, 03 May 2000 09:40:05 -0400
- CC: gcc-bugs at gcc dot gnu dot org
- Organization: Nortel Networks
- Reply-To: "Eric Schweitz" <schweitz at nortelnetworks dot com>
When compiling with -gdwarf, gcc 2.95.2 may produce a binary
which has debug records in sections other than .debug (ELF)
with incorrect and missing debug information. This is the
result of retry_incomplete_types potentially dumping records
without first reseting the .section directive.
The patch to fix this is given below.
--
Eric Schweitz
-- gcc/dwarfout.c.bugged Fri
Aug 13 03:32:07 1999
+++ gcc/dwarfout.c Fri Apr 28 14:36:44
2000
@@ -5916,10 +5916,10 @@
{
char label[MAX_ARTIFICIAL_LABEL_BYTES];
- retry_incomplete_types ();
-
fputc ('\n', asm_out_file);
ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_SECTION);
+ retry_incomplete_types ();
+ fputc ('\n', asm_out_file);
/* Mark the end of the chain of siblings which represent
all file-scope
declarations in this compilation
unit. */