From patchwork Mon Mar 5 17:20:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 144720 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 5091FB6EF1 for ; Tue, 6 Mar 2012 04:21:19 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1331572879; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:From:To:Cc:Subject:Date:Message-ID:User-Agent: MIME-Version:Content-Type:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=NR53jLz85rdNiiAQILtNm25bUmM=; b=XRIKgEijqnQgBbw wxaINaZz28SOgRHgxwZx+RcTO9gaLNgdaF4T8pfsDmFlBLcHu5ButKfPV4cBATW4 fAjqtHsc1p9A2o1zm5PzTBDoUFPZWNy/3IbTu4rZoWu7LAINc305JDBFTtxVY6Oh nX7z5q268RSmAwrZzV2dkcz8Lw3E= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:From:To:Cc:Subject:Date:Message-ID:User-Agent:MIME-Version:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=ZHQ0aPoZIukC0Orm2xYXJFTCbvrlUsnGWd6J0Ut1Bf/iKCCjyc0ThDIvfu/7vV ecbmzPzOjwI0sKynYcyIzusk3tHz3IJFDfA8ZHj8SxuFzSrcyDgvPS3v4b+VlbPN dptLkeu9Ci3XNBlE79c9ZUu/dqgWAxkXCsdfq5VhPaJ9A=; Received: (qmail 26963 invoked by alias); 5 Mar 2012 17:21:10 -0000 Received: (qmail 26948 invoked by uid 22791); 5 Mar 2012 17:21:06 -0000 X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL, BAYES_40, TW_CP, TW_DB, T_RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 05 Mar 2012 17:20:50 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id B206FADE; Mon, 5 Mar 2012 18:20:48 +0100 (CET) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id EGmyJ5EgiPnl; Mon, 5 Mar 2012 18:20:40 +0100 (CET) Received: from manam.CeBiTec.Uni-Bielefeld.DE (manam.CeBiTec.Uni-Bielefeld.DE [129.70.161.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id A1B18ADD; Mon, 5 Mar 2012 18:20:40 +0100 (CET) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.5+Sun/8.14.5/Submit) id q25HKe6A021602; Mon, 5 Mar 2012 18:20:40 +0100 (MET) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: Richard Henderson , Jason Merrill Subject: Remove MIPS_DEBUGGING_INFO support Date: Mon, 05 Mar 2012 18:20:39 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org The only two users of MIPS_DEBUGGING_INFO are on their way out: I've just submitted a patch to remove the OpenBSD/MIPS configuration, and IRIX removal will follow soon. There seems to be no point in retaining what seems to be primarily workarounds for quirks in SGI dbx, so the following patch removes all other remnants of MIPS_DEBUGGING_INFO. Bootstrapped without regressions on i386-pc-solaris2.10 to ensure syntactic correctness. I'll wait with committing until after OpenBSD/MIPS and IRIX are actually gone. Ok for mainline? Rainer 2012-02-24 Rainer Orth * config/alpha/alpha.h (MIPS_DEBUGGING_INFO): Remove. * config/alpha/elf.h (MIPS_DEBUGGING_INFO): Don't undef. * config/alpha/vms.h (MIPS_DEBUGGING_INFO): Don't undef. * dwarf2cfi.c (def_cfa_0): Remove MIPS_DEBUGGING_INFO handling. (dwarf2out_do_cfi_asm): Likewise. * dwarf2out.c (output_call_frame_info): Remove MIPS_DEBUGGING_INFO handling. (add_data_member_location_attribute): Likewise. (gen_array_type_die): Likewise. (gen_subprogram_die): Likewise. (gen_producer_string): Likewise. * sdbout.c (sdbout_begin_prologue): Declare unconditionally. Remove MIPS_DEBUGGING_INFO handling. (sdb_debug_hooks): Likewise. (sdbout_begin_block): Likewise. (sdbout_end_block): Likewise. (sdbout_begin_prologue): Likewise. (sdbout_start_source_file): Likewise. (sdbout_end_source_file): Likewise. (sdbout_init): Likewise. # HG changeset patch # Parent 7065cf1a3c9457e7ea48e3e7feee9b4e0726c3a7 Remove MIPS_DEBUGGING_INFO support diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h --- a/gcc/config/alpha/alpha.h +++ b/gcc/config/alpha/alpha.h @@ -1165,7 +1165,6 @@ do { \ #define SDB_DEBUGGING_INFO 1 /* generate info for mips-tfile */ #define DBX_DEBUGGING_INFO 1 /* generate embedded stabs */ -#define MIPS_DEBUGGING_INFO 1 /* MIPS specific debugging info */ #ifndef PREFERRED_DEBUGGING_TYPE /* assume SDB_DEBUGGING_INFO */ #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG diff --git a/gcc/config/alpha/elf.h b/gcc/config/alpha/elf.h --- a/gcc/config/alpha/elf.h +++ b/gcc/config/alpha/elf.h @@ -1,6 +1,6 @@ /* Definitions of target machine for GNU compiler, for DEC Alpha w/ELF. Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2007, 2008, - 2009, 2010 Free Software Foundation, Inc. + 2009, 2010, 2012 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu). This file is part of GCC. @@ -25,7 +25,6 @@ along with GCC; see the file COPYING3. /* ??? Move all SDB stuff from alpha.h to osf.h. */ #undef SDB_DEBUGGING_INFO -#undef MIPS_DEBUGGING_INFO #undef DBX_DEBUGGING_INFO #define DWARF2_DEBUGGING_INFO 1 diff --git a/gcc/config/alpha/vms.h b/gcc/config/alpha/vms.h --- a/gcc/config/alpha/vms.h +++ b/gcc/config/alpha/vms.h @@ -1,6 +1,6 @@ /* Output variables, constants and external declarations, for GNU compiler. Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2004, 2005, 2007, 2008, - 2009, 2010, 2011 + 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This file is part of GCC. @@ -206,7 +206,6 @@ typedef struct {int num_args; enum avms_ #define TARGET_ASM_DESTRUCTOR vms_asm_out_destructor #undef SDB_DEBUGGING_INFO -#undef MIPS_DEBUGGING_INFO #undef DBX_DEBUGGING_INFO #define DWARF2_DEBUGGING_INFO 1 diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c --- a/gcc/dwarf2cfi.c +++ b/gcc/dwarf2cfi.c @@ -1,6 +1,6 @@ /* Dwarf2 Call Frame Information helper routines. Copyright (C) 1992, 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, - 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 + 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This file is part of GCC. @@ -724,8 +724,6 @@ def_cfa_0 (dw_cfa_location *old_cfa, dw_ cfi->dw_cfi_opc = DW_CFA_def_cfa_offset; cfi->dw_cfi_oprnd1.dw_cfi_offset = new_cfa->offset; } - -#ifndef MIPS_DEBUGGING_INFO /* SGI dbx thinks this means no offset. */ else if (new_cfa->offset == old_cfa->offset && old_cfa->reg != INVALID_REGNUM && !new_cfa->indirect @@ -737,8 +735,6 @@ def_cfa_0 (dw_cfa_location *old_cfa, dw_ cfi->dw_cfi_opc = DW_CFA_def_cfa_register; cfi->dw_cfi_oprnd1.dw_cfi_reg_num = new_cfa->reg; } -#endif - else if (new_cfa->indirect == 0) { /* Construct a "DW_CFA_def_cfa " instruction, @@ -3388,10 +3384,6 @@ dwarf2out_do_cfi_asm (void) { int enc; -#ifdef MIPS_DEBUGGING_INFO - return false; -#endif - if (saved_do_cfi_asm != 0) return saved_do_cfi_asm > 0; diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -879,11 +879,6 @@ output_call_frame_info (int for_eh) if (for_eh && targetm.terminate_dw2_eh_frame_info) dw2_asm_output_data (4, 0, "End of Table"); -#ifdef MIPS_DEBUGGING_INFO - /* Work around Irix 6 assembler bug whereby labels at the end of a section - get a value of 0. Putting .align 0 after the label fixes it. */ - ASM_OUTPUT_ALIGN (asm_out_file, 0); -#endif /* Turn off app to make assembly quicker. */ if (flag_debug_asm) @@ -14330,16 +14325,7 @@ add_data_member_location_attribute (dw_d /* The DWARF2 standard says that we should assume that the structure address is already on the stack, so we can specify a structure field address by using DW_OP_plus_uconst. */ - -#ifdef MIPS_DEBUGGING_INFO - /* ??? The SGI dwarf reader does not handle the DW_OP_plus_uconst - operator correctly. It works only if we leave the offset on the - stack. */ - op = DW_OP_constu; -#else op = DW_OP_plus_uconst; -#endif - loc_descr = new_loc_descr (op, offset, 0); } } @@ -16368,17 +16354,6 @@ gen_array_type_die (tree type, dw_die_re return; } - /* ??? The SGI dwarf reader fails for array of array of enum types - (e.g. const enum machine_mode insn_operand_mode[2][10]) unless the inner - array type comes before the outer array type. We thus call gen_type_die - before we new_die and must prevent nested array types collapsing for this - target. */ - -#ifdef MIPS_DEBUGGING_INFO - gen_type_die (TREE_TYPE (type), context_die); - collapse_nested_arrays = false; -#endif - array_die = new_die (DW_TAG_array_type, scope_die, type); add_name_attribute (array_die, type_tag (type)); equate_type_number_to_die (type, array_die); @@ -16404,14 +16379,6 @@ gen_array_type_die (tree type, dw_die_re add_AT_unsigned (array_die, DW_AT_ordering, DW_ORD_row_major); #endif -#ifdef MIPS_DEBUGGING_INFO - /* The SGI compilers handle arrays of unknown bound by setting - AT_declaration and not emitting any subrange DIEs. */ - if (TREE_CODE (type) == ARRAY_TYPE - && ! TYPE_DOMAIN (type)) - add_AT_flag (array_die, DW_AT_declaration, 1); - else -#endif if (TREE_CODE (type) == VECTOR_TYPE) { /* For VECTOR_TYPEs we use an array die with appropriate bounds. */ @@ -16434,10 +16401,6 @@ gen_array_type_die (tree type, dw_die_re element_type = TREE_TYPE (element_type); } -#ifndef MIPS_DEBUGGING_INFO - gen_type_die (element_type, context_die); -#endif - add_type_attribute (array_die, element_type, 0, 0, context_die); add_gnat_descriptive_type_attribute (array_die, type, context_die); @@ -17470,11 +17433,6 @@ gen_subprogram_die (tree decl, dw_die_re } } -#ifdef MIPS_DEBUGGING_INFO - /* Add a reference to the FDE for this routine. */ - add_AT_fde_ref (subr_die, DW_AT_MIPS_fde, cfun->fde->fde_index); -#endif - cfa_fb_offset = CFA_FRAME_BASE_OFFSET (decl); /* We define the "frame base" as the function's CFA. This is more @@ -18396,24 +18354,6 @@ gen_producer_string (void) sprintf (tail, "%s %s", language_string, version_string); tail += plen; - if (!dwarf_record_gcc_switches) - { -#ifdef MIPS_DEBUGGING_INFO - /* The MIPS/SGI compilers place the 'cc' command line options in the - producer string. The SGI debugger looks for -g, -g1, -g2, or -g3; - if they do not appear in the producer string, the debugger reaches - the conclusion that the object file is stripped and has no debugging - information. To get the MIPS/SGI debugger to believe that there is - debugging information in the object file, we add a -g to the producer - string. */ - if (debug_info_level > DINFO_LEVEL_TERSE) - { - memcpy (tail, " -g", 3); - tail += 3; - } -#endif - } - FOR_EACH_VEC_ELT (dchar_p, switches, j, p) { len = strlen (p); diff --git a/gcc/sdbout.c b/gcc/sdbout.c --- a/gcc/sdbout.c +++ b/gcc/sdbout.c @@ -1,6 +1,6 @@ /* Output sdb-format symbol table information from GNU compiler. Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011 + 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This file is part of GCC. @@ -120,9 +120,7 @@ static void sdbout_end_block (unsigned static void sdbout_source_line (unsigned int, const char *, int, bool); static void sdbout_end_epilogue (unsigned int, const char *); static void sdbout_global_decl (tree); -#ifndef MIPS_DEBUGGING_INFO static void sdbout_begin_prologue (unsigned int, const char *); -#endif static void sdbout_end_prologue (unsigned int, const char *); static void sdbout_begin_function (tree); static void sdbout_end_function (unsigned int); @@ -275,33 +273,6 @@ do { fprintf (asm_out_file, "\t.tag\t"); if ((int) line <= sdb_begin_function_line) \ line = sdb_begin_function_line + 1 -/* Perform linker optimization of merging header file definitions together - for targets with MIPS_DEBUGGING_INFO defined. This won't work without a - post 960826 version of GAS. Nothing breaks with earlier versions of GAS, - the optimization just won't be done. The native assembler already has the - necessary support. */ - -#ifdef MIPS_DEBUGGING_INFO - -/* ECOFF linkers have an optimization that does the same kind of thing as - N_BINCL/E_INCL in stabs: eliminate duplicate debug information in the - executable. To achieve this, GCC must output a .file for each file - name change. */ - -/* This is a stack of input files. */ - -struct sdb_file -{ - struct sdb_file *next; - const char *name; -}; - -/* This is the top of the stack. */ - -static struct sdb_file *current_file; - -#endif /* MIPS_DEBUGGING_INFO */ - /* The debug hooks structure. */ const struct gcc_debug_hooks sdb_debug_hooks = { @@ -316,15 +287,8 @@ const struct gcc_debug_hooks sdb_debug_h sdbout_end_block, /* end_block */ debug_true_const_tree, /* ignore_block */ sdbout_source_line, /* source_line */ -#ifdef MIPS_DEBUGGING_INFO - /* Defer on MIPS systems so that parameter descriptions follow - function entry. */ - debug_nothing_int_charstar, /* begin_prologue */ - sdbout_end_prologue, /* end_prologue */ -#else sdbout_begin_prologue, /* begin_prologue */ debug_nothing_int_charstar, /* end_prologue */ -#endif debug_nothing_int_charstar, /* begin_epilogue */ sdbout_end_epilogue, /* end_epilogue */ sdbout_begin_function, /* begin_function */ @@ -1500,12 +1464,8 @@ sdbout_begin_block (unsigned int line, u MAKE_LINE_SAFE (line); /* The SCO compiler does not emit a separate block for the function level - scope, so we avoid it here also. However, mips ECOFF compilers do emit - a separate block, so we retain it when MIPS_DEBUGGING_INFO is defined. */ -#ifndef MIPS_DEBUGGING_INFO - if (n != 1) -#endif - PUT_SDB_BLOCK_START (line - sdb_begin_function_line); + scope, so we avoid it here also. */ + PUT_SDB_BLOCK_START (line - sdb_begin_function_line); if (n == 1) { @@ -1534,12 +1494,9 @@ sdbout_end_block (unsigned int line, uns MAKE_LINE_SAFE (line); /* The SCO compiler does not emit a separate block for the function level - scope, so we avoid it here also. However, mips ECOFF compilers do emit - a separate block, so we retain it when MIPS_DEBUGGING_INFO is defined. */ -#ifndef MIPS_DEBUGGING_INFO + scope, so we avoid it here also. */ if (n != 1) -#endif - PUT_SDB_BLOCK_END (line - sdb_begin_function_line); + PUT_SDB_BLOCK_END (line - sdb_begin_function_line); } /* Output a line number symbol entry for source file FILENAME and line @@ -1572,19 +1529,16 @@ sdbout_begin_function (tree decl ATTRIBU sdbout_symbol (current_function_decl, 0); } -/* Called at beginning of function body (before or after prologue, - depending on MIPS_DEBUGGING_INFO). Record the function's starting - line number, so we can output relative line numbers for the other - lines. Describe beginning of outermost block. Also describe the - parameter list. */ +/* Called at beginning of function body after prologue. Record the + function's starting line number, so we can output relative line numbers + for the other lines. Describe beginning of outermost block. Also + describe the parameter list. */ -#ifndef MIPS_DEBUGGING_INFO static void sdbout_begin_prologue (unsigned int line, const char *file ATTRIBUTE_UNUSED) { sdbout_end_prologue (line, file); } -#endif static void sdbout_end_prologue (unsigned int line, const char *file ATTRIBUTE_UNUSED) @@ -1651,14 +1605,6 @@ static void sdbout_start_source_file (unsigned int line ATTRIBUTE_UNUSED, const char *filename ATTRIBUTE_UNUSED) { -#ifdef MIPS_DEBUGGING_INFO - struct sdb_file *n = XNEW (struct sdb_file); - - n->next = current_file; - n->name = filename; - current_file = n; - output_file_directive (asm_out_file, filename); -#endif } /* Revert to reading a previous source file. */ @@ -1666,14 +1612,6 @@ sdbout_start_source_file (unsigned int l static void sdbout_end_source_file (unsigned int line ATTRIBUTE_UNUSED) { -#ifdef MIPS_DEBUGGING_INFO - struct sdb_file *next; - - next = current_file->next; - free (current_file); - current_file = next; - output_file_directive (asm_out_file, current_file->name); -#endif } /* Set up for SDB output at the start of compilation. */ @@ -1683,12 +1621,6 @@ sdbout_init (const char *input_file_name { tree t; -#ifdef MIPS_DEBUGGING_INFO - current_file = XNEW (struct sdb_file); - current_file->next = NULL; - current_file->name = input_file_name; -#endif - deferred_global_decls = VEC_alloc (tree, gc, 12); /* Emit debug information which was queued by sdbout_symbol before