summaryrefslogtreecommitdiff
path: root/0095-STABS-remove-gstabs-and-gxcoff-functionality.patch
diff options
context:
space:
mode:
Diffstat (limited to '0095-STABS-remove-gstabs-and-gxcoff-functionality.patch')
-rw-r--r--0095-STABS-remove-gstabs-and-gxcoff-functionality.patch9044
1 files changed, 9044 insertions, 0 deletions
diff --git a/0095-STABS-remove-gstabs-and-gxcoff-functionality.patch b/0095-STABS-remove-gstabs-and-gxcoff-functionality.patch
new file mode 100644
index 0000000..e76e8c3
--- /dev/null
+++ b/0095-STABS-remove-gstabs-and-gxcoff-functionality.patch
@@ -0,0 +1,9044 @@
+From 97b011574a0b4133c79f2f1ceea2f9ae1d42d044 Mon Sep 17 00:00:00 2001
+From: zhenyu--zhao_admin <zhaozhenyu17@huawei.com>
+Date: Thu, 16 May 2024 10:31:40 +0800
+Subject: [PATCH] STABS: remove -gstabs and -gxcoff functionality
+
+gcc/ChangeLog:
+
+ * Makefile.in: Remove -gstabs option support, DBX-related
+ macros and DBX debugging info support.
+ * collect2.cc (scan_prog_file): Likewise.
+ * common.opt: Likewise.
+ * config.gcc: Likewise.
+ * config.in: Likewise.
+ * config/aarch64/aarch64-elf.h (DBX_DEBUGGING_INFO): Likewise.
+ * config/alpha/alpha.cc: Likewise.
+ * config/alpha/elf.h (ASM_SPEC): Likewise.
+ * config/arc/arc.h (DBX_DEBUGGING_INFO): Likewise.
+ (DBX_CONTIN_LENGTH): Likewise.
+ * config/arm/aout.h (DBX_DEBUGGING_INFO): Likewise.
+ (DBX_CONTIN_LENGTH): Likewise.
+ * config/arm/netbsd-elf.h (DBX_CONTIN_LENGTH): Likewise.
+ * config/darwin.h (DSYMUTIL_SPEC): Likewise.
+ (ASM_DEBUG_SPEC): Likewise.
+ (DBX_DEBUGGING_INFO): Likewise.
+ (DBX_USE_BINCL): Likewise.
+ (DBX_CONTIN_LENGTH): Likewise.
+ (DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END): Likewise.
+ * config/epiphany/epiphany.h (DBX_DEBUGGING_INFO): Likewise.
+ (DBX_CONTIN_LENGTH): Likewise.
+ * config/i386/bsd.h (DBX_NO_XREFS): Likewise.
+ (DBX_CONTIN_LENGTH): Likewise.
+ * config/i386/gas.h (DBX_NO_XREFS): Likewise.
+ (DBX_CONTIN_LENGTH): Likewise.
+ * config/ia64/ia64.h: Likewise.
+ * config/ia64/sysv4.h (DBX_DEBUGGING_INFO): Likewise.
+ * config/m68k/linux.h (DBX_CONTIN_LENGTH): Likewise.
+ * config/m68k/openbsd.h (DBX_DEBUGGING_INFO): Likewise.
+ (DBX_CONTIN_LENGTH): Likewise.
+ (DBX_CONTIN_CHAR): Likewise.
+ * config/mips/mips.cc (mips_output_filename): Likewise.
+ (mips_option_override): Likewise.
+ * config/mips/mips.h (SUBTARGET_ASM_DEBUGGING_SPEC): Likewise.
+ (DBX_DEBUGGING_INFO): Likewise.
+ (DBX_CONTIN_LENGTH): Likewise.
+ (DBX_REGISTER_NUMBER): Likewise.
+ (GP_DBX_FIRST): Likewise.
+ (FP_DBX_FIRST): Likewise.
+ (MD_DBX_FIRST): Likewise.
+ * config/nvptx/nvptx.cc: Likewise.
+ * config/openbsd.h (DBX_NO_XREFS): Likewise.
+ * config/pa/pa-64.h (DBX_DEBUGGING_INFO): Likewise.
+ * config/pa/pa.h (ASSEMBLER_DIALECT): Likewise.
+ (DBX_CONTIN_LENGTH): Likewise.
+ * config/pa/som.h (PREFERRED_DEBUGGING_TYPE): Likewise.
+ (DBX_USE_BINCL): Likewise.
+ (DBX_LINES_FUNCTION_RELATIVE): Likewise.
+ (DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END): Likewise.
+ * config/pdp11/pdp11.cc: Likewise.
+ * config/pdp11/pdp11.h (DBX_DEBUGGING_INFO): Likewise.
+ (PREFERRED_DEBUGGING_TYPE): Likewise.
+ (DBX_CONTIN_LENGTH): Likewise.
+ * config/rs6000/rs6000-builtin.cc: Likewise.
+ * config/rs6000/rs6000-call.cc: Likewise.
+ * config/rs6000/rs6000-logue.cc (defined): Likewise.
+ * config/rs6000/rs6000.cc (rs6000_option_override_internal): Likewise.
+ (HAVE_XCOFF_DWARF_EXTRAS): Likewise.
+ (rs6000_xcoff_declare_function_name): Likewise.
+ * config/rs6000/sysv4.h (DBX_DEBUGGING_INFO): Likewise.
+ (DBX_FUNCTION_FIRST): Likewise.
+ * config/rs6000/xcoff.h (XCOFF_DEBUGGING_INFO): Likewise.
+ * config/rx/rx.h (DBX_DEBUGGING_INFO): Likewise.
+ * config/sh/elf.h (DBX_LINES_FUNCTION_RELATIVE): Likewise.
+ (DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END): Likewise.
+ * config/sol2.h (NO_DBX_BNSYM_ENSYM): Likewise.
+ * config/sparc/freebsd.h (DBX_CONTIN_CHAR): Likewise.
+ * config/sparc/netbsd-elf.h (DBX_CONTIN_CHAR): Likewise.
+ * config/sparc/sparc.h (DBX_CONTIN_LENGTH): Likewise.
+ * config/vax/vax.cc (vax_file_start): Likewise.
+ * config/vax/vax.h (DBX_DEBUGGING_INFO): Likewise.
+ (DBX_CONTIN_LENGTH): Likewise.
+ (DBX_CONTIN_CHAR): Likewise.
+ (DBX_NO_XREFS): Likewise.
+ (DBX_STATIC_STAB_DATA_SECTION): Likewise.
+ * config/vx-common.h (DBX_DEBUGGING_INFO): Likewise.
+ (XCOFF_DEBUGGING_INFO): Likewise.
+ * configure: Regenerate. Likewise.
+ * configure.ac: Likewise.
+ * debug.h: Likewise.
+ * doc/install.texi: Likewise.
+ * doc/invoke.texi: Likewise.
+ * doc/passes.texi: Likewise.
+ * doc/tm.texi: Likewise.
+ * doc/tm.texi.in: Likewise.
+ * dwarf2asm.cc (XCOFF_DEBUGGING_INFO): Likewise.
+ (dw2_asm_output_nstring): Likewise.
+ (USE_LINKONCE_INDIRECT): Likewise.
+ * dwarf2out.cc (XCOFF_DEBUGGING_INFO): Likewise.
+ (HAVE_XCOFF_DWARF_EXTRAS): Likewise.
+ (output_fde): Likewise.
+ (output_call_frame_info): Likewise.
+ (have_macinfo): Likewise.
+ (add_AT_loc_list): Likewise.
+ (add_AT_view_list): Likewise.
+ (output_compilation_unit_header): Likewise.
+ (output_pubnames): Likewise.
+ (output_aranges): Likewise.
+ (output_line_info): Likewise.
+ (output_macinfo): Likewise.
+ (dwarf2out_finish): Likewise.
+ (dwarf2out_early_finish): Likewise.
+ * final.cc (final_scan_insn_1): Likewise.
+ (rest_of_handle_final): Likewise.
+ * flag-types.h (enum debug_info_type): Likewise.
+ (DBX_DEBUG): Likewise.
+ (XCOFF_DEBUG): Likewise.
+ * function.cc (defined): Likewise.
+ * gcc.cc (defined): Likewise.
+ (ASM_DEBUG_SPEC): Likewise.
+ (ASM_DEBUG_OPTION_SPEC): Likewise.
+ * opts.cc (common_handle_option): Likewise.
+ (set_debug_level): Likewise.
+ * system.h (fancy_abort): Likewise.
+ * target-def.h (TARGET_ASM_CONSTRUCTOR): Likewise.
+ (TARGET_ASM_DESTRUCTOR): Likewise.
+ * toplev.cc (defined): Likewise.
+ * varasm.cc: Likewise.
+ * config/dbxcoff.h: Removed.
+ * config/dbxelf.h: Removed.
+ * dbxout.cc: Removed.
+ * dbxout.h: Removed.
+ * gstab.h: Removed.
+ * stab.def: Removed.
+ * xcoffout.cc: Removed.
+ * xcoffout.h: Removed.
+
+gcc/go/ChangeLog:
+
+ * go-lang.cc (go_langhook_pushdecl): Remove -gstabs option support, DBX-related
+ macros and DBX debugging info support.
+ * gospec.cc (lang_specific_driver): Likewise.
+
+gcc/testsuite/ChangeLog:
+
+ * lib/gcc-dg.exp: Remove -gstabs option support, DBX-related
+ macros and DBX debugging info support.
+ * lib/gfortran-dg.exp: Likewise.
+ * lib/target-supports.exp: Likewise.
+ * g++.dg/cpp0x/alias-decl-debug-0.C: Removed.
+ * g++.dg/other/PR23205.C: Removed.
+ * g++.dg/other/pr23205-2.C: Removed.
+ * gcc.dg/20040813-1.c: Removed.
+ * gcc.dg/darwin-20040809-2.c: Removed.
+ * gcc.dg/debug/pr35154.c: Removed.
+ * gcc.dg/pr69471-2.c: Removed.
+ * gcc.target/powerpc/stabs-attrib-vect-darwin.c: Removed.
+ * gcc.target/s390/20041216-1.c: Removed.
+ * gfortran.dg/debug/pr35154-stabs.f: Removed.
+ * objc.dg/stabs-1.m: Removed.
+---
+ gcc/Makefile.in | 4 +-
+ gcc/collect2.cc | 7 -
+ gcc/common.opt | 26 +-
+ gcc/config.gcc | 232 +-
+ gcc/config.in | 19 -
+ gcc/config/aarch64/aarch64-elf.h | 3 -
+ gcc/config/alpha/alpha.cc | 4 -
+ gcc/config/alpha/elf.h | 2 +-
+ gcc/config/arc/arc.h | 10 +-
+ gcc/config/arm/aout.h | 9 -
+ gcc/config/arm/netbsd-elf.h | 3 -
+ gcc/config/darwin.h | 27 +-
+ gcc/config/dbxcoff.h | 56 -
+ gcc/config/dbxelf.h | 68 -
+ gcc/config/epiphany/epiphany.h | 7 +-
+ gcc/config/i386/bsd.h | 6 -
+ gcc/config/i386/gas.h | 4 -
+ gcc/config/ia64/ia64.h | 2 -
+ gcc/config/ia64/sysv4.h | 3 -
+ gcc/config/m68k/linux.h | 4 -
+ gcc/config/m68k/openbsd.h | 12 -
+ gcc/config/mips/mips.cc | 16 -
+ gcc/config/mips/mips.h | 17 +-
+ gcc/config/nvptx/nvptx.cc | 1 -
+ gcc/config/openbsd.h | 11 -
+ gcc/config/pa/pa-64.h | 4 -
+ gcc/config/pa/pa.h | 10 -
+ gcc/config/pa/som.h | 15 -
+ gcc/config/pdp11/pdp11.cc | 1 -
+ gcc/config/pdp11/pdp11.h | 9 -
+ gcc/config/rs6000/rs6000-builtin.cc | 3 -
+ gcc/config/rs6000/rs6000-call.cc | 8 -
+ gcc/config/rs6000/rs6000-logue.cc | 12 -
+ gcc/config/rs6000/rs6000.cc | 24 +-
+ gcc/config/rs6000/sysv4.h | 8 -
+ gcc/config/rs6000/xcoff.h | 3 -
+ gcc/config/rx/rx.h | 1 -
+ gcc/config/sh/elf.h | 3 -
+ gcc/config/sol2.h | 4 -
+ gcc/config/sparc/freebsd.h | 6 -
+ gcc/config/sparc/netbsd-elf.h | 5 -
+ gcc/config/sparc/sparc.h | 8 -
+ gcc/config/vax/vax.cc | 3 -
+ gcc/config/vax/vax.h | 21 -
+ gcc/config/vx-common.h | 2 -
+ gcc/configure | 99 -
+ gcc/configure.ac | 20 -
+ gcc/dbxout.cc | 3936 -----------------
+ gcc/dbxout.h | 60 -
+ gcc/debug.h | 1 -
+ gcc/doc/install.texi | 3 +-
+ gcc/doc/invoke.texi | 42 +-
+ gcc/doc/passes.texi | 2 +-
+ gcc/doc/tm.texi | 220 +-
+ gcc/doc/tm.texi.in | 220 +-
+ gcc/dwarf2asm.cc | 13 +-
+ gcc/dwarf2out.cc | 103 +-
+ gcc/final.cc | 44 -
+ gcc/flag-types.h | 18 +-
+ gcc/function.cc | 8 -
+ gcc/gcc.cc | 24 +-
+ gcc/go/go-lang.cc | 3 +-
+ gcc/go/gospec.cc | 4 -
+ gcc/gstab.h | 35 -
+ gcc/opts.cc | 18 +-
+ gcc/stab.def | 239 -
+ gcc/system.h | 14 +-
+ gcc/target-def.h | 4 -
+ .../g++.dg/cpp0x/alias-decl-debug-0.C | 12 -
+ gcc/testsuite/g++.dg/other/PR23205.C | 17 -
+ gcc/testsuite/g++.dg/other/pr23205-2.C | 17 -
+ gcc/testsuite/gcc.dg/20040813-1.c | 14 -
+ gcc/testsuite/gcc.dg/darwin-20040809-2.c | 15 -
+ gcc/testsuite/gcc.dg/debug/pr35154.c | 35 -
+ gcc/testsuite/gcc.dg/pr69471-2.c | 8 -
+ .../powerpc/stabs-attrib-vect-darwin.c | 12 -
+ gcc/testsuite/gcc.target/s390/20041216-1.c | 23 -
+ .../gfortran.dg/debug/pr35154-stabs.f | 35 -
+ gcc/testsuite/lib/gcc-dg.exp | 2 +-
+ gcc/testsuite/lib/gfortran-dg.exp | 2 +-
+ gcc/testsuite/lib/target-supports.exp | 9 -
+ gcc/testsuite/objc.dg/stabs-1.m | 19 -
+ gcc/toplev.cc | 21 -
+ gcc/varasm.cc | 4 -
+ gcc/xcoffout.cc | 494 ---
+ gcc/xcoffout.h | 194 -
+ 86 files changed, 211 insertions(+), 6555 deletions(-)
+ delete mode 100644 gcc/config/dbxcoff.h
+ delete mode 100644 gcc/config/dbxelf.h
+ delete mode 100644 gcc/dbxout.cc
+ delete mode 100644 gcc/dbxout.h
+ delete mode 100644 gcc/gstab.h
+ delete mode 100644 gcc/stab.def
+ delete mode 100644 gcc/testsuite/g++.dg/cpp0x/alias-decl-debug-0.C
+ delete mode 100644 gcc/testsuite/g++.dg/other/PR23205.C
+ delete mode 100644 gcc/testsuite/g++.dg/other/pr23205-2.C
+ delete mode 100644 gcc/testsuite/gcc.dg/20040813-1.c
+ delete mode 100644 gcc/testsuite/gcc.dg/darwin-20040809-2.c
+ delete mode 100644 gcc/testsuite/gcc.dg/debug/pr35154.c
+ delete mode 100644 gcc/testsuite/gcc.dg/pr69471-2.c
+ delete mode 100644 gcc/testsuite/gcc.target/powerpc/stabs-attrib-vect-darwin.c
+ delete mode 100644 gcc/testsuite/gcc.target/s390/20041216-1.c
+ delete mode 100644 gcc/testsuite/gfortran.dg/debug/pr35154-stabs.f
+ delete mode 100644 gcc/testsuite/objc.dg/stabs-1.m
+ delete mode 100644 gcc/xcoffout.cc
+ delete mode 100644 gcc/xcoffout.h
+
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 298bc9c92..5cd838270 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -1347,7 +1347,6 @@ OBJS = \
+ data-streamer.o \
+ data-streamer-in.o \
+ data-streamer-out.o \
+- dbxout.o \
+ dbgcnt.o \
+ dce.o \
+ ddg.o \
+@@ -1720,7 +1719,6 @@ OBJS = \
+ web.o \
+ wide-int.o \
+ wide-int-print.o \
+- xcoffout.o \
+ $(out_object_file) \
+ $(ANALYZER_OBJS) \
+ $(EXTRA_OBJS) \
+@@ -2665,7 +2663,7 @@ GTFILES = $(CPPLIB_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
+ $(srcdir)/reload.h $(srcdir)/caller-save.cc $(srcdir)/symtab.cc \
+ $(srcdir)/alias.cc $(srcdir)/bitmap.cc $(srcdir)/cselib.cc $(srcdir)/cgraph.cc \
+ $(srcdir)/ipa-prop.cc $(srcdir)/ipa-cp.cc $(srcdir)/ipa-utils.h \
+- $(srcdir)/ipa-param-manipulation.h $(srcdir)/ipa-sra.cc $(srcdir)/dbxout.cc \
++ $(srcdir)/ipa-param-manipulation.h $(srcdir)/ipa-sra.cc \
+ $(srcdir)/ipa-modref.h $(srcdir)/ipa-modref.cc \
+ $(srcdir)/ipa-modref-tree.h \
+ $(srcdir)/signop.h \
+diff --git a/gcc/collect2.cc b/gcc/collect2.cc
+index d81c7f28f..9715e8eee 100644
+--- a/gcc/collect2.cc
++++ b/gcc/collect2.cc
+@@ -2784,13 +2784,6 @@ scan_prog_file (const char *prog_name, scanpass which_pass,
+ if ((name = ldgetname (ldptr, &symbol)) == NULL)
+ continue; /* Should never happen. */
+
+-#ifdef XCOFF_DEBUGGING_INFO
+- /* All AIX function names have a duplicate entry
+- beginning with a dot. */
+- if (*name == '.')
+- ++name;
+-#endif
+-
+ switch (is_ctor_dtor (name))
+ {
+ #if TARGET_AIX_VERSION
+diff --git a/gcc/common.opt b/gcc/common.opt
+index 4367d458d..b18f0b944 100644
+--- a/gcc/common.opt
++++ b/gcc/common.opt
+@@ -122,12 +122,6 @@ uint32_t write_symbols = NO_DEBUG
+ Variable
+ enum debug_info_levels debug_info_level = DINFO_LEVEL_NONE
+
+-; Nonzero means use GNU-only extensions in the generated symbolic
+-; debugging information. Currently, this only has an effect when
+-; write_symbols is set to DBX_DEBUG or XCOFF_DEBUG.
+-Variable
+-bool use_gnu_debug_info_extensions
+-
+ ; Level of CTF debugging information we are producing. See flag-types.h
+ ; for the definitions of the different possible levels.
+ Variable
+@@ -3410,7 +3404,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
+@@ -3458,12 +3452,12 @@ 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.
++Common Driver WarnRemoved
++Does nothing. Preserved for backward compatibility.
+
+ gstabs+
+-Common Driver JoinedOrMissing Negative(gvms)
+-Generate debug information in extended STABS format.
++Common Driver WarnRemoved
++Does nothing. Preserved for backward compatibility.
+
+ gstatement-frontiers
+ Common Driver Var(debug_nonbind_markers_p) PerFunction
+@@ -3489,16 +3483,16 @@ gvariable-location-views=incompat5
+ Common Driver RejectNegative Var(debug_variable_location_views, -1) Init(2)
+
+ gvms
+-Common Driver JoinedOrMissing Negative(gxcoff)
++Common Driver JoinedOrMissing
+ Generate debug information in VMS format.
+
+ gxcoff
+-Common Driver JoinedOrMissing Negative(gxcoff+)
+-Generate debug information in XCOFF format.
++Common Driver WarnRemoved
++Does nothing. Preserved for backward compatibility.
+
+ gxcoff+
+-Common Driver JoinedOrMissing Negative(gdwarf)
+-Generate debug information in extended XCOFF format.
++Common Driver JoinedOrMissing WarnRemoved
++Does nothing. Preserved for backward compatibility.
+
+ Enum
+ Name(compressed_debug_sections) Type(int)
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index 3108ac4eb..8fdde1576 100644
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -72,10 +72,10 @@
+ # tm_file A list of target macro files, if different from
+ # "$cpu_type/$cpu_type.h". Usually it's constructed
+ # per target in a way like this:
+-# tm_file="${tm_file} dbxelf.h elfos.h ${cpu_type.h}/elf.h"
++# tm_file="${tm_file} elfos.h ${cpu_type.h}/elf.h"
+ # Note that the preferred order is:
+ # - specific target header "${cpu_type}/${cpu_type.h}"
+-# - generic headers like dbxelf.h elfos.h, etc.
++# - generic headers like elfos.h, etc.
+ # - specializing target headers like ${cpu_type.h}/elf.h
+ # This helps to keep OS specific stuff out of the CPU
+ # defining header ${cpu_type}/${cpu_type.h}.
+@@ -969,7 +969,7 @@ case ${target} in
+ *-*-solaris2*)
+ # i?86-*-solaris2* needs to insert headers between cpu default and
+ # Solaris 2 specific ones.
+- sol2_tm_file_head="dbxelf.h elfos.h ${cpu_type}/sysv4.h"
++ sol2_tm_file_head="elfos.h ${cpu_type}/sysv4.h"
+ sol2_tm_file_tail="${cpu_type}/sol2.h sol2.h"
+ sol2_tm_file="${sol2_tm_file_head} ${sol2_tm_file_tail}"
+ case ${target} in
+@@ -1093,7 +1093,7 @@ esac
+
+ case ${target} in
+ aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*)
+- tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h"
++ tm_file="${tm_file} elfos.h newlib-stdint.h"
+ tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-errata.h aarch64/aarch64-elf-raw.h"
+ tmake_file="${tmake_file} aarch64/t-aarch64"
+ case $target in
+@@ -1130,19 +1130,19 @@ aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*)
+ TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
+ ;;
+ aarch64*-*-freebsd*)
+- tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file}"
++ tm_file="${tm_file} elfos.h ${fbsd_tm_file}"
+ tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-errata.h aarch64/aarch64-freebsd.h"
+ tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-freebsd"
+ tm_defines="${tm_defines} TARGET_DEFAULT_ASYNC_UNWIND_TABLES=1"
+ ;;
+ aarch64*-*-netbsd*)
+- tm_file="${tm_file} dbxelf.h elfos.h ${nbsd_tm_file}"
++ tm_file="${tm_file} elfos.h ${nbsd_tm_file}"
+ tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-errata.h aarch64/aarch64-netbsd.h"
+ tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-netbsd"
+ extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
+ ;;
+ aarch64*-*-linux*)
+- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h"
++ tm_file="${tm_file} elfos.h gnu-user.h linux.h glibc-stdint.h"
+ tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-errata.h aarch64/aarch64-linux.h"
+ tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-linux"
+ tm_defines="${tm_defines} TARGET_DEFAULT_ASYNC_UNWIND_TABLES=1"
+@@ -1198,7 +1198,7 @@ alpha*-dec-*vms*)
+ tmake_file="${tmake_file} alpha/t-vms alpha/t-alpha"
+ ;;
+ arc*-*-elf*)
+- tm_file="arc/arc-arch.h dbxelf.h elfos.h newlib-stdint.h arc/elf.h ${tm_file}"
++ tm_file="arc/arc-arch.h elfos.h newlib-stdint.h arc/elf.h ${tm_file}"
+ tmake_file="arc/t-multilib arc/t-arc"
+ extra_gcc_objs="driver-arc.o"
+ if test "x$with_cpu" != x; then
+@@ -1219,7 +1219,7 @@ arc*-*-elf*)
+ esac
+ ;;
+ arc*-*-linux*)
+- tm_file="arc/arc-arch.h dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h arc/linux.h ${tm_file}"
++ tm_file="arc/arc-arch.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h arc/linux.h ${tm_file}"
+ tmake_file="${tmake_file} arc/t-multilib-linux arc/t-arc"
+ extra_gcc_objs="driver-arc.o"
+ if test "x$with_cpu" != x; then
+@@ -1255,7 +1255,7 @@ arm-wrs-vxworks7*)
+ need_64bit_hwint=yes
+ ;;
+ arm*-*-freebsd*) # ARM FreeBSD EABI
+- tm_file="dbxelf.h elfos.h ${fbsd_tm_file} arm/elf.h"
++ tm_file="elfos.h ${fbsd_tm_file} arm/elf.h"
+ case $target in
+ arm*b-*-freebsd*)
+ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
+@@ -1283,7 +1283,7 @@ arm*-*-freebsd*) # ARM FreeBSD EABI
+ arm*-*-netbsdelf*)
+ target_cpu_cname="strongarm"
+ tmake_file="${tmake_file} arm/t-arm"
+- tm_file="dbxelf.h elfos.h ${nbsd_tm_file} arm/elf.h"
++ tm_file="elfos.h ${nbsd_tm_file} arm/elf.h"
+ extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
+ case ${target} in
+ arm*eb-*) tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1" ;;
+@@ -1312,7 +1312,7 @@ arm*-*-netbsdelf*)
+ esac
+ ;;
+ arm*-*-linux-* | arm*-*-uclinuxfdpiceabi)
+- tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
++ tm_file="elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
+ extra_options="${extra_options} linux-android.opt"
+ case $target in
+ arm*b-*-linux*)
+@@ -1343,7 +1343,7 @@ arm*-*-linux-* | arm*-*-uclinuxfdpiceabi)
+ with_tls=${with_tls:-gnu}
+ ;;
+ arm*-*-uclinux*eabi*) # ARM ucLinux
+- tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/uclinux-elf.h glibc-stdint.h"
++ tm_file="elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/uclinux-elf.h glibc-stdint.h"
+ tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-bpabi"
+ tm_file="$tm_file arm/bpabi.h arm/uclinux-eabi.h arm/aout.h arm/arm.h"
+ target_cpu_cname="arm7tdmi"
+@@ -1363,7 +1363,7 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems* | arm*-*-fuchsia*)
+ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
+ esac
+ default_use_cxa_atexit=yes
+- tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
++ tm_file="elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
+ tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf"
+ target_cpu_cname="arm7tdmi"
+ case ${target} in
+@@ -1392,7 +1392,7 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems* | arm*-*-fuchsia*)
+ tm_file="${tm_file} arm/aout.h arm/arm.h"
+ ;;
+ avr-*-*)
+- tm_file="elfos.h avr/elf.h avr/avr-arch.h avr/avr.h avr/specs.h dbxelf.h avr/avr-stdint.h"
++ tm_file="elfos.h avr/elf.h avr/avr-arch.h avr/avr.h avr/specs.h avr/avr-stdint.h"
+ if test x${with_avrlibc} != xno; then
+ tm_file="${tm_file} ${cpu_type}/avrlibc.h"
+ tm_defines="${tm_defines} WITH_AVRLIBC"
+@@ -1525,26 +1525,26 @@ avr-*-*)
+ extra_objs="avr-devices.o avr-log.o"
+ ;;
+ bfin*-elf*)
+- tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h bfin/elf.h"
++ tm_file="${tm_file} elfos.h newlib-stdint.h bfin/elf.h"
+ tmake_file=bfin/t-bfin-elf
+ use_collect2=no
+ ;;
+ bfin*-uclinux*)
+- tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h gnu-user.h linux.h glibc-stdint.h bfin/uclinux.h"
++ tm_file="${tm_file} elfos.h bfin/elf.h gnu-user.h linux.h glibc-stdint.h bfin/uclinux.h"
+ tmake_file=bfin/t-bfin-uclinux
+ use_collect2=no
+ ;;
+ bfin*-linux-uclibc*)
+- tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h gnu-user.h linux.h glibc-stdint.h bfin/linux.h ./linux-sysroot-suffix.h"
++ tm_file="${tm_file} elfos.h bfin/elf.h gnu-user.h linux.h glibc-stdint.h bfin/linux.h ./linux-sysroot-suffix.h"
+ tmake_file="${tmake_file} bfin/t-bfin-linux"
+ use_collect2=no
+ ;;
+ bfin*-rtems*)
+- tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h bfin/rtems.h rtems.h newlib-stdint.h"
++ tm_file="${tm_file} elfos.h bfin/elf.h bfin/rtems.h rtems.h newlib-stdint.h"
+ tmake_file="${tmake_file} bfin/t-rtems"
+ ;;
+ bfin*-*)
+- tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h bfin/elf.h"
++ tm_file="${tm_file} elfos.h newlib-stdint.h bfin/elf.h"
+ use_collect2=no
+ use_gcc_stdint=wrap
+ ;;
+@@ -1600,13 +1600,13 @@ csky-*-*)
+
+ case ${target} in
+ csky-*-elf*)
+- tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file} csky/csky-elf.h"
++ tm_file="elfos.h newlib-stdint.h ${tm_file} csky/csky-elf.h"
+ tmake_file="csky/t-csky csky/t-csky-elf"
+ default_use_cxa_atexit=no
+ use_gcc_stdint=wrap
+ ;;
+ csky-*-linux*)
+- tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} csky/csky-linux-elf.h"
++ tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} csky/csky-linux-elf.h"
+ tmake_file="${tmake_file} csky/t-csky csky/t-csky-linux"
+
+ case ${target} in
+@@ -1633,7 +1633,7 @@ csky-*-*)
+ esac
+ ;;
+ epiphany-*-elf | epiphany-*-rtems*)
+- tm_file="dbxelf.h elfos.h ${tm_file}"
++ tm_file="elfos.h ${tm_file}"
+ tmake_file="${tmake_file} epiphany/t-epiphany"
+ case ${target} in
+ epiphany-*-rtems*)
+@@ -1649,21 +1649,21 @@ epiphany-*-elf | epiphany-*-rtems*)
+ extra_headers="epiphany_intrinsics.h"
+ ;;
+ fr30-*-elf)
+- tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
++ tm_file="elfos.h newlib-stdint.h ${tm_file}"
+ ;;
+ frv-*-elf)
+- tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
++ tm_file="elfos.h newlib-stdint.h ${tm_file}"
+ tmake_file=frv/t-frv
+ ;;
+ frv-*-*linux*)
+- tm_file="dbxelf.h elfos.h ${tm_file} \
++ tm_file="elfos.h ${tm_file} \
+ gnu-user.h linux.h glibc-stdint.h frv/linux.h"
+ tmake_file="${tmake_file} frv/t-frv frv/t-linux"
+ ;;
+ ft32-*-elf)
+ gas=yes
+ gnu_ld=yes
+- tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
++ tm_file="elfos.h newlib-stdint.h ${tm_file}"
+ tmake_file="${tmake_file} ft32/t-ft32"
+ ;;
+ amdgcn-*-amdhsa)
+@@ -1691,23 +1691,23 @@ amdgcn-*-amdhsa)
+ moxie-*-elf)
+ gas=yes
+ gnu_ld=yes
+- tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
++ tm_file="elfos.h newlib-stdint.h ${tm_file}"
+ tmake_file="${tmake_file} moxie/t-moxie"
+ ;;
+ moxie-*-uclinux*)
+ gas=yes
+ gnu_ld=yes
+- tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h moxie/uclinux.h"
++ tm_file="elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h moxie/uclinux.h"
+ tmake_file="${tmake_file} moxie/t-moxie"
+ ;;
+ moxie-*-rtems*)
+ tmake_file="${tmake_file} moxie/t-moxie"
+- tm_file="moxie/moxie.h dbxelf.h elfos.h moxie/rtems.h rtems.h newlib-stdint.h"
++ tm_file="moxie/moxie.h elfos.h moxie/rtems.h rtems.h newlib-stdint.h"
+ ;;
+ moxie-*-moxiebox*)
+ gas=yes
+ gnu_ld=yes
+- tm_file="${tm_file} dbxelf.h elfos.h moxie/moxiebox.h newlib-stdint.h"
++ tm_file="${tm_file} elfos.h moxie/moxiebox.h newlib-stdint.h"
+ tmake_file="${tmake_file} moxie/t-moxiebox"
+ ;;
+ h8300-*-elf*)
+@@ -1720,7 +1720,7 @@ h8300-*-linux*)
+ ;;
+ hppa*64*-*-linux*)
+ target_cpu_default="MASK_PA_11|MASK_PA_20"
+- tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h gnu-user.h linux.h \
++ tm_file="pa/pa64-start.h ${tm_file} elfos.h gnu-user.h linux.h \
+ glibc-stdint.h pa/pa-linux.h pa/pa64-regs.h pa/pa-64.h \
+ pa/pa64-linux.h"
+ tmake_file="${tmake_file} pa/t-pa pa/t-linux"
+@@ -1729,14 +1729,14 @@ hppa*64*-*-linux*)
+ ;;
+ hppa*-*-linux*)
+ target_cpu_default="MASK_PA_11|MASK_NO_SPACE_REGS|MASK_CALLER_COPIES"
+- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h pa/pa-linux.h \
++ tm_file="${tm_file} elfos.h gnu-user.h linux.h glibc-stdint.h pa/pa-linux.h \
+ pa/pa32-regs.h pa/pa32-linux.h"
+ tmake_file="${tmake_file} pa/t-pa pa/t-linux"
+ d_target_objs="${d_target_objs} pa-d.o"
+ ;;
+ hppa*-*-openbsd*)
+ target_cpu_default="MASK_PA_11"
+- tm_file="${tm_file} dbxelf.h elfos.h openbsd.h openbsd-stdint.h openbsd-libpthread.h \
++ tm_file="${tm_file} elfos.h openbsd.h openbsd-stdint.h openbsd-libpthread.h \
+ pa/pa-openbsd.h pa/pa32-regs.h pa/pa32-openbsd.h"
+ extra_options="${extra_options} openbsd.opt"
+ tmake_file="pa/t-pa"
+@@ -1746,7 +1746,7 @@ hppa*-*-openbsd*)
+ ;;
+ hppa*-*-netbsd*)
+ target_cpu_default="MASK_PA_11|MASK_NO_SPACE_REGS"
+- tm_file="${tm_file} dbxelf.h elfos.h ${nbsd_tm_file} \
++ tm_file="${tm_file} elfos.h ${nbsd_tm_file} \
+ pa/pa-netbsd.h pa/pa32-regs.h pa/pa32-netbsd.h"
+ tmake_file="${tmake_file}"
+ tm_defines="${tm_defines} CHAR_FAST8=1 SHORT_FAST16=1"
+@@ -1794,7 +1794,7 @@ hppa*64*-*-hpux11*)
+ then
+ target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
+ fi
+- tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h \
++ tm_file="pa/pa64-start.h ${tm_file} elfos.h \
+ pa/pa64-regs.h pa/pa-hpux.h pa/pa-hpux1010.h \
+ pa/pa-hpux11.h"
+ case ${target} in
+@@ -1898,55 +1898,55 @@ x86_64-*-darwin*)
+ tm_file="${cpu_type}/darwin64-biarch.h ${tm_file} "
+ ;;
+ i[34567]86-*-elfiamcu)
+- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/iamcu.h"
++ tm_file="${tm_file} i386/unix.h i386/att.h elfos.h newlib-stdint.h i386/iamcu.h"
+ ;;
+ i[34567]86-*-elf*)
+- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h"
++ tm_file="${tm_file} i386/unix.h i386/att.h elfos.h newlib-stdint.h i386/i386elf.h"
+ ;;
+ x86_64-*-elf*)
+- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h"
++ tm_file="${tm_file} i386/unix.h i386/att.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h"
+ ;;
+ x86_64-*-rtems*)
+- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h i386/rtemself.h rtems.h"
++ tm_file="${tm_file} i386/unix.h i386/att.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h i386/rtemself.h rtems.h"
+ ;;
+ i[34567]86-*-rdos*)
+- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/rdos.h"
++ tm_file="${tm_file} i386/unix.h i386/att.h elfos.h newlib-stdint.h i386/i386elf.h i386/rdos.h"
+ ;;
+ x86_64-*-rdos*)
+- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h i386/rdos.h i386/rdos64.h"
++ tm_file="${tm_file} i386/unix.h i386/att.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h i386/rdos.h i386/rdos64.h"
+ tmake_file="i386/t-i386elf t-svr4"
+ ;;
+ i[34567]86-*-dragonfly*)
+- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h dragonfly.h dragonfly-stdint.h i386/dragonfly.h"
++ tm_file="${tm_file} i386/unix.h i386/att.h elfos.h dragonfly.h dragonfly-stdint.h i386/dragonfly.h"
+ tmake_file="${tmake_file} i386/t-crtstuff"
+ ;;
+ x86_64-*-dragonfly*)
+- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h dragonfly.h dragonfly-stdint.h i386/x86-64.h i386/dragonfly.h"
++ tm_file="${tm_file} i386/unix.h i386/att.h elfos.h dragonfly.h dragonfly-stdint.h i386/x86-64.h i386/dragonfly.h"
+ tmake_file="${tmake_file} i386/t-crtstuff"
+ ;;
+ i[34567]86-*-freebsd*)
+- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
++ tm_file="${tm_file} i386/unix.h i386/att.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
+ ;;
+ x86_64-*-freebsd*)
+- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h"
++ tm_file="${tm_file} i386/unix.h i386/att.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h"
+ ;;
+ i[34567]86-*-netbsdelf*)
+- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${nbsd_tm_file} i386/netbsd-elf.h"
++ tm_file="${tm_file} i386/unix.h i386/att.h elfos.h ${nbsd_tm_file} i386/netbsd-elf.h"
+ extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
+ ;;
+ x86_64-*-netbsd*)
+- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${nbsd_tm_file} i386/x86-64.h i386/netbsd64.h"
++ tm_file="${tm_file} i386/unix.h i386/att.h elfos.h ${nbsd_tm_file} i386/x86-64.h i386/netbsd64.h"
+ extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
+ ;;
+ i[34567]86-*-openbsd*)
+- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
++ tm_file="${tm_file} i386/unix.h i386/att.h elfos.h"
+ tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/openbsdelf.h"
+ extra_options="${extra_options} openbsd.opt"
+ gas=yes
+ gnu_ld=yes
+ ;;
+ x86_64-*-openbsd*)
+- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
++ tm_file="${tm_file} i386/unix.h i386/att.h elfos.h"
+ tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/x86-64.h i386/openbsdelf.h"
+ extra_options="${extra_options} openbsd.opt"
+ gas=yes
+@@ -1955,7 +1955,7 @@ x86_64-*-openbsd*)
+ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu)
+ # Intel 80386's running GNU/*
+ # with ELF format using glibc 2
+- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h glibc-stdint.h"
++ tm_file="${tm_file} i386/unix.h i386/att.h elfos.h gnu-user.h glibc-stdint.h"
+ case ${target} in
+ i[34567]86-*-linux*)
+ tm_file="${tm_file} linux.h linux-android.h"
+@@ -2012,7 +2012,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-gnu* | i[34567]8
+ esac
+ ;;
+ x86_64-*-linux* | x86_64-*-kfreebsd*-gnu)
+- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h glibc-stdint.h \
++ tm_file="${tm_file} i386/unix.h i386/att.h elfos.h gnu-user.h glibc-stdint.h \
+ i386/x86-64.h i386/gnu-user-common.h i386/gnu-user64.h"
+ case ${target} in
+ x86_64-*-linux*)
+@@ -2050,7 +2050,7 @@ x86_64-*-linux* | x86_64-*-kfreebsd*-gnu)
+ ;;
+ i[34567]86-pc-msdosdjgpp*)
+ xm_file=i386/xm-djgpp.h
+- tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h i386/djgpp-stdint.h"
++ tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h i386/djgpp-stdint.h"
+ native_system_header_dir=/dev/env/DJDIR/include
+ extra_options="${extra_options} i386/djgpp.opt"
+ gnu_ld=yes
+@@ -2059,7 +2059,7 @@ i[34567]86-pc-msdosdjgpp*)
+ ;;
+ i[34567]86-*-lynxos*)
+ xm_defines=POSIX
+- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/lynx.h lynx.h"
++ tm_file="${tm_file} i386/unix.h i386/att.h elfos.h i386/lynx.h lynx.h"
+ tmake_file="${tmake_file} t-lynx"
+ extra_options="${extra_options} lynx.opt"
+ thread_file=lynx
+@@ -2067,13 +2067,13 @@ i[34567]86-*-lynxos*)
+ gas=yes
+ ;;
+ i[34567]86-*-nto-qnx*)
+- tm_file="${tm_file} i386/att.h dbxelf.h tm-dwarf2.h elfos.h i386/unix.h i386/nto.h"
++ tm_file="${tm_file} i386/att.h tm-dwarf2.h elfos.h i386/unix.h i386/nto.h"
+ extra_options="${extra_options} i386/nto.opt"
+ gnu_ld=yes
+ gas=yes
+ ;;
+ i[34567]86-*-rtems*)
+- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h i386/rtemself.h rtems.h newlib-stdint.h"
++ tm_file="${tm_file} i386/unix.h i386/att.h elfos.h i386/i386elf.h i386/rtemself.h rtems.h newlib-stdint.h"
+ tmake_file="${tmake_file} i386/t-rtems"
+ ;;
+ i[34567]86-*-solaris2* | x86_64-*-solaris2*)
+@@ -2122,7 +2122,7 @@ i[4567]86-wrs-vxworks*|x86_64-wrs-vxworks7*)
+ esac
+ ;;
+ i[34567]86-*-cygwin*)
+- tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h i386/cygwin.h i386/cygwin-stdint.h"
++ tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/cygming.h i386/cygwin.h i386/cygwin-stdint.h"
+ xm_file=i386/xm-cygwin.h
+ tmake_file="${tmake_file} i386/t-cygming t-slibgcc"
+ target_gtfiles="$target_gtfiles \$(srcdir)/config/i386/winnt.cc"
+@@ -2140,7 +2140,7 @@ i[34567]86-*-cygwin*)
+ ;;
+ x86_64-*-cygwin*)
+ need_64bit_isa=yes
+- tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h i386/cygwin.h i386/cygwin-w64.h i386/cygwin-stdint.h"
++ tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/cygming.h i386/cygwin.h i386/cygwin-w64.h i386/cygwin-stdint.h"
+ xm_file=i386/xm-cygwin.h
+ tmake_file="${tmake_file} i386/t-cygming t-slibgcc i386/t-cygwin-w64"
+ target_gtfiles="$target_gtfiles \$(srcdir)/config/i386/winnt.cc"
+@@ -2158,7 +2158,7 @@ x86_64-*-cygwin*)
+ tm_defines="${tm_defines} TARGET_CYGWIN64=1"
+ ;;
+ i[34567]86-*-mingw* | x86_64-*-mingw*)
+- tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h"
++ tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/cygming.h"
+ xm_file=i386/xm-mingw32.h
+ c_target_objs="${c_target_objs} winnt-c.o"
+ cxx_target_objs="${cxx_target_objs} winnt-c.o"
+@@ -2252,7 +2252,7 @@ x86_64-*-fuchsia*)
+ tm_file="${tm_file} i386/unix.h i386/att.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h fuchsia.h"
+ ;;
+ ia64*-*-elf*)
+- tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h ia64/sysv4.h ia64/elf.h"
++ tm_file="${tm_file} elfos.h newlib-stdint.h ia64/sysv4.h ia64/elf.h"
+ tmake_file="ia64/t-ia64"
+ target_cpu_default="0"
+ if test x$gas = xyes
+@@ -2265,17 +2265,17 @@ ia64*-*-elf*)
+ fi
+ ;;
+ ia64*-*-freebsd*)
+- tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} ia64/sysv4.h ia64/freebsd.h"
++ tm_file="${tm_file} elfos.h ${fbsd_tm_file} ia64/sysv4.h ia64/freebsd.h"
+ target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
+ tmake_file="${tmake_file} ia64/t-ia64"
+ ;;
+ ia64*-*-linux*)
+- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ia64/sysv4.h ia64/linux.h"
++ tm_file="${tm_file} elfos.h gnu-user.h linux.h glibc-stdint.h ia64/sysv4.h ia64/linux.h"
+ tmake_file="${tmake_file} ia64/t-ia64 ia64/t-linux t-libunwind"
+ target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
+ ;;
+ ia64*-*-hpux*)
+- tm_file="${tm_file} dbxelf.h elfos.h ia64/sysv4.h ia64/hpux.h"
++ tm_file="${tm_file} elfos.h ia64/sysv4.h ia64/hpux.h"
+ tmake_file="ia64/t-ia64 ia64/t-hpux t-slibgcc"
+ target_cpu_default="MASK_GNU_AS"
+ case x$enable_threads in
+@@ -2311,16 +2311,16 @@ iq2000*-*-elf*)
+ md_file=iq2000/iq2000.md
+ ;;
+ lm32-*-elf*)
+- tm_file="dbxelf.h elfos.h ${tm_file} newlib-stdint.h"
++ tm_file="elfos.h ${tm_file} newlib-stdint.h"
+ tmake_file="${tmake_file} lm32/t-lm32"
+ ;;
+ lm32-*-rtems*)
+- tm_file="dbxelf.h elfos.h ${tm_file} lm32/rtems.h rtems.h newlib-stdint.h"
++ tm_file="elfos.h ${tm_file} lm32/rtems.h rtems.h newlib-stdint.h"
+ tmake_file="${tmake_file} lm32/t-lm32"
+ tmake_file="${tmake_file} lm32/t-rtems"
+ ;;
+ lm32-*-uclinux*)
+- tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h lm32/uclinux-elf.h"
++ tm_file="elfos.h ${tm_file} gnu-user.h linux.h lm32/uclinux-elf.h"
+ tmake_file="${tmake_file} lm32/t-lm32"
+ ;;
+ m32r-*-elf*)
+@@ -2348,7 +2348,7 @@ m68k-*-elf* | fido-*-elf*)
+ default_cf_cpu=5206
+ ;;
+ esac
+- tm_file="${tm_file} m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h newlib-stdint.h m68k/m68kemb.h m68k/m68020-elf.h"
++ tm_file="${tm_file} m68k/m68k-none.h m68k/m68kelf.h elfos.h newlib-stdint.h m68k/m68kemb.h m68k/m68020-elf.h"
+ tm_defines="${tm_defines} MOTOROLA=1"
+ tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-m68kelf"
+ # Add multilibs for targets other than fido.
+@@ -2363,7 +2363,7 @@ m68k-*-elf* | fido-*-elf*)
+ m68k*-*-netbsdelf*)
+ default_m68k_cpu=68020
+ default_cf_cpu=5475
+- tm_file="${tm_file} dbxelf.h elfos.h ${nbsd_tm_file} m68k/netbsd-elf.h"
++ tm_file="${tm_file} elfos.h ${nbsd_tm_file} m68k/netbsd-elf.h"
+ extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
+ tm_defines="${tm_defines} MOTOROLA=1 CHAR_FAST8=1 SHORT_FAST16=1"
+ ;;
+@@ -2372,7 +2372,7 @@ m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux
+ # ABI.
+ default_m68k_cpu=68020
+ default_cf_cpu=5206
+- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h flat.h m68k/linux.h m68k/uclinux.h ./sysroot-suffix.h"
++ tm_file="${tm_file} elfos.h gnu-user.h linux.h glibc-stdint.h flat.h m68k/linux.h m68k/uclinux.h ./sysroot-suffix.h"
+ extra_options="${extra_options} m68k/uclinux.opt"
+ tm_defines="${tm_defines} MOTOROLA=1"
+ tmake_file="m68k/t-floatlib m68k/t-uclinux m68k/t-mlibs"
+@@ -2383,7 +2383,7 @@ m68k-*-linux*) # Motorola m68k's running GNU/Linux
+ default_m68k_cpu=68020
+ default_cf_cpu=5475
+ with_arch=${with_arch:-m68k}
+- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h m68k/linux.h ./sysroot-suffix.h"
++ tm_file="${tm_file} elfos.h gnu-user.h linux.h glibc-stdint.h m68k/linux.h ./sysroot-suffix.h"
+ extra_options="${extra_options} m68k/ieee.opt"
+ tm_defines="${tm_defines} MOTOROLA=1"
+ tmake_file="${tmake_file} m68k/t-floatlib m68k/t-linux m68k/t-mlibs"
+@@ -2392,11 +2392,11 @@ m68k-*-rtems*)
+ default_m68k_cpu=68020
+ default_cf_cpu=5206
+ tmake_file="${tmake_file} m68k/t-floatlib m68k/t-m68kbare m68k/t-crtstuff m68k/t-rtems m68k/t-mlibs"
+- tm_file="${tm_file} m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h m68k/m68kemb.h m68k/m68020-elf.h m68k/rtemself.h rtems.h newlib-stdint.h"
++ tm_file="${tm_file} m68k/m68k-none.h m68k/m68kelf.h elfos.h m68k/m68kemb.h m68k/m68020-elf.h m68k/rtemself.h rtems.h newlib-stdint.h"
+ tm_defines="${tm_defines} MOTOROLA=1"
+ ;;
+ mcore-*-elf)
+- tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file} mcore/mcore-elf.h"
++ tm_file="elfos.h newlib-stdint.h ${tm_file} mcore/mcore-elf.h"
+ tmake_file=mcore/t-mcore
+ inhibit_libc=true
+ ;;
+@@ -2409,7 +2409,7 @@ microblaze*-linux*)
+ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=4321"
+ ;;
+ esac
+- tm_file="${tm_file} dbxelf.h gnu-user.h linux.h microblaze/linux.h"
++ tm_file="${tm_file} gnu-user.h linux.h microblaze/linux.h"
+ tm_file="${tm_file} glibc-stdint.h"
+ c_target_objs="${c_target_objs} microblaze-c.o"
+ cxx_target_objs="${cxx_target_objs} microblaze-c.o"
+@@ -2425,7 +2425,7 @@ microblaze*-*-rtems*)
+ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=4321"
+ ;;
+ esac
+- tm_file="${tm_file} dbxelf.h"
++ tm_file="${tm_file}"
+ tm_file="${tm_file} microblaze/rtems.h rtems.h newlib-stdint.h"
+ c_target_objs="${c_target_objs} microblaze-c.o"
+ cxx_target_objs="${cxx_target_objs} microblaze-c.o"
+@@ -2441,7 +2441,7 @@ microblaze*-*-elf)
+ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=4321"
+ ;;
+ esac
+- tm_file="${tm_file} dbxelf.h newlib-stdint.h"
++ tm_file="${tm_file} newlib-stdint.h"
+ c_target_objs="${c_target_objs} microblaze-c.o"
+ cxx_target_objs="${cxx_target_objs} microblaze-c.o"
+ tmake_file="${tmake_file} microblaze/t-microblaze"
+@@ -2509,7 +2509,7 @@ riscv*-*-freebsd*)
+ ;;
+
+ loongarch*-*-linux*)
+- tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file}"
++ tm_file="elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file}"
+ tm_file="${tm_file} loongarch/gnu-user.h loongarch/linux.h"
+ extra_options="${extra_options} linux-android.opt"
+ tmake_file="${tmake_file} loongarch/t-linux"
+@@ -2527,7 +2527,7 @@ mips*-*-netbsd*) # NetBSD/mips, either endian.
+ extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
+ ;;
+ mips*-img-linux*)
+- tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h mips/linux-common.h mips/mti-linux.h"
++ tm_file="elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h mips/linux-common.h mips/mti-linux.h"
+ extra_options="${extra_options} linux-android.opt"
+ tmake_file="${tmake_file} mips/t-img-linux"
+ tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32R6 MIPS_ABI_DEFAULT=ABI_32"
+@@ -2537,7 +2537,7 @@ mips*-img-linux*)
+ gas=yes
+ ;;
+ mips*-mti-linux*)
+- tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h mips/linux-common.h mips/mti-linux.h"
++ tm_file="elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h mips/linux-common.h mips/mti-linux.h"
+ extra_options="${extra_options} linux-android.opt"
+ tmake_file="${tmake_file} mips/t-mti-linux"
+ tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32R2 MIPS_ABI_DEFAULT=ABI_32"
+@@ -2547,7 +2547,7 @@ mips*-mti-linux*)
+ gas=yes
+ ;;
+ mips*-*-linux*) # Linux MIPS, either endian.
+- tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h mips/linux-common.h"
++ tm_file="elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h mips/linux-common.h"
+ extra_options="${extra_options} linux-android.opt"
+ case ${target} in
+ mipsisa32r6*)
+@@ -2759,7 +2759,7 @@ mn10300-*-*)
+ use_gcc_stdint=wrap
+ ;;
+ msp430-*-*)
+- tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
++ tm_file="elfos.h newlib-stdint.h ${tm_file}"
+ c_target_objs="msp430-c.o"
+ cxx_target_objs="msp430-c.o"
+ tmake_file="${tmake_file} msp430/t-msp430"
+@@ -2797,11 +2797,11 @@ nds32*-*-*)
+ esac
+ case ${target} in
+ nds32*-*-elf*)
+- tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file} nds32/elf.h nds32/nds32_intrinsic.h"
++ tm_file="elfos.h newlib-stdint.h ${tm_file} nds32/elf.h nds32/nds32_intrinsic.h"
+ tmake_file="nds32/t-nds32 nds32/t-elf"
+ ;;
+ nds32*-*-linux*)
+- tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h nds32/linux.h nds32/nds32_intrinsic.h"
++ tm_file="elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h nds32/linux.h nds32/nds32_intrinsic.h"
+ tmake_file="${tmake_file} nds32/t-nds32 nds32/t-linux"
+ gcc_cv_initfini_array=yes
+ ;;
+@@ -2922,7 +2922,7 @@ powerpc64-*-darwin*)
+ tm_file="${tm_file} ${cpu_type}/darwin64-biarch.h"
+ ;;
+ powerpc*-*-freebsd*)
+- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h ${fbsd_tm_file} rs6000/sysv4.h"
++ tm_file="${tm_file} elfos.h gnu-user.h ${fbsd_tm_file} rs6000/sysv4.h"
+ extra_options="${extra_options} rs6000/sysv4.opt"
+ tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
+ case ${target} in
+@@ -2947,47 +2947,47 @@ powerpc*-*-freebsd*)
+ esac
+ ;;
+ powerpc-*-netbsd*)
+- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h ${nbsd_tm_file} freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h"
++ tm_file="${tm_file} elfos.h gnu-user.h ${nbsd_tm_file} freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h"
+ extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
+ tmake_file="${tmake_file} rs6000/t-netbsd"
+ extra_options="${extra_options} rs6000/sysv4.opt"
+ ;;
+ powerpc-*-eabisimaltivec*)
+- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h rs6000/eabialtivec.h"
++ tm_file="${tm_file} elfos.h gnu-user.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h rs6000/eabialtivec.h"
+ extra_options="${extra_options} rs6000/sysv4.opt"
+ tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
+ use_gcc_stdint=wrap
+ ;;
+ powerpc-*-eabisim*)
+- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h"
++ tm_file="${tm_file} elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h"
+ extra_options="${extra_options} rs6000/sysv4.opt"
+ tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
+ use_gcc_stdint=wrap
+ ;;
+ powerpc-*-elf*)
+- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h"
++ tm_file="${tm_file} elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h"
+ extra_options="${extra_options} rs6000/sysv4.opt"
+ tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
+ ;;
+ powerpc-*-eabialtivec*)
+- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabialtivec.h"
++ tm_file="${tm_file} elfos.h gnu-user.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabialtivec.h"
+ extra_options="${extra_options} rs6000/sysv4.opt"
+ tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
+ use_gcc_stdint=wrap
+ ;;
+ powerpc-*-eabi*)
+- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h"
++ tm_file="${tm_file} elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h"
+ extra_options="${extra_options} rs6000/sysv4.opt"
+ tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
+ use_gcc_stdint=wrap
+ ;;
+ powerpc-*-rtems*)
+- tm_file="rs6000/biarch64.h ${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/rtems.h rtems.h"
++ tm_file="rs6000/biarch64.h ${tm_file} elfos.h gnu-user.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/rtems.h rtems.h"
+ extra_options="${extra_options} rs6000/sysv4.opt rs6000/linux64.opt"
+ tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
+ ;;
+ powerpc*-*-linux*)
+- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h freebsd-spec.h rs6000/sysv4.h"
++ tm_file="${tm_file} elfos.h gnu-user.h linux.h freebsd-spec.h rs6000/sysv4.h"
+ extra_options="${extra_options} rs6000/sysv4.opt"
+ tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm"
+ extra_objs="$extra_objs rs6000-linux.o"
+@@ -3094,7 +3094,7 @@ powerpc-wrs-vxworks*)
+ ;;
+ powerpc-*-lynxos*)
+ xm_defines=POSIX
+- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h rs6000/sysv4.h rs6000/lynx.h lynx.h"
++ tm_file="${tm_file} elfos.h gnu-user.h rs6000/sysv4.h rs6000/lynx.h lynx.h"
+ tmake_file="t-lynx rs6000/t-lynx"
+ extra_options="${extra_options} rs6000/sysv4.opt lynx.opt"
+ thread_file=lynx
+@@ -3102,18 +3102,18 @@ powerpc-*-lynxos*)
+ gas=yes
+ ;;
+ powerpcle-*-elf*)
+- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h"
++ tm_file="${tm_file} elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h"
+ tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
+ extra_options="${extra_options} rs6000/sysv4.opt"
+ ;;
+ powerpcle-*-eabisim*)
+- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/eabisim.h"
++ tm_file="${tm_file} elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/eabisim.h"
+ tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
+ extra_options="${extra_options} rs6000/sysv4.opt"
+ use_gcc_stdint=wrap
+ ;;
+ powerpcle-*-eabi*)
+- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h"
++ tm_file="${tm_file} elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h"
+ tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
+ extra_options="${extra_options} rs6000/sysv4.opt"
+ use_gcc_stdint=wrap
+@@ -3171,7 +3171,7 @@ rl78-*-elf*)
+ tmake_file="${tmake_file} rl78/t-rl78"
+ ;;
+ rx-*-elf*)
+- tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
++ tm_file="elfos.h newlib-stdint.h ${tm_file}"
+ tmake_file="${tmake_file} rx/t-rx"
+ extra_options="${extra_options} rx/elf.opt"
+ ;;
+@@ -3180,7 +3180,7 @@ rx-*-linux*)
+ tmake_file="${tmake_file} rx/t-linux"
+ ;;
+ s390-*-linux*)
+- tm_file="s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
++ tm_file="s390/s390.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
+ c_target_objs="${c_target_objs} s390-c.o"
+ cxx_target_objs="${cxx_target_objs} s390-c.o"
+ if test x$enable_targets = xall; then
+@@ -3189,7 +3189,7 @@ s390-*-linux*)
+ tmake_file="${tmake_file} s390/t-s390"
+ ;;
+ s390x-*-linux*)
+- tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
++ tm_file="s390/s390x.h s390/s390.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
+ tm_p_file="linux-protos.h s390/s390-protos.h"
+ c_target_objs="${c_target_objs} s390-c.o"
+ cxx_target_objs="${cxx_target_objs} s390-c.o"
+@@ -3199,7 +3199,7 @@ s390x-*-linux*)
+ tmake_file="${tmake_file} s390/t-linux64 s390/t-s390"
+ ;;
+ s390x-ibm-tpf*)
+- tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h glibc-stdint.h s390/tpf.h"
++ tm_file="s390/s390x.h s390/s390.h elfos.h glibc-stdint.h s390/tpf.h"
+ tm_p_file=s390/s390-protos.h
+ c_target_objs="${c_target_objs} s390-c.o"
+ cxx_target_objs="${cxx_target_objs} s390-c.o"
+@@ -3238,7 +3238,7 @@ sh-*-elf* | sh[12346l]*-*-elf* | \
+ case ${with_endian} in
+ little*) tm_file="sh/little.h ${tm_file}" ;;
+ esac
+- tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h"
++ tm_file="${tm_file} elfos.h sh/elf.h"
+ case ${target} in
+ sh*-*-linux*) tmake_file="${tmake_file} sh/t-linux"
+ if test x$enable_fdpic = xyes; then
+@@ -3359,14 +3359,14 @@ sh-*-elf* | sh[12346l]*-*-elf* | \
+ ;;
+ sh-*-rtems*)
+ tmake_file="${tmake_file} sh/t-sh sh/t-rtems"
+- tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h sh/embed-elf.h sh/rtemself.h rtems.h newlib-stdint.h"
++ tm_file="${tm_file} elfos.h sh/elf.h sh/embed-elf.h sh/rtemself.h rtems.h newlib-stdint.h"
+ ;;
+ sh-wrs-vxworks)
+ tmake_file="$tmake_file sh/t-sh sh/t-vxworks"
+ tm_file="${tm_file} elfos.h sh/elf.h sh/embed-elf.h vx-common.h vxworks.h sh/vxworks.h"
+ ;;
+ sparc-*-elf*)
+- tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp-elf.h"
++ tm_file="${tm_file} elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp-elf.h"
+ case ${target} in
+ *-leon-*)
+ tmake_file="sparc/t-sparc sparc/t-leon"
+@@ -3380,11 +3380,11 @@ sparc-*-elf*)
+ esac
+ ;;
+ sparc-*-rtems*)
+- tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
++ tm_file="${tm_file} elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
+ tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems"
+ ;;
+ sparc-*-linux*)
+- tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
++ tm_file="${tm_file} elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
+ extra_options="${extra_options} sparc/long-double-switch.opt"
+ case ${target} in
+ *-leon-*)
+@@ -3406,7 +3406,7 @@ sparc-*-linux*)
+ fi
+ ;;
+ sparc-*-netbsdelf*)
+- tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h ${nbsd_tm_file} sparc/netbsd-elf.h"
++ tm_file="${tm_file} elfos.h sparc/sysv4.h ${nbsd_tm_file} sparc/netbsd-elf.h"
+ extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
+ extra_options="${extra_options} sparc/long-double-switch.opt"
+ tmake_file="${tmake_file} sparc/t-sparc"
+@@ -3428,22 +3428,22 @@ sparc-wrs-vxworks)
+ tmake_file="${tmake_file} sparc/t-sparc sparc/t-vxworks"
+ ;;
+ sparc64-*-elf*)
+- tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h"
++ tm_file="${tm_file} elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h"
+ extra_options="${extra_options}"
+ tmake_file="${tmake_file} sparc/t-sparc"
+ ;;
+ sparc64-*-rtems*)
+- tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h sparc/rtemself.h rtems.h"
++ tm_file="${tm_file} elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h sparc/rtemself.h rtems.h"
+ extra_options="${extra_options}"
+ tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems-64"
+ ;;
+ sparc64-*-linux*)
+- tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/default64.h sparc/linux64.h sparc/tso.h"
++ tm_file="sparc/biarch64.h ${tm_file} elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/default64.h sparc/linux64.h sparc/tso.h"
+ extra_options="${extra_options} sparc/long-double-switch.opt"
+ tmake_file="${tmake_file} sparc/t-sparc sparc/t-linux64"
+ ;;
+ sparc64-*-freebsd*|ultrasparc-*-freebsd*)
+- tm_file="${tm_file} ${fbsd_tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/freebsd.h"
++ tm_file="${tm_file} ${fbsd_tm_file} elfos.h sparc/sysv4.h sparc/freebsd.h"
+ extra_options="${extra_options} sparc/long-double-switch.opt"
+ case "x$with_cpu" in
+ xultrasparc) ;;
+@@ -3454,13 +3454,13 @@ sparc64-*-freebsd*|ultrasparc-*-freebsd*)
+ ;;
+ sparc64-*-netbsd*)
+ tm_file="sparc/biarch64.h ${tm_file}"
+- tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h ${nbsd_tm_file} sparc/netbsd-elf.h"
++ tm_file="${tm_file} elfos.h sparc/sysv4.h ${nbsd_tm_file} sparc/netbsd-elf.h"
+ extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
+ extra_options="${extra_options} sparc/long-double-switch.opt"
+ tmake_file="${tmake_file} sparc/t-sparc sparc/t-netbsd64"
+ ;;
+ sparc64-*-openbsd*)
+- tm_file="sparc/openbsd1-64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp64-elf.h"
++ tm_file="sparc/openbsd1-64.h ${tm_file} elfos.h sparc/sysv4.h sparc/sp64-elf.h"
+ tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h sparc/openbsd64.h"
+ extra_options="${extra_options} openbsd.opt"
+ extra_options="${extra_options}"
+@@ -3470,13 +3470,13 @@ sparc64-*-openbsd*)
+ ;;
+ tic6x-*-elf)
+ tm_file="elfos.h ${tm_file} c6x/elf-common.h c6x/elf.h"
+- tm_file="${tm_file} dbxelf.h tm-dwarf2.h newlib-stdint.h"
++ tm_file="${tm_file} tm-dwarf2.h newlib-stdint.h"
+ tmake_file="c6x/t-c6x c6x/t-c6x-elf"
+ use_collect2=no
+ ;;
+ tic6x-*-uclinux)
+ tm_file="elfos.h ${tm_file} gnu-user.h linux.h c6x/elf-common.h c6x/uclinux-elf.h"
+- tm_file="${tm_file} dbxelf.h tm-dwarf2.h glibc-stdint.h"
++ tm_file="${tm_file} tm-dwarf2.h glibc-stdint.h"
+ tm_file="${tm_file} ./sysroot-suffix.h"
+ tmake_file="t-sysroot-suffix t-slibgcc"
+ tmake_file="${tmake_file} c6x/t-c6x c6x/t-c6x-elf c6x/t-c6x-uclinux"
+@@ -3541,7 +3541,7 @@ v850*-*-*)
+ use_gcc_stdint=wrap
+ ;;
+ vax-*-linux*)
+- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h vax/elf.h vax/linux.h"
++ tm_file="${tm_file} elfos.h gnu-user.h linux.h vax/elf.h vax/linux.h"
+ extra_options="${extra_options} vax/elf.opt"
+ ;;
+ vax-*-netbsdelf*)
+@@ -3550,12 +3550,12 @@ vax-*-netbsdelf*)
+ tm_defines="${tm_defines} CHAR_FAST8=1 SHORT_FAST16=1"
+ ;;
+ visium-*-elf*)
+- tm_file="dbxelf.h elfos.h ${tm_file} visium/elf.h newlib-stdint.h"
++ tm_file="elfos.h ${tm_file} visium/elf.h newlib-stdint.h"
+ tmake_file="visium/t-visium visium/t-crtstuff"
+ ;;
+ xstormy16-*-elf)
+ # For historical reasons, the target files omit the 'x'.
+- tm_file="dbxelf.h elfos.h newlib-stdint.h stormy16/stormy16.h"
++ tm_file="elfos.h newlib-stdint.h stormy16/stormy16.h"
+ tm_p_file=stormy16/stormy16-protos.h
+ md_file=stormy16/stormy16.md
+ out_file=stormy16/stormy16.cc
+diff --git a/gcc/config.in b/gcc/config.in
+index 6bb25b25b..91328572b 100644
+--- a/gcc/config.in
++++ b/gcc/config.in
+@@ -453,12 +453,6 @@
+ #endif
+
+
+-/* Define if your assembler supports the --gstabs option. */
+-#ifndef USED_FOR_TARGET
+-#undef HAVE_AS_GSTABS_DEBUG_FLAG
+-#endif
+-
+-
+ /* Define if your assembler supports the Sun syntax for cmov. */
+ #ifndef USED_FOR_TARGET
+ #undef HAVE_AS_IX86_CMOV_SUN_SYNTAX
+@@ -747,12 +741,6 @@
+ #endif
+
+
+-/* Define if your assembler supports .stabs. */
+-#ifndef USED_FOR_TARGET
+-#undef HAVE_AS_STABS_DIRECTIVE
+-#endif
+-
+-
+ /* Define if your assembler and linker support thread-local storage. */
+ #ifndef USED_FOR_TARGET
+ #undef HAVE_AS_TLS
+@@ -2178,13 +2166,6 @@
+ #endif
+
+
+-/* Define if your assembler supports AIX debug frame section label reference.
+- */
+-#ifndef USED_FOR_TARGET
+-#undef HAVE_XCOFF_DWARF_EXTRAS
+-#endif
+-
+-
+ /* Define if you have a working <zstd.h> header file. */
+ #ifndef USED_FOR_TARGET
+ #undef HAVE_ZSTD_H
+diff --git a/gcc/config/aarch64/aarch64-elf.h b/gcc/config/aarch64/aarch64-elf.h
+index 410a40b51..8e05b1f1c 100644
+--- a/gcc/config/aarch64/aarch64-elf.h
++++ b/gcc/config/aarch64/aarch64-elf.h
+@@ -144,7 +144,4 @@ ASM_MABI_SPEC
+ #undef TYPE_OPERAND_FMT
+ #define TYPE_OPERAND_FMT "%%%s"
+
+-/* Stabs debug not required. */
+-#undef DBX_DEBUGGING_INFO
+-
+ #endif /* GCC_AARCH64_ELF_H */
+diff --git a/gcc/config/alpha/alpha.cc b/gcc/config/alpha/alpha.cc
+index 0a85e66fa..66c17149d 100644
+--- a/gcc/config/alpha/alpha.cc
++++ b/gcc/config/alpha/alpha.cc
+@@ -8458,10 +8458,6 @@ alpha_output_mi_thunk_osf (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
+ }
+ #endif /* TARGET_ABI_OSF */
+
+-/* Debugging support. */
+-
+-#include "gstab.h"
+-
+ /* Name of the file containing the current function. */
+
+ static const char *current_function_file = "";
+diff --git a/gcc/config/alpha/elf.h b/gcc/config/alpha/elf.h
+index 4447a7f24..c9cd42e69 100644
+--- a/gcc/config/alpha/elf.h
++++ b/gcc/config/alpha/elf.h
+@@ -22,7 +22,7 @@ along with GCC; see the file COPYING3. If not see
+ #define CC1_SPEC "%{G*}"
+
+ #undef ASM_SPEC
+-#define ASM_SPEC "%{G*} %{relax:-relax} %{!gstabs*:-no-mdebug}%{gstabs*:-mdebug} %{mcpu=*:-m%*}"
++#define ASM_SPEC "%{G*} %{relax:-relax} %{mcpu=*:-m%*}"
+
+ /* Do not output a .file directive at the beginning of the input file. */
+
+diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h
+index 539a16620..0cb560b8a 100644
+--- a/gcc/config/arc/arc.h
++++ b/gcc/config/arc/arc.h
+@@ -1330,12 +1330,7 @@ do { \
+
+ /* Debugging information. */
+
+-/* Generate DBX and DWARF debugging information. */
+-#ifdef DBX_DEBUGGING_INFO
+-#undef DBX_DEBUGGING_INFO
+-#endif
+-#define DBX_DEBUGGING_INFO
+-
++/* Generate DWARF debugging information. */
+ #ifdef DWARF2_DEBUGGING_INFO
+ #undef DWARF2_DEBUGGING_INFO
+ #endif
+@@ -1385,9 +1380,6 @@ do { \
+
+ #define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, 2)
+
+-/* Turn off splitting of long stabs. */
+-#define DBX_CONTIN_LENGTH 0
+-
+ /* Miscellaneous. */
+
+ /* Specify the machine mode that this machine uses
+diff --git a/gcc/config/arm/aout.h b/gcc/config/arm/aout.h
+index b918ad378..cfb8db52c 100644
+--- a/gcc/config/arm/aout.h
++++ b/gcc/config/arm/aout.h
+@@ -145,15 +145,6 @@
+ #define NO_DOLLAR_IN_LABEL 1
+ #endif
+
+-/* Generate DBX debugging information. riscix.h will undefine this because
+- the native assembler does not support stabs. */
+-#define DBX_DEBUGGING_INFO 1
+-
+-/* Acorn dbx moans about continuation chars, so don't use any. */
+-#ifndef DBX_CONTIN_LENGTH
+-#define DBX_CONTIN_LENGTH 0
+-#endif
+-
+ /* Output a function label definition. */
+ #ifndef ASM_DECLARE_FUNCTION_NAME
+ #define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) \
+diff --git a/gcc/config/arm/netbsd-elf.h b/gcc/config/arm/netbsd-elf.h
+index d239c734c..ef1bba280 100644
+--- a/gcc/config/arm/netbsd-elf.h
++++ b/gcc/config/arm/netbsd-elf.h
+@@ -85,9 +85,6 @@
+ #undef PTRDIFF_TYPE
+ #define PTRDIFF_TYPE "long int"
+
+-/* We don't have any limit on the length as out debugger is GDB. */
+-#undef DBX_CONTIN_LENGTH
+-
+ /* NetBSD does its profiling differently to the Acorn compiler. We
+ don't need a word following the mcount call; and to skip it
+ requires either an assembly stub or use of fomit-frame-pointer when
+diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
+index 51e257dc6..0485b6b45 100644
+--- a/gcc/config/darwin.h
++++ b/gcc/config/darwin.h
+@@ -396,10 +396,10 @@ extern GTY(()) int darwin_ms_struct;
+
+ #define DSYMUTIL_SPEC \
+ "%{!c:%{!E:%{!S:%{!r:%{!M:%{!MM:%{!fsyntax-only:%{!fdump=*:\
+- %{g*:%{!gctf:%{!gbtf:%{!gstabs*:%{%:debug-level-gt(0): -idsym \
++ %{g*:%{!gctf:%{!gbtf:%{%:debug-level-gt(0): -idsym \
+ %{.c|.cc|.C|.cpp|.cp|.c++|.cxx|.CPP|.m|.mm|.s|.f|.f90|\
+ .f95|.f03|.f77|.for|.F|.F90|.F95|.F03|.d: -dsym }\
+- }}}}}\
++ }}}}\
+ }}}}}}}}"
+
+ #define LINK_COMMAND_SPEC LINK_COMMAND_SPEC_A DSYMUTIL_SPEC
+@@ -594,14 +594,7 @@ extern GTY(()) int darwin_ms_struct;
+ "%{static} -arch %(darwin_arch) " \
+ ASM_OPTIONS ASM_MMACOSX_VERSION_MIN_SPEC
+
+-#ifdef HAVE_AS_STABS_DIRECTIVE
+-/* We only pass a debug option to the assembler if that supports stabs, since
+- dwarf is not uniformly supported in the assemblers. */
+-#define ASM_DEBUG_SPEC "%{g*:%{%:debug-level-gt(0):%{!gdwarf*:--gstabs}}}"
+-#else
+ #define ASM_DEBUG_SPEC ""
+-#endif
+-
+ #undef ASM_DEBUG_OPTION_SPEC
+ #define ASM_DEBUG_OPTION_SPEC ""
+
+@@ -615,10 +608,6 @@ ASM_OPTIONS ASM_MMACOSX_VERSION_MIN_SPEC
+ #define DWARF2_DEBUGGING_INFO 1
+ #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
+
+-#ifdef HAVE_AS_STABS_DIRECTIVE
+-#define DBX_DEBUGGING_INFO 1
+-#endif
+-
+ #define DEBUG_FRAME_SECTION "__DWARF,__debug_frame,regular,debug"
+ #define DEBUG_INFO_SECTION "__DWARF,__debug_info,regular,debug"
+ #define DEBUG_ABBREV_SECTION "__DWARF,__debug_abbrev,regular,debug"
+@@ -650,18 +639,6 @@ ASM_OPTIONS ASM_MMACOSX_VERSION_MIN_SPEC
+ ? "__DWARF,__debug_gnu_pubt,regular,debug" \
+ : "__DWARF,__debug_pubtypes,regular,debug")
+
+-/* When generating stabs debugging, use N_BINCL entries. */
+-
+-#define DBX_USE_BINCL
+-
+-/* There is no limit to the length of stabs strings. */
+-
+-#define DBX_CONTIN_LENGTH 0
+-
+-/* gdb needs a null N_SO at the end of each file for scattered loading. */
+-
+-#define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
+-
+ /* GCC's definition of 'one_only' is the same as its definition of 'weak'. */
+ #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1)
+
+diff --git a/gcc/config/dbxcoff.h b/gcc/config/dbxcoff.h
+deleted file mode 100644
+index 02b78c6bf..000000000
+--- a/gcc/config/dbxcoff.h
++++ /dev/null
+@@ -1,56 +0,0 @@
+-/* Definitions needed when using stabs embedded in COFF sections.
+- Copyright (C) 1996-2022 Free Software Foundation, Inc.
+-
+-This file is part of GCC.
+-
+-GCC is free software; you can redistribute it and/or modify
+-it under the terms of the GNU General Public License as published by
+-the Free Software Foundation; either version 3, or (at your option)
+-any later version.
+-
+-GCC is distributed in the hope that it will be useful,
+-but WITHOUT ANY WARRANTY; without even the implied warranty of
+-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-GNU General Public License for more details.
+-
+-You should have received a copy of the GNU General Public License
+-along with GCC; see the file COPYING3. If not see
+-<http://www.gnu.org/licenses/>. */
+-
+-/* This file may be included by any COFF target which wishes to
+- support -gstabs generating stabs in sections, as produced by gas
+- and understood by gdb. */
+-
+-/* Output DBX (stabs) debugging information if doing -gstabs. */
+-
+-#define DBX_DEBUGGING_INFO 1
+-
+-/* Be function-relative for block and source line stab directives. */
+-
+-#define DBX_BLOCKS_FUNCTION_RELATIVE 1
+-
+-/* but, to make this work, functions must appear prior to line info. */
+-
+-#define DBX_FUNCTION_FIRST
+-
+-/* Generate a blank trailing N_SO to mark the end of the .o file, since
+- we can't depend upon the linker to mark .o file boundaries with
+- embedded stabs. */
+-
+-#define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
+-
+-/* Like block addresses, stabs line numbers are relative to the
+- current function. */
+-
+-#define DBX_LINES_FUNCTION_RELATIVE 1
+-
+-/* When generating stabs debugging, use N_BINCL entries. */
+-
+-#undef DBX_USE_BINCL
+-#define DBX_USE_BINCL
+-
+-/* There is no limit to the length of stabs strings. */
+-
+-#ifndef DBX_CONTIN_LENGTH
+-#define DBX_CONTIN_LENGTH 0
+-#endif
+diff --git a/gcc/config/dbxelf.h b/gcc/config/dbxelf.h
+deleted file mode 100644
+index 4b90e95bc..000000000
+--- a/gcc/config/dbxelf.h
++++ /dev/null
+@@ -1,68 +0,0 @@
+-/* Definitions needed when using stabs embedded in ELF sections.
+- Copyright (C) 1999-2022 Free Software Foundation, Inc.
+-
+-This file is part of GCC.
+-
+-GCC is free software; you can redistribute it and/or modify
+-it under the terms of the GNU General Public License as published by
+-the Free Software Foundation; either version 3, or (at your option)
+-any later version.
+-
+-GCC is distributed in the hope that it will be useful,
+-but WITHOUT ANY WARRANTY; without even the implied warranty of
+-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-GNU General Public License for more details.
+-
+-Under Section 7 of GPL version 3, you are granted additional
+-permissions described in the GCC Runtime Library Exception, version
+-3.1, as published by the Free Software Foundation.
+-
+-You should have received a copy of the GNU General Public License and
+-a copy of the GCC Runtime Library Exception along with this program;
+-see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+-<http://www.gnu.org/licenses/>. */
+-
+-/* This file may be included by any ELF target which wishes to
+- support -gstabs generating stabs in sections, as produced by gas
+- and understood by gdb. */
+-
+-#ifndef GCC_DBX_ELF_H
+-#define GCC_DBX_ELF_H
+-
+-/* Output DBX (stabs) debugging information if doing -gstabs. */
+-
+-#define DBX_DEBUGGING_INFO 1
+-
+-/* Make LBRAC and RBRAC addresses relative to the start of the
+- function. The native Solaris stabs debugging format works this
+- way, gdb expects it, and it reduces the number of relocation
+- entries... */
+-
+-#define DBX_BLOCKS_FUNCTION_RELATIVE 1
+-
+-/* ... but, to make this work, functions must appear prior to line info. */
+-
+-#define DBX_FUNCTION_FIRST
+-
+-/* When generating stabs debugging, use N_BINCL entries. */
+-
+-#define DBX_USE_BINCL
+-
+-/* There is no limit to the length of stabs strings. */
+-
+-#ifndef DBX_CONTIN_LENGTH
+-#define DBX_CONTIN_LENGTH 0
+-#endif
+-
+-/* Like block addresses, stabs line numbers are relative to the
+- current function. */
+-
+-#define DBX_LINES_FUNCTION_RELATIVE 1
+-
+-/* Generate a blank trailing N_SO to mark the end of the .o file, since
+- we can't depend upon the linker to mark .o file boundaries with
+- embedded stabs. */
+-
+-#define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
+-
+-#endif /* ! GCC_DBX_ELF_H */
+diff --git a/gcc/config/epiphany/epiphany.h b/gcc/config/epiphany/epiphany.h
+index 8c723845a..7c6a7f33d 100644
+--- a/gcc/config/epiphany/epiphany.h
++++ b/gcc/config/epiphany/epiphany.h
+@@ -795,14 +795,9 @@ do \
+
+ /* Debugging information. */
+
+-/* Generate DBX and DWARF debugging information. */
+-#define DBX_DEBUGGING_INFO 1
+-
++/* Generate DWARF debugging information. */
+ #undef PREFERRED_DEBUGGING_TYPE
+ #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
+-
+-/* Turn off splitting of long stabs. */
+-#define DBX_CONTIN_LENGTH 0
+
+ /* Miscellaneous. */
+
+diff --git a/gcc/config/i386/bsd.h b/gcc/config/i386/bsd.h
+index d19ad2773..98d2810e9 100644
+--- a/gcc/config/i386/bsd.h
++++ b/gcc/config/i386/bsd.h
+@@ -91,9 +91,3 @@ along with GCC; see the file COPYING3. If not see
+ /* The prefix to add to user-visible assembler symbols. */
+
+ #define USER_LABEL_PREFIX "_"
+-
+-/* Sequent has some changes in the format of DBX symbols. */
+-#define DBX_NO_XREFS 1
+-
+-/* Don't split DBX symbols into continuations. */
+-#define DBX_CONTIN_LENGTH 0
+diff --git a/gcc/config/i386/gas.h b/gcc/config/i386/gas.h
+index 3bac8eb68..e0ffc75dc 100644
+--- a/gcc/config/i386/gas.h
++++ b/gcc/config/i386/gas.h
+@@ -36,10 +36,6 @@ along with GCC; see the file COPYING3. If not see
+ * people who want both form will have to compile twice.
+ */
+
+-/* these come from i386/bsd.h, but are specific to sequent */
+-#undef DBX_NO_XREFS
+-#undef DBX_CONTIN_LENGTH
+-
+ /* Output #ident as a .ident. */
+
+ #undef TARGET_ASM_OUTPUT_IDENT
+diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h
+index bd0ef35e9..69646625e 100644
+--- a/gcc/config/ia64/ia64.h
++++ b/gcc/config/ia64/ia64.h
+@@ -1426,8 +1426,6 @@ do { \
+
+ /* Specific Options for DBX Output. */
+
+-/* This is handled by dbxelf.h. */
+-
+
+ /* Open ended Hooks for DBX Output. */
+
+diff --git a/gcc/config/ia64/sysv4.h b/gcc/config/ia64/sysv4.h
+index 045752af0..046c51101 100644
+--- a/gcc/config/ia64/sysv4.h
++++ b/gcc/config/ia64/sysv4.h
+@@ -30,9 +30,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ #undef PREFERRED_DEBUGGING_TYPE
+ #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
+
+-/* Stabs does not work properly for 64-bit targets. */
+-#undef DBX_DEBUGGING_INFO
+-
+ /* Various pseudo-ops for which the Intel assembler uses non-standard
+ definitions. */
+
+diff --git a/gcc/config/m68k/linux.h b/gcc/config/m68k/linux.h
+index 05661bf35..0c66c91f8 100644
+--- a/gcc/config/m68k/linux.h
++++ b/gcc/config/m68k/linux.h
+@@ -146,10 +146,6 @@ along with GCC; see the file COPYING3. If not see
+ fprintf (FILE, "\tjbsr _mcount\n"); \
+ }
+
+-/* Do not break .stabs pseudos into continuations. */
+-
+-#define DBX_CONTIN_LENGTH 0
+-
+ /* 1 if N is a possible register number for a function value. For
+ m68k/SVR4 allow d0, a0, or fp0 as return registers, for integral,
+ pointer, or floating types, respectively. Reject fp0 if not using
+diff --git a/gcc/config/m68k/openbsd.h b/gcc/config/m68k/openbsd.h
+index 63c57fdcc..ab998177d 100644
+--- a/gcc/config/m68k/openbsd.h
++++ b/gcc/config/m68k/openbsd.h
+@@ -60,18 +60,6 @@ along with GCC; see the file COPYING3. If not see
+ /* Every structure or union's size must be a multiple of 2 bytes. */
+ #define STRUCTURE_SIZE_BOUNDARY 16
+
+-/* Specific options for DBX Output. */
+-
+-/* This is BSD, so it wants DBX format. */
+-#define DBX_DEBUGGING_INFO 1
+-
+-/* Do not break .stabs pseudos into continuations. */
+-#define DBX_CONTIN_LENGTH 0
+-
+-/* This is the char to use for continuation (in case we need to turn
+- continuation back on). */
+-#define DBX_CONTIN_CHAR '?'
+-
+ /* Stack & calling: aggregate returns. */
+
+ /* ??? This is traditional, but quite possibly wrong. It appears to
+diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc
+index e64928f41..02d11ddbf 100644
+--- a/gcc/config/mips/mips.cc
++++ b/gcc/config/mips/mips.cc
+@@ -445,7 +445,6 @@ int num_source_filenames;
+ const char *current_function_file = "";
+
+ /* Arrays that map GCC register numbers to debugger register numbers. */
+-int mips_dbx_regno[FIRST_PSEUDO_REGISTER];
+ int mips_dwarf_regno[FIRST_PSEUDO_REGISTER];
+
+ /* Information about the current function's epilogue, used only while
+@@ -9595,10 +9594,6 @@ mips_output_filename (FILE *stream, const char *name)
+ output_quoted_string (stream, name);
+ putc ('\n', stream);
+ }
+- /* If we are emitting stabs, let dbxout.cc handle this (except for
+- the mips_output_filename_first_time case). */
+- else if (write_symbols == DBX_DEBUG)
+- return;
+ else if (name != current_function_file
+ && strcmp (name, current_function_file) != 0)
+ {
+@@ -20505,24 +20500,13 @@ mips_option_override (void)
+
+ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
+ {
+- mips_dbx_regno[i] = IGNORED_DWARF_REGNUM;
+ if (GP_REG_P (i) || FP_REG_P (i) || ALL_COP_REG_P (i))
+ mips_dwarf_regno[i] = i;
+ else
+ mips_dwarf_regno[i] = INVALID_REGNUM;
+ }
+
+- start = GP_DBX_FIRST - GP_REG_FIRST;
+- for (i = GP_REG_FIRST; i <= GP_REG_LAST; i++)
+- mips_dbx_regno[i] = i + start;
+-
+- start = FP_DBX_FIRST - FP_REG_FIRST;
+- for (i = FP_REG_FIRST; i <= FP_REG_LAST; i++)
+- mips_dbx_regno[i] = i + start;
+-
+ /* Accumulator debug registers use big-endian ordering. */
+- mips_dbx_regno[HI_REGNUM] = MD_DBX_FIRST + 0;
+- mips_dbx_regno[LO_REGNUM] = MD_DBX_FIRST + 1;
+ mips_dwarf_regno[HI_REGNUM] = MD_REG_FIRST + 0;
+ mips_dwarf_regno[LO_REGNUM] = MD_REG_FIRST + 1;
+ for (i = DSP_ACC_REG_FIRST; i <= DSP_ACC_REG_LAST; i += 2)
+diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
+index 02562d3b6..fa0676acd 100644
+--- a/gcc/config/mips/mips.h
++++ b/gcc/config/mips/mips.h
+@@ -1380,9 +1380,7 @@ struct mips_cpu_info {
+ #ifndef SUBTARGET_ASM_DEBUGGING_SPEC
+ #define SUBTARGET_ASM_DEBUGGING_SPEC "\
+ %{g} %{g0} %{g1} %{g2} %{g3} \
+-%{ggdb:-g} %{ggdb0:-g0} %{ggdb1:-g1} %{ggdb2:-g2} %{ggdb3:-g3} \
+-%{gstabs:-g} %{gstabs0:-g0} %{gstabs1:-g1} %{gstabs2:-g2} %{gstabs3:-g3} \
+-%{gstabs+:-g} %{gstabs+0:-g0} %{gstabs+1:-g1} %{gstabs+2:-g2} %{gstabs+3:-g3}"
++%{ggdb:-g} %{ggdb0:-g0} %{ggdb1:-g1} %{ggdb2:-g2} %{ggdb3:-g3}"
+ #endif
+
+ /* FP_ASM_SPEC represents the floating-point options that must be passed
+@@ -1504,7 +1502,6 @@ FP_ASM_SPEC "\
+ #define SUBTARGET_EXTRA_SPECS
+ #endif
+
+-#define DBX_DEBUGGING_INFO 1 /* generate stabs (OSF/rose) */
+ #define DWARF2_DEBUGGING_INFO 1 /* dwarf2 debugging info */
+
+ #ifndef PREFERRED_DEBUGGING_TYPE
+@@ -1544,14 +1541,6 @@ FP_ASM_SPEC "\
+ #define USER_LABEL_PREFIX ""
+ #endif
+
+-/* On Sun 4, this limit is 2048. We use 1500 to be safe,
+- since the length can run past this up to a continuation point. */
+-#undef DBX_CONTIN_LENGTH
+-#define DBX_CONTIN_LENGTH 1500
+-
+-/* How to renumber registers for dbx and gdb. */
+-#define DBX_REGISTER_NUMBER(REGNO) mips_dbx_regno[REGNO]
+-
+ /* The mapping from gcc register number to DWARF 2 CFA column number. */
+ #define DWARF_FRAME_REGNUM(REGNO) mips_dwarf_regno[REGNO]
+
+@@ -1865,7 +1854,6 @@ FP_ASM_SPEC "\
+ #define GP_REG_FIRST 0
+ #define GP_REG_LAST 31
+ #define GP_REG_NUM (GP_REG_LAST - GP_REG_FIRST + 1)
+-#define GP_DBX_FIRST 0
+ #define K0_REG_NUM (GP_REG_FIRST + 26)
+ #define K1_REG_NUM (GP_REG_FIRST + 27)
+ #define KERNEL_REG_P(REGNO) (IN_RANGE (REGNO, K0_REG_NUM, K1_REG_NUM))
+@@ -1873,12 +1861,10 @@ FP_ASM_SPEC "\
+ #define FP_REG_FIRST 32
+ #define FP_REG_LAST 63
+ #define FP_REG_NUM (FP_REG_LAST - FP_REG_FIRST + 1)
+-#define FP_DBX_FIRST ((write_symbols == DBX_DEBUG) ? 38 : 32)
+
+ #define MD_REG_FIRST 64
+ #define MD_REG_LAST 65
+ #define MD_REG_NUM (MD_REG_LAST - MD_REG_FIRST + 1)
+-#define MD_DBX_FIRST (FP_DBX_FIRST + FP_REG_NUM)
+
+ #define MSA_REG_FIRST FP_REG_FIRST
+ #define MSA_REG_LAST FP_REG_LAST
+@@ -3217,7 +3203,6 @@ extern int num_source_filenames; /* current .file # */
+ extern struct mips_asm_switch mips_noreorder;
+ extern struct mips_asm_switch mips_nomacro;
+ extern struct mips_asm_switch mips_noat;
+-extern int mips_dbx_regno[];
+ extern int mips_dwarf_regno[];
+ extern bool mips_split_p[];
+ extern bool mips_split_hi_p[];
+diff --git a/gcc/config/nvptx/nvptx.cc b/gcc/config/nvptx/nvptx.cc
+index e4297e2d6..3634a49de 100644
+--- a/gcc/config/nvptx/nvptx.cc
++++ b/gcc/config/nvptx/nvptx.cc
+@@ -52,7 +52,6 @@
+ #include "tm-preds.h"
+ #include "tm-constrs.h"
+ #include "langhooks.h"
+-#include "dbxout.h"
+ #include "cfgrtl.h"
+ #include "gimple.h"
+ #include "stor-layout.h"
+diff --git a/gcc/config/openbsd.h b/gcc/config/openbsd.h
+index 54be22254..aa90ef734 100644
+--- a/gcc/config/openbsd.h
++++ b/gcc/config/openbsd.h
+@@ -150,17 +150,6 @@ while (0)
+ #undef TARGET_LIBC_HAS_FUNCTION
+ #define TARGET_LIBC_HAS_FUNCTION default_libc_has_function
+
+-
+-/* Runtime target specification. */
+-
+-/* Miscellaneous parameters. */
+-
+-/* Controlling debugging info: dbx options. */
+-
+-/* Don't use the `xsTAG;' construct in DBX output; OpenBSD systems that
+- use DBX don't support it. */
+-#define DBX_NO_XREFS
+-
+
+ /* - we use . - _func instead of a local label,
+ - we put extra spaces in expressions such as
+diff --git a/gcc/config/pa/pa-64.h b/gcc/config/pa/pa-64.h
+index bf505768a..5157b7f30 100644
+--- a/gcc/config/pa/pa-64.h
++++ b/gcc/config/pa/pa-64.h
+@@ -65,10 +65,6 @@ along with GCC; see the file COPYING3. If not see
+ #undef LONG_DOUBLE_TYPE_SIZE
+ #define LONG_DOUBLE_TYPE_SIZE 128
+
+-/* Temporary until we figure out what to do with those *(&@$ 32bit
+- relocs which appear in stabs. */
+-#undef DBX_DEBUGGING_INFO
+-
+ /* ?!? This needs to be made compile-time selectable.
+
+ The PA64 runtime model has arguments that grow to higher addresses
+diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
+index 1ce6635ae..bafdf6021 100644
+--- a/gcc/config/pa/pa.h
++++ b/gcc/config/pa/pa.h
+@@ -130,8 +130,6 @@ extern unsigned long total_code_bytes;
+ and the old mnemonics are dialect zero. */
+ #define ASSEMBLER_DIALECT (TARGET_PA_20 ? 1 : 0)
+
+-/* Override some settings from dbxelf.h. */
+-
+ /* We do not have to be compatible with dbx, so we enable gdb extensions
+ by default. */
+ #define DEFAULT_GDB_EXTENSIONS 1
+@@ -139,14 +137,6 @@ extern unsigned long total_code_bytes;
+ /* Select dwarf2 as the preferred debug format. */
+ #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
+
+-/* This used to be zero (no max length), but big enums and such can
+- cause huge strings which killed gas.
+-
+- We also have to avoid lossage in dbxout.cc -- it does not compute the
+- string size accurately, so we are real conservative here. */
+-#undef DBX_CONTIN_LENGTH
+-#define DBX_CONTIN_LENGTH 3000
+-
+ /* GDB always assumes the current function's frame begins at the value
+ of the stack pointer upon entry to the current function. Accessing
+ local variables and parameters passed on the stack is done using the
+diff --git a/gcc/config/pa/som.h b/gcc/config/pa/som.h
+index d2510e9b9..3efae0e1f 100644
+--- a/gcc/config/pa/som.h
++++ b/gcc/config/pa/som.h
+@@ -21,21 +21,6 @@ along with GCC; see the file COPYING3. If not see
+ #undef TARGET_SOM
+ #define TARGET_SOM 1
+
+-/* With SOM we can only do STABS. */
+-#undef PREFERRED_DEBUGGING_TYPE
+-#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
+-
+-/* We do not use BINCL stabs in SOM.
+- ??? If it does not hurt, we probably should to avoid useless divergence
+- from other embedded stabs implementations. */
+-#undef DBX_USE_BINCL
+-
+-#define DBX_LINES_FUNCTION_RELATIVE 1
+-
+-/* gdb needs a null N_SO at the end of each file for scattered loading. */
+-
+-#define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
+-
+ /* HPUX has a program 'chatr' to list the dependencies of dynamically
+ linked executables and shared libraries. */
+ #define LDD_SUFFIX "chatr"
+diff --git a/gcc/config/pdp11/pdp11.cc b/gcc/config/pdp11/pdp11.cc
+index f7482df18..380223439 100644
+--- a/gcc/config/pdp11/pdp11.cc
++++ b/gcc/config/pdp11/pdp11.cc
+@@ -44,7 +44,6 @@ along with GCC; see the file COPYING3. If not see
+ #include "calls.h"
+ #include "expr.h"
+ #include "builtins.h"
+-#include "dbxout.h"
+ #include "explow.h"
+ #include "expmed.h"
+
+diff --git a/gcc/config/pdp11/pdp11.h b/gcc/config/pdp11/pdp11.h
+index b7d66c3bc..1fa52e8c7 100644
+--- a/gcc/config/pdp11/pdp11.h
++++ b/gcc/config/pdp11/pdp11.h
+@@ -51,12 +51,6 @@ along with GCC; see the file COPYING3. If not see
+
+
+ /* Generate DBX debugging information. */
+-
+-#define DBX_DEBUGGING_INFO
+-
+-#undef PREFERRED_DEBUGGING_TYPE
+-#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
+-
+ #define TARGET_40_PLUS (TARGET_40 || TARGET_45)
+ #define TARGET_10 (! TARGET_40_PLUS)
+
+@@ -489,9 +483,6 @@ extern int current_first_parm_offset;
+ /* Nonzero if access to memory by byte is no faster than by word. */
+ #define SLOW_BYTE_ACCESS 1
+
+-/* Do not break .stabs pseudos into continuations. */
+-#define DBX_CONTIN_LENGTH 0
+-
+ /* Give a comparison code (EQ, NE etc) and the first operand of a COMPARE,
+ return the mode to be used for the comparison. */
+
+diff --git a/gcc/config/rs6000/rs6000-builtin.cc b/gcc/config/rs6000/rs6000-builtin.cc
+index cc385a2b2..3bf3b4779 100644
+--- a/gcc/config/rs6000/rs6000-builtin.cc
++++ b/gcc/config/rs6000/rs6000-builtin.cc
+@@ -51,9 +51,6 @@
+ #include "tree-ssa-propagate.h"
+ #include "builtins.h"
+ #include "tree-vector-builder.h"
+-#if TARGET_XCOFF
+-#include "xcoffout.h" /* get declarations of xcoff_*_section_name */
+-#endif
+ #include "ppc-auxv.h"
+ #include "rs6000-internal.h"
+
+diff --git a/gcc/config/rs6000/rs6000-call.cc b/gcc/config/rs6000/rs6000-call.cc
+index d27df7b25..4dfe033a4 100644
+--- a/gcc/config/rs6000/rs6000-call.cc
++++ b/gcc/config/rs6000/rs6000-call.cc
+@@ -61,20 +61,12 @@
+ #include "tree-ssa-propagate.h"
+ #include "builtins.h"
+ #include "tree-vector-builder.h"
+-#if TARGET_XCOFF
+-#include "xcoffout.h" /* get declarations of xcoff_*_section_name */
+-#endif
+ #include "ppc-auxv.h"
+ #include "targhooks.h"
+ #include "opts.h"
+
+ #include "rs6000-internal.h"
+
+-#if TARGET_MACHO
+-#include "gstab.h" /* for N_SLINE */
+-#include "dbxout.h" /* dbxout_ */
+-#endif
+-
+ #ifndef TARGET_PROFILE_KERNEL
+ #define TARGET_PROFILE_KERNEL 0
+ #endif
+diff --git a/gcc/config/rs6000/rs6000-logue.cc b/gcc/config/rs6000/rs6000-logue.cc
+index a868ede24..a11d020cc 100644
+--- a/gcc/config/rs6000/rs6000-logue.cc
++++ b/gcc/config/rs6000/rs6000-logue.cc
+@@ -47,10 +47,6 @@
+ #include "diagnostic-core.h"
+ #include "alias.h"
+ #include "rs6000-internal.h"
+-#if TARGET_MACHO
+-#include "gstab.h" /* for N_SLINE */
+-#include "dbxout.h" /* dbxout_ */
+-#endif
+
+ static int rs6000_ra_ever_killed (void);
+ static void is_altivec_return_reg (rtx, void *);
+@@ -5144,10 +5140,6 @@ macho_branch_islands (void)
+ }
+ strcpy (tmp_buf, "\n");
+ strcat (tmp_buf, label);
+-#if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
+- if (write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG)
+- dbxout_stabd (N_SLINE, bi->line_number);
+-#endif /* DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO */
+ if (flag_pic)
+ {
+ strcat (tmp_buf, ":\n\tmflr r0\n\tbcl 20,31,");
+@@ -5181,10 +5173,6 @@ macho_branch_islands (void)
+ strcat (tmp_buf, ")\n\tmtctr r12\n\tbctr");
+ }
+ output_asm_insn (tmp_buf, 0);
+-#if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
+- if (write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG)
+- dbxout_stabd (N_SLINE, bi->line_number);
+-#endif /* DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO */
+ branch_islands->pop ();
+ }
+ }
+diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc
+index d9a4c3dff..0b75861bb 100644
+--- a/gcc/config/rs6000/rs6000.cc
++++ b/gcc/config/rs6000/rs6000.cc
+@@ -75,9 +75,6 @@
+ #include "ipa-prop.h"
+ #include "ipa-fnsummary.h"
+ #include "except.h"
+-#if TARGET_XCOFF
+-#include "xcoffout.h" /* get declarations of xcoff_*_section_name */
+-#endif
+ #include "case-cfn-macros.h"
+ #include "ppc-auxv.h"
+ #include "rs6000-internal.h"
+@@ -3899,12 +3896,6 @@ rs6000_option_override_internal (bool global_init_p)
+ if (TARGET_DEBUG_REG || TARGET_DEBUG_TARGET)
+ rs6000_print_isa_options (stderr, 0, "before defaults", rs6000_isa_flags);
+
+-#ifdef XCOFF_DEBUGGING_INFO
+- /* For AIX default to 64-bit DWARF. */
+- if (!OPTION_SET_P (dwarf_offset_size))
+- dwarf_offset_size = POINTER_SIZE_UNITS;
+-#endif
+-
+ /* Handle explicit -mno-{altivec,vsx,power8-vector,power9-vector} and turn
+ off all of the options that depend on those flags. */
+ ignore_masks = rs6000_disable_incompatible_switches ();
+@@ -21022,9 +21013,14 @@ rs6000_elf_file_end (void)
+
+ #if TARGET_XCOFF
+
+-#ifndef HAVE_XCOFF_DWARF_EXTRAS
+-#define HAVE_XCOFF_DWARF_EXTRAS 0
+-#endif
++/* Names of bss and data sections. These should be unique names for each
++ compilation unit. */
++
++char *xcoff_bss_section_name;
++char *xcoff_private_data_section_name;
++char *xcoff_private_rodata_section_name;
++char *xcoff_tls_data_section_name;
++char *xcoff_read_only_section_name;
+
+ static enum unwind_info_type
+ rs6000_xcoff_debug_unwind_info (void)
+@@ -21539,9 +21535,7 @@ rs6000_xcoff_declare_function_name (FILE *file, const char *name, tree decl)
+ &data, true);
+ if (!DECL_IGNORED_P (decl))
+ {
+- if (write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG)
+- xcoffout_declare_function (file, decl, buffer);
+- else if (dwarf_debuginfo_p ())
++ if (dwarf_debuginfo_p ())
+ {
+ name = (*targetm.strip_name_encoding) (name);
+ fprintf (file, "\t.function .%s,.%s,2,0\n", name, name);
+diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
+index 7e2519de5..c8b7eb633 100644
+--- a/gcc/config/rs6000/sysv4.h
++++ b/gcc/config/rs6000/sysv4.h
+@@ -504,9 +504,6 @@ extern int fixuplabelno;
+ #undef PREFERRED_DEBUGGING_TYPE
+ #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
+
+-/* Historically we have also supported stabs debugging. */
+-#define DBX_DEBUGGING_INFO 1
+-
+ #define TARGET_ENCODE_SECTION_INFO rs6000_elf_encode_section_info
+ #define TARGET_IN_SMALL_DATA_P rs6000_elf_in_small_data_p
+
+@@ -515,11 +512,6 @@ extern int fixuplabelno;
+ #define RS6000_OUTPUT_BASENAME(FILE, NAME) \
+ assemble_name (FILE, NAME)
+
+-/* We have to output the stabs for the function name *first*, before
+- outputting its label. */
+-
+-#define DBX_FUNCTION_FIRST
+-
+ /* This is the end of what might become sysv4dbx.h. */
+
+ #define TARGET_OS_SYSV_CPP_BUILTINS() \
+diff --git a/gcc/config/rs6000/xcoff.h b/gcc/config/rs6000/xcoff.h
+index cd0f99cb9..bafc57df5 100644
+--- a/gcc/config/rs6000/xcoff.h
++++ b/gcc/config/rs6000/xcoff.h
+@@ -21,9 +21,6 @@
+
+ #define TARGET_OBJECT_FORMAT OBJECT_XCOFF
+
+-/* The RS/6000 uses the XCOFF format. */
+-#define XCOFF_DEBUGGING_INFO 1
+-
+ /* Define if the object format being used is COFF or a superset. */
+ #define OBJECT_FORMAT_COFF
+
+diff --git a/gcc/config/rx/rx.h b/gcc/config/rx/rx.h
+index ce9c2ff12..77f84039c 100644
+--- a/gcc/config/rx/rx.h
++++ b/gcc/config/rx/rx.h
+@@ -623,7 +623,6 @@ typedef unsigned int CUMULATIVE_ARGS;
+ #undef PREFERRED_DEBUGGING_TYPE
+ #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
+
+-#define DBX_DEBUGGING_INFO 1
+ #define DWARF2_DEBUGGING_INFO 1
+
+ #define INCOMING_FRAME_SP_OFFSET 4
+diff --git a/gcc/config/sh/elf.h b/gcc/config/sh/elf.h
+index afb3bc353..f0fd19f88 100644
+--- a/gcc/config/sh/elf.h
++++ b/gcc/config/sh/elf.h
+@@ -67,9 +67,6 @@ along with GCC; see the file COPYING3. If not see
+ #define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \
+ sprintf ((STRING), "*%s%s%ld", LOCAL_LABEL_PREFIX, (PREFIX), (long)(NUM))
+
+-#define DBX_LINES_FUNCTION_RELATIVE 1
+-#define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
+-
+ #undef STARTFILE_SPEC
+ #define STARTFILE_SPEC \
+ "%{!shared: crt1.o%s} crti.o%s \
+diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h
+index e22c70c45..fc7033082 100644
+--- a/gcc/config/sol2.h
++++ b/gcc/config/sol2.h
+@@ -498,11 +498,7 @@ along with GCC; see the file COPYING3. If not see
+
+ #define AS_NEEDS_DASH_FOR_PIPED_INPUT
+
+-/* The Solaris assembler cannot grok .stabd directives. */
+-#undef NO_DBX_BNSYM_ENSYM
+-#define NO_DBX_BNSYM_ENSYM 1
+ #endif
+-
+ /* Solaris has an implementation of __enable_execute_stack. */
+ #define HAVE_ENABLE_EXECUTE_STACK
+
+diff --git a/gcc/config/sparc/freebsd.h b/gcc/config/sparc/freebsd.h
+index 98319c528..73850a31f 100644
+--- a/gcc/config/sparc/freebsd.h
++++ b/gcc/config/sparc/freebsd.h
+@@ -109,12 +109,6 @@ along with GCC; see the file COPYING3. If not see
+
+ /************************[ Debugger stuff ]*********************************/
+
+-/* This is the char to use for continuation (in case we need to turn
+- continuation back on). */
+-
+-#undef DBX_CONTIN_CHAR
+-#define DBX_CONTIN_CHAR '?'
+-
+ /* DWARF bits. */
+
+ /* Follow Irix 6 and not the Dwarf2 draft in using 64-bit offsets.
+diff --git a/gcc/config/sparc/netbsd-elf.h b/gcc/config/sparc/netbsd-elf.h
+index af194df3e..bee71fc18 100644
+--- a/gcc/config/sparc/netbsd-elf.h
++++ b/gcc/config/sparc/netbsd-elf.h
+@@ -46,11 +46,6 @@ along with GCC; see the file COPYING3. If not see
+ #undef PTRDIFF_TYPE
+ #define PTRDIFF_TYPE "long int"
+
+-/* This is the char to use for continuation (in case we need to turn
+- continuation back on). */
+-#undef DBX_CONTIN_CHAR
+-#define DBX_CONTIN_CHAR '?'
+-
+ #undef LOCAL_LABEL_PREFIX
+ #define LOCAL_LABEL_PREFIX "."
+
+diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h
+index 91917c3ea..155e1da7a 100644
+--- a/gcc/config/sparc/sparc.h
++++ b/gcc/config/sparc/sparc.h
+@@ -1506,14 +1506,6 @@ do { \
+ #define ADDITIONAL_REGISTER_NAMES \
+ {{"ccr", SPARC_ICC_REG}, {"cc", SPARC_ICC_REG}}
+
+-/* On Sun 4, this limit is 2048. We use 1000 to be safe, since the length
+- can run past this up to a continuation point. Once we used 1500, but
+- a single entry in C++ can run more than 500 bytes, due to the length of
+- mangled symbol names. dbxout.cc should really be fixed to do
+- continuations when they are actually needed instead of trying to
+- guess... */
+-#define DBX_CONTIN_LENGTH 1000
+-
+ /* This is how to output a command to make the user-level label named NAME
+ defined for reference from other files. */
+
+diff --git a/gcc/config/vax/vax.cc b/gcc/config/vax/vax.cc
+index f44e23d17..28c1af59a 100644
+--- a/gcc/config/vax/vax.cc
++++ b/gcc/config/vax/vax.cc
+@@ -247,9 +247,6 @@ static void
+ vax_file_start (void)
+ {
+ default_file_start ();
+-
+- if (write_symbols == DBX_DEBUG)
+- fprintf (asm_out_file, "___vax_%c_doubles:\n", ASM_DOUBLE_CHAR);
+ }
+
+ /* We can use the BSD C library routines for the libgcc calls that are
+diff --git a/gcc/config/vax/vax.h b/gcc/config/vax/vax.h
+index 45c0e7563..12c51e53d 100644
+--- a/gcc/config/vax/vax.h
++++ b/gcc/config/vax/vax.h
+@@ -508,27 +508,6 @@ enum reg_class { NO_REGS, ALL_REGS, LIM_REG_CLASSES };
+ "r8", "r9", "r10", "r11", "ap", "fp", "sp", "pc", \
+ "psl" }
+
+-/* This is BSD, so it wants DBX format. */
+-
+-#define DBX_DEBUGGING_INFO 1
+-
+-/* Do not break .stabs pseudos into continuations. */
+-
+-#define DBX_CONTIN_LENGTH 0
+-
+-/* This is the char to use for continuation (in case we need to turn
+- continuation back on). */
+-
+-#define DBX_CONTIN_CHAR '?'
+-
+-/* Don't use the `xsfoo;' construct in DBX output; this system
+- doesn't support it. */
+-
+-#define DBX_NO_XREFS
+-
+-/* Output the .stabs for a C `static' variable in the data section. */
+-#define DBX_STATIC_STAB_DATA_SECTION
+-
+ /* VAX specific: which type character is used for type double? */
+
+ #define ASM_DOUBLE_CHAR (TARGET_G_FLOAT ? 'g' : 'd')
+diff --git a/gcc/config/vx-common.h b/gcc/config/vx-common.h
+index aaae4f78b..bc2768437 100644
+--- a/gcc/config/vx-common.h
++++ b/gcc/config/vx-common.h
+@@ -94,8 +94,6 @@ along with GCC; see the file COPYING3. If not see
+ #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
+
+ /* None of these other formats is supported. */
+-#undef DBX_DEBUGGING_INFO
+-#undef XCOFF_DEBUGGING_INFO
+ #undef VMS_DEBUGGING_INFO
+
+ /* ------------------------ Misc configuration bits ---------------------- */
+diff --git a/gcc/configure b/gcc/configure
+index 30f386789..7e64599b0 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -25078,38 +25078,6 @@ cat >>confdefs.h <<_ACEOF
+ _ACEOF
+
+
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for stabs directive" >&5
+-$as_echo_n "checking assembler for stabs directive... " >&6; }
+-if ${gcc_cv_as_stabs_directive+:} false; then :
+- $as_echo_n "(cached) " >&6
+-else
+- gcc_cv_as_stabs_directive=no
+- if test x$gcc_cv_as != x; then
+- $as_echo '.stabs "gcc2_compiled.",60,0,0,0' > conftest.s
+- if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
+- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+- test $ac_status = 0; }; }
+- then
+- gcc_cv_as_stabs_directive=yes
+- else
+- echo "configure: failed program was" >&5
+- cat conftest.s >&5
+- fi
+- rm -f conftest.o conftest.s
+- fi
+-fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_stabs_directive" >&5
+-$as_echo "$gcc_cv_as_stabs_directive" >&6; }
+-if test $gcc_cv_as_stabs_directive = yes; then
+-
+-$as_echo "#define HAVE_AS_STABS_DIRECTIVE 1" >>confdefs.h
+-
+-fi
+-
+-
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for COMDAT group support (GNU as)" >&5
+ $as_echo_n "checking assembler for COMDAT group support (GNU as)... " >&6; }
+ if ${gcc_cv_as_comdat_group+:} false; then :
+@@ -28186,41 +28154,6 @@ if test $gcc_cv_as_aix_ref = yes; then
+
+ $as_echo "#define HAVE_AS_REF 1" >>confdefs.h
+
+-fi
+-
+-
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for AIX DWARF location lists section support" >&5
+-$as_echo_n "checking assembler for AIX DWARF location lists section support... " >&6; }
+-if ${gcc_cv_as_aix_dwloc+:} false; then :
+- $as_echo_n "(cached) " >&6
+-else
+- gcc_cv_as_aix_dwloc=no
+- if test x$gcc_cv_as != x; then
+- $as_echo ' .dwsect 0xA0000
+- Lframe..0:
+- .vbyte 4,Lframe..0
+- ' > conftest.s
+- if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
+- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+- test $ac_status = 0; }; }
+- then
+- gcc_cv_as_aix_dwloc=yes
+- else
+- echo "configure: failed program was" >&5
+- cat conftest.s >&5
+- fi
+- rm -f conftest.o conftest.s
+- fi
+-fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_aix_dwloc" >&5
+-$as_echo "$gcc_cv_as_aix_dwloc" >&6; }
+-if test $gcc_cv_as_aix_dwloc = yes; then
+-
+-$as_echo "#define HAVE_XCOFF_DWARF_EXTRAS 1" >>confdefs.h
+-
+ fi
+
+ ;;
+@@ -30008,38 +29941,6 @@ $as_echo "#define HAVE_AS_WORKING_DWARF_N_FLAG 1" >>confdefs.h
+ fi
+ fi
+
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --gstabs option" >&5
+-$as_echo_n "checking assembler for --gstabs option... " >&6; }
+-if ${gcc_cv_as_gstabs_flag+:} false; then :
+- $as_echo_n "(cached) " >&6
+-else
+- gcc_cv_as_gstabs_flag=no
+- if test x$gcc_cv_as != x; then
+- $as_echo "$insn" > conftest.s
+- if { ac_try='$gcc_cv_as $gcc_cv_as_flags --gstabs -o conftest.o conftest.s >&5'
+- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+- test $ac_status = 0; }; }
+- then
+- gcc_cv_as_gstabs_flag=yes
+- else
+- echo "configure: failed program was" >&5
+- cat conftest.s >&5
+- fi
+- rm -f conftest.o conftest.s
+- fi
+-fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_gstabs_flag" >&5
+-$as_echo "$gcc_cv_as_gstabs_flag" >&6; }
+-if test $gcc_cv_as_gstabs_flag = yes; then
+-
+-$as_echo "#define HAVE_AS_GSTABS_DEBUG_FLAG 1" >>confdefs.h
+-
+-fi
+-
+-
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --debug-prefix-map option" >&5
+ $as_echo_n "checking assembler for --debug-prefix-map option... " >&6; }
+ if ${gcc_cv_as_debug_prefix_map_flag+:} false; then :
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index dd6cd60f8..708ec3fd3 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -3509,11 +3509,6 @@ AC_DEFINE_UNQUOTED(HAVE_LD_ALIGNED_SHF_MERGE,
+ [`if test $gcc_cv_ld_aligned_shf_merge = yes; then echo 1; else echo 0; fi`],
+ [Define 0/1 if your linker supports the SHF_MERGE flag with section alignment > 1.])
+
+-gcc_GAS_CHECK_FEATURE([stabs directive], gcc_cv_as_stabs_directive,,
+-[.stabs "gcc2_compiled.",60,0,0,0],,
+-[AC_DEFINE(HAVE_AS_STABS_DIRECTIVE, 1,
+- [Define if your assembler supports .stabs.])])
+-
+ gcc_GAS_CHECK_FEATURE([COMDAT group support (GNU as)],
+ gcc_cv_as_comdat_group,
+ [--fatal-warnings],
+@@ -5100,15 +5095,6 @@ LCF0:
+ ],,
+ [AC_DEFINE(HAVE_AS_REF, 1,
+ [Define if your assembler supports .ref])])
+-
+- gcc_GAS_CHECK_FEATURE([AIX DWARF location lists section support],
+- gcc_cv_as_aix_dwloc,,
+- [ .dwsect 0xA0000
+- Lframe..0:
+- .vbyte 4,Lframe..0
+- ],,
+- [AC_DEFINE(HAVE_XCOFF_DWARF_EXTRAS, 1,
+- [Define if your assembler supports AIX debug frame section label reference.])])
+ ;;
+ esac
+ ;;
+@@ -5841,12 +5827,6 @@ foo:
+ fi
+ fi
+
+- gcc_GAS_CHECK_FEATURE([--gstabs option],
+- gcc_cv_as_gstabs_flag,
+- [--gstabs], [$insn],,
+- [AC_DEFINE(HAVE_AS_GSTABS_DEBUG_FLAG, 1,
+-[Define if your assembler supports the --gstabs option.])])
+-
+ gcc_GAS_CHECK_FEATURE([--debug-prefix-map option],
+ gcc_cv_as_debug_prefix_map_flag,
+ [--debug-prefix-map /a=/b], [$insn],,
+diff --git a/gcc/dbxout.cc b/gcc/dbxout.cc
+deleted file mode 100644
+index 878d528dc..000000000
+--- a/gcc/dbxout.cc
++++ /dev/null
+@@ -1,3936 +0,0 @@
+-/* Output dbx-format symbol table information from GNU compiler.
+- Copyright (C) 1987-2022 Free Software Foundation, Inc.
+-
+-This file is part of GCC.
+-
+-GCC is free software; you can redistribute it and/or modify it under
+-the terms of the GNU General Public License as published by the Free
+-Software Foundation; either version 3, or (at your option) any later
+-version.
+-
+-GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+-WARRANTY; without even the implied warranty of MERCHANTABILITY or
+-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+-for more details.
+-
+-You should have received a copy of the GNU General Public License
+-along with GCC; see the file COPYING3. If not see
+-<http://www.gnu.org/licenses/>. */
+-
+-
+-/* Output dbx-format symbol table data.
+- This consists of many symbol table entries, each of them
+- a .stabs assembler pseudo-op with four operands:
+- a "name" which is really a description of one symbol and its type,
+- a "code", which is a symbol defined in stab.h whose name starts with N_,
+- an unused operand always 0,
+- and a "value" which is an address or an offset.
+- The name is enclosed in doublequote characters.
+-
+- Each function, variable, typedef, and structure tag
+- has a symbol table entry to define it.
+- The beginning and end of each level of name scoping within
+- a function are also marked by special symbol table entries.
+-
+- The "name" consists of the symbol name, a colon, a kind-of-symbol letter,
+- and a data type number. The data type number may be followed by
+- "=" and a type definition; normally this will happen the first time
+- the type number is mentioned. The type definition may refer to
+- other types by number, and those type numbers may be followed
+- by "=" and nested definitions.
+-
+- This can make the "name" quite long.
+- When a name is more than 80 characters, we split the .stabs pseudo-op
+- into two .stabs pseudo-ops, both sharing the same "code" and "value".
+- The first one is marked as continued with a double-backslash at the
+- end of its "name".
+-
+- The kind-of-symbol letter distinguished function names from global
+- variables from file-scope variables from parameters from auto
+- variables in memory from typedef names from register variables.
+- See `dbxout_symbol'.
+-
+- The "code" is mostly redundant with the kind-of-symbol letter
+- that goes in the "name", but not entirely: for symbols located
+- in static storage, the "code" says which segment the address is in,
+- which controls how it is relocated.
+-
+- The "value" for a symbol in static storage
+- is the core address of the symbol (actually, the assembler
+- label for the symbol). For a symbol located in a stack slot
+- it is the stack offset; for one in a register, the register number.
+- For a typedef symbol, it is zero.
+-
+- If DEBUG_SYMS_TEXT is defined, all debugging symbols must be
+- output while in the text section.
+-
+- For more on data type definitions, see `dbxout_type'. */
+-
+-#include "config.h"
+-#include "system.h"
+-#include "coretypes.h"
+-#include "target.h"
+-#include "function.h"
+-#include "rtl.h"
+-#include "tree.h"
+-#include "memmodel.h"
+-#include "tm_p.h"
+-#include "stringpool.h"
+-#include "insn-config.h"
+-#include "emit-rtl.h"
+-#include "cgraph.h"
+-#include "diagnostic-core.h"
+-#include "fold-const.h"
+-#include "varasm.h"
+-#include "stor-layout.h"
+-#include "reload.h"
+-#include "output.h"
+-#include "dbxout.h"
+-#include "toplev.h"
+-#include "debug.h"
+-#include "common/common-target.h"
+-#include "langhooks.h"
+-#include "expr.h"
+-#include "file-prefix-map.h" /* remap_debug_filename() */
+-#include "flags.h"
+-
+-#ifdef XCOFF_DEBUGGING_INFO
+-#include "xcoffout.h"
+-#endif
+-
+-#ifndef ASM_STABS_OP
+-# ifdef XCOFF_DEBUGGING_INFO
+-# define ASM_STABS_OP "\t.stabx\t"
+-# else
+-# define ASM_STABS_OP "\t.stabs\t"
+-# endif
+-#endif
+-
+-#ifndef ASM_STABN_OP
+-#define ASM_STABN_OP "\t.stabn\t"
+-#endif
+-
+-#ifndef ASM_STABD_OP
+-#define ASM_STABD_OP "\t.stabd\t"
+-#endif
+-
+-#ifndef DBX_TYPE_DECL_STABS_CODE
+-#define DBX_TYPE_DECL_STABS_CODE N_LSYM
+-#endif
+-
+-#ifndef DBX_STATIC_CONST_VAR_CODE
+-#define DBX_STATIC_CONST_VAR_CODE N_FUN
+-#endif
+-
+-#ifndef DBX_REGPARM_STABS_CODE
+-#define DBX_REGPARM_STABS_CODE N_RSYM
+-#endif
+-
+-#ifndef DBX_REGPARM_STABS_LETTER
+-#define DBX_REGPARM_STABS_LETTER 'P'
+-#endif
+-
+-#ifndef NO_DBX_FUNCTION_END
+-#define NO_DBX_FUNCTION_END 0
+-#endif
+-
+-#ifndef NO_DBX_BNSYM_ENSYM
+-#define NO_DBX_BNSYM_ENSYM 0
+-#endif
+-
+-#ifndef NO_DBX_MAIN_SOURCE_DIRECTORY
+-#define NO_DBX_MAIN_SOURCE_DIRECTORY 0
+-#endif
+-
+-#ifndef DBX_BLOCKS_FUNCTION_RELATIVE
+-#define DBX_BLOCKS_FUNCTION_RELATIVE 0
+-#endif
+-
+-#ifndef DBX_LINES_FUNCTION_RELATIVE
+-#define DBX_LINES_FUNCTION_RELATIVE 0
+-#endif
+-
+-#ifndef DBX_CONTIN_LENGTH
+-#define DBX_CONTIN_LENGTH 80
+-#endif
+-
+-#ifndef DBX_CONTIN_CHAR
+-#define DBX_CONTIN_CHAR '\\'
+-#endif
+-
+-enum typestatus {TYPE_UNSEEN, TYPE_XREF, TYPE_DEFINED};
+-
+-/* Structure recording information about a C data type.
+- The status element says whether we have yet output
+- the definition of the type. TYPE_XREF says we have
+- output it as a cross-reference only.
+- The file_number and type_number elements are used if DBX_USE_BINCL
+- is defined. */
+-
+-struct GTY(()) typeinfo {
+- enum typestatus status;
+- int file_number;
+- int type_number;
+-};
+-
+-/* Vector recording information about C data types.
+- When we first notice a data type (a tree node),
+- we assign it a number using next_type_number.
+- That is its index in this vector. */
+-
+-static GTY ((length ("typevec_len"))) struct typeinfo *typevec;
+-
+-/* Number of elements of space allocated in `typevec'. */
+-
+-static GTY(()) int typevec_len;
+-
+-/* In dbx output, each type gets a unique number.
+- This is the number for the next type output.
+- The number, once assigned, is in the TYPE_SYMTAB_ADDRESS field. */
+-
+-static GTY(()) int next_type_number;
+-
+-/* The C front end may call dbxout_symbol before dbxout_init runs.
+- We save all such decls in this list and output them when we get
+- to dbxout_init. */
+-
+-static GTY(()) tree preinit_symbols;
+-
+-enum binclstatus {BINCL_NOT_REQUIRED, BINCL_PENDING, BINCL_PROCESSED};
+-
+-/* When using N_BINCL in dbx output, each type number is actually a
+- pair of the file number and the type number within the file.
+- This is a stack of input files. */
+-
+-struct dbx_file
+-{
+- struct dbx_file *next;
+- int file_number;
+- int next_type_number;
+- enum binclstatus bincl_status; /* Keep track of lazy bincl. */
+- const char *pending_bincl_name; /* Name of bincl. */
+- struct dbx_file *prev; /* Chain to traverse all pending bincls. */
+-};
+-
+-/* This is the top of the stack.
+-
+- This is not saved for PCH, because restoring a PCH should not change it.
+- next_file_number does have to be saved, because the PCH may use some
+- file numbers; however, just before restoring a PCH, next_file_number
+- should always be 0 because we should not have needed any file numbers
+- yet. */
+-
+-#if (defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)) \
+- && defined (DBX_USE_BINCL)
+-static struct dbx_file *current_file;
+-#endif
+-
+-/* This is the next file number to use. */
+-
+-static GTY(()) int next_file_number;
+-
+-/* A counter for dbxout_function_end. */
+-
+-static GTY(()) int scope_labelno;
+-
+-/* A counter for dbxout_source_line. */
+-
+-static GTY(()) int dbxout_source_line_counter;
+-
+-/* Number for the next N_SOL filename stabs label. The number 0 is reserved
+- for the N_SO filename stabs label. */
+-
+-static GTY(()) int source_label_number = 1;
+-
+-/* Last source file name mentioned in a NOTE insn. */
+-
+-static GTY(()) const char *lastfile;
+-
+-/* Last line number mentioned in a NOTE insn. */
+-
+-static GTY(()) unsigned int lastlineno;
+-
+-/* Used by PCH machinery to detect if 'lastfile' should be reset to
+- base_input_file. */
+-static GTY(()) int lastfile_is_base;
+-
+-/* Typical USG systems don't have stab.h, and they also have
+- no use for DBX-format debugging info. */
+-
+-#if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
+-
+-#ifdef DBX_USE_BINCL
+-/* If zero then there is no pending BINCL. */
+-static int pending_bincls = 0;
+-#endif
+-
+-/* The original input file name. */
+-static const char *base_input_file;
+-
+-#ifdef DEBUG_SYMS_TEXT
+-#define FORCE_TEXT switch_to_section (current_function_section ())
+-#else
+-#define FORCE_TEXT
+-#endif
+-
+-#include "gstab.h"
+-
+-/* 1 if PARM is passed to this function in memory. */
+-
+-#define PARM_PASSED_IN_MEMORY(PARM) \
+- (MEM_P (DECL_INCOMING_RTL (PARM)))
+-
+-/* A C expression for the integer offset value of an automatic variable
+- (N_LSYM) having address X (an RTX). */
+-#ifndef DEBUGGER_AUTO_OFFSET
+-#define DEBUGGER_AUTO_OFFSET(X) \
+- (GET_CODE (X) == PLUS ? INTVAL (XEXP (X, 1)) : 0)
+-#endif
+-
+-/* A C expression for the integer offset value of an argument (N_PSYM)
+- having address X (an RTX). The nominal offset is OFFSET.
+- Note that we use OFFSET + 0 here to avoid the self-assign warning
+- when the macro is called in a context like
+- number = DEBUGGER_ARG_OFFSET(number, X) */
+-#ifndef DEBUGGER_ARG_OFFSET
+-#define DEBUGGER_ARG_OFFSET(OFFSET, X) (OFFSET + 0)
+-#endif
+-
+-/* This obstack holds the stab string currently being constructed. We
+- build it up here, then write it out, so we can split long lines up
+- properly (see dbxout_finish_complex_stabs). */
+-static struct obstack stabstr_ob;
+-static size_t stabstr_last_contin_point;
+-
+-#ifdef DBX_USE_BINCL
+-static void emit_bincl_stab (const char *c);
+-static void emit_pending_bincls (void);
+-#endif
+-static inline void emit_pending_bincls_if_required (void);
+-
+-static void dbxout_init (const char *);
+-
+-static void dbxout_finish (const char *);
+-static void dbxout_start_source_file (unsigned, const char *);
+-static void dbxout_end_source_file (unsigned);
+-static void dbxout_typedefs (tree);
+-static void dbxout_type_index (tree);
+-static void dbxout_args (tree);
+-static void dbxout_type_fields (tree);
+-static void dbxout_type_method_1 (tree);
+-static void dbxout_type_methods (tree);
+-static void dbxout_range_type (tree, tree, tree);
+-static void dbxout_type (tree, int);
+-static bool print_int_cst_bounds_in_octal_p (tree, tree, tree);
+-static bool is_fortran (void);
+-static void dbxout_type_name (tree);
+-static void dbxout_class_name_qualifiers (tree);
+-static int dbxout_symbol_location (tree, tree, const char *, rtx);
+-static void dbxout_symbol_name (tree, const char *, int);
+-static void dbxout_common_name (tree, const char *, stab_code_type);
+-static const char *dbxout_common_check (tree, int *);
+-static void dbxout_early_global_decl (tree);
+-static void dbxout_late_global_decl (tree);
+-static void dbxout_type_decl (tree, int);
+-static void dbxout_handle_pch (unsigned);
+-static void debug_free_queue (void);
+-
+-/* The debug hooks structure. */
+-#if defined (DBX_DEBUGGING_INFO)
+-
+-static void dbxout_source_line (unsigned int, unsigned int, const char *,
+- int, bool);
+-static void dbxout_switch_text_section (void);
+-static void dbxout_begin_prologue (unsigned int, unsigned int, const char *);
+-static void dbxout_source_file (const char *);
+-static void dbxout_function_end (tree);
+-static void dbxout_begin_function (tree);
+-static void dbxout_begin_block (unsigned, unsigned);
+-static void dbxout_end_block (unsigned, unsigned);
+-static void dbxout_function_decl (tree);
+-
+-const struct gcc_debug_hooks dbx_debug_hooks =
+-{
+- dbxout_init,
+- dbxout_finish,
+- debug_nothing_charstar,
+- debug_nothing_void,
+- debug_nothing_int_charstar,
+- debug_nothing_int_charstar,
+- dbxout_start_source_file,
+- dbxout_end_source_file,
+- dbxout_begin_block,
+- dbxout_end_block,
+- debug_true_const_tree, /* ignore_block */
+- dbxout_source_line, /* source_line */
+- debug_nothing_int_int_charstar, /* set_ignored_loc */
+- dbxout_begin_prologue, /* begin_prologue */
+- debug_nothing_int_charstar, /* end_prologue */
+- debug_nothing_int_charstar, /* begin_epilogue */
+- debug_nothing_int_charstar, /* end_epilogue */
+-#ifdef DBX_FUNCTION_FIRST
+- dbxout_begin_function,
+-#else
+- debug_nothing_tree, /* begin_function */
+-#endif
+- debug_nothing_int, /* end_function */
+- debug_nothing_tree, /* register_main_translation_unit */
+- dbxout_function_decl,
+- dbxout_early_global_decl, /* early_global_decl */
+- dbxout_late_global_decl, /* late_global_decl */
+- dbxout_type_decl, /* type_decl */
+- debug_nothing_tree_tree_tree_bool_bool,/* imported_module_or_decl */
+- debug_false_tree_charstarstar_uhwistar,/* die_ref_for_decl */
+- debug_nothing_tree_charstar_uhwi, /* register_external_die */
+- debug_nothing_tree, /* deferred_inline_function */
+- debug_nothing_tree, /* outlining_inline_function */
+- debug_nothing_rtx_code_label, /* label */
+- dbxout_handle_pch, /* handle_pch */
+- debug_nothing_rtx_insn, /* var_location */
+- debug_nothing_tree, /* inline_entry */
+- debug_nothing_tree, /* size_function */
+- dbxout_switch_text_section, /* switch_text_section */
+- debug_nothing_tree_tree, /* set_name */
+- 0, /* start_end_main_source_file */
+- TYPE_SYMTAB_IS_ADDRESS /* tree_type_symtab_field */
+-};
+-#endif /* DBX_DEBUGGING_INFO */
+-
+-#if defined (XCOFF_DEBUGGING_INFO)
+-const struct gcc_debug_hooks xcoff_debug_hooks =
+-{
+- dbxout_init,
+- dbxout_finish,
+- debug_nothing_charstar,
+- debug_nothing_void,
+- debug_nothing_int_charstar,
+- debug_nothing_int_charstar,
+- dbxout_start_source_file,
+- dbxout_end_source_file,
+- xcoffout_begin_block,
+- xcoffout_end_block,
+- debug_true_const_tree, /* ignore_block */
+- xcoffout_source_line,
+- debug_nothing_int_int_charstar, /* set_ignored_loc */
+- xcoffout_begin_prologue, /* begin_prologue */
+- debug_nothing_int_charstar, /* end_prologue */
+- debug_nothing_int_charstar, /* begin_epilogue */
+- xcoffout_end_epilogue,
+- debug_nothing_tree, /* begin_function */
+- xcoffout_end_function,
+- debug_nothing_tree, /* register_main_translation_unit */
+- debug_nothing_tree, /* function_decl */
+- dbxout_early_global_decl, /* early_global_decl */
+- dbxout_late_global_decl, /* late_global_decl */
+- dbxout_type_decl, /* type_decl */
+- debug_nothing_tree_tree_tree_bool_bool,/* imported_module_or_decl */
+- debug_false_tree_charstarstar_uhwistar,/* die_ref_for_decl */
+- debug_nothing_tree_charstar_uhwi, /* register_external_die */
+- debug_nothing_tree, /* deferred_inline_function */
+- debug_nothing_tree, /* outlining_inline_function */
+- debug_nothing_rtx_code_label, /* label */
+- dbxout_handle_pch, /* handle_pch */
+- debug_nothing_rtx_insn, /* var_location */
+- debug_nothing_tree, /* inline_entry */
+- debug_nothing_tree, /* size_function */
+- debug_nothing_void, /* switch_text_section */
+- debug_nothing_tree_tree, /* set_name */
+- 0, /* start_end_main_source_file */
+- TYPE_SYMTAB_IS_ADDRESS /* tree_type_symtab_field */
+-};
+-#endif /* XCOFF_DEBUGGING_INFO */
+-
+-/* Numeric formatting helper macro. Note that this does not handle
+- hexadecimal. */
+-#define NUMBER_FMT_LOOP(P, NUM, BASE) \
+- do \
+- { \
+- int digit = NUM % BASE; \
+- NUM /= BASE; \
+- *--P = digit + '0'; \
+- } \
+- while (NUM > 0)
+-
+-/* Utility: write a decimal integer NUM to asm_out_file. */
+-void
+-dbxout_int (int num)
+-{
+- char buf[64];
+- char *p = buf + sizeof buf;
+- unsigned int unum;
+-
+- if (num == 0)
+- {
+- putc ('0', asm_out_file);
+- return;
+- }
+- if (num < 0)
+- {
+- putc ('-', asm_out_file);
+- unum = -(unsigned int) num;
+- }
+- else
+- unum = num;
+-
+- NUMBER_FMT_LOOP (p, unum, 10);
+-
+- while (p < buf + sizeof buf)
+- {
+- putc (*p, asm_out_file);
+- p++;
+- }
+-}
+-
+-
+-/* Primitives for emitting simple stabs directives. All other stabs
+- routines should use these functions instead of directly emitting
+- stabs. They are exported because machine-dependent code may need
+- to invoke them, e.g. in a DBX_OUTPUT_* macro whose definition
+- forwards to code in CPU.c. */
+-
+-/* The following functions should all be called immediately after one
+- of the dbxout_begin_stab* functions (below). They write out
+- various things as the value of a stab. */
+-
+-/* Write out a literal zero as the value of a stab. */
+-void
+-dbxout_stab_value_zero (void)
+-{
+- fputs ("0\n", asm_out_file);
+-}
+-
+-/* Write out the label LABEL as the value of a stab. */
+-void
+-dbxout_stab_value_label (const char *label)
+-{
+- assemble_name (asm_out_file, label);
+- putc ('\n', asm_out_file);
+-}
+-
+-/* Write out the difference of two labels, LABEL - BASE, as the value
+- of a stab. */
+-void
+-dbxout_stab_value_label_diff (const char *label, const char *base)
+-{
+- assemble_name (asm_out_file, label);
+- putc ('-', asm_out_file);
+- assemble_name (asm_out_file, base);
+- putc ('\n', asm_out_file);
+-}
+-
+-/* Write out an internal label as the value of a stab, and immediately
+- emit that internal label. This should be used only when
+- dbxout_stabd will not work. STEM is the name stem of the label,
+- COUNTERP is a pointer to a counter variable which will be used to
+- guarantee label uniqueness. */
+-void
+-dbxout_stab_value_internal_label (const char *stem, int *counterp)
+-{
+- char label[100];
+- int counter = counterp ? (*counterp)++ : 0;
+-
+- ASM_GENERATE_INTERNAL_LABEL (label, stem, counter);
+- dbxout_stab_value_label (label);
+- targetm.asm_out.internal_label (asm_out_file, stem, counter);
+-}
+-
+-/* Write out the difference between BASE and an internal label as the
+- value of a stab, and immediately emit that internal label. STEM and
+- COUNTERP are as for dbxout_stab_value_internal_label. */
+-void
+-dbxout_stab_value_internal_label_diff (const char *stem, int *counterp,
+- const char *base)
+-{
+- char label[100];
+- int counter = counterp ? (*counterp)++ : 0;
+-
+- ASM_GENERATE_INTERNAL_LABEL (label, stem, counter);
+- dbxout_stab_value_label_diff (label, base);
+- targetm.asm_out.internal_label (asm_out_file, stem, counter);
+-}
+-
+-/* The following functions produce specific kinds of stab directives. */
+-
+-/* Write a .stabd directive with type STYPE and desc SDESC to asm_out_file. */
+-void
+-dbxout_stabd (int stype, int sdesc)
+-{
+- fputs (ASM_STABD_OP, asm_out_file);
+- dbxout_int (stype);
+- fputs (",0,", asm_out_file);
+- dbxout_int (sdesc);
+- putc ('\n', asm_out_file);
+-}
+-
+-/* Write a .stabn directive with type STYPE. This function stops
+- short of emitting the value field, which is the responsibility of
+- the caller (normally it will be either a symbol or the difference
+- of two symbols). */
+-
+-void
+-dbxout_begin_stabn (int stype)
+-{
+- fputs (ASM_STABN_OP, asm_out_file);
+- dbxout_int (stype);
+- fputs (",0,0,", asm_out_file);
+-}
+-
+-/* Write a .stabn directive with type N_SLINE and desc LINE. As above,
+- the value field is the responsibility of the caller. */
+-void
+-dbxout_begin_stabn_sline (int lineno)
+-{
+- fputs (ASM_STABN_OP, asm_out_file);
+- dbxout_int (N_SLINE);
+- fputs (",0,", asm_out_file);
+- dbxout_int (lineno);
+- putc (',', asm_out_file);
+-}
+-
+-/* Begin a .stabs directive with string "", type STYPE, and desc and
+- other fields 0. The value field is the responsibility of the
+- caller. This function cannot be used for .stabx directives. */
+-void
+-dbxout_begin_empty_stabs (int stype)
+-{
+- fputs (ASM_STABS_OP, asm_out_file);
+- fputs ("\"\",", asm_out_file);
+- dbxout_int (stype);
+- fputs (",0,0,", asm_out_file);
+-}
+-
+-/* Begin a .stabs directive with string STR, type STYPE, and desc 0.
+- The value field is the responsibility of the caller. */
+-void
+-dbxout_begin_simple_stabs (const char *str, int stype)
+-{
+- fputs (ASM_STABS_OP, asm_out_file);
+- output_quoted_string (asm_out_file, str);
+- putc (',', asm_out_file);
+- dbxout_int (stype);
+- fputs (",0,0,", asm_out_file);
+-}
+-
+-/* As above but use SDESC for the desc field. */
+-void
+-dbxout_begin_simple_stabs_desc (const char *str, int stype, int sdesc)
+-{
+- fputs (ASM_STABS_OP, asm_out_file);
+- output_quoted_string (asm_out_file, str);
+- putc (',', asm_out_file);
+- dbxout_int (stype);
+- fputs (",0,", asm_out_file);
+- dbxout_int (sdesc);
+- putc (',', asm_out_file);
+-}
+-
+-/* The next set of functions are entirely concerned with production of
+- "complex" .stabs directives: that is, .stabs directives whose
+- strings have to be constructed piecemeal. dbxout_type,
+- dbxout_symbol, etc. use these routines heavily. The string is queued
+- up in an obstack, then written out by dbxout_finish_complex_stabs, which
+- is also responsible for splitting it up if it exceeds DBX_CONTIN_LENGTH.
+- (You might think it would be more efficient to go straight to stdio
+- when DBX_CONTIN_LENGTH is 0 (i.e. no length limit) but that turns
+- out not to be the case, and anyway this needs fewer #ifdefs.) */
+-
+-/* Begin a complex .stabs directive. If we can, write the initial
+- ASM_STABS_OP to the asm_out_file. */
+-
+-static void
+-dbxout_begin_complex_stabs (void)
+-{
+- emit_pending_bincls_if_required ();
+- FORCE_TEXT;
+- fputs (ASM_STABS_OP, asm_out_file);
+- putc ('"', asm_out_file);
+- gcc_assert (stabstr_last_contin_point == 0);
+-}
+-
+-/* As above, but do not force text or emit pending bincls. This is
+- used by dbxout_symbol_location, which needs to do something else. */
+-static void
+-dbxout_begin_complex_stabs_noforcetext (void)
+-{
+- fputs (ASM_STABS_OP, asm_out_file);
+- putc ('"', asm_out_file);
+- gcc_assert (stabstr_last_contin_point == 0);
+-}
+-
+-/* Add CHR, a single character, to the string being built. */
+-#define stabstr_C(chr) obstack_1grow (&stabstr_ob, chr)
+-
+-/* Add STR, a normal C string, to the string being built. */
+-#define stabstr_S(str) obstack_grow (&stabstr_ob, str, strlen (str))
+-
+-/* Add the text of ID, an IDENTIFIER_NODE, to the string being built. */
+-#define stabstr_I(id) obstack_grow (&stabstr_ob, \
+- IDENTIFIER_POINTER (id), \
+- IDENTIFIER_LENGTH (id))
+-
+-/* Add NUM, a signed decimal number, to the string being built. */
+-static void
+-stabstr_D (HOST_WIDE_INT num)
+-{
+- char buf[64];
+- char *p = buf + sizeof buf;
+- unsigned HOST_WIDE_INT unum;
+-
+- if (num == 0)
+- {
+- stabstr_C ('0');
+- return;
+- }
+- if (num < 0)
+- {
+- stabstr_C ('-');
+- unum = -(unsigned HOST_WIDE_INT) num;
+- }
+- else
+- unum = num;
+-
+- NUMBER_FMT_LOOP (p, unum, 10);
+-
+- obstack_grow (&stabstr_ob, p, (buf + sizeof buf) - p);
+-}
+-
+-/* Add NUM, an unsigned decimal number, to the string being built. */
+-static void
+-stabstr_U (unsigned HOST_WIDE_INT num)
+-{
+- char buf[64];
+- char *p = buf + sizeof buf;
+- if (num == 0)
+- {
+- stabstr_C ('0');
+- return;
+- }
+- NUMBER_FMT_LOOP (p, num, 10);
+- obstack_grow (&stabstr_ob, p, (buf + sizeof buf) - p);
+-}
+-
+-/* Add CST, an INTEGER_CST tree, to the string being built as an
+- unsigned octal number. This routine handles values which are
+- larger than a single HOST_WIDE_INT. */
+-static void
+-stabstr_O (tree cst)
+-{
+- int prec = TYPE_PRECISION (TREE_TYPE (cst));
+- int res_pres = prec % 3;
+- int i;
+- unsigned int digit;
+-
+- /* Leading zero for base indicator. */
+- stabstr_C ('0');
+-
+- /* If the value is zero, the base indicator will serve as the value
+- all by itself. */
+- if (wi::to_wide (cst) == 0)
+- return;
+-
+- /* GDB wants constants with no extra leading "1" bits, so
+- we need to remove any sign-extension that might be
+- present. */
+- if (res_pres == 1)
+- {
+- digit = wi::extract_uhwi (wi::to_wide (cst), prec - 1, 1);
+- stabstr_C ('0' + digit);
+- }
+- else if (res_pres == 2)
+- {
+- digit = wi::extract_uhwi (wi::to_wide (cst), prec - 2, 2);
+- stabstr_C ('0' + digit);
+- }
+-
+- prec -= res_pres;
+- for (i = prec - 3; i >= 0; i = i - 3)
+- {
+- digit = wi::extract_uhwi (wi::to_wide (cst), i, 3);
+- stabstr_C ('0' + digit);
+- }
+-}
+-
+-/* Called whenever it is safe to break a stabs string into multiple
+- .stabs directives. If the current string has exceeded the limit
+- set by DBX_CONTIN_LENGTH, mark the current position in the buffer
+- as a continuation point by inserting DBX_CONTIN_CHAR (doubled if
+- it is a backslash) and a null character. */
+-static inline void
+-stabstr_continue (void)
+-{
+- if (DBX_CONTIN_LENGTH > 0
+- && obstack_object_size (&stabstr_ob) - stabstr_last_contin_point
+- > DBX_CONTIN_LENGTH)
+- {
+- if (DBX_CONTIN_CHAR == '\\')
+- obstack_1grow (&stabstr_ob, '\\');
+- obstack_1grow (&stabstr_ob, DBX_CONTIN_CHAR);
+- obstack_1grow (&stabstr_ob, '\0');
+- stabstr_last_contin_point = obstack_object_size (&stabstr_ob);
+- }
+-}
+-#define CONTIN stabstr_continue ()
+-
+-/* Macro subroutine of dbxout_finish_complex_stabs, which emits
+- all of the arguments to the .stabs directive after the string.
+- Overridden by xcoffout.h. CODE is the stabs code for this symbol;
+- LINE is the source line to write into the desc field (in extended
+- mode); SYM is the symbol itself.
+-
+- ADDR, LABEL, and NUMBER are three different ways to represent the
+- stabs value field. At most one of these should be nonzero.
+-
+- ADDR is used most of the time; it represents the value as an
+- RTL address constant.
+-
+- LABEL is used (currently) only for N_CATCH stabs; it represents
+- the value as a string suitable for assemble_name.
+-
+- NUMBER is used when the value is an offset from an implicit base
+- pointer (e.g. for a stack variable), or an index (e.g. for a
+- register variable). It represents the value as a decimal integer. */
+-
+-#ifndef DBX_FINISH_STABS
+-#define DBX_FINISH_STABS(SYM, CODE, LINE, ADDR, LABEL, NUMBER) \
+-do { \
+- int line_ = use_gnu_debug_info_extensions ? LINE : 0; \
+- \
+- dbxout_int (CODE); \
+- fputs (",0,", asm_out_file); \
+- dbxout_int (line_); \
+- putc (',', asm_out_file); \
+- if (ADDR) \
+- output_addr_const (asm_out_file, ADDR); \
+- else if (LABEL) \
+- assemble_name (asm_out_file, LABEL); \
+- else \
+- dbxout_int (NUMBER); \
+- putc ('\n', asm_out_file); \
+-} while (0)
+-#endif
+-
+-/* Finish the emission of a complex .stabs directive. When DBX_CONTIN_LENGTH
+- is zero, this has only to emit the close quote and the remainder of
+- the arguments. When it is nonzero, the string has been marshalled in
+- stabstr_ob, and this routine is responsible for breaking it up into
+- DBX_CONTIN_LENGTH-sized chunks.
+-
+- SYM is the DECL of the symbol under consideration; it is used only
+- for its DECL_SOURCE_LINE. The other arguments are all passed directly
+- to DBX_FINISH_STABS; see above for details. */
+-
+-static void
+-dbxout_finish_complex_stabs (tree sym, stab_code_type code,
+- rtx addr, const char *label, int number)
+-{
+- int line ATTRIBUTE_UNUSED;
+- char *str;
+- size_t len;
+-
+- line = sym ? DECL_SOURCE_LINE (sym) : 0;
+- if (DBX_CONTIN_LENGTH > 0)
+- {
+- char *chunk;
+- size_t chunklen;
+-
+- /* Nul-terminate the growing string, then get its size and
+- address. */
+- obstack_1grow (&stabstr_ob, '\0');
+-
+- len = obstack_object_size (&stabstr_ob);
+- chunk = str = XOBFINISH (&stabstr_ob, char *);
+-
+- /* Within the buffer are a sequence of NUL-separated strings,
+- each of which is to be written out as a separate stab
+- directive. */
+- for (;;)
+- {
+- chunklen = strlen (chunk);
+- fwrite (chunk, 1, chunklen, asm_out_file);
+- fputs ("\",", asm_out_file);
+-
+- /* Must add an extra byte to account for the NUL separator. */
+- chunk += chunklen + 1;
+- len -= chunklen + 1;
+-
+- /* Only put a line number on the last stab in the sequence. */
+- DBX_FINISH_STABS (sym, code, len == 0 ? line : 0,
+- addr, label, number);
+- if (len == 0)
+- break;
+-
+- fputs (ASM_STABS_OP, asm_out_file);
+- putc ('"', asm_out_file);
+- }
+- stabstr_last_contin_point = 0;
+- }
+- else
+- {
+- /* No continuations - we can put the whole string out at once.
+- It is faster to augment the string with the close quote and
+- comma than to do a two-character fputs. */
+- obstack_grow (&stabstr_ob, "\",", 2);
+- len = obstack_object_size (&stabstr_ob);
+- str = XOBFINISH (&stabstr_ob, char *);
+-
+- fwrite (str, 1, len, asm_out_file);
+- DBX_FINISH_STABS (sym, code, line, addr, label, number);
+- }
+- obstack_free (&stabstr_ob, str);
+-}
+-
+-#if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
+-
+-/* When -gused is used, emit debug info for only used symbols. But in
+- addition to the standard intercepted debug_hooks there are some
+- direct calls into this file, i.e., dbxout_symbol, dbxout_parms, and
+- dbxout_reg_params. Those routines may also be called from a higher
+- level intercepted routine. So to prevent recording data for an inner
+- call to one of these for an intercept, we maintain an intercept
+- nesting counter (debug_nesting). We only save the intercepted
+- arguments if the nesting is 1. */
+-static int debug_nesting = 0;
+-
+-static tree *symbol_queue;
+-static int symbol_queue_index = 0;
+-static int symbol_queue_size = 0;
+-
+-#define DBXOUT_DECR_NESTING \
+- if (--debug_nesting == 0 && symbol_queue_index > 0) \
+- { emit_pending_bincls_if_required (); debug_flush_symbol_queue (); }
+-
+-#define DBXOUT_DECR_NESTING_AND_RETURN(x) \
+- do {--debug_nesting; return (x);} while (0)
+-
+-#endif /* DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO */
+-
+-#if defined (DBX_DEBUGGING_INFO)
+-
+-static void
+-dbxout_function_end (tree decl ATTRIBUTE_UNUSED)
+-{
+- char lscope_label_name[100];
+-
+- /* The Lscope label must be emitted even if we aren't doing anything
+- else; dbxout_block needs it. */
+- switch_to_section (current_function_section ());
+-
+- /* Convert Lscope into the appropriate format for local labels in case
+- the system doesn't insert underscores in front of user generated
+- labels. */
+- ASM_GENERATE_INTERNAL_LABEL (lscope_label_name, "Lscope", scope_labelno);
+- targetm.asm_out.internal_label (asm_out_file, "Lscope", scope_labelno);
+-
+- /* The N_FUN tag at the end of the function is a GNU extension,
+- which may be undesirable, and is unnecessary if we do not have
+- named sections. */
+- if (!use_gnu_debug_info_extensions
+- || NO_DBX_FUNCTION_END
+- || !targetm_common.have_named_sections)
+- return;
+-
+- /* By convention, GCC will mark the end of a function with an N_FUN
+- symbol and an empty string. */
+- if (crtl->has_bb_partition)
+- {
+- dbxout_begin_empty_stabs (N_FUN);
+- if (in_cold_section_p)
+- dbxout_stab_value_label_diff (crtl->subsections.cold_section_end_label,
+- crtl->subsections.cold_section_label);
+- else
+- dbxout_stab_value_label_diff (crtl->subsections.hot_section_end_label,
+- crtl->subsections.hot_section_label);
+- }
+- else
+- {
+- char begin_label[20];
+- /* Reference current function start using LFBB. */
+- ASM_GENERATE_INTERNAL_LABEL (begin_label, "LFBB", scope_labelno);
+- dbxout_begin_empty_stabs (N_FUN);
+- dbxout_stab_value_label_diff (lscope_label_name, begin_label);
+- }
+-
+- if (!NO_DBX_BNSYM_ENSYM && !flag_debug_only_used_symbols)
+- dbxout_stabd (N_ENSYM, 0);
+-}
+-#endif /* DBX_DEBUGGING_INFO */
+-
+-/* Get lang description for N_SO stab. */
+-static unsigned int ATTRIBUTE_UNUSED
+-get_lang_number (void)
+-{
+- const char *language_string = lang_hooks.name;
+- if (lang_GNU_C ())
+- return N_SO_C;
+- else if (lang_GNU_CXX ())
+- return N_SO_CC;
+- else if (strcmp (language_string, "GNU F77") == 0)
+- return N_SO_FORTRAN;
+- else if (lang_GNU_Fortran ())
+- return N_SO_FORTRAN90; /* CHECKME */
+- else if (strcmp (language_string, "GNU Objective-C") == 0)
+- return N_SO_OBJC;
+- else if (strcmp (language_string, "GNU Objective-C++") == 0)
+- return N_SO_OBJCPLUS;
+- else
+- return 0;
+-
+-}
+-
+-static bool
+-is_fortran (void)
+-{
+- unsigned int lang = get_lang_number ();
+-
+- return (lang == N_SO_FORTRAN) || (lang == N_SO_FORTRAN90);
+-}
+-
+-/* At the beginning of compilation, start writing the symbol table.
+- Initialize `typevec' and output the standard data types of C. */
+-
+-static void
+-dbxout_init (const char *input_file_name)
+-{
+- char ltext_label_name[100];
+- bool used_ltext_label_name = false;
+- tree syms = lang_hooks.decls.getdecls ();
+- const char *mapped_name;
+-
+- typevec_len = 100;
+- typevec = ggc_cleared_vec_alloc<typeinfo> (typevec_len);
+-
+- /* stabstr_ob contains one string, which will be just fine with
+- 1-byte alignment. */
+- obstack_specify_allocation (&stabstr_ob, 0, 1, xmalloc, free);
+-
+- /* Convert Ltext into the appropriate format for local labels in case
+- the system doesn't insert underscores in front of user generated
+- labels. */
+- ASM_GENERATE_INTERNAL_LABEL (ltext_label_name, "Ltext", 0);
+-
+- /* Put the current working directory in an N_SO symbol. */
+- if (use_gnu_debug_info_extensions && !NO_DBX_MAIN_SOURCE_DIRECTORY)
+- {
+- static const char *cwd;
+-
+- if (!cwd)
+- {
+- cwd = get_src_pwd ();
+- if (cwd[0] == '\0')
+- cwd = "/";
+- else if (!IS_DIR_SEPARATOR (cwd[strlen (cwd) - 1]))
+- cwd = concat (cwd, "/", NULL);
+- cwd = remap_debug_filename (cwd);
+- }
+-#ifdef DBX_OUTPUT_MAIN_SOURCE_DIRECTORY
+- DBX_OUTPUT_MAIN_SOURCE_DIRECTORY (asm_out_file, cwd);
+-#else /* no DBX_OUTPUT_MAIN_SOURCE_DIRECTORY */
+- dbxout_begin_simple_stabs_desc (cwd, N_SO, get_lang_number ());
+- dbxout_stab_value_label (ltext_label_name);
+- used_ltext_label_name = true;
+-#endif /* no DBX_OUTPUT_MAIN_SOURCE_DIRECTORY */
+- }
+-
+- mapped_name = remap_debug_filename (input_file_name);
+-#ifdef DBX_OUTPUT_MAIN_SOURCE_FILENAME
+- DBX_OUTPUT_MAIN_SOURCE_FILENAME (asm_out_file, mapped_name);
+-#else
+- dbxout_begin_simple_stabs_desc (mapped_name, N_SO, get_lang_number ());
+- dbxout_stab_value_label (ltext_label_name);
+- used_ltext_label_name = true;
+-#endif
+-
+- if (used_ltext_label_name)
+- {
+- switch_to_section (text_section);
+- targetm.asm_out.internal_label (asm_out_file, "Ltext", 0);
+- }
+-
+- /* Emit an N_OPT stab to indicate that this file was compiled by GCC.
+- The string used is historical. */
+-#ifndef NO_DBX_GCC_MARKER
+- dbxout_begin_simple_stabs ("gcc2_compiled.", N_OPT);
+- dbxout_stab_value_zero ();
+-#endif
+-
+- base_input_file = lastfile = input_file_name;
+-
+- next_type_number = 1;
+-
+-#ifdef DBX_USE_BINCL
+- current_file = XNEW (struct dbx_file);
+- current_file->next = NULL;
+- current_file->file_number = 0;
+- current_file->next_type_number = 1;
+- next_file_number = 1;
+- current_file->prev = NULL;
+- current_file->bincl_status = BINCL_NOT_REQUIRED;
+- current_file->pending_bincl_name = NULL;
+-#endif
+-
+- /* Get all permanent types that have typedef names, and output them
+- all, except for those already output. Some language front ends
+- put these declarations in the top-level scope; some do not;
+- the latter are responsible for calling debug_hooks->type_decl from
+- their record_builtin_type function. */
+- dbxout_typedefs (syms);
+-
+- if (preinit_symbols)
+- {
+- tree t;
+- for (t = nreverse (preinit_symbols); t; t = TREE_CHAIN (t))
+- dbxout_symbol (TREE_VALUE (t), 0);
+- preinit_symbols = 0;
+- }
+-}
+-
+-/* Output any typedef names for types described by TYPE_DECLs in SYMS. */
+-
+-static void
+-dbxout_typedefs (tree syms)
+-{
+- for (; syms != NULL_TREE; syms = DECL_CHAIN (syms))
+- {
+- if (TREE_CODE (syms) == TYPE_DECL)
+- {
+- tree type = TREE_TYPE (syms);
+- if (TYPE_NAME (type)
+- && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
+- && COMPLETE_OR_VOID_TYPE_P (type)
+- && ! TREE_ASM_WRITTEN (TYPE_NAME (type)))
+- dbxout_symbol (TYPE_NAME (type), 0);
+- }
+- }
+-}
+-
+-#ifdef DBX_USE_BINCL
+-/* Emit BINCL stab using given name. */
+-static void
+-emit_bincl_stab (const char *name)
+-{
+- dbxout_begin_simple_stabs (name, N_BINCL);
+- dbxout_stab_value_zero ();
+-}
+-
+-/* If there are pending bincls then it is time to emit all of them. */
+-
+-static inline void
+-emit_pending_bincls_if_required (void)
+-{
+- if (pending_bincls)
+- emit_pending_bincls ();
+-}
+-
+-/* Emit all pending bincls. */
+-
+-static void
+-emit_pending_bincls (void)
+-{
+- struct dbx_file *f = current_file;
+-
+- /* Find first pending bincl. */
+- while (f->bincl_status == BINCL_PENDING)
+- f = f->next;
+-
+- /* Now emit all bincls. */
+- f = f->prev;
+-
+- while (f)
+- {
+- if (f->bincl_status == BINCL_PENDING)
+- {
+- emit_bincl_stab (f->pending_bincl_name);
+-
+- /* Update file number and status. */
+- f->file_number = next_file_number++;
+- f->bincl_status = BINCL_PROCESSED;
+- }
+- if (f == current_file)
+- break;
+- f = f->prev;
+- }
+-
+- /* All pending bincls have been emitted. */
+- pending_bincls = 0;
+-}
+-
+-#else
+-
+-static inline void
+-emit_pending_bincls_if_required (void) {}
+-#endif
+-
+-/* Change to reading from a new source file. Generate a N_BINCL stab. */
+-
+-static void
+-dbxout_start_source_file (unsigned int line ATTRIBUTE_UNUSED,
+- const char *filename ATTRIBUTE_UNUSED)
+-{
+-#ifdef DBX_USE_BINCL
+- struct dbx_file *n = XNEW (struct dbx_file);
+-
+- n->next = current_file;
+- n->next_type_number = 1;
+- /* Do not assign file number now.
+- Delay it until we actually emit BINCL. */
+- n->file_number = 0;
+- n->prev = NULL;
+- current_file->prev = n;
+- n->bincl_status = BINCL_PENDING;
+- n->pending_bincl_name = remap_debug_filename (filename);
+- pending_bincls = 1;
+- current_file = n;
+-#endif
+-}
+-
+-/* Revert to reading a previous source file. Generate a N_EINCL stab. */
+-
+-static void
+-dbxout_end_source_file (unsigned int line ATTRIBUTE_UNUSED)
+-{
+-#ifdef DBX_USE_BINCL
+- /* Emit EINCL stab only if BINCL is not pending. */
+- if (current_file->bincl_status == BINCL_PROCESSED)
+- {
+- dbxout_begin_stabn (N_EINCL);
+- dbxout_stab_value_zero ();
+- }
+- current_file->bincl_status = BINCL_NOT_REQUIRED;
+- current_file = current_file->next;
+-#endif
+-}
+-
+-/* Handle a few odd cases that occur when trying to make PCH files work. */
+-
+-static void
+-dbxout_handle_pch (unsigned at_end)
+-{
+- if (! at_end)
+- {
+- /* When using the PCH, this file will be included, so we need to output
+- a BINCL. */
+- dbxout_start_source_file (0, lastfile);
+-
+- /* The base file when using the PCH won't be the same as
+- the base file when it's being generated. */
+- lastfile = NULL;
+- }
+- else
+- {
+- /* ... and an EINCL. */
+- dbxout_end_source_file (0);
+-
+- /* Deal with cases where 'lastfile' was never actually changed. */
+- lastfile_is_base = lastfile == NULL;
+- }
+-}
+-
+-#if defined (DBX_DEBUGGING_INFO)
+-
+-static bool dbxout_block (tree, int, tree, int);
+-
+-/* Output debugging info to FILE to switch to sourcefile FILENAME. */
+-
+-static void
+-dbxout_source_file (const char *filename)
+-{
+- if (lastfile == 0 && lastfile_is_base)
+- {
+- lastfile = base_input_file;
+- lastfile_is_base = 0;
+- }
+-
+- if (filename && (lastfile == 0 || strcmp (filename, lastfile)))
+- {
+- /* Don't change section amid function. */
+- if (current_function_decl == NULL_TREE)
+- switch_to_section (text_section);
+-
+- dbxout_begin_simple_stabs (remap_debug_filename (filename), N_SOL);
+- dbxout_stab_value_internal_label ("Ltext", &source_label_number);
+- lastfile = filename;
+- }
+-}
+-
+-/* Output N_BNSYM, line number symbol entry, and local symbol at
+- function scope */
+-
+-static void
+-dbxout_begin_prologue (unsigned int lineno,
+- unsigned int column ATTRIBUTE_UNUSED,
+- const char *filename)
+-{
+- if (use_gnu_debug_info_extensions
+- && !NO_DBX_FUNCTION_END
+- && !NO_DBX_BNSYM_ENSYM
+- && !flag_debug_only_used_symbols)
+- dbxout_stabd (N_BNSYM, 0);
+-
+- /* pre-increment the scope counter */
+- scope_labelno++;
+-
+- dbxout_source_line (lineno, 0, filename, 0, true);
+- /* Output function begin block at function scope, referenced
+- by dbxout_block, dbxout_source_line and dbxout_function_end. */
+- emit_pending_bincls_if_required ();
+- targetm.asm_out.internal_label (asm_out_file, "LFBB", scope_labelno);
+-}
+-
+-/* Output a line number symbol entry for source file FILENAME and line
+- number LINENO. */
+-
+-static void
+-dbxout_source_line (unsigned int lineno, unsigned int column ATTRIBUTE_UNUSED,
+- const char *filename, int discriminator ATTRIBUTE_UNUSED,
+- bool is_stmt ATTRIBUTE_UNUSED)
+-{
+- dbxout_source_file (filename);
+-
+-#ifdef DBX_OUTPUT_SOURCE_LINE
+- DBX_OUTPUT_SOURCE_LINE (asm_out_file, lineno, dbxout_source_line_counter);
+-#else
+- if (DBX_LINES_FUNCTION_RELATIVE)
+- {
+- char begin_label[20];
+- dbxout_begin_stabn_sline (lineno);
+- /* Reference current function start using LFBB. */
+- ASM_GENERATE_INTERNAL_LABEL (begin_label, "LFBB", scope_labelno);
+- dbxout_stab_value_internal_label_diff ("LM", &dbxout_source_line_counter,
+- begin_label);
+- }
+- else
+- dbxout_stabd (N_SLINE, lineno);
+-#endif
+- lastlineno = lineno;
+-}
+-
+-/* Unfortunately, at least when emitting relative addresses, STABS
+- has no way to express multiple partitions. Represent a function
+- as two functions in this case. */
+-
+-static void
+-dbxout_switch_text_section (void)
+-{
+- /* The N_FUN tag at the end of the function is a GNU extension,
+- which may be undesirable, and is unnecessary if we do not have
+- named sections. */
+- in_cold_section_p = !in_cold_section_p;
+- switch_to_section (current_function_section ());
+- dbxout_block (DECL_INITIAL (current_function_decl), 0,
+- DECL_ARGUMENTS (current_function_decl), -1);
+- dbxout_function_end (current_function_decl);
+- in_cold_section_p = !in_cold_section_p;
+-
+- switch_to_section (current_function_section ());
+-
+- tree context = decl_function_context (current_function_decl);
+- extern tree cold_function_name;
+-
+- dbxout_begin_complex_stabs ();
+- stabstr_I (cold_function_name);
+- stabstr_S (":f");
+-
+- tree type = TREE_TYPE (current_function_decl);
+- if (TREE_TYPE (type))
+- dbxout_type (TREE_TYPE (type), 0);
+- else
+- dbxout_type (void_type_node, 0);
+-
+- if (context != 0)
+- {
+- stabstr_C (',');
+- stabstr_I (cold_function_name);
+- stabstr_C (',');
+- stabstr_I (DECL_NAME (context));
+- }
+-
+- dbxout_finish_complex_stabs (current_function_decl, N_FUN, 0,
+- crtl->subsections.cold_section_label, 0);
+-
+- /* pre-increment the scope counter */
+- scope_labelno++;
+-
+- dbxout_source_line (lastlineno, 0, lastfile, 0, true);
+- /* Output function begin block at function scope, referenced
+- by dbxout_block, dbxout_source_line and dbxout_function_end. */
+- emit_pending_bincls_if_required ();
+- targetm.asm_out.internal_label (asm_out_file, "LFBB", scope_labelno);
+-}
+-
+-/* Describe the beginning of an internal block within a function. */
+-
+-static void
+-dbxout_begin_block (unsigned int line ATTRIBUTE_UNUSED, unsigned int n)
+-{
+- emit_pending_bincls_if_required ();
+- targetm.asm_out.internal_label (asm_out_file, "LBB", n);
+-}
+-
+-/* Describe the end line-number of an internal block within a function. */
+-
+-static void
+-dbxout_end_block (unsigned int line ATTRIBUTE_UNUSED, unsigned int n)
+-{
+- emit_pending_bincls_if_required ();
+- targetm.asm_out.internal_label (asm_out_file, "LBE", n);
+-}
+-
+-/* Output dbx data for a function definition.
+- This includes a definition of the function name itself (a symbol),
+- definitions of the parameters (locating them in the parameter list)
+- and then output the block that makes up the function's body
+- (including all the auto variables of the function). */
+-
+-static void
+-dbxout_function_decl (tree decl)
+-{
+- emit_pending_bincls_if_required ();
+-#ifndef DBX_FUNCTION_FIRST
+- dbxout_begin_function (decl);
+-#endif
+- dbxout_block (DECL_INITIAL (decl), 0, DECL_ARGUMENTS (decl), -1);
+- dbxout_function_end (decl);
+-}
+-
+-#endif /* DBX_DEBUGGING_INFO */
+-
+-static void
+-dbxout_early_global_decl (tree decl ATTRIBUTE_UNUSED)
+-{
+- /* NYI for non-dwarf. */
+-}
+-
+-/* Debug information for a global DECL. Called from toplev.cc after
+- compilation proper has finished. */
+-static void
+-dbxout_late_global_decl (tree decl)
+-{
+- if (VAR_P (decl) && !DECL_EXTERNAL (decl))
+- {
+- int saved_tree_used = TREE_USED (decl);
+- TREE_USED (decl) = 1;
+- dbxout_symbol (decl, 0);
+- TREE_USED (decl) = saved_tree_used;
+- }
+-}
+-
+-/* This is just a function-type adapter; dbxout_symbol does exactly
+- what we want but returns an int. */
+-static void
+-dbxout_type_decl (tree decl, int local)
+-{
+- dbxout_symbol (decl, local);
+-}
+-
+-/* At the end of compilation, finish writing the symbol table.
+- The default is to call debug_free_queue but do nothing else. */
+-
+-static void
+-dbxout_finish (const char *filename ATTRIBUTE_UNUSED)
+-{
+-#ifdef DBX_OUTPUT_MAIN_SOURCE_FILE_END
+- DBX_OUTPUT_MAIN_SOURCE_FILE_END (asm_out_file, filename);
+-#elif defined DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
+- {
+- switch_to_section (text_section);
+- dbxout_begin_empty_stabs (N_SO);
+- dbxout_stab_value_internal_label ("Letext", 0);
+- }
+-#endif
+- debug_free_queue ();
+-}
+-
+-/* Output the index of a type. */
+-
+-static void
+-dbxout_type_index (tree type)
+-{
+-#ifndef DBX_USE_BINCL
+- stabstr_D (TYPE_SYMTAB_ADDRESS (type));
+-#else
+- struct typeinfo *t = &typevec[TYPE_SYMTAB_ADDRESS (type)];
+- stabstr_C ('(');
+- stabstr_D (t->file_number);
+- stabstr_C (',');
+- stabstr_D (t->type_number);
+- stabstr_C (')');
+-#endif
+-}
+-
+-
+-/* Generate the symbols for any queued up type symbols we encountered
+- while generating the type info for some originally used symbol.
+- This might generate additional entries in the queue. Only when
+- the nesting depth goes to 0 is this routine called. */
+-
+-static void
+-debug_flush_symbol_queue (void)
+-{
+- int i;
+-
+- /* Make sure that additionally queued items are not flushed
+- prematurely. */
+-
+- ++debug_nesting;
+-
+- for (i = 0; i < symbol_queue_index; ++i)
+- {
+- /* If we pushed queued symbols then such symbols must be
+- output no matter what anyone else says. Specifically,
+- we need to make sure dbxout_symbol() thinks the symbol was
+- used and also we need to override TYPE_DECL_SUPPRESS_DEBUG
+- which may be set for outside reasons. */
+- int saved_tree_used = TREE_USED (symbol_queue[i]);
+- int saved_suppress_debug = TYPE_DECL_SUPPRESS_DEBUG (symbol_queue[i]);
+- TREE_USED (symbol_queue[i]) = 1;
+- TYPE_DECL_SUPPRESS_DEBUG (symbol_queue[i]) = 0;
+-
+-#ifdef DBX_DEBUGGING_INFO
+- dbxout_symbol (symbol_queue[i], 0);
+-#endif
+-
+- TREE_USED (symbol_queue[i]) = saved_tree_used;
+- TYPE_DECL_SUPPRESS_DEBUG (symbol_queue[i]) = saved_suppress_debug;
+- }
+-
+- symbol_queue_index = 0;
+- --debug_nesting;
+-}
+-
+-/* Queue a type symbol needed as part of the definition of a decl
+- symbol. These symbols are generated when debug_flush_symbol_queue()
+- is called. */
+-
+-static void
+-debug_queue_symbol (tree decl)
+-{
+- if (symbol_queue_index >= symbol_queue_size)
+- {
+- symbol_queue_size += 10;
+- symbol_queue = XRESIZEVEC (tree, symbol_queue, symbol_queue_size);
+- }
+-
+- symbol_queue[symbol_queue_index++] = decl;
+-}
+-
+-/* Free symbol queue. */
+-static void
+-debug_free_queue (void)
+-{
+- if (symbol_queue)
+- {
+- free (symbol_queue);
+- symbol_queue = NULL;
+- symbol_queue_size = 0;
+- }
+-}
+-
+-/* Used in several places: evaluates to '0' for a private decl,
+- '1' for a protected decl, '2' for a public decl. */
+-#define DECL_ACCESSIBILITY_CHAR(DECL) \
+-(TREE_PRIVATE (DECL) ? '0' : TREE_PROTECTED (DECL) ? '1' : '2')
+-
+-/* Subroutine of `dbxout_type'. Output the type fields of TYPE.
+- This must be a separate function because anonymous unions require
+- recursive calls. */
+-
+-static void
+-dbxout_type_fields (tree type)
+-{
+- tree tem;
+-
+- /* Output the name, type, position (in bits), size (in bits) of each
+- field that we can support. */
+- for (tem = TYPE_FIELDS (type); tem; tem = DECL_CHAIN (tem))
+- {
+- /* If one of the nodes is an error_mark or its type is then
+- return early. */
+- if (error_operand_p (tem))
+- return;
+-
+- /* Omit here local type decls until we know how to support them. */
+- if (TREE_CODE (tem) == TYPE_DECL
+- || TREE_CODE (tem) == TEMPLATE_DECL
+- /* Member functions emitted after fields. */
+- || TREE_CODE (tem) == FUNCTION_DECL
+- /* Omit here the nameless fields that are used to skip bits. */
+- || DECL_IGNORED_P (tem)
+- /* Omit fields whose position or size are variable or too large to
+- represent. */
+- || (TREE_CODE (tem) == FIELD_DECL
+- && (! tree_fits_shwi_p (bit_position (tem))
+- || ! DECL_SIZE (tem)
+- || ! tree_fits_uhwi_p (DECL_SIZE (tem)))))
+- continue;
+-
+- else if (TREE_CODE (tem) != CONST_DECL)
+- {
+- /* Continue the line if necessary,
+- but not before the first field. */
+- if (tem != TYPE_FIELDS (type))
+- CONTIN;
+-
+- if (DECL_NAME (tem))
+- stabstr_I (DECL_NAME (tem));
+- stabstr_C (':');
+-
+- if (use_gnu_debug_info_extensions
+- && (TREE_PRIVATE (tem) || TREE_PROTECTED (tem)
+- || TREE_CODE (tem) != FIELD_DECL))
+- {
+- stabstr_C ('/');
+- stabstr_C (DECL_ACCESSIBILITY_CHAR (tem));
+- }
+-
+- dbxout_type ((TREE_CODE (tem) == FIELD_DECL
+- && DECL_BIT_FIELD_TYPE (tem))
+- ? DECL_BIT_FIELD_TYPE (tem) : TREE_TYPE (tem), 0);
+-
+- if (VAR_P (tem))
+- {
+- if (TREE_STATIC (tem) && use_gnu_debug_info_extensions)
+- {
+- tree name = DECL_ASSEMBLER_NAME (tem);
+-
+- stabstr_C (':');
+- stabstr_I (name);
+- stabstr_C (';');
+- }
+- else
+- /* If TEM is non-static, GDB won't understand it. */
+- stabstr_S (",0,0;");
+- }
+- else
+- {
+- stabstr_C (',');
+- stabstr_D (int_bit_position (tem));
+- stabstr_C (',');
+- stabstr_D (tree_to_uhwi (DECL_SIZE (tem)));
+- stabstr_C (';');
+- }
+- }
+- }
+-}
+-
+-/* Subroutine of `dbxout_type_methods'. Output debug info about the
+- method described DECL. */
+-
+-static void
+-dbxout_type_method_1 (tree decl)
+-{
+- char c1 = 'A', c2;
+-
+- if (TREE_CODE (TREE_TYPE (decl)) == FUNCTION_TYPE)
+- c2 = '?';
+- else /* it's a METHOD_TYPE. */
+- {
+- tree firstarg = TREE_VALUE (TYPE_ARG_TYPES (TREE_TYPE (decl)));
+- /* A for normal functions.
+- B for `const' member functions.
+- C for `volatile' member functions.
+- D for `const volatile' member functions. */
+- if (TYPE_READONLY (TREE_TYPE (firstarg)))
+- c1 += 1;
+- if (TYPE_VOLATILE (TREE_TYPE (firstarg)))
+- c1 += 2;
+-
+- if (DECL_VINDEX (decl))
+- c2 = '*';
+- else
+- c2 = '.';
+- }
+-
+- /* ??? Output the mangled name, which contains an encoding of the
+- method's type signature. May not be necessary anymore. */
+- stabstr_C (':');
+- stabstr_I (DECL_ASSEMBLER_NAME (decl));
+- stabstr_C (';');
+- stabstr_C (DECL_ACCESSIBILITY_CHAR (decl));
+- stabstr_C (c1);
+- stabstr_C (c2);
+-
+- if (DECL_VINDEX (decl) && tree_fits_shwi_p (DECL_VINDEX (decl)))
+- {
+- stabstr_D (tree_to_shwi (DECL_VINDEX (decl)));
+- stabstr_C (';');
+- dbxout_type (DECL_CONTEXT (decl), 0);
+- stabstr_C (';');
+- }
+-}
+-
+-/* Subroutine of `dbxout_type'. Output debug info about the member
+- functions defined in TYPE. */
+-
+-static void
+-dbxout_type_methods (tree type)
+-{
+- for (tree fndecl = TYPE_FIELDS (type); fndecl;)
+- {
+- int need_prefix = 1;
+-
+- /* Group together all the methods for the same operation.
+- These differ in the types of the arguments. */
+- for (tree last = NULL_TREE;
+- fndecl && (last == NULL_TREE || DECL_NAME (fndecl) == DECL_NAME (last));
+- fndecl = DECL_CHAIN (fndecl))
+- /* Output the name of the field (after overloading), as
+- well as the name of the field before overloading, along
+- with its parameter list */
+- {
+- /* Skip non-functions. */
+- if (TREE_CODE (fndecl) != FUNCTION_DECL)
+- continue;
+-
+- /* Also ignore abstract methods; those are only interesting to
+- the DWARF backends. */
+- if (DECL_IGNORED_P (fndecl) || DECL_ABSTRACT_P (fndecl))
+- continue;
+-
+- CONTIN;
+-
+- last = fndecl;
+-
+- /* Redundantly output the plain name, since that's what gdb
+- expects. */
+- if (need_prefix)
+- {
+- stabstr_I (DECL_NAME (fndecl));
+- stabstr_S ("::");
+- need_prefix = 0;
+- }
+-
+- dbxout_type (TREE_TYPE (fndecl), 0);
+- dbxout_type_method_1 (fndecl);
+- }
+- if (!need_prefix)
+- stabstr_C (';');
+- }
+-}
+-
+-/* Emit a "range" type specification, which has the form:
+- "r<index type>;<lower bound>;<upper bound>;".
+- TYPE is an INTEGER_TYPE, LOW and HIGH are the bounds. */
+-
+-static void
+-dbxout_range_type (tree type, tree low, tree high)
+-{
+- stabstr_C ('r');
+- if (TREE_TYPE (type))
+- dbxout_type (TREE_TYPE (type), 0);
+- else if (TREE_CODE (type) != INTEGER_TYPE)
+- dbxout_type (type, 0);
+- else
+- {
+- /* Traditionally, we made sure 'int' was type 1, and builtin types
+- were defined to be sub-ranges of int. Unfortunately, this
+- does not allow us to distinguish true sub-ranges from integer
+- types. So, instead we define integer (non-sub-range) types as
+- sub-ranges of themselves. This matters for Chill. If this isn't
+- a subrange type, then we want to define it in terms of itself.
+- However, in C, this may be an anonymous integer type, and we don't
+- want to emit debug info referring to it. Just calling
+- dbxout_type_index won't work anyways, because the type hasn't been
+- defined yet. We make this work for both cases by checked to see
+- whether this is a defined type, referring to it if it is, and using
+- 'int' otherwise. */
+- if (TYPE_SYMTAB_ADDRESS (type) != 0)
+- dbxout_type_index (type);
+- else
+- dbxout_type_index (integer_type_node);
+- }
+-
+- stabstr_C (';');
+- if (low && tree_fits_shwi_p (low))
+- {
+- if (print_int_cst_bounds_in_octal_p (type, low, high))
+- stabstr_O (low);
+- else
+- stabstr_D (tree_to_shwi (low));
+- }
+- else
+- stabstr_C ('0');
+-
+- stabstr_C (';');
+- if (high && tree_fits_shwi_p (high))
+- {
+- if (print_int_cst_bounds_in_octal_p (type, low, high))
+- stabstr_O (high);
+- else
+- stabstr_D (tree_to_shwi (high));
+- stabstr_C (';');
+- }
+- else
+- stabstr_S ("-1;");
+-}
+-
+-
+-/* Output a reference to a type. If the type has not yet been
+- described in the dbx output, output its definition now.
+- For a type already defined, just refer to its definition
+- using the type number.
+-
+- If FULL is nonzero, and the type has been described only with
+- a forward-reference, output the definition now.
+- If FULL is zero in this case, just refer to the forward-reference
+- using the number previously allocated. */
+-
+-static void
+-dbxout_type (tree type, int full)
+-{
+- static int anonymous_type_number = 0;
+- tree tem, main_variant, low, high;
+-
+- if (TREE_CODE (type) == INTEGER_TYPE)
+- {
+- if (TREE_TYPE (type) == 0)
+- {
+- low = TYPE_MIN_VALUE (type);
+- high = TYPE_MAX_VALUE (type);
+- }
+-
+- else if (subrange_type_for_debug_p (type, &low, &high))
+- ;
+-
+- /* If this is a subtype that should not be emitted as a subrange type,
+- use the base type. */
+- else
+- {
+- type = TREE_TYPE (type);
+- low = TYPE_MIN_VALUE (type);
+- high = TYPE_MAX_VALUE (type);
+- }
+- }
+-
+- /* If there was an input error and we don't really have a type,
+- avoid crashing and write something that is at least valid
+- by assuming `int'. */
+- if (type == error_mark_node)
+- type = integer_type_node;
+- else
+- {
+- if (TYPE_NAME (type)
+- && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
+- && TYPE_DECL_SUPPRESS_DEBUG (TYPE_NAME (type)))
+- full = 0;
+- }
+-
+- /* Try to find the "main variant" with the same name. */
+- if (TYPE_NAME (type) && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
+- && DECL_ORIGINAL_TYPE (TYPE_NAME (type)))
+- main_variant = TREE_TYPE (TYPE_NAME (type));
+- else
+- main_variant = TYPE_MAIN_VARIANT (type);
+-
+- /* If we are not using extensions, stabs does not distinguish const and
+- volatile, so there is no need to make them separate types. */
+- if (!use_gnu_debug_info_extensions)
+- type = main_variant;
+-
+- if (TYPE_SYMTAB_ADDRESS (type) == 0)
+- {
+- /* Type has no dbx number assigned. Assign next available number. */
+- TYPE_SYMTAB_ADDRESS (type) = next_type_number++;
+-
+- /* Make sure type vector is long enough to record about this type. */
+-
+- if (next_type_number == typevec_len)
+- {
+- typevec = GGC_RESIZEVEC (struct typeinfo, typevec, typevec_len * 2);
+- memset (typevec + typevec_len, 0, typevec_len * sizeof typevec[0]);
+- typevec_len *= 2;
+- }
+-
+-#ifdef DBX_USE_BINCL
+- emit_pending_bincls_if_required ();
+- typevec[TYPE_SYMTAB_ADDRESS (type)].file_number
+- = current_file->file_number;
+- typevec[TYPE_SYMTAB_ADDRESS (type)].type_number
+- = current_file->next_type_number++;
+-#endif
+- }
+-
+- if (flag_debug_only_used_symbols)
+- {
+- if ((TREE_CODE (type) == RECORD_TYPE
+- || TREE_CODE (type) == UNION_TYPE
+- || TREE_CODE (type) == QUAL_UNION_TYPE
+- || TREE_CODE (type) == ENUMERAL_TYPE)
+- && TYPE_STUB_DECL (type)
+- && DECL_P (TYPE_STUB_DECL (type))
+- && ! DECL_IGNORED_P (TYPE_STUB_DECL (type)))
+- debug_queue_symbol (TYPE_STUB_DECL (type));
+- else if (TYPE_NAME (type)
+- && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL)
+- debug_queue_symbol (TYPE_NAME (type));
+- }
+-
+- /* Output the number of this type, to refer to it. */
+- dbxout_type_index (type);
+-
+-#ifdef DBX_TYPE_DEFINED
+- if (DBX_TYPE_DEFINED (type))
+- return;
+-#endif
+-
+- /* If this type's definition has been output or is now being output,
+- that is all. */
+-
+- switch (typevec[TYPE_SYMTAB_ADDRESS (type)].status)
+- {
+- case TYPE_UNSEEN:
+- break;
+- case TYPE_XREF:
+- /* If we have already had a cross reference,
+- and either that's all we want or that's the best we could do,
+- don't repeat the cross reference.
+- Sun dbx crashes if we do. */
+- if (! full || !COMPLETE_TYPE_P (type)
+- /* No way in DBX fmt to describe a variable size. */
+- || ! tree_fits_uhwi_p (TYPE_SIZE (type)))
+- return;
+- break;
+- case TYPE_DEFINED:
+- return;
+- }
+-
+-#ifdef DBX_NO_XREFS
+- /* For systems where dbx output does not allow the `=xsNAME:' syntax,
+- leave the type-number completely undefined rather than output
+- a cross-reference. If we have already used GNU debug info extensions,
+- then it is OK to output a cross reference. This is necessary to get
+- proper C++ debug output. */
+- if ((TREE_CODE (type) == RECORD_TYPE || TREE_CODE (type) == UNION_TYPE
+- || TREE_CODE (type) == QUAL_UNION_TYPE
+- || TREE_CODE (type) == ENUMERAL_TYPE)
+- && ! use_gnu_debug_info_extensions)
+- /* We must use the same test here as we use twice below when deciding
+- whether to emit a cross-reference. */
+- if ((TYPE_NAME (type) != 0
+- && ! (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
+- && DECL_IGNORED_P (TYPE_NAME (type)))
+- && !full)
+- || !COMPLETE_TYPE_P (type)
+- /* No way in DBX fmt to describe a variable size. */
+- || ! tree_fits_uhwi_p (TYPE_SIZE (type)))
+- {
+- typevec[TYPE_SYMTAB_ADDRESS (type)].status = TYPE_XREF;
+- return;
+- }
+-#endif
+-
+- /* Output a definition now. */
+- stabstr_C ('=');
+-
+- /* Mark it as defined, so that if it is self-referent
+- we will not get into an infinite recursion of definitions. */
+-
+- typevec[TYPE_SYMTAB_ADDRESS (type)].status = TYPE_DEFINED;
+-
+- /* If this type is a variant of some other, hand off. Types with
+- different names are usefully distinguished. We only distinguish
+- cv-qualified types if we're using extensions. */
+- if (TYPE_READONLY (type) > TYPE_READONLY (main_variant))
+- {
+- stabstr_C ('k');
+- dbxout_type (build_type_variant (type, 0, TYPE_VOLATILE (type)), 0);
+- return;
+- }
+- else if (TYPE_VOLATILE (type) > TYPE_VOLATILE (main_variant))
+- {
+- stabstr_C ('B');
+- dbxout_type (build_type_variant (type, TYPE_READONLY (type), 0), 0);
+- return;
+- }
+- else if (main_variant != TYPE_MAIN_VARIANT (type))
+- {
+- if (flag_debug_only_used_symbols)
+- {
+- tree orig_type = DECL_ORIGINAL_TYPE (TYPE_NAME (type));
+-
+- if ((TREE_CODE (orig_type) == RECORD_TYPE
+- || TREE_CODE (orig_type) == UNION_TYPE
+- || TREE_CODE (orig_type) == QUAL_UNION_TYPE
+- || TREE_CODE (orig_type) == ENUMERAL_TYPE)
+- && TYPE_STUB_DECL (orig_type)
+- && ! DECL_IGNORED_P (TYPE_STUB_DECL (orig_type)))
+- debug_queue_symbol (TYPE_STUB_DECL (orig_type));
+- }
+- /* 'type' is a typedef; output the type it refers to. */
+- dbxout_type (DECL_ORIGINAL_TYPE (TYPE_NAME (type)), 0);
+- return;
+- }
+- /* else continue. */
+-
+- switch (TREE_CODE (type))
+- {
+- case VOID_TYPE:
+- case NULLPTR_TYPE:
+- case LANG_TYPE:
+- case OPAQUE_TYPE:
+- /* For a void type, just define it as itself; i.e., "5=5".
+- This makes us consider it defined
+- without saying what it is. The debugger will make it
+- a void type when the reference is seen, and nothing will
+- ever override that default. */
+- dbxout_type_index (type);
+- break;
+-
+- case INTEGER_TYPE:
+- if (type == char_type_node && ! TYPE_UNSIGNED (type))
+- {
+- /* Output the type `char' as a subrange of itself!
+- I don't understand this definition, just copied it
+- from the output of pcc.
+- This used to use `r2' explicitly and we used to
+- take care to make sure that `char' was type number 2. */
+- stabstr_C ('r');
+- dbxout_type_index (type);
+- stabstr_S (";0;127;");
+- }
+-
+- /* If this is a subtype of another integer type, always prefer to
+- write it as a subtype. */
+- else if (TREE_TYPE (type) != 0
+- && TREE_CODE (TREE_TYPE (type)) == INTEGER_TYPE)
+- {
+- /* If the size is non-standard, say what it is if we can use
+- GDB extensions. */
+-
+- if (use_gnu_debug_info_extensions
+- && TYPE_PRECISION (type) != TYPE_PRECISION (integer_type_node))
+- {
+- stabstr_S ("@s");
+- stabstr_D (TYPE_PRECISION (type));
+- stabstr_C (';');
+- }
+-
+- dbxout_range_type (type, low, high);
+- }
+-
+- else
+- {
+- /* If the size is non-standard, say what it is if we can use
+- GDB extensions. */
+-
+- if (use_gnu_debug_info_extensions
+- && TYPE_PRECISION (type) != TYPE_PRECISION (integer_type_node))
+- {
+- stabstr_S ("@s");
+- stabstr_D (TYPE_PRECISION (type));
+- stabstr_C (';');
+- }
+-
+- if (print_int_cst_bounds_in_octal_p (type, low, high))
+- {
+- stabstr_C ('r');
+-
+- /* If this type derives from another type, output type index of
+- parent type. This is particularly important when parent type
+- is an enumerated type, because not generating the parent type
+- index would transform the definition of this enumerated type
+- into a plain unsigned type. */
+- if (TREE_TYPE (type) != 0)
+- dbxout_type_index (TREE_TYPE (type));
+- else
+- dbxout_type_index (type);
+-
+- stabstr_C (';');
+- stabstr_O (low);
+- stabstr_C (';');
+- stabstr_O (high);
+- stabstr_C (';');
+- }
+-
+- else
+- /* Output other integer types as subranges of `int'. */
+- dbxout_range_type (type, low, high);
+- }
+-
+- break;
+-
+- case REAL_TYPE:
+- case FIXED_POINT_TYPE:
+- /* This used to say `r1' and we used to take care
+- to make sure that `int' was type number 1. */
+- stabstr_C ('r');
+- dbxout_type_index (integer_type_node);
+- stabstr_C (';');
+- stabstr_D (int_size_in_bytes (type));
+- stabstr_S (";0;");
+- break;
+-
+- case BOOLEAN_TYPE:
+- if (use_gnu_debug_info_extensions)
+- {
+- stabstr_S ("@s");
+- stabstr_D (BITS_PER_UNIT * int_size_in_bytes (type));
+- stabstr_S (";-16;");
+- }
+- else /* Define as enumeral type (False, True) */
+- stabstr_S ("eFalse:0,True:1,;");
+- break;
+-
+- case COMPLEX_TYPE:
+- /* Differs from the REAL_TYPE by its new data type number.
+- R3 is NF_COMPLEX. We don't try to use any of the other NF_*
+- codes since gdb doesn't care anyway. */
+-
+- if (TREE_CODE (TREE_TYPE (type)) == REAL_TYPE)
+- {
+- stabstr_S ("R3;");
+- stabstr_D (2 * int_size_in_bytes (TREE_TYPE (type)));
+- stabstr_S (";0;");
+- }
+- else
+- {
+- /* Output a complex integer type as a structure,
+- pending some other way to do it. */
+- stabstr_C ('s');
+- stabstr_D (int_size_in_bytes (type));
+-
+- stabstr_S ("real:");
+- dbxout_type (TREE_TYPE (type), 0);
+- stabstr_S (",0,");
+- stabstr_D (TYPE_PRECISION (TREE_TYPE (type)));
+-
+- stabstr_S (";imag:");
+- dbxout_type (TREE_TYPE (type), 0);
+- stabstr_C (',');
+- stabstr_D (TYPE_PRECISION (TREE_TYPE (type)));
+- stabstr_C (',');
+- stabstr_D (TYPE_PRECISION (TREE_TYPE (type)));
+- stabstr_S (";;");
+- }
+- break;
+-
+- case ARRAY_TYPE:
+- /* Make arrays of packed bits look like bitstrings for chill. */
+- if (TYPE_PACKED (type) && use_gnu_debug_info_extensions)
+- {
+- stabstr_S ("@s");
+- stabstr_D (BITS_PER_UNIT * int_size_in_bytes (type));
+- stabstr_S (";@S;S");
+- dbxout_type (TYPE_DOMAIN (type), 0);
+- break;
+- }
+-
+- /* Output "a" followed by a range type definition
+- for the index type of the array
+- followed by a reference to the target-type.
+- ar1;0;N;M for a C array of type M and size N+1. */
+- /* Check if a character string type, which in Chill is
+- different from an array of characters. */
+- if (TYPE_STRING_FLAG (type) && use_gnu_debug_info_extensions)
+- {
+- stabstr_S ("@S;");
+- }
+- tem = TYPE_DOMAIN (type);
+- if (tem == NULL)
+- {
+- stabstr_S ("ar");
+- dbxout_type_index (integer_type_node);
+- stabstr_S (";0;-1;");
+- }
+- else
+- {
+- stabstr_C ('a');
+- dbxout_range_type (tem, TYPE_MIN_VALUE (tem), TYPE_MAX_VALUE (tem));
+- }
+-
+- dbxout_type (TREE_TYPE (type), 0);
+- break;
+-
+- case VECTOR_TYPE:
+- /* Make vectors look like an array. */
+- if (use_gnu_debug_info_extensions)
+- stabstr_S ("@V;");
+-
+- /* Output "a" followed by a range type definition
+- for the index type of the array
+- followed by a reference to the target-type.
+- ar1;0;N;M for a C array of type M and size N+1. */
+- stabstr_C ('a');
+- dbxout_range_type (integer_type_node, size_zero_node,
+- size_int (TYPE_VECTOR_SUBPARTS (type) - 1));
+-
+- dbxout_type (TREE_TYPE (type), 0);
+- break;
+-
+- case RECORD_TYPE:
+- case UNION_TYPE:
+- case QUAL_UNION_TYPE:
+- {
+- tree binfo = TYPE_BINFO (type);
+-
+- /* Output a structure type. We must use the same test here as we
+- use in the DBX_NO_XREFS case above. */
+- if ((TYPE_NAME (type) != 0
+- && ! (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
+- && DECL_IGNORED_P (TYPE_NAME (type)))
+- && !full)
+- || !COMPLETE_TYPE_P (type)
+- /* No way in DBX fmt to describe a variable size. */
+- || ! tree_fits_uhwi_p (TYPE_SIZE (type)))
+- {
+- /* If the type is just a cross reference, output one
+- and mark the type as partially described.
+- If it later becomes defined, we will output
+- its real definition.
+- If the type has a name, don't nest its definition within
+- another type's definition; instead, output an xref
+- and let the definition come when the name is defined. */
+- stabstr_S ((TREE_CODE (type) == RECORD_TYPE) ? "xs" : "xu");
+- if (TYPE_IDENTIFIER (type))
+- {
+- /* Note that the C frontend creates for anonymous variable
+- length records/unions TYPE_NAME with DECL_NAME NULL. */
+- dbxout_type_name (type);
+- }
+- else
+- {
+- stabstr_S ("$$");
+- stabstr_D (anonymous_type_number++);
+- }
+-
+- stabstr_C (':');
+- typevec[TYPE_SYMTAB_ADDRESS (type)].status = TYPE_XREF;
+- break;
+- }
+-
+- /* Identify record or union, and print its size. */
+- stabstr_C ((TREE_CODE (type) == RECORD_TYPE) ? 's' : 'u');
+- stabstr_D (int_size_in_bytes (type));
+-
+- if (binfo)
+- {
+- int i;
+- tree child;
+- vec<tree, va_gc> *accesses = BINFO_BASE_ACCESSES (binfo);
+-
+- if (use_gnu_debug_info_extensions)
+- {
+- if (BINFO_N_BASE_BINFOS (binfo))
+- {
+- stabstr_C ('!');
+- stabstr_U (BINFO_N_BASE_BINFOS (binfo));
+- stabstr_C (',');
+- }
+- }
+- for (i = 0; BINFO_BASE_ITERATE (binfo, i, child); i++)
+- {
+- tree access = (accesses ? (*accesses)[i] : access_public_node);
+-
+- if (use_gnu_debug_info_extensions)
+- {
+- stabstr_C (BINFO_VIRTUAL_P (child) ? '1' : '0');
+- stabstr_C (access == access_public_node ? '2' :
+- access == access_protected_node
+- ? '1' :'0');
+- if (BINFO_VIRTUAL_P (child)
+- && (lang_GNU_CXX ()
+- || strcmp (lang_hooks.name, "GNU Objective-C++") == 0))
+- /* For a virtual base, print the (negative)
+- offset within the vtable where we must look
+- to find the necessary adjustment. */
+- stabstr_D
+- (tree_to_shwi (BINFO_VPTR_FIELD (child))
+- * BITS_PER_UNIT);
+- else
+- stabstr_D (tree_to_shwi (BINFO_OFFSET (child))
+- * BITS_PER_UNIT);
+- stabstr_C (',');
+- dbxout_type (BINFO_TYPE (child), 0);
+- stabstr_C (';');
+- }
+- else
+- {
+- /* Print out the base class information with
+- fields which have the same names at the types
+- they hold. */
+- dbxout_type_name (BINFO_TYPE (child));
+- stabstr_C (':');
+- dbxout_type (BINFO_TYPE (child), full);
+- stabstr_C (',');
+- stabstr_D (tree_to_shwi (BINFO_OFFSET (child))
+- * BITS_PER_UNIT);
+- stabstr_C (',');
+- stabstr_D
+- (tree_to_shwi (TYPE_SIZE (BINFO_TYPE (child)))
+- * BITS_PER_UNIT);
+- stabstr_C (';');
+- }
+- }
+- }
+- }
+-
+- /* Write out the field declarations. */
+- dbxout_type_fields (type);
+- if (use_gnu_debug_info_extensions)
+- dbxout_type_methods (type);
+-
+- stabstr_C (';');
+-
+- if (use_gnu_debug_info_extensions && TREE_CODE (type) == RECORD_TYPE
+- /* Avoid the ~ if we don't really need it--it confuses dbx. */
+- && TYPE_VFIELD (type))
+- {
+-
+- /* We need to write out info about what field this class
+- uses as its "main" vtable pointer field, because if this
+- field is inherited from a base class, GDB cannot necessarily
+- figure out which field it's using in time. */
+- stabstr_S ("~%");
+- dbxout_type (DECL_FCONTEXT (TYPE_VFIELD (type)), 0);
+- stabstr_C (';');
+- }
+- break;
+-
+- case ENUMERAL_TYPE:
+- /* We must use the same test here as we use in the DBX_NO_XREFS case
+- above. We simplify it a bit since an enum will never have a variable
+- size. */
+- if ((TYPE_NAME (type) != 0
+- && ! (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
+- && DECL_IGNORED_P (TYPE_NAME (type)))
+- && !full)
+- || !COMPLETE_TYPE_P (type))
+- {
+- stabstr_S ("xe");
+- dbxout_type_name (type);
+- typevec[TYPE_SYMTAB_ADDRESS (type)].status = TYPE_XREF;
+- stabstr_C (':');
+- return;
+- }
+- if (use_gnu_debug_info_extensions
+- && TYPE_PRECISION (type) != TYPE_PRECISION (integer_type_node))
+- {
+- stabstr_S ("@s");
+- stabstr_D (TYPE_PRECISION (type));
+- stabstr_C (';');
+- }
+-
+- stabstr_C ('e');
+- for (tem = TYPE_VALUES (type); tem; tem = TREE_CHAIN (tem))
+- {
+- tree value = TREE_VALUE (tem);
+-
+- stabstr_I (TREE_PURPOSE (tem));
+- stabstr_C (':');
+-
+- if (TREE_CODE (value) == CONST_DECL)
+- value = DECL_INITIAL (value);
+-
+- if (cst_and_fits_in_hwi (value))
+- stabstr_D (TREE_INT_CST_LOW (value));
+- else
+- stabstr_O (value);
+-
+- stabstr_C (',');
+- if (TREE_CHAIN (tem) != 0)
+- CONTIN;
+- }
+-
+- stabstr_C (';');
+- break;
+-
+- case POINTER_TYPE:
+- stabstr_C ('*');
+- dbxout_type (TREE_TYPE (type), 0);
+- break;
+-
+- case METHOD_TYPE:
+- if (use_gnu_debug_info_extensions)
+- {
+- stabstr_C ('#');
+-
+- /* Write the argument types out longhand. */
+- dbxout_type (TYPE_METHOD_BASETYPE (type), 0);
+- stabstr_C (',');
+- dbxout_type (TREE_TYPE (type), 0);
+- dbxout_args (TYPE_ARG_TYPES (type));
+- stabstr_C (';');
+- }
+- else
+- /* Treat it as a function type. */
+- dbxout_type (TREE_TYPE (type), 0);
+- break;
+-
+- case OFFSET_TYPE:
+- if (use_gnu_debug_info_extensions)
+- {
+- stabstr_C ('@');
+- dbxout_type (TYPE_OFFSET_BASETYPE (type), 0);
+- stabstr_C (',');
+- dbxout_type (TREE_TYPE (type), 0);
+- }
+- else
+- /* Should print as an int, because it is really just an offset. */
+- dbxout_type (integer_type_node, 0);
+- break;
+-
+- case REFERENCE_TYPE:
+- if (use_gnu_debug_info_extensions)
+- {
+- stabstr_C ('&');
+- }
+- else
+- stabstr_C ('*');
+- dbxout_type (TREE_TYPE (type), 0);
+- break;
+-
+- case FUNCTION_TYPE:
+- stabstr_C ('f');
+- dbxout_type (TREE_TYPE (type), 0);
+- break;
+-
+- default:
+- /* A C++ function with deduced return type can have a TEMPLATE_TYPE_PARM
+- named 'auto' in its type.
+- No debug info for TEMPLATE_TYPE_PARM type supported yet. */
+- if (lang_GNU_CXX ())
+- {
+- tree name = TYPE_IDENTIFIER (type);
+- if (name == get_identifier ("auto")
+- || name == get_identifier ("decltype(auto)"))
+- break;
+- }
+-
+- gcc_unreachable ();
+- }
+-}
+-
+-/* Return nonzero if the given type represents an integer whose bounds
+- should be printed in octal format. */
+-
+-static bool
+-print_int_cst_bounds_in_octal_p (tree type, tree low, tree high)
+-{
+- /* If we can use GDB extensions and the size is wider than a long
+- (the size used by GDB to read them) or we may have trouble writing
+- the bounds the usual way, write them in octal. Note the test is for
+- the *target's* size of "long", not that of the host. The host test
+- is just to make sure we can write it out in case the host wide int
+- is narrower than the target "long".
+-
+- For unsigned types, we use octal if they are the same size or larger.
+- This is because we print the bounds as signed decimal, and hence they
+- can't span same size unsigned types. */
+-
+- if (use_gnu_debug_info_extensions
+- && low && TREE_CODE (low) == INTEGER_CST
+- && high && TREE_CODE (high) == INTEGER_CST
+- && (TYPE_PRECISION (type) > TYPE_PRECISION (integer_type_node)
+- || ((TYPE_PRECISION (type) == TYPE_PRECISION (integer_type_node))
+- && TYPE_UNSIGNED (type))
+- || TYPE_PRECISION (type) > HOST_BITS_PER_WIDE_INT
+- || (TYPE_PRECISION (type) == HOST_BITS_PER_WIDE_INT
+- && TYPE_UNSIGNED (type))))
+- return TRUE;
+- else
+- return FALSE;
+-}
+-
+-/* Output the name of type TYPE, with no punctuation.
+- Such names can be set up either by typedef declarations
+- or by struct, enum and union tags. */
+-
+-static void
+-dbxout_type_name (tree type)
+-{
+- tree t = TYPE_NAME (type);
+-
+- gcc_assert (t);
+- switch (TREE_CODE (t))
+- {
+- case IDENTIFIER_NODE:
+- break;
+- case TYPE_DECL:
+- t = DECL_NAME (t);
+- break;
+- default:
+- gcc_unreachable ();
+- }
+-
+- stabstr_I (t);
+-}
+-
+-/* Output leading struct or class names needed for qualifying type
+- whose scope is limited to a struct or class. */
+-
+-static void
+-dbxout_class_name_qualifiers (tree decl)
+-{
+- tree context = decl_type_context (decl);
+-
+- if (context != NULL_TREE
+- && TREE_CODE (context) == RECORD_TYPE
+- && TYPE_NAME (context) != 0
+- && (TREE_CODE (TYPE_NAME (context)) == IDENTIFIER_NODE
+- || (DECL_NAME (TYPE_NAME (context)) != 0)))
+- {
+- tree name = TYPE_NAME (context);
+-
+- if (TREE_CODE (name) == TYPE_DECL)
+- {
+- dbxout_class_name_qualifiers (name);
+- name = DECL_NAME (name);
+- }
+- stabstr_I (name);
+- stabstr_S ("::");
+- }
+-}
+-
+-/* This is a specialized subset of expand_expr for use by dbxout_symbol in
+- evaluating DECL_VALUE_EXPR. In particular, we stop if we find decls that
+- haven't been expanded, or if the expression is getting so complex we won't
+- be able to represent it in stabs anyway. Returns NULL on failure. */
+-
+-static rtx
+-dbxout_expand_expr (tree expr)
+-{
+- switch (TREE_CODE (expr))
+- {
+- case VAR_DECL:
+- /* We can't handle emulated tls variables, because the address is an
+- offset to the return value of __emutls_get_address, and there is no
+- way to express that in stabs. Also, there are name mangling issues
+- here. We end up with references to undefined symbols if we don't
+- disable debug info for these variables. */
+- if (!targetm.have_tls && DECL_THREAD_LOCAL_P (expr))
+- return NULL;
+- if (TREE_STATIC (expr)
+- && !TREE_ASM_WRITTEN (expr)
+- && !DECL_HAS_VALUE_EXPR_P (expr)
+- && !TREE_PUBLIC (expr)
+- && DECL_RTL_SET_P (expr)
+- && MEM_P (DECL_RTL (expr)))
+- {
+- /* If this is a var that might not be actually output,
+- return NULL, otherwise stabs might reference an undefined
+- symbol. */
+- varpool_node *node = varpool_node::get (expr);
+- if (!node || !node->definition)
+- return NULL;
+- }
+- /* FALLTHRU */
+-
+- case PARM_DECL:
+- case RESULT_DECL:
+- if (DECL_HAS_VALUE_EXPR_P (expr))
+- return dbxout_expand_expr (DECL_VALUE_EXPR (expr));
+- /* FALLTHRU */
+-
+- case CONST_DECL:
+- return DECL_RTL_IF_SET (expr);
+-
+- case INTEGER_CST:
+- return expand_expr (expr, NULL_RTX, VOIDmode, EXPAND_INITIALIZER);
+-
+- case COMPONENT_REF:
+- case ARRAY_REF:
+- case ARRAY_RANGE_REF:
+- case BIT_FIELD_REF:
+- {
+- machine_mode mode;
+- poly_int64 bitsize, bitpos;
+- tree offset, tem;
+- int unsignedp, reversep, volatilep = 0;
+- rtx x;
+-
+- tem = get_inner_reference (expr, &bitsize, &bitpos, &offset, &mode,
+- &unsignedp, &reversep, &volatilep);
+-
+- x = dbxout_expand_expr (tem);
+- if (x == NULL || !MEM_P (x))
+- return NULL;
+- if (offset != NULL)
+- {
+- if (!tree_fits_shwi_p (offset))
+- return NULL;
+- x = adjust_address_nv (x, mode, tree_to_shwi (offset));
+- }
+- if (maybe_ne (bitpos, 0))
+- x = adjust_address_nv (x, mode, bits_to_bytes_round_down (bitpos));
+-
+- return x;
+- }
+-
+- default:
+- return NULL;
+- }
+-}
+-
+-/* Helper function for output_used_types. Queue one entry from the
+- used types hash to be output. */
+-
+-bool
+-output_used_types_helper (tree const &type, vec<tree> *types_p)
+-{
+- if ((TREE_CODE (type) == RECORD_TYPE
+- || TREE_CODE (type) == UNION_TYPE
+- || TREE_CODE (type) == QUAL_UNION_TYPE
+- || TREE_CODE (type) == ENUMERAL_TYPE)
+- && TYPE_STUB_DECL (type)
+- && DECL_P (TYPE_STUB_DECL (type))
+- && ! DECL_IGNORED_P (TYPE_STUB_DECL (type)))
+- types_p->quick_push (TYPE_STUB_DECL (type));
+- else if (TYPE_NAME (type)
+- && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL)
+- types_p->quick_push (TYPE_NAME (type));
+-
+- return true;
+-}
+-
+-/* This is a qsort callback which sorts types and declarations into a
+- predictable order (types, then declarations, sorted by UID
+- within). */
+-
+-static int
+-output_types_sort (const void *pa, const void *pb)
+-{
+- const tree lhs = *((const tree *)pa);
+- const tree rhs = *((const tree *)pb);
+-
+- if (TYPE_P (lhs))
+- {
+- if (TYPE_P (rhs))
+- return TYPE_UID (lhs) - TYPE_UID (rhs);
+- else
+- return 1;
+- }
+- else
+- {
+- if (TYPE_P (rhs))
+- return -1;
+- else
+- return DECL_UID (lhs) - DECL_UID (rhs);
+- }
+-}
+-
+-
+-/* Force all types used by this function to be output in debug
+- information. */
+-
+-static void
+-output_used_types (void)
+-{
+- if (cfun && cfun->used_types_hash)
+- {
+- vec<tree> types;
+- int i;
+- tree type;
+-
+- types.create (cfun->used_types_hash->elements ());
+- cfun->used_types_hash->traverse<vec<tree> *, output_used_types_helper>
+- (&types);
+-
+- /* Sort by UID to prevent dependence on hash table ordering. */
+- types.qsort (output_types_sort);
+-
+- FOR_EACH_VEC_ELT (types, i, type)
+- debug_queue_symbol (type);
+-
+- types.release ();
+- }
+-}
+-
+-/* Output a .stabs for the symbol defined by DECL,
+- which must be a ..._DECL node in the normal namespace.
+- It may be a CONST_DECL, a FUNCTION_DECL, a PARM_DECL or a VAR_DECL.
+- LOCAL is nonzero if the scope is less than the entire file.
+- Return 1 if a stabs might have been emitted. */
+-
+-int
+-dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED)
+-{
+- tree type = TREE_TYPE (decl);
+- tree context = NULL_TREE;
+- int result = 0;
+- rtx decl_rtl;
+-
+- /* "Intercept" dbxout_symbol() calls like we do all debug_hooks. */
+- ++debug_nesting;
+-
+- /* Ignore nameless syms, but don't ignore type tags. */
+-
+- if ((DECL_NAME (decl) == 0 && TREE_CODE (decl) != TYPE_DECL)
+- || DECL_IGNORED_P (decl))
+- DBXOUT_DECR_NESTING_AND_RETURN (0);
+-
+- /* If we are to generate only the symbols actually used then such
+- symbol nodes are flagged with TREE_USED. Ignore any that
+- aren't flagged as TREE_USED. */
+-
+- if (flag_debug_only_used_symbols
+- && (!TREE_USED (decl)
+- && (!VAR_P (decl) || !DECL_INITIAL (decl))))
+- DBXOUT_DECR_NESTING_AND_RETURN (0);
+-
+- /* If dbxout_init has not yet run, queue this symbol for later. */
+- if (!typevec)
+- {
+- preinit_symbols = tree_cons (0, decl, preinit_symbols);
+- DBXOUT_DECR_NESTING_AND_RETURN (0);
+- }
+-
+- if (flag_debug_only_used_symbols)
+- {
+- tree t;
+-
+- /* We now have a used symbol. We need to generate the info for
+- the symbol's type in addition to the symbol itself. These
+- type symbols are queued to be generated after were done with
+- the symbol itself (otherwise they would fight over the
+- stabstr obstack).
+-
+- Note, because the TREE_TYPE(type) might be something like a
+- pointer to a named type we need to look for the first name
+- we see following the TREE_TYPE chain. */
+-
+- t = type;
+- while (POINTER_TYPE_P (t))
+- t = TREE_TYPE (t);
+-
+- /* RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE, and ENUMERAL_TYPE
+- need special treatment. The TYPE_STUB_DECL field in these
+- types generally represents the tag name type we want to
+- output. In addition there could be a typedef type with
+- a different name. In that case we also want to output
+- that. */
+-
+- if (TREE_CODE (t) == RECORD_TYPE
+- || TREE_CODE (t) == UNION_TYPE
+- || TREE_CODE (t) == QUAL_UNION_TYPE
+- || TREE_CODE (t) == ENUMERAL_TYPE)
+- {
+- if (TYPE_STUB_DECL (t)
+- && TYPE_STUB_DECL (t) != decl
+- && DECL_P (TYPE_STUB_DECL (t))
+- && ! DECL_IGNORED_P (TYPE_STUB_DECL (t)))
+- {
+- debug_queue_symbol (TYPE_STUB_DECL (t));
+- if (TYPE_NAME (t)
+- && TYPE_NAME (t) != TYPE_STUB_DECL (t)
+- && TYPE_NAME (t) != decl
+- && DECL_P (TYPE_NAME (t)))
+- debug_queue_symbol (TYPE_NAME (t));
+- }
+- }
+- else if (TYPE_NAME (t)
+- && TYPE_NAME (t) != decl
+- && DECL_P (TYPE_NAME (t)))
+- debug_queue_symbol (TYPE_NAME (t));
+- }
+-
+- emit_pending_bincls_if_required ();
+-
+- switch (TREE_CODE (decl))
+- {
+- case CONST_DECL:
+- /* Enum values are defined by defining the enum type. */
+- break;
+-
+- case FUNCTION_DECL:
+- decl_rtl = DECL_RTL_IF_SET (decl);
+- if (!decl_rtl)
+- DBXOUT_DECR_NESTING_AND_RETURN (0);
+- if (DECL_EXTERNAL (decl))
+- break;
+- /* Don't mention a nested function under its parent. */
+- context = decl_function_context (decl);
+- if (context == current_function_decl)
+- break;
+- /* Don't mention an inline instance of a nested function. */
+- if (context && DECL_FROM_INLINE (decl))
+- break;
+- if (!MEM_P (decl_rtl)
+- || GET_CODE (XEXP (decl_rtl, 0)) != SYMBOL_REF)
+- break;
+-
+- if (flag_debug_only_used_symbols)
+- output_used_types ();
+-
+- dbxout_begin_complex_stabs ();
+- stabstr_I (DECL_ASSEMBLER_NAME (decl));
+- stabstr_S (TREE_PUBLIC (decl) ? ":F" : ":f");
+- result = 1;
+-
+- if (TREE_TYPE (type))
+- dbxout_type (TREE_TYPE (type), 0);
+- else
+- dbxout_type (void_type_node, 0);
+-
+- /* For a nested function, when that function is compiled,
+- mention the containing function name
+- as well as (since dbx wants it) our own assembler-name. */
+- if (context != 0)
+- {
+- stabstr_C (',');
+- stabstr_I (DECL_ASSEMBLER_NAME (decl));
+- stabstr_C (',');
+- stabstr_I (DECL_NAME (context));
+- }
+-
+- dbxout_finish_complex_stabs (decl, N_FUN, XEXP (decl_rtl, 0), 0, 0);
+- break;
+-
+- case TYPE_DECL:
+- /* Don't output the same typedef twice.
+- And don't output what language-specific stuff doesn't want output. */
+- if (TREE_ASM_WRITTEN (decl) || TYPE_DECL_SUPPRESS_DEBUG (decl))
+- DBXOUT_DECR_NESTING_AND_RETURN (0);
+-
+- /* Don't output typedefs for types with magic type numbers (XCOFF). */
+-#ifdef DBX_ASSIGN_FUNDAMENTAL_TYPE_NUMBER
+- {
+- int fundamental_type_number =
+- DBX_ASSIGN_FUNDAMENTAL_TYPE_NUMBER (decl);
+-
+- if (fundamental_type_number != 0)
+- {
+- TREE_ASM_WRITTEN (decl) = 1;
+- TYPE_SYMTAB_ADDRESS (TREE_TYPE (decl)) = fundamental_type_number;
+- DBXOUT_DECR_NESTING_AND_RETURN (0);
+- }
+- }
+-#endif
+- FORCE_TEXT;
+- result = 1;
+- {
+- int tag_needed = 1;
+- int did_output = 0;
+-
+- if (DECL_NAME (decl))
+- {
+- /* Nonzero means we must output a tag as well as a typedef. */
+- tag_needed = 0;
+-
+- /* Handle the case of a C++ structure or union
+- where the TYPE_NAME is a TYPE_DECL
+- which gives both a typedef name and a tag. */
+- /* dbx requires the tag first and the typedef second. */
+- if ((TREE_CODE (type) == RECORD_TYPE
+- || TREE_CODE (type) == UNION_TYPE
+- || TREE_CODE (type) == QUAL_UNION_TYPE)
+- && TYPE_NAME (type) == decl
+- && !use_gnu_debug_info_extensions
+- && !TREE_ASM_WRITTEN (TYPE_NAME (type))
+- /* Distinguish the implicit typedefs of C++
+- from explicit ones that might be found in C. */
+- && DECL_ARTIFICIAL (decl)
+- /* Do not generate a tag for incomplete records. */
+- && COMPLETE_TYPE_P (type)
+- /* Do not generate a tag for records of variable size,
+- since this type cannot be properly described in the
+- DBX format, and it confuses some tools such as objdump. */
+- && tree_fits_uhwi_p (TYPE_SIZE (type)))
+- {
+- tree name = TYPE_IDENTIFIER (type);
+-
+- dbxout_begin_complex_stabs ();
+- stabstr_I (name);
+- stabstr_S (":T");
+- dbxout_type (type, 1);
+- dbxout_finish_complex_stabs (0, DBX_TYPE_DECL_STABS_CODE,
+- 0, 0, 0);
+- }
+-
+- dbxout_begin_complex_stabs ();
+-
+- /* Output leading class/struct qualifiers. */
+- if (use_gnu_debug_info_extensions)
+- dbxout_class_name_qualifiers (decl);
+-
+- /* Output typedef name. */
+- stabstr_I (DECL_NAME (decl));
+- stabstr_C (':');
+-
+- /* Short cut way to output a tag also. */
+- if ((TREE_CODE (type) == RECORD_TYPE
+- || TREE_CODE (type) == UNION_TYPE
+- || TREE_CODE (type) == QUAL_UNION_TYPE)
+- && TYPE_NAME (type) == decl
+- /* Distinguish the implicit typedefs of C++
+- from explicit ones that might be found in C. */
+- && DECL_ARTIFICIAL (decl))
+- {
+- if (use_gnu_debug_info_extensions)
+- {
+- stabstr_C ('T');
+- TREE_ASM_WRITTEN (TYPE_NAME (type)) = 1;
+- }
+- }
+-
+- stabstr_C ('t');
+- dbxout_type (type, 1);
+- dbxout_finish_complex_stabs (decl, DBX_TYPE_DECL_STABS_CODE,
+- 0, 0, 0);
+- did_output = 1;
+- }
+-
+- /* Don't output a tag if this is an incomplete type. This prevents
+- the sun4 Sun OS 4.x dbx from crashing. */
+-
+- if (tag_needed && TYPE_NAME (type) != 0
+- && (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE
+- || (DECL_NAME (TYPE_NAME (type)) != 0))
+- && COMPLETE_TYPE_P (type)
+- && !TREE_ASM_WRITTEN (TYPE_NAME (type)))
+- {
+- /* For a TYPE_DECL with no name, but the type has a name,
+- output a tag.
+- This is what represents `struct foo' with no typedef. */
+- /* In C++, the name of a type is the corresponding typedef.
+- In C, it is an IDENTIFIER_NODE. */
+- tree name = TYPE_IDENTIFIER (type);
+-
+- dbxout_begin_complex_stabs ();
+- stabstr_I (name);
+- stabstr_S (":T");
+- dbxout_type (type, 1);
+- dbxout_finish_complex_stabs (0, DBX_TYPE_DECL_STABS_CODE, 0, 0, 0);
+- did_output = 1;
+- }
+-
+- /* If an enum type has no name, it cannot be referred to, but
+- we must output it anyway, to record the enumeration
+- constants. */
+-
+- if (!did_output && TREE_CODE (type) == ENUMERAL_TYPE)
+- {
+- dbxout_begin_complex_stabs ();
+- /* Some debuggers fail when given NULL names, so give this a
+- harmless name of " " (Why not "(anon)"?). */
+- stabstr_S (" :T");
+- dbxout_type (type, 1);
+- dbxout_finish_complex_stabs (0, DBX_TYPE_DECL_STABS_CODE, 0, 0, 0);
+- }
+-
+- /* Prevent duplicate output of a typedef. */
+- TREE_ASM_WRITTEN (decl) = 1;
+- break;
+- }
+-
+- case PARM_DECL:
+- if (DECL_HAS_VALUE_EXPR_P (decl))
+- decl = DECL_VALUE_EXPR (decl);
+-
+- /* PARM_DECLs go in their own separate chain and are output by
+- dbxout_reg_parms and dbxout_parms, except for those that are
+- disguised VAR_DECLs like Out parameters in Ada. */
+- gcc_assert (VAR_P (decl));
+-
+- /* fall through */
+-
+- case RESULT_DECL:
+- case VAR_DECL:
+- /* Don't mention a variable that is external.
+- Let the file that defines it describe it. */
+- if (DECL_EXTERNAL (decl))
+- break;
+-
+- /* If the variable is really a constant
+- and not written in memory, inform the debugger.
+-
+- ??? Why do we skip emitting the type and location in this case? */
+- if (TREE_STATIC (decl) && TREE_READONLY (decl)
+- && DECL_INITIAL (decl) != 0
+- && tree_fits_shwi_p (DECL_INITIAL (decl))
+- && ! TREE_ASM_WRITTEN (decl)
+- && (DECL_FILE_SCOPE_P (decl)
+- || TREE_CODE (DECL_CONTEXT (decl)) == BLOCK
+- || TREE_CODE (DECL_CONTEXT (decl)) == NAMESPACE_DECL)
+- && TREE_PUBLIC (decl) == 0)
+- {
+- /* The sun4 assembler does not grok this. */
+-
+- if (TREE_CODE (TREE_TYPE (decl)) == INTEGER_TYPE
+- || TREE_CODE (TREE_TYPE (decl)) == ENUMERAL_TYPE)
+- {
+- HOST_WIDE_INT ival = tree_to_shwi (DECL_INITIAL (decl));
+-
+- dbxout_begin_complex_stabs ();
+- dbxout_symbol_name (decl, NULL, 'c');
+- stabstr_S ("=i");
+- stabstr_D (ival);
+- dbxout_finish_complex_stabs (0, N_LSYM, 0, 0, 0);
+- DBXOUT_DECR_NESTING;
+- return 1;
+- }
+- else
+- break;
+- }
+- /* else it is something we handle like a normal variable. */
+-
+- decl_rtl = dbxout_expand_expr (decl);
+- if (!decl_rtl)
+- DBXOUT_DECR_NESTING_AND_RETURN (0);
+-
+- if (!is_global_var (decl))
+- decl_rtl = eliminate_regs (decl_rtl, VOIDmode, NULL_RTX);
+-#ifdef LEAF_REG_REMAP
+- if (crtl->uses_only_leaf_regs)
+- leaf_renumber_regs_insn (decl_rtl);
+-#endif
+-
+- result = dbxout_symbol_location (decl, type, 0, decl_rtl);
+- break;
+-
+- default:
+- break;
+- }
+- DBXOUT_DECR_NESTING;
+- return result;
+-}
+-
+-/* Output the stab for DECL, a VAR_DECL, RESULT_DECL or PARM_DECL.
+- Add SUFFIX to its name, if SUFFIX is not 0.
+- Describe the variable as residing in HOME
+- (usually HOME is DECL_RTL (DECL), but not always).
+- Returns 1 if the stab was really emitted. */
+-
+-static int
+-dbxout_symbol_location (tree decl, tree type, const char *suffix, rtx home)
+-{
+- int letter = 0;
+- stab_code_type code;
+- rtx addr = 0;
+- int number = 0;
+- int regno = -1;
+-
+- /* Don't mention a variable at all
+- if it was completely optimized into nothingness.
+-
+- If the decl was from an inline function, then its rtl
+- is not identically the rtl that was used in this
+- particular compilation. */
+- if (GET_CODE (home) == SUBREG)
+- {
+- rtx value = home;
+-
+- while (GET_CODE (value) == SUBREG)
+- value = SUBREG_REG (value);
+- if (REG_P (value))
+- {
+- if (REGNO (value) >= FIRST_PSEUDO_REGISTER)
+- return 0;
+- }
+- home = alter_subreg (&home, true);
+- }
+- if (REG_P (home))
+- {
+- regno = REGNO (home);
+- if (regno >= FIRST_PSEUDO_REGISTER)
+- return 0;
+- }
+-
+- /* The kind-of-variable letter depends on where
+- the variable is and on the scope of its name:
+- G and N_GSYM for static storage and global scope,
+- S for static storage and file scope,
+- V for static storage and local scope,
+- for those two, use N_LCSYM if data is in bss segment,
+- N_STSYM if in data segment, N_FUN otherwise.
+- (We used N_FUN originally, then changed to N_STSYM
+- to please GDB. However, it seems that confused ld.
+- Now GDB has been fixed to like N_FUN, says Kingdon.)
+- no letter at all, and N_LSYM, for auto variable,
+- r and N_RSYM for register variable. */
+-
+- if (MEM_P (home) && GET_CODE (XEXP (home, 0)) == SYMBOL_REF)
+- {
+- if (TREE_PUBLIC (decl))
+- {
+- int offs;
+- letter = 'G';
+- code = N_GSYM;
+- if (dbxout_common_check (decl, &offs) != NULL)
+- {
+- letter = 'V';
+- addr = 0;
+- number = offs;
+- }
+- }
+- else
+- {
+- addr = XEXP (home, 0);
+-
+- letter = decl_function_context (decl) ? 'V' : 'S';
+-
+- /* Some ports can transform a symbol ref into a label ref,
+- because the symbol ref is too far away and has to be
+- dumped into a constant pool. Alternatively, the symbol
+- in the constant pool might be referenced by a different
+- symbol. */
+- if (GET_CODE (addr) == SYMBOL_REF
+- && CONSTANT_POOL_ADDRESS_P (addr))
+- {
+- bool marked;
+- rtx tmp = get_pool_constant_mark (addr, &marked);
+-
+- if (GET_CODE (tmp) == SYMBOL_REF)
+- {
+- addr = tmp;
+- if (CONSTANT_POOL_ADDRESS_P (addr))
+- get_pool_constant_mark (addr, &marked);
+- else
+- marked = true;
+- }
+- else if (GET_CODE (tmp) == LABEL_REF)
+- {
+- addr = tmp;
+- marked = true;
+- }
+-
+- /* If all references to the constant pool were optimized
+- out, we just ignore the symbol. */
+- if (!marked)
+- return 0;
+- }
+-
+- /* This should be the same condition as in assemble_variable, but
+- we don't have access to dont_output_data here. So, instead,
+- we rely on the fact that error_mark_node initializers always
+- end up in bss for C++ and never end up in bss for C. */
+- if (DECL_INITIAL (decl) == 0
+- || (lang_GNU_CXX ()
+- && DECL_INITIAL (decl) == error_mark_node))
+- {
+- int offs;
+- code = N_LCSYM;
+- if (dbxout_common_check (decl, &offs) != NULL)
+- {
+- addr = 0;
+- number = offs;
+- letter = 'V';
+- code = N_GSYM;
+- }
+- }
+- else if (DECL_IN_TEXT_SECTION (decl))
+- /* This is not quite right, but it's the closest
+- of all the codes that Unix defines. */
+- code = DBX_STATIC_CONST_VAR_CODE;
+- else
+- {
+- /* Ultrix `as' seems to need this. */
+-#ifdef DBX_STATIC_STAB_DATA_SECTION
+- switch_to_section (data_section);
+-#endif
+- code = N_STSYM;
+- }
+- }
+- }
+- else if (regno >= 0)
+- {
+- letter = 'r';
+- code = N_RSYM;
+- number = DBX_REGISTER_NUMBER (regno);
+- }
+- else if (MEM_P (home)
+- && (MEM_P (XEXP (home, 0))
+- || (REG_P (XEXP (home, 0))
+- && REGNO (XEXP (home, 0)) != HARD_FRAME_POINTER_REGNUM
+- && REGNO (XEXP (home, 0)) != STACK_POINTER_REGNUM
+-#if !HARD_FRAME_POINTER_IS_ARG_POINTER
+- && REGNO (XEXP (home, 0)) != ARG_POINTER_REGNUM
+-#endif
+- )))
+- /* If the value is indirect by memory or by a register
+- that isn't the frame pointer
+- then it means the object is variable-sized and address through
+- that register or stack slot. DBX has no way to represent this
+- so all we can do is output the variable as a pointer.
+- If it's not a parameter, ignore it. */
+- {
+- if (REG_P (XEXP (home, 0)))
+- {
+- letter = 'r';
+- code = N_RSYM;
+- if (REGNO (XEXP (home, 0)) >= FIRST_PSEUDO_REGISTER)
+- return 0;
+- number = DBX_REGISTER_NUMBER (REGNO (XEXP (home, 0)));
+- }
+- else
+- {
+- code = N_LSYM;
+- /* RTL looks like (MEM (MEM (PLUS (REG...) (CONST_INT...)))).
+- We want the value of that CONST_INT. */
+- number = DEBUGGER_AUTO_OFFSET (XEXP (XEXP (home, 0), 0));
+- }
+-
+- /* Effectively do build_pointer_type, but don't cache this type,
+- since it might be temporary whereas the type it points to
+- might have been saved for inlining. */
+- /* Don't use REFERENCE_TYPE because dbx can't handle that. */
+- type = make_node (POINTER_TYPE);
+- TREE_TYPE (type) = TREE_TYPE (decl);
+- }
+- else if (MEM_P (home)
+- && REG_P (XEXP (home, 0)))
+- {
+- code = N_LSYM;
+- number = DEBUGGER_AUTO_OFFSET (XEXP (home, 0));
+- }
+- else if (MEM_P (home)
+- && GET_CODE (XEXP (home, 0)) == PLUS
+- && CONST_INT_P (XEXP (XEXP (home, 0), 1)))
+- {
+- code = N_LSYM;
+- /* RTL looks like (MEM (PLUS (REG...) (CONST_INT...)))
+- We want the value of that CONST_INT. */
+- number = DEBUGGER_AUTO_OFFSET (XEXP (home, 0));
+- }
+- else if (MEM_P (home)
+- && GET_CODE (XEXP (home, 0)) == CONST)
+- {
+- /* Handle an obscure case which can arise when optimizing and
+- when there are few available registers. (This is *always*
+- the case for i386/i486 targets). The RTL looks like
+- (MEM (CONST ...)) even though this variable is a local `auto'
+- or a local `register' variable. In effect, what has happened
+- is that the reload pass has seen that all assignments and
+- references for one such a local variable can be replaced by
+- equivalent assignments and references to some static storage
+- variable, thereby avoiding the need for a register. In such
+- cases we're forced to lie to debuggers and tell them that
+- this variable was itself `static'. */
+- int offs;
+- code = N_LCSYM;
+- letter = 'V';
+- if (dbxout_common_check (decl, &offs) == NULL)
+- addr = XEXP (XEXP (home, 0), 0);
+- else
+- {
+- addr = 0;
+- number = offs;
+- code = N_GSYM;
+- }
+- }
+- else if (GET_CODE (home) == CONCAT)
+- {
+- tree subtype;
+-
+- /* If TYPE is not a COMPLEX_TYPE (it might be a RECORD_TYPE,
+- for example), then there is no easy way to figure out
+- what SUBTYPE should be. So, we give up. */
+- if (TREE_CODE (type) != COMPLEX_TYPE)
+- return 0;
+-
+- subtype = TREE_TYPE (type);
+-
+- /* If the variable's storage is in two parts,
+- output each as a separate stab with a modified name. */
+- if (WORDS_BIG_ENDIAN)
+- dbxout_symbol_location (decl, subtype, "$imag", XEXP (home, 0));
+- else
+- dbxout_symbol_location (decl, subtype, "$real", XEXP (home, 0));
+-
+- if (WORDS_BIG_ENDIAN)
+- dbxout_symbol_location (decl, subtype, "$real", XEXP (home, 1));
+- else
+- dbxout_symbol_location (decl, subtype, "$imag", XEXP (home, 1));
+- return 1;
+- }
+- else
+- /* Address might be a MEM, when DECL is a variable-sized object.
+- Or it might be const0_rtx, meaning previous passes
+- want us to ignore this variable. */
+- return 0;
+-
+- /* Ok, start a symtab entry and output the variable name. */
+- emit_pending_bincls_if_required ();
+- FORCE_TEXT;
+-
+-#ifdef DBX_STATIC_BLOCK_START
+- DBX_STATIC_BLOCK_START (asm_out_file, code);
+-#endif
+-
+- dbxout_begin_complex_stabs_noforcetext ();
+- dbxout_symbol_name (decl, suffix, letter);
+- dbxout_type (type, 0);
+- dbxout_finish_complex_stabs (decl, code, addr, 0, number);
+-
+-#ifdef DBX_STATIC_BLOCK_END
+- DBX_STATIC_BLOCK_END (asm_out_file, code);
+-#endif
+- return 1;
+-}
+-
+-/* Output the symbol name of DECL for a stabs, with suffix SUFFIX.
+- Then output LETTER to indicate the kind of location the symbol has. */
+-
+-static void
+-dbxout_symbol_name (tree decl, const char *suffix, int letter)
+-{
+- tree name;
+-
+- if (DECL_CONTEXT (decl)
+- && (TYPE_P (DECL_CONTEXT (decl))
+- || TREE_CODE (DECL_CONTEXT (decl)) == NAMESPACE_DECL))
+- /* One slight hitch: if this is a VAR_DECL which is a class member
+- or a namespace member, we must put out the mangled name instead of the
+- DECL_NAME. Note also that static member (variable) names DO NOT begin
+- with underscores in .stabs directives. */
+- name = DECL_ASSEMBLER_NAME (decl);
+- else
+- /* ...but if we're function-local, we don't want to include the junk
+- added by ASM_FORMAT_PRIVATE_NAME. */
+- name = DECL_NAME (decl);
+-
+- if (name)
+- stabstr_I (name);
+- else
+- stabstr_S ("(anon)");
+-
+- if (suffix)
+- stabstr_S (suffix);
+- stabstr_C (':');
+- if (letter)
+- stabstr_C (letter);
+-}
+-
+-
+-/* Output the common block name for DECL in a stabs.
+-
+- Symbols in global common (.comm) get wrapped with an N_BCOMM/N_ECOMM pair
+- around each group of symbols in the same .comm area. The N_GSYM stabs
+- that are emitted only contain the offset in the common area. This routine
+- emits the N_BCOMM and N_ECOMM stabs. */
+-
+-static void
+-dbxout_common_name (tree decl, const char *name, stab_code_type op)
+-{
+- dbxout_begin_complex_stabs ();
+- stabstr_S (name);
+- dbxout_finish_complex_stabs (decl, op, NULL_RTX, NULL, 0);
+-}
+-
+-/* Check decl to determine whether it is a VAR_DECL destined for storage in a
+- common area. If it is, the return value will be a non-null string giving
+- the name of the common storage block it will go into. If non-null, the
+- value is the offset into the common block for that symbol's storage. */
+-
+-static const char *
+-dbxout_common_check (tree decl, int *value)
+-{
+- rtx home;
+- rtx sym_addr;
+- const char *name = NULL;
+-
+- /* If the decl isn't a VAR_DECL, or if it isn't static, or if
+- it does not have a value (the offset into the common area), or if it
+- is thread local (as opposed to global) then it isn't common, and shouldn't
+- be handled as such.
+-
+- ??? DECL_THREAD_LOCAL_P check prevents problems with improper .stabs
+- for thread-local symbols. Can be handled via same mechanism as used
+- in dwarf2out.cc. */
+- if (!VAR_P (decl)
+- || !TREE_STATIC (decl)
+- || !DECL_HAS_VALUE_EXPR_P (decl)
+- || DECL_THREAD_LOCAL_P (decl)
+- || !is_fortran ())
+- return NULL;
+-
+- home = DECL_RTL (decl);
+- if (home == NULL_RTX || GET_CODE (home) != MEM)
+- return NULL;
+-
+- sym_addr = dbxout_expand_expr (DECL_VALUE_EXPR (decl));
+- if (sym_addr == NULL_RTX || GET_CODE (sym_addr) != MEM)
+- return NULL;
+-
+- sym_addr = XEXP (sym_addr, 0);
+- if (GET_CODE (sym_addr) == CONST)
+- sym_addr = XEXP (sym_addr, 0);
+- if ((GET_CODE (sym_addr) == SYMBOL_REF || GET_CODE (sym_addr) == PLUS)
+- && DECL_INITIAL (decl) == 0)
+- {
+-
+- /* We have a sym that will go into a common area, meaning that it
+- will get storage reserved with a .comm/.lcomm assembler pseudo-op.
+-
+- Determine name of common area this symbol will be an offset into,
+- and offset into that area. Also retrieve the decl for the area
+- that the symbol is offset into. */
+- tree cdecl = NULL;
+-
+- switch (GET_CODE (sym_addr))
+- {
+- case PLUS:
+- if (CONST_INT_P (XEXP (sym_addr, 0)))
+- {
+- name =
+- targetm.strip_name_encoding (XSTR (XEXP (sym_addr, 1), 0));
+- *value = INTVAL (XEXP (sym_addr, 0));
+- cdecl = SYMBOL_REF_DECL (XEXP (sym_addr, 1));
+- }
+- else
+- {
+- name =
+- targetm.strip_name_encoding (XSTR (XEXP (sym_addr, 0), 0));
+- *value = INTVAL (XEXP (sym_addr, 1));
+- cdecl = SYMBOL_REF_DECL (XEXP (sym_addr, 0));
+- }
+- break;
+-
+- case SYMBOL_REF:
+- name = targetm.strip_name_encoding (XSTR (sym_addr, 0));
+- *value = 0;
+- cdecl = SYMBOL_REF_DECL (sym_addr);
+- break;
+-
+- default:
+- error ("common symbol debug info is not structured as "
+- "symbol+offset");
+- }
+-
+- /* Check area common symbol is offset into. If this is not public, then
+- it is not a symbol in a common block. It must be a .lcomm symbol, not
+- a .comm symbol. */
+- if (cdecl == NULL || !TREE_PUBLIC (cdecl))
+- name = NULL;
+- }
+- else
+- name = NULL;
+-
+- return name;
+-}
+-
+-/* Output definitions of all the decls in a chain. Return nonzero if
+- anything was output */
+-
+-int
+-dbxout_syms (tree syms)
+-{
+- int result = 0;
+- const char *comm_prev = NULL;
+- tree syms_prev = NULL;
+-
+- while (syms)
+- {
+- int temp, copen, cclos;
+- const char *comm_new;
+-
+- /* Check for common symbol, and then progression into a new/different
+- block of common symbols. Emit closing/opening common bracket if
+- necessary. */
+- comm_new = dbxout_common_check (syms, &temp);
+- copen = comm_new != NULL
+- && (comm_prev == NULL || strcmp (comm_new, comm_prev));
+- cclos = comm_prev != NULL
+- && (comm_new == NULL || strcmp (comm_new, comm_prev));
+- if (cclos)
+- dbxout_common_name (syms_prev, comm_prev, N_ECOMM);
+- if (copen)
+- {
+- dbxout_common_name (syms, comm_new, N_BCOMM);
+- syms_prev = syms;
+- }
+- comm_prev = comm_new;
+-
+- result += dbxout_symbol (syms, 1);
+- syms = DECL_CHAIN (syms);
+- }
+-
+- if (comm_prev != NULL)
+- dbxout_common_name (syms_prev, comm_prev, N_ECOMM);
+-
+- return result;
+-}
+-
+-/* The following two functions output definitions of function parameters.
+- Each parameter gets a definition locating it in the parameter list.
+- Each parameter that is a register variable gets a second definition
+- locating it in the register.
+-
+- Printing or argument lists in gdb uses the definitions that
+- locate in the parameter list. But reference to the variable in
+- expressions uses preferentially the definition as a register. */
+-
+-/* Output definitions, referring to storage in the parmlist,
+- of all the parms in PARMS, which is a chain of PARM_DECL nodes. */
+-
+-void
+-dbxout_parms (tree parms)
+-{
+- ++debug_nesting;
+- emit_pending_bincls_if_required ();
+- fixed_size_mode rtl_mode, type_mode;
+-
+- for (; parms; parms = DECL_CHAIN (parms))
+- if (DECL_NAME (parms)
+- && TREE_TYPE (parms) != error_mark_node
+- && DECL_RTL_SET_P (parms)
+- && DECL_INCOMING_RTL (parms)
+- /* We can't represent variable-sized types in this format. */
+- && is_a <fixed_size_mode> (TYPE_MODE (TREE_TYPE (parms)), &type_mode)
+- && is_a <fixed_size_mode> (GET_MODE (DECL_RTL (parms)), &rtl_mode))
+- {
+- tree eff_type;
+- char letter;
+- stab_code_type code;
+- int number;
+-
+- /* Perform any necessary register eliminations on the parameter's rtl,
+- so that the debugging output will be accurate. */
+- DECL_INCOMING_RTL (parms)
+- = eliminate_regs (DECL_INCOMING_RTL (parms), VOIDmode, NULL_RTX);
+- SET_DECL_RTL (parms,
+- eliminate_regs (DECL_RTL (parms), VOIDmode, NULL_RTX));
+-#ifdef LEAF_REG_REMAP
+- if (crtl->uses_only_leaf_regs)
+- {
+- leaf_renumber_regs_insn (DECL_INCOMING_RTL (parms));
+- leaf_renumber_regs_insn (DECL_RTL (parms));
+- }
+-#endif
+-
+- if (PARM_PASSED_IN_MEMORY (parms))
+- {
+- rtx inrtl = XEXP (DECL_INCOMING_RTL (parms), 0);
+-
+- /* ??? Here we assume that the parm address is indexed
+- off the frame pointer or arg pointer.
+- If that is not true, we produce meaningless results,
+- but do not crash. */
+- if (GET_CODE (inrtl) == PLUS
+- && CONST_INT_P (XEXP (inrtl, 1)))
+- number = INTVAL (XEXP (inrtl, 1));
+- else
+- number = 0;
+-
+- code = N_PSYM;
+- number = DEBUGGER_ARG_OFFSET (number, inrtl);
+- letter = 'p';
+-
+- /* It is quite tempting to use TREE_TYPE (parms) instead
+- of DECL_ARG_TYPE (parms) for the eff_type, so that gcc
+- reports the actual type of the parameter, rather than
+- the promoted type. This certainly makes GDB's life
+- easier, at least for some ports. The change is a bad
+- idea however, since GDB expects to be able access the
+- type without performing any conversions. So for
+- example, if we were passing a float to an unprototyped
+- function, gcc will store a double on the stack, but if
+- we emit a stab saying the type is a float, then gdb
+- will only read in a single value, and this will produce
+- an erroneous value. */
+- eff_type = DECL_ARG_TYPE (parms);
+- }
+- else if (REG_P (DECL_RTL (parms)))
+- {
+- rtx best_rtl;
+-
+- /* Parm passed in registers and lives in registers or nowhere. */
+- code = DBX_REGPARM_STABS_CODE;
+- letter = DBX_REGPARM_STABS_LETTER;
+-
+- /* For parms passed in registers, it is better to use the
+- declared type of the variable, not the type it arrived in. */
+- eff_type = TREE_TYPE (parms);
+-
+- /* If parm lives in a register, use that register; pretend
+- the parm was passed there. It would be more consistent
+- to describe the register where the parm was passed, but
+- in practice that register usually holds something else.
+- If the parm lives nowhere, use the register where it
+- was passed. */
+- if (REGNO (DECL_RTL (parms)) < FIRST_PSEUDO_REGISTER)
+- best_rtl = DECL_RTL (parms);
+- else if (GET_CODE (DECL_INCOMING_RTL (parms)) == PARALLEL)
+- best_rtl = XEXP (XVECEXP (DECL_INCOMING_RTL (parms), 0, 0), 0);
+- else
+- best_rtl = DECL_INCOMING_RTL (parms);
+-
+- number = DBX_REGISTER_NUMBER (REGNO (best_rtl));
+- }
+- else if (MEM_P (DECL_RTL (parms))
+- && REG_P (XEXP (DECL_RTL (parms), 0))
+- && REGNO (XEXP (DECL_RTL (parms), 0)) != HARD_FRAME_POINTER_REGNUM
+- && REGNO (XEXP (DECL_RTL (parms), 0)) != STACK_POINTER_REGNUM
+-#if !HARD_FRAME_POINTER_IS_ARG_POINTER
+- && REGNO (XEXP (DECL_RTL (parms), 0)) != ARG_POINTER_REGNUM
+-#endif
+- )
+- {
+- /* Parm was passed via invisible reference.
+- That is, its address was passed in a register.
+- Output it as if it lived in that register.
+- The debugger will know from the type
+- that it was actually passed by invisible reference. */
+-
+- code = DBX_REGPARM_STABS_CODE;
+-
+- /* GDB likes this marked with a special letter. */
+- letter = (use_gnu_debug_info_extensions
+- ? 'a' : DBX_REGPARM_STABS_LETTER);
+- eff_type = TREE_TYPE (parms);
+-
+- /* DECL_RTL looks like (MEM (REG...). Get the register number.
+- If it is an unallocated pseudo-reg, then use the register where
+- it was passed instead.
+- ??? Why is DBX_REGISTER_NUMBER not used here? */
+-
+- if (REGNO (XEXP (DECL_RTL (parms), 0)) < FIRST_PSEUDO_REGISTER)
+- number = REGNO (XEXP (DECL_RTL (parms), 0));
+- else
+- number = REGNO (DECL_INCOMING_RTL (parms));
+- }
+- else if (MEM_P (DECL_RTL (parms))
+- && MEM_P (XEXP (DECL_RTL (parms), 0)))
+- {
+- /* Parm was passed via invisible reference, with the reference
+- living on the stack. DECL_RTL looks like
+- (MEM (MEM (PLUS (REG ...) (CONST_INT ...)))) or it
+- could look like (MEM (MEM (REG))). */
+-
+- code = N_PSYM;
+- letter = 'v';
+- eff_type = TREE_TYPE (parms);
+-
+- if (!REG_P (XEXP (XEXP (DECL_RTL (parms), 0), 0)))
+- number = INTVAL (XEXP (XEXP (XEXP (DECL_RTL (parms), 0), 0), 1));
+- else
+- number = 0;
+-
+- number = DEBUGGER_ARG_OFFSET (number,
+- XEXP (XEXP (DECL_RTL (parms), 0), 0));
+- }
+- else if (MEM_P (DECL_RTL (parms))
+- && XEXP (DECL_RTL (parms), 0) != const0_rtx
+- /* ??? A constant address for a parm can happen
+- when the reg it lives in is equiv to a constant in memory.
+- Should make this not happen, after 2.4. */
+- && ! CONSTANT_P (XEXP (DECL_RTL (parms), 0)))
+- {
+- /* Parm was passed in registers but lives on the stack. */
+-
+- code = N_PSYM;
+- letter = 'p';
+- eff_type = TREE_TYPE (parms);
+-
+- /* DECL_RTL looks like (MEM (PLUS (REG...) (CONST_INT...))),
+- in which case we want the value of that CONST_INT,
+- or (MEM (REG ...)),
+- in which case we use a value of zero. */
+- if (!REG_P (XEXP (DECL_RTL (parms), 0)))
+- number = INTVAL (XEXP (XEXP (DECL_RTL (parms), 0), 1));
+- else
+- number = 0;
+-
+- /* Make a big endian correction if the mode of the type of the
+- parameter is not the same as the mode of the rtl. */
+- if (BYTES_BIG_ENDIAN
+- && type_mode != rtl_mode
+- && GET_MODE_SIZE (type_mode) < UNITS_PER_WORD)
+- number += GET_MODE_SIZE (rtl_mode) - GET_MODE_SIZE (type_mode);
+- }
+- else
+- /* ??? We don't know how to represent this argument. */
+- continue;
+-
+- dbxout_begin_complex_stabs ();
+-
+- if (DECL_NAME (parms))
+- {
+- stabstr_I (DECL_NAME (parms));
+- stabstr_C (':');
+- }
+- else
+- stabstr_S ("(anon):");
+- stabstr_C (letter);
+- dbxout_type (eff_type, 0);
+- dbxout_finish_complex_stabs (parms, code, 0, 0, number);
+- }
+- DBXOUT_DECR_NESTING;
+-}
+-
+-/* Output definitions for the places where parms live during the function,
+- when different from where they were passed, when the parms were passed
+- in memory.
+-
+- It is not useful to do this for parms passed in registers
+- that live during the function in different registers, because it is
+- impossible to look in the passed register for the passed value,
+- so we use the within-the-function register to begin with.
+-
+- PARMS is a chain of PARM_DECL nodes. */
+-
+-void
+-dbxout_reg_parms (tree parms)
+-{
+- ++debug_nesting;
+-
+- for (; parms; parms = DECL_CHAIN (parms))
+- if (DECL_NAME (parms) && PARM_PASSED_IN_MEMORY (parms))
+- {
+- /* Report parms that live in registers during the function
+- but were passed in memory. */
+- if (REG_P (DECL_RTL (parms))
+- && REGNO (DECL_RTL (parms)) < FIRST_PSEUDO_REGISTER)
+- dbxout_symbol_location (parms, TREE_TYPE (parms),
+- 0, DECL_RTL (parms));
+- else if (GET_CODE (DECL_RTL (parms)) == CONCAT)
+- dbxout_symbol_location (parms, TREE_TYPE (parms),
+- 0, DECL_RTL (parms));
+- /* Report parms that live in memory but not where they were passed. */
+- else if (MEM_P (DECL_RTL (parms))
+- && ! rtx_equal_p (DECL_RTL (parms), DECL_INCOMING_RTL (parms)))
+- dbxout_symbol_location (parms, TREE_TYPE (parms),
+- 0, DECL_RTL (parms));
+- }
+- DBXOUT_DECR_NESTING;
+-}
+-
+-/* Given a chain of ..._TYPE nodes (as come in a parameter list),
+- output definitions of those names, in raw form */
+-
+-static void
+-dbxout_args (tree args)
+-{
+- while (args)
+- {
+- stabstr_C (',');
+- dbxout_type (TREE_VALUE (args), 0);
+- args = TREE_CHAIN (args);
+- }
+-}
+-
+-#if defined (DBX_DEBUGGING_INFO)
+-
+-/* Subroutine of dbxout_block. Emit an N_LBRAC stab referencing LABEL.
+- BEGIN_LABEL is the name of the beginning of the function, which may
+- be required. */
+-static void
+-dbx_output_lbrac (const char *label,
+- const char *begin_label ATTRIBUTE_UNUSED)
+-{
+- dbxout_begin_stabn (N_LBRAC);
+- if (DBX_BLOCKS_FUNCTION_RELATIVE)
+- dbxout_stab_value_label_diff (label, begin_label);
+- else
+- dbxout_stab_value_label (label);
+-}
+-
+-/* Subroutine of dbxout_block. Emit an N_RBRAC stab referencing LABEL.
+- BEGIN_LABEL is the name of the beginning of the function, which may
+- be required. */
+-static void
+-dbx_output_rbrac (const char *label,
+- const char *begin_label ATTRIBUTE_UNUSED)
+-{
+- dbxout_begin_stabn (N_RBRAC);
+- if (DBX_BLOCKS_FUNCTION_RELATIVE)
+- dbxout_stab_value_label_diff (label, begin_label);
+- else
+- dbxout_stab_value_label (label);
+-}
+-
+-/* Return true if at least one block among BLOCK, its children or siblings
+- has TREE_USED, TREE_ASM_WRITTEN and BLOCK_IN_COLD_SECTION_P
+- set. If there is none, clear TREE_USED bit on such blocks. */
+-
+-static bool
+-dbx_block_with_cold_children (tree block)
+-{
+- bool ret = false;
+- for (; block; block = BLOCK_CHAIN (block))
+- if (TREE_USED (block) && TREE_ASM_WRITTEN (block))
+- {
+- bool children = dbx_block_with_cold_children (BLOCK_SUBBLOCKS (block));
+- if (BLOCK_IN_COLD_SECTION_P (block) || children)
+- ret = true;
+- else
+- TREE_USED (block) = false;
+- }
+- return ret;
+-}
+-
+-/* Output everything about a symbol block (a BLOCK node
+- that represents a scope level),
+- including recursive output of contained blocks.
+-
+- BLOCK is the BLOCK node.
+- DEPTH is its depth within containing symbol blocks.
+- ARGS is usually zero; but for the outermost block of the
+- body of a function, it is a chain of PARM_DECLs for the function parameters.
+- We output definitions of all the register parms
+- as if they were local variables of that block.
+-
+- If -g1 was used, we count blocks just the same, but output nothing
+- except for the outermost block.
+-
+- Actually, BLOCK may be several blocks chained together.
+- We handle them all in sequence.
+-
+- Return true if we emitted any LBRAC/RBRAC. */
+-
+-static bool
+-dbxout_block (tree block, int depth, tree args, int parent_blocknum)
+-{
+- bool ret = false;
+- char begin_label[20];
+- /* Reference current function start using LFBB. */
+- ASM_GENERATE_INTERNAL_LABEL (begin_label, "LFBB", scope_labelno);
+-
+- /* If called for the second partition, ignore blocks that don't have
+- any children in the second partition. */
+- if (crtl->has_bb_partition && in_cold_section_p && depth == 0)
+- dbx_block_with_cold_children (block);
+-
+- for (; block; block = BLOCK_CHAIN (block))
+- {
+- /* Ignore blocks never expanded or otherwise marked as real. */
+- if (TREE_USED (block) && TREE_ASM_WRITTEN (block))
+- {
+- int did_output;
+- int blocknum = BLOCK_NUMBER (block);
+- int this_parent = parent_blocknum;
+-
+- /* In dbx format, the syms of a block come before the N_LBRAC.
+- If nothing is output, we don't need the N_LBRAC, either. */
+- did_output = 0;
+- if (debug_info_level != DINFO_LEVEL_TERSE || depth == 0)
+- did_output = dbxout_syms (BLOCK_VARS (block));
+- if (args)
+- dbxout_reg_parms (args);
+-
+- /* Now output an N_LBRAC symbol to represent the beginning of
+- the block. Use the block's tree-walk order to generate
+- the assembler symbols LBBn and LBEn
+- that final will define around the code in this block. */
+- if (did_output
+- && BLOCK_IN_COLD_SECTION_P (block) == in_cold_section_p)
+- {
+- char buf[20];
+- const char *scope_start;
+-
+- ret = true;
+- if (depth == 0)
+- /* The outermost block doesn't get LBB labels; use
+- the LFBB local symbol emitted by dbxout_begin_prologue. */
+- scope_start = begin_label;
+- else
+- {
+- ASM_GENERATE_INTERNAL_LABEL (buf, "LBB", blocknum);
+- scope_start = buf;
+- this_parent = blocknum;
+- }
+-
+- dbx_output_lbrac (scope_start, begin_label);
+- }
+-
+- /* Output the subblocks. */
+- bool children
+- = dbxout_block (BLOCK_SUBBLOCKS (block), depth + 1, NULL_TREE,
+- this_parent);
+- ret |= children;
+-
+- /* Refer to the marker for the end of the block. */
+- if (did_output
+- && BLOCK_IN_COLD_SECTION_P (block) == in_cold_section_p)
+- {
+- char buf[100];
+- if (depth == 0)
+- /* The outermost block doesn't get LBE labels;
+- use the "scope" label which will be emitted
+- by dbxout_function_end. */
+- ASM_GENERATE_INTERNAL_LABEL (buf, "Lscope", scope_labelno);
+- else
+- ASM_GENERATE_INTERNAL_LABEL (buf, "LBE", blocknum);
+-
+- dbx_output_rbrac (buf, begin_label);
+- }
+- else if (did_output && !children)
+- {
+- /* If we emitted any vars and didn't output any LBRAC/RBRAC,
+- either at this level or any lower level, we need to emit
+- an empty LBRAC/RBRAC pair now. */
+- char buf[30];
+- const char *scope_start;
+-
+- ret = true;
+- if (parent_blocknum == -1)
+- scope_start = begin_label;
+- else
+- {
+- ASM_GENERATE_INTERNAL_LABEL (buf, "LBB", parent_blocknum);
+- scope_start = buf;
+- }
+-
+- dbx_output_lbrac (scope_start, begin_label);
+- dbx_output_rbrac (scope_start, begin_label);
+- }
+- }
+- }
+- return ret;
+-}
+-
+-/* Output the information about a function and its arguments and result.
+- Usually this follows the function's code,
+- but on some systems, it comes before. */
+-
+-static void
+-dbxout_begin_function (tree decl)
+-{
+- int saved_tree_used1;
+-
+- saved_tree_used1 = TREE_USED (decl);
+- TREE_USED (decl) = 1;
+- if (DECL_NAME (DECL_RESULT (decl)) != 0)
+- {
+- int saved_tree_used2 = TREE_USED (DECL_RESULT (decl));
+- TREE_USED (DECL_RESULT (decl)) = 1;
+- dbxout_symbol (decl, 0);
+- TREE_USED (DECL_RESULT (decl)) = saved_tree_used2;
+- }
+- else
+- dbxout_symbol (decl, 0);
+- TREE_USED (decl) = saved_tree_used1;
+-
+- dbxout_parms (DECL_ARGUMENTS (decl));
+- if (DECL_NAME (DECL_RESULT (decl)) != 0)
+- dbxout_symbol (DECL_RESULT (decl), 1);
+-}
+-#endif /* DBX_DEBUGGING_INFO */
+-
+-#endif /* DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO */
+-
+-/* Record an element in the table of global destructors. SYMBOL is
+- a SYMBOL_REF of the function to be called; PRIORITY is a number
+- between 0 and MAX_INIT_PRIORITY. */
+-
+-void
+-default_stabs_asm_out_destructor (rtx symbol ATTRIBUTE_UNUSED,
+- int priority ATTRIBUTE_UNUSED)
+-{
+-#if defined DBX_DEBUGGING_INFO || defined XCOFF_DEBUGGING_INFO
+- /* Tell GNU LD that this is part of the static destructor set.
+- This will work for any system that uses stabs, most usefully
+- aout systems. */
+- dbxout_begin_simple_stabs ("___DTOR_LIST__", 22 /* N_SETT */);
+- dbxout_stab_value_label (XSTR (symbol, 0));
+-#else
+- sorry ("global destructors not supported on this target");
+-#endif
+-}
+-
+-/* Likewise for global constructors. */
+-
+-void
+-default_stabs_asm_out_constructor (rtx symbol ATTRIBUTE_UNUSED,
+- int priority ATTRIBUTE_UNUSED)
+-{
+-#if defined DBX_DEBUGGING_INFO || defined XCOFF_DEBUGGING_INFO
+- /* Tell GNU LD that this is part of the static destructor set.
+- This will work for any system that uses stabs, most usefully
+- aout systems. */
+- dbxout_begin_simple_stabs ("___CTOR_LIST__", 22 /* N_SETT */);
+- dbxout_stab_value_label (XSTR (symbol, 0));
+-#else
+- sorry ("global constructors not supported on this target");
+-#endif
+-}
+-
+-#include "gt-dbxout.h"
+diff --git a/gcc/dbxout.h b/gcc/dbxout.h
+deleted file mode 100644
+index 2c38e76c2..000000000
+--- a/gcc/dbxout.h
++++ /dev/null
+@@ -1,60 +0,0 @@
+-/* dbxout.h - Various declarations for functions found in dbxout.cc
+- Copyright (C) 1998-2022 Free Software Foundation, Inc.
+-
+-This file is part of GCC.
+-
+-GCC is free software; you can redistribute it and/or modify it under
+-the terms of the GNU General Public License as published by the Free
+-Software Foundation; either version 3, or (at your option) any later
+-version.
+-
+-GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+-WARRANTY; without even the implied warranty of MERCHANTABILITY or
+-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+-for more details.
+-
+-You should have received a copy of the GNU General Public License
+-along with GCC; see the file COPYING3. If not see
+-<http://www.gnu.org/licenses/>. */
+-
+-#ifndef GCC_DBXOUT_H
+-#define GCC_DBXOUT_H
+-
+-extern int dbxout_symbol (tree, int);
+-extern void dbxout_parms (tree);
+-extern void dbxout_reg_parms (tree);
+-extern int dbxout_syms (tree);
+-
+-extern void default_stabs_asm_out_destructor (rtx, int);
+-extern void default_stabs_asm_out_constructor (rtx, int);
+-
+-/* dbxout helper functions */
+-#if defined DBX_DEBUGGING_INFO || defined XCOFF_DEBUGGING_INFO
+-
+-extern void dbxout_int (int);
+-extern void dbxout_stabd (int, int);
+-extern void dbxout_begin_stabn (int);
+-extern void dbxout_begin_stabn_sline (int);
+-extern void dbxout_begin_empty_stabs (int);
+-extern void dbxout_begin_simple_stabs (const char *, int);
+-extern void dbxout_begin_simple_stabs_desc (const char *, int, int);
+-
+-extern void dbxout_stab_value_zero (void);
+-extern void dbxout_stab_value_label (const char *);
+-extern void dbxout_stab_value_label_diff (const char *, const char *);
+-extern void dbxout_stab_value_internal_label (const char *, int *);
+-extern void dbxout_stab_value_internal_label_diff (const char *, int *,
+- const char *);
+-#endif
+-
+-/* Language description for N_SO stabs. */
+-#define N_SO_AS 1
+-#define N_SO_C 2
+-#define N_SO_ANSI_C 3
+-#define N_SO_CC 4 /* c++*/
+-#define N_SO_FORTRAN 5
+-#define N_SO_FORTRAN90 7
+-#define N_SO_OBJC 50
+-#define N_SO_OBJCPLUS 51
+-
+-#endif /* GCC_DBXOUT_H */
+diff --git a/gcc/debug.h b/gcc/debug.h
+index 17a7e4862..fe85115d5 100644
+--- a/gcc/debug.h
++++ b/gcc/debug.h
+@@ -238,7 +238,6 @@ extern void debug_nothing_tree_charstar_uhwi (tree, const char *,
+
+ /* Hooks for various debug formats. */
+ extern const struct gcc_debug_hooks do_nothing_debug_hooks;
+-extern const struct gcc_debug_hooks dbx_debug_hooks;
+ extern const struct gcc_debug_hooks xcoff_debug_hooks;
+ extern const struct gcc_debug_hooks dwarf2_debug_hooks;
+ extern const struct gcc_debug_hooks dwarf2_lineno_debug_hooks;
+diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
+index 19d073256..a650f60c7 100644
+--- a/gcc/doc/install.texi
++++ b/gcc/doc/install.texi
+@@ -3982,8 +3982,7 @@ on FreeBSD 7 or later) and the use of @code{__cxa_atexit} by default
+ by GCC 4.5 and above.
+
+ We support FreeBSD using the ELF file format with DWARF 2 debugging
+-for all CPU architectures. You may use @option{-gstabs} instead of
+-@option{-g}, if you really want the old debugging format. There are
++for all CPU architectures. There are
+ no known issues with mixing object files and libraries with different
+ debugging formats. Otherwise, this release of GCC should now match
+ more of the configuration used in the stock FreeBSD configuration of
+diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
+index 4d3eccdb2..7ca60dd64 100644
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -45,7 +45,7 @@ remainder. @command{g++} accepts mostly the same options as @command{gcc}.
+ @c man end
+ @c man begin SEEALSO
+ gpl(7), gfdl(7), fsf-funding(7),
+-cpp(1), gcov(1), as(1), ld(1), gdb(1), dbx(1)
++cpp(1), gcov(1), as(1), ld(1), gdb(1)
+ and the Info entries for @file{gcc}, @file{cpp}, @file{as},
+ @file{ld}, @file{binutils} and @file{gdb}.
+ @c man end
+@@ -480,7 +480,7 @@ Objective-C and Objective-C++ Dialects}.
+ @gccoptlist{-g -g@var{level} -gdwarf -gdwarf-@var{version} @gol
+ -gbtf -gctf -gctf@var{level} @gol
+ -ggdb -grecord-gcc-switches -gno-record-gcc-switches @gol
+--gstabs -gstabs+ -gstrict-dwarf -gno-strict-dwarf @gol
++-gstrict-dwarf -gno-strict-dwarf @gol
+ -gas-loc-support -gno-as-loc-support @gol
+ -gas-locview-support -gno-as-locview-support @gol
+ -gcolumn-info -gno-column-info -gdwarf32 -gdwarf64 @gol
+@@ -488,7 +488,7 @@ Objective-C and Objective-C++ Dialects}.
+ -gvariable-location-views -gno-variable-location-views @gol
+ -ginternal-reset-location-views -gno-internal-reset-location-views @gol
+ -ginline-points -gno-inline-points @gol
+--gvms -gxcoff -gxcoff+ -gz@r{[}=@var{type}@r{]} @gol
++-gvms -gz@r{[}=@var{type}@r{]} @gol
+ -gsplit-dwarf -gdescribe-dies -gno-describe-dies @gol
+ -fdebug-prefix-map=@var{old}=@var{new} -fdebug-types-section @gol
+ -fno-eliminate-unused-debug-types @gol
+@@ -10276,10 +10276,8 @@ information.
+ On most systems that use stabs format, @option{-g} enables use of extra
+ debugging information that only GDB can use; this extra information
+ makes debugging work better in GDB but probably makes other debuggers
+-crash or
+-refuse to read the program. If you want to control for certain whether
+-to generate the extra information, use @option{-gstabs+}, @option{-gstabs},
+-@option{-gxcoff+}, @option{-gxcoff}, or @option{-gvms} (see below).
++crash or refuse to read the program. If you want to control for certain whether
++to generate the extra information, use @option{-gvms} (see below).
+
+ @item -ggdb
+ @opindex ggdb
+@@ -10336,34 +10334,6 @@ information, but does not include type information.
+ Level 2 produces type information for entities (functions, data objects etc.)
+ at file-scope or global-scope only.
+
+-@item -gstabs
+-@opindex gstabs
+-Produce debugging information in stabs format (if that is supported),
+-without GDB extensions. This is the format used by DBX on most BSD
+-systems. On MIPS, Alpha and System V Release 4 systems this option
+-produces stabs debugging output that is not understood by DBX@.
+-On System V Release 4 systems this option requires the GNU assembler.
+-
+-@item -gstabs+
+-@opindex gstabs+
+-Produce debugging information in stabs format (if that is supported),
+-using GNU extensions understood only by the GNU debugger (GDB)@. The
+-use of these extensions is likely to make other debuggers crash or
+-refuse to read the program.
+-
+-@item -gxcoff
+-@opindex gxcoff
+-Produce debugging information in XCOFF format (if that is supported).
+-This is the format used by the DBX debugger on IBM RS/6000 systems.
+-
+-@item -gxcoff+
+-@opindex gxcoff+
+-Produce debugging information in XCOFF format (if that is supported),
+-using GNU extensions understood only by the GNU debugger (GDB)@. The
+-use of these extensions is likely to make other debuggers crash or
+-refuse to read the program, and may cause assemblers other than the GNU
+-assembler (GAS) to fail with an error.
+-
+ @item -gvms
+ @opindex gvms
+ Produce debugging information in Alpha/VMS debug format (if that is
+@@ -10371,8 +10341,6 @@ supported). This is the format used by DEBUG on Alpha/VMS systems.
+
+ @item -g@var{level}
+ @itemx -ggdb@var{level}
+-@itemx -gstabs@var{level}
+-@itemx -gxcoff@var{level}
+ @itemx -gvms@var{level}
+ Request debugging information and also use @var{level} to specify how
+ much information. The default level is 2.
+diff --git a/gcc/doc/passes.texi b/gcc/doc/passes.texi
+index 1e821d4e5..9e8b4f50a 100644
+--- a/gcc/doc/passes.texi
++++ b/gcc/doc/passes.texi
+@@ -1184,7 +1184,7 @@ these files.
+
+ This is run after final because it must output the stack slot offsets
+ for pseudo registers that did not get hard registers. Source files
+-are @file{dbxout.cc} for DBX symbol table format, @file{dwarfout.c} for
++are @file{dwarfout.c} for
+ DWARF symbol table format, files @file{dwarf2out.cc} and @file{dwarf2asm.cc}
+ for DWARF2 symbol table format, and @file{vmsdbgout.cc} for VMS debug
+ symbol table format.
+diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
+index 2aba523bb..851d31c18 100644
+--- a/gcc/doc/tm.texi
++++ b/gcc/doc/tm.texi
+@@ -9912,9 +9912,6 @@ This describes how to specify debugging information.
+
+ @menu
+ * All Debuggers:: Macros that affect all debugging formats uniformly.
+-* DBX Options:: Macros enabling specific options in DBX format.
+-* DBX Hooks:: Hook macros for varying DBX format.
+-* File Names and DBX:: Macros controlling output of file names in DBX format.
+ * DWARF:: Macros for DWARF format.
+ * VMS Debug:: Macros for VMS debug format.
+ * CTF Debug:: Macros for CTF debug format.
+@@ -9965,35 +9962,18 @@ having address @var{x} (an RTL expression). The nominal offset is
+ A C expression that returns the type of debugging output GCC should
+ produce when the user specifies just @option{-g}. Define
+ this if you have arranged for GCC to support more than one format of
+-debugging output. Currently, the allowable values are @code{DBX_DEBUG},
+-@code{DWARF2_DEBUG}, @code{XCOFF_DEBUG}, @code{VMS_DEBUG},
++debugging output. Currently, the allowable values are
++@code{DWARF2_DEBUG}, @code{VMS_DEBUG},
+ and @code{VMS_AND_DWARF2_DEBUG}.
+
+ When the user specifies @option{-ggdb}, GCC normally also uses the
+ value of this macro to select the debugging output format, but with two
+ exceptions. If @code{DWARF2_DEBUGGING_INFO} is defined, GCC uses the
+-value @code{DWARF2_DEBUG}. Otherwise, if @code{DBX_DEBUGGING_INFO} is
+-defined, GCC uses @code{DBX_DEBUG}.
++value @code{DWARF2_DEBUG}.
+
+ The value of this macro only affects the default debugging output; the
+-user can always get a specific type of output by using @option{-gstabs},
+-@option{-gdwarf-2}, @option{-gxcoff}, or @option{-gvms}.
+-@end defmac
+-
+-@node DBX Options
+-@subsection Specific Options for DBX Output
+-
+-@c prevent bad page break with this line
+-These are specific options for DBX output.
+-
+-@defmac DBX_DEBUGGING_INFO
+-Define this macro if GCC should produce debugging output for DBX
+-in response to the @option{-g} option.
+-@end defmac
+-
+-@defmac XCOFF_DEBUGGING_INFO
+-Define this macro if GCC should produce XCOFF format debugging output
+-in response to the @option{-g} option. This is a variant of DBX format.
++user can always get a specific type of output by using @option{-gdwarf-2},
++or @option{-gvms}.
+ @end defmac
+
+ @defmac DEFAULT_GDB_EXTENSIONS
+@@ -10004,196 +9984,6 @@ macro, the default is 1: always generate the extended information
+ if there is any occasion to.
+ @end defmac
+
+-@defmac DEBUG_SYMS_TEXT
+-Define this macro if all @code{.stabs} commands should be output while
+-in the text section.
+-@end defmac
+-
+-@defmac ASM_STABS_OP
+-A C string constant, including spacing, naming the assembler pseudo op to
+-use instead of @code{"\t.stabs\t"} to define an ordinary debugging symbol.
+-If you don't define this macro, @code{"\t.stabs\t"} is used. This macro
+-applies only to DBX debugging information format.
+-@end defmac
+-
+-@defmac ASM_STABD_OP
+-A C string constant, including spacing, naming the assembler pseudo op to
+-use instead of @code{"\t.stabd\t"} to define a debugging symbol whose
+-value is the current location. If you don't define this macro,
+-@code{"\t.stabd\t"} is used. This macro applies only to DBX debugging
+-information format.
+-@end defmac
+-
+-@defmac ASM_STABN_OP
+-A C string constant, including spacing, naming the assembler pseudo op to
+-use instead of @code{"\t.stabn\t"} to define a debugging symbol with no
+-name. If you don't define this macro, @code{"\t.stabn\t"} is used. This
+-macro applies only to DBX debugging information format.
+-@end defmac
+-
+-@defmac DBX_NO_XREFS
+-Define this macro if DBX on your system does not support the construct
+-@samp{xs@var{tagname}}. On some systems, this construct is used to
+-describe a forward reference to a structure named @var{tagname}.
+-On other systems, this construct is not supported at all.
+-@end defmac
+-
+-@defmac DBX_CONTIN_LENGTH
+-A symbol name in DBX-format debugging information is normally
+-continued (split into two separate @code{.stabs} directives) when it
+-exceeds a certain length (by default, 80 characters). On some
+-operating systems, DBX requires this splitting; on others, splitting
+-must not be done. You can inhibit splitting by defining this macro
+-with the value zero. You can override the default splitting-length by
+-defining this macro as an expression for the length you desire.
+-@end defmac
+-
+-@defmac DBX_CONTIN_CHAR
+-Normally continuation is indicated by adding a @samp{\} character to
+-the end of a @code{.stabs} string when a continuation follows. To use
+-a different character instead, define this macro as a character
+-constant for the character you want to use. Do not define this macro
+-if backslash is correct for your system.
+-@end defmac
+-
+-@defmac DBX_STATIC_STAB_DATA_SECTION
+-Define this macro if it is necessary to go to the data section before
+-outputting the @samp{.stabs} pseudo-op for a non-global static
+-variable.
+-@end defmac
+-
+-@defmac DBX_TYPE_DECL_STABS_CODE
+-The value to use in the ``code'' field of the @code{.stabs} directive
+-for a typedef. The default is @code{N_LSYM}.
+-@end defmac
+-
+-@defmac DBX_STATIC_CONST_VAR_CODE
+-The value to use in the ``code'' field of the @code{.stabs} directive
+-for a static variable located in the text section. DBX format does not
+-provide any ``right'' way to do this. The default is @code{N_FUN}.
+-@end defmac
+-
+-@defmac DBX_REGPARM_STABS_CODE
+-The value to use in the ``code'' field of the @code{.stabs} directive
+-for a parameter passed in registers. DBX format does not provide any
+-``right'' way to do this. The default is @code{N_RSYM}.
+-@end defmac
+-
+-@defmac DBX_REGPARM_STABS_LETTER
+-The letter to use in DBX symbol data to identify a symbol as a parameter
+-passed in registers. DBX format does not customarily provide any way to
+-do this. The default is @code{'P'}.
+-@end defmac
+-
+-@defmac DBX_FUNCTION_FIRST
+-Define this macro if the DBX information for a function and its
+-arguments should precede the assembler code for the function. Normally,
+-in DBX format, the debugging information entirely follows the assembler
+-code.
+-@end defmac
+-
+-@defmac DBX_BLOCKS_FUNCTION_RELATIVE
+-Define this macro, with value 1, if the value of a symbol describing
+-the scope of a block (@code{N_LBRAC} or @code{N_RBRAC}) should be
+-relative to the start of the enclosing function. Normally, GCC uses
+-an absolute address.
+-@end defmac
+-
+-@defmac DBX_LINES_FUNCTION_RELATIVE
+-Define this macro, with value 1, if the value of a symbol indicating
+-the current line number (@code{N_SLINE}) should be relative to the
+-start of the enclosing function. Normally, GCC uses an absolute address.
+-@end defmac
+-
+-@defmac DBX_USE_BINCL
+-Define this macro if GCC should generate @code{N_BINCL} and
+-@code{N_EINCL} stabs for included header files, as on Sun systems. This
+-macro also directs GCC to output a type number as a pair of a file
+-number and a type number within the file. Normally, GCC does not
+-generate @code{N_BINCL} or @code{N_EINCL} stabs, and it outputs a single
+-number for a type number.
+-@end defmac
+-
+-@node DBX Hooks
+-@subsection Open-Ended Hooks for DBX Format
+-
+-@c prevent bad page break with this line
+-These are hooks for DBX format.
+-
+-@defmac DBX_OUTPUT_SOURCE_LINE (@var{stream}, @var{line}, @var{counter})
+-A C statement to output DBX debugging information before code for line
+-number @var{line} of the current source file to the stdio stream
+-@var{stream}. @var{counter} is the number of time the macro was
+-invoked, including the current invocation; it is intended to generate
+-unique labels in the assembly output.
+-
+-This macro should not be defined if the default output is correct, or
+-if it can be made correct by defining @code{DBX_LINES_FUNCTION_RELATIVE}.
+-@end defmac
+-
+-@defmac NO_DBX_FUNCTION_END
+-Some stabs encapsulation formats (in particular ECOFF), cannot handle the
+-@code{.stabs "",N_FUN,,0,0,Lscope-function-1} gdb dbx extension construct.
+-On those machines, define this macro to turn this feature off without
+-disturbing the rest of the gdb extensions.
+-@end defmac
+-
+-@defmac NO_DBX_BNSYM_ENSYM
+-Some assemblers cannot handle the @code{.stabd BNSYM/ENSYM,0,0} gdb dbx
+-extension construct. On those machines, define this macro to turn this
+-feature off without disturbing the rest of the gdb extensions.
+-@end defmac
+-
+-@node File Names and DBX
+-@subsection File Names in DBX Format
+-
+-@c prevent bad page break with this line
+-This describes file names in DBX format.
+-
+-@defmac DBX_OUTPUT_MAIN_SOURCE_FILENAME (@var{stream}, @var{name})
+-A C statement to output DBX debugging information to the stdio stream
+-@var{stream}, which indicates that file @var{name} is the main source
+-file---the file specified as the input file for compilation.
+-This macro is called only once, at the beginning of compilation.
+-
+-This macro need not be defined if the standard form of output
+-for DBX debugging information is appropriate.
+-
+-It may be necessary to refer to a label equal to the beginning of the
+-text section. You can use @samp{assemble_name (stream, ltext_label_name)}
+-to do so. If you do this, you must also set the variable
+-@var{used_ltext_label_name} to @code{true}.
+-@end defmac
+-
+-@defmac NO_DBX_MAIN_SOURCE_DIRECTORY
+-Define this macro, with value 1, if GCC should not emit an indication
+-of the current directory for compilation and current source language at
+-the beginning of the file.
+-@end defmac
+-
+-@defmac NO_DBX_GCC_MARKER
+-Define this macro, with value 1, if GCC should not emit an indication
+-that this object file was compiled by GCC@. The default is to emit
+-an @code{N_OPT} stab at the beginning of every source file, with
+-@samp{gcc2_compiled.} for the string and value 0.
+-@end defmac
+-
+-@defmac DBX_OUTPUT_MAIN_SOURCE_FILE_END (@var{stream}, @var{name})
+-A C statement to output DBX debugging information at the end of
+-compilation of the main source file @var{name}. Output should be
+-written to the stdio stream @var{stream}.
+-
+-If you don't define this macro, nothing special is output at the end
+-of compilation, which is correct for most machines.
+-@end defmac
+-
+-@defmac DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
+-Define this macro @emph{instead of} defining
+-@code{DBX_OUTPUT_MAIN_SOURCE_FILE_END}, if what needs to be output at
+-the end of compilation is an @code{N_SO} stab with an empty string,
+-whose value is the highest absolute text address in the file.
+-@end defmac
+-
+ @need 2000
+ @node DWARF
+ @subsection Macros for DWARF Output
+diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
+index 817d586ff..ac95cdf7a 100644
+--- a/gcc/doc/tm.texi.in
++++ b/gcc/doc/tm.texi.in
+@@ -6603,9 +6603,6 @@ This describes how to specify debugging information.
+
+ @menu
+ * All Debuggers:: Macros that affect all debugging formats uniformly.
+-* DBX Options:: Macros enabling specific options in DBX format.
+-* DBX Hooks:: Hook macros for varying DBX format.
+-* File Names and DBX:: Macros controlling output of file names in DBX format.
+ * DWARF:: Macros for DWARF format.
+ * VMS Debug:: Macros for VMS debug format.
+ * CTF Debug:: Macros for CTF debug format.
+@@ -6656,35 +6653,18 @@ having address @var{x} (an RTL expression). The nominal offset is
+ A C expression that returns the type of debugging output GCC should
+ produce when the user specifies just @option{-g}. Define
+ this if you have arranged for GCC to support more than one format of
+-debugging output. Currently, the allowable values are @code{DBX_DEBUG},
+-@code{DWARF2_DEBUG}, @code{XCOFF_DEBUG}, @code{VMS_DEBUG},
++debugging output. Currently, the allowable values are
++@code{DWARF2_DEBUG}, @code{VMS_DEBUG},
+ and @code{VMS_AND_DWARF2_DEBUG}.
+
+ When the user specifies @option{-ggdb}, GCC normally also uses the
+ value of this macro to select the debugging output format, but with two
+ exceptions. If @code{DWARF2_DEBUGGING_INFO} is defined, GCC uses the
+-value @code{DWARF2_DEBUG}. Otherwise, if @code{DBX_DEBUGGING_INFO} is
+-defined, GCC uses @code{DBX_DEBUG}.
++value @code{DWARF2_DEBUG}.
+
+ The value of this macro only affects the default debugging output; the
+-user can always get a specific type of output by using @option{-gstabs},
+-@option{-gdwarf-2}, @option{-gxcoff}, or @option{-gvms}.
+-@end defmac
+-
+-@node DBX Options
+-@subsection Specific Options for DBX Output
+-
+-@c prevent bad page break with this line
+-These are specific options for DBX output.
+-
+-@defmac DBX_DEBUGGING_INFO
+-Define this macro if GCC should produce debugging output for DBX
+-in response to the @option{-g} option.
+-@end defmac
+-
+-@defmac XCOFF_DEBUGGING_INFO
+-Define this macro if GCC should produce XCOFF format debugging output
+-in response to the @option{-g} option. This is a variant of DBX format.
++user can always get a specific type of output by using @option{-gdwarf-2},
++or @option{-gvms}.
+ @end defmac
+
+ @defmac DEFAULT_GDB_EXTENSIONS
+@@ -6695,196 +6675,6 @@ macro, the default is 1: always generate the extended information
+ if there is any occasion to.
+ @end defmac
+
+-@defmac DEBUG_SYMS_TEXT
+-Define this macro if all @code{.stabs} commands should be output while
+-in the text section.
+-@end defmac
+-
+-@defmac ASM_STABS_OP
+-A C string constant, including spacing, naming the assembler pseudo op to
+-use instead of @code{"\t.stabs\t"} to define an ordinary debugging symbol.
+-If you don't define this macro, @code{"\t.stabs\t"} is used. This macro
+-applies only to DBX debugging information format.
+-@end defmac
+-
+-@defmac ASM_STABD_OP
+-A C string constant, including spacing, naming the assembler pseudo op to
+-use instead of @code{"\t.stabd\t"} to define a debugging symbol whose
+-value is the current location. If you don't define this macro,
+-@code{"\t.stabd\t"} is used. This macro applies only to DBX debugging
+-information format.
+-@end defmac
+-
+-@defmac ASM_STABN_OP
+-A C string constant, including spacing, naming the assembler pseudo op to
+-use instead of @code{"\t.stabn\t"} to define a debugging symbol with no
+-name. If you don't define this macro, @code{"\t.stabn\t"} is used. This
+-macro applies only to DBX debugging information format.
+-@end defmac
+-
+-@defmac DBX_NO_XREFS
+-Define this macro if DBX on your system does not support the construct
+-@samp{xs@var{tagname}}. On some systems, this construct is used to
+-describe a forward reference to a structure named @var{tagname}.
+-On other systems, this construct is not supported at all.
+-@end defmac
+-
+-@defmac DBX_CONTIN_LENGTH
+-A symbol name in DBX-format debugging information is normally
+-continued (split into two separate @code{.stabs} directives) when it
+-exceeds a certain length (by default, 80 characters). On some
+-operating systems, DBX requires this splitting; on others, splitting
+-must not be done. You can inhibit splitting by defining this macro
+-with the value zero. You can override the default splitting-length by
+-defining this macro as an expression for the length you desire.
+-@end defmac
+-
+-@defmac DBX_CONTIN_CHAR
+-Normally continuation is indicated by adding a @samp{\} character to
+-the end of a @code{.stabs} string when a continuation follows. To use
+-a different character instead, define this macro as a character
+-constant for the character you want to use. Do not define this macro
+-if backslash is correct for your system.
+-@end defmac
+-
+-@defmac DBX_STATIC_STAB_DATA_SECTION
+-Define this macro if it is necessary to go to the data section before
+-outputting the @samp{.stabs} pseudo-op for a non-global static
+-variable.
+-@end defmac
+-
+-@defmac DBX_TYPE_DECL_STABS_CODE
+-The value to use in the ``code'' field of the @code{.stabs} directive
+-for a typedef. The default is @code{N_LSYM}.
+-@end defmac
+-
+-@defmac DBX_STATIC_CONST_VAR_CODE
+-The value to use in the ``code'' field of the @code{.stabs} directive
+-for a static variable located in the text section. DBX format does not
+-provide any ``right'' way to do this. The default is @code{N_FUN}.
+-@end defmac
+-
+-@defmac DBX_REGPARM_STABS_CODE
+-The value to use in the ``code'' field of the @code{.stabs} directive
+-for a parameter passed in registers. DBX format does not provide any
+-``right'' way to do this. The default is @code{N_RSYM}.
+-@end defmac
+-
+-@defmac DBX_REGPARM_STABS_LETTER
+-The letter to use in DBX symbol data to identify a symbol as a parameter
+-passed in registers. DBX format does not customarily provide any way to
+-do this. The default is @code{'P'}.
+-@end defmac
+-
+-@defmac DBX_FUNCTION_FIRST
+-Define this macro if the DBX information for a function and its
+-arguments should precede the assembler code for the function. Normally,
+-in DBX format, the debugging information entirely follows the assembler
+-code.
+-@end defmac
+-
+-@defmac DBX_BLOCKS_FUNCTION_RELATIVE
+-Define this macro, with value 1, if the value of a symbol describing
+-the scope of a block (@code{N_LBRAC} or @code{N_RBRAC}) should be
+-relative to the start of the enclosing function. Normally, GCC uses
+-an absolute address.
+-@end defmac
+-
+-@defmac DBX_LINES_FUNCTION_RELATIVE
+-Define this macro, with value 1, if the value of a symbol indicating
+-the current line number (@code{N_SLINE}) should be relative to the
+-start of the enclosing function. Normally, GCC uses an absolute address.
+-@end defmac
+-
+-@defmac DBX_USE_BINCL
+-Define this macro if GCC should generate @code{N_BINCL} and
+-@code{N_EINCL} stabs for included header files, as on Sun systems. This
+-macro also directs GCC to output a type number as a pair of a file
+-number and a type number within the file. Normally, GCC does not
+-generate @code{N_BINCL} or @code{N_EINCL} stabs, and it outputs a single
+-number for a type number.
+-@end defmac
+-
+-@node DBX Hooks
+-@subsection Open-Ended Hooks for DBX Format
+-
+-@c prevent bad page break with this line
+-These are hooks for DBX format.
+-
+-@defmac DBX_OUTPUT_SOURCE_LINE (@var{stream}, @var{line}, @var{counter})
+-A C statement to output DBX debugging information before code for line
+-number @var{line} of the current source file to the stdio stream
+-@var{stream}. @var{counter} is the number of time the macro was
+-invoked, including the current invocation; it is intended to generate
+-unique labels in the assembly output.
+-
+-This macro should not be defined if the default output is correct, or
+-if it can be made correct by defining @code{DBX_LINES_FUNCTION_RELATIVE}.
+-@end defmac
+-
+-@defmac NO_DBX_FUNCTION_END
+-Some stabs encapsulation formats (in particular ECOFF), cannot handle the
+-@code{.stabs "",N_FUN,,0,0,Lscope-function-1} gdb dbx extension construct.
+-On those machines, define this macro to turn this feature off without
+-disturbing the rest of the gdb extensions.
+-@end defmac
+-
+-@defmac NO_DBX_BNSYM_ENSYM
+-Some assemblers cannot handle the @code{.stabd BNSYM/ENSYM,0,0} gdb dbx
+-extension construct. On those machines, define this macro to turn this
+-feature off without disturbing the rest of the gdb extensions.
+-@end defmac
+-
+-@node File Names and DBX
+-@subsection File Names in DBX Format
+-
+-@c prevent bad page break with this line
+-This describes file names in DBX format.
+-
+-@defmac DBX_OUTPUT_MAIN_SOURCE_FILENAME (@var{stream}, @var{name})
+-A C statement to output DBX debugging information to the stdio stream
+-@var{stream}, which indicates that file @var{name} is the main source
+-file---the file specified as the input file for compilation.
+-This macro is called only once, at the beginning of compilation.
+-
+-This macro need not be defined if the standard form of output
+-for DBX debugging information is appropriate.
+-
+-It may be necessary to refer to a label equal to the beginning of the
+-text section. You can use @samp{assemble_name (stream, ltext_label_name)}
+-to do so. If you do this, you must also set the variable
+-@var{used_ltext_label_name} to @code{true}.
+-@end defmac
+-
+-@defmac NO_DBX_MAIN_SOURCE_DIRECTORY
+-Define this macro, with value 1, if GCC should not emit an indication
+-of the current directory for compilation and current source language at
+-the beginning of the file.
+-@end defmac
+-
+-@defmac NO_DBX_GCC_MARKER
+-Define this macro, with value 1, if GCC should not emit an indication
+-that this object file was compiled by GCC@. The default is to emit
+-an @code{N_OPT} stab at the beginning of every source file, with
+-@samp{gcc2_compiled.} for the string and value 0.
+-@end defmac
+-
+-@defmac DBX_OUTPUT_MAIN_SOURCE_FILE_END (@var{stream}, @var{name})
+-A C statement to output DBX debugging information at the end of
+-compilation of the main source file @var{name}. Output should be
+-written to the stdio stream @var{stream}.
+-
+-If you don't define this macro, nothing special is output at the end
+-of compilation, which is correct for most machines.
+-@end defmac
+-
+-@defmac DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
+-Define this macro @emph{instead of} defining
+-@code{DBX_OUTPUT_MAIN_SOURCE_FILE_END}, if what needs to be output at
+-the end of compilation is an @code{N_SO} stab with an empty string,
+-whose value is the highest absolute text address in the file.
+-@end defmac
+-
+ @need 2000
+ @node DWARF
+ @subsection Macros for DWARF Output
+diff --git a/gcc/dwarf2asm.cc b/gcc/dwarf2asm.cc
+index 274f574f2..7eac83f7b 100644
+--- a/gcc/dwarf2asm.cc
++++ b/gcc/dwarf2asm.cc
+@@ -35,10 +35,6 @@ along with GCC; see the file COPYING3. If not see
+ #include "emit-rtl.h"
+ #include "fold-const.h"
+
+-#ifndef XCOFF_DEBUGGING_INFO
+-#define XCOFF_DEBUGGING_INFO 0
+-#endif
+-
+
+ /* Output an unaligned integer with the given value and size. Prefer not
+ to print a newline, since the caller may want to add a comment. */
+@@ -384,16 +380,13 @@ dw2_asm_output_nstring (const char *str, size_t orig_len,
+
+ if (flag_debug_asm && comment)
+ {
+- if (XCOFF_DEBUGGING_INFO)
+- fputs ("\t.byte \"", asm_out_file);
+- else
+- fputs ("\t.ascii \"", asm_out_file);
++ fputs ("\t.ascii \"", asm_out_file);
+
+ for (i = 0; i < len; i++)
+ {
+ int c = str[i];
+ if (c == '\"')
+- fputc (XCOFF_DEBUGGING_INFO ? '\"' : '\\', asm_out_file);
++ fputc ('\\', asm_out_file);
+ else if (c == '\\')
+ fputc ('\\', asm_out_file);
+ if (ISPRINT (c))
+@@ -913,7 +906,7 @@ static GTY(()) hash_map<const char *, tree> *indirect_pool;
+ static GTY(()) int dw2_const_labelno;
+
+ #if defined(HAVE_GAS_HIDDEN)
+-# define USE_LINKONCE_INDIRECT (SUPPORTS_ONE_ONLY && !XCOFF_DEBUGGING_INFO)
++# define USE_LINKONCE_INDIRECT (SUPPORTS_ONE_ONLY)
+ #else
+ # define USE_LINKONCE_INDIRECT 0
+ #endif
+diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc
+index f0f6f4fd4..380da2589 100644
+--- a/gcc/dwarf2out.cc
++++ b/gcc/dwarf2out.cc
+@@ -105,14 +105,6 @@ static rtx_insn *cached_next_real_insn;
+ static void dwarf2out_decl (tree);
+ static bool is_redundant_typedef (const_tree);
+
+-#ifndef XCOFF_DEBUGGING_INFO
+-#define XCOFF_DEBUGGING_INFO 0
+-#endif
+-
+-#ifndef HAVE_XCOFF_DWARF_EXTRAS
+-#define HAVE_XCOFF_DWARF_EXTRAS 0
+-#endif
+-
+ #ifdef VMS_DEBUGGING_INFO
+ int vms_file_stats_name (const char *, long long *, long *, char *, int *);
+
+@@ -608,14 +600,11 @@ output_fde (dw_fde_ref fde, bool for_eh, bool second,
+ for_eh + j);
+ ASM_GENERATE_INTERNAL_LABEL (l1, FDE_AFTER_SIZE_LABEL, for_eh + j);
+ ASM_GENERATE_INTERNAL_LABEL (l2, FDE_END_LABEL, for_eh + j);
+- if (!XCOFF_DEBUGGING_INFO || for_eh)
+- {
+- if (DWARF_INITIAL_LENGTH_SIZE - dwarf_offset_size == 4 && !for_eh)
+- dw2_asm_output_data (4, 0xffffffff, "Initial length escape value"
+- " indicating 64-bit DWARF extension");
+- dw2_asm_output_delta (for_eh ? 4 : dwarf_offset_size, l2, l1,
+- "FDE Length");
+- }
++ if (DWARF_INITIAL_LENGTH_SIZE - dwarf_offset_size == 4 && !for_eh)
++ dw2_asm_output_data (4, 0xffffffff, "Initial length escape value"
++ " indicating 64-bit DWARF extension");
++ dw2_asm_output_delta (for_eh ? 4 : dwarf_offset_size, l2, l1,
++ "FDE Length");
+ ASM_OUTPUT_LABEL (asm_out_file, l1);
+
+ if (for_eh)
+@@ -812,14 +801,11 @@ output_call_frame_info (int for_eh)
+ /* Output the CIE. */
+ ASM_GENERATE_INTERNAL_LABEL (l1, CIE_AFTER_SIZE_LABEL, for_eh);
+ ASM_GENERATE_INTERNAL_LABEL (l2, CIE_END_LABEL, for_eh);
+- if (!XCOFF_DEBUGGING_INFO || for_eh)
+- {
+- if (DWARF_INITIAL_LENGTH_SIZE - dwarf_offset_size == 4 && !for_eh)
+- dw2_asm_output_data (4, 0xffffffff,
+- "Initial length escape value indicating 64-bit DWARF extension");
+- dw2_asm_output_delta (for_eh ? 4 : dwarf_offset_size, l2, l1,
+- "Length of Common Information Entry");
+- }
++ if (DWARF_INITIAL_LENGTH_SIZE - dwarf_offset_size == 4 && !for_eh)
++ dw2_asm_output_data (4, 0xffffffff,
++ "Initial length escape value indicating 64-bit DWARF extension");
++ dw2_asm_output_delta (for_eh ? 4 : dwarf_offset_size, l2, l1,
++ "Length of Common Information Entry");
+ ASM_OUTPUT_LABEL (asm_out_file, l1);
+
+ /* Now that the CIE pointer is PC-relative for EH,
+@@ -3679,8 +3665,7 @@ static GTY (()) vec<macinfo_entry, va_gc> *macinfo_table;
+ /* True if .debug_macinfo or .debug_macros section is going to be
+ emitted. */
+ #define have_macinfo \
+- ((!XCOFF_DEBUGGING_INFO || HAVE_XCOFF_DWARF_EXTRAS) \
+- && debug_info_level >= DINFO_LEVEL_VERBOSE \
++ (debug_info_level >= DINFO_LEVEL_VERBOSE \
+ && !macinfo_table->is_empty ())
+
+ /* Vector of dies for which we should generate .debug_ranges info. */
+@@ -4982,9 +4967,6 @@ add_AT_loc_list (dw_die_ref die, enum dwarf_attribute attr_kind, dw_loc_list_ref
+ {
+ dw_attr_node attr;
+
+- if (XCOFF_DEBUGGING_INFO && !HAVE_XCOFF_DWARF_EXTRAS)
+- return;
+-
+ attr.dw_attr = attr_kind;
+ attr.dw_attr_val.val_class = dw_val_class_loc_list;
+ attr.dw_attr_val.val_entry = NULL;
+@@ -5008,9 +4990,6 @@ add_AT_view_list (dw_die_ref die, enum dwarf_attribute attr_kind)
+ {
+ dw_attr_node attr;
+
+- if (XCOFF_DEBUGGING_INFO && !HAVE_XCOFF_DWARF_EXTRAS)
+- return;
+-
+ attr.dw_attr = attr_kind;
+ attr.dw_attr_val.val_class = dw_val_class_view_list;
+ attr.dw_attr_val.val_entry = NULL;
+@@ -11167,15 +11146,12 @@ output_dwarf_version ()
+ static void
+ output_compilation_unit_header (enum dwarf_unit_type ut)
+ {
+- if (!XCOFF_DEBUGGING_INFO)
+- {
+- if (DWARF_INITIAL_LENGTH_SIZE - dwarf_offset_size == 4)
+- dw2_asm_output_data (4, 0xffffffff,
+- "Initial length escape value indicating 64-bit DWARF extension");
+- dw2_asm_output_data (dwarf_offset_size,
+- next_die_offset - DWARF_INITIAL_LENGTH_SIZE,
+- "Length of Compilation Unit Info");
+- }
++ if (DWARF_INITIAL_LENGTH_SIZE - dwarf_offset_size == 4)
++ dw2_asm_output_data (4, 0xffffffff,
++ "Initial length escape value indicating 64-bit DWARF extension");
++ dw2_asm_output_data (dwarf_offset_size,
++ next_die_offset - DWARF_INITIAL_LENGTH_SIZE,
++ "Length of Compilation Unit Info");
+
+ output_dwarf_version ();
+ if (dwarf_version >= 5)
+@@ -11684,14 +11660,11 @@ output_pubnames (vec<pubname_entry, va_gc> *names)
+ unsigned long pubnames_length = size_of_pubnames (names);
+ pubname_entry *pub;
+
+- if (!XCOFF_DEBUGGING_INFO)
+- {
+- if (DWARF_INITIAL_LENGTH_SIZE - dwarf_offset_size == 4)
+- dw2_asm_output_data (4, 0xffffffff,
+- "Initial length escape value indicating 64-bit DWARF extension");
+- dw2_asm_output_data (dwarf_offset_size, pubnames_length,
+- "Pub Info Length");
+- }
++ if (DWARF_INITIAL_LENGTH_SIZE - dwarf_offset_size == 4)
++ dw2_asm_output_data (4, 0xffffffff,
++ "Initial length escape value indicating 64-bit DWARF extension");
++ dw2_asm_output_data (dwarf_offset_size, pubnames_length,
++ "Pub Info Length");
+
+ /* Version number for pubnames/pubtypes is independent of dwarf version. */
+ dw2_asm_output_data (2, 2, "DWARF pubnames/pubtypes version");
+@@ -11766,14 +11739,11 @@ output_aranges (void)
+ unsigned i;
+ unsigned long aranges_length = size_of_aranges ();
+
+- if (!XCOFF_DEBUGGING_INFO)
+- {
+- if (DWARF_INITIAL_LENGTH_SIZE - dwarf_offset_size == 4)
+- dw2_asm_output_data (4, 0xffffffff,
+- "Initial length escape value indicating 64-bit DWARF extension");
+- dw2_asm_output_data (dwarf_offset_size, aranges_length,
+- "Length of Address Ranges Info");
+- }
++ if (DWARF_INITIAL_LENGTH_SIZE - dwarf_offset_size == 4)
++ dw2_asm_output_data (4, 0xffffffff,
++ "Initial length escape value indicating 64-bit DWARF extension");
++ dw2_asm_output_data (dwarf_offset_size, aranges_length,
++ "Length of Address Ranges Info");
+
+ /* Version number for aranges is still 2, even up to DWARF5. */
+ dw2_asm_output_data (2, 2, "DWARF aranges version");
+@@ -13067,14 +13037,11 @@ output_line_info (bool prologue_only)
+ ASM_GENERATE_INTERNAL_LABEL (p2, LN_PROLOG_END_LABEL,
+ output_line_info_generation++);
+
+- if (!XCOFF_DEBUGGING_INFO)
+- {
+- if (DWARF_INITIAL_LENGTH_SIZE - dwarf_offset_size == 4)
+- dw2_asm_output_data (4, 0xffffffff,
+- "Initial length escape value indicating 64-bit DWARF extension");
+- dw2_asm_output_delta (dwarf_offset_size, l2, l1,
+- "Length of Source Line Info");
+- }
++ if (DWARF_INITIAL_LENGTH_SIZE - dwarf_offset_size == 4)
++ dw2_asm_output_data (4, 0xffffffff,
++ "Initial length escape value indicating 64-bit DWARF extension");
++ dw2_asm_output_delta (dwarf_offset_size, l2, l1,
++ "Length of Source Line Info");
+
+ ASM_OUTPUT_LABEL (asm_out_file, l1);
+
+@@ -29144,8 +29111,6 @@ output_macinfo (const char *debug_line_label, bool early_lto_debug)
+ /* AIX Assembler inserts the length, so adjust the reference to match the
+ offset expected by debuggers. */
+ strcpy (dl_section_ref, debug_line_label);
+- if (XCOFF_DEBUGGING_INFO)
+- strcat (dl_section_ref, DWARF_INITIAL_LENGTH_SIZE_STR);
+
+ /* For .debug_macro emit the section header. */
+ if (!dwarf_strict || dwarf_version >= 5)
+@@ -32350,8 +32315,6 @@ dwarf2out_finish (const char *filename)
+ /* AIX Assembler inserts the length, so adjust the reference to match the
+ offset expected by debuggers. */
+ strcpy (dl_section_ref, debug_line_section_label);
+- if (XCOFF_DEBUGGING_INFO)
+- strcat (dl_section_ref, DWARF_INITIAL_LENGTH_SIZE_STR);
+
+ if (debug_info_level >= DINFO_LEVEL_TERSE)
+ add_AT_lineptr (main_comp_unit_die, DW_AT_stmt_list,
+@@ -33067,8 +33030,6 @@ dwarf2out_early_finish (const char *filename)
+ /* AIX Assembler inserts the length, so adjust the reference to match the
+ offset expected by debuggers. */
+ strcpy (dl_section_ref, debug_line_section_label);
+- if (XCOFF_DEBUGGING_INFO)
+- strcat (dl_section_ref, DWARF_INITIAL_LENGTH_SIZE_STR);
+
+ if (debug_info_level >= DINFO_LEVEL_TERSE)
+ add_AT_lineptr (comp_unit_die (), DW_AT_stmt_list, dl_section_ref);
+diff --git a/gcc/final.cc b/gcc/final.cc
+index af4e529bb..822b2db43 100644
+--- a/gcc/final.cc
++++ b/gcc/final.cc
+@@ -84,16 +84,8 @@ along with GCC; see the file COPYING3. If not see
+ #include "insn-codes.h"
+ #include "common/common-target.h"
+
+-#ifdef XCOFF_DEBUGGING_INFO
+-#include "xcoffout.h" /* Needed for external data declarations. */
+-#endif
+-
+ #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
+@@ -2326,19 +2318,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:
+@@ -2361,27 +2340,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:
+@@ -4708,8 +4666,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 64c64eb32..e6121d75e 100644
+--- a/gcc/flag-types.h
++++ b/gcc/flag-types.h
+@@ -24,24 +24,18 @@ 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_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). */
+-#define XCOFF_DEBUG (1U << DINFO_TYPE_XCOFF)
+ /* Write VMS debug info (using vmsdbgout.cc). */
+ #define VMS_DEBUG (1U << DINFO_TYPE_VMS)
+ /* Write CTF debug info (using ctfout.cc). */
+diff --git a/gcc/function.cc b/gcc/function.cc
+index d84a3240e..49c7ccf4b 100644
+--- a/gcc/function.cc
++++ b/gcc/function.cc
+@@ -4628,14 +4628,6 @@ number_blocks (tree fn)
+ int n_blocks;
+ tree *block_vector;
+
+- /* For XCOFF debugging output, we start numbering the blocks
+- from 1 within each function, rather than keeping a running
+- count. */
+-#if defined (XCOFF_DEBUGGING_INFO)
+- if (write_symbols == XCOFF_DEBUG)
+- next_block_index = 1;
+-#endif
+-
+ block_vector = get_block_vector (DECL_INITIAL (fn), &n_blocks);
+
+ /* The top-level BLOCK isn't numbered at all. */
+diff --git a/gcc/gcc.cc b/gcc/gcc.cc
+index b0d03430e..32e45adc2 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/go/go-lang.cc b/gcc/go/go-lang.cc
+index c8365d259..faaf52341 100644
+--- a/gcc/go/go-lang.cc
++++ b/gcc/go/go-lang.cc
+@@ -507,8 +507,7 @@ go_langhook_pushdecl (tree decl ATTRIBUTE_UNUSED)
+ }
+
+ /* This hook is used to get the current list of declarations as trees.
+- We don't support that; instead we use the write_globals hook. This
+- can't simply crash because it is called by -gstabs. */
++ We don't support that; instead we use the write_globals hook. */
+
+ static tree
+ go_langhook_getdecls (void)
+diff --git a/gcc/go/gospec.cc b/gcc/go/gospec.cc
+index df92b62d8..1e5140768 100644
+--- a/gcc/go/gospec.cc
++++ b/gcc/go/gospec.cc
+@@ -215,11 +215,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
+ case OPT_gdwarf:
+ case OPT_gdwarf_:
+ case OPT_ggdb:
+- case OPT_gstabs:
+- case OPT_gstabs_:
+ case OPT_gvms:
+- case OPT_gxcoff:
+- case OPT_gxcoff_:
+ saw_opt_g = true;
+ break;
+
+diff --git a/gcc/gstab.h b/gcc/gstab.h
+deleted file mode 100644
+index c597d1200..000000000
+--- a/gcc/gstab.h
++++ /dev/null
+@@ -1,35 +0,0 @@
+-/* Copyright (C) 1997-2022 Free Software Foundation, Inc.
+-
+-This file is part of GCC.
+-
+-GCC is free software; you can redistribute it and/or modify it under
+-the terms of the GNU General Public License as published by the Free
+-Software Foundation; either version 3, or (at your option) any later
+-version.
+-
+-GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+-WARRANTY; without even the implied warranty of MERCHANTABILITY or
+-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+-for more details.
+-
+-You should have received a copy of the GNU General Public License
+-along with GCC; see the file COPYING3. If not see
+-<http://www.gnu.org/licenses/>. */
+-
+-#ifndef GCC_GSTAB_H
+-#define GCC_GSTAB_H
+-
+-#define __define_stab(NAME, CODE, STRING) NAME=CODE,
+-
+-enum
+-{
+-#include "stab.def"
+-LAST_UNUSED_STAB_CODE
+-};
+-
+-/* stabs debug codes really are integers with expressive names. */
+-typedef int stab_code_type;
+-
+-#undef __define_stab
+-
+-#endif /* ! GCC_GSTAB_H */
+diff --git a/gcc/opts.cc b/gcc/opts.cc
+index 4b4925331..e34e5ee8e 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, VMS_DEBUG,
+ CTF_DEBUG, BTF_DEBUG
+ };
+
+@@ -3186,22 +3186,10 @@ 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;
+
+- case OPT_gxcoff:
+- case OPT_gxcoff_:
+- set_debug_level (XCOFF_DEBUG, code == OPT_gxcoff_, arg, opts, opts_set,
+- loc);
+- break;
+-
+ case OPT_gz:
+ case OPT_gz_:
+ /* Handled completely via specs. */
+@@ -3503,8 +3491,6 @@ set_debug_level (uint32_t dinfo, int extended, const char *arg,
+ struct gcc_options *opts, struct gcc_options *opts_set,
+ location_t loc)
+ {
+- opts->x_use_gnu_debug_info_extensions = extended;
+-
+ if (dinfo == NO_DEBUG)
+ {
+ if (opts->x_write_symbols == NO_DEBUG)
+@@ -3518,8 +3504,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/stab.def b/gcc/stab.def
+deleted file mode 100644
+index e5af19b2b..000000000
+--- a/gcc/stab.def
++++ /dev/null
+@@ -1,239 +0,0 @@
+-/* Table of DBX symbol codes for the GNU system.
+- Copyright (C) 1988-2022 Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
+-
+- The GNU C Library is free software; you can redistribute it and/or
+- modify it under the terms of the GNU Library General Public License as
+- published by the Free Software Foundation; either version 3 of the
+- License, or (at your option) any later version.
+-
+- The GNU C Library is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- Library General Public License for more details.
+-
+- You should have received a copy of the GNU Library General Public
+- License along with the GNU C Library; see the file COPYING3. If
+- not see <http://www.gnu.org/licenses/>. */
+-
+-/* This contains contribution from Cygnus Support. */
+-
+-/* Global variable. Only the name is significant.
+- To find the address, look in the corresponding external symbol. */
+-__define_stab (N_GSYM, 0x20, "GSYM")
+-
+-/* Function name for BSD Fortran. Only the name is significant.
+- To find the address, look in the corresponding external symbol. */
+-__define_stab (N_FNAME, 0x22, "FNAME")
+-
+-/* Function name or text-segment variable for C. Value is its address.
+- Desc is supposedly starting line number, but GCC doesn't set it
+- and DBX seems not to miss it. */
+-__define_stab (N_FUN, 0x24, "FUN")
+-
+-/* Data-segment variable with internal linkage. Value is its address.
+- "Static Sym". */
+-__define_stab (N_STSYM, 0x26, "STSYM")
+-
+-/* BSS-segment variable with internal linkage. Value is its address. */
+-__define_stab (N_LCSYM, 0x28, "LCSYM")
+-
+-/* Begin function marker. */
+-__define_stab (N_BNSYM, 0x2e, "BNSYM")
+-
+-/* End function marker. */
+-__define_stab (N_ENSYM, 0x4e, "ENSYM")
+-
+-/* Name of main routine. Only the name is significant.
+- This is not used in C. */
+-__define_stab (N_MAIN, 0x2a, "MAIN")
+-
+-/* Global symbol in Pascal.
+- Supposedly the value is its line number; I'm skeptical. */
+-__define_stab (N_PC, 0x30, "PC")
+-
+-/* Number of symbols: 0, files,,funcs,lines according to Ultrix V4.0. */
+-__define_stab (N_NSYMS, 0x32, "NSYMS")
+-
+-/* "No DST map for sym: name, ,0,type,ignored" according to Ultrix V4.0. */
+-__define_stab (N_NOMAP, 0x34, "NOMAP")
+-
+-/* New stab from Solaris. I don't know what it means, but it
+- don't seem to contain useful information. */
+-__define_stab (N_OBJ, 0x38, "OBJ")
+-
+-/* New stab from Solaris. I don't know what it means, but it
+- don't seem to contain useful information. Possibly related to the
+- optimization flags used in this module. */
+-__define_stab (N_OPT, 0x3c, "OPT")
+-
+-/* Register variable. Value is number of register. */
+-__define_stab (N_RSYM, 0x40, "RSYM")
+-
+-/* Modula-2 compilation unit. Can someone say what info it contains? */
+-__define_stab (N_M2C, 0x42, "M2C")
+-
+-/* Line number in text segment. Desc is the line number;
+- value is corresponding address. */
+-__define_stab (N_SLINE, 0x44, "SLINE")
+-
+-/* Similar, for data segment. */
+-__define_stab (N_DSLINE, 0x46, "DSLINE")
+-
+-/* Similar, for bss segment. */
+-__define_stab (N_BSLINE, 0x48, "BSLINE")
+-
+-/* Sun's source-code browser stabs. ?? Don't know what the fields are.
+- Supposedly the field is "path to associated .cb file". THIS VALUE
+- OVERLAPS WITH N_BSLINE! */
+-__define_stab (N_BROWS, 0x48, "BROWS")
+-
+-/* GNU Modula-2 definition module dependency. Value is the modification time
+- of the definition file. Other is nonzero if it is imported with the
+- GNU M2 keyword %INITIALIZE. Perhaps N_M2C can be used if there
+- are enough empty fields? */
+-__define_stab(N_DEFD, 0x4a, "DEFD")
+-
+-/* THE FOLLOWING TWO STAB VALUES CONFLICT. Happily, one is for Modula-2
+- and one is for C++. Still,... */
+-/* GNU C++ exception variable. Name is variable name. */
+-__define_stab (N_EHDECL, 0x50, "EHDECL")
+-/* Modula2 info "for imc": name,,0,0,0 according to Ultrix V4.0. */
+-__define_stab (N_MOD2, 0x50, "MOD2")
+-
+-/* GNU C++ `catch' clause. Value is its address. Desc is nonzero if
+- this entry is immediately followed by a CAUGHT stab saying what exception
+- was caught. Multiple CAUGHT stabs means that multiple exceptions
+- can be caught here. If Desc is 0, it means all exceptions are caught
+- here. */
+-__define_stab (N_CATCH, 0x54, "CATCH")
+-
+-/* Structure or union element. Value is offset in the structure. */
+-__define_stab (N_SSYM, 0x60, "SSYM")
+-
+-/* Name of main source file.
+- Value is starting text address of the compilation. */
+-__define_stab (N_SO, 0x64, "SO")
+-
+-/* Automatic variable in the stack. Value is offset from frame pointer.
+- Also used for type descriptions. */
+-__define_stab (N_LSYM, 0x80, "LSYM")
+-
+-/* Beginning of an include file. Only Sun uses this.
+- In an object file, only the name is significant.
+- The Sun linker puts data into some of the other fields. */
+-__define_stab (N_BINCL, 0x82, "BINCL")
+-
+-/* Name of sub-source file (#include file).
+- Value is starting text address of the compilation. */
+-__define_stab (N_SOL, 0x84, "SOL")
+-
+-/* Parameter variable. Value is offset from argument pointer.
+- (On most machines the argument pointer is the same as the frame pointer. */
+-__define_stab (N_PSYM, 0xa0, "PSYM")
+-
+-/* End of an include file. No name.
+- This and N_BINCL act as brackets around the file's output.
+- In an object file, there is no significant data in this entry.
+- The Sun linker puts data into some of the fields. */
+-__define_stab (N_EINCL, 0xa2, "EINCL")
+-
+-/* Alternate entry point. Value is its address. */
+-__define_stab (N_ENTRY, 0xa4, "ENTRY")
+-
+-/* Beginning of lexical block.
+- The desc is the nesting level in lexical blocks.
+- The value is the address of the start of the text for the block.
+- The variables declared inside the block *precede* the N_LBRAC symbol. */
+-__define_stab (N_LBRAC, 0xc0, "LBRAC")
+-
+-/* Place holder for deleted include file. Replaces a N_BINCL and everything
+- up to the corresponding N_EINCL. The Sun linker generates these when
+- it finds multiple identical copies of the symbols from an include file.
+- This appears only in output from the Sun linker. */
+-__define_stab (N_EXCL, 0xc2, "EXCL")
+-
+-/* Modula-2 scope information. Can someone say what info it contains? */
+-__define_stab (N_SCOPE, 0xc4, "SCOPE")
+-
+-/* End of a lexical block. Desc matches the N_LBRAC's desc.
+- The value is the address of the end of the text for the block. */
+-__define_stab (N_RBRAC, 0xe0, "RBRAC")
+-
+-/* Begin named common block. Only the name is significant. */
+-__define_stab (N_BCOMM, 0xe2, "BCOMM")
+-
+-/* End named common block. Only the name is significant
+- (and it should match the N_BCOMM). */
+-__define_stab (N_ECOMM, 0xe4, "ECOMM")
+-
+-/* End common (local name): value is address.
+- I'm not sure how this is used. */
+-__define_stab (N_ECOML, 0xe8, "ECOML")
+-
+-/* These STAB's are used on Gould systems for Non-Base register symbols
+- or something like that. FIXME. I have assigned the values at random
+- since I don't have a Gould here. Fixups from Gould folk welcome... */
+-__define_stab (N_NBTEXT, 0xF0, "NBTEXT")
+-__define_stab (N_NBDATA, 0xF2, "NBDATA")
+-__define_stab (N_NBBSS, 0xF4, "NBBSS")
+-__define_stab (N_NBSTS, 0xF6, "NBSTS")
+-__define_stab (N_NBLCS, 0xF8, "NBLCS")
+-
+-/* Second symbol entry containing a length-value for the preceding entry.
+- The value is the length. */
+-__define_stab (N_LENG, 0xfe, "LENG")
+-
+-/* The above information, in matrix format.
+-
+- STAB MATRIX
+- _________________________________________________
+- | 00 - 1F are not dbx stab symbols |
+- | In most cases, the low bit is the EXTernal bit|
+-
+- | 00 UNDEF | 02 ABS | 04 TEXT | 06 DATA |
+- | 01 |EXT | 03 |EXT | 05 |EXT | 07 |EXT |
+-
+- | 08 BSS | 0A INDR | 0C FN_SEQ | 0E |
+- | 09 |EXT | 0B | 0D | 0F |
+-
+- | 10 | 12 COMM | 14 SETA | 16 SETT |
+- | 11 | 13 | 15 | 17 |
+-
+- | 18 SETD | 1A SETB | 1C SETV | 1E WARNING|
+- | 19 | 1B | 1D | 1F FN |
+-
+- |_______________________________________________|
+- | Debug entries with bit 01 set are unused. |
+- | 20 GSYM | 22 FNAME | 24 FUN | 26 STSYM |
+- | 28 LCSYM | 2A MAIN | 2C | 2E BNSYM |
+- | 30 PC | 32 NSYMS | 34 NOMAP | 36 |
+- | 38 OBJ | 3A | 3C OPT | 3E |
+- | 40 RSYM | 42 M2C | 44 SLINE | 46 DSLINE |
+- | 48 BSLINE*| 4A DEFD | 4C | 4E ENSYM |
+- | 50 EHDECL*| 52 | 54 CATCH | 56 |
+- | 58 | 5A | 5C | 5E |
+- | 60 SSYM | 62 | 64 SO | 66 |
+- | 68 | 6A | 6C | 6E |
+- | 70 | 72 | 74 | 76 |
+- | 78 | 7A | 7C | 7E |
+- | 80 LSYM | 82 BINCL | 84 SOL | 86 |
+- | 88 | 8A | 8C | 8E |
+- | 90 | 92 | 94 | 96 |
+- | 98 | 9A | 9C | 9E |
+- | A0 PSYM | A2 EINCL | A4 ENTRY | A6 |
+- | A8 | AA | AC | AE |
+- | B0 | B2 | B4 | B6 |
+- | B8 | BA | BC | BE |
+- | C0 LBRAC | C2 EXCL | C4 SCOPE | C6 |
+- | C8 | CA | CC | CE |
+- | D0 | D2 | D4 | D6 |
+- | D8 | DA | DC | DE |
+- | E0 RBRAC | E2 BCOMM | E4 ECOMM | E6 |
+- | E8 ECOML | EA | EC | EE |
+- | F0 | F2 | F4 | F6 |
+- | F8 | FA | FC | FE LENG |
+- +-----------------------------------------------+
+- * 50 EHDECL is also MOD2.
+- * 48 BSLINE is also BROWS.
+- */
+diff --git a/gcc/system.h b/gcc/system.h
+index e10c34f70..2f56411c0 100644
+--- a/gcc/system.h
++++ b/gcc/system.h
+@@ -1005,8 +1005,7 @@ extern void fancy_abort (const char *, int, const char *)
+ ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL HOST_WORDS_BIG_ENDIAN \
+ OBJC_PROLOGUE ALLOCATE_TRAMPOLINE HANDLE_PRAGMA ROUND_TYPE_SIZE \
+ ROUND_TYPE_SIZE_UNIT CONST_SECTION_ASM_OP CRT_GET_RFIB_TEXT \
+- DBX_LBRAC_FIRST DBX_OUTPUT_ENUM DBX_OUTPUT_SOURCE_FILENAME \
+- DBX_WORKING_DIRECTORY INSN_CACHE_DEPTH INSN_CACHE_SIZE \
++ INSN_CACHE_DEPTH INSN_CACHE_SIZE \
+ INSN_CACHE_LINE_WIDTH INIT_SECTION_PREAMBLE NEED_ATEXIT ON_EXIT \
+ EXIT_BODY OBJECT_FORMAT_ROSE MULTIBYTE_CHARS MAP_CHARACTER \
+ LIBGCC_NEEDS_DOUBLE FINAL_PRESCAN_LABEL DEFAULT_CALLER_SAVES \
+@@ -1019,15 +1018,14 @@ extern void fancy_abort (const char *, int, const char *)
+ MAX_WCHAR_TYPE_SIZE SHARED_SECTION_ASM_OP INTEGRATE_THRESHOLD \
+ FINAL_REG_PARM_STACK_SPACE MAYBE_REG_PARM_STACK_SPACE \
+ TRADITIONAL_PIPELINE_INTERFACE DFA_PIPELINE_INTERFACE \
+- DBX_OUTPUT_STANDARD_TYPES BUILTIN_SETJMP_FRAME_VALUE \
++ BUILTIN_SETJMP_FRAME_VALUE \
+ SUNOS4_SHARED_LIBRARIES PROMOTE_FOR_CALL_ONLY \
+ SPACE_AFTER_L_OPTION NO_RECURSIVE_FUNCTION_CSE \
+ DEFAULT_MAIN_RETURN TARGET_MEM_FUNCTIONS EXPAND_BUILTIN_VA_ARG \
+ COLLECT_PARSE_FLAG DWARF2_GENERATE_TEXT_SECTION_LABEL WINNING_GDB \
+ ASM_OUTPUT_FILENAME ASM_OUTPUT_SOURCE_LINE FILE_NAME_JOINER \
+- GDB_INV_REF_REGPARM_STABS_LETTER DBX_MEMPARM_STABS_LETTER \
+- PUT_SDB_SRC_FILE STABS_GCC_MARKER DBX_OUTPUT_FUNCTION_END \
+- DBX_OUTPUT_GCC_MARKER DBX_FINISH_SYMBOL SDB_GENERATE_FAKE \
++ GDB_INV_REF_REGPARM_STABS_LETTER \
++ PUT_SDB_SRC_FILE STABS_GCC_MARKER SDB_GENERATE_FAKE \
+ NON_SAVING_SETJMP TARGET_LATE_RTL_PROLOGUE_EPILOGUE \
+ CASE_DROPS_THROUGH TARGET_BELL TARGET_BS TARGET_CR TARGET_DIGIT0 \
+ TARGET_ESC TARGET_FF TARGET_NEWLINE TARGET_TAB TARGET_VT \
+@@ -1052,8 +1050,8 @@ extern void fancy_abort (const char *, int, const char *)
+ PREFERRED_OUTPUT_RELOAD_CLASS SYSTEM_INCLUDE_DIR \
+ STANDARD_INCLUDE_DIR STANDARD_INCLUDE_COMPONENT \
+ LINK_ELIMINATE_DUPLICATE_LDIRECTORIES MIPS_DEBUGGING_INFO \
+- IDENT_ASM_OP ALL_COP_ADDITIONAL_REGISTER_NAMES DBX_OUTPUT_LBRAC \
+- DBX_OUTPUT_NFUN DBX_OUTPUT_RBRAC RANGE_TEST_NON_SHORT_CIRCUIT \
++ IDENT_ASM_OP ALL_COP_ADDITIONAL_REGISTER_NAMES \
++ RANGE_TEST_NON_SHORT_CIRCUIT \
+ REAL_VALUE_TRUNCATE REVERSE_CONDEXEC_PREDICATES_P \
+ TARGET_ALIGN_ANON_BITFIELDS TARGET_NARROW_VOLATILE_BITFIELDS \
+ IDENT_ASM_OP UNALIGNED_SHORT_ASM_OP UNALIGNED_INT_ASM_OP \
+diff --git a/gcc/target-def.h b/gcc/target-def.h
+index 1c4aa2963..f81f8fe3b 100644
+--- a/gcc/target-def.h
++++ b/gcc/target-def.h
+@@ -62,8 +62,6 @@
+ # else
+ # ifdef TARGET_ASM_NAMED_SECTION
+ # define TARGET_ASM_CONSTRUCTOR default_named_section_asm_out_constructor
+-# else
+-# define TARGET_ASM_CONSTRUCTOR default_stabs_asm_out_constructor
+ # endif
+ # endif
+ #endif
+@@ -74,8 +72,6 @@
+ # else
+ # ifdef TARGET_ASM_NAMED_SECTION
+ # define TARGET_ASM_DESTRUCTOR default_named_section_asm_out_destructor
+-# else
+-# define TARGET_ASM_DESTRUCTOR default_stabs_asm_out_destructor
+ # endif
+ # endif
+ #endif
+diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-debug-0.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-debug-0.C
+deleted file mode 100644
+index 8464aa35a..000000000
+--- a/gcc/testsuite/g++.dg/cpp0x/alias-decl-debug-0.C
++++ /dev/null
+@@ -1,12 +0,0 @@
+-// Origin: PR c++/51032
+-// { dg-do compile { target { c++11 && stabs } } }
+-// { dg-options "-gstabs+" }
+-
+-template <class C>
+-struct A {
+- template<class U> using B = U*;
+- int a;
+-};
+-
+-A<int> a;
+-
+diff --git a/gcc/testsuite/g++.dg/other/PR23205.C b/gcc/testsuite/g++.dg/other/PR23205.C
+deleted file mode 100644
+index 65ba1f6f3..000000000
+--- a/gcc/testsuite/g++.dg/other/PR23205.C
++++ /dev/null
+@@ -1,17 +0,0 @@
+-/* { dg-do compile { target stabs } } */
+-/* { dg-options "-gstabs+ -fno-eliminate-unused-debug-types" } */
+-
+-const int foobar = 4;
+-int foo ()
+-{
+- return foobar + 1;
+-}
+-
+-int main()
+-{
+- int i;
+- i = foo();
+- return i;
+-}
+-
+-/* { dg-final { scan-assembler ".stabs.*foobar:(c=i|S)" } } */
+diff --git a/gcc/testsuite/g++.dg/other/pr23205-2.C b/gcc/testsuite/g++.dg/other/pr23205-2.C
+deleted file mode 100644
+index 7b25c071a..000000000
+--- a/gcc/testsuite/g++.dg/other/pr23205-2.C
++++ /dev/null
+@@ -1,17 +0,0 @@
+-/* { dg-do compile { target stabs } } */
+-/* { dg-options "-gstabs+ -fno-eliminate-unused-debug-types -ftoplevel-reorder" } */
+-
+-const int foobar = 4;
+-int foo ()
+-{
+- return foobar + 1;
+-}
+-
+-int main()
+-{
+- int i;
+- i = foo();
+- return i;
+-}
+-
+-/* { dg-final { scan-assembler ".stabs.*foobar:c=i" } } */
+diff --git a/gcc/testsuite/gcc.dg/20040813-1.c b/gcc/testsuite/gcc.dg/20040813-1.c
+deleted file mode 100644
+index 9cf664dd7..000000000
+--- a/gcc/testsuite/gcc.dg/20040813-1.c
++++ /dev/null
+@@ -1,14 +0,0 @@
+-/* Test lang in N_SO stab. */
+-/* Contributed by Devang Patel <dpatel@apple.com> */
+-
+-/* { dg-do compile { target stabs } } */
+-/* { dg-options "-gstabs" } */
+-
+-int
+-main ()
+-{
+- return 0;
+-}
+-
+-/* { dg-final { scan-assembler ".stabs.*100,0,2" } } */
+-
+diff --git a/gcc/testsuite/gcc.dg/darwin-20040809-2.c b/gcc/testsuite/gcc.dg/darwin-20040809-2.c
+deleted file mode 100644
+index 98d571276..000000000
+--- a/gcc/testsuite/gcc.dg/darwin-20040809-2.c
++++ /dev/null
+@@ -1,15 +0,0 @@
+-/* Test dead code strip support. */
+-/* Contributed by Devang Patel <dpatel@apple.com> */
+-
+-/* { dg-do compile { target { *-*-darwin* && stabs } } } */
+-/* { dg-options "-gstabs+ -fno-eliminate-unused-debug-symbols" } */
+-
+-int
+-main ()
+-{
+- return 0;
+-}
+-
+-/* { dg-final { scan-assembler ".stabd.46,0,0" } } */
+-/* { dg-final { scan-assembler ".stabd.78,0,0" } } */
+-
+diff --git a/gcc/testsuite/gcc.dg/debug/pr35154.c b/gcc/testsuite/gcc.dg/debug/pr35154.c
+deleted file mode 100644
+index 08eefaf66..000000000
+--- a/gcc/testsuite/gcc.dg/debug/pr35154.c
++++ /dev/null
+@@ -1,35 +0,0 @@
+-/* Test to make sure that stabs for C symbols that go into .comm have the
+- proper structure. These should be lettered G for the struct that gives
+- the name to the .comm, and should be V or S for .lcomm symbols. */
+-
+-__attribute__ ((used))
+-static char i_outer;
+-struct {
+- char f1;
+- char f2;
+-} opta;
+-struct {
+- char f1;
+- char f2;
+-} optb;
+-
+-int
+-main()
+-{
+- static char i_inner[2] __attribute__ ((used));
+- i_inner[0] = 'a'; i_inner[1] = 'b';
+- opta.f1 = 'c';
+- opta.f2 = 'd';
+- optb.f1 = 'C';
+- optb.f2 = 'D';
+- i_outer = 'e';
+-/* { dg-do compile } */
+-/* { dg-skip-if "No stabs" { mmix-*-* alpha*-*-* hppa*64*-*-* ia64-*-* *-*-vxworks* } } */
+-/* { dg-skip-if "stabs only" { *-*-* } { "*" } { "-gstabs" } } */
+- return 0;
+-}
+-
+-/* { dg-final { scan-assembler ".stabs.*i_inner:V" } } */
+-/* { dg-final { scan-assembler ".stabs.*i_outer:S" } } */
+-/* { dg-final { scan-assembler ".stabs.*opta:G" } } */
+-/* { dg-final { scan-assembler ".stabs.*optb:G" } } */
+diff --git a/gcc/testsuite/gcc.dg/pr69471-2.c b/gcc/testsuite/gcc.dg/pr69471-2.c
+deleted file mode 100644
+index d5799604b..000000000
+--- a/gcc/testsuite/gcc.dg/pr69471-2.c
++++ /dev/null
+@@ -1,8 +0,0 @@
+-/* { dg-do compile } */
+-/* { dg-options "-gstabs2 -gdwarf-4 -gstabs3" } */
+-/* { dg-error "conflicts with prior selectio" "" { target *-*-* } 0 } */
+-
+-void
+-foo (void)
+-{
+-}
+diff --git a/gcc/testsuite/gcc.target/powerpc/stabs-attrib-vect-darwin.c b/gcc/testsuite/gcc.target/powerpc/stabs-attrib-vect-darwin.c
+deleted file mode 100644
+index 5c7acf18a..000000000
+--- a/gcc/testsuite/gcc.target/powerpc/stabs-attrib-vect-darwin.c
++++ /dev/null
+@@ -1,12 +0,0 @@
+-/* Test Attribute Vector associated with vector type stabs. */
+-/* { dg-do compile { target powerpc*-*-darwin* } } */
+-/* { dg-require-effective-target stabs } */
+-/* { dg-options "-gstabs+ -fno-eliminate-unused-debug-types -faltivec" } */
+-
+-int main ()
+-{
+- vector int vi = { 6,7,8,9 };
+- return 0;
+-}
+-
+-/* { dg-final { scan-assembler ".stabs.*vi\:\\(0,\[0-9\]+\\)=\@V" } } */
+diff --git a/gcc/testsuite/gcc.target/s390/20041216-1.c b/gcc/testsuite/gcc.target/s390/20041216-1.c
+deleted file mode 100644
+index 492ee6c18..000000000
+--- a/gcc/testsuite/gcc.target/s390/20041216-1.c
++++ /dev/null
+@@ -1,23 +0,0 @@
+-/* This test case would get an unresolved symbol during link
+- because stabs referred to an optimized-away literal pool
+- entry. */
+-
+-/* { dg-do run } */
+-/* { dg-options "-O2 -fno-omit-frame-pointer -gstabs" } */
+-
+-int main (void)
+-{
+- static char buf[4096];
+- char *p;
+-
+- do
+- {
+- p = buf;
+- asm volatile ("" : : : "memory", "0", "1", "2", "3", "4", "5", "6",
+- "7", "8", "9", "10", "12");
+- }
+- while (*p);
+-
+- return 0;
+-}
+-
+diff --git a/gcc/testsuite/gfortran.dg/debug/pr35154-stabs.f b/gcc/testsuite/gfortran.dg/debug/pr35154-stabs.f
+deleted file mode 100644
+index 5e5c42e9b..000000000
+--- a/gcc/testsuite/gfortran.dg/debug/pr35154-stabs.f
++++ /dev/null
+@@ -1,35 +0,0 @@
+-C Test program for common block debugging. G. Helffrich 11 July 2004.
+-C { dg-do compile }
+-C { dg-skip-if "No stabs" { aarch64*-*-* mmix-*-* alpha*-*-* hppa*64*-*-* ia64-*-* *-*-vxworks* } }
+-C { dg-skip-if "No stabs" { *-*-* } { "*" } { "-gstabs" } }
+- common i,j
+- common /label/l,m
+- i = 1
+- j = 2
+- k = 3
+- l = 4
+- m = 5
+- call sub
+- end
+- subroutine sub
+- common /label/l,m
+- logical first
+- save n
+- data first /.true./
+- if (first) then
+- n = 0
+- first = .false.
+- endif
+- n = n + 1
+- l = l + 1
+- return
+- end
+-
+-C { dg-final { scan-assembler ".stabs.*\"__BLNK__\",226" } }
+-C { dg-final { scan-assembler ".stabs.*\"i:V.*\",.*,0" } }
+-C { dg-final { scan-assembler ".stabs.*\"j:V.*\",.*,4" } }
+-C { dg-final { scan-assembler ".stabs.*\"__BLNK__\",228" } }
+-C { dg-final { scan-assembler ".stabs.*\"label_\",226" } }
+-C { dg-final { scan-assembler ".stabs.*\"l:V.*\",.*,0" } }
+-C { dg-final { scan-assembler ".stabs.*\"m:V.*\",.*,4" } }
+-C { dg-final { scan-assembler ".stabs.*\"label_\",228" } }
+diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
+index 8c28997dd..5e8acb28b 100644
+--- a/gcc/testsuite/lib/gcc-dg.exp
++++ b/gcc/testsuite/lib/gcc-dg.exp
+@@ -655,7 +655,7 @@ proc gcc-dg-target-supports-debug-format { target_compile trivial type } {
+ proc gcc-dg-debug-runtest { target_compile trivial opt_opts testcases } {
+ if ![info exists DEBUG_TORTURE_OPTIONS] {
+ set DEBUG_TORTURE_OPTIONS ""
+- foreach type {-gctf -gdwarf-2 -gstabs -gstabs+ -gxcoff -gxcoff+} {
++ foreach type {-gctf -gdwarf-2} {
+ if [expr [gcc-dg-target-supports-debug-format \
+ $target_compile $trivial $type]] {
+ if { $type == "-gctf" } {
+diff --git a/gcc/testsuite/lib/gfortran-dg.exp b/gcc/testsuite/lib/gfortran-dg.exp
+index 7407be4b8..d4a245e0b 100644
+--- a/gcc/testsuite/lib/gfortran-dg.exp
++++ b/gcc/testsuite/lib/gfortran-dg.exp
+@@ -170,7 +170,7 @@ proc gfortran-dg-debug-runtest { target_compile trivial opt_opts testcases } {
+
+ if ![info exists DEBUG_TORTURE_OPTIONS] {
+ set DEBUG_TORTURE_OPTIONS ""
+- set type_list [list "-gstabs" "-gstabs+" "-gxcoff" "-gxcoff+" "-gdwarf-2" ]
++ set type_list [list "-gdwarf-2" ]
+ foreach type $type_list {
+ set comp_output [$target_compile \
+ "$srcdir/$subdir/$trivial" "trivial.S" assembly \
+diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
+index d404058fd..bd89d4f52 100644
+--- a/gcc/testsuite/lib/target-supports.exp
++++ b/gcc/testsuite/lib/target-supports.exp
+@@ -1126,15 +1126,6 @@ proc check_effective_target_pthread {} {
+ } "-pthread"]
+ }
+
+-# Return 1 if compilation with -gstabs is error-free for trivial
+-# code, 0 otherwise.
+-
+-proc check_effective_target_stabs {} {
+- return [check_no_compiler_messages stabs object {
+- void foo (void) { }
+- } "-gstabs"]
+-}
+-
+ # Return 1 if compilation with -mpe-aligned-commons is error-free
+ # for trivial code, 0 otherwise.
+
+diff --git a/gcc/testsuite/objc.dg/stabs-1.m b/gcc/testsuite/objc.dg/stabs-1.m
+deleted file mode 100644
+index b97e4d6a7..000000000
+--- a/gcc/testsuite/objc.dg/stabs-1.m
++++ /dev/null
+@@ -1,19 +0,0 @@
+-/* Check if the final SO STABS record goes into the .text section. */
+-/* Contributed by Ziemowit Laski <zlaski@apple.com> */
+-
+-/* { dg-do compile { target stabs } } */
+-/* { dg-options "-gstabs" } */
+-/* { dg-additional-options "-Wno-objc-root-class" } */
+-
+-@interface MyClass
+-+ newWithArg: arg;
+-@end
+-
+-@implementation MyClass
+-+ newWithArg: arg
+-{
+-}
+-@end
+-
+-/* See PR target/52152 for the xfail. */
+-/* { dg-final { scan-assembler "(.SUBSPA.*\[\$\]CODE\[\$\]|.text\"?)\n\t.stabs.*100,0,0,(\[\.\$\])?L?L\[\$\]?etext\[0-9\]*\n(\[\.\$\])?L?L\[\$\]?etext" { xfail mips*-*-elf* } } } */
+diff --git a/gcc/toplev.cc b/gcc/toplev.cc
+index 055e0642f..f00a166df 100644
+--- a/gcc/toplev.cc
++++ b/gcc/toplev.cc
+@@ -89,14 +89,6 @@ along with GCC; see the file COPYING3. If not see
+ #include "ipa-param-manipulation.h"
+ #include "dbgcnt.h"
+
+-#if defined(DBX_DEBUGGING_INFO) || defined(XCOFF_DEBUGGING_INFO)
+-#include "dbxout.h"
+-#endif
+-
+-#ifdef XCOFF_DEBUGGING_INFO
+-#include "xcoffout.h" /* Needed for external data declarations. */
+-#endif
+-
+ #include "selftest.h"
+
+ #ifdef HAVE_isl
+@@ -1415,21 +1407,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;
+-#endif
+ #ifdef DWARF2_DEBUGGING_INFO
+ else if (dwarf_debuginfo_p ())
+ debug_hooks = &dwarf2_debug_hooks;
+diff --git a/gcc/varasm.cc b/gcc/varasm.cc
+index a4b1cc686..3f69b47a7 100644
+--- a/gcc/varasm.cc
++++ b/gcc/varasm.cc
+@@ -62,10 +62,6 @@ along with GCC; see the file COPYING3. If not see
+ #include "toplev.h"
+ #include "opts.h"
+
+-#ifdef XCOFF_DEBUGGING_INFO
+-#include "xcoffout.h" /* Needed for external data declarations. */
+-#endif
+-
+ /* The (assembler) name of the first globally-visible object output. */
+ extern GTY(()) const char *first_global_object_name;
+ extern GTY(()) const char *weak_global_object_name;
+diff --git a/gcc/xcoffout.cc b/gcc/xcoffout.cc
+deleted file mode 100644
+index bafd35524..000000000
+--- a/gcc/xcoffout.cc
++++ /dev/null
+@@ -1,494 +0,0 @@
+-/* Output xcoff-format symbol table information from GNU compiler.
+- Copyright (C) 1992-2022 Free Software Foundation, Inc.
+-
+-This file is part of GCC.
+-
+-GCC is free software; you can redistribute it and/or modify it under
+-the terms of the GNU General Public License as published by the Free
+-Software Foundation; either version 3, or (at your option) any later
+-version.
+-
+-GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+-WARRANTY; without even the implied warranty of MERCHANTABILITY or
+-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+-for more details.
+-
+-You should have received a copy of the GNU General Public License
+-along with GCC; see the file COPYING3. If not see
+-<http://www.gnu.org/licenses/>. */
+-
+-/* Output xcoff-format symbol table data. The main functionality is contained
+- in dbxout.cc. This file implements the sdbout-like parts of the xcoff
+- interface. Many functions are very similar to their counterparts in
+- the former sdbout.c file. */
+-
+-#include "config.h"
+-#include "system.h"
+-#include "coretypes.h"
+-#include "target.h"
+-#include "rtl.h"
+-#include "tree.h"
+-#include "diagnostic-core.h"
+-#include "varasm.h"
+-#include "output.h"
+-#include "debug.h"
+-#include "file-prefix-map.h" /* remap_debug_filename() */
+-
+-#ifdef XCOFF_DEBUGGING_INFO
+-
+-/* This defines the C_* storage classes. */
+-#include "xcoff.h"
+-#include "xcoffout.h"
+-#include "dbxout.h"
+-#include "gstab.h"
+-
+-/* Line number of beginning of current function, minus one.
+- Negative means not in a function or not using xcoff. */
+-
+-static int xcoff_begin_function_line = -1;
+-static int xcoff_inlining = 0;
+-
+-/* Name of the current include file. */
+-
+-const char *xcoff_current_include_file;
+-
+-/* Name of the current function file. This is the file the `.bf' is
+- emitted from. In case a line is emitted from a different file,
+- (by including that file of course), then the line number will be
+- absolute. */
+-
+-static const char *xcoff_current_function_file;
+-
+-/* Names of bss and data sections. These should be unique names for each
+- compilation unit. */
+-
+-char *xcoff_bss_section_name;
+-char *xcoff_private_data_section_name;
+-char *xcoff_private_rodata_section_name;
+-char *xcoff_tls_data_section_name;
+-char *xcoff_read_only_section_name;
+-
+-/* Last source file name mentioned in a NOTE insn. */
+-
+-const char *xcoff_lastfile;
+-
+-/* Macro definitions used below. */
+-
+-#define ABS_OR_RELATIVE_LINENO(LINENO) \
+-((xcoff_inlining) ? (LINENO) : (LINENO) - xcoff_begin_function_line)
+-
+-/* Output source line numbers via ".line". */
+-#define ASM_OUTPUT_LINE(FILE,LINENUM) \
+- do \
+- { \
+- /* Make sure we're in a function and prevent output of .line 0, as \
+- line # 0 is meant for symbol addresses in xcoff. Additionally, \
+- line numbers are 'unsigned short' in 32-bit mode. */ \
+- if (xcoff_begin_function_line >= 0) \
+- { \
+- int lno = ABS_OR_RELATIVE_LINENO (LINENUM); \
+- if (lno > 0 && (TARGET_64BIT || lno <= (int)USHRT_MAX)) \
+- fprintf (FILE, "\t.line\t%d\n", lno); \
+- } \
+- } \
+- while (0)
+-
+-#define ASM_OUTPUT_LFB(FILE,LINENUM) \
+-{ \
+- if (xcoff_begin_function_line == -1) \
+- { \
+- xcoff_begin_function_line = (LINENUM) - 1;\
+- fprintf (FILE, "\t.bf\t%d\n", (LINENUM)); \
+- } \
+- xcoff_current_function_file \
+- = (xcoff_current_include_file \
+- ? xcoff_current_include_file : main_input_filename); \
+-}
+-
+-#define ASM_OUTPUT_LFE(FILE,LINENUM) \
+- do \
+- { \
+- fprintf (FILE, "\t.ef\t%d\n", (LINENUM)); \
+- xcoff_begin_function_line = -1; \
+- } \
+- while (0)
+-
+-#define ASM_OUTPUT_LBB(FILE,LINENUM,BLOCKNUM) \
+- fprintf (FILE, "\t.bb\t%d\n", ABS_OR_RELATIVE_LINENO (LINENUM))
+-
+-#define ASM_OUTPUT_LBE(FILE,LINENUM,BLOCKNUM) \
+- fprintf (FILE, "\t.eb\t%d\n", ABS_OR_RELATIVE_LINENO (LINENUM))
+-
+-static void xcoffout_block (tree, int, tree);
+-static void xcoffout_source_file (FILE *, const char *, int);
+-
+-/* Support routines for XCOFF debugging info. */
+-
+-struct xcoff_type_number
+-{
+- const char *name;
+- int number;
+-};
+-static const struct xcoff_type_number xcoff_type_numbers[] = {
+- { "int", -1 },
+- { "char", -2 },
+- { "short int", -3 },
+- { "long int", -4 }, /* fiddled to -31 if 64 bits */
+- { "unsigned char", -5 },
+- { "signed char", -6 },
+- { "short unsigned int", -7 },
+- { "unsigned int", -8 },
+- /* No such type "unsigned". */
+- { "long unsigned int", -10 }, /* fiddled to -32 if 64 bits */
+- { "void", -11 },
+- { "float", -12 },
+- { "double", -13 },
+- { "long double", -14 },
+- /* Fortran types run from -15 to -29. */
+- { "wchar", -30 }, /* XXX Should be "wchar_t" ? */
+- { "long long int", -31 },
+- { "long long unsigned int", -32 },
+- /* Additional Fortran types run from -33 to -37. */
+-
+- /* ??? Should also handle built-in C++ and Obj-C types. There perhaps
+- aren't any that C doesn't already have. */
+-};
+-
+-/* Returns an XCOFF fundamental type number for DECL (assumed to be a
+- TYPE_DECL), or 0 if dbxout.cc should assign a type number normally. */
+-int
+-xcoff_assign_fundamental_type_number (tree decl)
+-{
+- const char *name;
+- size_t i;
+-
+- /* Do not waste time searching the list for non-intrinsic types. */
+- if (DECL_NAME (decl) == 0 || ! DECL_IS_UNDECLARED_BUILTIN (decl))
+- return 0;
+-
+- name = IDENTIFIER_POINTER (DECL_NAME (decl));
+-
+- /* Linear search, blech, but the list is too small to bother
+- doing anything else. */
+- for (i = 0; i < ARRAY_SIZE (xcoff_type_numbers); i++)
+- if (!strcmp (xcoff_type_numbers[i].name, name))
+- goto found;
+- return 0;
+-
+- found:
+- /* -4 and -10 should be replaced with -31 and -32, respectively,
+- when used for a 64-bit type. */
+- if (int_size_in_bytes (TREE_TYPE (decl)) == 8)
+- {
+- if (xcoff_type_numbers[i].number == -4)
+- return -31;
+- if (xcoff_type_numbers[i].number == -10)
+- return -32;
+- }
+- return xcoff_type_numbers[i].number;
+-}
+-
+-/* Print an error message for unrecognized stab codes. */
+-
+-#define UNKNOWN_STAB(STR) \
+- internal_error ("no sclass for %s stab (0x%x)", STR, stab)
+-
+-/* Conversion routine from BSD stabs to AIX storage classes. */
+-
+-int
+-stab_to_sclass (int stab)
+-{
+- switch (stab)
+- {
+- case N_GSYM:
+- return C_GSYM;
+-
+- case N_FNAME:
+- UNKNOWN_STAB ("N_FNAME");
+-
+- case N_FUN:
+- return C_FUN;
+-
+- case N_STSYM:
+- case N_LCSYM:
+- return C_STSYM;
+-
+- case N_MAIN:
+- UNKNOWN_STAB ("N_MAIN");
+-
+- case N_RSYM:
+- return C_RSYM;
+-
+- case N_SSYM:
+- UNKNOWN_STAB ("N_SSYM");
+-
+- case N_RPSYM:
+- return C_RPSYM;
+-
+- case N_PSYM:
+- return C_PSYM;
+- case N_LSYM:
+- return C_LSYM;
+- case N_DECL:
+- return C_DECL;
+- case N_ENTRY:
+- return C_ENTRY;
+-
+- case N_SO:
+- UNKNOWN_STAB ("N_SO");
+-
+- case N_SOL:
+- UNKNOWN_STAB ("N_SOL");
+-
+- case N_SLINE:
+- UNKNOWN_STAB ("N_SLINE");
+-
+- case N_DSLINE:
+- UNKNOWN_STAB ("N_DSLINE");
+-
+- case N_BSLINE:
+- UNKNOWN_STAB ("N_BSLINE");
+-
+- case N_BINCL:
+- UNKNOWN_STAB ("N_BINCL");
+-
+- case N_EINCL:
+- UNKNOWN_STAB ("N_EINCL");
+-
+- case N_EXCL:
+- UNKNOWN_STAB ("N_EXCL");
+-
+- case N_LBRAC:
+- UNKNOWN_STAB ("N_LBRAC");
+-
+- case N_RBRAC:
+- UNKNOWN_STAB ("N_RBRAC");
+-
+- case N_BCOMM:
+- return C_BCOMM;
+- case N_ECOMM:
+- return C_ECOMM;
+- case N_ECOML:
+- return C_ECOML;
+-
+- case N_LENG:
+- UNKNOWN_STAB ("N_LENG");
+-
+- case N_PC:
+- UNKNOWN_STAB ("N_PC");
+-
+- case N_M2C:
+- UNKNOWN_STAB ("N_M2C");
+-
+- case N_SCOPE:
+- UNKNOWN_STAB ("N_SCOPE");
+-
+- case N_CATCH:
+- UNKNOWN_STAB ("N_CATCH");
+-
+- case N_OPT:
+- UNKNOWN_STAB ("N_OPT");
+-
+- default:
+- UNKNOWN_STAB ("?");
+- }
+-}
+-
+-/* Output debugging info to FILE to switch to sourcefile FILENAME.
+- INLINE_P is true if this is from an inlined function. */
+-
+-static void
+-xcoffout_source_file (FILE *file, const char *filename, int inline_p)
+-{
+- if (filename
+- && (xcoff_lastfile == 0 || strcmp (filename, xcoff_lastfile)
+- || (inline_p && ! xcoff_inlining)
+- || (! inline_p && xcoff_inlining)))
+- {
+- if (xcoff_current_include_file)
+- {
+- fprintf (file, "\t.ei\t");
+- output_quoted_string (file,
+- remap_debug_filename (xcoff_current_include_file));
+- fprintf (file, "\n");
+- xcoff_current_include_file = NULL;
+- }
+- xcoff_inlining = inline_p;
+- if (strcmp (main_input_filename, filename) || inline_p)
+- {
+- fprintf (file, "\t.bi\t");
+- output_quoted_string (file, remap_debug_filename (filename));
+- fprintf (file, "\n");
+- xcoff_current_include_file = filename;
+- }
+- xcoff_lastfile = filename;
+- }
+-}
+-
+-/* Output a line number symbol entry for location (FILENAME, LINE). */
+-
+-void
+-xcoffout_source_line (unsigned int line, unsigned int column ATTRIBUTE_UNUSED,
+- const char *filename, int discriminator ATTRIBUTE_UNUSED,
+- bool is_stmt ATTRIBUTE_UNUSED)
+-{
+- bool inline_p = (strcmp (xcoff_current_function_file, filename) != 0
+- || (int) line < xcoff_begin_function_line);
+-
+- xcoffout_source_file (asm_out_file, filename, inline_p);
+-
+- ASM_OUTPUT_LINE (asm_out_file, line);
+-}
+-
+-/* Output the symbols defined in block number DO_BLOCK.
+-
+- This function works by walking the tree structure of blocks,
+- counting blocks until it finds the desired block. */
+-
+-static unsigned int do_block = 0;
+-
+-static void
+-xcoffout_block (tree block, int depth, tree args)
+-{
+- while (block)
+- {
+- /* Ignore blocks never expanded or otherwise marked as real. */
+- if (TREE_USED (block))
+- {
+- /* When we reach the specified block, output its symbols. */
+- if (BLOCK_NUMBER (block) == do_block)
+- {
+- /* Output the syms of the block. */
+- if (debug_info_level != DINFO_LEVEL_TERSE || depth == 0)
+- dbxout_syms (BLOCK_VARS (block));
+- if (args)
+- dbxout_reg_parms (args);
+-
+- /* We are now done with the block. Don't go to inner blocks. */
+- return;
+- }
+- /* If we are past the specified block, stop the scan. */
+- else if (BLOCK_NUMBER (block) >= do_block)
+- return;
+-
+- /* Output the subblocks. */
+- xcoffout_block (BLOCK_SUBBLOCKS (block), depth + 1, NULL_TREE);
+- }
+- block = BLOCK_CHAIN (block);
+- }
+-}
+-
+-/* Describe the beginning of an internal block within a function.
+- Also output descriptions of variables defined in this block.
+-
+- N is the number of the block, by order of beginning, counting from 1,
+- and not counting the outermost (function top-level) block.
+- The blocks match the BLOCKs in DECL_INITIAL (current_function_decl),
+- if the count starts at 0 for the outermost one. */
+-
+-void
+-xcoffout_begin_block (unsigned int line, unsigned int n)
+-{
+- tree decl = current_function_decl;
+-
+- /* The IBM AIX compiler does not emit a .bb for the function level scope,
+- so we avoid it here also. */
+- if (n != 1)
+- ASM_OUTPUT_LBB (asm_out_file, line, n);
+-
+- do_block = n;
+- xcoffout_block (DECL_INITIAL (decl), 0, DECL_ARGUMENTS (decl));
+-}
+-
+-/* Describe the end line-number of an internal block within a function. */
+-
+-void
+-xcoffout_end_block (unsigned int line, unsigned int n)
+-{
+- if (n != 1)
+- ASM_OUTPUT_LBE (asm_out_file, line, n);
+-}
+-
+-/* Called at beginning of function (before prologue).
+- Declare function as needed for debugging. */
+-
+-void
+-xcoffout_declare_function (FILE *file, tree decl, const char *name)
+-{
+- size_t len;
+-
+- if (*name == '*')
+- name++;
+- len = strlen (name);
+- if (name[len - 1] == ']')
+- {
+- char *n = XALLOCAVEC (char, len - 3);
+- memcpy (n, name, len - 4);
+- n[len - 4] = '\0';
+- name = n;
+- }
+-
+- /* Any pending .bi or .ei must occur before the .function pseudo op.
+- Otherwise debuggers will think that the function is in the previous
+- file and/or at the wrong line number. */
+- xcoffout_source_file (file, DECL_SOURCE_FILE (decl), 0);
+- dbxout_symbol (decl, 0);
+-
+- /* .function NAME, TOP, MAPPING, TYPE, SIZE
+- 16 and 044 are placeholders for backwards compatibility */
+- fprintf (file, "\t.function .%s,.%s,16,044,FE..%s-.%s\n",
+- name, name, name, name);
+-}
+-
+-/* Called at beginning of function body (at start of prologue).
+- Record the function's starting line number, so we can output
+- relative line numbers for the other lines.
+- Record the file name that this function is contained in. */
+-
+-void
+-xcoffout_begin_prologue (unsigned int line,
+- unsigned int column ATTRIBUTE_UNUSED,
+- const char *file ATTRIBUTE_UNUSED)
+-{
+- ASM_OUTPUT_LFB (asm_out_file, line);
+- dbxout_parms (DECL_ARGUMENTS (current_function_decl));
+-
+- /* Emit the symbols for the outermost BLOCK's variables. sdbout.c did this
+- in sdbout_begin_block, but there is no guarantee that there will be any
+- inner block 1, so we must do it here. This gives a result similar to
+- dbxout, so it does make some sense. */
+- do_block = BLOCK_NUMBER (DECL_INITIAL (current_function_decl));
+- xcoffout_block (DECL_INITIAL (current_function_decl), 0,
+- DECL_ARGUMENTS (current_function_decl));
+-
+- ASM_OUTPUT_LINE (asm_out_file, line);
+-}
+-
+-/* Called at end of function (before epilogue).
+- Describe end of outermost block. */
+-
+-void
+-xcoffout_end_function (unsigned int last_linenum)
+-{
+- ASM_OUTPUT_LFE (asm_out_file, last_linenum);
+-}
+-
+-/* Output xcoff info for the absolute end of a function.
+- Called after the epilogue is output. */
+-
+-void
+-xcoffout_end_epilogue (unsigned int line ATTRIBUTE_UNUSED,
+- const char *file ATTRIBUTE_UNUSED)
+-{
+- /* We need to pass the correct function size to .function, otherwise,
+- the xas assembler can't figure out the correct size for the function
+- aux entry. So, we emit a label after the last instruction which can
+- be used by the .function pseudo op to calculate the function size. */
+-
+- const char *fname = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0);
+- if (*fname == '*')
+- ++fname;
+- fprintf (asm_out_file, "FE..");
+- ASM_OUTPUT_LABEL (asm_out_file, fname);
+-}
+-#endif /* XCOFF_DEBUGGING_INFO */
+diff --git a/gcc/xcoffout.h b/gcc/xcoffout.h
+deleted file mode 100644
+index f28e83ea9..000000000
+--- a/gcc/xcoffout.h
++++ /dev/null
+@@ -1,194 +0,0 @@
+-/* XCOFF definitions. These are needed in dbxout.cc, final.cc,
+- and xcoffout.h.
+- Copyright (C) 1998-2022 Free Software Foundation, Inc.
+-
+-This file is part of GCC.
+-
+-GCC is free software; you can redistribute it and/or modify it under
+-the terms of the GNU General Public License as published by the Free
+-Software Foundation; either version 3, or (at your option) any later
+-version.
+-
+-GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+-WARRANTY; without even the implied warranty of MERCHANTABILITY or
+-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+-for more details.
+-
+-You should have received a copy of the GNU General Public License
+-along with GCC; see the file COPYING3. If not see
+-<http://www.gnu.org/licenses/>. */
+-
+-#ifndef GCC_XCOFFOUT_H
+-#define GCC_XCOFFOUT_H
+-
+-/* Tags and typedefs are C_DECL in XCOFF, not C_LSYM. */
+-
+-#define DBX_TYPE_DECL_STABS_CODE N_DECL
+-
+-/* Use the XCOFF predefined type numbers. */
+-
+-#define DBX_ASSIGN_FUNDAMENTAL_TYPE_NUMBER(TYPE) \
+- xcoff_assign_fundamental_type_number (TYPE)
+-
+-/* Any type with a negative type index has already been output. */
+-
+-#define DBX_TYPE_DEFINED(TYPE) (TYPE_SYMTAB_ADDRESS (TYPE) < 0)
+-
+-/* Must use N_STSYM for static const variables (those in the text section)
+- instead of N_FUN. */
+-
+-#define DBX_STATIC_CONST_VAR_CODE N_STSYM
+-
+-/* For static variables, output code to define the start of a static block. */
+-
+-#define DBX_STATIC_BLOCK_START(ASMFILE,CODE) \
+-{ \
+- if ((CODE) == N_STSYM) \
+- fprintf ((ASMFILE), "\t.bs\t%s[RW]\n", xcoff_private_data_section_name);\
+- else if ((CODE) == N_LCSYM) \
+- fprintf ((ASMFILE), "\t.bs\t%s\n", xcoff_bss_section_name); \
+-}
+-
+-/* For static variables, output code to define the end of a static block. */
+-
+-#define DBX_STATIC_BLOCK_END(ASMFILE,CODE) \
+-{ \
+- if ((CODE) == N_STSYM || (CODE) == N_LCSYM) \
+- fputs ("\t.es\n", (ASMFILE)); \
+-}
+-
+-/* We must use N_RPYSM instead of N_RSYM for register parameters. */
+-
+-#define DBX_REGPARM_STABS_CODE N_RPSYM
+-
+-/* We must use 'R' instead of 'P' for register parameters. */
+-
+-#define DBX_REGPARM_STABS_LETTER 'R'
+-
+-/* Define our own finish symbol function, since xcoff stabs have their
+- own different format. */
+-
+-#define DBX_FINISH_STABS(SYM, CODE, LINE, ADDR, LABEL, NUMBER) do { \
+- if (ADDR) \
+- { \
+- /* If we are writing a function name, we must emit a dot in \
+- order to refer to the function code, not its descriptor. */ \
+- if (CODE == N_FUN) \
+- putc ('.', asm_out_file); \
+- \
+- /* If we are writing a function name, we must ensure that \
+- there is no storage-class suffix on the name. */ \
+- if (CODE == N_FUN && GET_CODE (ADDR) == SYMBOL_REF) \
+- { \
+- const char *_p = XSTR (ADDR, 0); \
+- if (*_p == '*') \
+- fputs (_p+1, asm_out_file); \
+- else \
+- for (; *_p != '[' && *_p; _p++) \
+- putc (*_p != '$' ? *_p : '_', asm_out_file); \
+- } \
+- else \
+- output_addr_const (asm_out_file, ADDR); \
+- } \
+- /* Another special case: N_GSYM always gets the symbol name, \
+- whether or not LABEL or NUMBER are set. */ \
+- else if (CODE == N_GSYM) \
+- assemble_name (asm_out_file, XSTR (XEXP (DECL_RTL (SYM), 0), 0)); \
+- else if (LABEL) \
+- assemble_name (asm_out_file, LABEL); \
+- else \
+- dbxout_int (NUMBER); \
+- putc (',', asm_out_file); \
+- dbxout_int (stab_to_sclass (CODE)); \
+- fputs (",0\n", asm_out_file); \
+-} while (0)
+-
+-/* These are IBM XCOFF extensions we need to reference in dbxout.cc
+- and xcoffout.cc. */
+-
+-/* AIX XCOFF uses this for typedefs. This can have any value, since it is
+- only used for translation into a C_DECL storage class. */
+-#ifndef N_DECL
+-#define N_DECL 0x8c
+-#endif
+-/* AIX XCOFF uses this for parameters passed in registers. This can have
+- any value, since it is only used for translation into a C_RPSYM storage
+- class. */
+-#ifndef N_RPSYM
+-#define N_RPSYM 0x8e
+-#endif
+-
+-/* Name of the current include file. */
+-
+-extern const char *xcoff_current_include_file;
+-
+-/* Names of bss and data sections. These should be unique names for each
+- compilation unit. */
+-
+-extern char *xcoff_bss_section_name;
+-extern char *xcoff_private_data_section_name;
+-extern char *xcoff_private_rodata_section_name;
+-extern char *xcoff_tls_data_section_name;
+-extern char *xcoff_read_only_section_name;
+-
+-/* Last source file name mentioned in a NOTE insn. */
+-
+-extern const char *xcoff_lastfile;
+-
+-/* Don't write out path name for main source file. */
+-#define NO_DBX_MAIN_SOURCE_DIRECTORY 1
+-
+-/* Write out main source file name using ".file" rather than ".stabs".
+- We don't actually do this here, because the assembler gets confused if there
+- is more than one .file directive. rs6000_xcoff_file_start is already
+- emitting a .file directory, so we don't output one here also.
+- Initialize xcoff_lastfile. */
+-#define DBX_OUTPUT_MAIN_SOURCE_FILENAME(FILE,FILENAME) \
+- xcoff_lastfile = (FILENAME)
+-
+-/* If we are still in an include file, its end must be marked. */
+-#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \
+-do { \
+- if (xcoff_current_include_file) \
+- { \
+- fputs ("\t.ei\t", (FILE)); \
+- output_quoted_string ((FILE), xcoff_current_include_file); \
+- putc ('\n', (FILE)); \
+- xcoff_current_include_file = NULL; \
+- } \
+-} while (0)
+-
+-/* Do not emit any marker for XCOFF until assembler allows XFT_CV. */
+-#define NO_DBX_GCC_MARKER
+-
+-/* XCOFF32 maximum length is 64K; XLC limits to 16K. */
+-#define DBX_CONTIN_LENGTH 16384
+-
+-/* XLC uses '?' as continuation character. */
+-#define DBX_CONTIN_CHAR '?'
+-
+-/* Don't try to use the `x' type-cross-reference character in DBX data.
+- Also has the consequence of putting each struct, union or enum
+- into a separate .stabs, containing only cross-refs to the others. */
+-#define DBX_NO_XREFS
+-
+-/* We must put stabs in the text section. If we don't the assembler
+- won't handle them correctly; it will sometimes put stabs where gdb
+- can't find them. */
+-
+-#define DEBUG_SYMS_TEXT
+-
+-/* Prototype functions in xcoffout.cc. */
+-
+-extern int stab_to_sclass (int);
+-extern void xcoffout_begin_prologue (unsigned int, unsigned int, const char *);
+-extern void xcoffout_begin_block (unsigned, unsigned);
+-extern void xcoffout_end_epilogue (unsigned int, const char *);
+-extern void xcoffout_end_function (unsigned int);
+-extern void xcoffout_end_block (unsigned, unsigned);
+-extern int xcoff_assign_fundamental_type_number (tree);
+-extern void xcoffout_declare_function (FILE *, tree, const char *);
+-extern void xcoffout_source_line (unsigned int, unsigned int, const char *,
+- int, bool);
+-
+-#endif /* GCC_XCOFFOUT_H */
+--
+2.33.0
+