From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1851) id AB7DB385356C; Thu, 25 Aug 2022 06:53:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AB7DB385356C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1661410420; bh=MncKbFsv/HwL5EghtXbhY10fo5uYX3QsZdrfs4FCWd8=; h=From:To:Subject:Date:From; b=D9WlQklkd4Q3f3Bsag254ZYhwh+3J0epeFh6cOlM8ur3Jondf+6y9ra+RNZeXNWU9 mZcplOZKZB6P8AV2ox32XwCOqQ3UHAhkYeK1A0eIu9LaZ6SZNUo3+7bkT43wz2oHXn dYW++3a6CGc4H/yXEeDaVG0xamYjkbEEgpn65TjY= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Martin Liska To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/marxin/heads/stabs-removal)] WIP parts 1. X-Act-Checkin: gcc X-Git-Author: Martin Liska X-Git-Refname: refs/users/marxin/heads/stabs-removal X-Git-Oldrev: 33f24eb58748e9db7c827662753757c5c2217eb4 X-Git-Newrev: 3b8f87feae73da80562ca7981c99378034774a86 Message-Id: <20220825065340.AB7DB385356C@sourceware.org> Date: Thu, 25 Aug 2022 06:53:40 +0000 (GMT) List-Id: https://gcc.gnu.org/g:3b8f87feae73da80562ca7981c99378034774a86 commit 3b8f87feae73da80562ca7981c99378034774a86 Author: Martin Liska Date: Wed Aug 24 15:04:37 2022 +0200 WIP parts 1. Diff: --- gcc/common.opt | 10 +--------- gcc/final.cc | 40 ---------------------------------------- gcc/flag-types.h | 17 +++++++---------- gcc/gcc.cc | 24 +----------------------- gcc/opts.cc | 10 +--------- gcc/toplev.cc | 9 --------- 6 files changed, 10 insertions(+), 100 deletions(-) diff --git a/gcc/common.opt b/gcc/common.opt index fba90ff6dcb..1e2dc144520 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -3323,7 +3323,7 @@ Common Driver JoinedOrMissing Negative(gdwarf-) Generate debug information in default version of DWARF format. gdwarf- -Common Driver Joined UInteger Var(dwarf_version) Init(5) Negative(gstabs) +Common Driver Joined UInteger Var(dwarf_version) Init(5) Generate debug information in DWARF v2 (or later) format. gdwarf32 @@ -3370,14 +3370,6 @@ gsplit-dwarf Common Driver Var(dwarf_split_debug_info) Init(0) Generate debug information in separate .dwo files. -gstabs -Common Driver JoinedOrMissing Negative(gstabs+) -Generate debug information in STABS format. - -gstabs+ -Common Driver JoinedOrMissing Negative(gvms) -Generate debug information in extended STABS format. - gstatement-frontiers Common Driver Var(debug_nonbind_markers_p) PerFunction Emit progressive recommended breakpoint locations. diff --git a/gcc/final.cc b/gcc/final.cc index 0352786e49b..f58a90c2833 100644 --- a/gcc/final.cc +++ b/gcc/final.cc @@ -89,10 +89,6 @@ along with GCC; see the file COPYING3. If not see #include "dwarf2out.h" -#ifdef DBX_DEBUGGING_INFO -#include "dbxout.h" -#endif - /* Most ports don't need to define CC_STATUS_INIT. So define a null default for it to save conditionalization later. */ #ifndef CC_STATUS_INIT @@ -2324,19 +2320,6 @@ final_scan_insn_1 (rtx_insn *insn, FILE *file, int optimize_p ATTRIBUTE_UNUSED, TREE_ASM_WRITTEN (NOTE_BLOCK (insn)) = 1; BLOCK_IN_COLD_SECTION_P (NOTE_BLOCK (insn)) = in_cold_section_p; } - if (write_symbols == DBX_DEBUG) - { - location_t *locus_ptr - = block_nonartificial_location (NOTE_BLOCK (insn)); - - if (locus_ptr != NULL) - { - override_filename = LOCATION_FILE (*locus_ptr); - override_linenum = LOCATION_LINE (*locus_ptr); - override_columnnum = LOCATION_COLUMN (*locus_ptr); - override_discriminator = compute_discriminator (*locus_ptr); - } - } break; case NOTE_INSN_BLOCK_END: @@ -2359,27 +2342,6 @@ final_scan_insn_1 (rtx_insn *insn, FILE *file, int optimize_p ATTRIBUTE_UNUSED, gcc_assert (BLOCK_IN_COLD_SECTION_P (NOTE_BLOCK (insn)) == in_cold_section_p); } - if (write_symbols == DBX_DEBUG) - { - tree outer_block = BLOCK_SUPERCONTEXT (NOTE_BLOCK (insn)); - location_t *locus_ptr - = block_nonartificial_location (outer_block); - - if (locus_ptr != NULL) - { - override_filename = LOCATION_FILE (*locus_ptr); - override_linenum = LOCATION_LINE (*locus_ptr); - override_columnnum = LOCATION_COLUMN (*locus_ptr); - override_discriminator = compute_discriminator (*locus_ptr); - } - else - { - override_filename = NULL; - override_linenum = 0; - override_columnnum = 0; - override_discriminator = 0; - } - } break; case NOTE_INSN_DELETED_LABEL: @@ -4304,8 +4266,6 @@ rest_of_handle_final (void) if (! quiet_flag) fflush (asm_out_file); - /* Write DBX symbols if requested. */ - /* Note that for those inline functions where we don't initially know for certain that we will be generating an out-of-line copy, the first invocation of this routine (rest_of_compilation) will diff --git a/gcc/flag-types.h b/gcc/flag-types.h index a11f99af887..ceb84d9473f 100644 --- a/gcc/flag-types.h +++ b/gcc/flag-types.h @@ -24,20 +24,17 @@ along with GCC; see the file COPYING3. If not see enum debug_info_type { - DINFO_TYPE_NONE = 0, /* No debug info. */ - DINFO_TYPE_DBX = 1, /* BSD .stabs for DBX. */ - DINFO_TYPE_DWARF2 = 2, /* Dwarf v2 debug info. */ - DINFO_TYPE_XCOFF = 3, /* IBM/Xcoff debug info. */ - DINFO_TYPE_VMS = 4, /* VMS debug info. */ - DINFO_TYPE_CTF = 5, /* CTF debug info. */ - DINFO_TYPE_BTF = 6, /* BTF debug info. */ - DINFO_TYPE_BTF_WITH_CORE = 7, /* BTF debug info with CO-RE relocations. */ + DINFO_TYPE_NONE, /* No debug info. */ + DINFO_TYPE_DWARF2, /* Dwarf v2 debug info. */ + DINFO_TYPE_XCOFF, /* IBM/Xcoff debug info. */ + DINFO_TYPE_VMS, /* VMS debug info. */ + DINFO_TYPE_CTF, /* CTF debug info. */ + DINFO_TYPE_BTF, /* BTF debug info. */ + DINFO_TYPE_BTF_WITH_CORE, /* BTF debug info with CO-RE relocations. */ DINFO_TYPE_MAX = DINFO_TYPE_BTF_WITH_CORE /* Marker only. */ }; #define NO_DEBUG (0U) -/* Write DBX debug info (using dbxout.cc). */ -#define DBX_DEBUG (1U << DINFO_TYPE_DBX) /* Write DWARF2 debug info (using dwarf2out.cc). */ #define DWARF2_DEBUG (1U << DINFO_TYPE_DWARF2) /* Write IBM/XCOFF debug info (using dbxout.cc). */ diff --git a/gcc/gcc.cc b/gcc/gcc.cc index b6d562a92f0..c1f084bdf6b 100644 --- a/gcc/gcc.cc +++ b/gcc/gcc.cc @@ -927,26 +927,11 @@ proper position among the other output files. */ # else # define ASM_DEBUG_DWARF_OPTION "--gdwarf2" # endif -# if defined(DBX_DEBUGGING_INFO) && defined(DWARF2_DEBUGGING_INFO) \ - && defined(HAVE_AS_GDWARF2_DEBUG_FLAG) && defined(HAVE_AS_GSTABS_DEBUG_FLAG) -# define ASM_DEBUG_SPEC \ - (PREFERRED_DEBUGGING_TYPE == DBX_DEBUG \ - ? "%{%:debug-level-gt(0):" \ - "%{gdwarf*:" ASM_DEBUG_DWARF_OPTION "};" \ - ":%{g*:--gstabs}}" ASM_MAP \ - : "%{%:debug-level-gt(0):" \ - "%{gstabs*:--gstabs;" \ - ":%{g*:" ASM_DEBUG_DWARF_OPTION "}}}" ASM_MAP) -# else -# if defined(DBX_DEBUGGING_INFO) && defined(HAVE_AS_GSTABS_DEBUG_FLAG) -# define ASM_DEBUG_SPEC "%{g*:%{%:debug-level-gt(0):--gstabs}}" ASM_MAP -# endif # if defined(DWARF2_DEBUGGING_INFO) && defined(HAVE_AS_GDWARF2_DEBUG_FLAG) # define ASM_DEBUG_SPEC "%{g*:%{%:debug-level-gt(0):" \ ASM_DEBUG_DWARF_OPTION "}}" ASM_MAP # endif # endif -#endif #ifndef ASM_DEBUG_SPEC # define ASM_DEBUG_SPEC "" #endif @@ -960,14 +945,7 @@ proper position among the other output files. */ "%:dwarf-version-gt(3):--gdwarf-4 ;" \ "%:dwarf-version-gt(2):--gdwarf-3 ;" \ ":--gdwarf2 }" -# if defined(DBX_DEBUGGING_INFO) && defined(DWARF2_DEBUGGING_INFO) -# define ASM_DEBUG_OPTION_SPEC \ - (PREFERRED_DEBUGGING_TYPE == DBX_DEBUG \ - ? "%{%:debug-level-gt(0):" \ - "%{gdwarf*:" ASM_DEBUG_OPTION_DWARF_OPT "}}" \ - : "%{%:debug-level-gt(0):" \ - "%{!gstabs*:%{g*:" ASM_DEBUG_OPTION_DWARF_OPT "}}}") -# elif defined(DWARF2_DEBUGGING_INFO) +# if defined(DWARF2_DEBUGGING_INFO) # define ASM_DEBUG_OPTION_SPEC "%{g*:%{%:debug-level-gt(0):" \ ASM_DEBUG_OPTION_DWARF_OPT "}}" # endif diff --git a/gcc/opts.cc b/gcc/opts.cc index 54e57f36755..ed61626a50f 100644 --- a/gcc/opts.cc +++ b/gcc/opts.cc @@ -53,7 +53,7 @@ const char *const debug_type_names[] = static uint32_t debug_type_masks[] = { - NO_DEBUG, DBX_DEBUG, DWARF2_DEBUG, XCOFF_DEBUG, VMS_DEBUG, + NO_DEBUG, DWARF2_DEBUG, XCOFF_DEBUG, VMS_DEBUG, CTF_DEBUG, BTF_DEBUG }; @@ -3145,12 +3145,6 @@ common_handle_option (struct gcc_options *opts, set_debug_level (NO_DEBUG, 2, arg, opts, opts_set, loc); break; - case OPT_gstabs: - case OPT_gstabs_: - set_debug_level (DBX_DEBUG, code == OPT_gstabs_, arg, opts, opts_set, - loc); - break; - case OPT_gvms: set_debug_level (VMS_DEBUG, false, arg, opts, opts_set, loc); break; @@ -3378,8 +3372,6 @@ set_debug_level (uint32_t dinfo, int extended, const char *arg, opts->x_write_symbols |= DWARF2_DEBUG; else opts->x_write_symbols = DWARF2_DEBUG; -#elif defined DBX_DEBUGGING_INFO - opts->x_write_symbols = DBX_DEBUG; #endif } diff --git a/gcc/toplev.cc b/gcc/toplev.cc index 61d234a9ef4..55fff0270e3 100644 --- a/gcc/toplev.cc +++ b/gcc/toplev.cc @@ -1417,17 +1417,8 @@ process_options (bool no_backend) && ctf_debug_info_level == CTFINFO_LEVEL_NONE) write_symbols = NO_DEBUG; - /* Warn if STABS debug gets enabled and is not the default. */ - if (PREFERRED_DEBUGGING_TYPE != DBX_DEBUG && (write_symbols & DBX_DEBUG)) - warning (0, "STABS debugging information is obsolete and not " - "supported anymore"); - if (write_symbols == NO_DEBUG) ; -#if defined(DBX_DEBUGGING_INFO) - else if (write_symbols == DBX_DEBUG) - debug_hooks = &dbx_debug_hooks; -#endif #if defined(XCOFF_DEBUGGING_INFO) else if (write_symbols == XCOFF_DEBUG) debug_hooks = &xcoff_debug_hooks;