]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix corrupted dwarf2 file table with -fno-eliminate-unused-debug-types.
authorJames E Wilson <wilson@specifixinc.com>
Tue, 3 May 2005 18:32:08 +0000 (18:32 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Tue, 3 May 2005 18:32:08 +0000 (11:32 -0700)
* dwarf2out.c (lookup_filename): Call maybe_emit_file.

From-SVN: r99170

gcc/ChangeLog
gcc/dwarf2out.c

index 941c6a7aa8f9151430844d54f6a0db1a4784c59f..7e89a7dfd201b06a274ae7dcf0532980695d8565 100644 (file)
@@ -1,3 +1,7 @@
+2005-05-03  James E Wilson  <wilson@specifixinc.com>
+
+       * dwarf2out.c (lookup_filename): Call maybe_emit_file.
+
 2005-05-03  DJ Delorie  <dj@redhat.com>
 
        * c-decl.c (store_parm_decls_oldstyle): Let diagnostic machinery
index 292a8357cec502f3108f58cec7e88966f1b70a0f..e9611d8e33dbbc42eecbe4ca34219a4c1bb2a52a 100644 (file)
@@ -13184,6 +13184,14 @@ lookup_filename (const char *file_name)
   VARRAY_PUSH_CHAR_PTR (file_table, save_file_name);
   VARRAY_PUSH_UINT (file_table_emitted, 0);
 
+  /* If the assembler is emitting the file table, and we aren't eliminating
+     unused debug types, then we must emit .file here.  If we are eliminating
+     unused debug types, then this will be done by the maybe_emit_file call in
+     prune_unused_types_walk_attribs.  */
+
+  if (DWARF2_ASM_LINE_DEBUG_INFO && ! flag_eliminate_unused_debug_types)
+    maybe_emit_file (i);
+
   return i;
 }