summaryrefslogtreecommitdiff
path: root/0095-STABS-remove-gstabs-and-gxcoff-functionality.patch
blob: e76e8c31eba210448edb45d305322d46084e7e55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
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