This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: RFA: MIPS/dwarf-2, GCC part


This patch is withdrawn while I wander through the twisty mess of
stabs code.

On Thu, Jun 06, 2002 at 09:35:16PM -0400, Daniel Jacobowitz wrote:
> Two things:
>   - MIPS/ELF doesn't use elfos.h (yet) so it didn't pick up
> DWARF2_DEBUG_INFO.
> 
>   - We emitted .file directives by hand in two places, expecting an ECOFF
> toolchain.  Even for ecoff, gas does not need these as best I can tell.  So
> I turned them off for TARGET_GAS.
> 
> With these and the gas patches I just posted to the binutils list, DWARF-2
> works passably well.  Eric, please commit these if they look good to you.
> 
> -- 
> Daniel Jacobowitz                           Carnegie Mellon University
> MontaVista Software                         Debian GNU/Linux Developer
> 
> 2002-06-06  Daniel Jacobowitz  <drow@mvista.com>
> 
> 	* config/mips/elf.h (DWARF2_DEBUG_INFO): Define.
> 	* config/mips/mips.c (mips_asm_file_start): Do not emit source file
> 	name for TARGET_GAS.
> 	(mips_output_function_prologue): Likewise.
> 
> Index: gcc/config/mips/elf.h
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/config/mips/elf.h,v
> retrieving revision 1.34
> diff -u -p -u -p -r1.34 elf.h
> --- gcc/config/mips/elf.h	11 Nov 2001 05:56:43 -0000	1.34
> +++ gcc/config/mips/elf.h	7 Jun 2002 01:09:02 -0000
> @@ -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: gcc/config/mips/mips.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.c,v
> retrieving revision 1.176.2.5
> diff -u -p -u -p -r1.176.2.5 mips.c
> --- gcc/config/mips/mips.c	17 Apr 2002 00:42:38 -0000	1.176.2.5
> +++ gcc/config/mips/mips.c	7 Jun 2002 01:10:01 -0000
> @@ -6127,7 +6130,9 @@ void
>  mips_asm_file_start (stream)
>       FILE *stream;
>  {
> -  ASM_OUTPUT_SOURCE_FILENAME (stream, main_input_filename);
> +  /* ??? When is this really needed?  */
> +  if (!TARGET_GAS)
> +    ASM_OUTPUT_SOURCE_FILENAME (stream, main_input_filename);
>  
>    /* Versions of the MIPS assembler before 2.20 generate errors if a branch
>       inside of a .set noreorder section jumps to a label outside of the .set
> @@ -6956,7 +6961,9 @@ mips_output_function_prologue (file, siz
>  #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?  */
> +  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)
> 

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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