From: Daniel Jacobowitz Date: Wed, 12 Jun 2002 18:04:11 +0000 (+0000) Subject: elf.h (DWARF2_DEBUG_INFO): Define. X-Git-Tag: releases/gcc-3.1.1~162 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4ecb1309544d1d30d8171d28d30757b54cfbd7b;p=thirdparty%2Fgcc.git elf.h (DWARF2_DEBUG_INFO): Define. * 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9184a0ba474a..656d1e2b4eb7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2002-06-12 Daniel Jacobowitz + + * 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 * config/s390/s390.md (movsi): Only use floating point diff --git a/gcc/config/mips/elf.h b/gcc/config/mips/elf.h index 5add2f12d604..bccd808c7a52 100644 --- a/gcc/config/mips/elf.h +++ b/gcc/config/mips/elf.h @@ -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 diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 64d97aa805eb..a230c9e32d16 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -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)