]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
elf.h (DWARF2_DEBUG_INFO): Define.
authorDaniel Jacobowitz <drow@mvista.com>
Wed, 12 Jun 2002 18:04:11 +0000 (18:04 +0000)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 12 Jun 2002 18:04:11 +0000 (11:04 -0700)
        * config/mips/elf.h (DWARF2_DEBUG_INFO): Define.
        * config/mips/mips.c (mips_output_filename): Don't print a
        ".file" directive if we are using DWARF-2.
        (mips_output_function_prologue): Do not emit source file
        name for TARGET_GAS.

From-SVN: r54559

gcc/ChangeLog
gcc/config/mips/elf.h
gcc/config/mips/mips.c

index 9184a0ba474a275de960cb78fb81fe8baf7a879b..656d1e2b4eb773a34880d465c71141261e831005 100644 (file)
@@ -1,3 +1,11 @@
+2002-06-12  Daniel Jacobowitz  <drow@mvista.com>
+
+       * config/mips/elf.h (DWARF2_DEBUG_INFO): Define.
+       * config/mips/mips.c (mips_output_filename): Don't print a
+       ".file" directive if we are using DWARF-2.
+       (mips_output_function_prologue): Do not emit source file
+       name for TARGET_GAS.
+
 2002-06-11  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * config/s390/s390.md (movsi): Only use floating point
index 5add2f12d604558882b1ec3b24b4bae4e9104449..bccd808c7a529ea76754ffbc36da66d348a30b38 100644 (file)
@@ -22,6 +22,12 @@ Boston, MA 02111-1307, USA.  */
 /* Use ELF.  */
 #define OBJECT_FORMAT_ELF
 
+/* All ELF targets can support DWARF-2.  */
+
+#ifndef DWARF2_DEBUGGING_INFO
+#define DWARF2_DEBUGGING_INFO 1
+#endif
+
 /* Until we figure out what MIPS ELF targets normally use, just do
    stabs in ELF.  */
 #ifndef PREFERRED_DEBUGGING_TYPE
index 64d97aa805ebbcf97df5378ccd48efc41728e0ae..a230c9e32d166ae7e1554018ae217f265291a903 100644 (file)
@@ -5916,7 +5916,11 @@ mips_output_filename (stream, name)
   static int first_time = 1;
   char ltext_label_name[100];
 
-  if (first_time)
+  /* If we are emitting DWARF-2, let dwarf2out handle the ".file"
+     directives.  */
+  if (write_symbols == DWARF2_DEBUG)
+    return;
+  else if (first_time)
     {
       first_time = 0;
       SET_FILE_NUMBER ();
@@ -6956,7 +6960,11 @@ mips_output_function_prologue (file, size)
 #endif
   HOST_WIDE_INT tsize = current_frame_info.total_size;
 
-  ASM_OUTPUT_SOURCE_FILENAME (file, DECL_SOURCE_FILE (current_function_decl));
+  /* ??? When is this really needed?  At least the GNU assembler does not
+     need the source filename more than once in the file, beyond what is
+     emitted by the debug information.  */
+  if (!TARGET_GAS)
+    ASM_OUTPUT_SOURCE_FILENAME (file, DECL_SOURCE_FILE (current_function_decl));
 
 #ifdef SDB_DEBUGGING_INFO
   if (debug_info_level != DINFO_LEVEL_TERSE && write_symbols == SDB_DEBUG)