This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

Bug in DWARF debug output generator



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.  */






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