From c918563733503635c90b00b773ddf14ec0385867 Mon Sep 17 00:00:00 2001 From: ro Date: Wed, 14 Mar 2012 18:01:06 +0000 Subject: [PATCH] Remove MIPS_DEBUGGING_INFO support * 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. * system.h (MIPS_DEBUGGING_INFO): Poison. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185395 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 21 ++++++++++++++ gcc/dwarf2cfi.c | 10 +------ gcc/dwarf2out.c | 60 ---------------------------------------- gcc/sdbout.c | 86 ++++++--------------------------------------------------- gcc/system.h | 4 +-- 5 files changed, 33 insertions(+), 148 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 118a291..6034f74 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,26 @@ 2012-03-14 Rainer Orth + * 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. + * system.h (MIPS_DEBUGGING_INFO): Poison. + +2012-03-14 Rainer Orth + * config/alpha/alpha.c [HAVE_STAMP_H]: Remove. (alpha_file_start) [MS_STAMP]: Remove. diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c index 2e74955..4d75bb2 100644 --- 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_cfa_location *new_cfa) 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_cfa_location *new_cfa) 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 index b5f921a..b3dcf9c 100644 --- 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_die_ref die, tree decl) /* 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_ref context_die) 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_ref context_die) 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_ref context_die) 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_ref context_die) } } -#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 @@ -18448,24 +18406,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 index 255c68e..6f24933 100644 --- 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 int, unsigned int); 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_hooks = 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, unsigned int n) 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, unsigned int n ATTRIBUTE_UNUSED) 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 ATTRIBUTE_UNUSED) 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 line ATTRIBUTE_UNUSED, 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 ATTRIBUTE_UNUSED) { 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 diff --git a/gcc/system.h b/gcc/system.h index a3bb4f5..977824e 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -878,8 +878,8 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN; MACHINE_TYPE TARGET_HAS_TARGETCM ASM_OUTPUT_BSS \ SETJMP_VIA_SAVE_AREA FORBIDDEN_INC_DEC_CLASSES \ PREFERRED_OUTPUT_RELOAD_CLASS SYSTEM_INCLUDE_DIR \ - STANDARD_INCLUDE_DIR STANDARD_INCLUDE_COMPONENT \ - LINK_ELIMINATE_DUPLICATE_LDIRECTORIES + STANDARD_INCLUDE_DIR STANDARD_INCLUDE_COMPONENT \ + LINK_ELIMINATE_DUPLICATE_LDIRECTORIES MIPS_DEBUGGING_INFO /* Hooks that are no longer used. */ #pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE \ -- 2.7.4