aboutsummaryrefslogtreecommitdiff
path: root/ChangeLog.git
blob: 28cfcc13313f88cd92e606d069bd5ff32ca01632 (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
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692
14693
14694
14695
14696
14697
14698
14699
14700
14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713
14714
14715
14716
14717
14718
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763
14764
14765
14766
14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
14801
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650
15651
15652
15653
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
16374
16375
16376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421
16422
16423
16424
16425
16426
16427
16428
16429
16430
16431
16432
16433
16434
16435
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473
16474
16475
16476
16477
16478
16479
16480
16481
16482
16483
16484
16485
16486
16487
16488
16489
16490
16491
16492
16493
16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
16556
16557
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603
16604
16605
16606
16607
16608
16609
16610
16611
16612
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635
16636
16637
16638
16639
16640
16641
16642
16643
16644
16645
16646
16647
16648
16649
16650
16651
16652
16653
16654
16655
16656
16657
16658
16659
16660
16661
16662
16663
16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679
16680
16681
16682
16683
16684
16685
16686
16687
16688
16689
16690
16691
16692
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715
16716
16717
16718
16719
16720
16721
16722
16723
16724
16725
16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776
16777
16778
16779
16780
16781
16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794
16795
16796
16797
16798
16799
16800
16801
16802
16803
16804
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814
16815
16816
16817
16818
16819
16820
16821
16822
16823
16824
16825
16826
16827
16828
16829
16830
16831
16832
16833
16834
16835
16836
16837
16838
16839
16840
16841
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857
16858
16859
16860
16861
16862
16863
16864
16865
16866
16867
16868
16869
16870
16871
16872
16873
16874
16875
16876
16877
16878
16879
16880
16881
16882
16883
16884
16885
16886
16887
16888
16889
16890
16891
16892
16893
16894
16895
16896
16897
16898
16899
16900
16901
16902
16903
16904
16905
16906
16907
16908
16909
16910
16911
16912
16913
16914
16915
16916
16917
16918
16919
16920
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934
16935
16936
16937
16938
16939
16940
16941
16942
16943
16944
16945
16946
16947
16948
16949
16950
16951
16952
16953
16954
16955
16956
16957
16958
16959
16960
16961
16962
16963
16964
16965
16966
16967
16968
16969
16970
16971
16972
16973
16974
16975
16976
16977
16978
16979
16980
16981
16982
16983
16984
16985
16986
16987
16988
16989
16990
16991
16992
16993
16994
16995
16996
16997
16998
16999
17000
17001
17002
17003
17004
17005
17006
17007
17008
17009
17010
17011
17012
17013
17014
17015
17016
17017
17018
17019
17020
17021
17022
17023
17024
17025
17026
17027
17028
17029
17030
17031
17032
17033
17034
17035
17036
17037
17038
17039
17040
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
17063
17064
17065
17066
17067
17068
17069
17070
17071
17072
17073
17074
17075
17076
17077
17078
17079
17080
17081
17082
17083
17084
17085
17086
17087
17088
17089
17090
17091
17092
17093
17094
17095
17096
17097
17098
17099
17100
17101
17102
17103
17104
17105
17106
17107
17108
17109
17110
17111
17112
17113
17114
17115
17116
17117
17118
17119
17120
17121
17122
17123
17124
17125
17126
17127
17128
17129
17130
17131
17132
17133
17134
17135
17136
17137
17138
17139
17140
17141
17142
17143
17144
17145
17146
17147
17148
17149
17150
17151
17152
17153
17154
17155
17156
17157
17158
17159
17160
17161
17162
17163
17164
17165
17166
17167
17168
17169
17170
17171
17172
17173
17174
17175
17176
17177
17178
17179
17180
17181
17182
17183
17184
17185
17186
17187
17188
17189
17190
17191
17192
17193
17194
17195
17196
17197
17198
17199
17200
17201
17202
17203
17204
17205
17206
17207
17208
17209
17210
17211
17212
17213
17214
17215
17216
17217
17218
17219
17220
17221
17222
17223
17224
17225
17226
17227
17228
17229
17230
17231
17232
17233
17234
17235
17236
17237
17238
17239
17240
17241
17242
17243
17244
17245
17246
17247
17248
17249
17250
17251
17252
17253
17254
17255
17256
17257
17258
17259
17260
17261
17262
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278
17279
17280
17281
17282
17283
17284
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324
17325
17326
17327
17328
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359
17360
17361
17362
17363
17364
17365
17366
17367
17368
17369
17370
17371
17372
17373
17374
17375
17376
17377
17378
17379
17380
17381
17382
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395
17396
17397
17398
17399
17400
17401
17402
17403
17404
17405
17406
17407
17408
17409
17410
17411
17412
17413
17414
17415
17416
17417
17418
17419
17420
17421
17422
17423
17424
17425
17426
17427
17428
17429
17430
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
17550
17551
17552
17553
17554
17555
17556
17557
17558
17559
17560
17561
17562
17563
17564
17565
17566
17567
17568
17569
17570
17571
17572
17573
17574
17575
17576
17577
17578
17579
17580
17581
17582
17583
17584
17585
17586
17587
17588
17589
17590
17591
17592
17593
17594
17595
17596
17597
17598
17599
17600
17601
17602
17603
17604
17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
17616
17617
17618
17619
17620
17621
17622
17623
17624
17625
17626
17627
17628
17629
17630
17631
17632
17633
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716
17717
17718
17719
17720
17721
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
17766
17767
17768
17769
17770
17771
17772
17773
17774
17775
17776
17777
17778
17779
17780
17781
17782
17783
17784
17785
17786
17787
17788
17789
17790
17791
17792
17793
17794
17795
17796
17797
17798
17799
17800
17801
17802
17803
17804
17805
17806
17807
17808
17809
17810
17811
17812
17813
17814
17815
17816
17817
17818
17819
17820
17821
17822
17823
17824
17825
17826
17827
17828
17829
17830
17831
17832
17833
17834
17835
17836
17837
17838
17839
17840
17841
17842
17843
17844
17845
17846
17847
17848
17849
17850
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
17866
17867
17868
17869
17870
17871
17872
17873
17874
17875
17876
17877
17878
17879
17880
17881
17882
17883
17884
17885
17886
17887
17888
17889
17890
17891
17892
17893
17894
17895
17896
17897
17898
17899
17900
17901
17902
17903
17904
17905
17906
17907
17908
17909
17910
17911
17912
17913
17914
17915
17916
17917
17918
17919
17920
17921
17922
17923
17924
17925
17926
17927
17928
17929
17930
17931
17932
17933
17934
17935
17936
17937
17938
17939
17940
17941
17942
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953
17954
17955
17956
17957
17958
17959
17960
17961
17962
17963
17964
17965
17966
17967
17968
17969
17970
17971
17972
17973
17974
17975
17976
17977
17978
17979
17980
17981
17982
17983
17984
17985
17986
17987
17988
17989
17990
17991
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026
18027
18028
18029
18030
18031
18032
18033
18034
18035
18036
18037
18038
18039
18040
18041
18042
18043
18044
18045
18046
18047
18048
18049
18050
18051
18052
18053
18054
18055
18056
18057
18058
18059
18060
18061
18062
18063
18064
18065
18066
18067
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
18081
18082
18083
18084
18085
18086
18087
18088
18089
18090
18091
18092
18093
18094
18095
18096
18097
18098
18099
18100
18101
18102
18103
18104
18105
18106
18107
18108
18109
18110
18111
18112
18113
18114
18115
18116
18117
18118
18119
18120
18121
18122
18123
18124
18125
18126
18127
18128
18129
18130
18131
18132
18133
18134
18135
18136
18137
18138
18139
18140
18141
18142
18143
18144
18145
18146
18147
18148
18149
18150
18151
18152
18153
18154
18155
18156
18157
18158
18159
18160
18161
18162
18163
18164
18165
18166
18167
18168
18169
18170
18171
18172
18173
18174
18175
18176
18177
18178
18179
18180
18181
18182
18183
18184
18185
18186
18187
18188
18189
18190
18191
18192
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211
18212
18213
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
18262
18263
18264
18265
18266
18267
18268
18269
18270
18271
18272
18273
18274
18275
18276
18277
18278
18279
18280
18281
18282
18283
18284
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298
18299
18300
18301
18302
18303
18304
18305
18306
18307
18308
18309
18310
18311
18312
18313
18314
18315
18316
18317
18318
18319
18320
18321
18322
18323
18324
18325
18326
18327
18328
18329
18330
18331
18332
18333
18334
18335
18336
18337
18338
18339
18340
18341
18342
18343
18344
18345
18346
18347
18348
18349
18350
18351
18352
18353
18354
18355
18356
18357
18358
18359
18360
18361
18362
18363
18364
18365
18366
18367
18368
18369
18370
18371
18372
18373
18374
18375
18376
18377
18378
18379
18380
18381
18382
18383
18384
18385
18386
18387
18388
18389
18390
18391
18392
18393
18394
18395
18396
18397
18398
18399
18400
18401
18402
18403
18404
18405
18406
18407
18408
18409
18410
18411
18412
18413
18414
18415
18416
18417
18418
18419
18420
18421
18422
18423
18424
18425
18426
18427
18428
18429
18430
18431
18432
18433
18434
18435
18436
18437
18438
18439
18440
18441
18442
18443
18444
18445
18446
18447
18448
18449
18450
18451
18452
18453
18454
18455
18456
18457
18458
18459
18460
18461
18462
18463
18464
18465
18466
18467
18468
18469
18470
18471
18472
18473
18474
18475
18476
18477
18478
18479
18480
18481
18482
18483
18484
18485
18486
18487
18488
18489
18490
18491
18492
18493
18494
18495
18496
18497
18498
18499
18500
18501
18502
18503
18504
18505
18506
18507
18508
18509
18510
18511
18512
18513
18514
18515
18516
18517
18518
18519
18520
18521
18522
18523
18524
18525
18526
18527
18528
18529
18530
18531
18532
18533
18534
18535
18536
18537
18538
18539
18540
18541
18542
18543
18544
18545
18546
18547
18548
18549
18550
18551
18552
18553
18554
18555
18556
18557
18558
18559
18560
18561
18562
18563
18564
18565
18566
18567
18568
18569
18570
18571
18572
18573
18574
18575
18576
18577
18578
18579
18580
18581
18582
18583
18584
18585
18586
18587
18588
18589
18590
18591
18592
18593
18594
18595
18596
18597
18598
18599
18600
18601
18602
18603
18604
18605
18606
18607
18608
18609
18610
18611
18612
18613
18614
18615
18616
18617
18618
18619
18620
18621
18622
18623
18624
18625
18626
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
18639
18640
18641
18642
18643
18644
18645
18646
18647
18648
18649
18650
18651
18652
18653
18654
18655
18656
18657
18658
18659
18660
18661
18662
18663
18664
18665
18666
18667
18668
18669
18670
18671
18672
18673
18674
18675
18676
18677
18678
18679
18680
18681
18682
18683
18684
18685
18686
18687
18688
18689
18690
18691
18692
18693
18694
18695
18696
18697
18698
18699
18700
18701
18702
18703
18704
18705
18706
18707
18708
18709
18710
18711
18712
18713
18714
18715
18716
18717
18718
18719
18720
18721
18722
18723
18724
18725
18726
18727
18728
18729
18730
18731
18732
18733
18734
18735
18736
18737
18738
18739
18740
18741
18742
18743
18744
18745
18746
18747
18748
18749
18750
18751
18752
18753
18754
18755
18756
18757
18758
18759
18760
18761
18762
18763
18764
18765
18766
18767
18768
18769
18770
18771
18772
18773
18774
18775
18776
18777
18778
18779
18780
18781
18782
18783
18784
18785
18786
18787
18788
18789
18790
18791
18792
18793
18794
18795
18796
18797
18798
18799
18800
18801
18802
18803
18804
18805
18806
18807
18808
18809
18810
18811
18812
18813
18814
18815
18816
18817
18818
18819
18820
18821
18822
18823
18824
18825
18826
18827
18828
18829
18830
18831
18832
18833
18834
18835
18836
18837
18838
18839
18840
18841
18842
18843
18844
18845
18846
18847
18848
18849
18850
18851
18852
18853
18854
18855
18856
18857
18858
18859
18860
18861
18862
18863
18864
18865
18866
18867
18868
18869
18870
18871
18872
18873
18874
18875
18876
18877
18878
18879
18880
18881
18882
18883
18884
18885
18886
18887
18888
18889
18890
18891
18892
18893
18894
18895
18896
18897
18898
18899
18900
18901
18902
18903
18904
18905
18906
18907
18908
18909
18910
18911
18912
18913
18914
18915
18916
18917
18918
18919
18920
18921
18922
18923
18924
18925
18926
18927
18928
18929
18930
18931
18932
18933
18934
18935
18936
18937
18938
18939
18940
18941
18942
18943
18944
18945
18946
18947
18948
18949
18950
18951
18952
18953
18954
18955
18956
18957
18958
18959
18960
18961
18962
18963
18964
18965
18966
18967
18968
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979
18980
18981
18982
18983
18984
18985
18986
18987
18988
18989
18990
18991
18992
18993
18994
18995
18996
18997
18998
18999
19000
19001
19002
19003
19004
19005
19006
19007
19008
19009
19010
19011
19012
19013
19014
19015
19016
19017
19018
19019
19020
19021
19022
19023
19024
19025
19026
19027
19028
19029
19030
19031
19032
19033
19034
19035
19036
19037
19038
19039
19040
19041
19042
19043
19044
19045
19046
19047
19048
19049
19050
19051
19052
19053
19054
19055
19056
19057
19058
19059
19060
19061
19062
19063
19064
19065
19066
19067
19068
19069
19070
19071
19072
19073
19074
19075
19076
19077
19078
19079
19080
19081
19082
19083
19084
19085
19086
19087
19088
19089
19090
19091
19092
19093
19094
19095
19096
19097
19098
19099
19100
19101
19102
19103
19104
19105
19106
19107
19108
19109
19110
19111
19112
19113
19114
19115
19116
19117
19118
19119
19120
19121
19122
19123
19124
19125
19126
19127
19128
19129
19130
19131
19132
19133
19134
19135
19136
19137
19138
19139
19140
19141
19142
19143
19144
19145
19146
19147
19148
19149
19150
19151
19152
19153
19154
19155
19156
19157
19158
19159
19160
19161
19162
19163
19164
19165
19166
19167
19168
19169
19170
19171
19172
19173
19174
19175
19176
19177
19178
19179
19180
19181
19182
19183
19184
19185
19186
19187
19188
19189
19190
19191
19192
19193
19194
19195
19196
19197
19198
19199
19200
19201
19202
19203
19204
19205
19206
19207
19208
19209
19210
19211
19212
19213
19214
19215
19216
19217
19218
19219
19220
19221
19222
19223
19224
19225
19226
19227
19228
19229
19230
19231
19232
19233
19234
19235
19236
19237
19238
19239
19240
19241
19242
19243
19244
19245
19246
19247
19248
19249
19250
19251
19252
19253
19254
19255
19256
19257
19258
19259
19260
19261
19262
19263
19264
19265
19266
19267
19268
19269
19270
19271
19272
19273
19274
19275
19276
19277
19278
19279
19280
19281
19282
19283
19284
19285
19286
19287
19288
19289
19290
19291
19292
19293
19294
19295
19296
19297
19298
19299
19300
19301
19302
19303
19304
19305
19306
19307
19308
19309
19310
19311
19312
19313
19314
19315
19316
19317
19318
19319
19320
19321
19322
19323
19324
19325
19326
19327
19328
19329
19330
19331
19332
19333
19334
19335
19336
19337
19338
19339
19340
19341
19342
19343
19344
19345
19346
19347
19348
19349
19350
19351
19352
19353
19354
19355
19356
19357
19358
19359
19360
19361
19362
19363
19364
19365
19366
19367
19368
19369
19370
19371
19372
19373
19374
19375
19376
19377
19378
19379
19380
19381
19382
19383
19384
19385
19386
19387
19388
19389
19390
19391
19392
19393
19394
19395
19396
19397
19398
19399
19400
19401
19402
19403
19404
19405
19406
19407
19408
19409
19410
19411
19412
19413
19414
19415
19416
19417
19418
19419
19420
19421
19422
19423
19424
19425
19426
19427
19428
19429
19430
19431
19432
19433
19434
19435
19436
19437
19438
19439
19440
19441
19442
19443
19444
19445
19446
19447
19448
19449
19450
19451
19452
19453
19454
19455
19456
19457
19458
19459
19460
19461
19462
19463
19464
19465
19466
19467
19468
19469
19470
19471
19472
19473
19474
19475
19476
19477
19478
19479
19480
19481
19482
19483
19484
19485
19486
19487
19488
19489
19490
19491
19492
19493
19494
19495
19496
19497
19498
19499
19500
19501
19502
19503
19504
19505
19506
19507
19508
19509
19510
19511
19512
19513
19514
19515
19516
19517
19518
19519
19520
19521
19522
19523
19524
19525
19526
19527
19528
19529
19530
19531
19532
19533
19534
19535
19536
19537
19538
19539
19540
19541
19542
19543
19544
19545
19546
19547
19548
19549
19550
19551
19552
19553
19554
19555
19556
19557
19558
19559
19560
19561
19562
19563
19564
19565
19566
19567
19568
19569
19570
19571
19572
19573
19574
19575
19576
19577
19578
19579
19580
19581
19582
19583
19584
19585
19586
19587
19588
19589
19590
19591
19592
19593
19594
19595
19596
19597
19598
19599
19600
19601
19602
19603
19604
19605
19606
19607
19608
19609
19610
19611
19612
19613
19614
19615
19616
19617
19618
19619
19620
19621
19622
19623
19624
19625
19626
19627
19628
19629
19630
19631
19632
19633
19634
19635
19636
19637
19638
19639
19640
19641
19642
19643
19644
19645
19646
19647
19648
19649
19650
19651
19652
19653
19654
19655
19656
19657
19658
19659
19660
19661
19662
19663
19664
19665
19666
19667
19668
19669
19670
19671
19672
19673
19674
19675
19676
19677
19678
19679
19680
19681
19682
19683
19684
19685
19686
19687
19688
19689
19690
19691
19692
19693
19694
19695
19696
19697
19698
19699
19700
19701
19702
19703
19704
19705
19706
19707
19708
19709
19710
19711
19712
19713
19714
19715
19716
19717
19718
19719
19720
19721
19722
19723
19724
19725
19726
19727
19728
19729
19730
19731
19732
19733
19734
19735
19736
19737
19738
19739
19740
19741
19742
19743
19744
19745
19746
19747
19748
19749
19750
19751
19752
19753
19754
19755
19756
19757
19758
19759
19760
19761
19762
19763
19764
19765
19766
19767
19768
19769
19770
19771
19772
19773
19774
19775
19776
19777
19778
19779
19780
19781
19782
19783
19784
19785
19786
19787
19788
19789
19790
19791
19792
19793
19794
19795
19796
19797
19798
19799
19800
19801
19802
19803
19804
19805
19806
19807
19808
19809
19810
19811
19812
19813
19814
19815
19816
19817
19818
19819
19820
19821
19822
19823
19824
19825
19826
19827
19828
19829
19830
19831
19832
19833
19834
19835
19836
19837
19838
19839
19840
19841
19842
19843
19844
19845
19846
19847
19848
19849
19850
19851
19852
19853
19854
19855
19856
19857
19858
19859
19860
19861
19862
19863
19864
19865
19866
19867
19868
19869
19870
19871
19872
19873
19874
19875
19876
19877
19878
19879
19880
19881
19882
19883
19884
19885
19886
19887
19888
19889
19890
19891
19892
19893
19894
19895
19896
19897
19898
19899
19900
19901
19902
19903
19904
19905
19906
19907
19908
19909
19910
19911
19912
19913
19914
19915
19916
19917
19918
19919
19920
19921
19922
19923
19924
19925
19926
19927
19928
19929
19930
19931
19932
19933
19934
19935
19936
19937
19938
19939
19940
19941
19942
19943
19944
19945
19946
19947
19948
19949
19950
19951
19952
19953
19954
19955
19956
19957
19958
19959
19960
19961
19962
19963
19964
19965
19966
19967
19968
19969
19970
19971
19972
19973
19974
19975
19976
19977
19978
19979
19980
19981
19982
19983
19984
19985
19986
19987
19988
19989
19990
19991
19992
19993
19994
19995
19996
19997
19998
19999
20000
20001
20002
20003
20004
20005
20006
20007
20008
20009
20010
20011
20012
20013
20014
20015
20016
20017
20018
20019
20020
20021
20022
20023
20024
20025
20026
20027
20028
20029
20030
20031
20032
20033
20034
20035
20036
20037
20038
20039
20040
20041
20042
20043
20044
20045
20046
20047
20048
20049
20050
20051
20052
20053
20054
20055
20056
20057
20058
20059
20060
20061
20062
20063
20064
20065
20066
20067
20068
20069
20070
20071
20072
20073
20074
20075
20076
20077
20078
20079
20080
20081
20082
20083
20084
20085
20086
20087
20088
20089
20090
20091
20092
20093
20094
20095
20096
20097
20098
20099
20100
20101
20102
20103
20104
20105
20106
20107
20108
20109
20110
20111
20112
20113
20114
20115
20116
20117
20118
20119
20120
20121
20122
20123
20124
20125
20126
20127
20128
20129
20130
20131
20132
20133
20134
20135
20136
20137
20138
20139
20140
20141
20142
20143
20144
20145
20146
20147
20148
20149
20150
20151
20152
20153
20154
20155
20156
20157
20158
20159
20160
20161
20162
20163
20164
20165
20166
20167
20168
20169
20170
20171
20172
20173
20174
20175
20176
20177
20178
20179
20180
20181
20182
20183
20184
20185
20186
20187
20188
20189
20190
20191
20192
20193
20194
20195
20196
20197
20198
20199
20200
20201
20202
20203
20204
20205
20206
20207
20208
20209
20210
20211
20212
20213
20214
20215
20216
20217
20218
20219
20220
20221
20222
20223
20224
20225
20226
20227
20228
20229
20230
20231
20232
20233
20234
20235
20236
20237
20238
20239
20240
20241
20242
20243
20244
20245
20246
20247
20248
20249
20250
20251
20252
20253
20254
20255
20256
20257
20258
20259
20260
20261
20262
20263
20264
20265
20266
20267
20268
20269
20270
20271
20272
20273
20274
20275
20276
20277
20278
20279
20280
20281
20282
20283
20284
20285
20286
20287
20288
20289
20290
20291
20292
20293
20294
20295
20296
20297
20298
20299
20300
20301
20302
20303
20304
20305
20306
20307
20308
20309
20310
20311
20312
20313
20314
20315
20316
20317
20318
20319
20320
20321
20322
20323
20324
20325
20326
20327
20328
20329
20330
20331
20332
20333
20334
20335
20336
20337
20338
20339
20340
20341
20342
20343
20344
20345
20346
20347
20348
20349
20350
20351
20352
20353
20354
20355
20356
20357
20358
20359
20360
20361
20362
20363
20364
20365
20366
20367
20368
20369
20370
20371
20372
20373
20374
20375
20376
20377
20378
20379
20380
20381
20382
20383
20384
20385
20386
20387
20388
20389
20390
20391
20392
20393
20394
20395
20396
20397
20398
20399
20400
20401
20402
20403
20404
20405
20406
20407
20408
20409
20410
20411
20412
20413
20414
20415
20416
20417
20418
20419
20420
20421
20422
20423
20424
20425
20426
20427
20428
20429
20430
20431
20432
20433
20434
20435
20436
20437
20438
20439
20440
20441
20442
20443
20444
20445
20446
20447
20448
20449
20450
20451
20452
20453
20454
20455
20456
20457
20458
20459
20460
20461
20462
20463
20464
20465
20466
20467
20468
20469
20470
20471
20472
20473
20474
20475
20476
20477
20478
20479
20480
20481
20482
20483
20484
20485
20486
20487
20488
20489
20490
20491
20492
20493
20494
20495
20496
20497
20498
20499
20500
20501
20502
20503
20504
20505
20506
20507
20508
20509
20510
20511
20512
20513
20514
20515
20516
20517
20518
20519
20520
20521
20522
20523
20524
20525
20526
20527
20528
20529
20530
20531
20532
20533
20534
20535
20536
20537
20538
20539
20540
20541
20542
20543
20544
20545
20546
20547
20548
20549
20550
20551
20552
20553
20554
20555
20556
20557
20558
20559
20560
20561
20562
20563
20564
20565
20566
20567
20568
20569
20570
20571
20572
20573
20574
20575
20576
20577
20578
20579
20580
20581
20582
20583
20584
20585
20586
20587
20588
20589
20590
20591
20592
20593
20594
20595
20596
20597
20598
20599
20600
20601
20602
20603
20604
20605
20606
20607
20608
20609
20610
20611
20612
20613
20614
20615
20616
20617
20618
20619
20620
20621
20622
20623
20624
20625
20626
20627
20628
20629
20630
20631
20632
20633
20634
20635
20636
20637
20638
20639
20640
20641
20642
20643
20644
20645
20646
20647
20648
20649
20650
20651
20652
20653
20654
20655
20656
20657
20658
20659
20660
20661
20662
20663
20664
20665
20666
20667
20668
20669
20670
20671
20672
20673
20674
20675
20676
20677
20678
20679
20680
20681
20682
20683
20684
20685
20686
20687
20688
20689
20690
20691
20692
20693
20694
20695
20696
20697
20698
20699
20700
20701
20702
20703
20704
20705
20706
20707
20708
20709
20710
20711
20712
20713
20714
20715
20716
20717
20718
20719
20720
20721
20722
20723
20724
20725
20726
20727
20728
20729
20730
20731
20732
20733
20734
20735
20736
20737
20738
20739
20740
20741
20742
20743
20744
20745
20746
20747
20748
20749
20750
20751
20752
20753
20754
20755
20756
20757
20758
20759
20760
20761
20762
20763
20764
20765
20766
20767
20768
20769
20770
20771
20772
20773
20774
20775
20776
20777
20778
20779
20780
20781
20782
20783
20784
20785
20786
20787
20788
20789
20790
20791
20792
20793
20794
20795
20796
20797
20798
20799
20800
20801
20802
20803
20804
20805
20806
20807
20808
20809
20810
20811
20812
20813
20814
20815
20816
20817
20818
20819
20820
20821
20822
20823
20824
20825
20826
20827
20828
20829
20830
20831
20832
20833
20834
20835
20836
20837
20838
20839
20840
20841
20842
20843
20844
20845
20846
20847
20848
20849
20850
20851
20852
20853
20854
20855
20856
20857
20858
20859
20860
20861
20862
20863
20864
20865
20866
20867
20868
20869
20870
20871
20872
20873
20874
20875
20876
20877
20878
20879
20880
20881
20882
20883
20884
20885
20886
20887
20888
20889
20890
20891
20892
20893
20894
20895
20896
20897
20898
20899
20900
20901
20902
20903
20904
20905
20906
20907
20908
20909
20910
20911
20912
20913
20914
20915
20916
20917
20918
20919
20920
20921
20922
20923
20924
20925
20926
20927
20928
20929
20930
20931
20932
20933
20934
20935
20936
20937
20938
20939
20940
20941
20942
20943
20944
20945
20946
20947
20948
20949
20950
20951
20952
20953
20954
20955
20956
20957
20958
20959
20960
20961
20962
20963
20964
20965
20966
20967
20968
20969
20970
20971
20972
20973
20974
20975
20976
20977
20978
20979
20980
20981
20982
20983
20984
20985
20986
20987
20988
20989
20990
20991
20992
20993
20994
20995
20996
20997
20998
20999
21000
21001
21002
21003
21004
21005
21006
21007
21008
21009
21010
21011
21012
21013
21014
21015
21016
21017
21018
21019
21020
21021
21022
21023
21024
21025
21026
21027
21028
21029
21030
21031
21032
21033
21034
21035
21036
21037
21038
21039
21040
21041
21042
21043
21044
21045
21046
21047
21048
21049
21050
21051
21052
21053
21054
21055
21056
21057
21058
21059
21060
21061
21062
21063
21064
21065
21066
21067
21068
21069
21070
21071
21072
21073
21074
21075
21076
21077
21078
21079
21080
21081
21082
21083
21084
21085
21086
21087
21088
21089
21090
21091
21092
21093
21094
21095
21096
21097
21098
21099
21100
21101
21102
21103
21104
21105
21106
21107
21108
21109
21110
21111
21112
21113
21114
21115
21116
21117
21118
21119
21120
21121
21122
21123
21124
21125
21126
21127
21128
21129
21130
21131
21132
21133
21134
21135
21136
21137
21138
21139
21140
21141
21142
21143
21144
21145
21146
21147
21148
21149
21150
21151
21152
21153
21154
21155
21156
21157
21158
21159
21160
21161
21162
21163
21164
21165
21166
21167
21168
21169
21170
21171
21172
21173
21174
21175
21176
21177
21178
21179
21180
21181
21182
21183
21184
21185
21186
21187
21188
21189
21190
21191
21192
21193
21194
21195
21196
21197
21198
21199
21200
21201
21202
21203
21204
21205
21206
21207
21208
21209
21210
21211
21212
21213
21214
21215
21216
21217
21218
21219
21220
21221
21222
21223
21224
21225
21226
21227
21228
21229
21230
21231
21232
21233
21234
21235
21236
21237
21238
21239
21240
21241
21242
21243
21244
21245
21246
21247
21248
21249
21250
21251
21252
21253
21254
21255
21256
21257
21258
21259
21260
21261
21262
21263
21264
21265
21266
21267
21268
21269
21270
21271
21272
21273
21274
21275
21276
21277
21278
21279
21280
21281
21282
21283
21284
21285
21286
21287
21288
21289
21290
21291
21292
21293
21294
21295
21296
21297
21298
21299
21300
21301
21302
21303
21304
21305
21306
21307
21308
21309
21310
21311
21312
21313
21314
21315
21316
21317
21318
21319
21320
21321
21322
21323
21324
21325
21326
21327
21328
21329
21330
21331
21332
21333
21334
21335
21336
21337
21338
21339
21340
21341
21342
21343
21344
21345
21346
21347
21348
21349
21350
21351
21352
21353
21354
21355
21356
21357
21358
21359
21360
21361
21362
21363
21364
21365
21366
21367
21368
21369
21370
21371
21372
21373
21374
21375
21376
21377
21378
21379
21380
21381
21382
21383
21384
21385
21386
21387
21388
21389
21390
21391
21392
21393
21394
21395
21396
21397
21398
21399
21400
21401
21402
21403
21404
21405
21406
21407
21408
21409
21410
21411
21412
21413
21414
21415
21416
21417
21418
21419
21420
21421
21422
21423
21424
21425
21426
21427
21428
21429
21430
21431
21432
21433
21434
21435
21436
21437
21438
21439
21440
21441
21442
21443
21444
21445
21446
21447
21448
21449
21450
21451
21452
21453
21454
21455
21456
21457
21458
21459
21460
21461
21462
21463
21464
21465
21466
21467
21468
21469
21470
21471
21472
21473
21474
21475
21476
21477
21478
21479
21480
21481
21482
21483
21484
21485
21486
21487
21488
21489
21490
21491
21492
21493
21494
21495
21496
21497
21498
21499
21500
21501
21502
21503
21504
21505
21506
21507
21508
21509
21510
21511
21512
21513
21514
21515
21516
21517
21518
21519
21520
21521
21522
21523
21524
21525
21526
21527
21528
21529
21530
21531
21532
21533
21534
21535
21536
21537
21538
21539
21540
21541
21542
21543
21544
21545
21546
21547
21548
21549
21550
21551
21552
21553
21554
21555
21556
21557
21558
21559
21560
21561
21562
21563
21564
21565
21566
21567
21568
21569
21570
21571
21572
21573
21574
21575
21576
21577
21578
21579
21580
21581
21582
21583
21584
21585
21586
21587
21588
21589
21590
21591
21592
21593
21594
21595
21596
21597
21598
21599
21600
21601
21602
21603
21604
21605
21606
21607
21608
21609
21610
21611
21612
21613
21614
21615
21616
21617
21618
21619
21620
21621
21622
21623
21624
21625
21626
21627
21628
21629
21630
21631
21632
21633
21634
21635
21636
21637
21638
21639
21640
21641
21642
21643
21644
21645
21646
21647
21648
21649
21650
21651
21652
21653
21654
21655
21656
21657
21658
21659
21660
21661
21662
21663
21664
21665
21666
21667
21668
21669
21670
21671
21672
21673
21674
21675
21676
21677
21678
21679
21680
21681
21682
21683
21684
21685
21686
21687
21688
21689
21690
21691
21692
21693
21694
21695
21696
21697
21698
21699
21700
21701
21702
21703
21704
21705
21706
21707
21708
21709
21710
21711
21712
21713
21714
21715
21716
21717
21718
21719
21720
21721
21722
21723
21724
21725
21726
21727
21728
21729
21730
21731
21732
21733
21734
21735
21736
21737
21738
21739
21740
21741
21742
21743
21744
21745
21746
21747
21748
21749
21750
21751
21752
21753
21754
21755
21756
21757
21758
21759
21760
21761
21762
21763
21764
21765
21766
21767
21768
21769
21770
21771
21772
21773
21774
21775
21776
21777
21778
21779
21780
21781
21782
21783
21784
21785
21786
21787
21788
21789
21790
21791
21792
21793
21794
21795
21796
21797
21798
21799
21800
21801
21802
21803
21804
21805
21806
21807
21808
21809
21810
21811
21812
21813
21814
21815
21816
21817
21818
21819
21820
21821
21822
21823
21824
21825
21826
21827
21828
21829
21830
21831
21832
21833
21834
21835
21836
21837
21838
21839
21840
21841
21842
21843
21844
21845
21846
21847
21848
21849
21850
21851
21852
21853
21854
21855
21856
21857
21858
21859
21860
21861
21862
21863
21864
21865
21866
21867
21868
21869
21870
21871
21872
21873
21874
21875
21876
21877
21878
21879
21880
21881
21882
21883
21884
21885
21886
21887
21888
21889
21890
21891
21892
21893
21894
21895
21896
21897
21898
21899
21900
21901
21902
21903
21904
21905
21906
21907
21908
21909
21910
21911
21912
21913
21914
21915
21916
21917
21918
21919
21920
21921
21922
21923
21924
21925
21926
21927
21928
21929
21930
21931
21932
21933
21934
21935
21936
21937
21938
21939
21940
21941
21942
21943
21944
21945
21946
21947
21948
21949
21950
21951
21952
21953
21954
21955
21956
21957
21958
21959
21960
21961
21962
21963
21964
21965
21966
21967
21968
21969
21970
21971
21972
21973
21974
21975
21976
21977
21978
21979
21980
21981
21982
21983
21984
21985
21986
21987
21988
21989
21990
21991
21992
21993
21994
21995
21996
21997
21998
21999
22000
22001
22002
22003
22004
22005
22006
22007
22008
22009
22010
22011
22012
22013
22014
22015
22016
22017
22018
22019
22020
22021
22022
22023
22024
22025
22026
22027
22028
22029
22030
22031
22032
22033
22034
22035
22036
22037
22038
22039
22040
22041
22042
22043
22044
22045
22046
22047
22048
22049
22050
22051
22052
22053
22054
22055
22056
22057
22058
22059
22060
22061
22062
22063
22064
22065
22066
22067
22068
22069
22070
22071
22072
22073
22074
22075
22076
22077
22078
22079
22080
22081
22082
22083
22084
22085
22086
22087
22088
22089
22090
22091
22092
22093
22094
22095
22096
22097
22098
22099
22100
22101
22102
22103
22104
22105
22106
22107
22108
22109
22110
22111
22112
22113
22114
22115
22116
22117
22118
22119
22120
22121
22122
22123
22124
22125
22126
22127
22128
22129
22130
22131
22132
22133
22134
22135
22136
22137
22138
22139
22140
22141
22142
22143
22144
22145
22146
22147
22148
22149
22150
22151
22152
22153
22154
22155
22156
22157
22158
22159
22160
22161
22162
22163
22164
22165
22166
22167
22168
22169
22170
22171
22172
22173
22174
22175
22176
22177
22178
22179
22180
22181
22182
22183
22184
22185
22186
22187
22188
22189
22190
22191
22192
22193
22194
22195
22196
22197
22198
22199
22200
22201
22202
22203
22204
22205
22206
22207
22208
22209
22210
22211
22212
22213
22214
22215
22216
22217
22218
22219
22220
22221
22222
22223
22224
22225
22226
22227
22228
22229
22230
22231
22232
22233
22234
22235
22236
22237
22238
22239
22240
22241
22242
22243
22244
22245
22246
22247
22248
22249
22250
22251
22252
22253
22254
22255
22256
22257
22258
22259
22260
22261
22262
22263
22264
22265
22266
22267
22268
22269
22270
22271
22272
22273
22274
22275
22276
22277
22278
22279
22280
22281
22282
22283
22284
22285
22286
22287
22288
22289
22290
22291
22292
22293
22294
22295
22296
22297
22298
22299
22300
22301
22302
22303
22304
22305
22306
22307
22308
22309
22310
22311
22312
22313
22314
22315
22316
22317
22318
22319
22320
22321
22322
22323
22324
22325
22326
22327
22328
22329
22330
22331
22332
22333
22334
22335
22336
22337
22338
22339
22340
22341
22342
22343
22344
22345
22346
22347
22348
22349
22350
22351
22352
22353
22354
22355
22356
22357
22358
22359
22360
22361
22362
22363
22364
22365
22366
22367
22368
22369
22370
22371
22372
22373
22374
22375
22376
22377
22378
22379
22380
22381
22382
22383
22384
22385
22386
22387
22388
22389
22390
22391
22392
22393
22394
22395
22396
22397
22398
22399
22400
22401
22402
22403
22404
22405
22406
22407
22408
22409
22410
22411
22412
22413
22414
22415
22416
22417
22418
22419
22420
22421
22422
22423
22424
22425
22426
22427
22428
22429
22430
22431
22432
22433
22434
22435
22436
22437
22438
22439
22440
22441
22442
22443
22444
22445
22446
22447
22448
22449
22450
22451
22452
22453
22454
22455
22456
22457
22458
22459
22460
22461
22462
22463
22464
22465
22466
22467
22468
22469
22470
22471
22472
22473
22474
22475
22476
22477
22478
22479
22480
22481
22482
22483
22484
22485
22486
22487
22488
22489
22490
22491
22492
22493
22494
22495
22496
22497
22498
22499
22500
22501
22502
22503
22504
22505
22506
22507
22508
22509
22510
22511
22512
22513
22514
22515
22516
22517
22518
22519
22520
22521
22522
22523
22524
22525
22526
22527
22528
22529
22530
22531
22532
22533
22534
22535
22536
22537
22538
22539
22540
22541
22542
22543
22544
22545
22546
22547
22548
22549
22550
22551
22552
22553
22554
22555
22556
22557
22558
22559
22560
22561
22562
22563
22564
22565
22566
22567
22568
22569
22570
22571
22572
22573
22574
22575
22576
22577
22578
22579
22580
22581
22582
22583
22584
22585
22586
22587
22588
22589
22590
22591
22592
22593
22594
22595
22596
22597
22598
22599
22600
22601
22602
22603
22604
22605
22606
22607
22608
22609
22610
22611
22612
22613
22614
22615
22616
22617
22618
22619
22620
22621
22622
22623
22624
22625
22626
22627
22628
22629
22630
22631
22632
22633
22634
22635
22636
22637
22638
22639
22640
22641
22642
22643
22644
22645
22646
22647
22648
22649
22650
22651
22652
22653
22654
22655
22656
22657
22658
22659
22660
22661
22662
22663
22664
22665
22666
22667
22668
22669
22670
22671
22672
22673
22674
22675
22676
22677
22678
22679
22680
22681
22682
22683
22684
22685
22686
22687
22688
22689
22690
22691
22692
22693
22694
22695
22696
22697
22698
22699
22700
22701
22702
22703
22704
22705
22706
22707
22708
22709
22710
22711
22712
22713
22714
22715
22716
22717
22718
22719
22720
22721
22722
22723
22724
22725
22726
22727
22728
22729
22730
22731
22732
22733
22734
22735
22736
22737
22738
22739
22740
22741
22742
22743
22744
22745
22746
22747
22748
22749
22750
22751
22752
22753
22754
22755
22756
22757
22758
22759
22760
22761
22762
22763
22764
22765
22766
22767
22768
22769
22770
22771
22772
22773
22774
22775
22776
22777
22778
22779
22780
22781
22782
22783
22784
22785
22786
22787
22788
22789
22790
22791
22792
22793
22794
22795
22796
22797
22798
22799
22800
22801
22802
22803
22804
22805
22806
22807
22808
22809
22810
22811
22812
22813
22814
22815
22816
22817
22818
22819
22820
22821
22822
22823
22824
22825
22826
22827
22828
22829
22830
22831
22832
22833
22834
22835
22836
22837
22838
22839
22840
22841
22842
22843
22844
22845
22846
22847
22848
22849
22850
22851
22852
22853
22854
22855
22856
22857
22858
22859
22860
22861
22862
22863
22864
22865
22866
22867
22868
22869
22870
22871
22872
22873
22874
22875
22876
22877
22878
22879
22880
22881
22882
22883
22884
22885
22886
22887
22888
22889
22890
22891
22892
22893
22894
22895
22896
22897
22898
22899
22900
22901
22902
22903
22904
22905
22906
22907
22908
22909
22910
22911
22912
22913
22914
22915
22916
22917
22918
22919
22920
22921
22922
22923
22924
22925
22926
22927
22928
22929
22930
22931
22932
22933
22934
22935
22936
22937
22938
22939
22940
22941
22942
22943
22944
22945
22946
22947
22948
22949
22950
22951
22952
22953
22954
22955
22956
22957
22958
22959
22960
22961
22962
22963
22964
22965
22966
22967
22968
22969
22970
22971
22972
22973
22974
22975
22976
22977
22978
22979
22980
22981
22982
22983
22984
22985
22986
22987
22988
22989
22990
22991
22992
22993
22994
22995
22996
22997
22998
22999
23000
23001
23002
23003
23004
23005
23006
23007
23008
23009
23010
23011
23012
23013
23014
23015
23016
23017
23018
23019
23020
23021
23022
23023
23024
23025
23026
23027
23028
23029
23030
23031
23032
23033
23034
23035
23036
23037
23038
23039
23040
23041
23042
23043
23044
23045
23046
23047
23048
23049
23050
23051
23052
23053
23054
23055
23056
23057
23058
23059
23060
23061
23062
23063
23064
23065
23066
23067
23068
23069
23070
23071
23072
23073
23074
23075
23076
23077
23078
23079
23080
23081
23082
23083
23084
23085
23086
23087
23088
23089
23090
23091
23092
23093
23094
23095
23096
23097
23098
23099
23100
23101
23102
23103
23104
23105
23106
23107
23108
23109
23110
23111
23112
23113
23114
23115
23116
23117
23118
23119
23120
23121
23122
23123
23124
23125
23126
23127
23128
23129
23130
23131
23132
23133
23134
23135
23136
23137
23138
23139
23140
23141
23142
23143
23144
23145
23146
23147
23148
23149
23150
23151
23152
23153
23154
23155
23156
23157
23158
23159
23160
23161
23162
23163
23164
23165
23166
23167
23168
23169
23170
23171
23172
23173
23174
23175
23176
23177
23178
23179
23180
23181
23182
23183
23184
23185
23186
23187
23188
23189
23190
23191
23192
23193
23194
23195
23196
23197
23198
23199
23200
23201
23202
23203
23204
23205
23206
23207
23208
23209
23210
23211
23212
23213
23214
23215
23216
23217
23218
23219
23220
23221
23222
23223
23224
23225
23226
23227
23228
23229
23230
23231
23232
23233
23234
23235
23236
23237
23238
23239
23240
23241
23242
23243
23244
23245
23246
23247
23248
23249
23250
23251
23252
23253
23254
23255
23256
23257
23258
23259
23260
23261
23262
23263
23264
23265
23266
23267
23268
23269
23270
23271
23272
23273
23274
23275
23276
23277
23278
23279
23280
23281
23282
23283
23284
23285
23286
23287
23288
23289
23290
23291
23292
23293
23294
23295
23296
23297
23298
23299
23300
23301
23302
23303
23304
23305
23306
23307
23308
23309
23310
23311
23312
23313
23314
23315
23316
23317
23318
23319
23320
23321
23322
23323
23324
23325
23326
23327
23328
23329
23330
23331
23332
23333
23334
23335
23336
23337
23338
23339
23340
23341
23342
23343
23344
23345
23346
23347
23348
23349
23350
23351
23352
23353
23354
23355
23356
23357
23358
23359
23360
23361
23362
23363
23364
23365
23366
23367
23368
23369
23370
23371
23372
23373
23374
23375
23376
23377
23378
23379
23380
23381
23382
23383
23384
23385
23386
23387
23388
23389
23390
23391
23392
23393
23394
23395
23396
23397
23398
23399
23400
23401
23402
23403
23404
23405
23406
23407
23408
23409
23410
23411
23412
23413
23414
23415
23416
23417
23418
23419
23420
23421
23422
23423
23424
23425
23426
23427
23428
23429
23430
23431
23432
23433
23434
23435
23436
23437
23438
23439
23440
23441
23442
23443
23444
23445
23446
23447
23448
23449
23450
23451
23452
23453
23454
23455
23456
23457
23458
23459
23460
23461
23462
23463
23464
23465
23466
23467
23468
23469
23470
23471
23472
23473
23474
23475
23476
23477
23478
23479
23480
23481
23482
23483
23484
23485
23486
23487
23488
23489
23490
23491
23492
23493
23494
23495
23496
23497
23498
23499
23500
23501
23502
23503
23504
23505
23506
23507
23508
23509
23510
23511
23512
23513
23514
23515
23516
23517
23518
23519
23520
23521
23522
23523
23524
23525
23526
23527
23528
23529
23530
23531
23532
23533
23534
23535
23536
23537
23538
23539
23540
23541
23542
23543
23544
23545
23546
23547
23548
23549
23550
23551
23552
23553
23554
23555
23556
23557
23558
23559
23560
23561
23562
23563
23564
23565
23566
23567
23568
23569
23570
23571
23572
23573
23574
23575
23576
23577
23578
23579
23580
23581
23582
23583
23584
23585
23586
23587
23588
23589
23590
23591
23592
23593
23594
23595
23596
23597
23598
23599
23600
23601
23602
23603
23604
23605
23606
23607
23608
23609
23610
23611
23612
23613
23614
23615
23616
23617
23618
23619
23620
23621
23622
23623
23624
23625
23626
23627
23628
23629
23630
23631
23632
23633
23634
23635
23636
23637
23638
23639
23640
23641
23642
23643
23644
23645
23646
23647
23648
23649
23650
23651
23652
23653
23654
23655
23656
23657
23658
23659
23660
23661
23662
23663
23664
23665
23666
23667
23668
23669
23670
23671
23672
23673
23674
23675
23676
23677
23678
23679
23680
23681
23682
23683
23684
23685
23686
23687
23688
23689
23690
23691
23692
23693
23694
23695
23696
23697
23698
23699
23700
23701
23702
23703
23704
23705
23706
23707
23708
23709
23710
23711
23712
23713
23714
23715
23716
23717
23718
23719
23720
23721
23722
23723
23724
23725
23726
23727
23728
23729
23730
23731
23732
23733
23734
23735
23736
23737
23738
23739
23740
23741
23742
23743
23744
23745
23746
23747
23748
23749
23750
23751
23752
23753
23754
23755
23756
23757
23758
23759
23760
23761
23762
23763
23764
23765
23766
23767
23768
23769
23770
23771
23772
23773
23774
23775
23776
23777
23778
23779
23780
23781
23782
23783
23784
23785
23786
23787
23788
23789
23790
23791
23792
23793
23794
23795
23796
23797
23798
23799
23800
23801
23802
23803
23804
23805
23806
23807
23808
23809
23810
23811
23812
23813
23814
23815
23816
23817
23818
23819
23820
23821
23822
23823
23824
23825
23826
23827
23828
23829
23830
23831
23832
23833
23834
23835
23836
23837
23838
23839
23840
23841
23842
23843
23844
23845
23846
23847
23848
23849
23850
23851
23852
23853
23854
23855
23856
23857
23858
23859
23860
23861
23862
23863
23864
23865
23866
23867
23868
23869
23870
23871
23872
23873
23874
23875
23876
23877
23878
23879
23880
23881
23882
23883
23884
23885
23886
23887
23888
23889
23890
23891
23892
23893
23894
23895
23896
23897
23898
23899
23900
23901
23902
23903
23904
23905
23906
23907
23908
23909
23910
23911
23912
23913
23914
23915
23916
23917
23918
23919
23920
23921
23922
23923
23924
23925
23926
23927
23928
23929
23930
23931
23932
23933
23934
23935
23936
23937
23938
23939
23940
23941
23942
23943
23944
23945
23946
23947
23948
23949
23950
23951
23952
23953
23954
23955
23956
23957
23958
23959
23960
23961
23962
23963
23964
23965
23966
23967
23968
23969
23970
23971
23972
23973
23974
23975
23976
23977
23978
23979
23980
23981
23982
23983
23984
23985
23986
23987
23988
23989
23990
23991
23992
23993
23994
23995
23996
23997
23998
23999
24000
24001
24002
24003
24004
24005
24006
24007
24008
24009
24010
24011
24012
24013
24014
24015
24016
24017
24018
24019
24020
24021
24022
24023
24024
24025
24026
24027
24028
24029
24030
24031
24032
24033
24034
24035
24036
24037
24038
24039
24040
24041
24042
24043
24044
24045
24046
24047
24048
24049
24050
24051
24052
24053
24054
24055
24056
24057
24058
24059
24060
24061
24062
24063
24064
24065
24066
24067
24068
24069
24070
24071
24072
24073
24074
24075
24076
24077
24078
24079
24080
24081
24082
24083
24084
24085
24086
24087
24088
24089
24090
24091
24092
24093
24094
24095
24096
24097
24098
24099
24100
24101
24102
24103
24104
24105
24106
24107
24108
24109
24110
24111
24112
24113
24114
24115
24116
24117
24118
24119
24120
24121
24122
24123
24124
24125
24126
24127
24128
24129
24130
24131
24132
24133
24134
24135
24136
24137
24138
24139
24140
24141
24142
24143
24144
24145
24146
24147
24148
24149
24150
24151
24152
24153
24154
24155
24156
24157
24158
24159
24160
24161
24162
24163
24164
24165
24166
24167
24168
24169
24170
24171
24172
24173
24174
24175
24176
24177
24178
24179
24180
24181
24182
24183
24184
24185
24186
24187
24188
24189
24190
24191
24192
24193
24194
24195
24196
24197
24198
24199
24200
24201
24202
24203
24204
24205
24206
24207
24208
24209
24210
24211
24212
24213
24214
24215
24216
24217
24218
24219
24220
24221
24222
24223
24224
24225
24226
24227
24228
24229
24230
24231
24232
24233
24234
24235
24236
24237
24238
24239
24240
24241
24242
24243
24244
24245
24246
24247
24248
24249
24250
24251
24252
24253
24254
24255
24256
24257
24258
24259
24260
24261
24262
24263
24264
24265
24266
24267
24268
24269
24270
24271
24272
24273
24274
24275
24276
24277
24278
24279
24280
24281
24282
24283
24284
24285
24286
24287
24288
24289
24290
24291
24292
24293
24294
24295
24296
24297
24298
24299
24300
24301
24302
24303
24304
24305
24306
24307
24308
24309
24310
24311
24312
24313
24314
24315
24316
24317
24318
24319
24320
24321
24322
24323
24324
24325
24326
24327
24328
24329
24330
24331
24332
24333
24334
24335
24336
24337
24338
24339
24340
24341
24342
24343
24344
24345
24346
24347
24348
24349
24350
24351
24352
24353
24354
24355
24356
24357
24358
24359
24360
24361
24362
24363
24364
24365
24366
24367
24368
24369
24370
24371
24372
24373
24374
24375
24376
24377
24378
24379
24380
24381
24382
24383
24384
24385
24386
24387
24388
24389
24390
24391
24392
24393
24394
24395
24396
24397
24398
24399
24400
24401
24402
24403
24404
24405
24406
24407
24408
24409
24410
24411
24412
24413
24414
24415
24416
24417
24418
24419
24420
24421
24422
24423
24424
24425
24426
24427
24428
24429
24430
24431
24432
24433
24434
24435
24436
24437
24438
24439
24440
24441
24442
24443
24444
24445
24446
24447
24448
24449
24450
24451
24452
24453
24454
24455
24456
24457
24458
24459
24460
24461
24462
24463
24464
24465
24466
24467
24468
24469
24470
24471
24472
24473
24474
24475
24476
24477
24478
24479
24480
24481
24482
24483
24484
24485
24486
24487
24488
24489
24490
24491
24492
24493
24494
24495
24496
24497
24498
24499
24500
24501
24502
24503
24504
24505
24506
24507
24508
24509
24510
24511
24512
24513
24514
24515
24516
24517
24518
24519
24520
24521
24522
24523
24524
24525
24526
24527
24528
24529
24530
24531
24532
24533
24534
24535
24536
24537
24538
24539
24540
24541
24542
24543
24544
24545
24546
24547
24548
24549
24550
24551
24552
24553
24554
24555
24556
24557
24558
24559
24560
24561
24562
24563
24564
24565
24566
24567
24568
24569
24570
24571
24572
24573
24574
24575
24576
24577
24578
24579
24580
24581
24582
24583
24584
24585
24586
24587
24588
24589
24590
24591
24592
24593
24594
24595
24596
24597
24598
24599
24600
24601
24602
24603
24604
24605
24606
24607
24608
24609
24610
24611
24612
24613
24614
24615
24616
24617
24618
24619
24620
24621
24622
24623
24624
24625
24626
24627
24628
24629
24630
24631
24632
24633
24634
24635
24636
24637
24638
24639
24640
24641
24642
24643
24644
24645
24646
24647
24648
24649
24650
24651
24652
24653
24654
24655
24656
24657
24658
24659
24660
24661
24662
24663
24664
24665
24666
24667
24668
24669
24670
24671
24672
24673
24674
24675
24676
24677
24678
24679
24680
24681
24682
24683
24684
24685
24686
24687
24688
24689
24690
24691
24692
24693
24694
24695
24696
24697
24698
24699
24700
24701
24702
24703
24704
24705
24706
24707
24708
24709
24710
24711
24712
24713
24714
24715
24716
24717
24718
24719
24720
24721
24722
24723
24724
24725
24726
24727
24728
24729
24730
24731
24732
24733
24734
24735
24736
24737
24738
24739
24740
24741
24742
24743
24744
24745
24746
24747
24748
24749
24750
24751
24752
24753
24754
24755
24756
24757
24758
24759
24760
24761
24762
24763
24764
24765
24766
24767
24768
24769
24770
24771
24772
24773
24774
24775
24776
24777
24778
24779
24780
24781
24782
24783
24784
24785
24786
24787
24788
24789
24790
24791
24792
24793
24794
24795
24796
24797
24798
24799
24800
24801
24802
24803
24804
24805
24806
24807
24808
24809
24810
24811
24812
24813
24814
24815
24816
24817
24818
24819
24820
24821
24822
24823
24824
24825
24826
24827
24828
24829
24830
24831
24832
24833
24834
24835
24836
24837
24838
24839
24840
24841
24842
24843
24844
24845
24846
24847
24848
24849
24850
24851
24852
24853
24854
24855
24856
24857
24858
24859
24860
24861
24862
24863
24864
24865
24866
24867
24868
24869
24870
24871
24872
24873
24874
24875
24876
24877
24878
24879
24880
24881
24882
24883
24884
24885
24886
24887
24888
24889
24890
24891
24892
24893
24894
24895
24896
24897
24898
24899
24900
24901
24902
24903
24904
24905
24906
24907
24908
24909
24910
24911
24912
24913
24914
24915
24916
24917
24918
24919
24920
24921
24922
24923
24924
24925
24926
24927
24928
24929
24930
24931
24932
24933
24934
24935
24936
24937
24938
24939
24940
24941
24942
24943
24944
24945
24946
24947
24948
24949
24950
24951
24952
24953
24954
24955
24956
24957
24958
24959
24960
24961
24962
24963
24964
24965
24966
24967
24968
24969
24970
24971
24972
24973
24974
24975
24976
24977
24978
24979
24980
24981
24982
24983
24984
24985
24986
24987
24988
24989
24990
24991
24992
24993
24994
24995
24996
24997
24998
24999
25000
25001
25002
25003
25004
25005
25006
25007
25008
25009
25010
25011
25012
25013
25014
25015
25016
25017
25018
25019
25020
25021
25022
25023
25024
25025
25026
25027
25028
25029
25030
25031
25032
25033
25034
25035
25036
25037
25038
25039
25040
25041
25042
25043
25044
25045
25046
25047
25048
25049
25050
25051
25052
25053
25054
25055
25056
25057
25058
25059
25060
25061
25062
25063
25064
25065
25066
25067
25068
25069
25070
25071
25072
25073
25074
25075
25076
25077
25078
25079
25080
25081
25082
25083
25084
25085
25086
25087
25088
25089
25090
25091
25092
25093
25094
25095
25096
25097
25098
25099
25100
25101
25102
25103
25104
25105
25106
25107
25108
25109
25110
25111
25112
25113
25114
25115
25116
25117
25118
25119
25120
25121
25122
25123
25124
25125
25126
25127
25128
25129
25130
25131
25132
25133
25134
25135
25136
25137
25138
25139
25140
25141
25142
25143
25144
25145
25146
25147
25148
25149
25150
25151
25152
25153
25154
25155
25156
25157
25158
25159
25160
25161
25162
25163
25164
25165
25166
25167
25168
25169
25170
25171
25172
25173
25174
25175
25176
25177
25178
25179
25180
25181
25182
25183
25184
25185
25186
25187
25188
25189
25190
25191
25192
25193
25194
25195
25196
25197
25198
25199
25200
25201
25202
25203
25204
25205
25206
25207
25208
25209
25210
25211
25212
25213
25214
25215
25216
25217
25218
25219
25220
25221
25222
25223
25224
25225
25226
25227
25228
25229
25230
25231
25232
25233
25234
25235
25236
25237
25238
25239
25240
25241
25242
25243
25244
25245
25246
25247
25248
25249
25250
25251
25252
25253
25254
25255
25256
25257
25258
25259
25260
25261
25262
25263
25264
25265
25266
25267
25268
25269
25270
25271
25272
25273
25274
25275
25276
25277
25278
25279
25280
25281
25282
25283
25284
25285
25286
25287
25288
25289
25290
25291
25292
25293
25294
25295
25296
25297
25298
25299
25300
25301
25302
25303
25304
25305
25306
25307
25308
25309
25310
25311
25312
25313
25314
25315
25316
25317
25318
25319
25320
25321
25322
25323
25324
25325
25326
25327
25328
25329
25330
25331
25332
25333
25334
25335
25336
25337
25338
25339
25340
25341
25342
25343
25344
25345
25346
25347
25348
25349
25350
25351
25352
25353
25354
25355
25356
25357
25358
25359
25360
25361
25362
25363
25364
25365
25366
25367
25368
25369
25370
25371
25372
25373
25374
25375
25376
25377
25378
25379
25380
25381
25382
25383
25384
25385
25386
25387
25388
25389
25390
25391
25392
25393
25394
25395
25396
25397
25398
25399
25400
25401
25402
25403
25404
25405
25406
25407
25408
25409
25410
25411
25412
25413
25414
25415
25416
25417
25418
25419
25420
25421
25422
25423
25424
25425
25426
25427
25428
25429
25430
25431
25432
25433
25434
25435
25436
25437
25438
25439
25440
25441
25442
25443
25444
25445
25446
25447
25448
25449
25450
25451
25452
25453
25454
25455
25456
25457
25458
25459
25460
25461
25462
25463
25464
25465
25466
25467
25468
25469
25470
25471
25472
25473
25474
25475
25476
25477
25478
25479
25480
25481
25482
25483
25484
25485
25486
25487
25488
25489
25490
25491
25492
25493
25494
25495
25496
25497
25498
25499
25500
25501
25502
25503
25504
25505
25506
25507
25508
25509
25510
25511
25512
25513
25514
25515
25516
25517
25518
25519
25520
25521
25522
25523
25524
25525
25526
25527
25528
25529
25530
25531
25532
25533
25534
25535
25536
25537
25538
25539
25540
25541
25542
25543
25544
25545
25546
25547
25548
25549
25550
25551
25552
25553
25554
25555
25556
25557
25558
25559
25560
25561
25562
25563
25564
25565
25566
25567
25568
25569
25570
25571
25572
25573
25574
25575
25576
25577
25578
25579
25580
25581
25582
25583
25584
25585
25586
25587
25588
25589
25590
25591
25592
25593
25594
25595
25596
25597
25598
25599
25600
25601
25602
25603
25604
25605
25606
25607
25608
25609
25610
25611
25612
25613
25614
25615
25616
25617
25618
25619
25620
25621
25622
25623
25624
25625
25626
25627
25628
25629
25630
25631
25632
25633
25634
25635
25636
25637
25638
25639
25640
25641
25642
25643
25644
25645
25646
25647
25648
25649
25650
25651
25652
25653
25654
25655
25656
25657
25658
25659
25660
25661
25662
25663
25664
25665
25666
25667
25668
25669
25670
25671
25672
25673
25674
25675
25676
25677
25678
25679
25680
25681
25682
25683
25684
25685
25686
25687
25688
25689
25690
25691
25692
25693
25694
25695
25696
25697
25698
25699
25700
25701
25702
25703
25704
25705
25706
25707
25708
25709
25710
25711
25712
25713
25714
25715
25716
25717
25718
25719
25720
25721
25722
25723
25724
25725
25726
25727
25728
25729
25730
25731
25732
25733
25734
25735
25736
25737
25738
25739
25740
25741
25742
25743
25744
25745
25746
25747
25748
25749
25750
25751
25752
25753
25754
25755
25756
25757
25758
25759
25760
25761
25762
25763
25764
25765
25766
25767
25768
25769
25770
25771
25772
25773
25774
25775
25776
25777
25778
25779
25780
25781
25782
25783
25784
25785
25786
25787
25788
25789
25790
25791
25792
25793
25794
25795
25796
25797
25798
25799
25800
25801
25802
25803
25804
25805
25806
25807
25808
25809
25810
25811
25812
25813
25814
25815
25816
25817
25818
25819
25820
25821
25822
25823
25824
25825
25826
25827
25828
25829
25830
25831
25832
25833
25834
25835
25836
25837
25838
25839
25840
25841
25842
25843
25844
25845
25846
25847
25848
25849
25850
25851
25852
25853
25854
25855
25856
25857
25858
25859
25860
25861
25862
25863
25864
25865
25866
25867
25868
25869
25870
25871
25872
25873
25874
25875
25876
25877
25878
25879
25880
25881
25882
25883
25884
25885
25886
25887
25888
25889
25890
25891
25892
25893
25894
25895
25896
25897
25898
25899
25900
25901
25902
25903
25904
25905
25906
25907
25908
25909
25910
25911
25912
25913
25914
25915
25916
25917
25918
25919
25920
25921
25922
25923
25924
25925
25926
25927
25928
25929
25930
25931
25932
25933
25934
25935
25936
25937
25938
25939
25940
25941
25942
25943
25944
25945
25946
25947
25948
25949
25950
25951
25952
25953
25954
25955
25956
25957
25958
25959
25960
25961
25962
25963
25964
25965
25966
25967
25968
25969
25970
25971
25972
25973
25974
25975
25976
25977
25978
25979
25980
25981
25982
25983
25984
25985
25986
25987
25988
25989
25990
25991
25992
25993
25994
25995
25996
25997
25998
25999
26000
26001
26002
26003
26004
26005
26006
26007
26008
26009
26010
26011
26012
26013
26014
26015
26016
26017
26018
26019
26020
26021
26022
26023
26024
26025
26026
26027
26028
26029
26030
26031
26032
26033
26034
26035
26036
26037
26038
26039
26040
26041
26042
26043
26044
26045
26046
26047
26048
26049
26050
26051
26052
26053
26054
26055
26056
26057
26058
26059
26060
26061
26062
26063
26064
26065
26066
26067
26068
26069
26070
26071
26072
26073
26074
26075
26076
26077
26078
26079
26080
26081
26082
26083
26084
26085
26086
26087
26088
26089
26090
26091
26092
26093
26094
26095
26096
26097
26098
26099
26100
26101
26102
26103
26104
26105
26106
26107
26108
26109
26110
26111
26112
26113
26114
26115
26116
26117
26118
26119
26120
26121
26122
26123
26124
26125
26126
26127
26128
26129
26130
26131
26132
26133
26134
26135
26136
26137
26138
26139
26140
26141
26142
26143
26144
26145
26146
26147
26148
26149
26150
26151
26152
26153
26154
26155
26156
26157
26158
26159
26160
26161
26162
26163
26164
26165
26166
26167
26168
26169
26170
26171
26172
26173
26174
26175
26176
26177
26178
26179
26180
26181
26182
26183
26184
26185
26186
26187
26188
26189
26190
26191
26192
26193
26194
26195
26196
26197
26198
26199
26200
26201
26202
26203
26204
26205
26206
26207
26208
26209
26210
26211
26212
26213
26214
26215
26216
26217
26218
26219
26220
26221
26222
26223
26224
26225
26226
26227
26228
26229
26230
26231
26232
26233
26234
26235
26236
26237
26238
26239
26240
26241
26242
26243
26244
26245
26246
26247
26248
26249
26250
26251
26252
26253
26254
26255
26256
26257
26258
26259
26260
26261
26262
26263
26264
26265
26266
26267
26268
26269
26270
26271
26272
26273
26274
26275
26276
26277
26278
26279
26280
26281
26282
26283
26284
26285
26286
26287
26288
26289
26290
26291
26292
26293
26294
26295
26296
26297
26298
26299
26300
26301
26302
26303
26304
26305
26306
26307
26308
26309
26310
26311
26312
26313
26314
26315
26316
26317
26318
26319
26320
26321
26322
26323
26324
26325
26326
26327
26328
26329
26330
26331
26332
26333
26334
26335
26336
26337
26338
26339
26340
26341
26342
26343
26344
26345
26346
26347
26348
26349
26350
26351
26352
26353
26354
26355
26356
26357
26358
26359
26360
26361
26362
26363
26364
26365
26366
26367
26368
26369
26370
26371
26372
26373
26374
26375
26376
26377
26378
26379
26380
26381
26382
26383
26384
26385
26386
26387
26388
26389
26390
26391
26392
26393
26394
26395
26396
26397
26398
26399
26400
26401
26402
26403
26404
26405
26406
26407
26408
26409
26410
26411
26412
26413
26414
26415
26416
26417
26418
26419
26420
26421
26422
26423
26424
26425
26426
26427
26428
26429
26430
26431
26432
26433
26434
26435
26436
26437
26438
26439
26440
26441
26442
26443
26444
26445
26446
26447
26448
26449
26450
26451
26452
26453
26454
26455
26456
26457
26458
26459
26460
26461
26462
26463
26464
26465
26466
26467
26468
26469
26470
26471
26472
26473
26474
26475
26476
26477
26478
26479
26480
26481
26482
26483
26484
26485
26486
26487
26488
26489
26490
26491
26492
26493
26494
26495
26496
26497
26498
26499
26500
26501
26502
26503
26504
26505
26506
26507
26508
26509
26510
26511
26512
26513
26514
26515
26516
26517
26518
26519
26520
26521
26522
26523
26524
26525
26526
26527
26528
26529
26530
26531
26532
26533
26534
26535
26536
26537
26538
26539
26540
26541
26542
26543
26544
26545
26546
26547
26548
26549
26550
26551
26552
26553
26554
26555
26556
26557
26558
26559
26560
26561
26562
26563
26564
26565
26566
26567
26568
26569
26570
26571
26572
26573
26574
26575
26576
26577
26578
26579
26580
26581
26582
26583
26584
26585
26586
26587
26588
26589
26590
26591
26592
26593
26594
26595
26596
26597
26598
26599
26600
26601
26602
26603
26604
26605
26606
26607
26608
26609
26610
26611
26612
26613
26614
26615
26616
26617
26618
26619
26620
26621
26622
26623
26624
26625
26626
26627
26628
26629
26630
26631
26632
26633
26634
26635
26636
26637
26638
26639
26640
26641
26642
26643
26644
26645
26646
26647
26648
26649
26650
26651
26652
26653
26654
26655
26656
26657
26658
26659
26660
26661
26662
26663
26664
26665
26666
26667
26668
26669
26670
26671
26672
26673
26674
26675
26676
26677
26678
26679
26680
26681
26682
26683
26684
26685
26686
26687
26688
26689
26690
26691
26692
26693
26694
26695
26696
26697
26698
26699
26700
26701
26702
26703
26704
26705
26706
26707
26708
26709
26710
26711
26712
26713
26714
26715
26716
26717
26718
26719
26720
26721
26722
26723
26724
26725
26726
26727
26728
26729
26730
26731
26732
26733
26734
26735
26736
26737
26738
26739
26740
26741
26742
26743
26744
26745
26746
26747
26748
26749
26750
26751
26752
26753
26754
26755
26756
26757
26758
26759
26760
26761
26762
26763
26764
26765
26766
26767
26768
26769
26770
26771
26772
26773
26774
26775
26776
26777
26778
26779
26780
26781
26782
26783
26784
26785
26786
26787
26788
26789
26790
26791
26792
26793
26794
26795
26796
26797
26798
26799
26800
26801
26802
26803
26804
26805
26806
26807
26808
26809
26810
26811
26812
26813
26814
26815
26816
26817
26818
26819
26820
26821
26822
26823
26824
26825
26826
26827
26828
26829
26830
26831
26832
26833
26834
26835
26836
26837
26838
26839
26840
26841
26842
26843
26844
26845
26846
26847
26848
26849
26850
26851
26852
26853
26854
26855
26856
26857
26858
26859
26860
26861
26862
26863
26864
26865
26866
26867
26868
26869
26870
26871
26872
26873
26874
26875
26876
26877
26878
26879
26880
26881
26882
26883
26884
26885
26886
26887
26888
26889
26890
26891
26892
26893
26894
26895
26896
26897
26898
26899
26900
26901
26902
26903
26904
26905
26906
26907
26908
26909
26910
26911
26912
26913
26914
26915
26916
26917
26918
26919
26920
26921
26922
26923
26924
26925
26926
26927
26928
26929
26930
26931
26932
26933
26934
26935
26936
26937
26938
26939
26940
26941
26942
26943
26944
26945
26946
26947
26948
26949
26950
26951
26952
26953
26954
26955
26956
26957
26958
26959
26960
26961
26962
26963
26964
26965
26966
26967
26968
26969
26970
26971
26972
26973
26974
26975
26976
26977
26978
26979
26980
26981
26982
26983
26984
26985
26986
26987
26988
26989
26990
26991
26992
26993
26994
26995
26996
26997
26998
26999
27000
27001
27002
27003
27004
27005
27006
27007
27008
27009
27010
27011
27012
27013
27014
27015
27016
27017
27018
27019
27020
27021
27022
27023
27024
27025
27026
27027
27028
27029
27030
27031
27032
27033
27034
27035
27036
27037
27038
27039
27040
27041
27042
27043
27044
27045
27046
27047
27048
27049
27050
27051
27052
27053
27054
27055
27056
27057
27058
27059
27060
27061
27062
27063
27064
27065
27066
27067
27068
27069
27070
27071
27072
27073
27074
27075
27076
27077
27078
27079
27080
27081
27082
27083
27084
27085
27086
27087
27088
27089
27090
27091
27092
27093
27094
27095
27096
27097
27098
27099
27100
27101
27102
27103
27104
27105
27106
27107
27108
27109
27110
27111
27112
27113
27114
27115
27116
27117
27118
27119
27120
27121
27122
27123
27124
27125
27126
27127
27128
27129
27130
27131
27132
27133
27134
27135
27136
27137
27138
27139
27140
27141
27142
27143
27144
27145
27146
27147
27148
27149
27150
27151
27152
27153
27154
27155
27156
27157
27158
27159
27160
27161
27162
27163
27164
27165
27166
27167
27168
27169
27170
27171
27172
27173
27174
27175
27176
27177
27178
27179
27180
27181
27182
27183
27184
27185
27186
27187
27188
27189
27190
27191
27192
27193
27194
27195
27196
27197
27198
27199
27200
27201
27202
27203
27204
27205
27206
27207
27208
27209
27210
27211
27212
27213
27214
27215
27216
27217
27218
27219
27220
27221
27222
27223
27224
27225
27226
27227
27228
27229
27230
27231
27232
27233
27234
27235
27236
27237
27238
27239
27240
27241
27242
27243
27244
27245
27246
27247
27248
27249
27250
27251
27252
27253
27254
27255
27256
27257
27258
27259
27260
27261
27262
27263
27264
27265
27266
27267
27268
27269
27270
27271
27272
27273
27274
27275
27276
27277
27278
27279
27280
27281
27282
27283
27284
27285
27286
27287
27288
27289
27290
27291
27292
27293
27294
27295
27296
27297
27298
27299
27300
27301
27302
27303
27304
27305
27306
27307
27308
27309
27310
27311
27312
27313
27314
27315
27316
27317
27318
27319
27320
27321
27322
27323
27324
27325
27326
27327
27328
27329
27330
27331
27332
27333
27334
27335
27336
27337
27338
27339
27340
27341
27342
27343
27344
27345
27346
27347
27348
27349
27350
27351
27352
27353
27354
27355
27356
27357
27358
27359
27360
27361
27362
27363
27364
27365
27366
27367
27368
27369
27370
27371
27372
27373
27374
27375
27376
27377
27378
27379
27380
27381
27382
27383
27384
27385
27386
27387
27388
27389
27390
27391
27392
27393
27394
27395
27396
27397
27398
27399
27400
27401
27402
27403
27404
27405
27406
27407
27408
27409
27410
27411
27412
27413
27414
27415
27416
27417
27418
27419
27420
27421
27422
27423
27424
27425
27426
27427
27428
27429
27430
27431
27432
27433
27434
27435
27436
27437
27438
27439
27440
27441
27442
27443
27444
27445
27446
27447
27448
27449
27450
27451
27452
27453
27454
27455
27456
27457
27458
27459
27460
27461
27462
27463
27464
27465
27466
27467
27468
27469
27470
27471
27472
27473
27474
27475
27476
27477
27478
27479
27480
27481
27482
27483
27484
27485
27486
27487
27488
27489
27490
27491
27492
27493
27494
27495
27496
27497
27498
27499
27500
27501
27502
27503
27504
27505
27506
27507
27508
27509
27510
27511
27512
27513
27514
27515
27516
27517
27518
27519
27520
27521
27522
27523
27524
27525
27526
27527
27528
27529
27530
27531
27532
27533
27534
27535
27536
27537
27538
27539
27540
27541
27542
27543
27544
27545
27546
27547
27548
27549
27550
27551
27552
27553
27554
27555
27556
27557
27558
27559
27560
27561
27562
27563
27564
27565
27566
27567
27568
27569
27570
27571
27572
27573
27574
27575
27576
27577
27578
27579
27580
27581
27582
27583
27584
27585
27586
27587
27588
27589
27590
27591
27592
27593
27594
27595
27596
27597
27598
27599
27600
27601
27602
27603
27604
27605
27606
27607
27608
27609
27610
27611
27612
27613
27614
27615
27616
27617
27618
27619
27620
27621
27622
27623
27624
27625
27626
27627
27628
27629
27630
27631
27632
27633
27634
27635
27636
27637
27638
27639
27640
27641
27642
27643
27644
27645
27646
27647
27648
27649
27650
27651
27652
27653
27654
27655
27656
27657
27658
27659
27660
27661
27662
27663
27664
27665
27666
27667
27668
27669
27670
27671
27672
27673
27674
27675
27676
27677
27678
27679
27680
27681
27682
27683
27684
27685
27686
27687
27688
27689
27690
27691
27692
27693
27694
27695
27696
27697
27698
27699
27700
27701
27702
27703
27704
27705
27706
27707
27708
27709
27710
27711
27712
27713
27714
27715
27716
27717
27718
27719
27720
27721
27722
27723
27724
27725
27726
27727
27728
27729
27730
27731
27732
27733
27734
27735
27736
27737
27738
27739
27740
27741
27742
27743
27744
27745
27746
27747
27748
27749
27750
27751
27752
27753
27754
27755
27756
27757
27758
27759
27760
27761
27762
27763
27764
27765
27766
27767
27768
27769
27770
27771
27772
27773
27774
27775
27776
27777
27778
27779
27780
27781
27782
27783
27784
27785
27786
27787
27788
27789
27790
27791
27792
27793
27794
27795
27796
27797
27798
27799
27800
27801
27802
27803
27804
27805
27806
27807
27808
27809
27810
27811
27812
27813
27814
27815
27816
27817
27818
27819
27820
27821
27822
27823
27824
27825
27826
27827
27828
27829
27830
27831
27832
27833
27834
27835
27836
27837
27838
27839
27840
27841
27842
27843
27844
27845
27846
27847
27848
27849
27850
27851
27852
27853
27854
27855
27856
27857
27858
27859
27860
27861
27862
27863
27864
27865
27866
27867
27868
27869
27870
27871
27872
27873
27874
27875
27876
27877
27878
27879
27880
27881
27882
27883
27884
27885
27886
27887
27888
27889
27890
27891
27892
27893
27894
27895
27896
27897
27898
27899
27900
27901
27902
27903
27904
27905
27906
27907
27908
27909
27910
27911
27912
27913
27914
27915
27916
27917
27918
27919
27920
27921
27922
27923
27924
27925
27926
27927
27928
27929
27930
27931
27932
27933
27934
27935
27936
27937
27938
27939
27940
27941
27942
27943
27944
27945
27946
27947
27948
27949
27950
27951
27952
27953
27954
27955
27956
27957
27958
27959
27960
27961
27962
27963
27964
27965
27966
27967
27968
27969
27970
27971
27972
27973
27974
27975
27976
27977
27978
27979
27980
27981
27982
27983
27984
27985
27986
27987
27988
27989
27990
27991
27992
27993
27994
27995
27996
27997
27998
27999
28000
28001
28002
28003
28004
28005
28006
28007
28008
28009
28010
28011
28012
28013
28014
28015
28016
28017
28018
28019
28020
28021
28022
28023
28024
28025
28026
28027
28028
28029
28030
28031
28032
28033
28034
28035
28036
28037
28038
28039
28040
28041
28042
28043
28044
28045
28046
28047
28048
28049
28050
28051
28052
28053
28054
28055
28056
28057
28058
28059
28060
28061
28062
28063
28064
28065
28066
28067
28068
28069
28070
28071
28072
28073
28074
28075
28076
28077
28078
28079
28080
28081
28082
28083
28084
28085
28086
28087
28088
28089
28090
28091
28092
28093
28094
28095
28096
28097
28098
28099
28100
28101
28102
28103
28104
28105
28106
28107
28108
28109
28110
28111
28112
28113
28114
28115
28116
28117
28118
28119
28120
28121
28122
28123
28124
28125
28126
28127
28128
28129
28130
28131
28132
28133
28134
28135
28136
28137
28138
28139
28140
28141
28142
28143
28144
28145
28146
28147
28148
28149
28150
28151
28152
28153
28154
28155
28156
28157
28158
28159
28160
28161
28162
28163
28164
28165
28166
28167
28168
28169
28170
28171
28172
28173
28174
28175
28176
28177
28178
28179
28180
28181
28182
28183
28184
28185
28186
28187
28188
28189
28190
28191
28192
28193
28194
28195
28196
28197
28198
28199
28200
28201
28202
28203
28204
28205
28206
28207
28208
28209
28210
28211
28212
28213
28214
28215
28216
28217
28218
28219
28220
28221
28222
28223
28224
28225
28226
28227
28228
28229
28230
28231
28232
28233
28234
28235
28236
28237
28238
28239
28240
28241
28242
28243
28244
28245
28246
28247
28248
28249
28250
28251
28252
28253
28254
28255
28256
28257
28258
28259
28260
28261
28262
28263
28264
28265
28266
28267
28268
28269
28270
28271
28272
28273
28274
28275
28276
28277
28278
28279
28280
28281
28282
28283
28284
28285
28286
28287
28288
28289
28290
28291
28292
28293
28294
28295
28296
28297
28298
28299
28300
28301
28302
28303
28304
28305
28306
28307
28308
28309
28310
28311
28312
28313
28314
28315
28316
28317
28318
28319
28320
28321
28322
28323
28324
28325
28326
28327
28328
28329
28330
28331
28332
28333
28334
28335
28336
28337
28338
28339
28340
28341
28342
28343
28344
28345
28346
28347
28348
28349
28350
28351
28352
28353
28354
28355
28356
28357
28358
28359
28360
28361
28362
28363
28364
28365
28366
28367
28368
28369
28370
28371
28372
28373
28374
28375
28376
28377
28378
28379
28380
28381
28382
28383
28384
28385
28386
28387
28388
28389
28390
28391
28392
28393
28394
28395
28396
28397
28398
28399
28400
28401
28402
28403
28404
28405
28406
28407
28408
28409
28410
28411
28412
28413
28414
28415
28416
28417
28418
28419
28420
28421
28422
28423
28424
28425
28426
28427
28428
28429
28430
28431
28432
28433
28434
28435
28436
28437
28438
28439
28440
28441
28442
28443
28444
28445
28446
28447
28448
28449
28450
28451
28452
28453
28454
28455
28456
28457
28458
28459
28460
28461
28462
28463
28464
28465
28466
28467
28468
28469
28470
28471
28472
28473
28474
28475
28476
28477
28478
28479
28480
28481
28482
28483
28484
28485
28486
28487
28488
28489
28490
28491
28492
28493
28494
28495
28496
28497
28498
28499
28500
28501
28502
28503
28504
28505
28506
28507
28508
28509
28510
28511
28512
28513
28514
28515
28516
28517
28518
28519
28520
28521
28522
28523
28524
28525
28526
28527
28528
28529
28530
28531
28532
28533
28534
28535
28536
28537
28538
28539
28540
28541
28542
28543
28544
28545
28546
28547
28548
28549
28550
28551
28552
28553
28554
28555
28556
28557
28558
28559
28560
28561
28562
28563
28564
28565
28566
28567
28568
28569
28570
28571
28572
28573
28574
28575
28576
28577
28578
28579
28580
28581
28582
28583
28584
28585
28586
28587
28588
28589
28590
28591
28592
28593
28594
28595
28596
28597
28598
28599
28600
28601
28602
28603
28604
28605
28606
28607
28608
28609
28610
28611
28612
28613
28614
28615
28616
28617
28618
28619
28620
28621
28622
28623
28624
28625
28626
28627
28628
28629
28630
28631
28632
28633
28634
28635
28636
28637
28638
28639
28640
28641
28642
28643
28644
28645
28646
28647
28648
28649
28650
28651
28652
28653
28654
28655
28656
28657
28658
28659
28660
28661
28662
28663
28664
28665
28666
28667
28668
28669
28670
28671
28672
28673
28674
28675
28676
28677
28678
28679
28680
28681
28682
28683
28684
28685
28686
28687
28688
28689
28690
28691
28692
28693
28694
28695
28696
28697
28698
28699
28700
28701
28702
28703
28704
28705
28706
28707
28708
28709
28710
28711
28712
28713
28714
28715
28716
28717
28718
28719
28720
28721
28722
28723
28724
28725
28726
28727
28728
28729
28730
28731
28732
28733
28734
28735
28736
28737
28738
28739
28740
28741
28742
28743
28744
28745
28746
28747
28748
28749
28750
28751
28752
28753
28754
28755
28756
28757
28758
28759
28760
28761
28762
28763
28764
28765
28766
28767
28768
28769
28770
28771
28772
28773
28774
28775
28776
28777
28778
28779
28780
28781
28782
28783
28784
28785
28786
28787
28788
28789
28790
28791
28792
28793
28794
28795
28796
28797
28798
28799
28800
28801
28802
28803
28804
28805
28806
28807
28808
28809
28810
28811
28812
28813
28814
28815
28816
28817
28818
28819
28820
28821
28822
28823
28824
28825
28826
28827
28828
28829
28830
28831
28832
28833
28834
28835
28836
28837
28838
28839
28840
28841
28842
28843
28844
28845
28846
28847
28848
28849
28850
28851
28852
28853
28854
28855
28856
28857
28858
28859
28860
28861
28862
28863
28864
28865
28866
28867
28868
28869
28870
28871
28872
28873
28874
28875
28876
28877
28878
28879
28880
28881
28882
28883
28884
28885
28886
28887
28888
28889
28890
28891
28892
28893
28894
28895
28896
28897
28898
28899
28900
28901
28902
28903
28904
28905
28906
28907
28908
28909
28910
28911
28912
28913
28914
28915
28916
28917
28918
28919
28920
28921
28922
28923
28924
28925
28926
28927
28928
28929
28930
28931
28932
28933
28934
28935
28936
28937
28938
28939
28940
28941
28942
28943
28944
28945
28946
28947
28948
28949
28950
28951
28952
28953
28954
28955
28956
28957
28958
28959
28960
28961
28962
28963
28964
28965
28966
28967
28968
28969
28970
28971
28972
28973
28974
28975
28976
28977
28978
28979
28980
28981
28982
28983
28984
28985
28986
28987
28988
28989
28990
28991
28992
28993
28994
28995
28996
28997
28998
28999
29000
29001
29002
29003
29004
29005
29006
29007
29008
29009
29010
29011
29012
29013
29014
29015
29016
29017
29018
29019
29020
29021
29022
29023
29024
29025
29026
29027
29028
29029
29030
29031
29032
29033
29034
29035
29036
29037
29038
29039
29040
29041
29042
29043
29044
29045
29046
29047
29048
29049
29050
29051
29052
29053
29054
29055
29056
29057
29058
29059
29060
29061
29062
29063
29064
29065
29066
29067
29068
29069
29070
29071
29072
29073
29074
29075
29076
29077
29078
29079
29080
29081
29082
29083
29084
29085
29086
29087
29088
29089
29090
29091
29092
29093
29094
29095
29096
29097
29098
29099
29100
29101
29102
29103
29104
29105
29106
29107
29108
29109
29110
29111
29112
29113
29114
29115
29116
29117
29118
29119
29120
29121
29122
29123
29124
29125
29126
29127
29128
29129
29130
29131
29132
29133
29134
29135
29136
29137
29138
29139
29140
29141
29142
29143
29144
29145
29146
29147
29148
29149
29150
29151
29152
29153
29154
29155
29156
29157
29158
29159
29160
29161
29162
29163
29164
29165
29166
29167
29168
29169
29170
29171
29172
29173
29174
29175
29176
29177
29178
29179
29180
29181
29182
29183
29184
29185
29186
29187
29188
29189
29190
29191
29192
29193
29194
29195
29196
29197
29198
29199
29200
29201
29202
29203
29204
29205
29206
29207
29208
29209
29210
29211
29212
29213
29214
29215
29216
29217
29218
29219
29220
29221
29222
29223
29224
29225
29226
29227
29228
29229
29230
29231
29232
29233
29234
29235
29236
29237
29238
29239
29240
29241
29242
29243
29244
29245
29246
29247
29248
29249
29250
29251
29252
29253
29254
29255
29256
29257
29258
29259
29260
29261
29262
29263
29264
29265
29266
29267
29268
29269
29270
29271
29272
29273
29274
29275
29276
29277
29278
29279
29280
29281
29282
29283
29284
29285
29286
29287
29288
29289
29290
29291
29292
29293
29294
29295
29296
29297
29298
29299
29300
29301
29302
29303
29304
29305
29306
29307
29308
29309
29310
29311
29312
29313
29314
29315
29316
29317
29318
29319
29320
29321
29322
29323
29324
29325
29326
29327
29328
29329
29330
29331
29332
29333
29334
29335
29336
29337
29338
29339
29340
29341
29342
29343
29344
29345
29346
29347
29348
29349
29350
29351
29352
29353
29354
29355
29356
29357
29358
29359
29360
29361
29362
29363
29364
29365
29366
29367
29368
29369
29370
29371
29372
29373
29374
29375
29376
29377
29378
29379
29380
29381
29382
29383
29384
29385
29386
29387
29388
29389
29390
29391
29392
29393
29394
29395
29396
29397
29398
29399
29400
29401
29402
29403
29404
29405
29406
29407
29408
29409
29410
29411
29412
29413
29414
29415
29416
29417
29418
29419
29420
29421
29422
29423
29424
29425
29426
29427
29428
29429
29430
29431
29432
29433
29434
29435
29436
29437
29438
29439
29440
29441
29442
29443
29444
29445
29446
29447
29448
29449
29450
29451
29452
29453
29454
29455
29456
29457
29458
29459
29460
29461
29462
29463
29464
29465
29466
29467
29468
29469
29470
29471
29472
29473
29474
29475
29476
29477
29478
29479
29480
29481
29482
29483
29484
29485
29486
29487
29488
29489
29490
29491
29492
29493
29494
29495
29496
29497
29498
29499
29500
29501
29502
29503
29504
29505
29506
29507
29508
29509
29510
29511
29512
29513
29514
29515
29516
29517
29518
29519
29520
29521
29522
29523
29524
29525
29526
29527
29528
29529
29530
29531
29532
29533
29534
29535
29536
29537
29538
29539
29540
29541
29542
29543
29544
29545
29546
29547
29548
29549
29550
29551
29552
29553
29554
29555
29556
29557
29558
29559
29560
29561
29562
29563
29564
29565
29566
29567
29568
29569
29570
29571
29572
29573
29574
29575
29576
29577
29578
29579
29580
29581
29582
29583
29584
29585
29586
29587
29588
29589
29590
29591
29592
29593
29594
29595
29596
29597
29598
29599
29600
29601
29602
29603
29604
29605
29606
29607
29608
29609
29610
29611
29612
29613
29614
29615
29616
29617
29618
29619
29620
29621
29622
29623
29624
29625
29626
29627
29628
29629
29630
29631
29632
29633
29634
29635
29636
29637
29638
29639
29640
29641
29642
29643
29644
29645
29646
29647
29648
29649
29650
29651
29652
29653
29654
29655
29656
29657
29658
29659
29660
29661
29662
29663
29664
29665
29666
29667
29668
29669
29670
29671
29672
29673
29674
29675
29676
29677
29678
29679
29680
29681
29682
29683
29684
29685
29686
29687
29688
29689
29690
29691
29692
29693
29694
29695
29696
29697
29698
29699
29700
29701
29702
29703
29704
29705
29706
29707
29708
29709
29710
29711
29712
29713
29714
29715
29716
29717
29718
29719
29720
29721
29722
29723
29724
29725
29726
29727
29728
29729
29730
29731
29732
29733
29734
29735
29736
29737
29738
29739
29740
29741
29742
29743
29744
29745
29746
29747
29748
29749
29750
29751
29752
29753
29754
29755
29756
29757
29758
29759
29760
29761
29762
29763
29764
29765
29766
29767
29768
29769
29770
29771
29772
29773
29774
29775
29776
29777
29778
29779
29780
29781
29782
29783
29784
29785
29786
29787
29788
29789
29790
29791
29792
29793
29794
29795
29796
29797
29798
29799
29800
29801
29802
29803
29804
29805
29806
29807
29808
29809
29810
29811
29812
29813
29814
29815
29816
29817
29818
29819
29820
29821
29822
29823
29824
29825
29826
29827
29828
29829
29830
29831
29832
29833
29834
29835
29836
29837
29838
29839
29840
29841
29842
29843
29844
29845
29846
29847
29848
29849
29850
29851
29852
29853
29854
29855
29856
29857
29858
29859
29860
29861
29862
29863
29864
29865
29866
29867
29868
29869
29870
29871
29872
29873
29874
29875
29876
29877
29878
29879
29880
29881
29882
29883
29884
29885
29886
29887
29888
29889
29890
29891
29892
29893
29894
29895
29896
29897
29898
29899
29900
29901
29902
29903
29904
29905
29906
29907
29908
29909
29910
29911
29912
29913
29914
29915
29916
29917
29918
29919
29920
29921
29922
29923
29924
29925
29926
29927
29928
29929
29930
29931
29932
29933
29934
29935
29936
29937
29938
29939
29940
29941
29942
29943
29944
29945
29946
29947
29948
29949
29950
29951
29952
29953
29954
29955
29956
29957
29958
29959
29960
29961
29962
29963
29964
29965
29966
29967
29968
29969
29970
29971
29972
29973
29974
29975
29976
29977
29978
29979
29980
29981
29982
29983
29984
29985
29986
29987
29988
29989
29990
29991
29992
29993
29994
29995
29996
29997
29998
29999
30000
30001
30002
30003
30004
30005
30006
30007
30008
30009
30010
30011
30012
30013
30014
30015
30016
30017
30018
30019
30020
30021
30022
30023
30024
30025
30026
30027
30028
30029
30030
30031
30032
30033
30034
30035
30036
30037
30038
30039
30040
30041
30042
30043
30044
30045
30046
30047
30048
30049
30050
30051
30052
30053
30054
30055
30056
30057
30058
30059
30060
30061
30062
30063
30064
30065
30066
30067
30068
30069
30070
30071
30072
30073
30074
30075
30076
30077
30078
30079
30080
30081
30082
30083
30084
30085
30086
30087
30088
30089
30090
30091
30092
30093
30094
30095
30096
30097
30098
30099
30100
30101
30102
30103
30104
30105
30106
30107
30108
30109
30110
30111
30112
30113
30114
30115
30116
30117
30118
30119
30120
30121
30122
30123
30124
30125
30126
30127
30128
30129
30130
30131
30132
30133
30134
30135
30136
30137
30138
30139
30140
30141
30142
30143
30144
30145
30146
30147
30148
30149
30150
30151
30152
30153
30154
30155
30156
30157
30158
30159
30160
30161
30162
30163
30164
30165
30166
30167
30168
30169
30170
30171
30172
30173
30174
30175
30176
30177
30178
30179
30180
30181
30182
30183
30184
30185
30186
30187
30188
30189
30190
30191
30192
30193
30194
30195
30196
30197
30198
30199
30200
30201
30202
30203
30204
30205
30206
30207
30208
30209
30210
30211
30212
30213
30214
30215
30216
30217
30218
30219
30220
30221
30222
30223
30224
30225
30226
30227
30228
30229
30230
30231
30232
30233
30234
30235
30236
30237
30238
30239
30240
30241
30242
30243
30244
30245
30246
30247
30248
30249
30250
30251
30252
30253
30254
30255
30256
30257
30258
30259
30260
30261
30262
30263
30264
30265
30266
30267
30268
30269
30270
30271
30272
30273
30274
30275
30276
30277
30278
30279
30280
30281
30282
30283
30284
30285
30286
30287
30288
30289
30290
30291
30292
30293
30294
30295
30296
30297
30298
30299
30300
30301
30302
30303
30304
30305
30306
30307
30308
30309
30310
30311
30312
30313
30314
30315
30316
30317
30318
30319
30320
30321
30322
30323
30324
30325
30326
30327
30328
30329
30330
30331
30332
30333
30334
30335
30336
30337
30338
30339
30340
30341
30342
30343
30344
30345
30346
30347
30348
30349
30350
30351
30352
30353
30354
30355
30356
30357
30358
30359
30360
30361
30362
30363
30364
30365
30366
30367
30368
30369
30370
30371
30372
30373
30374
30375
30376
30377
30378
30379
30380
30381
30382
30383
30384
30385
30386
30387
30388
30389
30390
30391
30392
30393
30394
30395
30396
30397
30398
30399
30400
30401
30402
30403
30404
30405
30406
30407
30408
30409
30410
30411
30412
30413
30414
30415
30416
30417
30418
30419
30420
30421
30422
30423
30424
30425
30426
30427
30428
30429
30430
30431
30432
30433
30434
30435
30436
30437
30438
30439
30440
30441
30442
30443
30444
30445
30446
30447
30448
30449
30450
30451
30452
30453
30454
30455
30456
30457
30458
30459
30460
30461
30462
30463
30464
30465
30466
30467
30468
30469
30470
30471
30472
30473
30474
30475
30476
30477
30478
30479
30480
30481
30482
30483
30484
30485
30486
30487
30488
30489
30490
30491
30492
30493
30494
30495
30496
30497
30498
30499
30500
30501
30502
30503
30504
30505
30506
30507
30508
30509
30510
30511
30512
30513
30514
30515
30516
30517
30518
30519
30520
30521
30522
30523
30524
30525
30526
30527
30528
30529
30530
30531
30532
30533
30534
30535
30536
30537
30538
30539
30540
30541
30542
30543
30544
30545
30546
30547
30548
30549
30550
30551
30552
30553
30554
30555
30556
30557
30558
30559
30560
30561
30562
30563
30564
30565
30566
30567
30568
30569
30570
30571
30572
30573
30574
30575
30576
30577
30578
30579
30580
30581
30582
30583
30584
30585
30586
30587
30588
30589
30590
30591
30592
30593
30594
30595
30596
30597
30598
30599
30600
30601
30602
30603
30604
30605
30606
30607
30608
30609
30610
30611
30612
30613
30614
30615
30616
30617
30618
30619
30620
30621
30622
30623
30624
30625
30626
30627
30628
30629
30630
30631
30632
30633
30634
30635
30636
30637
30638
30639
30640
30641
30642
30643
30644
30645
30646
30647
30648
30649
30650
30651
30652
30653
30654
30655
30656
30657
30658
30659
30660
30661
30662
30663
30664
30665
30666
30667
30668
30669
30670
30671
30672
30673
30674
30675
30676
30677
30678
30679
30680
30681
30682
30683
30684
30685
30686
30687
30688
30689
30690
30691
30692
30693
30694
30695
30696
30697
30698
30699
30700
30701
30702
30703
30704
30705
30706
30707
30708
30709
30710
30711
30712
30713
30714
30715
30716
30717
30718
30719
30720
30721
30722
30723
30724
30725
30726
30727
30728
30729
30730
30731
30732
30733
30734
30735
30736
30737
30738
30739
30740
30741
30742
30743
30744
30745
30746
30747
30748
30749
30750
30751
30752
30753
30754
30755
30756
30757
30758
30759
30760
30761
30762
30763
30764
30765
30766
30767
30768
30769
30770
30771
30772
30773
30774
30775
30776
30777
30778
30779
30780
30781
30782
30783
30784
30785
30786
30787
30788
30789
30790
30791
30792
30793
30794
30795
30796
30797
30798
30799
30800
30801
30802
30803
30804
30805
30806
30807
30808
30809
30810
30811
30812
30813
30814
30815
30816
30817
30818
30819
30820
30821
30822
30823
30824
30825
30826
30827
30828
30829
30830
30831
30832
30833
30834
30835
30836
30837
30838
30839
30840
30841
30842
30843
30844
30845
30846
30847
30848
30849
30850
30851
30852
30853
30854
30855
30856
30857
30858
30859
30860
30861
30862
30863
30864
30865
30866
30867
30868
30869
30870
30871
30872
30873
30874
30875
30876
30877
30878
30879
30880
30881
30882
30883
30884
30885
30886
30887
30888
30889
30890
30891
30892
30893
30894
30895
30896
30897
30898
30899
30900
30901
30902
30903
30904
30905
30906
30907
30908
30909
30910
30911
30912
30913
30914
30915
30916
30917
30918
30919
30920
30921
30922
30923
30924
30925
30926
30927
30928
30929
30930
30931
30932
30933
30934
30935
30936
30937
30938
30939
30940
30941
30942
30943
30944
30945
30946
30947
30948
30949
30950
30951
30952
30953
30954
30955
30956
30957
30958
30959
30960
30961
30962
30963
30964
30965
30966
30967
30968
30969
30970
30971
30972
30973
30974
30975
30976
30977
30978
30979
30980
30981
30982
30983
30984
30985
30986
30987
30988
30989
30990
30991
30992
30993
30994
30995
30996
30997
30998
30999
31000
31001
31002
31003
31004
31005
31006
31007
31008
31009
31010
31011
31012
31013
31014
31015
31016
31017
31018
31019
31020
31021
31022
31023
31024
31025
31026
31027
31028
31029
31030
31031
31032
31033
31034
31035
31036
31037
31038
31039
31040
31041
31042
31043
31044
31045
31046
31047
31048
31049
31050
31051
31052
31053
31054
31055
31056
31057
31058
31059
31060
31061
31062
31063
31064
31065
31066
31067
31068
31069
31070
31071
31072
31073
31074
31075
31076
31077
31078
31079
31080
31081
31082
31083
31084
31085
31086
31087
31088
31089
31090
31091
31092
31093
31094
31095
31096
31097
31098
31099
31100
31101
31102
31103
31104
31105
31106
31107
31108
31109
31110
31111
31112
31113
31114
31115
31116
31117
31118
31119
31120
31121
31122
31123
31124
31125
31126
31127
31128
31129
31130
31131
31132
31133
31134
31135
31136
31137
31138
31139
31140
31141
31142
31143
31144
31145
31146
31147
31148
31149
31150
31151
31152
31153
31154
31155
31156
31157
31158
31159
31160
31161
31162
31163
31164
31165
31166
31167
31168
31169
31170
31171
31172
31173
31174
31175
31176
31177
31178
31179
31180
31181
31182
31183
31184
31185
31186
31187
31188
31189
31190
31191
31192
31193
31194
31195
31196
31197
31198
31199
31200
31201
31202
31203
31204
31205
31206
31207
31208
31209
31210
31211
31212
31213
31214
31215
31216
31217
31218
31219
31220
31221
31222
31223
31224
31225
31226
31227
31228
31229
31230
31231
31232
31233
31234
31235
31236
31237
31238
31239
31240
31241
31242
31243
31244
31245
31246
31247
31248
31249
31250
31251
31252
31253
31254
31255
31256
31257
31258
31259
31260
31261
31262
31263
31264
31265
31266
31267
31268
31269
31270
31271
31272
31273
31274
31275
31276
31277
31278
31279
31280
31281
31282
31283
31284
31285
31286
31287
31288
31289
31290
31291
31292
31293
31294
31295
31296
31297
31298
31299
31300
31301
31302
31303
31304
31305
31306
31307
31308
31309
31310
31311
31312
31313
31314
31315
31316
31317
31318
31319
31320
31321
31322
31323
31324
31325
31326
31327
31328
31329
31330
31331
31332
31333
31334
31335
31336
31337
31338
31339
31340
31341
31342
31343
31344
31345
31346
31347
31348
31349
31350
31351
31352
31353
31354
31355
31356
31357
31358
31359
31360
31361
31362
31363
31364
31365
31366
31367
31368
31369
31370
31371
31372
31373
31374
31375
31376
31377
31378
31379
31380
31381
31382
31383
31384
31385
31386
31387
31388
31389
31390
31391
31392
31393
31394
31395
31396
31397
31398
31399
31400
31401
31402
31403
31404
31405
31406
31407
31408
31409
31410
31411
31412
31413
31414
31415
31416
31417
31418
31419
31420
31421
31422
31423
31424
31425
31426
31427
31428
31429
31430
31431
31432
31433
31434
31435
31436
31437
31438
31439
31440
31441
31442
31443
31444
31445
31446
31447
31448
31449
31450
31451
31452
31453
31454
31455
31456
31457
31458
31459
31460
31461
31462
31463
31464
31465
31466
31467
31468
31469
31470
31471
31472
31473
31474
31475
31476
31477
31478
31479
31480
31481
31482
31483
31484
31485
31486
31487
31488
31489
31490
31491
31492
31493
31494
31495
31496
31497
31498
31499
31500
31501
31502
31503
31504
31505
31506
31507
31508
31509
31510
31511
31512
31513
31514
31515
31516
31517
31518
31519
31520
31521
31522
31523
31524
31525
31526
31527
31528
31529
31530
31531
31532
31533
31534
31535
31536
31537
31538
31539
31540
31541
31542
31543
31544
31545
31546
31547
31548
31549
31550
31551
31552
31553
31554
31555
31556
31557
31558
31559
31560
31561
31562
31563
31564
31565
31566
31567
31568
31569
31570
31571
31572
31573
31574
31575
31576
31577
31578
31579
31580
31581
31582
31583
31584
31585
31586
31587
31588
31589
31590
31591
31592
31593
31594
31595
31596
31597
31598
31599
31600
31601
31602
31603
31604
31605
31606
31607
31608
31609
31610
31611
31612
31613
31614
31615
31616
31617
31618
31619
31620
31621
31622
31623
31624
31625
31626
31627
31628
31629
31630
31631
31632
31633
31634
31635
31636
31637
31638
31639
31640
31641
31642
31643
31644
31645
31646
31647
31648
31649
31650
31651
31652
31653
31654
31655
31656
31657
31658
31659
31660
31661
31662
31663
31664
31665
31666
31667
31668
31669
31670
31671
31672
31673
31674
31675
31676
31677
31678
31679
31680
31681
31682
31683
31684
31685
31686
31687
31688
31689
31690
31691
31692
31693
31694
31695
31696
31697
31698
31699
31700
31701
31702
31703
31704
31705
31706
31707
31708
31709
31710
31711
31712
31713
31714
31715
31716
31717
31718
31719
31720
31721
31722
31723
31724
31725
31726
31727
31728
31729
31730
31731
31732
31733
31734
31735
31736
31737
31738
31739
31740
31741
31742
31743
31744
31745
31746
31747
31748
31749
31750
31751
31752
31753
31754
31755
31756
31757
31758
31759
31760
31761
31762
31763
31764
31765
31766
31767
31768
31769
31770
31771
31772
31773
31774
31775
31776
31777
31778
31779
31780
31781
31782
31783
31784
31785
31786
31787
31788
31789
31790
31791
31792
31793
31794
31795
31796
31797
31798
31799
31800
31801
31802
31803
31804
31805
31806
31807
31808
31809
31810
31811
31812
31813
31814
31815
31816
31817
31818
31819
31820
31821
31822
31823
31824
31825
31826
31827
31828
31829
31830
31831
31832
31833
31834
31835
31836
31837
31838
31839
31840
31841
31842
31843
31844
31845
31846
31847
31848
31849
31850
31851
31852
31853
31854
31855
31856
31857
31858
31859
31860
31861
31862
31863
31864
31865
31866
31867
31868
31869
31870
31871
31872
31873
31874
31875
31876
31877
31878
31879
31880
31881
31882
31883
31884
31885
31886
31887
31888
31889
31890
31891
31892
31893
31894
31895
31896
31897
31898
31899
31900
31901
31902
31903
31904
31905
31906
31907
31908
31909
31910
31911
31912
31913
31914
31915
31916
31917
31918
31919
31920
31921
31922
31923
31924
31925
31926
31927
31928
31929
31930
31931
31932
31933
31934
31935
31936
31937
31938
31939
31940
31941
31942
31943
31944
31945
31946
31947
31948
31949
31950
31951
31952
31953
31954
31955
31956
31957
31958
31959
31960
31961
31962
31963
31964
31965
31966
31967
31968
31969
31970
31971
31972
31973
31974
31975
31976
31977
31978
31979
31980
31981
31982
31983
31984
31985
31986
31987
31988
31989
31990
31991
31992
31993
31994
31995
31996
31997
31998
31999
32000
32001
32002
32003
32004
32005
32006
32007
32008
32009
32010
32011
32012
32013
32014
32015
32016
32017
32018
32019
32020
32021
32022
32023
32024
32025
32026
32027
32028
32029
32030
32031
32032
32033
32034
32035
32036
32037
32038
32039
32040
32041
32042
32043
32044
32045
32046
32047
32048
32049
32050
32051
32052
32053
32054
32055
32056
32057
32058
32059
32060
32061
32062
32063
32064
32065
32066
32067
32068
32069
32070
32071
32072
32073
32074
32075
32076
32077
32078
32079
32080
32081
32082
32083
32084
32085
32086
32087
32088
32089
32090
32091
32092
32093
32094
32095
32096
32097
32098
32099
32100
32101
32102
32103
32104
32105
32106
32107
32108
32109
32110
32111
32112
32113
32114
32115
32116
32117
32118
32119
32120
32121
32122
32123
32124
32125
32126
32127
32128
32129
32130
32131
32132
32133
32134
32135
32136
32137
32138
32139
32140
32141
32142
32143
32144
32145
32146
32147
32148
32149
32150
32151
32152
32153
32154
32155
32156
32157
32158
32159
32160
32161
32162
32163
32164
32165
32166
32167
32168
32169
32170
32171
32172
32173
32174
32175
32176
32177
32178
32179
32180
32181
32182
32183
32184
32185
32186
32187
32188
32189
32190
32191
32192
32193
32194
32195
32196
32197
32198
32199
32200
32201
32202
32203
32204
32205
32206
32207
32208
32209
32210
32211
32212
32213
32214
32215
32216
32217
32218
32219
32220
32221
32222
32223
32224
32225
32226
32227
32228
32229
32230
32231
32232
32233
32234
32235
32236
32237
32238
32239
32240
32241
32242
32243
32244
32245
32246
32247
32248
32249
32250
32251
32252
32253
32254
32255
32256
32257
32258
32259
32260
32261
32262
32263
32264
32265
32266
32267
32268
32269
32270
32271
32272
32273
32274
32275
32276
32277
32278
32279
32280
32281
32282
32283
32284
32285
32286
32287
32288
32289
32290
32291
32292
32293
32294
32295
32296
32297
32298
32299
32300
32301
32302
32303
32304
32305
32306
32307
32308
32309
32310
32311
32312
32313
32314
32315
32316
32317
32318
32319
32320
32321
32322
32323
32324
32325
32326
32327
32328
32329
32330
32331
32332
32333
32334
32335
32336
32337
32338
32339
32340
32341
32342
32343
32344
32345
32346
32347
32348
32349
32350
32351
32352
32353
32354
32355
32356
32357
32358
32359
32360
32361
32362
32363
32364
32365
32366
32367
32368
32369
32370
32371
32372
32373
32374
32375
32376
32377
32378
32379
32380
32381
32382
32383
32384
32385
32386
32387
32388
32389
32390
32391
32392
32393
32394
32395
32396
32397
32398
32399
32400
32401
32402
32403
32404
32405
32406
32407
32408
32409
32410
32411
32412
32413
32414
32415
32416
32417
32418
32419
32420
32421
32422
32423
32424
32425
32426
32427
32428
32429
32430
32431
32432
32433
32434
32435
32436
32437
32438
32439
32440
32441
32442
32443
32444
32445
32446
32447
32448
32449
32450
32451
32452
32453
32454
32455
32456
32457
32458
32459
32460
32461
32462
32463
32464
32465
32466
32467
32468
32469
32470
32471
32472
32473
32474
32475
32476
32477
32478
32479
32480
32481
32482
32483
32484
32485
32486
32487
32488
32489
32490
32491
32492
32493
32494
32495
32496
32497
32498
32499
32500
32501
32502
32503
32504
32505
32506
32507
32508
32509
32510
32511
32512
32513
32514
32515
32516
32517
32518
32519
32520
32521
32522
32523
32524
32525
32526
32527
32528
32529
32530
32531
32532
32533
32534
32535
32536
32537
32538
32539
32540
32541
32542
32543
32544
32545
32546
32547
32548
32549
32550
32551
32552
32553
32554
32555
32556
32557
32558
32559
32560
32561
32562
32563
32564
32565
32566
32567
32568
32569
32570
32571
32572
32573
32574
32575
32576
32577
32578
32579
32580
32581
32582
32583
32584
32585
32586
32587
32588
32589
32590
32591
32592
32593
32594
32595
32596
32597
32598
32599
32600
32601
32602
32603
32604
32605
32606
32607
32608
32609
32610
32611
32612
32613
32614
32615
32616
32617
32618
32619
32620
32621
32622
32623
32624
32625
32626
32627
32628
32629
32630
32631
32632
32633
32634
32635
32636
32637
32638
32639
32640
32641
32642
32643
32644
32645
32646
32647
32648
32649
32650
32651
32652
32653
32654
32655
32656
32657
32658
32659
32660
32661
32662
32663
32664
32665
32666
32667
32668
32669
32670
32671
32672
32673
32674
32675
32676
32677
32678
32679
32680
32681
32682
32683
32684
32685
32686
32687
32688
32689
32690
32691
32692
32693
32694
32695
32696
32697
32698
32699
32700
32701
32702
32703
32704
32705
32706
32707
32708
32709
32710
32711
32712
32713
32714
32715
32716
32717
32718
32719
32720
32721
32722
32723
32724
32725
32726
32727
32728
32729
32730
32731
32732
32733
32734
32735
32736
32737
32738
32739
32740
32741
32742
32743
32744
32745
32746
32747
32748
32749
32750
32751
32752
32753
32754
32755
32756
32757
32758
32759
32760
32761
32762
32763
32764
32765
32766
32767
32768
32769
32770
32771
32772
32773
32774
32775
32776
32777
32778
32779
32780
32781
32782
32783
32784
32785
32786
32787
32788
32789
32790
32791
32792
32793
32794
32795
32796
32797
32798
32799
32800
32801
32802
32803
32804
32805
32806
32807
32808
32809
32810
32811
32812
32813
32814
32815
32816
32817
32818
32819
32820
32821
32822
32823
32824
32825
32826
32827
32828
32829
32830
32831
32832
32833
32834
32835
32836
32837
32838
32839
32840
32841
32842
32843
32844
32845
32846
32847
32848
32849
32850
32851
32852
32853
32854
32855
32856
32857
32858
32859
32860
32861
32862
32863
32864
32865
32866
32867
32868
32869
32870
32871
32872
32873
32874
32875
32876
32877
32878
32879
32880
32881
32882
32883
32884
32885
32886
32887
32888
32889
32890
32891
32892
32893
32894
32895
32896
32897
32898
32899
32900
32901
32902
32903
32904
32905
32906
32907
32908
32909
32910
32911
32912
32913
32914
32915
32916
32917
32918
32919
32920
32921
32922
32923
32924
32925
32926
32927
32928
32929
32930
32931
32932
32933
32934
32935
32936
32937
32938
32939
32940
32941
32942
32943
32944
32945
32946
32947
32948
32949
32950
32951
32952
32953
32954
32955
32956
32957
32958
32959
32960
32961
32962
32963
32964
32965
32966
32967
32968
32969
32970
32971
32972
32973
32974
32975
32976
32977
32978
32979
32980
32981
32982
32983
32984
32985
32986
32987
32988
32989
32990
32991
32992
32993
32994
32995
32996
32997
32998
32999
33000
33001
33002
33003
33004
33005
33006
33007
33008
33009
33010
33011
33012
33013
33014
33015
33016
33017
33018
33019
33020
33021
33022
33023
33024
33025
33026
33027
33028
33029
33030
33031
33032
33033
33034
33035
33036
33037
33038
33039
33040
33041
33042
33043
33044
33045
33046
33047
33048
33049
33050
33051
33052
33053
33054
33055
33056
33057
33058
33059
33060
33061
33062
33063
33064
33065
33066
33067
33068
33069
33070
33071
33072
33073
33074
33075
33076
33077
33078
33079
33080
33081
33082
33083
33084
33085
33086
33087
33088
33089
33090
33091
33092
33093
33094
33095
33096
33097
33098
33099
33100
33101
33102
33103
33104
33105
33106
33107
33108
33109
33110
33111
33112
33113
33114
33115
33116
33117
33118
33119
33120
33121
33122
33123
33124
33125
33126
33127
33128
33129
33130
33131
33132
33133
33134
33135
33136
33137
33138
33139
33140
33141
33142
33143
33144
33145
33146
33147
33148
33149
33150
33151
33152
33153
33154
33155
33156
33157
33158
33159
33160
33161
33162
33163
33164
33165
33166
33167
33168
33169
33170
33171
33172
33173
33174
33175
33176
33177
33178
33179
33180
33181
33182
33183
33184
33185
33186
33187
33188
33189
33190
33191
33192
33193
33194
33195
33196
33197
33198
33199
33200
33201
33202
33203
33204
33205
33206
33207
33208
33209
33210
33211
33212
33213
33214
33215
33216
33217
33218
33219
33220
33221
33222
33223
33224
33225
33226
33227
33228
33229
33230
33231
33232
33233
33234
33235
33236
33237
33238
33239
33240
33241
33242
33243
33244
33245
33246
33247
33248
33249
33250
33251
33252
33253
33254
33255
33256
33257
33258
33259
33260
33261
33262
33263
33264
33265
33266
33267
33268
33269
33270
33271
33272
33273
33274
33275
33276
33277
33278
33279
33280
33281
33282
33283
33284
33285
33286
33287
33288
33289
33290
33291
33292
33293
33294
33295
33296
33297
33298
33299
33300
33301
33302
33303
33304
33305
33306
33307
33308
33309
33310
33311
33312
33313
33314
33315
33316
33317
33318
33319
33320
33321
33322
33323
33324
33325
33326
33327
33328
33329
33330
33331
33332
33333
33334
33335
33336
33337
33338
33339
33340
33341
33342
33343
33344
33345
33346
33347
33348
33349
33350
33351
33352
33353
33354
33355
33356
33357
33358
33359
33360
33361
33362
33363
33364
33365
33366
33367
33368
33369
33370
33371
33372
33373
33374
33375
33376
33377
33378
33379
33380
33381
33382
33383
33384
33385
33386
33387
33388
33389
33390
33391
33392
33393
33394
33395
33396
33397
33398
33399
33400
33401
33402
33403
33404
33405
33406
33407
33408
33409
33410
33411
33412
33413
33414
33415
33416
33417
33418
33419
33420
33421
33422
33423
33424
33425
33426
33427
33428
33429
33430
33431
33432
33433
33434
33435
33436
33437
33438
33439
33440
33441
33442
33443
33444
33445
33446
33447
33448
33449
33450
33451
33452
33453
33454
33455
33456
33457
33458
33459
33460
33461
33462
33463
33464
33465
33466
33467
33468
33469
33470
33471
33472
33473
33474
33475
33476
33477
33478
33479
33480
33481
33482
33483
33484
33485
33486
33487
33488
33489
33490
33491
33492
33493
33494
33495
33496
33497
33498
33499
33500
33501
33502
33503
33504
33505
33506
33507
33508
33509
33510
33511
33512
33513
33514
33515
33516
33517
33518
33519
33520
33521
33522
33523
33524
33525
33526
33527
33528
33529
33530
33531
33532
33533
33534
33535
33536
33537
33538
33539
33540
33541
33542
33543
33544
33545
33546
33547
33548
33549
33550
33551
33552
33553
33554
33555
33556
33557
33558
33559
33560
33561
33562
33563
33564
33565
33566
33567
33568
33569
33570
33571
33572
33573
33574
33575
33576
33577
33578
33579
33580
33581
33582
33583
33584
33585
33586
33587
33588
33589
33590
33591
33592
33593
33594
33595
33596
33597
33598
33599
33600
33601
33602
33603
33604
33605
33606
33607
33608
33609
33610
33611
33612
33613
33614
33615
33616
33617
33618
33619
33620
33621
33622
33623
33624
33625
33626
33627
33628
33629
33630
33631
33632
33633
33634
33635
33636
33637
33638
33639
33640
33641
33642
33643
33644
33645
33646
33647
33648
33649
33650
33651
33652
33653
33654
33655
33656
33657
33658
33659
33660
33661
33662
33663
33664
33665
33666
33667
33668
33669
33670
33671
33672
33673
33674
33675
33676
33677
33678
33679
33680
33681
33682
33683
33684
33685
33686
33687
33688
33689
33690
33691
33692
33693
33694
33695
33696
33697
33698
33699
33700
33701
33702
33703
33704
33705
33706
33707
33708
33709
33710
33711
33712
33713
33714
33715
33716
33717
33718
33719
33720
33721
33722
33723
33724
33725
33726
33727
33728
33729
33730
33731
33732
33733
33734
33735
33736
33737
33738
33739
33740
33741
33742
33743
33744
33745
33746
33747
33748
33749
33750
33751
33752
33753
33754
33755
33756
33757
33758
33759
33760
33761
33762
33763
33764
33765
33766
33767
33768
33769
33770
33771
33772
33773
33774
33775
33776
33777
33778
33779
33780
33781
33782
33783
33784
33785
33786
33787
33788
33789
33790
33791
33792
33793
33794
33795
33796
33797
33798
33799
33800
33801
33802
33803
33804
33805
33806
33807
33808
33809
33810
33811
33812
33813
33814
33815
33816
33817
33818
33819
33820
33821
33822
33823
33824
33825
33826
33827
33828
33829
33830
33831
33832
33833
33834
33835
33836
33837
33838
33839
33840
33841
33842
33843
33844
33845
33846
33847
33848
33849
33850
33851
33852
33853
33854
33855
33856
33857
33858
33859
33860
33861
33862
33863
33864
33865
33866
33867
33868
33869
33870
33871
33872
33873
33874
33875
33876
33877
33878
33879
33880
33881
33882
33883
33884
33885
33886
33887
33888
33889
33890
33891
33892
33893
33894
33895
33896
33897
33898
33899
33900
33901
33902
33903
33904
33905
33906
33907
33908
33909
33910
33911
33912
33913
33914
33915
33916
33917
33918
33919
33920
33921
33922
33923
33924
33925
33926
33927
33928
33929
33930
33931
33932
33933
33934
33935
33936
33937
33938
33939
33940
33941
33942
33943
33944
33945
33946
33947
33948
33949
33950
33951
33952
33953
33954
33955
33956
33957
33958
33959
33960
33961
33962
33963
33964
33965
33966
33967
33968
33969
33970
33971
33972
33973
33974
33975
33976
33977
33978
33979
33980
33981
33982
33983
33984
33985
33986
33987
33988
33989
33990
33991
33992
33993
33994
33995
33996
33997
33998
33999
34000
34001
34002
34003
34004
34005
34006
34007
34008
34009
34010
34011
34012
34013
34014
34015
34016
34017
34018
34019
34020
34021
34022
34023
34024
34025
34026
34027
34028
34029
34030
34031
34032
34033
34034
34035
34036
34037
34038
34039
34040
34041
34042
34043
34044
34045
34046
34047
34048
34049
34050
34051
34052
34053
34054
34055
34056
34057
34058
34059
34060
34061
34062
34063
34064
34065
34066
34067
34068
34069
34070
34071
34072
34073
34074
34075
34076
34077
34078
34079
34080
34081
34082
34083
34084
34085
34086
34087
34088
34089
34090
34091
34092
34093
34094
34095
34096
34097
34098
34099
34100
34101
34102
34103
34104
34105
34106
34107
34108
34109
34110
34111
34112
34113
34114
34115
34116
34117
34118
34119
34120
34121
34122
34123
34124
34125
34126
34127
34128
34129
34130
34131
34132
34133
34134
34135
34136
34137
34138
34139
34140
34141
34142
34143
34144
34145
34146
34147
34148
34149
34150
34151
34152
34153
34154
34155
34156
34157
34158
34159
34160
34161
34162
34163
34164
34165
34166
34167
34168
34169
34170
34171
34172
34173
34174
34175
34176
34177
34178
34179
34180
34181
34182
34183
34184
34185
34186
34187
34188
34189
34190
34191
34192
34193
34194
34195
34196
34197
34198
34199
34200
34201
34202
34203
34204
34205
34206
34207
34208
34209
34210
34211
34212
34213
34214
34215
34216
34217
34218
34219
34220
34221
34222
34223
34224
34225
34226
34227
34228
34229
34230
34231
34232
34233
34234
34235
34236
34237
34238
34239
34240
34241
34242
34243
34244
34245
34246
34247
34248
34249
34250
34251
34252
34253
34254
34255
34256
34257
34258
34259
34260
34261
34262
34263
34264
34265
34266
34267
34268
34269
34270
34271
34272
34273
34274
34275
34276
34277
34278
34279
34280
34281
34282
34283
34284
34285
34286
34287
34288
34289
34290
34291
34292
34293
34294
34295
34296
34297
34298
34299
34300
34301
34302
34303
34304
34305
34306
34307
34308
34309
34310
34311
34312
34313
34314
34315
34316
34317
34318
34319
34320
34321
34322
34323
34324
34325
34326
34327
34328
34329
34330
34331
34332
34333
34334
34335
34336
34337
34338
34339
34340
34341
34342
34343
34344
34345
34346
34347
34348
34349
34350
34351
34352
34353
34354
34355
34356
34357
34358
34359
34360
34361
34362
34363
34364
34365
34366
34367
34368
34369
34370
34371
34372
34373
34374
34375
34376
34377
34378
34379
34380
34381
34382
34383
34384
34385
34386
34387
34388
34389
34390
34391
34392
34393
34394
34395
34396
34397
34398
34399
34400
34401
34402
34403
34404
34405
34406
34407
34408
34409
34410
34411
34412
34413
34414
34415
34416
34417
34418
34419
34420
34421
34422
34423
34424
34425
34426
34427
34428
34429
34430
34431
34432
34433
34434
34435
34436
34437
34438
34439
34440
34441
34442
34443
34444
34445
34446
34447
34448
34449
34450
34451
34452
34453
34454
34455
34456
34457
34458
34459
34460
34461
34462
34463
34464
34465
34466
34467
34468
34469
34470
34471
34472
34473
34474
34475
34476
34477
34478
34479
34480
34481
34482
34483
34484
34485
34486
34487
34488
34489
34490
34491
34492
34493
34494
34495
34496
34497
34498
34499
34500
34501
34502
34503
34504
34505
34506
34507
34508
34509
34510
34511
34512
34513
34514
34515
34516
34517
34518
34519
34520
34521
34522
34523
34524
34525
34526
34527
34528
34529
34530
34531
34532
34533
34534
34535
34536
34537
34538
34539
34540
34541
34542
34543
34544
34545
34546
34547
34548
34549
34550
34551
34552
34553
34554
34555
34556
34557
34558
34559
34560
34561
34562
34563
34564
34565
34566
34567
34568
34569
34570
34571
34572
34573
34574
34575
34576
34577
34578
34579
34580
34581
34582
34583
34584
34585
34586
34587
34588
34589
34590
34591
34592
34593
34594
34595
34596
34597
34598
34599
34600
34601
34602
34603
34604
34605
34606
34607
34608
34609
34610
34611
34612
34613
34614
34615
34616
34617
34618
34619
34620
34621
34622
34623
34624
34625
34626
34627
34628
34629
34630
34631
34632
34633
34634
34635
34636
34637
34638
34639
34640
34641
34642
34643
34644
34645
34646
34647
34648
34649
34650
34651
34652
34653
34654
34655
34656
34657
34658
34659
34660
34661
34662
34663
34664
34665
34666
34667
34668
34669
34670
34671
34672
34673
34674
34675
34676
34677
34678
34679
34680
34681
34682
34683
34684
34685
34686
34687
34688
34689
34690
34691
34692
34693
34694
34695
34696
34697
34698
34699
34700
34701
34702
34703
34704
34705
34706
34707
34708
34709
34710
34711
34712
34713
34714
34715
34716
34717
34718
34719
34720
34721
34722
34723
34724
34725
34726
34727
34728
34729
34730
34731
34732
34733
34734
34735
34736
34737
34738
34739
34740
34741
34742
34743
34744
34745
34746
34747
34748
34749
34750
34751
34752
34753
34754
34755
34756
34757
34758
34759
34760
34761
34762
34763
34764
34765
34766
34767
34768
34769
34770
34771
34772
34773
34774
34775
34776
34777
34778
34779
34780
34781
34782
34783
34784
34785
34786
34787
34788
34789
34790
34791
34792
34793
34794
34795
34796
34797
34798
34799
34800
34801
34802
34803
34804
34805
34806
34807
34808
34809
34810
34811
34812
34813
34814
34815
34816
34817
34818
34819
34820
34821
34822
34823
34824
34825
34826
34827
34828
34829
34830
34831
34832
34833
34834
34835
34836
34837
34838
34839
34840
34841
34842
34843
34844
34845
34846
34847
34848
34849
34850
34851
34852
34853
34854
34855
34856
34857
34858
34859
34860
34861
34862
34863
34864
34865
34866
34867
34868
34869
34870
34871
34872
34873
34874
34875
34876
34877
34878
34879
34880
34881
34882
34883
34884
34885
34886
34887
34888
34889
34890
34891
34892
34893
34894
34895
34896
34897
34898
34899
34900
34901
34902
34903
34904
34905
34906
34907
34908
34909
34910
34911
34912
34913
34914
34915
34916
34917
34918
34919
34920
34921
34922
34923
34924
34925
34926
34927
34928
34929
34930
34931
34932
34933
34934
34935
34936
34937
34938
34939
34940
34941
34942
34943
34944
34945
34946
34947
34948
34949
34950
34951
34952
34953
34954
34955
34956
34957
34958
34959
34960
34961
34962
34963
34964
34965
34966
34967
34968
34969
34970
34971
34972
34973
34974
34975
34976
34977
34978
34979
34980
34981
34982
34983
34984
34985
34986
34987
34988
34989
34990
34991
34992
34993
34994
34995
34996
34997
34998
34999
35000
35001
35002
35003
35004
35005
35006
35007
35008
35009
35010
35011
35012
35013
35014
35015
35016
35017
35018
35019
35020
35021
35022
35023
35024
35025
35026
35027
35028
35029
35030
35031
35032
35033
35034
35035
35036
35037
35038
35039
35040
35041
35042
35043
35044
35045
35046
35047
35048
35049
35050
35051
35052
35053
35054
35055
35056
35057
35058
35059
35060
35061
35062
35063
35064
35065
35066
35067
35068
35069
35070
35071
35072
35073
35074
35075
35076
35077
35078
35079
35080
35081
35082
35083
35084
35085
35086
35087
35088
35089
35090
35091
35092
35093
35094
35095
35096
35097
35098
35099
35100
35101
35102
35103
35104
35105
35106
35107
35108
35109
35110
35111
35112
35113
35114
35115
35116
35117
35118
35119
35120
35121
35122
35123
35124
35125
35126
35127
35128
35129
35130
35131
35132
35133
35134
35135
35136
35137
35138
35139
35140
35141
35142
35143
35144
35145
35146
35147
35148
35149
35150
35151
35152
35153
35154
35155
35156
35157
35158
35159
35160
35161
35162
35163
35164
35165
35166
35167
35168
35169
35170
35171
35172
35173
35174
35175
35176
35177
35178
35179
35180
35181
35182
35183
35184
35185
35186
35187
35188
35189
35190
35191
35192
35193
35194
35195
35196
35197
35198
35199
35200
35201
35202
35203
35204
35205
35206
35207
35208
35209
35210
35211
35212
35213
35214
35215
35216
35217
35218
35219
35220
35221
35222
35223
35224
35225
35226
35227
35228
35229
35230
35231
35232
35233
35234
35235
35236
35237
35238
35239
35240
35241
35242
35243
35244
35245
35246
35247
35248
35249
35250
35251
35252
35253
35254
35255
35256
35257
35258
35259
35260
35261
35262
35263
35264
35265
35266
35267
35268
35269
35270
35271
35272
35273
35274
35275
35276
35277
35278
35279
35280
35281
35282
35283
35284
35285
35286
35287
35288
35289
35290
35291
35292
35293
35294
35295
35296
35297
35298
35299
35300
35301
35302
35303
35304
35305
35306
35307
35308
35309
35310
35311
35312
35313
35314
35315
35316
35317
35318
35319
35320
35321
35322
35323
35324
35325
35326
35327
35328
35329
35330
35331
35332
35333
35334
35335
35336
35337
35338
35339
35340
35341
35342
35343
35344
35345
35346
35347
35348
35349
35350
35351
35352
35353
35354
35355
35356
35357
35358
35359
35360
35361
35362
35363
35364
35365
35366
35367
35368
35369
35370
35371
35372
35373
35374
35375
35376
35377
35378
35379
35380
35381
35382
35383
35384
35385
35386
35387
35388
35389
35390
35391
35392
35393
35394
35395
35396
35397
35398
35399
35400
35401
35402
35403
35404
35405
35406
35407
35408
35409
35410
35411
35412
35413
35414
35415
35416
35417
35418
35419
35420
35421
35422
35423
35424
35425
35426
35427
35428
35429
35430
35431
35432
35433
35434
35435
35436
35437
35438
35439
35440
35441
35442
35443
35444
35445
35446
35447
35448
35449
35450
35451
35452
35453
35454
35455
35456
35457
35458
35459
35460
35461
35462
35463
35464
35465
35466
35467
35468
35469
35470
35471
35472
35473
35474
35475
35476
35477
35478
35479
35480
35481
35482
35483
35484
35485
35486
35487
35488
35489
35490
35491
35492
35493
35494
35495
35496
35497
35498
35499
35500
35501
35502
35503
35504
35505
35506
35507
35508
35509
35510
35511
35512
35513
35514
35515
35516
35517
35518
35519
35520
35521
35522
35523
35524
35525
35526
35527
35528
35529
35530
35531
35532
35533
35534
35535
35536
35537
35538
35539
35540
35541
35542
35543
35544
35545
35546
35547
35548
35549
35550
35551
35552
35553
35554
35555
35556
35557
35558
35559
35560
35561
35562
35563
35564
35565
35566
35567
35568
35569
35570
35571
35572
35573
35574
35575
35576
35577
35578
35579
35580
35581
35582
35583
35584
35585
35586
35587
35588
35589
35590
35591
35592
35593
35594
35595
35596
35597
35598
35599
35600
35601
35602
35603
35604
35605
35606
35607
35608
35609
35610
35611
35612
35613
35614
35615
35616
35617
35618
35619
35620
35621
35622
35623
35624
35625
35626
35627
35628
35629
35630
35631
35632
35633
35634
35635
35636
35637
35638
35639
35640
35641
35642
35643
35644
35645
35646
35647
35648
35649
35650
35651
35652
35653
35654
35655
35656
35657
35658
35659
35660
35661
35662
35663
35664
35665
35666
35667
35668
35669
35670
35671
35672
35673
35674
35675
35676
35677
35678
35679
35680
35681
35682
35683
35684
35685
35686
35687
35688
35689
35690
35691
35692
35693
35694
35695
35696
35697
35698
35699
35700
35701
35702
35703
35704
35705
35706
35707
35708
35709
35710
35711
35712
35713
35714
35715
35716
35717
35718
35719
35720
35721
35722
35723
35724
35725
35726
35727
35728
35729
35730
35731
35732
35733
35734
35735
35736
35737
35738
35739
35740
35741
35742
35743
35744
35745
35746
35747
35748
35749
35750
35751
35752
35753
35754
35755
35756
35757
35758
35759
35760
35761
35762
35763
35764
35765
35766
35767
35768
35769
35770
35771
35772
35773
35774
35775
35776
35777
35778
35779
35780
35781
35782
35783
35784
35785
35786
35787
35788
35789
35790
35791
35792
35793
35794
35795
35796
35797
35798
35799
35800
35801
35802
35803
35804
35805
35806
35807
35808
35809
35810
35811
35812
35813
35814
35815
35816
35817
35818
35819
35820
35821
35822
35823
35824
35825
35826
35827
35828
35829
35830
35831
35832
35833
35834
35835
35836
35837
35838
35839
35840
35841
35842
35843
35844
35845
35846
35847
35848
35849
35850
35851
35852
35853
35854
35855
35856
35857
35858
35859
35860
35861
35862
35863
35864
35865
35866
35867
35868
35869
35870
35871
35872
35873
35874
35875
35876
35877
35878
35879
35880
35881
35882
35883
35884
35885
35886
35887
35888
35889
35890
35891
35892
35893
35894
35895
35896
35897
35898
35899
35900
35901
35902
35903
35904
35905
35906
35907
35908
35909
35910
35911
35912
35913
35914
35915
35916
35917
35918
35919
35920
35921
35922
35923
35924
35925
35926
35927
35928
35929
35930
35931
35932
35933
35934
35935
35936
35937
35938
35939
35940
35941
35942
35943
35944
35945
35946
35947
35948
35949
35950
35951
35952
35953
35954
35955
35956
35957
35958
35959
35960
35961
35962
35963
35964
35965
35966
35967
35968
35969
35970
35971
35972
35973
35974
35975
35976
35977
35978
35979
35980
35981
35982
35983
35984
35985
35986
35987
35988
35989
35990
35991
35992
35993
35994
35995
35996
35997
35998
35999
36000
36001
36002
36003
36004
36005
36006
36007
36008
36009
36010
36011
36012
36013
36014
36015
36016
36017
36018
36019
36020
36021
36022
36023
36024
36025
36026
36027
36028
36029
36030
36031
36032
36033
36034
36035
36036
36037
36038
36039
36040
36041
36042
36043
36044
36045
36046
36047
36048
36049
36050
36051
36052
36053
36054
36055
36056
36057
36058
36059
36060
36061
36062
36063
36064
36065
36066
36067
36068
36069
36070
36071
36072
36073
36074
36075
36076
36077
36078
36079
36080
36081
36082
36083
36084
36085
36086
36087
36088
36089
36090
36091
36092
36093
36094
36095
36096
36097
36098
36099
36100
36101
36102
36103
36104
36105
36106
36107
36108
36109
36110
36111
36112
36113
36114
36115
36116
36117
36118
36119
36120
36121
36122
36123
36124
36125
36126
36127
36128
36129
36130
36131
36132
36133
36134
36135
36136
36137
36138
36139
36140
36141
36142
36143
36144
36145
36146
36147
36148
36149
36150
36151
36152
36153
36154
36155
36156
36157
36158
36159
36160
36161
36162
36163
36164
36165
36166
36167
36168
36169
36170
36171
36172
36173
36174
36175
36176
36177
36178
36179
36180
36181
36182
36183
36184
36185
36186
36187
36188
36189
36190
36191
36192
36193
36194
36195
36196
36197
36198
36199
36200
36201
36202
36203
36204
36205
36206
36207
36208
36209
36210
36211
36212
36213
36214
36215
36216
36217
36218
36219
36220
36221
36222
36223
36224
36225
36226
36227
36228
36229
36230
36231
36232
36233
36234
36235
36236
36237
36238
36239
36240
36241
36242
36243
36244
36245
36246
36247
36248
36249
36250
36251
36252
36253
36254
36255
36256
36257
36258
36259
36260
36261
36262
36263
36264
36265
36266
36267
36268
36269
36270
36271
36272
36273
36274
36275
36276
36277
36278
36279
36280
36281
36282
36283
36284
36285
36286
36287
36288
36289
36290
36291
36292
36293
36294
36295
36296
36297
36298
36299
36300
36301
36302
36303
36304
36305
36306
36307
36308
36309
36310
36311
36312
36313
36314
36315
36316
36317
36318
36319
36320
36321
36322
36323
36324
36325
36326
36327
36328
36329
36330
36331
36332
36333
36334
36335
36336
36337
36338
36339
36340
36341
36342
36343
36344
36345
36346
36347
36348
36349
36350
36351
36352
36353
36354
36355
36356
36357
36358
36359
36360
36361
36362
36363
36364
36365
36366
36367
36368
36369
36370
36371
36372
36373
36374
36375
36376
36377
36378
36379
36380
36381
36382
36383
36384
36385
36386
36387
36388
36389
36390
36391
36392
36393
36394
36395
36396
36397
36398
36399
36400
36401
36402
36403
36404
36405
36406
36407
36408
36409
36410
36411
36412
36413
36414
36415
36416
36417
36418
36419
36420
36421
36422
36423
36424
36425
36426
36427
36428
36429
36430
36431
36432
36433
36434
36435
36436
36437
36438
36439
36440
36441
36442
36443
36444
36445
36446
36447
36448
36449
36450
36451
36452
36453
36454
36455
36456
36457
36458
36459
36460
36461
36462
36463
36464
36465
36466
36467
36468
36469
36470
36471
36472
36473
36474
36475
36476
36477
36478
36479
36480
36481
36482
36483
36484
36485
36486
36487
36488
36489
36490
36491
36492
36493
36494
36495
36496
36497
36498
36499
36500
36501
36502
36503
36504
36505
36506
36507
36508
36509
36510
36511
36512
36513
36514
36515
36516
36517
36518
36519
36520
36521
36522
36523
36524
36525
36526
36527
36528
36529
36530
36531
36532
36533
36534
36535
36536
36537
36538
36539
36540
36541
36542
36543
36544
36545
36546
36547
36548
36549
36550
36551
36552
36553
36554
36555
36556
36557
36558
36559
36560
36561
36562
36563
36564
36565
36566
36567
36568
36569
36570
36571
36572
36573
36574
36575
36576
36577
36578
36579
36580
36581
36582
36583
36584
36585
36586
36587
36588
36589
36590
36591
36592
36593
36594
36595
36596
36597
36598
36599
36600
36601
36602
36603
36604
36605
36606
36607
36608
36609
36610
36611
36612
36613
36614
36615
36616
36617
36618
36619
36620
36621
36622
36623
36624
36625
36626
36627
36628
36629
36630
36631
36632
36633
36634
36635
36636
36637
36638
36639
36640
36641
36642
36643
36644
36645
36646
36647
36648
36649
36650
36651
36652
36653
36654
36655
36656
36657
36658
36659
36660
36661
36662
36663
36664
36665
36666
36667
36668
36669
36670
36671
36672
36673
36674
36675
36676
36677
36678
36679
36680
36681
36682
36683
36684
36685
36686
36687
36688
36689
36690
36691
36692
36693
36694
36695
36696
36697
36698
36699
36700
36701
36702
36703
36704
36705
36706
36707
36708
36709
36710
36711
36712
36713
36714
36715
36716
36717
36718
36719
36720
36721
36722
36723
36724
36725
36726
36727
36728
36729
36730
36731
36732
36733
36734
36735
36736
36737
36738
36739
36740
36741
36742
36743
36744
36745
36746
36747
36748
36749
36750
36751
36752
36753
36754
36755
36756
36757
36758
36759
36760
36761
36762
36763
36764
36765
36766
36767
36768
36769
36770
36771
36772
36773
36774
36775
36776
36777
36778
36779
36780
36781
36782
36783
36784
36785
36786
36787
36788
36789
36790
36791
36792
36793
36794
36795
36796
36797
36798
36799
36800
36801
36802
36803
36804
36805
36806
36807
36808
36809
36810
36811
36812
36813
36814
36815
36816
36817
36818
36819
36820
36821
36822
36823
36824
36825
36826
36827
36828
36829
36830
36831
36832
36833
36834
36835
36836
36837
36838
36839
36840
36841
36842
36843
36844
36845
36846
36847
36848
36849
36850
36851
36852
36853
36854
36855
36856
36857
36858
36859
36860
36861
36862
36863
36864
36865
36866
36867
36868
36869
36870
36871
36872
36873
36874
36875
36876
36877
36878
36879
36880
36881
36882
36883
36884
36885
36886
36887
36888
36889
36890
36891
36892
36893
36894
36895
36896
36897
36898
36899
36900
36901
36902
36903
36904
36905
36906
36907
36908
36909
36910
36911
36912
36913
36914
36915
36916
36917
36918
36919
36920
36921
36922
36923
36924
36925
36926
36927
36928
36929
36930
36931
36932
36933
36934
36935
36936
36937
36938
36939
36940
36941
36942
36943
36944
36945
36946
36947
36948
36949
36950
36951
36952
36953
36954
36955
36956
36957
36958
36959
36960
36961
36962
36963
36964
36965
36966
36967
36968
36969
36970
36971
36972
36973
36974
36975
36976
36977
36978
36979
36980
36981
36982
36983
36984
36985
36986
36987
36988
36989
36990
36991
36992
36993
36994
36995
36996
36997
36998
36999
37000
37001
37002
37003
37004
37005
37006
37007
37008
37009
37010
37011
37012
37013
37014
37015
37016
37017
37018
37019
37020
37021
37022
37023
37024
37025
37026
37027
37028
37029
37030
37031
37032
37033
37034
37035
37036
37037
37038
37039
37040
37041
37042
37043
37044
37045
37046
37047
37048
37049
37050
37051
37052
37053
37054
37055
37056
37057
37058
37059
37060
37061
37062
37063
37064
37065
37066
37067
37068
37069
37070
37071
37072
37073
37074
37075
37076
37077
37078
37079
37080
37081
37082
37083
37084
37085
37086
37087
37088
37089
37090
37091
37092
37093
37094
37095
37096
37097
37098
37099
37100
37101
37102
37103
37104
37105
37106
37107
37108
37109
37110
37111
37112
37113
37114
37115
37116
37117
37118
37119
37120
37121
37122
37123
37124
37125
37126
37127
37128
37129
37130
37131
37132
37133
37134
37135
37136
37137
37138
37139
37140
37141
37142
37143
37144
37145
37146
37147
37148
37149
37150
37151
37152
37153
37154
37155
37156
37157
37158
37159
37160
37161
37162
37163
37164
37165
37166
37167
37168
37169
37170
37171
37172
37173
37174
37175
37176
37177
37178
37179
37180
37181
37182
37183
37184
37185
37186
37187
37188
37189
37190
37191
37192
37193
37194
37195
37196
37197
37198
37199
37200
37201
37202
37203
37204
37205
37206
37207
37208
37209
37210
37211
37212
37213
37214
37215
37216
37217
37218
37219
37220
37221
37222
37223
37224
37225
37226
37227
37228
37229
37230
37231
37232
37233
37234
37235
37236
37237
37238
37239
37240
37241
37242
37243
37244
37245
37246
37247
37248
37249
37250
37251
37252
37253
37254
37255
37256
37257
37258
37259
37260
37261
37262
37263
37264
37265
37266
37267
37268
37269
37270
37271
37272
37273
37274
37275
37276
37277
37278
37279
37280
37281
37282
37283
37284
37285
37286
37287
37288
37289
37290
37291
37292
37293
37294
37295
37296
37297
37298
37299
37300
37301
37302
37303
37304
37305
37306
37307
37308
37309
37310
37311
37312
37313
37314
37315
37316
37317
37318
37319
37320
37321
37322
37323
37324
37325
37326
37327
37328
37329
37330
37331
37332
37333
37334
37335
37336
37337
37338
37339
37340
37341
37342
37343
37344
37345
37346
37347
37348
37349
37350
37351
37352
37353
37354
37355
37356
37357
37358
37359
37360
37361
37362
37363
37364
37365
37366
37367
37368
37369
37370
37371
37372
37373
37374
37375
37376
37377
37378
37379
37380
37381
37382
37383
37384
37385
37386
37387
37388
37389
37390
37391
37392
37393
37394
37395
37396
37397
37398
37399
37400
37401
37402
37403
37404
37405
37406
37407
37408
37409
37410
37411
37412
37413
37414
37415
37416
37417
37418
37419
37420
37421
37422
37423
37424
37425
37426
37427
37428
37429
37430
37431
37432
37433
37434
37435
37436
37437
37438
37439
37440
37441
37442
37443
37444
37445
37446
37447
37448
37449
37450
37451
37452
37453
37454
37455
37456
37457
37458
37459
37460
37461
37462
37463
37464
37465
37466
37467
37468
37469
37470
37471
37472
37473
37474
37475
37476
37477
37478
37479
37480
37481
37482
37483
37484
37485
37486
37487
37488
37489
37490
37491
37492
37493
37494
37495
37496
37497
37498
37499
37500
37501
37502
37503
37504
37505
37506
37507
37508
37509
37510
37511
37512
37513
37514
37515
37516
37517
37518
37519
37520
37521
37522
37523
37524
37525
37526
37527
37528
37529
37530
37531
37532
37533
37534
37535
37536
37537
37538
37539
37540
37541
37542
37543
37544
37545
37546
37547
37548
37549
37550
37551
37552
37553
37554
37555
37556
37557
37558
37559
37560
37561
37562
37563
37564
37565
37566
37567
37568
37569
37570
37571
37572
37573
37574
37575
37576
37577
37578
37579
37580
37581
37582
37583
37584
37585
37586
37587
37588
37589
37590
37591
37592
37593
37594
37595
37596
37597
37598
37599
37600
37601
37602
37603
37604
37605
37606
37607
37608
37609
37610
37611
37612
37613
37614
37615
37616
37617
37618
37619
37620
37621
37622
37623
37624
37625
37626
37627
37628
37629
37630
37631
37632
37633
37634
37635
37636
37637
37638
37639
37640
37641
37642
37643
37644
37645
37646
37647
37648
37649
37650
37651
37652
37653
37654
37655
37656
37657
37658
37659
37660
37661
37662
37663
37664
37665
37666
37667
37668
37669
37670
37671
37672
37673
37674
37675
37676
37677
37678
37679
37680
37681
37682
37683
37684
37685
37686
37687
37688
37689
37690
37691
37692
37693
37694
37695
37696
37697
37698
37699
37700
37701
37702
37703
37704
37705
37706
37707
37708
37709
37710
37711
37712
37713
37714
37715
37716
37717
37718
37719
37720
37721
37722
37723
37724
37725
37726
37727
37728
37729
37730
37731
37732
37733
37734
37735
37736
37737
37738
37739
37740
37741
37742
37743
37744
37745
37746
37747
37748
37749
37750
37751
37752
37753
37754
37755
37756
37757
37758
37759
37760
37761
37762
37763
37764
37765
37766
37767
37768
37769
37770
37771
37772
37773
37774
37775
37776
37777
37778
37779
37780
37781
37782
37783
37784
37785
37786
37787
37788
37789
37790
37791
37792
37793
37794
37795
37796
37797
37798
37799
37800
37801
37802
37803
37804
37805
37806
37807
37808
37809
37810
37811
37812
37813
37814
37815
37816
37817
37818
37819
37820
37821
37822
37823
37824
37825
37826
37827
37828
37829
37830
37831
37832
37833
37834
37835
37836
37837
37838
37839
37840
37841
37842
37843
37844
37845
37846
37847
37848
37849
37850
37851
37852
37853
37854
37855
37856
37857
37858
37859
37860
37861
37862
37863
37864
37865
37866
37867
37868
37869
37870
37871
37872
37873
37874
37875
37876
37877
37878
37879
37880
37881
37882
37883
37884
37885
37886
37887
37888
37889
37890
37891
37892
37893
37894
37895
37896
37897
37898
37899
37900
37901
37902
37903
37904
37905
37906
37907
37908
37909
37910
37911
37912
37913
37914
37915
37916
37917
37918
37919
37920
37921
37922
37923
37924
37925
37926
37927
37928
37929
37930
37931
37932
37933
37934
37935
37936
37937
37938
37939
37940
37941
37942
37943
37944
37945
37946
37947
37948
37949
37950
37951
37952
37953
37954
37955
37956
37957
37958
37959
37960
37961
37962
37963
37964
37965
37966
37967
37968
37969
37970
37971
37972
37973
37974
37975
37976
37977
37978
37979
37980
37981
37982
37983
37984
37985
37986
37987
37988
37989
37990
37991
37992
37993
37994
37995
37996
37997
37998
37999
38000
38001
38002
38003
38004
38005
38006
38007
38008
38009
38010
38011
38012
38013
38014
38015
38016
38017
38018
38019
38020
38021
38022
38023
38024
38025
38026
38027
38028
38029
38030
38031
38032
38033
38034
38035
38036
38037
38038
38039
38040
38041
38042
38043
38044
38045
38046
38047
38048
38049
38050
38051
38052
38053
38054
38055
38056
38057
38058
38059
38060
38061
38062
38063
38064
38065
38066
38067
38068
38069
38070
38071
38072
38073
38074
38075
38076
38077
38078
38079
38080
38081
38082
38083
38084
38085
38086
38087
38088
38089
38090
38091
38092
38093
38094
38095
38096
38097
38098
38099
38100
38101
38102
38103
38104
38105
38106
38107
38108
38109
38110
38111
38112
38113
38114
38115
38116
38117
38118
38119
38120
38121
38122
38123
38124
38125
38126
38127
38128
38129
38130
38131
38132
38133
38134
38135
38136
38137
38138
38139
38140
38141
38142
38143
38144
38145
38146
38147
38148
38149
38150
38151
38152
38153
38154
38155
38156
38157
38158
38159
38160
38161
38162
38163
38164
38165
38166
38167
38168
38169
38170
38171
38172
38173
38174
38175
38176
38177
38178
38179
38180
38181
38182
38183
38184
38185
38186
38187
38188
38189
38190
38191
38192
38193
38194
38195
38196
38197
38198
38199
38200
38201
38202
38203
38204
38205
38206
38207
38208
38209
38210
38211
38212
38213
38214
38215
38216
38217
38218
38219
38220
38221
38222
38223
38224
38225
38226
38227
38228
38229
38230
38231
38232
38233
38234
38235
38236
38237
38238
38239
38240
38241
38242
38243
38244
38245
38246
38247
38248
38249
38250
38251
38252
38253
38254
38255
38256
38257
38258
38259
38260
38261
38262
38263
38264
38265
38266
38267
38268
38269
38270
38271
38272
38273
38274
38275
38276
38277
38278
38279
38280
38281
38282
38283
38284
38285
38286
38287
38288
38289
38290
38291
38292
38293
38294
38295
38296
38297
38298
38299
38300
38301
38302
38303
38304
38305
38306
38307
38308
38309
38310
38311
38312
38313
38314
38315
38316
38317
38318
38319
38320
38321
38322
38323
38324
38325
38326
38327
38328
38329
38330
38331
38332
38333
38334
38335
38336
38337
38338
38339
38340
38341
38342
38343
38344
38345
38346
38347
38348
38349
38350
38351
38352
38353
38354
38355
38356
38357
38358
38359
38360
38361
38362
38363
38364
38365
38366
38367
38368
38369
38370
38371
38372
38373
38374
38375
38376
38377
38378
38379
38380
38381
38382
38383
38384
38385
38386
38387
38388
38389
38390
38391
38392
38393
38394
38395
38396
38397
38398
38399
38400
38401
38402
38403
38404
38405
38406
38407
38408
38409
38410
38411
38412
38413
38414
38415
38416
38417
38418
38419
38420
38421
38422
38423
38424
38425
38426
38427
38428
38429
38430
38431
38432
38433
38434
38435
38436
38437
38438
38439
38440
38441
38442
38443
38444
38445
38446
38447
38448
38449
38450
38451
38452
38453
38454
38455
38456
38457
38458
38459
38460
38461
38462
38463
38464
38465
38466
38467
38468
38469
38470
38471
38472
38473
38474
38475
38476
38477
38478
38479
38480
38481
38482
38483
38484
38485
38486
38487
38488
38489
38490
38491
38492
38493
38494
38495
38496
38497
38498
38499
38500
38501
38502
38503
38504
38505
38506
38507
38508
38509
38510
38511
38512
38513
38514
38515
38516
38517
38518
38519
38520
38521
38522
38523
38524
38525
38526
38527
38528
38529
38530
38531
38532
38533
38534
38535
38536
38537
38538
38539
38540
38541
38542
38543
38544
38545
38546
38547
38548
38549
38550
38551
38552
38553
38554
38555
38556
38557
38558
38559
38560
38561
38562
38563
38564
38565
38566
38567
38568
38569
38570
38571
38572
38573
38574
38575
38576
38577
38578
38579
38580
38581
38582
38583
38584
38585
38586
38587
38588
38589
38590
38591
38592
38593
38594
38595
38596
38597
38598
38599
38600
38601
38602
38603
38604
38605
38606
38607
38608
38609
38610
38611
38612
38613
38614
38615
38616
38617
38618
38619
38620
38621
38622
38623
38624
38625
38626
38627
38628
38629
38630
38631
38632
38633
38634
38635
38636
38637
38638
38639
38640
38641
38642
38643
38644
38645
38646
38647
38648
38649
38650
38651
38652
38653
38654
38655
38656
38657
38658
38659
38660
38661
38662
38663
38664
38665
38666
38667
38668
38669
38670
38671
38672
38673
38674
38675
38676
38677
38678
38679
38680
38681
38682
38683
38684
38685
38686
38687
38688
38689
38690
38691
38692
38693
38694
38695
38696
38697
38698
38699
38700
38701
38702
38703
38704
38705
38706
38707
38708
38709
38710
38711
38712
38713
38714
38715
38716
38717
38718
38719
38720
38721
38722
38723
38724
38725
38726
38727
38728
38729
38730
38731
38732
38733
38734
38735
38736
38737
38738
38739
38740
38741
38742
38743
38744
38745
38746
38747
38748
38749
38750
38751
38752
38753
38754
38755
38756
38757
38758
38759
38760
38761
38762
38763
38764
38765
38766
38767
38768
38769
38770
38771
38772
38773
38774
38775
38776
38777
38778
38779
38780
38781
38782
38783
38784
38785
38786
38787
38788
38789
38790
38791
38792
38793
38794
38795
38796
38797
38798
38799
38800
38801
38802
38803
38804
38805
38806
38807
38808
38809
38810
38811
38812
38813
38814
38815
38816
38817
38818
38819
38820
38821
38822
38823
38824
38825
38826
38827
38828
38829
38830
38831
38832
38833
38834
38835
38836
38837
38838
38839
38840
38841
38842
38843
38844
38845
38846
38847
38848
38849
38850
38851
38852
38853
38854
38855
38856
38857
38858
38859
38860
38861
38862
38863
38864
38865
38866
38867
38868
38869
38870
38871
38872
38873
38874
38875
38876
38877
38878
38879
38880
38881
38882
38883
38884
38885
38886
38887
38888
38889
38890
38891
38892
38893
38894
38895
38896
38897
38898
38899
38900
38901
38902
38903
38904
38905
38906
38907
38908
38909
38910
38911
38912
38913
38914
38915
38916
38917
38918
38919
38920
38921
38922
38923
38924
38925
38926
38927
38928
38929
38930
38931
38932
38933
38934
38935
38936
38937
38938
38939
38940
38941
38942
38943
38944
38945
38946
38947
38948
38949
38950
38951
38952
38953
38954
38955
38956
38957
38958
38959
38960
38961
38962
38963
38964
38965
38966
38967
38968
38969
38970
38971
38972
38973
38974
38975
38976
38977
38978
38979
38980
38981
38982
38983
38984
38985
38986
38987
38988
38989
38990
38991
38992
38993
38994
38995
38996
38997
38998
38999
39000
39001
39002
39003
39004
39005
39006
39007
39008
39009
39010
39011
39012
39013
39014
39015
39016
39017
39018
39019
39020
39021
39022
39023
39024
39025
39026
39027
39028
39029
39030
39031
39032
39033
39034
39035
39036
39037
39038
39039
39040
39041
39042
39043
39044
39045
39046
39047
39048
39049
39050
39051
39052
39053
39054
39055
39056
39057
39058
39059
39060
39061
39062
39063
39064
39065
39066
39067
39068
39069
39070
39071
39072
39073
39074
39075
39076
39077
39078
39079
39080
39081
39082
39083
39084
39085
39086
39087
39088
39089
39090
39091
39092
39093
39094
39095
39096
39097
39098
39099
39100
39101
39102
39103
39104
39105
39106
39107
39108
39109
39110
39111
39112
39113
39114
39115
39116
39117
39118
39119
39120
39121
39122
39123
39124
39125
39126
39127
39128
39129
39130
39131
39132
39133
39134
39135
39136
39137
39138
39139
39140
39141
39142
39143
39144
39145
39146
39147
39148
39149
39150
39151
39152
39153
39154
39155
39156
39157
39158
39159
39160
39161
39162
39163
39164
39165
39166
39167
39168
39169
39170
39171
39172
39173
39174
39175
39176
39177
39178
39179
39180
39181
39182
39183
39184
39185
39186
39187
39188
39189
39190
39191
39192
39193
39194
39195
39196
39197
39198
39199
39200
39201
39202
39203
39204
39205
39206
39207
39208
39209
39210
39211
39212
39213
39214
39215
39216
39217
39218
39219
39220
39221
39222
39223
39224
39225
39226
39227
39228
39229
39230
39231
39232
39233
39234
39235
39236
39237
39238
39239
39240
39241
39242
39243
39244
39245
39246
39247
39248
39249
39250
39251
39252
39253
39254
39255
39256
39257
39258
39259
39260
39261
39262
39263
39264
39265
39266
39267
39268
39269
39270
39271
39272
39273
39274
39275
39276
39277
39278
39279
39280
39281
39282
39283
39284
39285
39286
39287
39288
39289
39290
39291
39292
39293
39294
39295
39296
39297
39298
39299
39300
39301
39302
39303
39304
39305
39306
39307
39308
39309
39310
39311
39312
39313
39314
39315
39316
39317
39318
39319
39320
39321
39322
39323
39324
39325
39326
39327
39328
39329
39330
39331
39332
39333
39334
39335
39336
39337
39338
39339
39340
39341
39342
39343
39344
39345
39346
39347
39348
39349
39350
39351
39352
39353
39354
39355
39356
39357
39358
39359
39360
39361
39362
39363
39364
39365
39366
39367
39368
39369
39370
39371
39372
39373
39374
39375
39376
39377
39378
39379
39380
39381
39382
39383
39384
39385
39386
39387
39388
39389
39390
39391
39392
39393
39394
39395
39396
39397
39398
39399
39400
39401
39402
39403
39404
39405
39406
39407
39408
39409
39410
39411
39412
39413
39414
39415
39416
39417
39418
39419
39420
39421
39422
39423
39424
39425
39426
39427
39428
39429
39430
39431
39432
39433
39434
39435
39436
39437
39438
39439
39440
39441
39442
39443
39444
39445
39446
39447
39448
39449
39450
39451
39452
39453
39454
39455
39456
39457
39458
39459
39460
39461
39462
39463
39464
39465
39466
39467
39468
39469
39470
39471
39472
39473
39474
39475
39476
39477
39478
39479
39480
39481
39482
39483
39484
39485
39486
39487
39488
39489
39490
39491
39492
39493
39494
39495
39496
39497
39498
39499
39500
39501
39502
39503
39504
39505
39506
39507
39508
39509
39510
39511
39512
39513
39514
39515
39516
39517
39518
39519
39520
39521
39522
39523
39524
39525
39526
39527
39528
39529
39530
39531
39532
39533
39534
39535
39536
39537
39538
39539
39540
39541
39542
39543
39544
39545
39546
39547
39548
39549
39550
39551
39552
39553
39554
39555
39556
39557
39558
39559
39560
39561
39562
39563
39564
39565
39566
39567
39568
39569
39570
39571
39572
39573
39574
39575
39576
39577
39578
39579
39580
39581
39582
39583
39584
39585
39586
39587
39588
39589
39590
39591
39592
39593
39594
39595
39596
39597
39598
39599
39600
39601
39602
39603
39604
39605
39606
39607
39608
39609
39610
39611
39612
39613
39614
39615
39616
39617
39618
39619
39620
39621
39622
39623
39624
39625
39626
39627
39628
39629
39630
39631
39632
39633
39634
39635
39636
39637
39638
39639
39640
39641
39642
39643
39644
39645
39646
39647
39648
39649
39650
39651
39652
39653
39654
39655
39656
39657
39658
39659
39660
39661
39662
39663
39664
39665
39666
39667
39668
39669
39670
39671
39672
39673
39674
39675
39676
39677
39678
39679
39680
39681
39682
39683
39684
39685
39686
39687
39688
39689
39690
39691
39692
39693
39694
39695
39696
39697
39698
39699
39700
39701
39702
39703
39704
39705
39706
39707
39708
39709
39710
39711
39712
39713
39714
39715
39716
39717
39718
39719
39720
39721
39722
39723
39724
39725
39726
39727
39728
39729
39730
39731
39732
39733
39734
39735
39736
39737
39738
39739
39740
39741
39742
39743
39744
39745
39746
39747
39748
39749
39750
39751
39752
39753
39754
39755
39756
39757
39758
39759
39760
39761
39762
39763
39764
39765
39766
39767
39768
39769
39770
39771
39772
39773
39774
39775
39776
39777
39778
39779
39780
39781
39782
39783
39784
39785
39786
39787
39788
39789
39790
39791
39792
39793
39794
39795
39796
39797
39798
39799
39800
39801
39802
39803
39804
39805
39806
39807
39808
39809
39810
39811
39812
39813
39814
39815
39816
39817
39818
39819
39820
39821
39822
39823
39824
39825
39826
39827
39828
39829
39830
39831
39832
39833
39834
39835
39836
39837
39838
39839
39840
39841
39842
39843
39844
39845
39846
39847
39848
39849
39850
39851
39852
39853
39854
39855
39856
39857
39858
39859
39860
39861
39862
39863
39864
39865
39866
39867
39868
39869
39870
39871
39872
39873
39874
39875
39876
39877
39878
39879
39880
39881
39882
39883
39884
39885
39886
39887
39888
39889
39890
39891
39892
39893
39894
39895
39896
39897
39898
39899
39900
39901
39902
39903
39904
39905
39906
39907
39908
39909
39910
39911
39912
39913
39914
39915
39916
39917
39918
39919
39920
39921
39922
39923
39924
39925
39926
39927
39928
39929
39930
39931
39932
39933
39934
39935
39936
39937
39938
39939
39940
39941
39942
39943
39944
39945
39946
39947
39948
39949
39950
39951
39952
39953
39954
39955
39956
39957
39958
39959
39960
39961
39962
39963
39964
39965
39966
39967
39968
39969
39970
39971
39972
39973
39974
39975
39976
39977
39978
39979
39980
39981
39982
39983
39984
39985
39986
39987
39988
39989
39990
39991
39992
39993
39994
39995
39996
39997
39998
39999
40000
40001
40002
40003
40004
40005
40006
40007
40008
40009
40010
40011
40012
40013
40014
40015
40016
40017
40018
40019
40020
40021
40022
40023
40024
40025
40026
40027
40028
40029
40030
40031
40032
40033
40034
40035
40036
40037
40038
40039
40040
40041
40042
40043
40044
40045
40046
40047
40048
40049
40050
40051
40052
40053
40054
40055
40056
40057
40058
40059
40060
40061
40062
40063
40064
40065
40066
40067
40068
40069
40070
40071
40072
40073
40074
40075
40076
40077
40078
40079
40080
40081
40082
40083
40084
40085
40086
40087
40088
40089
40090
40091
40092
40093
40094
40095
40096
40097
40098
40099
40100
40101
40102
40103
40104
40105
40106
40107
40108
40109
40110
40111
40112
40113
40114
40115
40116
40117
40118
40119
40120
40121
40122
40123
40124
40125
40126
40127
40128
40129
40130
40131
40132
40133
40134
40135
40136
40137
40138
40139
40140
40141
40142
40143
40144
40145
40146
40147
40148
40149
40150
40151
40152
40153
40154
40155
40156
40157
40158
40159
40160
40161
40162
40163
40164
40165
40166
40167
40168
40169
40170
40171
40172
40173
40174
40175
40176
40177
40178
40179
40180
40181
40182
40183
40184
40185
40186
40187
40188
40189
40190
40191
40192
40193
40194
40195
40196
40197
40198
40199
40200
40201
40202
40203
40204
40205
40206
40207
40208
40209
40210
40211
40212
40213
40214
40215
40216
40217
40218
40219
40220
40221
40222
40223
40224
40225
40226
40227
40228
40229
40230
40231
40232
40233
40234
40235
40236
40237
40238
40239
40240
40241
40242
40243
40244
40245
40246
40247
40248
40249
40250
40251
40252
40253
40254
40255
40256
40257
40258
40259
40260
40261
40262
40263
40264
40265
40266
40267
40268
40269
40270
40271
40272
40273
40274
40275
40276
40277
40278
40279
40280
40281
40282
40283
40284
40285
40286
40287
40288
40289
40290
40291
40292
40293
40294
40295
40296
40297
40298
40299
40300
40301
40302
40303
40304
40305
40306
40307
40308
40309
40310
40311
40312
40313
40314
40315
40316
40317
40318
40319
40320
40321
40322
40323
40324
40325
40326
40327
40328
40329
40330
40331
40332
40333
40334
40335
40336
40337
40338
40339
40340
40341
40342
40343
40344
40345
40346
40347
40348
40349
40350
40351
40352
40353
40354
40355
40356
40357
40358
40359
40360
40361
40362
40363
40364
40365
40366
40367
40368
40369
40370
40371
40372
40373
40374
40375
40376
40377
40378
40379
40380
40381
40382
40383
40384
40385
40386
40387
40388
40389
40390
40391
40392
40393
40394
40395
40396
40397
40398
40399
40400
40401
40402
40403
40404
40405
40406
40407
40408
40409
40410
40411
40412
40413
40414
40415
40416
40417
40418
40419
40420
40421
40422
40423
40424
40425
40426
40427
40428
40429
40430
40431
40432
40433
40434
40435
40436
40437
40438
40439
40440
40441
40442
40443
40444
40445
40446
40447
40448
40449
40450
40451
40452
40453
40454
40455
40456
40457
40458
40459
40460
40461
40462
40463
40464
40465
40466
40467
40468
40469
40470
40471
40472
40473
40474
40475
40476
40477
40478
40479
40480
40481
40482
40483
40484
40485
40486
40487
40488
40489
40490
40491
40492
40493
40494
40495
40496
40497
40498
40499
40500
40501
40502
40503
40504
40505
40506
40507
40508
40509
40510
40511
40512
40513
40514
40515
40516
40517
40518
40519
40520
40521
40522
40523
40524
40525
40526
40527
40528
40529
40530
40531
40532
40533
40534
40535
40536
40537
40538
40539
40540
40541
40542
40543
40544
40545
40546
40547
40548
40549
40550
40551
40552
40553
40554
40555
40556
40557
40558
40559
40560
40561
40562
40563
40564
40565
40566
40567
40568
40569
40570
40571
40572
40573
40574
40575
40576
40577
40578
40579
40580
40581
40582
40583
40584
40585
40586
40587
40588
40589
40590
40591
40592
40593
40594
40595
40596
40597
40598
40599
40600
40601
40602
40603
40604
40605
40606
40607
40608
40609
40610
40611
40612
40613
40614
40615
40616
40617
40618
40619
40620
40621
40622
40623
40624
40625
40626
40627
40628
40629
40630
40631
40632
40633
40634
40635
40636
40637
40638
40639
40640
40641
40642
40643
40644
40645
40646
40647
40648
40649
40650
40651
40652
40653
40654
40655
40656
40657
40658
40659
40660
40661
40662
40663
40664
40665
40666
40667
40668
40669
40670
40671
40672
40673
40674
40675
40676
40677
40678
40679
40680
40681
40682
40683
40684
40685
40686
40687
40688
40689
40690
40691
40692
40693
40694
40695
40696
40697
40698
40699
40700
40701
40702
40703
40704
40705
40706
40707
40708
40709
40710
40711
40712
40713
40714
40715
40716
40717
40718
40719
40720
40721
40722
40723
40724
40725
40726
40727
40728
40729
40730
40731
40732
40733
40734
40735
40736
40737
40738
40739
40740
40741
40742
40743
40744
40745
40746
40747
40748
40749
40750
40751
40752
40753
40754
40755
40756
40757
40758
40759
40760
40761
40762
40763
40764
40765
40766
40767
40768
40769
40770
40771
40772
40773
40774
40775
40776
40777
40778
40779
40780
40781
40782
40783
40784
40785
40786
40787
40788
40789
40790
40791
40792
40793
40794
40795
40796
40797
40798
40799
40800
40801
40802
40803
40804
40805
40806
40807
40808
40809
40810
40811
40812
40813
40814
40815
40816
40817
40818
40819
40820
40821
40822
40823
40824
40825
40826
40827
40828
40829
40830
40831
40832
40833
40834
40835
40836
40837
40838
40839
40840
40841
40842
40843
40844
40845
40846
40847
40848
40849
40850
40851
40852
40853
40854
40855
40856
40857
40858
40859
40860
40861
40862
40863
40864
40865
40866
40867
40868
40869
40870
40871
40872
40873
40874
40875
40876
40877
40878
40879
40880
40881
40882
40883
40884
40885
40886
40887
40888
40889
40890
40891
40892
40893
40894
40895
40896
40897
40898
40899
40900
40901
40902
40903
40904
40905
40906
40907
40908
40909
40910
40911
40912
40913
40914
40915
40916
40917
40918
40919
40920
40921
40922
40923
40924
40925
40926
40927
40928
40929
40930
40931
40932
40933
40934
40935
40936
40937
40938
40939
40940
40941
40942
40943
40944
40945
40946
40947
40948
40949
40950
40951
40952
40953
40954
40955
40956
40957
40958
40959
40960
40961
40962
40963
40964
40965
40966
40967
40968
40969
40970
40971
40972
40973
40974
40975
40976
40977
40978
40979
40980
40981
40982
40983
40984
40985
40986
40987
40988
40989
40990
40991
40992
40993
40994
40995
40996
40997
40998
40999
41000
41001
41002
41003
41004
41005
41006
41007
41008
41009
41010
41011
41012
41013
41014
41015
41016
41017
41018
41019
41020
41021
41022
41023
41024
41025
41026
41027
41028
41029
41030
41031
41032
41033
41034
41035
41036
41037
41038
41039
41040
41041
41042
41043
41044
41045
41046
41047
41048
41049
41050
41051
41052
41053
41054
41055
41056
41057
41058
41059
41060
41061
41062
41063
41064
41065
41066
41067
41068
41069
41070
41071
41072
41073
41074
41075
41076
41077
41078
41079
41080
41081
41082
41083
41084
41085
41086
41087
41088
41089
41090
41091
41092
41093
41094
41095
41096
41097
41098
41099
41100
41101
41102
41103
41104
41105
41106
41107
41108
41109
41110
41111
41112
41113
41114
41115
41116
41117
41118
41119
41120
41121
41122
41123
41124
41125
41126
41127
41128
41129
41130
41131
41132
41133
41134
41135
41136
41137
41138
41139
41140
41141
41142
41143
41144
41145
41146
41147
41148
41149
41150
41151
41152
41153
41154
41155
41156
41157
41158
41159
41160
41161
41162
41163
41164
41165
41166
41167
41168
41169
41170
41171
41172
41173
41174
41175
41176
41177
41178
41179
41180
41181
41182
41183
41184
41185
41186
41187
41188
41189
41190
41191
41192
41193
41194
41195
41196
41197
41198
41199
41200
41201
41202
41203
41204
41205
41206
41207
41208
41209
41210
41211
41212
41213
41214
41215
41216
41217
41218
41219
41220
41221
41222
41223
41224
41225
41226
41227
41228
41229
41230
41231
41232
41233
41234
41235
41236
41237
41238
41239
41240
41241
41242
41243
41244
41245
41246
41247
41248
41249
41250
41251
41252
41253
41254
41255
41256
41257
41258
41259
41260
41261
41262
41263
41264
41265
41266
41267
41268
41269
41270
41271
41272
41273
41274
41275
41276
41277
41278
41279
41280
41281
41282
41283
41284
41285
41286
41287
41288
41289
41290
41291
41292
41293
41294
41295
41296
41297
41298
41299
41300
41301
41302
41303
41304
41305
41306
41307
41308
41309
41310
41311
41312
41313
41314
41315
41316
41317
41318
41319
41320
41321
41322
41323
41324
41325
41326
41327
41328
41329
41330
41331
41332
41333
41334
41335
41336
41337
41338
41339
41340
41341
41342
41343
41344
41345
41346
41347
41348
41349
41350
41351
41352
41353
41354
41355
41356
41357
41358
41359
41360
41361
41362
41363
41364
41365
41366
41367
41368
41369
41370
41371
41372
41373
41374
41375
41376
41377
41378
41379
41380
41381
41382
41383
41384
41385
41386
41387
41388
41389
41390
41391
41392
41393
41394
41395
41396
41397
41398
41399
41400
41401
41402
41403
41404
41405
41406
41407
41408
41409
41410
41411
41412
41413
41414
41415
41416
41417
41418
41419
41420
41421
41422
41423
41424
41425
41426
41427
41428
41429
41430
41431
41432
41433
41434
41435
41436
41437
41438
41439
41440
41441
41442
41443
41444
41445
41446
41447
41448
41449
41450
41451
41452
41453
41454
41455
41456
41457
41458
41459
41460
41461
41462
41463
41464
41465
41466
41467
41468
41469
41470
41471
41472
41473
41474
41475
41476
41477
41478
41479
41480
41481
41482
41483
41484
41485
41486
41487
41488
41489
41490
41491
41492
41493
41494
41495
41496
41497
41498
41499
41500
41501
41502
41503
41504
41505
41506
41507
41508
41509
41510
41511
41512
41513
41514
41515
41516
41517
41518
41519
41520
41521
41522
41523
41524
41525
41526
41527
41528
41529
41530
41531
41532
41533
41534
41535
41536
41537
41538
41539
41540
41541
41542
41543
41544
41545
41546
41547
41548
41549
41550
41551
41552
41553
41554
41555
41556
41557
41558
41559
41560
41561
41562
41563
41564
41565
41566
41567
41568
41569
41570
41571
41572
41573
41574
41575
41576
41577
41578
41579
41580
41581
41582
41583
41584
41585
41586
41587
41588
41589
41590
41591
41592
41593
41594
41595
41596
41597
41598
41599
41600
41601
41602
41603
41604
41605
41606
41607
41608
41609
41610
41611
41612
41613
41614
41615
41616
41617
41618
41619
41620
41621
41622
41623
41624
41625
41626
41627
41628
41629
41630
41631
41632
41633
41634
41635
41636
41637
41638
41639
41640
41641
41642
41643
41644
41645
41646
41647
41648
41649
41650
41651
41652
41653
41654
41655
41656
41657
41658
41659
41660
41661
41662
41663
41664
41665
41666
41667
41668
41669
41670
41671
41672
41673
41674
41675
41676
41677
41678
41679
41680
41681
41682
41683
41684
41685
41686
41687
41688
41689
41690
41691
41692
41693
41694
41695
41696
41697
41698
41699
41700
41701
41702
41703
41704
41705
41706
41707
41708
41709
41710
41711
41712
41713
41714
41715
41716
41717
41718
41719
41720
41721
41722
41723
41724
41725
41726
41727
41728
41729
41730
41731
41732
41733
41734
41735
41736
41737
41738
41739
41740
41741
41742
41743
41744
41745
41746
41747
41748
41749
41750
41751
41752
41753
41754
41755
41756
41757
41758
41759
41760
41761
41762
41763
41764
41765
41766
41767
41768
41769
41770
41771
41772
41773
41774
41775
41776
41777
41778
41779
41780
41781
41782
41783
41784
41785
41786
41787
41788
41789
41790
41791
41792
41793
41794
41795
41796
41797
41798
41799
41800
41801
41802
41803
41804
41805
41806
41807
41808
41809
41810
41811
41812
41813
41814
41815
41816
41817
41818
41819
41820
41821
41822
41823
41824
41825
41826
41827
41828
41829
41830
41831
41832
41833
41834
41835
41836
41837
41838
41839
41840
41841
41842
41843
41844
41845
41846
41847
41848
41849
41850
41851
41852
41853
41854
41855
41856
41857
41858
41859
41860
41861
41862
41863
41864
41865
41866
41867
41868
41869
41870
41871
41872
41873
41874
41875
41876
41877
41878
41879
41880
41881
41882
41883
41884
41885
41886
41887
41888
41889
41890
41891
41892
41893
41894
41895
41896
41897
41898
41899
41900
41901
41902
41903
41904
41905
41906
41907
41908
41909
41910
41911
41912
41913
41914
41915
41916
41917
41918
41919
41920
41921
41922
41923
41924
41925
41926
41927
41928
41929
41930
41931
41932
41933
41934
41935
41936
41937
41938
41939
41940
41941
41942
41943
41944
41945
41946
41947
41948
41949
41950
41951
41952
41953
41954
41955
41956
41957
41958
41959
41960
41961
41962
41963
41964
41965
41966
41967
41968
41969
41970
41971
41972
41973
41974
41975
41976
41977
41978
41979
41980
41981
41982
41983
41984
41985
41986
41987
41988
41989
41990
41991
41992
41993
41994
41995
41996
41997
41998
41999
42000
42001
42002
42003
42004
42005
42006
42007
42008
42009
42010
42011
42012
42013
42014
42015
42016
42017
42018
42019
42020
42021
42022
42023
42024
42025
42026
42027
42028
42029
42030
42031
42032
42033
42034
42035
42036
42037
42038
42039
42040
42041
42042
42043
42044
42045
42046
42047
42048
42049
42050
42051
42052
42053
42054
42055
42056
42057
42058
42059
42060
42061
42062
42063
42064
42065
42066
42067
42068
42069
42070
42071
42072
42073
42074
42075
42076
42077
42078
42079
42080
42081
42082
42083
42084
42085
42086
42087
42088
42089
42090
42091
42092
42093
42094
42095
42096
42097
42098
42099
42100
42101
42102
42103
42104
42105
42106
42107
42108
42109
42110
42111
42112
42113
42114
42115
42116
42117
42118
42119
42120
42121
42122
42123
42124
42125
42126
42127
42128
42129
42130
42131
42132
42133
42134
42135
42136
42137
42138
42139
42140
42141
42142
42143
42144
42145
42146
42147
42148
42149
42150
42151
42152
42153
42154
42155
42156
42157
42158
42159
42160
42161
42162
42163
42164
42165
42166
42167
42168
42169
42170
42171
42172
42173
42174
42175
42176
42177
42178
42179
42180
42181
42182
42183
42184
42185
42186
42187
42188
42189
42190
42191
42192
42193
42194
42195
42196
42197
42198
42199
42200
42201
42202
42203
42204
42205
42206
42207
42208
42209
42210
42211
42212
42213
42214
42215
42216
42217
42218
42219
42220
42221
42222
42223
42224
42225
42226
42227
42228
42229
42230
42231
42232
42233
42234
42235
42236
42237
42238
42239
42240
42241
42242
42243
42244
42245
42246
42247
42248
42249
42250
42251
42252
42253
42254
42255
42256
42257
42258
42259
42260
42261
42262
42263
42264
42265
42266
42267
42268
42269
42270
42271
42272
42273
42274
42275
42276
42277
42278
42279
42280
42281
42282
42283
42284
42285
42286
42287
42288
42289
42290
42291
42292
42293
42294
42295
42296
42297
42298
42299
42300
42301
42302
42303
42304
42305
42306
42307
42308
42309
42310
42311
42312
42313
42314
42315
42316
42317
42318
42319
42320
42321
42322
42323
42324
42325
42326
42327
42328
42329
42330
42331
42332
42333
42334
42335
42336
42337
42338
42339
42340
42341
42342
42343
42344
42345
42346
42347
42348
42349
42350
42351
42352
42353
42354
42355
42356
42357
42358
42359
42360
42361
42362
42363
42364
42365
42366
42367
42368
42369
42370
42371
42372
42373
42374
42375
42376
42377
42378
42379
42380
42381
42382
42383
42384
42385
42386
42387
42388
42389
42390
42391
42392
42393
42394
42395
42396
42397
42398
42399
42400
42401
42402
42403
42404
42405
42406
42407
42408
42409
42410
42411
42412
42413
42414
42415
42416
42417
42418
42419
42420
42421
42422
42423
42424
42425
42426
42427
42428
42429
42430
42431
42432
42433
42434
42435
42436
42437
42438
42439
42440
42441
42442
42443
42444
42445
42446
42447
42448
42449
42450
42451
42452
42453
42454
42455
42456
42457
42458
42459
42460
42461
42462
42463
42464
42465
42466
42467
42468
42469
42470
42471
42472
42473
42474
42475
42476
42477
42478
42479
42480
42481
42482
42483
42484
42485
42486
42487
42488
42489
42490
42491
42492
42493
42494
42495
42496
42497
42498
42499
42500
42501
42502
42503
42504
42505
42506
42507
42508
42509
42510
42511
42512
42513
42514
42515
42516
42517
42518
42519
42520
42521
42522
42523
42524
42525
42526
42527
42528
42529
42530
42531
42532
42533
42534
42535
42536
42537
42538
42539
42540
42541
42542
42543
42544
42545
42546
42547
42548
42549
42550
42551
42552
42553
42554
42555
42556
42557
42558
42559
42560
42561
42562
42563
42564
42565
42566
42567
42568
42569
42570
42571
42572
42573
42574
42575
42576
42577
42578
42579
42580
42581
42582
42583
42584
42585
42586
42587
42588
42589
42590
42591
42592
42593
42594
42595
42596
42597
42598
42599
42600
42601
42602
42603
42604
42605
42606
42607
42608
42609
42610
42611
42612
42613
42614
42615
42616
42617
42618
42619
42620
42621
42622
42623
42624
42625
42626
42627
42628
42629
42630
42631
42632
42633
42634
42635
42636
42637
42638
42639
42640
42641
42642
42643
42644
42645
42646
42647
42648
42649
42650
42651
42652
42653
42654
42655
42656
42657
42658
42659
42660
42661
42662
42663
42664
42665
42666
42667
42668
42669
42670
42671
42672
42673
42674
42675
42676
42677
42678
42679
42680
42681
42682
42683
42684
42685
42686
42687
42688
42689
42690
42691
42692
42693
42694
42695
42696
42697
42698
42699
42700
42701
42702
42703
42704
42705
42706
42707
42708
42709
42710
42711
42712
42713
42714
42715
42716
42717
42718
42719
42720
42721
42722
42723
42724
42725
42726
42727
42728
42729
42730
42731
42732
42733
42734
42735
42736
42737
42738
42739
42740
42741
42742
42743
42744
42745
42746
42747
42748
42749
42750
42751
42752
42753
42754
42755
42756
42757
42758
42759
42760
42761
42762
42763
42764
42765
42766
42767
42768
42769
42770
42771
42772
42773
42774
42775
42776
42777
42778
42779
42780
42781
42782
42783
42784
42785
42786
42787
42788
42789
42790
42791
42792
42793
42794
42795
42796
42797
42798
42799
42800
42801
42802
42803
42804
42805
42806
42807
42808
42809
42810
42811
42812
42813
42814
42815
42816
42817
42818
42819
42820
42821
42822
42823
42824
42825
42826
42827
42828
42829
42830
42831
42832
42833
42834
42835
42836
42837
42838
42839
42840
42841
42842
42843
42844
42845
42846
42847
42848
42849
42850
42851
42852
42853
42854
42855
42856
42857
42858
42859
42860
42861
42862
42863
42864
42865
42866
42867
42868
42869
42870
42871
42872
42873
42874
42875
42876
42877
42878
42879
42880
42881
42882
42883
42884
42885
42886
42887
42888
42889
42890
42891
42892
42893
42894
42895
42896
42897
42898
42899
42900
42901
42902
42903
42904
42905
42906
42907
42908
42909
42910
42911
42912
42913
42914
42915
42916
42917
42918
42919
42920
42921
42922
42923
42924
42925
42926
42927
42928
42929
42930
42931
42932
42933
42934
42935
42936
42937
42938
42939
42940
42941
42942
42943
42944
42945
42946
42947
42948
42949
42950
42951
42952
42953
42954
42955
42956
42957
42958
42959
42960
42961
42962
42963
42964
42965
42966
42967
42968
42969
42970
42971
42972
42973
42974
42975
42976
42977
42978
42979
42980
42981
42982
42983
42984
42985
42986
42987
42988
42989
42990
42991
42992
42993
42994
42995
42996
42997
42998
42999
43000
43001
43002
43003
43004
43005
43006
43007
43008
43009
43010
43011
43012
43013
43014
43015
43016
43017
43018
43019
43020
43021
43022
43023
43024
43025
43026
43027
43028
43029
43030
43031
43032
43033
43034
43035
43036
43037
43038
43039
43040
43041
43042
43043
43044
43045
43046
43047
43048
43049
43050
43051
43052
43053
43054
43055
43056
43057
43058
43059
43060
43061
43062
43063
43064
43065
43066
43067
43068
43069
43070
43071
43072
43073
43074
43075
43076
43077
43078
43079
43080
43081
43082
43083
43084
43085
43086
43087
43088
43089
43090
43091
43092
43093
43094
43095
43096
43097
43098
43099
43100
43101
43102
43103
43104
43105
43106
43107
43108
43109
43110
43111
43112
43113
43114
43115
43116
43117
43118
43119
43120
43121
43122
43123
43124
43125
43126
43127
43128
43129
43130
43131
43132
43133
43134
43135
43136
43137
43138
43139
43140
43141
43142
43143
43144
43145
43146
43147
43148
43149
43150
43151
43152
43153
43154
43155
43156
43157
43158
43159
43160
43161
43162
43163
43164
43165
43166
43167
43168
43169
43170
43171
43172
43173
43174
43175
43176
43177
43178
43179
43180
43181
43182
43183
43184
43185
43186
43187
43188
43189
43190
43191
43192
43193
43194
43195
43196
43197
43198
43199
43200
43201
43202
43203
43204
43205
43206
43207
43208
43209
43210
43211
43212
43213
43214
43215
43216
43217
43218
43219
43220
43221
43222
43223
43224
43225
43226
43227
43228
43229
43230
43231
43232
43233
43234
43235
43236
43237
43238
43239
43240
43241
43242
43243
43244
43245
43246
43247
43248
43249
43250
43251
43252
43253
43254
43255
43256
43257
43258
43259
43260
43261
43262
43263
43264
43265
43266
43267
43268
43269
43270
43271
43272
43273
43274
43275
43276
43277
43278
43279
43280
43281
43282
43283
43284
43285
43286
43287
43288
43289
43290
43291
43292
43293
43294
43295
43296
43297
43298
43299
43300
43301
43302
43303
43304
43305
43306
43307
43308
43309
43310
43311
43312
43313
43314
43315
43316
43317
43318
43319
43320
43321
43322
43323
43324
43325
43326
43327
43328
43329
43330
43331
43332
43333
43334
43335
43336
43337
43338
43339
43340
43341
43342
43343
43344
43345
43346
43347
43348
43349
43350
43351
43352
43353
43354
43355
43356
43357
43358
43359
43360
43361
43362
43363
43364
43365
43366
43367
43368
43369
43370
43371
43372
43373
43374
43375
43376
43377
43378
43379
43380
43381
43382
43383
43384
43385
43386
43387
43388
43389
43390
43391
43392
43393
43394
43395
43396
43397
43398
43399
43400
43401
43402
43403
43404
43405
43406
43407
43408
43409
43410
43411
43412
43413
43414
43415
43416
43417
43418
43419
43420
43421
43422
43423
43424
43425
43426
43427
43428
43429
43430
43431
43432
43433
43434
43435
43436
43437
43438
43439
43440
43441
43442
43443
43444
43445
43446
43447
43448
43449
43450
43451
43452
43453
43454
43455
43456
43457
43458
43459
43460
43461
43462
43463
43464
43465
43466
43467
43468
43469
43470
43471
43472
43473
43474
43475
43476
43477
43478
43479
43480
43481
43482
43483
43484
43485
43486
43487
43488
43489
43490
43491
43492
43493
43494
43495
43496
43497
43498
43499
43500
43501
43502
43503
43504
43505
43506
43507
43508
43509
43510
43511
43512
43513
43514
43515
43516
43517
43518
43519
43520
43521
43522
43523
43524
43525
43526
43527
43528
43529
43530
43531
43532
43533
43534
43535
43536
43537
43538
43539
43540
43541
43542
43543
43544
43545
43546
43547
43548
43549
43550
43551
43552
43553
43554
43555
43556
43557
43558
43559
43560
43561
43562
43563
43564
43565
43566
43567
43568
43569
43570
43571
43572
43573
43574
43575
43576
43577
43578
43579
43580
43581
43582
43583
43584
43585
43586
43587
43588
43589
43590
43591
43592
43593
43594
43595
43596
43597
43598
43599
43600
43601
43602
43603
43604
43605
43606
43607
43608
43609
43610
43611
43612
43613
43614
43615
43616
43617
43618
43619
43620
43621
43622
43623
43624
43625
43626
43627
43628
43629
43630
43631
43632
43633
43634
43635
43636
43637
43638
43639
43640
43641
43642
43643
43644
43645
43646
43647
43648
43649
43650
43651
43652
43653
43654
43655
43656
43657
43658
43659
43660
43661
43662
43663
43664
43665
43666
43667
43668
43669
43670
43671
43672
43673
43674
43675
43676
43677
43678
43679
43680
43681
43682
43683
43684
43685
43686
43687
43688
43689
43690
43691
43692
43693
43694
43695
43696
43697
43698
43699
43700
43701
43702
43703
43704
43705
43706
43707
43708
43709
43710
43711
43712
43713
43714
43715
43716
43717
43718
43719
43720
43721
43722
43723
43724
43725
43726
43727
43728
43729
43730
43731
43732
43733
43734
43735
43736
43737
43738
43739
43740
43741
43742
43743
43744
43745
43746
43747
43748
43749
43750
43751
43752
43753
43754
43755
43756
43757
43758
43759
43760
43761
43762
43763
43764
43765
43766
43767
43768
43769
43770
43771
43772
43773
43774
43775
43776
43777
43778
43779
43780
43781
43782
43783
43784
43785
43786
43787
43788
43789
43790
43791
43792
43793
43794
43795
43796
43797
43798
43799
43800
43801
43802
43803
43804
43805
43806
43807
43808
43809
43810
43811
43812
43813
43814
43815
43816
43817
43818
43819
43820
43821
43822
43823
43824
43825
43826
43827
43828
43829
43830
43831
43832
43833
43834
43835
43836
43837
43838
43839
43840
43841
43842
43843
43844
43845
43846
43847
43848
43849
43850
43851
43852
43853
43854
43855
43856
43857
43858
43859
43860
43861
43862
43863
43864
43865
43866
43867
43868
43869
43870
43871
43872
43873
43874
43875
43876
43877
43878
43879
43880
43881
43882
43883
43884
43885
43886
43887
43888
43889
43890
43891
43892
43893
43894
43895
43896
43897
43898
43899
43900
43901
43902
43903
43904
43905
43906
43907
43908
43909
43910
43911
43912
43913
43914
43915
43916
43917
43918
43919
43920
43921
43922
43923
43924
43925
43926
43927
43928
43929
43930
43931
43932
43933
43934
43935
43936
43937
43938
43939
43940
43941
43942
43943
43944
43945
43946
43947
43948
43949
43950
43951
43952
43953
43954
43955
43956
43957
43958
43959
43960
43961
43962
43963
43964
43965
43966
43967
43968
43969
43970
43971
43972
43973
43974
43975
43976
43977
43978
43979
43980
43981
43982
43983
43984
43985
43986
43987
43988
43989
43990
43991
43992
43993
43994
43995
43996
43997
43998
43999
44000
44001
44002
44003
44004
44005
44006
44007
44008
44009
44010
44011
44012
44013
44014
44015
44016
44017
44018
44019
44020
44021
44022
44023
44024
44025
44026
44027
44028
44029
44030
44031
44032
44033
44034
44035
44036
44037
44038
44039
44040
44041
44042
44043
44044
44045
44046
44047
44048
44049
44050
44051
44052
44053
44054
44055
44056
44057
44058
44059
44060
44061
44062
44063
44064
44065
44066
44067
44068
44069
44070
44071
44072
44073
44074
44075
44076
44077
44078
44079
44080
44081
44082
44083
44084
44085
44086
44087
44088
44089
44090
44091
44092
44093
44094
44095
44096
44097
44098
44099
44100
44101
44102
44103
44104
44105
44106
44107
44108
44109
44110
44111
44112
44113
44114
44115
44116
44117
44118
44119
44120
44121
44122
44123
44124
44125
44126
44127
44128
44129
44130
44131
44132
44133
44134
44135
44136
44137
44138
44139
44140
44141
44142
44143
44144
44145
44146
44147
44148
44149
44150
44151
44152
44153
44154
44155
44156
44157
44158
44159
44160
44161
44162
44163
44164
44165
44166
44167
44168
44169
44170
44171
44172
44173
44174
44175
44176
44177
44178
44179
44180
44181
44182
44183
44184
44185
44186
44187
44188
44189
44190
44191
44192
44193
44194
44195
44196
44197
44198
44199
44200
44201
44202
44203
44204
44205
44206
44207
44208
44209
44210
44211
44212
44213
44214
44215
44216
44217
44218
44219
44220
44221
44222
44223
44224
44225
44226
44227
44228
44229
44230
44231
44232
44233
44234
44235
44236
44237
44238
44239
44240
44241
44242
44243
44244
44245
44246
44247
44248
44249
44250
44251
44252
44253
44254
44255
44256
44257
44258
44259
44260
44261
44262
44263
44264
44265
44266
44267
44268
44269
44270
44271
44272
44273
44274
44275
44276
44277
44278
44279
44280
44281
44282
44283
44284
44285
44286
44287
44288
44289
44290
44291
44292
44293
44294
44295
44296
44297
44298
44299
44300
44301
44302
44303
44304
44305
44306
44307
44308
44309
44310
44311
44312
44313
44314
44315
44316
44317
44318
44319
44320
44321
44322
44323
44324
44325
44326
44327
44328
44329
44330
44331
44332
44333
44334
44335
44336
44337
44338
44339
44340
44341
44342
44343
44344
44345
44346
44347
44348
44349
44350
44351
44352
44353
44354
44355
44356
44357
44358
44359
44360
44361
44362
44363
44364
44365
44366
44367
44368
44369
44370
44371
44372
44373
44374
44375
44376
44377
44378
44379
44380
44381
44382
44383
44384
44385
44386
44387
44388
44389
44390
44391
44392
44393
44394
44395
44396
44397
44398
44399
44400
44401
44402
44403
44404
44405
44406
44407
44408
44409
44410
44411
44412
44413
44414
44415
44416
44417
44418
44419
44420
44421
44422
44423
44424
44425
44426
44427
44428
44429
44430
44431
44432
44433
44434
44435
44436
44437
44438
44439
44440
44441
44442
44443
44444
44445
44446
44447
44448
44449
44450
44451
44452
44453
44454
44455
44456
44457
44458
44459
44460
44461
44462
44463
44464
44465
44466
44467
44468
44469
44470
44471
44472
44473
44474
44475
44476
44477
44478
44479
44480
44481
44482
44483
44484
44485
44486
44487
44488
44489
44490
44491
44492
44493
44494
44495
44496
44497
44498
44499
44500
44501
44502
44503
44504
44505
44506
44507
44508
44509
44510
44511
44512
44513
44514
44515
44516
44517
44518
44519
44520
44521
44522
44523
44524
44525
44526
44527
44528
44529
44530
44531
44532
44533
44534
44535
44536
44537
44538
44539
44540
44541
44542
44543
44544
44545
44546
44547
44548
44549
44550
44551
44552
44553
44554
44555
44556
44557
44558
44559
44560
44561
44562
44563
44564
44565
44566
44567
44568
44569
44570
44571
44572
44573
44574
44575
44576
44577
44578
44579
44580
44581
44582
44583
44584
44585
44586
44587
44588
44589
44590
44591
44592
44593
44594
44595
44596
44597
44598
44599
44600
44601
44602
44603
44604
44605
44606
44607
44608
44609
44610
44611
44612
44613
44614
44615
44616
44617
44618
44619
44620
44621
44622
44623
44624
44625
44626
44627
44628
44629
44630
44631
44632
44633
44634
44635
44636
44637
44638
44639
44640
44641
44642
44643
44644
44645
44646
44647
44648
44649
44650
44651
44652
44653
44654
44655
44656
44657
44658
44659
44660
44661
44662
44663
44664
44665
44666
44667
44668
44669
44670
44671
44672
44673
44674
44675
44676
44677
44678
44679
44680
44681
44682
44683
44684
44685
44686
44687
44688
44689
44690
44691
44692
44693
44694
44695
44696
44697
44698
44699
44700
44701
44702
44703
44704
44705
44706
44707
44708
44709
44710
44711
44712
44713
44714
44715
44716
44717
44718
44719
44720
44721
44722
44723
44724
44725
44726
44727
44728
44729
44730
44731
44732
44733
44734
44735
44736
44737
44738
44739
44740
44741
44742
44743
44744
44745
44746
44747
44748
44749
44750
44751
44752
44753
44754
44755
44756
44757
44758
44759
44760
44761
44762
44763
44764
44765
44766
44767
44768
44769
44770
44771
44772
44773
44774
44775
44776
44777
44778
44779
44780
44781
44782
44783
44784
44785
44786
44787
44788
44789
44790
44791
44792
44793
44794
44795
44796
44797
44798
44799
44800
44801
44802
44803
44804
44805
44806
44807
44808
44809
44810
44811
44812
44813
44814
44815
44816
44817
44818
44819
44820
44821
44822
44823
44824
44825
44826
44827
44828
44829
44830
44831
44832
44833
44834
44835
44836
44837
44838
44839
44840
44841
44842
44843
44844
44845
44846
44847
44848
44849
44850
44851
44852
44853
44854
44855
44856
44857
44858
44859
44860
44861
44862
44863
44864
44865
44866
44867
44868
44869
44870
44871
44872
44873
44874
44875
44876
44877
44878
44879
44880
44881
44882
44883
44884
44885
44886
44887
44888
44889
44890
44891
44892
44893
44894
44895
44896
44897
44898
44899
44900
44901
44902
44903
44904
44905
44906
44907
44908
44909
44910
44911
44912
44913
44914
44915
44916
44917
44918
44919
44920
44921
44922
44923
44924
44925
44926
44927
44928
44929
44930
44931
44932
44933
44934
44935
44936
44937
44938
44939
44940
44941
44942
44943
44944
44945
44946
44947
44948
44949
44950
44951
44952
44953
44954
44955
44956
44957
44958
44959
44960
44961
44962
44963
44964
44965
44966
44967
44968
44969
44970
44971
44972
44973
44974
44975
44976
44977
44978
44979
44980
44981
44982
44983
44984
44985
44986
44987
44988
44989
44990
44991
44992
44993
44994
44995
44996
44997
44998
44999
45000
45001
45002
45003
45004
45005
45006
45007
45008
45009
45010
45011
45012
45013
45014
45015
45016
45017
45018
45019
45020
45021
45022
45023
45024
45025
45026
45027
45028
45029
45030
45031
45032
45033
45034
45035
45036
45037
45038
45039
45040
45041
45042
45043
45044
45045
45046
45047
45048
45049
45050
45051
45052
45053
45054
45055
45056
45057
45058
45059
45060
45061
45062
45063
45064
45065
45066
45067
45068
45069
45070
45071
45072
45073
45074
45075
45076
45077
45078
45079
45080
45081
45082
45083
45084
45085
45086
45087
45088
45089
45090
45091
45092
45093
45094
45095
45096
45097
45098
45099
45100
45101
45102
45103
45104
45105
45106
45107
45108
45109
45110
45111
45112
45113
45114
45115
45116
45117
45118
45119
45120
45121
45122
45123
45124
45125
45126
45127
45128
45129
45130
45131
45132
45133
45134
45135
45136
45137
45138
45139
45140
45141
45142
45143
45144
45145
45146
45147
45148
45149
45150
45151
45152
45153
45154
45155
45156
45157
45158
45159
45160
45161
45162
45163
45164
45165
45166
45167
45168
45169
45170
45171
45172
45173
45174
45175
45176
45177
45178
45179
45180
45181
45182
45183
45184
45185
45186
45187
45188
45189
45190
45191
45192
45193
45194
45195
45196
45197
45198
45199
45200
45201
45202
45203
45204
45205
45206
45207
45208
45209
45210
45211
45212
45213
45214
45215
45216
45217
45218
45219
45220
45221
45222
45223
45224
45225
45226
45227
45228
45229
45230
45231
45232
45233
45234
45235
45236
45237
45238
45239
45240
45241
45242
45243
45244
45245
45246
45247
45248
45249
45250
45251
45252
45253
45254
45255
45256
45257
45258
45259
45260
45261
45262
45263
45264
45265
45266
45267
45268
45269
45270
45271
45272
45273
45274
45275
45276
45277
45278
45279
45280
45281
45282
45283
45284
45285
45286
45287
45288
45289
45290
45291
45292
45293
45294
45295
45296
45297
45298
45299
45300
45301
45302
45303
45304
45305
45306
45307
45308
45309
45310
45311
45312
45313
45314
45315
45316
45317
45318
45319
45320
45321
45322
45323
45324
45325
45326
45327
45328
45329
45330
45331
45332
45333
45334
45335
45336
45337
45338
45339
45340
45341
45342
45343
45344
45345
45346
45347
45348
45349
45350
45351
45352
45353
45354
45355
45356
45357
45358
45359
45360
45361
45362
45363
45364
45365
45366
45367
45368
45369
45370
45371
45372
45373
45374
45375
45376
45377
45378
45379
45380
45381
45382
45383
45384
45385
45386
45387
45388
45389
45390
45391
45392
45393
45394
45395
45396
45397
45398
45399
45400
45401
45402
45403
45404
45405
45406
45407
45408
45409
45410
45411
45412
45413
45414
45415
45416
45417
45418
45419
45420
45421
45422
45423
45424
45425
45426
45427
45428
45429
45430
45431
45432
45433
45434
45435
45436
45437
45438
45439
45440
45441
45442
45443
45444
45445
45446
45447
45448
45449
45450
45451
45452
45453
45454
45455
45456
45457
45458
45459
45460
45461
45462
45463
45464
45465
45466
45467
45468
45469
45470
45471
45472
45473
45474
45475
45476
45477
45478
45479
45480
45481
45482
45483
45484
45485
45486
45487
45488
45489
45490
45491
45492
45493
45494
45495
45496
45497
45498
45499
45500
45501
45502
45503
45504
45505
45506
45507
45508
45509
45510
45511
45512
45513
45514
45515
45516
45517
45518
45519
45520
45521
45522
45523
45524
45525
45526
45527
45528
45529
45530
45531
45532
45533
45534
45535
45536
45537
45538
45539
45540
45541
45542
45543
45544
45545
45546
45547
45548
45549
45550
45551
45552
45553
45554
45555
45556
45557
45558
45559
45560
45561
45562
45563
45564
45565
45566
45567
45568
45569
45570
45571
45572
45573
45574
45575
45576
45577
45578
45579
45580
45581
45582
45583
45584
45585
45586
45587
45588
45589
45590
45591
45592
45593
45594
45595
45596
45597
45598
45599
45600
45601
45602
45603
45604
45605
45606
45607
45608
45609
45610
45611
45612
45613
45614
45615
45616
45617
45618
45619
45620
45621
45622
45623
45624
45625
45626
45627
45628
45629
45630
45631
45632
45633
45634
45635
45636
45637
45638
45639
45640
45641
45642
45643
45644
45645
45646
45647
45648
45649
45650
45651
45652
45653
45654
45655
45656
45657
45658
45659
45660
45661
45662
45663
45664
45665
45666
45667
45668
45669
45670
45671
45672
45673
45674
45675
45676
45677
45678
45679
45680
45681
45682
45683
45684
45685
45686
45687
45688
45689
45690
45691
45692
45693
45694
45695
45696
45697
45698
45699
45700
45701
45702
45703
45704
45705
45706
45707
45708
45709
45710
45711
45712
45713
45714
45715
45716
45717
45718
45719
45720
45721
45722
45723
45724
45725
45726
45727
45728
45729
45730
45731
45732
45733
45734
45735
45736
45737
45738
45739
45740
45741
45742
45743
45744
45745
45746
45747
45748
45749
45750
45751
45752
45753
45754
45755
45756
45757
45758
45759
45760
45761
45762
45763
45764
45765
45766
45767
45768
45769
45770
45771
45772
45773
45774
45775
45776
45777
45778
45779
45780
45781
45782
45783
45784
45785
45786
45787
45788
45789
45790
45791
45792
45793
45794
45795
45796
45797
45798
45799
45800
45801
45802
45803
45804
45805
45806
45807
45808
45809
45810
45811
45812
45813
45814
45815
45816
45817
45818
45819
45820
45821
45822
45823
45824
45825
45826
45827
45828
45829
45830
45831
45832
45833
45834
45835
45836
45837
45838
45839
45840
45841
45842
45843
45844
45845
45846
45847
45848
45849
45850
45851
45852
45853
45854
45855
45856
45857
45858
45859
45860
45861
45862
45863
45864
45865
45866
45867
45868
45869
45870
45871
45872
45873
45874
45875
45876
45877
45878
45879
45880
45881
45882
45883
45884
45885
45886
45887
45888
45889
45890
45891
45892
45893
45894
45895
45896
45897
45898
45899
45900
45901
45902
45903
45904
45905
45906
45907
45908
45909
45910
45911
45912
45913
45914
45915
45916
45917
45918
45919
45920
45921
45922
45923
45924
45925
45926
45927
45928
45929
45930
45931
45932
45933
45934
45935
45936
45937
45938
45939
45940
45941
45942
45943
45944
45945
45946
45947
45948
45949
45950
45951
45952
45953
45954
45955
45956
45957
45958
45959
45960
45961
45962
45963
45964
45965
45966
45967
45968
45969
45970
45971
45972
45973
45974
45975
45976
45977
45978
45979
45980
45981
45982
45983
45984
45985
45986
45987
45988
45989
45990
45991
45992
45993
45994
45995
45996
45997
45998
45999
46000
46001
46002
46003
46004
46005
46006
46007
46008
46009
46010
46011
46012
46013
46014
46015
46016
46017
46018
46019
46020
46021
46022
46023
46024
46025
46026
46027
46028
46029
46030
46031
46032
46033
46034
46035
46036
46037
46038
46039
46040
46041
46042
46043
46044
46045
46046
46047
46048
46049
46050
46051
46052
46053
46054
46055
46056
46057
46058
46059
46060
46061
46062
46063
46064
46065
46066
46067
46068
46069
46070
46071
46072
46073
46074
46075
46076
46077
46078
46079
46080
46081
46082
46083
46084
46085
46086
46087
46088
46089
46090
46091
46092
46093
46094
46095
46096
46097
46098
46099
46100
46101
46102
46103
46104
46105
46106
46107
46108
46109
46110
46111
46112
46113
46114
46115
46116
46117
46118
46119
46120
46121
46122
46123
46124
46125
46126
46127
46128
46129
46130
46131
46132
46133
46134
46135
46136
46137
46138
46139
46140
46141
46142
46143
46144
46145
46146
46147
46148
46149
46150
46151
46152
46153
46154
46155
46156
46157
46158
46159
46160
46161
46162
46163
46164
46165
46166
46167
46168
46169
46170
46171
46172
46173
46174
46175
46176
46177
46178
46179
46180
46181
46182
46183
46184
46185
46186
46187
46188
46189
46190
46191
46192
46193
46194
46195
46196
46197
46198
46199
46200
46201
46202
46203
46204
46205
46206
46207
46208
46209
46210
46211
46212
46213
46214
46215
46216
46217
46218
46219
46220
46221
46222
46223
46224
46225
46226
46227
46228
46229
46230
46231
46232
46233
46234
46235
46236
46237
46238
46239
46240
46241
46242
46243
46244
46245
46246
46247
46248
46249
46250
46251
46252
46253
46254
46255
46256
46257
46258
46259
46260
46261
46262
46263
46264
46265
46266
46267
46268
46269
46270
46271
46272
46273
46274
46275
46276
46277
46278
46279
46280
46281
46282
46283
46284
46285
46286
46287
46288
46289
46290
46291
46292
46293
46294
46295
46296
46297
46298
46299
46300
46301
46302
46303
46304
46305
46306
46307
46308
46309
46310
46311
46312
46313
46314
46315
46316
46317
46318
46319
46320
46321
46322
46323
46324
46325
46326
46327
46328
46329
46330
46331
46332
46333
46334
46335
46336
46337
46338
46339
46340
46341
46342
46343
46344
46345
46346
46347
46348
46349
46350
46351
46352
46353
46354
46355
46356
46357
46358
46359
46360
46361
46362
46363
46364
46365
46366
46367
46368
46369
46370
46371
46372
46373
46374
46375
46376
46377
46378
46379
46380
46381
46382
46383
46384
46385
46386
46387
46388
46389
46390
46391
46392
46393
46394
46395
46396
46397
46398
46399
46400
46401
46402
46403
46404
46405
46406
46407
46408
46409
46410
46411
46412
46413
46414
46415
46416
46417
46418
46419
46420
46421
46422
46423
46424
46425
46426
46427
46428
46429
46430
46431
46432
46433
46434
46435
46436
46437
46438
46439
46440
46441
46442
46443
46444
46445
46446
46447
46448
46449
46450
46451
46452
46453
46454
46455
46456
46457
46458
46459
46460
46461
46462
46463
46464
46465
46466
46467
46468
46469
46470
46471
46472
46473
46474
46475
46476
46477
46478
46479
46480
46481
46482
46483
46484
46485
46486
46487
46488
46489
46490
46491
46492
46493
46494
46495
46496
46497
46498
46499
46500
46501
46502
46503
46504
46505
46506
46507
46508
46509
46510
46511
46512
46513
46514
46515
46516
46517
46518
46519
46520
46521
46522
46523
46524
46525
46526
46527
46528
46529
46530
46531
46532
46533
46534
46535
46536
46537
46538
46539
46540
46541
46542
46543
46544
46545
46546
46547
46548
46549
46550
46551
46552
46553
46554
46555
46556
46557
46558
46559
46560
46561
46562
46563
46564
46565
46566
46567
46568
46569
46570
46571
46572
46573
46574
46575
46576
46577
46578
46579
46580
46581
46582
46583
46584
46585
46586
46587
46588
46589
46590
46591
46592
46593
46594
46595
46596
46597
46598
46599
46600
46601
46602
46603
46604
46605
46606
46607
46608
46609
46610
46611
46612
46613
46614
46615
46616
46617
46618
46619
46620
46621
46622
46623
46624
46625
46626
46627
46628
46629
46630
46631
46632
46633
46634
46635
46636
46637
46638
46639
46640
46641
46642
46643
46644
46645
46646
46647
46648
46649
46650
46651
46652
46653
46654
46655
46656
46657
46658
46659
46660
46661
46662
46663
46664
46665
46666
46667
46668
46669
46670
46671
46672
46673
46674
46675
46676
46677
46678
46679
46680
46681
46682
46683
46684
46685
46686
46687
46688
46689
46690
46691
46692
46693
46694
46695
46696
46697
46698
46699
46700
46701
46702
46703
46704
46705
46706
46707
46708
46709
46710
46711
46712
46713
46714
46715
46716
46717
46718
46719
46720
46721
46722
46723
46724
46725
46726
46727
46728
46729
46730
46731
46732
46733
46734
46735
46736
46737
46738
46739
46740
46741
46742
46743
46744
46745
46746
46747
46748
46749
46750
46751
46752
46753
46754
46755
46756
46757
46758
46759
46760
46761
46762
46763
46764
46765
46766
46767
46768
46769
46770
46771
46772
46773
46774
46775
46776
46777
46778
46779
46780
46781
46782
46783
46784
46785
46786
46787
46788
46789
46790
46791
46792
46793
46794
46795
46796
46797
46798
46799
46800
46801
46802
46803
46804
46805
46806
46807
46808
46809
46810
46811
46812
46813
46814
46815
46816
46817
46818
46819
46820
46821
46822
46823
46824
46825
46826
46827
46828
46829
46830
46831
46832
46833
46834
46835
46836
46837
46838
46839
46840
46841
46842
46843
46844
46845
46846
46847
46848
46849
46850
46851
46852
46853
46854
46855
46856
46857
46858
46859
46860
46861
46862
46863
46864
46865
46866
46867
46868
46869
46870
46871
46872
46873
46874
46875
46876
46877
46878
46879
46880
46881
46882
46883
46884
46885
46886
46887
46888
46889
46890
46891
46892
46893
46894
46895
46896
46897
46898
46899
46900
46901
46902
46903
46904
46905
46906
46907
46908
46909
46910
46911
46912
46913
46914
46915
46916
46917
46918
46919
46920
46921
46922
46923
46924
46925
46926
46927
46928
46929
46930
46931
46932
46933
46934
46935
46936
46937
46938
46939
46940
46941
46942
46943
46944
46945
46946
46947
46948
46949
46950
46951
46952
46953
46954
46955
46956
46957
46958
46959
46960
46961
46962
46963
46964
46965
46966
46967
46968
46969
46970
46971
46972
46973
46974
46975
46976
46977
46978
46979
46980
46981
46982
46983
46984
46985
46986
46987
46988
46989
46990
46991
46992
46993
46994
46995
46996
46997
46998
46999
47000
47001
47002
47003
47004
47005
47006
47007
47008
47009
47010
47011
47012
47013
47014
47015
47016
47017
47018
47019
47020
47021
47022
47023
47024
47025
47026
47027
47028
47029
47030
47031
47032
47033
47034
47035
47036
47037
47038
47039
47040
47041
47042
47043
47044
47045
47046
47047
47048
47049
47050
47051
47052
47053
47054
47055
47056
47057
47058
47059
47060
47061
47062
47063
47064
47065
47066
47067
47068
47069
47070
47071
47072
47073
47074
47075
47076
47077
47078
47079
47080
47081
47082
47083
47084
47085
47086
47087
47088
47089
47090
47091
47092
47093
47094
47095
47096
47097
47098
47099
47100
47101
47102
47103
47104
47105
47106
47107
47108
47109
47110
47111
47112
47113
47114
47115
47116
47117
47118
47119
47120
47121
47122
47123
47124
47125
47126
47127
47128
47129
47130
47131
47132
47133
47134
47135
47136
47137
47138
47139
47140
47141
47142
47143
47144
47145
47146
47147
47148
47149
47150
47151
47152
47153
47154
47155
47156
47157
47158
47159
47160
47161
47162
47163
47164
47165
47166
47167
47168
47169
47170
47171
47172
47173
47174
47175
47176
47177
47178
47179
47180
47181
47182
47183
47184
47185
47186
47187
47188
47189
47190
47191
47192
47193
47194
47195
47196
47197
47198
47199
47200
47201
47202
47203
47204
47205
47206
47207
47208
47209
47210
47211
47212
47213
47214
47215
47216
47217
47218
47219
47220
47221
47222
47223
47224
47225
47226
47227
47228
47229
47230
47231
47232
47233
47234
47235
47236
47237
47238
47239
47240
47241
47242
47243
47244
47245
47246
47247
47248
47249
47250
47251
47252
47253
47254
47255
47256
47257
47258
47259
47260
47261
47262
47263
47264
47265
47266
47267
47268
47269
47270
47271
47272
47273
47274
47275
47276
47277
47278
47279
47280
47281
47282
47283
47284
47285
47286
47287
47288
47289
47290
47291
47292
47293
47294
47295
47296
47297
47298
47299
47300
47301
47302
47303
47304
47305
47306
47307
47308
47309
47310
47311
47312
47313
47314
47315
47316
47317
47318
47319
47320
47321
47322
47323
47324
47325
47326
47327
47328
47329
47330
47331
47332
47333
47334
47335
47336
47337
47338
47339
47340
47341
47342
47343
47344
47345
47346
47347
47348
47349
47350
47351
47352
47353
47354
47355
47356
47357
47358
47359
47360
47361
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393
47394
47395
47396
47397
47398
47399
47400
47401
47402
47403
47404
47405
47406
47407
47408
47409
47410
47411
47412
47413
47414
47415
47416
47417
47418
47419
47420
47421
47422
47423
47424
47425
47426
47427
47428
47429
47430
47431
47432
47433
47434
47435
47436
47437
47438
47439
47440
47441
47442
47443
47444
47445
47446
47447
47448
47449
47450
47451
47452
47453
47454
47455
47456
47457
47458
47459
47460
47461
47462
47463
47464
47465
47466
47467
47468
47469
47470
47471
47472
47473
47474
47475
47476
47477
47478
47479
47480
47481
47482
47483
47484
47485
47486
47487
47488
47489
47490
47491
47492
47493
47494
47495
47496
47497
47498
47499
47500
47501
47502
47503
47504
47505
47506
47507
47508
47509
47510
47511
47512
47513
47514
47515
47516
47517
47518
47519
47520
47521
47522
47523
47524
47525
47526
47527
47528
47529
47530
47531
47532
47533
47534
47535
47536
47537
47538
47539
47540
47541
47542
47543
47544
47545
47546
47547
47548
47549
47550
47551
47552
47553
47554
47555
47556
47557
47558
47559
47560
47561
47562
47563
47564
47565
47566
47567
47568
47569
47570
47571
47572
47573
47574
47575
47576
47577
47578
47579
47580
47581
47582
47583
47584
47585
47586
47587
47588
47589
47590
47591
47592
47593
47594
47595
47596
47597
47598
47599
47600
47601
47602
47603
47604
47605
47606
47607
47608
47609
47610
47611
47612
47613
47614
47615
47616
47617
47618
47619
47620
47621
47622
47623
47624
47625
47626
47627
47628
47629
47630
47631
47632
47633
47634
47635
47636
47637
47638
47639
47640
47641
47642
47643
47644
47645
47646
47647
47648
47649
47650
47651
47652
47653
47654
47655
47656
47657
47658
47659
47660
47661
47662
47663
47664
47665
47666
47667
47668
47669
47670
47671
47672
47673
47674
47675
47676
47677
47678
47679
47680
47681
47682
47683
47684
47685
47686
47687
47688
47689
47690
47691
47692
47693
47694
47695
47696
47697
47698
47699
47700
47701
47702
47703
47704
47705
47706
47707
47708
47709
47710
47711
47712
47713
47714
47715
47716
47717
47718
47719
47720
47721
47722
47723
47724
47725
47726
47727
47728
47729
47730
47731
47732
47733
47734
47735
47736
47737
47738
47739
47740
47741
47742
47743
47744
47745
47746
47747
47748
47749
47750
47751
47752
47753
47754
47755
47756
47757
47758
47759
47760
47761
47762
47763
47764
47765
47766
47767
47768
47769
47770
47771
47772
47773
47774
47775
47776
47777
47778
47779
47780
47781
47782
47783
47784
47785
47786
47787
47788
47789
47790
47791
47792
47793
47794
47795
47796
47797
47798
47799
47800
47801
47802
47803
47804
47805
47806
47807
47808
47809
47810
47811
47812
47813
47814
47815
47816
47817
47818
47819
47820
47821
47822
47823
47824
47825
47826
47827
47828
47829
47830
47831
47832
47833
47834
47835
47836
47837
47838
47839
47840
47841
47842
47843
47844
47845
47846
47847
47848
47849
47850
47851
47852
47853
47854
47855
47856
47857
47858
47859
47860
47861
47862
47863
47864
47865
47866
47867
47868
47869
47870
47871
47872
47873
47874
47875
47876
47877
47878
47879
47880
47881
47882
47883
47884
47885
47886
47887
47888
47889
47890
47891
47892
47893
47894
47895
47896
47897
47898
47899
47900
47901
47902
47903
47904
47905
47906
47907
47908
47909
47910
47911
47912
47913
47914
47915
47916
47917
47918
47919
47920
47921
47922
47923
47924
47925
47926
47927
47928
47929
47930
47931
47932
47933
47934
47935
47936
47937
47938
47939
47940
47941
47942
47943
47944
47945
47946
47947
47948
47949
47950
47951
47952
47953
47954
47955
47956
47957
47958
47959
47960
47961
47962
47963
47964
47965
47966
47967
47968
47969
47970
47971
47972
47973
47974
47975
47976
47977
47978
47979
47980
47981
47982
47983
47984
47985
47986
47987
47988
47989
47990
47991
47992
47993
47994
47995
47996
47997
47998
47999
48000
48001
48002
48003
48004
48005
48006
48007
48008
48009
48010
48011
48012
48013
48014
48015
48016
48017
48018
48019
48020
48021
48022
48023
48024
48025
48026
48027
48028
48029
48030
48031
48032
48033
48034
48035
48036
48037
48038
48039
48040
48041
48042
48043
48044
48045
48046
48047
48048
48049
48050
48051
48052
48053
48054
48055
48056
48057
48058
48059
48060
48061
48062
48063
48064
48065
48066
48067
48068
48069
48070
48071
48072
48073
48074
48075
48076
48077
48078
48079
48080
48081
48082
48083
48084
48085
48086
48087
48088
48089
48090
48091
48092
48093
48094
48095
48096
48097
48098
48099
48100
48101
48102
48103
48104
48105
48106
48107
48108
48109
48110
48111
48112
48113
48114
48115
48116
48117
48118
48119
48120
48121
48122
48123
48124
48125
48126
48127
48128
48129
48130
48131
48132
48133
48134
48135
48136
48137
48138
48139
48140
48141
48142
48143
48144
48145
48146
48147
48148
48149
48150
48151
48152
48153
48154
48155
48156
48157
48158
48159
48160
48161
48162
48163
48164
48165
48166
48167
48168
48169
48170
48171
48172
48173
48174
48175
48176
48177
48178
48179
48180
48181
48182
48183
48184
48185
48186
48187
48188
48189
48190
48191
48192
48193
48194
48195
48196
48197
48198
48199
48200
48201
48202
48203
48204
48205
48206
48207
48208
48209
48210
48211
48212
48213
48214
48215
48216
48217
48218
48219
48220
48221
48222
48223
48224
48225
48226
48227
48228
48229
48230
48231
48232
48233
48234
48235
48236
48237
48238
48239
48240
48241
48242
48243
48244
48245
48246
48247
48248
48249
48250
48251
48252
48253
48254
48255
48256
48257
48258
48259
48260
48261
48262
48263
48264
48265
48266
48267
48268
48269
48270
48271
48272
48273
48274
48275
48276
48277
48278
48279
48280
48281
48282
48283
48284
48285
48286
48287
48288
48289
48290
48291
48292
48293
48294
48295
48296
48297
48298
48299
48300
48301
48302
48303
48304
48305
48306
48307
48308
48309
48310
48311
48312
48313
48314
48315
48316
48317
48318
48319
48320
48321
48322
48323
48324
48325
48326
48327
48328
48329
48330
48331
48332
48333
48334
48335
48336
48337
48338
48339
48340
48341
48342
48343
48344
48345
48346
48347
48348
48349
48350
48351
48352
48353
48354
48355
48356
48357
48358
48359
48360
48361
48362
48363
48364
48365
48366
48367
48368
48369
48370
48371
48372
48373
48374
48375
48376
48377
48378
48379
48380
48381
48382
48383
48384
48385
48386
48387
48388
48389
48390
48391
48392
48393
48394
48395
48396
48397
48398
48399
48400
48401
48402
48403
48404
48405
48406
48407
48408
48409
48410
48411
48412
48413
48414
48415
48416
48417
48418
48419
48420
48421
48422
48423
48424
48425
48426
48427
48428
48429
48430
48431
48432
48433
48434
48435
48436
48437
48438
48439
48440
48441
48442
48443
48444
48445
48446
48447
48448
48449
48450
48451
48452
48453
48454
48455
48456
48457
48458
48459
48460
48461
48462
48463
48464
48465
48466
48467
48468
48469
48470
48471
48472
48473
48474
48475
48476
48477
48478
48479
48480
48481
48482
48483
48484
48485
48486
48487
48488
48489
48490
48491
48492
48493
48494
48495
48496
48497
48498
48499
48500
48501
48502
48503
48504
48505
48506
48507
48508
48509
48510
48511
48512
48513
48514
48515
48516
48517
48518
48519
48520
48521
48522
48523
48524
48525
48526
48527
48528
48529
48530
48531
48532
48533
48534
48535
48536
48537
48538
48539
48540
48541
48542
48543
48544
48545
48546
48547
48548
48549
48550
48551
48552
48553
48554
48555
48556
48557
48558
48559
48560
48561
48562
48563
48564
48565
48566
48567
48568
48569
48570
48571
48572
48573
48574
48575
48576
48577
48578
48579
48580
48581
48582
48583
48584
48585
48586
48587
48588
48589
48590
48591
48592
48593
48594
48595
48596
48597
48598
48599
48600
48601
48602
48603
48604
48605
48606
48607
48608
48609
48610
48611
48612
48613
48614
48615
48616
48617
48618
48619
48620
48621
48622
48623
48624
48625
48626
48627
48628
48629
48630
48631
48632
48633
48634
48635
48636
48637
48638
48639
48640
48641
48642
48643
48644
48645
48646
48647
48648
48649
48650
48651
48652
48653
48654
48655
48656
48657
48658
48659
48660
48661
48662
48663
48664
48665
48666
48667
48668
48669
48670
48671
48672
48673
48674
48675
48676
48677
48678
48679
48680
48681
48682
48683
48684
48685
48686
48687
48688
48689
48690
48691
48692
48693
48694
48695
48696
48697
48698
48699
48700
48701
48702
48703
48704
48705
48706
48707
48708
48709
48710
48711
48712
48713
48714
48715
48716
48717
48718
48719
48720
48721
48722
48723
48724
48725
48726
48727
48728
48729
48730
48731
48732
48733
48734
48735
48736
48737
48738
48739
48740
48741
48742
48743
48744
48745
48746
48747
48748
48749
48750
48751
48752
48753
48754
48755
48756
48757
48758
48759
48760
48761
48762
48763
48764
48765
48766
48767
48768
48769
48770
48771
48772
48773
48774
48775
48776
48777
48778
48779
48780
48781
48782
48783
48784
48785
48786
48787
48788
48789
48790
48791
48792
48793
48794
48795
48796
48797
48798
48799
48800
48801
48802
48803
48804
48805
48806
48807
48808
48809
48810
48811
48812
48813
48814
48815
48816
48817
48818
48819
48820
48821
48822
48823
48824
48825
48826
48827
48828
48829
48830
48831
48832
48833
48834
48835
48836
48837
48838
48839
48840
48841
48842
48843
48844
48845
48846
48847
48848
48849
48850
48851
48852
48853
48854
48855
48856
48857
48858
48859
48860
48861
48862
48863
48864
48865
48866
48867
48868
48869
48870
48871
48872
48873
48874
48875
48876
48877
48878
48879
48880
48881
48882
48883
48884
48885
48886
48887
48888
48889
48890
48891
48892
48893
48894
48895
48896
48897
48898
48899
48900
48901
48902
48903
48904
48905
48906
48907
48908
48909
48910
48911
48912
48913
48914
48915
48916
48917
48918
48919
48920
48921
48922
48923
48924
48925
48926
48927
48928
48929
48930
48931
48932
48933
48934
48935
48936
48937
48938
48939
48940
48941
48942
48943
48944
48945
48946
48947
48948
48949
48950
48951
48952
48953
48954
48955
48956
48957
48958
48959
48960
48961
48962
48963
48964
48965
48966
48967
48968
48969
48970
48971
48972
48973
48974
48975
48976
48977
48978
48979
48980
48981
48982
48983
48984
48985
48986
48987
48988
48989
48990
48991
48992
48993
48994
48995
48996
48997
48998
48999
49000
49001
49002
49003
49004
49005
49006
49007
49008
49009
49010
49011
49012
49013
49014
49015
49016
49017
49018
49019
49020
49021
49022
49023
49024
49025
49026
49027
49028
49029
49030
49031
49032
49033
49034
49035
49036
49037
49038
49039
49040
49041
49042
49043
49044
49045
49046
49047
49048
49049
49050
49051
49052
49053
49054
49055
49056
49057
49058
49059
49060
49061
49062
49063
49064
49065
49066
49067
49068
49069
49070
49071
49072
49073
49074
49075
49076
49077
49078
49079
49080
49081
49082
49083
49084
49085
49086
49087
49088
49089
49090
49091
49092
49093
49094
49095
49096
49097
49098
49099
49100
49101
49102
49103
49104
49105
49106
49107
49108
49109
49110
49111
49112
49113
49114
49115
49116
49117
49118
49119
49120
49121
49122
49123
49124
49125
49126
49127
49128
49129
49130
49131
49132
49133
49134
49135
49136
49137
49138
49139
49140
49141
49142
49143
49144
49145
49146
49147
49148
49149
49150
49151
49152
49153
49154
49155
49156
49157
49158
49159
49160
49161
49162
49163
49164
49165
49166
49167
49168
49169
49170
49171
49172
49173
49174
49175
49176
49177
49178
49179
49180
49181
49182
49183
49184
49185
49186
49187
49188
49189
49190
49191
49192
49193
49194
49195
49196
49197
49198
49199
49200
49201
49202
49203
49204
49205
49206
49207
49208
49209
49210
49211
49212
49213
49214
49215
49216
49217
49218
49219
49220
49221
49222
49223
49224
49225
49226
49227
49228
49229
49230
49231
49232
49233
49234
49235
49236
49237
49238
49239
49240
49241
49242
49243
49244
49245
49246
49247
49248
49249
49250
49251
49252
49253
49254
49255
49256
49257
49258
49259
49260
49261
49262
49263
49264
49265
49266
49267
49268
49269
49270
49271
49272
49273
49274
49275
49276
49277
49278
49279
49280
49281
49282
49283
49284
49285
49286
49287
49288
49289
49290
49291
49292
49293
49294
49295
49296
49297
49298
49299
49300
49301
49302
49303
49304
49305
49306
49307
49308
49309
49310
49311
49312
49313
49314
49315
49316
49317
49318
49319
49320
49321
49322
49323
49324
49325
49326
49327
49328
49329
49330
49331
49332
49333
49334
49335
49336
49337
49338
49339
49340
49341
49342
49343
49344
49345
49346
49347
49348
49349
49350
49351
49352
49353
49354
49355
49356
49357
49358
49359
49360
49361
49362
49363
49364
49365
49366
49367
49368
49369
49370
49371
49372
49373
49374
49375
49376
49377
49378
49379
49380
49381
49382
49383
49384
49385
49386
49387
49388
49389
49390
49391
49392
49393
49394
49395
49396
49397
49398
49399
49400
49401
49402
49403
49404
49405
49406
49407
49408
49409
49410
49411
49412
49413
49414
49415
49416
49417
49418
49419
49420
49421
49422
49423
49424
49425
49426
49427
49428
49429
49430
49431
49432
49433
49434
49435
49436
49437
49438
49439
49440
49441
49442
49443
49444
49445
49446
49447
49448
49449
49450
49451
49452
49453
49454
49455
49456
49457
49458
49459
49460
49461
49462
49463
49464
49465
49466
49467
49468
49469
49470
49471
49472
49473
49474
49475
49476
49477
49478
49479
49480
49481
49482
49483
49484
49485
49486
49487
49488
49489
49490
49491
49492
49493
49494
49495
49496
49497
49498
49499
49500
49501
49502
49503
49504
49505
49506
49507
49508
49509
49510
49511
49512
49513
49514
49515
49516
49517
49518
49519
49520
49521
49522
49523
49524
49525
49526
49527
49528
49529
49530
49531
49532
49533
49534
49535
49536
49537
49538
49539
49540
49541
49542
49543
49544
49545
49546
49547
49548
49549
49550
49551
49552
49553
49554
49555
49556
49557
49558
49559
49560
49561
49562
49563
49564
49565
49566
49567
49568
49569
49570
49571
49572
49573
49574
49575
49576
49577
49578
49579
49580
49581
49582
49583
49584
49585
49586
49587
49588
49589
49590
49591
49592
49593
49594
49595
49596
49597
49598
49599
49600
49601
49602
49603
49604
49605
49606
49607
49608
49609
49610
49611
49612
49613
49614
49615
49616
49617
49618
49619
49620
49621
49622
49623
49624
49625
49626
49627
49628
49629
49630
49631
49632
49633
49634
49635
49636
49637
49638
49639
49640
49641
49642
49643
49644
49645
49646
49647
49648
49649
49650
49651
49652
49653
49654
49655
49656
49657
49658
49659
49660
49661
49662
49663
49664
49665
49666
49667
49668
49669
49670
49671
49672
49673
49674
49675
49676
49677
49678
49679
49680
49681
49682
49683
49684
49685
49686
49687
49688
49689
49690
49691
49692
49693
49694
49695
49696
49697
49698
49699
49700
49701
49702
49703
49704
49705
49706
49707
49708
49709
49710
49711
49712
49713
49714
49715
49716
49717
49718
49719
49720
49721
49722
49723
49724
49725
49726
49727
49728
49729
49730
49731
49732
49733
49734
49735
49736
49737
49738
49739
49740
49741
49742
49743
49744
49745
49746
49747
49748
49749
49750
49751
49752
49753
49754
49755
49756
49757
49758
49759
49760
49761
49762
49763
49764
49765
49766
49767
49768
49769
49770
49771
49772
49773
49774
49775
49776
49777
49778
49779
49780
49781
49782
49783
49784
49785
49786
49787
49788
49789
49790
49791
49792
49793
49794
49795
49796
49797
49798
49799
49800
49801
49802
49803
49804
49805
49806
49807
49808
49809
49810
49811
49812
49813
49814
49815
49816
49817
49818
49819
49820
49821
49822
49823
49824
49825
49826
49827
49828
49829
49830
49831
49832
49833
49834
49835
49836
49837
49838
49839
49840
49841
49842
49843
49844
49845
49846
49847
49848
49849
49850
49851
49852
49853
49854
49855
49856
49857
49858
49859
49860
49861
49862
49863
49864
49865
49866
49867
49868
49869
49870
49871
49872
49873
49874
49875
49876
49877
49878
49879
49880
49881
49882
49883
49884
49885
49886
49887
49888
49889
49890
49891
49892
49893
49894
49895
49896
49897
49898
49899
49900
49901
49902
49903
49904
49905
49906
49907
49908
49909
49910
49911
49912
49913
49914
49915
49916
49917
49918
49919
49920
49921
49922
49923
49924
49925
49926
49927
49928
49929
49930
49931
49932
49933
49934
49935
49936
49937
49938
49939
49940
49941
49942
49943
49944
49945
49946
49947
49948
49949
49950
49951
49952
49953
49954
49955
49956
49957
49958
49959
49960
49961
49962
49963
49964
49965
49966
49967
49968
49969
49970
49971
49972
49973
49974
49975
49976
49977
49978
49979
49980
49981
49982
49983
49984
49985
49986
49987
49988
49989
49990
49991
49992
49993
49994
49995
49996
49997
49998
49999
50000
50001
50002
50003
50004
50005
50006
50007
50008
50009
50010
50011
50012
50013
50014
50015
50016
50017
50018
50019
50020
50021
50022
50023
50024
50025
50026
50027
50028
50029
50030
50031
50032
50033
50034
50035
50036
50037
50038
50039
50040
50041
50042
50043
50044
50045
50046
50047
50048
50049
50050
50051
50052
50053
50054
50055
50056
50057
50058
50059
50060
50061
50062
50063
50064
50065
50066
50067
50068
50069
50070
50071
50072
50073
50074
50075
50076
50077
50078
50079
50080
50081
50082
50083
50084
50085
50086
50087
50088
50089
50090
50091
50092
50093
50094
50095
50096
50097
50098
50099
50100
50101
50102
50103
50104
50105
50106
50107
50108
50109
50110
50111
50112
50113
50114
50115
50116
50117
50118
50119
50120
50121
50122
50123
50124
50125
50126
50127
50128
50129
50130
50131
50132
50133
50134
50135
50136
50137
50138
50139
50140
50141
50142
50143
50144
50145
50146
50147
50148
50149
50150
50151
50152
50153
50154
50155
50156
50157
50158
50159
50160
50161
50162
50163
50164
50165
50166
50167
50168
50169
50170
50171
50172
50173
50174
50175
50176
50177
50178
50179
50180
50181
50182
50183
50184
50185
50186
50187
50188
50189
50190
50191
50192
50193
50194
50195
50196
50197
50198
50199
50200
50201
50202
50203
50204
50205
50206
50207
50208
50209
50210
50211
50212
50213
50214
50215
50216
50217
50218
50219
50220
50221
50222
50223
50224
50225
50226
50227
50228
50229
50230
50231
50232
50233
50234
50235
50236
50237
50238
50239
50240
50241
50242
50243
50244
50245
50246
50247
50248
50249
50250
50251
50252
50253
50254
50255
50256
50257
50258
50259
50260
50261
50262
50263
50264
50265
50266
50267
50268
50269
50270
50271
50272
50273
50274
50275
50276
50277
50278
50279
50280
50281
50282
50283
50284
50285
50286
50287
50288
50289
50290
50291
50292
50293
50294
50295
50296
50297
50298
50299
50300
50301
50302
50303
50304
50305
50306
50307
50308
50309
50310
50311
50312
50313
50314
50315
50316
50317
50318
50319
50320
50321
50322
50323
50324
50325
50326
50327
50328
50329
50330
50331
50332
50333
50334
50335
50336
50337
50338
50339
50340
50341
50342
50343
50344
50345
50346
50347
50348
50349
50350
50351
50352
50353
50354
50355
50356
50357
50358
50359
50360
50361
50362
50363
50364
50365
50366
50367
50368
50369
50370
50371
50372
50373
50374
50375
50376
50377
50378
50379
50380
50381
50382
50383
50384
50385
50386
50387
50388
50389
50390
50391
50392
50393
50394
50395
50396
50397
50398
50399
50400
50401
50402
50403
50404
50405
50406
50407
50408
50409
50410
50411
50412
50413
50414
50415
50416
50417
50418
50419
50420
50421
50422
50423
50424
50425
50426
50427
50428
50429
50430
50431
50432
50433
50434
50435
50436
50437
50438
50439
50440
50441
50442
50443
50444
50445
50446
50447
50448
50449
50450
50451
50452
50453
50454
50455
50456
50457
50458
50459
50460
50461
50462
50463
50464
50465
50466
50467
50468
50469
50470
50471
50472
50473
50474
50475
50476
50477
50478
50479
50480
50481
50482
50483
50484
50485
50486
50487
50488
50489
50490
50491
50492
50493
50494
50495
50496
50497
50498
50499
50500
50501
50502
50503
50504
50505
50506
50507
50508
50509
50510
50511
50512
50513
50514
50515
50516
50517
50518
50519
50520
50521
50522
50523
50524
50525
50526
50527
50528
50529
50530
50531
50532
50533
50534
50535
50536
50537
50538
50539
50540
50541
50542
50543
50544
50545
50546
50547
50548
50549
50550
50551
50552
50553
50554
50555
50556
50557
50558
50559
50560
50561
50562
50563
50564
50565
50566
50567
50568
50569
50570
50571
50572
50573
50574
50575
50576
50577
50578
50579
50580
50581
50582
50583
50584
50585
50586
50587
50588
50589
50590
50591
50592
50593
50594
50595
50596
50597
50598
50599
50600
50601
50602
50603
50604
50605
50606
50607
50608
50609
50610
50611
50612
50613
50614
50615
50616
50617
50618
50619
50620
50621
50622
50623
50624
50625
50626
50627
50628
50629
50630
50631
50632
50633
50634
50635
50636
50637
50638
50639
50640
50641
50642
50643
50644
50645
50646
50647
50648
50649
50650
50651
50652
50653
50654
50655
50656
50657
50658
50659
50660
50661
50662
50663
50664
50665
50666
50667
50668
50669
50670
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704
50705
50706
50707
50708
50709
50710
50711
50712
50713
50714
50715
50716
50717
50718
50719
50720
50721
50722
50723
50724
50725
50726
50727
50728
50729
50730
50731
50732
50733
50734
50735
50736
50737
50738
50739
50740
50741
50742
50743
50744
50745
50746
50747
50748
50749
50750
50751
50752
50753
50754
50755
50756
50757
50758
50759
50760
50761
50762
50763
50764
50765
50766
50767
50768
50769
50770
50771
50772
50773
50774
50775
50776
50777
50778
50779
50780
50781
50782
50783
50784
50785
50786
50787
50788
50789
50790
50791
50792
50793
50794
50795
50796
50797
50798
50799
50800
50801
50802
50803
50804
50805
50806
50807
50808
50809
50810
50811
50812
50813
50814
50815
50816
50817
50818
50819
50820
50821
50822
50823
50824
50825
50826
50827
50828
50829
50830
50831
50832
50833
50834
50835
50836
50837
50838
50839
50840
50841
50842
50843
50844
50845
50846
50847
50848
50849
50850
50851
50852
50853
50854
50855
50856
50857
50858
50859
50860
50861
50862
50863
50864
50865
50866
50867
50868
50869
50870
50871
50872
50873
50874
50875
50876
50877
50878
50879
50880
50881
50882
50883
50884
50885
50886
50887
50888
50889
50890
50891
50892
50893
50894
50895
50896
50897
50898
50899
50900
50901
50902
50903
50904
50905
50906
50907
50908
50909
50910
50911
50912
50913
50914
50915
50916
50917
50918
50919
50920
50921
50922
50923
50924
50925
50926
50927
50928
50929
50930
50931
50932
50933
50934
50935
50936
50937
50938
50939
50940
50941
50942
50943
50944
50945
50946
50947
50948
50949
50950
50951
50952
50953
50954
50955
50956
50957
50958
50959
50960
50961
50962
50963
50964
50965
50966
50967
50968
50969
50970
50971
50972
50973
50974
50975
50976
50977
50978
50979
50980
50981
50982
50983
50984
50985
50986
50987
50988
50989
50990
50991
50992
50993
50994
50995
50996
50997
50998
50999
51000
51001
51002
51003
51004
51005
51006
51007
51008
51009
51010
51011
51012
51013
51014
51015
51016
51017
51018
51019
51020
51021
51022
51023
51024
51025
51026
51027
51028
51029
51030
51031
51032
51033
51034
51035
51036
51037
51038
51039
51040
51041
51042
51043
51044
51045
51046
51047
51048
51049
51050
51051
51052
51053
51054
51055
51056
51057
51058
51059
51060
51061
51062
51063
51064
51065
51066
51067
51068
51069
51070
51071
51072
51073
51074
51075
51076
51077
51078
51079
51080
51081
51082
51083
51084
51085
51086
51087
51088
51089
51090
51091
51092
51093
51094
51095
51096
51097
51098
51099
51100
51101
51102
51103
51104
51105
51106
51107
51108
51109
51110
51111
51112
51113
51114
51115
51116
51117
51118
51119
51120
51121
51122
51123
51124
51125
51126
51127
51128
51129
51130
51131
51132
51133
51134
51135
51136
51137
51138
51139
51140
51141
51142
51143
51144
51145
51146
51147
51148
51149
51150
51151
51152
51153
51154
51155
51156
51157
51158
51159
51160
51161
51162
51163
51164
51165
51166
51167
51168
51169
51170
51171
51172
51173
51174
51175
51176
51177
51178
51179
51180
51181
51182
51183
51184
51185
51186
51187
51188
51189
51190
51191
51192
51193
51194
51195
51196
51197
51198
51199
51200
51201
51202
51203
51204
51205
51206
51207
51208
51209
51210
51211
51212
51213
51214
51215
51216
51217
51218
51219
51220
51221
51222
51223
51224
51225
51226
51227
51228
51229
51230
51231
51232
51233
51234
51235
51236
51237
51238
51239
51240
51241
51242
51243
51244
51245
51246
51247
51248
51249
51250
51251
51252
51253
51254
51255
51256
51257
51258
51259
51260
51261
51262
51263
51264
51265
51266
51267
51268
51269
51270
51271
51272
51273
51274
51275
51276
51277
51278
51279
51280
51281
51282
51283
51284
51285
51286
51287
51288
51289
51290
51291
51292
51293
51294
51295
51296
51297
51298
51299
51300
51301
51302
51303
51304
51305
51306
51307
51308
51309
51310
51311
51312
51313
51314
51315
51316
51317
51318
51319
51320
51321
51322
51323
51324
51325
51326
51327
51328
51329
51330
51331
51332
51333
51334
51335
51336
51337
51338
51339
51340
51341
51342
51343
51344
51345
51346
51347
51348
51349
51350
51351
51352
51353
51354
51355
51356
51357
51358
51359
51360
51361
51362
51363
51364
51365
51366
51367
51368
51369
51370
51371
51372
51373
51374
51375
51376
51377
51378
51379
51380
51381
51382
51383
51384
51385
51386
51387
51388
51389
51390
51391
51392
51393
51394
51395
51396
51397
51398
51399
51400
51401
51402
51403
51404
51405
51406
51407
51408
51409
51410
51411
51412
51413
51414
51415
51416
51417
51418
51419
51420
51421
51422
51423
51424
51425
51426
51427
51428
51429
51430
51431
51432
51433
51434
51435
51436
51437
51438
51439
51440
51441
51442
51443
51444
51445
51446
51447
51448
51449
51450
51451
51452
51453
51454
51455
51456
51457
51458
51459
51460
51461
51462
51463
51464
51465
51466
51467
51468
51469
51470
51471
51472
51473
51474
51475
51476
51477
51478
51479
51480
51481
51482
51483
51484
51485
51486
51487
51488
51489
51490
51491
51492
51493
51494
51495
51496
51497
51498
51499
51500
51501
51502
51503
51504
51505
51506
51507
51508
51509
51510
51511
51512
51513
51514
51515
51516
51517
51518
51519
51520
51521
51522
51523
51524
51525
51526
51527
51528
51529
51530
51531
51532
51533
51534
51535
51536
51537
51538
51539
51540
51541
51542
51543
51544
51545
51546
51547
51548
51549
51550
51551
51552
51553
51554
51555
51556
51557
51558
51559
51560
51561
51562
51563
51564
51565
51566
51567
51568
51569
51570
51571
51572
51573
51574
51575
51576
51577
51578
51579
51580
51581
51582
51583
51584
51585
51586
51587
51588
51589
51590
51591
51592
51593
51594
51595
51596
51597
51598
51599
51600
51601
51602
51603
51604
51605
51606
51607
51608
51609
51610
51611
51612
51613
51614
51615
51616
51617
51618
51619
51620
51621
51622
51623
51624
51625
51626
51627
51628
51629
51630
51631
51632
51633
51634
51635
51636
51637
51638
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657
51658
51659
51660
51661
51662
51663
51664
51665
51666
51667
51668
51669
51670
51671
51672
51673
51674
51675
51676
51677
51678
51679
51680
51681
51682
51683
51684
51685
51686
51687
51688
51689
51690
51691
51692
51693
51694
51695
51696
51697
51698
51699
51700
51701
51702
51703
51704
51705
51706
51707
51708
51709
51710
51711
51712
51713
51714
51715
51716
51717
51718
51719
51720
51721
51722
51723
51724
51725
51726
51727
51728
51729
51730
51731
51732
51733
51734
51735
51736
51737
51738
51739
51740
51741
51742
51743
51744
51745
51746
51747
51748
51749
51750
51751
51752
51753
51754
51755
51756
51757
51758
51759
51760
51761
51762
51763
51764
51765
51766
51767
51768
51769
51770
51771
51772
51773
51774
51775
51776
51777
51778
51779
51780
51781
51782
51783
51784
51785
51786
51787
51788
51789
51790
51791
51792
51793
51794
51795
51796
51797
51798
51799
51800
51801
51802
51803
51804
51805
51806
51807
51808
51809
51810
51811
51812
51813
51814
51815
51816
51817
51818
51819
51820
51821
51822
51823
51824
51825
51826
51827
51828
51829
51830
51831
51832
51833
51834
51835
51836
51837
51838
51839
51840
51841
51842
51843
51844
51845
51846
51847
51848
51849
51850
51851
51852
51853
51854
51855
51856
51857
51858
51859
51860
51861
51862
51863
51864
51865
51866
51867
51868
51869
51870
51871
51872
51873
51874
51875
51876
51877
51878
51879
51880
51881
51882
51883
51884
51885
51886
51887
51888
51889
51890
51891
51892
51893
51894
51895
51896
51897
51898
51899
51900
51901
51902
51903
51904
51905
51906
51907
51908
51909
51910
51911
51912
51913
51914
51915
51916
51917
51918
51919
51920
51921
51922
51923
51924
51925
51926
51927
51928
51929
51930
51931
51932
51933
51934
51935
51936
51937
51938
51939
51940
51941
51942
51943
51944
51945
51946
51947
51948
51949
51950
51951
51952
51953
51954
51955
51956
51957
51958
51959
51960
51961
51962
51963
51964
51965
51966
51967
51968
51969
51970
51971
51972
51973
51974
51975
51976
51977
51978
51979
51980
51981
51982
51983
51984
51985
51986
51987
51988
51989
51990
51991
51992
51993
51994
51995
51996
51997
51998
51999
52000
52001
52002
52003
52004
52005
52006
52007
52008
52009
52010
52011
52012
52013
52014
52015
52016
52017
52018
52019
52020
52021
52022
52023
52024
52025
52026
52027
52028
52029
52030
52031
52032
52033
52034
52035
52036
52037
52038
52039
52040
52041
52042
52043
52044
52045
52046
52047
52048
52049
52050
52051
52052
52053
52054
52055
52056
52057
52058
52059
52060
52061
52062
52063
52064
52065
52066
52067
52068
52069
52070
52071
52072
52073
52074
52075
52076
52077
52078
52079
52080
52081
52082
52083
52084
52085
52086
52087
52088
52089
52090
52091
52092
52093
52094
52095
52096
52097
52098
52099
52100
52101
52102
52103
52104
52105
52106
52107
52108
52109
52110
52111
52112
52113
52114
52115
52116
52117
52118
52119
52120
52121
52122
52123
52124
52125
52126
52127
52128
52129
52130
52131
52132
52133
52134
52135
52136
52137
52138
52139
52140
52141
52142
52143
52144
52145
52146
52147
52148
52149
52150
52151
52152
52153
52154
52155
52156
52157
52158
52159
52160
52161
52162
52163
52164
52165
52166
52167
52168
52169
52170
52171
52172
52173
52174
52175
52176
52177
52178
52179
52180
52181
52182
52183
52184
52185
52186
52187
52188
52189
52190
52191
52192
52193
52194
52195
52196
52197
52198
52199
52200
52201
52202
52203
52204
52205
52206
52207
52208
52209
52210
52211
52212
52213
52214
52215
52216
52217
52218
52219
52220
52221
52222
52223
52224
52225
52226
52227
52228
52229
52230
52231
52232
52233
52234
52235
52236
52237
52238
52239
52240
52241
52242
52243
52244
52245
52246
52247
52248
52249
52250
52251
52252
52253
52254
52255
52256
52257
52258
52259
52260
52261
52262
52263
52264
52265
52266
52267
52268
52269
52270
52271
52272
52273
52274
52275
52276
52277
52278
52279
52280
52281
52282
52283
52284
52285
52286
52287
52288
52289
52290
52291
52292
52293
52294
52295
52296
52297
52298
52299
52300
52301
52302
52303
52304
52305
52306
52307
52308
52309
52310
52311
52312
52313
52314
52315
52316
52317
52318
52319
52320
52321
52322
52323
52324
52325
52326
52327
52328
52329
52330
52331
52332
52333
52334
52335
52336
52337
52338
52339
52340
52341
52342
52343
52344
52345
52346
52347
52348
52349
52350
52351
52352
52353
52354
52355
52356
52357
52358
52359
52360
52361
52362
52363
52364
52365
52366
52367
52368
52369
52370
52371
52372
52373
52374
52375
52376
52377
52378
52379
52380
52381
52382
52383
52384
52385
52386
52387
52388
52389
52390
52391
52392
52393
52394
52395
52396
52397
52398
52399
52400
52401
52402
52403
52404
52405
52406
52407
52408
52409
52410
52411
52412
52413
52414
52415
52416
52417
52418
52419
52420
52421
52422
52423
52424
52425
52426
52427
52428
52429
52430
52431
52432
52433
52434
52435
52436
52437
52438
52439
52440
52441
52442
52443
52444
52445
52446
52447
52448
52449
52450
52451
52452
52453
52454
52455
52456
52457
52458
52459
52460
52461
52462
52463
52464
52465
52466
52467
52468
52469
52470
52471
52472
52473
52474
52475
52476
52477
52478
52479
52480
52481
52482
52483
52484
52485
52486
52487
52488
52489
52490
52491
52492
52493
52494
52495
52496
52497
52498
52499
52500
52501
52502
52503
52504
52505
52506
52507
52508
52509
52510
52511
52512
52513
52514
52515
52516
52517
52518
52519
52520
52521
52522
52523
52524
52525
52526
52527
52528
52529
52530
52531
52532
52533
52534
52535
52536
52537
52538
52539
52540
52541
52542
52543
52544
52545
52546
52547
52548
52549
52550
52551
52552
52553
52554
52555
52556
52557
52558
52559
52560
52561
52562
52563
52564
52565
52566
52567
52568
52569
52570
52571
52572
52573
52574
52575
52576
52577
52578
52579
52580
52581
52582
52583
52584
52585
52586
52587
52588
52589
52590
52591
52592
52593
52594
52595
52596
52597
52598
52599
52600
52601
52602
52603
52604
52605
52606
52607
52608
52609
52610
52611
52612
52613
52614
52615
52616
52617
52618
52619
52620
52621
52622
52623
52624
52625
52626
52627
52628
52629
52630
52631
52632
52633
52634
52635
52636
52637
52638
52639
52640
52641
52642
52643
52644
52645
52646
52647
52648
52649
52650
52651
52652
52653
52654
52655
52656
52657
52658
52659
52660
52661
52662
52663
52664
52665
52666
52667
52668
52669
52670
52671
52672
52673
52674
52675
52676
52677
52678
52679
52680
52681
52682
52683
52684
52685
52686
52687
52688
52689
52690
52691
52692
52693
52694
52695
52696
52697
52698
52699
52700
52701
52702
52703
52704
52705
52706
52707
52708
52709
52710
52711
52712
52713
52714
52715
52716
52717
52718
52719
52720
52721
52722
52723
52724
52725
52726
52727
52728
52729
52730
52731
52732
52733
52734
52735
52736
52737
52738
52739
52740
52741
52742
52743
52744
52745
52746
52747
52748
52749
52750
52751
52752
52753
52754
52755
52756
52757
52758
52759
52760
52761
52762
52763
52764
52765
52766
52767
52768
52769
52770
52771
52772
52773
52774
52775
52776
52777
52778
52779
52780
52781
52782
52783
52784
52785
52786
52787
52788
52789
52790
52791
52792
52793
52794
52795
52796
52797
52798
52799
52800
52801
52802
52803
52804
52805
52806
52807
52808
52809
52810
52811
52812
52813
52814
52815
52816
52817
52818
52819
52820
52821
52822
52823
52824
52825
52826
52827
52828
52829
52830
52831
52832
52833
52834
52835
52836
52837
52838
52839
52840
52841
52842
52843
52844
52845
52846
52847
52848
52849
52850
52851
52852
52853
52854
52855
52856
52857
52858
52859
52860
52861
52862
52863
52864
52865
52866
52867
52868
52869
52870
52871
52872
52873
52874
52875
52876
52877
52878
52879
52880
52881
52882
52883
52884
52885
52886
52887
52888
52889
52890
52891
52892
52893
52894
52895
52896
52897
52898
52899
52900
52901
52902
52903
52904
52905
52906
52907
52908
52909
52910
52911
52912
52913
52914
52915
52916
52917
52918
52919
52920
52921
52922
52923
52924
52925
52926
52927
52928
52929
52930
52931
52932
52933
52934
52935
52936
52937
52938
52939
52940
52941
52942
52943
52944
52945
52946
52947
52948
52949
52950
52951
52952
52953
52954
52955
52956
52957
52958
52959
52960
52961
52962
52963
52964
52965
52966
52967
52968
52969
52970
52971
52972
52973
52974
52975
52976
52977
52978
52979
52980
52981
52982
52983
52984
52985
52986
52987
52988
52989
52990
52991
52992
52993
52994
52995
52996
52997
52998
52999
53000
53001
53002
53003
53004
53005
53006
53007
53008
53009
53010
53011
53012
53013
53014
53015
53016
53017
53018
53019
53020
53021
53022
53023
53024
53025
53026
53027
53028
53029
53030
53031
53032
53033
53034
53035
53036
53037
53038
53039
53040
53041
53042
53043
53044
53045
53046
53047
53048
53049
53050
53051
53052
53053
53054
53055
53056
53057
53058
53059
53060
53061
53062
53063
53064
53065
53066
53067
53068
53069
53070
53071
53072
53073
53074
53075
53076
53077
53078
53079
53080
53081
53082
53083
53084
53085
53086
53087
53088
53089
53090
53091
53092
53093
53094
53095
53096
53097
53098
53099
53100
53101
53102
53103
53104
53105
53106
53107
53108
53109
53110
53111
53112
53113
53114
53115
53116
53117
53118
53119
53120
53121
53122
53123
53124
53125
53126
53127
53128
53129
53130
53131
53132
53133
53134
53135
53136
53137
53138
53139
53140
53141
53142
53143
53144
53145
53146
53147
53148
53149
53150
53151
53152
53153
53154
53155
53156
53157
53158
53159
53160
53161
53162
53163
53164
53165
53166
53167
53168
53169
53170
53171
53172
53173
53174
53175
53176
53177
53178
53179
53180
53181
53182
53183
53184
53185
53186
53187
53188
53189
53190
53191
53192
53193
53194
53195
53196
53197
53198
53199
53200
53201
53202
53203
53204
53205
53206
53207
53208
53209
53210
53211
53212
53213
53214
53215
53216
53217
53218
53219
53220
53221
53222
53223
53224
53225
53226
53227
53228
53229
53230
53231
53232
53233
53234
53235
53236
53237
53238
53239
53240
53241
53242
53243
53244
53245
53246
53247
53248
53249
53250
53251
53252
53253
53254
53255
53256
53257
53258
53259
53260
53261
53262
53263
53264
53265
53266
53267
53268
53269
53270
53271
53272
53273
53274
53275
53276
53277
53278
53279
53280
53281
53282
53283
53284
53285
53286
53287
53288
53289
53290
53291
53292
53293
53294
53295
53296
53297
53298
53299
53300
53301
53302
53303
53304
53305
53306
53307
53308
53309
53310
53311
53312
53313
53314
53315
53316
53317
53318
53319
53320
53321
53322
53323
53324
53325
53326
53327
53328
53329
53330
53331
53332
53333
53334
53335
53336
53337
53338
53339
53340
53341
53342
53343
53344
53345
53346
53347
53348
53349
53350
53351
53352
53353
53354
53355
53356
53357
53358
53359
53360
53361
53362
53363
53364
53365
53366
53367
53368
53369
53370
53371
53372
53373
53374
53375
53376
53377
53378
53379
53380
53381
53382
53383
53384
53385
53386
53387
53388
53389
53390
53391
53392
53393
53394
53395
53396
53397
53398
53399
53400
53401
53402
53403
53404
53405
53406
53407
53408
53409
53410
53411
53412
53413
53414
53415
53416
53417
53418
53419
53420
53421
53422
53423
53424
53425
53426
53427
53428
53429
53430
53431
53432
53433
53434
53435
53436
53437
53438
53439
53440
53441
53442
53443
53444
53445
53446
53447
53448
53449
53450
53451
53452
53453
53454
53455
53456
53457
53458
53459
53460
53461
53462
53463
53464
53465
53466
53467
53468
53469
53470
53471
53472
53473
53474
53475
53476
53477
53478
53479
53480
53481
53482
53483
53484
53485
53486
53487
53488
53489
53490
53491
53492
53493
53494
53495
53496
53497
53498
53499
53500
53501
53502
53503
53504
53505
53506
53507
53508
53509
53510
53511
53512
53513
53514
53515
53516
53517
53518
53519
53520
53521
53522
53523
53524
53525
53526
53527
53528
53529
53530
53531
53532
53533
53534
53535
53536
53537
53538
53539
53540
53541
53542
53543
53544
53545
53546
53547
53548
53549
53550
53551
53552
53553
53554
53555
53556
53557
53558
53559
53560
53561
53562
53563
53564
53565
53566
53567
53568
53569
53570
53571
53572
53573
53574
53575
53576
53577
53578
53579
53580
53581
53582
53583
53584
53585
53586
53587
53588
53589
53590
53591
53592
53593
53594
53595
53596
53597
53598
53599
53600
53601
53602
53603
53604
53605
53606
53607
53608
53609
53610
53611
53612
53613
53614
53615
53616
53617
53618
53619
53620
53621
53622
53623
53624
53625
53626
53627
53628
53629
53630
53631
53632
53633
53634
53635
53636
53637
53638
53639
53640
53641
53642
53643
53644
53645
53646
53647
53648
53649
53650
53651
53652
53653
53654
53655
53656
53657
53658
53659
53660
53661
53662
53663
53664
53665
53666
53667
53668
53669
53670
53671
53672
53673
53674
53675
53676
53677
53678
53679
53680
53681
53682
53683
53684
53685
53686
53687
53688
53689
53690
53691
53692
53693
53694
53695
53696
53697
53698
53699
53700
53701
53702
53703
53704
53705
53706
53707
53708
53709
53710
53711
53712
53713
53714
53715
53716
53717
53718
53719
53720
53721
53722
53723
53724
53725
53726
53727
53728
53729
53730
53731
53732
53733
53734
53735
53736
53737
53738
53739
53740
53741
53742
53743
53744
53745
53746
53747
53748
53749
53750
53751
53752
53753
53754
53755
53756
53757
53758
53759
53760
53761
53762
53763
53764
53765
53766
53767
53768
53769
53770
53771
53772
53773
53774
53775
53776
53777
53778
53779
53780
53781
53782
53783
53784
53785
53786
53787
53788
53789
53790
53791
53792
53793
53794
53795
53796
53797
53798
53799
53800
53801
53802
53803
53804
53805
53806
53807
53808
53809
53810
53811
53812
53813
53814
53815
53816
53817
53818
53819
53820
53821
53822
53823
53824
53825
53826
53827
53828
53829
53830
53831
53832
53833
53834
53835
53836
53837
53838
53839
53840
53841
53842
53843
53844
53845
53846
53847
53848
53849
53850
53851
53852
53853
53854
53855
53856
53857
53858
53859
53860
53861
53862
53863
53864
53865
53866
53867
53868
53869
53870
53871
53872
53873
53874
53875
53876
53877
53878
53879
53880
53881
53882
53883
53884
53885
53886
53887
53888
53889
53890
53891
53892
53893
53894
53895
53896
53897
53898
53899
53900
53901
53902
53903
53904
53905
53906
53907
53908
53909
53910
53911
53912
53913
53914
53915
53916
53917
53918
53919
53920
53921
53922
53923
53924
53925
53926
53927
53928
53929
53930
53931
53932
53933
53934
53935
53936
53937
53938
53939
53940
53941
53942
53943
53944
53945
53946
53947
53948
53949
53950
53951
53952
53953
53954
53955
53956
53957
53958
53959
53960
53961
53962
53963
53964
53965
53966
53967
53968
53969
53970
53971
53972
53973
53974
53975
53976
53977
53978
53979
53980
53981
53982
53983
53984
53985
53986
53987
53988
53989
53990
53991
53992
53993
53994
53995
53996
53997
53998
53999
54000
54001
54002
54003
54004
54005
54006
54007
54008
54009
54010
54011
54012
54013
54014
54015
54016
54017
54018
54019
54020
54021
54022
54023
54024
54025
54026
54027
54028
54029
54030
54031
54032
54033
54034
54035
54036
54037
54038
54039
54040
54041
54042
54043
54044
54045
54046
54047
54048
54049
54050
54051
54052
54053
54054
54055
54056
54057
54058
54059
54060
54061
54062
54063
54064
54065
54066
54067
54068
54069
54070
54071
54072
54073
54074
54075
54076
54077
54078
54079
54080
54081
54082
54083
54084
54085
54086
54087
54088
54089
54090
54091
54092
54093
54094
54095
54096
54097
54098
54099
54100
54101
54102
54103
54104
54105
54106
54107
54108
54109
54110
54111
54112
54113
54114
54115
54116
54117
54118
54119
54120
54121
54122
54123
54124
54125
54126
54127
54128
54129
54130
54131
54132
54133
54134
54135
54136
54137
54138
54139
54140
54141
54142
54143
54144
54145
54146
54147
54148
54149
54150
54151
54152
54153
54154
54155
54156
54157
54158
54159
54160
54161
54162
54163
54164
54165
54166
54167
54168
54169
54170
54171
54172
54173
54174
54175
54176
54177
54178
54179
54180
54181
54182
54183
54184
54185
54186
54187
54188
54189
54190
54191
54192
54193
54194
54195
54196
54197
54198
54199
54200
54201
54202
54203
54204
54205
54206
54207
54208
54209
54210
54211
54212
54213
54214
54215
54216
54217
54218
54219
54220
54221
54222
54223
54224
54225
54226
54227
54228
54229
54230
54231
54232
54233
54234
54235
54236
54237
54238
54239
54240
54241
54242
54243
54244
54245
54246
54247
54248
54249
54250
54251
54252
54253
54254
54255
54256
54257
54258
54259
54260
54261
54262
54263
54264
54265
54266
54267
54268
54269
54270
54271
54272
54273
54274
54275
54276
54277
54278
54279
54280
54281
54282
54283
54284
54285
54286
54287
54288
54289
54290
54291
54292
54293
54294
54295
54296
54297
54298
54299
54300
54301
54302
54303
54304
54305
54306
54307
54308
54309
54310
54311
54312
54313
54314
54315
54316
54317
54318
54319
54320
54321
54322
54323
54324
54325
54326
54327
54328
54329
54330
54331
54332
54333
54334
54335
54336
54337
54338
54339
54340
54341
54342
54343
54344
54345
54346
54347
54348
54349
54350
54351
54352
54353
54354
54355
54356
54357
54358
54359
54360
54361
54362
54363
54364
54365
54366
54367
54368
54369
54370
54371
54372
54373
54374
54375
54376
54377
54378
54379
54380
54381
54382
54383
54384
54385
54386
54387
54388
54389
54390
54391
54392
54393
54394
54395
54396
54397
54398
54399
54400
54401
54402
54403
54404
54405
54406
54407
54408
54409
54410
54411
54412
54413
54414
54415
54416
54417
54418
54419
54420
54421
54422
54423
54424
54425
54426
54427
54428
54429
54430
54431
54432
54433
54434
54435
54436
54437
54438
54439
54440
54441
54442
54443
54444
54445
54446
54447
54448
54449
54450
54451
54452
54453
54454
54455
54456
54457
54458
54459
54460
54461
54462
54463
54464
54465
54466
54467
54468
54469
54470
54471
54472
54473
54474
54475
54476
54477
54478
54479
54480
54481
54482
54483
54484
54485
54486
54487
54488
54489
54490
54491
54492
54493
54494
54495
54496
54497
54498
54499
54500
54501
54502
54503
54504
54505
54506
54507
54508
54509
54510
54511
54512
54513
54514
54515
54516
54517
54518
54519
54520
54521
54522
54523
54524
54525
54526
54527
54528
54529
54530
54531
54532
54533
54534
54535
54536
54537
54538
54539
54540
54541
54542
54543
54544
54545
54546
54547
54548
54549
54550
54551
54552
54553
54554
54555
54556
54557
54558
54559
54560
54561
54562
54563
54564
54565
54566
54567
54568
54569
54570
54571
54572
54573
54574
54575
54576
54577
54578
54579
54580
54581
54582
54583
54584
54585
54586
54587
54588
54589
54590
54591
54592
54593
54594
54595
54596
54597
54598
54599
54600
54601
54602
54603
54604
54605
54606
54607
54608
54609
54610
54611
54612
54613
54614
54615
54616
54617
54618
54619
54620
54621
54622
54623
54624
54625
54626
54627
54628
54629
54630
54631
54632
54633
54634
54635
54636
54637
54638
54639
54640
54641
54642
54643
54644
54645
54646
54647
54648
54649
54650
54651
54652
54653
54654
54655
54656
54657
54658
54659
54660
54661
54662
54663
54664
54665
54666
54667
54668
54669
54670
54671
54672
54673
54674
54675
54676
54677
54678
54679
54680
54681
54682
54683
54684
54685
54686
54687
54688
54689
54690
54691
54692
54693
54694
54695
54696
54697
54698
54699
54700
54701
54702
54703
54704
54705
54706
54707
54708
54709
54710
54711
54712
54713
54714
54715
54716
54717
54718
54719
54720
54721
54722
54723
54724
54725
54726
54727
54728
54729
54730
54731
54732
54733
54734
54735
54736
54737
54738
54739
54740
54741
54742
54743
54744
54745
54746
54747
54748
54749
54750
54751
54752
54753
54754
54755
54756
54757
54758
54759
54760
54761
54762
54763
54764
54765
54766
54767
54768
54769
54770
54771
54772
54773
54774
54775
54776
54777
54778
54779
54780
54781
54782
54783
54784
54785
54786
54787
54788
54789
54790
54791
54792
54793
54794
54795
54796
54797
54798
54799
54800
54801
54802
54803
54804
54805
54806
54807
54808
54809
54810
54811
54812
54813
54814
54815
54816
54817
54818
54819
54820
54821
54822
54823
54824
54825
54826
54827
54828
54829
54830
54831
54832
54833
54834
54835
54836
54837
54838
54839
54840
54841
54842
54843
54844
54845
54846
54847
54848
54849
54850
54851
54852
54853
54854
54855
54856
54857
54858
54859
54860
54861
54862
54863
54864
54865
54866
54867
54868
54869
54870
54871
54872
54873
54874
54875
54876
54877
54878
54879
54880
54881
54882
54883
54884
54885
54886
54887
54888
54889
54890
54891
54892
54893
54894
54895
54896
54897
54898
54899
54900
54901
54902
54903
54904
54905
54906
54907
54908
54909
54910
54911
54912
54913
54914
54915
54916
54917
54918
54919
54920
54921
54922
54923
54924
54925
54926
54927
54928
54929
54930
54931
54932
54933
54934
54935
54936
54937
54938
54939
54940
54941
54942
54943
54944
54945
54946
54947
54948
54949
54950
54951
54952
54953
54954
54955
54956
54957
54958
54959
54960
54961
54962
54963
54964
54965
54966
54967
54968
54969
54970
54971
54972
54973
54974
54975
54976
54977
54978
54979
54980
54981
54982
54983
54984
54985
54986
54987
54988
54989
54990
54991
54992
54993
54994
54995
54996
54997
54998
54999
55000
55001
55002
55003
55004
55005
55006
55007
55008
55009
55010
55011
55012
55013
55014
55015
55016
55017
55018
55019
55020
55021
55022
55023
55024
55025
55026
55027
55028
55029
55030
55031
55032
55033
55034
55035
55036
55037
55038
55039
55040
55041
55042
55043
55044
55045
55046
55047
55048
55049
55050
55051
55052
55053
55054
55055
55056
55057
55058
55059
55060
55061
55062
55063
55064
55065
55066
55067
55068
55069
55070
55071
55072
55073
55074
55075
55076
55077
55078
55079
55080
55081
55082
55083
55084
55085
55086
55087
55088
55089
55090
55091
55092
55093
55094
55095
55096
55097
55098
55099
55100
55101
55102
55103
55104
55105
55106
55107
55108
55109
55110
55111
55112
55113
55114
55115
55116
55117
55118
55119
55120
55121
55122
55123
55124
55125
55126
55127
55128
55129
55130
55131
55132
55133
55134
55135
55136
55137
55138
55139
55140
55141
55142
55143
55144
55145
55146
55147
55148
55149
55150
55151
55152
55153
55154
55155
55156
55157
55158
55159
55160
55161
55162
55163
55164
55165
55166
55167
55168
55169
55170
55171
55172
55173
55174
55175
55176
55177
55178
55179
55180
55181
55182
55183
55184
55185
55186
55187
55188
55189
55190
55191
55192
55193
55194
55195
55196
55197
55198
55199
55200
55201
55202
55203
55204
55205
55206
55207
55208
55209
55210
55211
55212
55213
55214
55215
55216
55217
55218
55219
55220
55221
55222
55223
55224
55225
55226
55227
55228
55229
55230
55231
55232
55233
55234
55235
55236
55237
55238
55239
55240
55241
55242
55243
55244
55245
55246
55247
55248
55249
55250
55251
55252
55253
55254
55255
55256
55257
55258
55259
55260
55261
55262
55263
55264
55265
55266
55267
55268
55269
55270
55271
55272
55273
55274
55275
55276
55277
55278
55279
55280
55281
55282
55283
55284
55285
55286
55287
55288
55289
55290
55291
55292
55293
55294
55295
55296
55297
55298
55299
55300
55301
55302
55303
55304
55305
55306
55307
55308
55309
55310
55311
55312
55313
55314
55315
55316
55317
55318
55319
55320
55321
55322
55323
55324
55325
55326
55327
55328
55329
55330
55331
55332
55333
55334
55335
55336
55337
55338
55339
55340
55341
55342
55343
55344
55345
55346
55347
55348
55349
55350
55351
55352
55353
55354
55355
55356
55357
55358
55359
55360
55361
55362
55363
55364
55365
55366
55367
55368
55369
55370
55371
55372
55373
55374
55375
55376
55377
55378
55379
55380
55381
55382
55383
55384
55385
55386
55387
55388
55389
55390
55391
55392
55393
55394
55395
55396
55397
55398
55399
55400
55401
55402
55403
55404
55405
55406
55407
55408
55409
55410
55411
55412
55413
55414
55415
55416
55417
55418
55419
55420
55421
55422
55423
55424
55425
55426
55427
55428
55429
55430
55431
55432
55433
55434
55435
55436
55437
55438
55439
55440
55441
55442
55443
55444
55445
55446
55447
55448
55449
55450
55451
55452
55453
55454
55455
55456
55457
55458
55459
55460
55461
55462
55463
55464
55465
55466
55467
55468
55469
55470
55471
55472
55473
55474
55475
55476
55477
55478
55479
55480
55481
55482
55483
55484
55485
55486
55487
55488
55489
55490
55491
55492
55493
55494
55495
55496
55497
55498
55499
55500
55501
55502
55503
55504
55505
55506
55507
55508
55509
55510
55511
55512
55513
55514
55515
55516
55517
55518
55519
55520
55521
55522
55523
55524
55525
55526
55527
55528
55529
55530
55531
55532
55533
55534
55535
55536
55537
55538
55539
55540
55541
55542
55543
55544
55545
55546
55547
55548
55549
55550
55551
55552
55553
55554
55555
55556
55557
55558
55559
55560
55561
55562
55563
55564
55565
55566
55567
55568
55569
55570
55571
55572
55573
55574
55575
55576
55577
55578
55579
55580
55581
55582
55583
55584
55585
55586
55587
55588
55589
55590
55591
55592
55593
55594
55595
55596
55597
55598
55599
55600
55601
55602
55603
55604
55605
55606
55607
55608
55609
55610
55611
55612
55613
55614
55615
55616
55617
55618
55619
55620
55621
55622
55623
55624
55625
55626
55627
55628
55629
55630
55631
55632
55633
55634
55635
55636
55637
55638
55639
55640
55641
55642
55643
55644
55645
55646
55647
55648
55649
55650
55651
55652
55653
55654
55655
55656
55657
55658
55659
55660
55661
55662
55663
55664
55665
55666
55667
55668
55669
55670
55671
55672
55673
55674
55675
55676
55677
55678
55679
55680
55681
55682
55683
55684
55685
55686
55687
55688
55689
55690
55691
55692
55693
55694
55695
55696
55697
55698
55699
55700
55701
55702
55703
55704
55705
55706
55707
55708
55709
55710
55711
55712
55713
55714
55715
55716
55717
55718
55719
55720
55721
55722
55723
55724
55725
55726
55727
55728
55729
55730
55731
55732
55733
55734
55735
55736
55737
55738
55739
55740
55741
55742
55743
55744
55745
55746
55747
55748
55749
55750
55751
55752
55753
55754
55755
55756
55757
55758
55759
55760
55761
55762
55763
55764
55765
55766
55767
55768
55769
55770
55771
55772
55773
55774
55775
55776
55777
55778
55779
55780
55781
55782
55783
55784
55785
55786
55787
55788
55789
55790
55791
55792
55793
55794
55795
55796
55797
55798
55799
55800
55801
55802
55803
55804
55805
55806
55807
55808
55809
55810
55811
55812
55813
55814
55815
55816
55817
55818
55819
55820
55821
55822
55823
55824
55825
55826
55827
55828
55829
55830
55831
55832
55833
55834
55835
55836
55837
55838
55839
55840
55841
55842
55843
55844
55845
55846
55847
55848
55849
55850
55851
55852
55853
55854
55855
55856
55857
55858
55859
55860
55861
55862
55863
55864
55865
55866
55867
55868
55869
55870
55871
55872
55873
55874
55875
55876
55877
55878
55879
55880
55881
55882
55883
55884
55885
55886
55887
55888
55889
55890
55891
55892
55893
55894
55895
55896
55897
55898
55899
55900
55901
55902
55903
55904
55905
55906
55907
55908
55909
55910
55911
55912
55913
55914
55915
55916
55917
55918
55919
55920
55921
55922
55923
55924
55925
55926
55927
55928
55929
55930
55931
55932
55933
55934
55935
55936
55937
55938
55939
55940
55941
55942
55943
55944
55945
55946
55947
55948
55949
55950
55951
55952
55953
55954
55955
55956
55957
55958
55959
55960
55961
55962
55963
55964
55965
55966
55967
55968
55969
55970
55971
55972
55973
55974
55975
55976
55977
55978
55979
55980
55981
55982
55983
55984
55985
55986
55987
55988
55989
55990
55991
55992
55993
55994
55995
55996
55997
55998
55999
56000
56001
56002
56003
56004
56005
56006
56007
56008
56009
56010
56011
56012
56013
56014
56015
56016
56017
56018
56019
56020
56021
56022
56023
56024
56025
56026
56027
56028
56029
56030
56031
56032
56033
56034
56035
56036
56037
56038
56039
56040
56041
56042
56043
56044
56045
56046
56047
56048
56049
56050
56051
56052
56053
56054
56055
56056
56057
56058
56059
56060
56061
56062
56063
56064
56065
56066
56067
56068
56069
56070
56071
56072
56073
56074
56075
56076
56077
56078
56079
56080
56081
56082
56083
56084
56085
56086
56087
56088
56089
56090
56091
56092
56093
56094
56095
56096
56097
56098
56099
56100
56101
56102
56103
56104
56105
56106
56107
56108
56109
56110
56111
56112
56113
56114
56115
56116
56117
56118
56119
56120
56121
56122
56123
56124
56125
56126
56127
56128
56129
56130
56131
56132
56133
56134
56135
56136
56137
56138
56139
56140
56141
56142
56143
56144
56145
56146
56147
56148
56149
56150
56151
56152
56153
56154
56155
56156
56157
56158
56159
56160
56161
56162
56163
56164
56165
56166
56167
56168
56169
56170
56171
56172
56173
56174
56175
56176
56177
56178
56179
56180
56181
56182
56183
56184
56185
56186
56187
56188
56189
56190
56191
56192
56193
56194
56195
56196
56197
56198
56199
56200
56201
56202
56203
56204
56205
56206
56207
56208
56209
56210
56211
56212
56213
56214
56215
56216
56217
56218
56219
56220
56221
56222
56223
56224
56225
56226
56227
56228
56229
56230
56231
56232
56233
56234
56235
56236
56237
56238
56239
56240
56241
56242
56243
56244
56245
56246
56247
56248
56249
56250
56251
56252
56253
56254
56255
56256
56257
56258
56259
56260
56261
56262
56263
56264
56265
56266
56267
56268
56269
56270
56271
56272
56273
56274
56275
56276
56277
56278
56279
56280
56281
56282
56283
56284
56285
56286
56287
56288
56289
56290
56291
56292
56293
56294
56295
56296
56297
56298
56299
56300
56301
56302
56303
56304
56305
56306
56307
56308
56309
56310
56311
56312
56313
56314
56315
56316
56317
56318
56319
56320
56321
56322
56323
56324
56325
56326
56327
56328
56329
56330
56331
56332
56333
56334
56335
56336
56337
56338
56339
56340
56341
56342
56343
56344
56345
56346
56347
56348
56349
56350
56351
56352
56353
56354
56355
56356
56357
56358
56359
56360
56361
56362
56363
56364
56365
56366
56367
56368
56369
56370
56371
56372
56373
56374
56375
56376
56377
56378
56379
56380
56381
56382
56383
56384
56385
56386
56387
56388
56389
56390
56391
56392
56393
56394
56395
56396
56397
56398
56399
56400
56401
56402
56403
56404
56405
56406
56407
56408
56409
56410
56411
56412
56413
56414
56415
56416
56417
56418
56419
56420
56421
56422
56423
56424
56425
56426
56427
56428
56429
56430
56431
56432
56433
56434
56435
56436
56437
56438
56439
56440
56441
56442
56443
56444
56445
56446
56447
56448
56449
56450
56451
56452
56453
56454
56455
56456
56457
56458
56459
56460
56461
56462
56463
56464
56465
56466
56467
56468
56469
56470
56471
56472
56473
56474
56475
56476
56477
56478
56479
56480
56481
56482
56483
56484
56485
56486
56487
56488
56489
56490
56491
56492
56493
56494
56495
56496
56497
56498
56499
56500
56501
56502
56503
56504
56505
56506
56507
56508
56509
56510
56511
56512
56513
56514
56515
56516
56517
56518
56519
56520
56521
56522
56523
56524
56525
56526
56527
56528
56529
56530
56531
56532
56533
56534
56535
56536
56537
56538
56539
56540
56541
56542
56543
56544
56545
56546
56547
56548
56549
56550
56551
56552
56553
56554
56555
56556
56557
56558
56559
56560
56561
56562
56563
56564
56565
56566
56567
56568
56569
56570
56571
56572
56573
56574
56575
56576
56577
56578
56579
56580
56581
56582
56583
56584
56585
56586
56587
56588
56589
56590
56591
56592
56593
56594
56595
56596
56597
56598
56599
56600
56601
56602
56603
56604
56605
56606
56607
56608
56609
56610
56611
56612
56613
56614
56615
56616
56617
56618
56619
56620
56621
56622
56623
56624
56625
56626
56627
56628
56629
56630
56631
56632
56633
56634
56635
56636
56637
56638
56639
56640
56641
56642
56643
56644
56645
56646
56647
56648
56649
56650
56651
56652
56653
56654
56655
56656
56657
56658
56659
56660
56661
56662
56663
56664
56665
56666
56667
56668
56669
56670
56671
56672
56673
56674
56675
56676
56677
56678
56679
56680
56681
56682
56683
56684
56685
56686
56687
56688
56689
56690
56691
56692
56693
56694
56695
56696
56697
56698
56699
56700
56701
56702
56703
56704
56705
56706
56707
56708
56709
56710
56711
56712
56713
56714
56715
56716
56717
56718
56719
56720
56721
56722
56723
56724
56725
56726
56727
56728
56729
56730
56731
56732
56733
56734
56735
56736
56737
56738
56739
56740
56741
56742
56743
56744
56745
56746
56747
56748
56749
56750
56751
56752
56753
56754
56755
56756
56757
56758
56759
56760
56761
56762
56763
56764
56765
56766
56767
56768
56769
56770
56771
56772
56773
56774
56775
56776
56777
56778
56779
56780
56781
56782
56783
56784
56785
56786
56787
56788
56789
56790
56791
56792
56793
56794
56795
56796
56797
56798
56799
56800
56801
56802
56803
56804
56805
56806
56807
56808
56809
56810
56811
56812
56813
56814
56815
56816
56817
56818
56819
56820
56821
56822
56823
56824
56825
56826
56827
56828
56829
56830
56831
56832
56833
56834
56835
56836
56837
56838
56839
56840
56841
56842
56843
56844
56845
56846
56847
56848
56849
56850
56851
56852
56853
56854
56855
56856
56857
56858
56859
56860
56861
56862
56863
56864
56865
56866
56867
56868
56869
56870
56871
56872
56873
56874
56875
56876
56877
56878
56879
56880
56881
56882
56883
56884
56885
56886
56887
56888
56889
56890
56891
56892
56893
56894
56895
56896
56897
56898
56899
56900
56901
56902
56903
56904
56905
56906
56907
56908
56909
56910
56911
56912
56913
56914
56915
56916
56917
56918
56919
56920
56921
56922
56923
56924
56925
56926
56927
56928
56929
56930
56931
56932
56933
56934
56935
56936
56937
56938
56939
56940
56941
56942
56943
56944
56945
56946
56947
56948
56949
56950
56951
56952
56953
56954
56955
56956
56957
56958
56959
56960
56961
56962
56963
56964
56965
56966
56967
56968
56969
56970
56971
56972
56973
56974
56975
56976
56977
56978
56979
56980
56981
56982
56983
56984
56985
56986
56987
56988
56989
56990
56991
56992
56993
56994
56995
56996
56997
56998
56999
57000
57001
57002
57003
57004
57005
57006
57007
57008
57009
57010
57011
57012
57013
57014
57015
57016
57017
57018
57019
57020
57021
57022
57023
57024
57025
57026
57027
57028
57029
57030
57031
57032
57033
57034
57035
57036
57037
57038
57039
57040
57041
57042
57043
57044
57045
57046
57047
57048
57049
57050
57051
57052
57053
57054
57055
57056
57057
57058
57059
57060
57061
57062
57063
57064
57065
57066
57067
57068
57069
57070
57071
57072
57073
57074
57075
57076
57077
57078
57079
57080
57081
57082
57083
57084
57085
57086
57087
57088
57089
57090
57091
57092
57093
57094
57095
57096
57097
57098
57099
57100
57101
57102
57103
57104
57105
57106
57107
57108
57109
57110
57111
57112
57113
57114
57115
57116
57117
57118
57119
57120
57121
57122
57123
57124
57125
57126
57127
57128
57129
57130
57131
57132
57133
57134
57135
57136
57137
57138
57139
57140
57141
57142
57143
57144
57145
57146
57147
57148
57149
57150
57151
57152
57153
57154
57155
57156
57157
57158
57159
57160
57161
57162
57163
57164
57165
57166
57167
57168
57169
57170
57171
57172
57173
57174
57175
57176
57177
57178
57179
57180
57181
57182
57183
57184
57185
57186
57187
57188
57189
57190
57191
57192
57193
57194
57195
57196
57197
57198
57199
57200
57201
57202
57203
57204
57205
57206
57207
57208
57209
57210
57211
57212
57213
57214
57215
57216
57217
57218
57219
57220
57221
57222
57223
57224
57225
57226
57227
57228
57229
57230
57231
57232
57233
57234
57235
57236
57237
57238
57239
57240
57241
57242
57243
57244
57245
57246
57247
57248
57249
57250
57251
57252
57253
57254
57255
57256
57257
57258
57259
57260
57261
57262
57263
57264
57265
57266
57267
57268
57269
57270
57271
57272
57273
57274
57275
57276
57277
57278
57279
57280
57281
57282
57283
57284
57285
57286
57287
57288
57289
57290
57291
57292
57293
57294
57295
57296
57297
57298
57299
57300
57301
57302
57303
57304
57305
57306
57307
57308
57309
57310
57311
57312
57313
57314
57315
57316
57317
57318
57319
57320
57321
57322
57323
57324
57325
57326
57327
57328
57329
57330
57331
57332
57333
57334
57335
57336
57337
57338
57339
57340
57341
57342
57343
57344
57345
57346
57347
57348
57349
57350
57351
57352
57353
57354
57355
57356
57357
57358
57359
57360
57361
57362
57363
57364
57365
57366
57367
57368
57369
57370
57371
57372
57373
57374
57375
57376
57377
57378
57379
57380
57381
57382
57383
57384
57385
57386
57387
57388
57389
57390
57391
57392
57393
57394
57395
57396
57397
57398
57399
57400
57401
57402
57403
57404
57405
57406
57407
57408
57409
57410
57411
57412
57413
57414
57415
57416
57417
57418
57419
57420
57421
57422
57423
57424
57425
57426
57427
57428
57429
57430
57431
57432
57433
57434
57435
57436
57437
57438
57439
57440
57441
57442
57443
57444
57445
57446
57447
57448
57449
57450
57451
57452
57453
57454
57455
57456
57457
57458
57459
57460
57461
57462
57463
57464
57465
57466
57467
57468
57469
57470
57471
57472
57473
57474
57475
57476
57477
57478
57479
57480
57481
57482
57483
57484
57485
57486
57487
57488
57489
57490
57491
57492
57493
57494
57495
57496
57497
57498
57499
57500
57501
57502
57503
57504
57505
57506
57507
57508
57509
57510
57511
57512
57513
57514
57515
57516
57517
57518
57519
57520
57521
57522
57523
57524
57525
57526
57527
57528
57529
57530
57531
57532
57533
57534
57535
57536
57537
57538
57539
57540
57541
57542
57543
57544
57545
57546
57547
57548
57549
57550
57551
57552
57553
57554
57555
57556
57557
57558
57559
57560
57561
57562
57563
57564
57565
57566
57567
57568
57569
57570
57571
57572
57573
57574
57575
57576
57577
57578
57579
57580
57581
57582
57583
57584
57585
57586
57587
57588
57589
57590
57591
57592
57593
57594
57595
57596
57597
57598
57599
57600
57601
57602
57603
57604
57605
57606
57607
57608
57609
57610
57611
57612
57613
57614
57615
57616
57617
57618
57619
57620
57621
57622
57623
57624
57625
57626
57627
57628
57629
57630
57631
57632
57633
57634
57635
57636
57637
57638
57639
57640
57641
57642
57643
57644
57645
57646
57647
57648
57649
57650
57651
57652
57653
57654
57655
57656
57657
57658
57659
57660
57661
57662
57663
57664
57665
57666
57667
57668
57669
57670
57671
57672
57673
57674
57675
57676
57677
57678
57679
57680
57681
57682
57683
57684
57685
57686
57687
57688
57689
57690
57691
57692
57693
57694
57695
57696
57697
57698
57699
57700
57701
57702
57703
57704
57705
57706
57707
57708
57709
57710
57711
57712
57713
57714
57715
57716
57717
57718
57719
57720
57721
57722
57723
57724
57725
57726
57727
57728
57729
57730
57731
57732
57733
57734
57735
57736
57737
57738
57739
57740
57741
57742
57743
57744
57745
57746
57747
57748
57749
57750
57751
57752
57753
57754
57755
57756
57757
57758
57759
57760
57761
57762
57763
57764
57765
57766
57767
57768
57769
57770
57771
57772
57773
57774
57775
57776
57777
57778
57779
57780
57781
57782
57783
57784
57785
57786
57787
57788
57789
57790
57791
57792
57793
57794
57795
57796
57797
57798
57799
57800
57801
57802
57803
57804
57805
57806
57807
57808
57809
57810
57811
57812
57813
57814
57815
57816
57817
57818
57819
57820
57821
57822
57823
57824
57825
57826
57827
57828
57829
57830
57831
57832
57833
57834
57835
57836
57837
57838
57839
57840
57841
57842
57843
57844
57845
57846
57847
57848
57849
57850
57851
57852
57853
57854
57855
57856
57857
57858
57859
57860
57861
57862
57863
57864
57865
57866
57867
57868
57869
57870
57871
57872
57873
57874
57875
57876
57877
57878
57879
57880
57881
57882
57883
57884
57885
57886
57887
57888
57889
57890
57891
57892
57893
57894
57895
57896
57897
57898
57899
57900
57901
57902
57903
57904
57905
57906
57907
57908
57909
57910
57911
57912
57913
57914
57915
57916
57917
57918
57919
57920
57921
57922
57923
57924
57925
57926
57927
57928
57929
57930
57931
57932
57933
57934
57935
57936
57937
57938
57939
57940
57941
57942
57943
57944
57945
57946
57947
57948
57949
57950
57951
57952
57953
57954
57955
57956
57957
57958
57959
57960
57961
57962
57963
57964
57965
57966
57967
57968
57969
57970
57971
57972
57973
57974
57975
57976
57977
57978
57979
57980
57981
57982
57983
57984
57985
57986
57987
57988
57989
57990
57991
57992
57993
57994
57995
57996
57997
57998
57999
58000
58001
58002
58003
58004
58005
58006
58007
58008
58009
58010
58011
58012
58013
58014
58015
58016
58017
58018
58019
58020
58021
58022
58023
58024
58025
58026
58027
58028
58029
58030
58031
58032
58033
58034
58035
58036
58037
58038
58039
58040
58041
58042
58043
58044
58045
58046
58047
58048
58049
58050
58051
58052
58053
58054
58055
58056
58057
58058
58059
58060
58061
58062
58063
58064
58065
58066
58067
58068
58069
58070
58071
58072
58073
58074
58075
58076
58077
58078
58079
58080
58081
58082
58083
58084
58085
58086
58087
58088
58089
58090
58091
58092
58093
58094
58095
58096
58097
58098
58099
58100
58101
58102
58103
58104
58105
58106
58107
58108
58109
58110
58111
58112
58113
58114
58115
58116
58117
58118
58119
58120
58121
58122
58123
58124
58125
58126
58127
58128
58129
58130
58131
58132
58133
58134
58135
58136
58137
58138
58139
58140
58141
58142
58143
58144
58145
58146
58147
58148
58149
58150
58151
58152
58153
58154
58155
58156
58157
58158
58159
58160
58161
58162
58163
58164
58165
58166
58167
58168
58169
58170
58171
58172
58173
58174
58175
58176
58177
58178
58179
58180
58181
58182
58183
58184
58185
58186
58187
58188
58189
58190
58191
58192
58193
58194
58195
58196
58197
58198
58199
58200
58201
58202
58203
58204
58205
58206
58207
58208
58209
58210
58211
58212
58213
58214
58215
58216
58217
58218
58219
58220
58221
58222
58223
58224
58225
58226
58227
58228
58229
58230
58231
58232
58233
58234
58235
58236
58237
58238
58239
58240
58241
58242
58243
58244
58245
58246
58247
58248
58249
58250
58251
58252
58253
58254
58255
58256
58257
58258
58259
58260
58261
58262
58263
58264
58265
58266
58267
58268
58269
58270
58271
58272
58273
58274
58275
58276
58277
58278
58279
58280
58281
58282
58283
58284
58285
58286
58287
58288
58289
58290
58291
58292
58293
58294
58295
58296
58297
58298
58299
58300
58301
58302
58303
58304
58305
58306
58307
58308
58309
58310
58311
58312
58313
58314
58315
58316
58317
58318
58319
58320
58321
58322
58323
58324
58325
58326
58327
58328
58329
58330
58331
58332
58333
58334
58335
58336
58337
58338
58339
58340
58341
58342
58343
58344
58345
58346
58347
58348
58349
58350
58351
58352
58353
58354
58355
58356
58357
58358
58359
58360
58361
58362
58363
58364
58365
58366
58367
58368
58369
58370
58371
58372
58373
58374
58375
58376
58377
58378
58379
58380
58381
58382
58383
58384
58385
58386
58387
58388
58389
58390
58391
58392
58393
58394
58395
58396
58397
58398
58399
58400
58401
58402
58403
58404
58405
58406
58407
58408
58409
58410
58411
58412
58413
58414
58415
58416
58417
58418
58419
58420
58421
58422
58423
58424
58425
58426
58427
58428
58429
58430
58431
58432
58433
58434
58435
58436
58437
58438
58439
58440
58441
58442
58443
58444
58445
58446
58447
58448
58449
58450
58451
58452
58453
58454
58455
58456
58457
58458
58459
58460
58461
58462
58463
58464
58465
58466
58467
58468
58469
58470
58471
58472
58473
58474
58475
58476
58477
58478
58479
58480
58481
58482
58483
58484
58485
58486
58487
58488
58489
58490
58491
58492
58493
58494
58495
58496
58497
58498
58499
58500
58501
58502
58503
58504
58505
58506
58507
58508
58509
58510
58511
58512
58513
58514
58515
58516
58517
58518
58519
58520
58521
58522
58523
58524
58525
58526
58527
58528
58529
58530
58531
58532
58533
58534
58535
58536
58537
58538
58539
58540
58541
58542
58543
58544
58545
58546
58547
58548
58549
58550
58551
58552
58553
58554
58555
58556
58557
58558
58559
58560
58561
58562
58563
58564
58565
58566
58567
58568
58569
58570
58571
58572
58573
58574
58575
58576
58577
58578
58579
58580
58581
58582
58583
58584
58585
58586
58587
58588
58589
58590
58591
58592
58593
58594
58595
58596
58597
58598
58599
58600
58601
58602
58603
58604
58605
58606
58607
58608
58609
58610
58611
58612
58613
58614
58615
58616
58617
58618
58619
58620
58621
58622
58623
58624
58625
58626
58627
58628
58629
58630
58631
58632
58633
58634
58635
58636
58637
58638
58639
58640
58641
58642
58643
58644
58645
58646
58647
58648
58649
58650
58651
58652
58653
58654
58655
58656
58657
58658
58659
58660
58661
58662
58663
58664
58665
58666
58667
58668
58669
58670
58671
58672
58673
58674
58675
58676
58677
58678
58679
58680
58681
58682
58683
58684
58685
58686
58687
58688
58689
58690
58691
58692
58693
58694
58695
58696
58697
58698
58699
58700
58701
58702
58703
58704
58705
58706
58707
58708
58709
58710
58711
58712
58713
58714
58715
58716
58717
58718
58719
58720
58721
58722
58723
58724
58725
58726
58727
58728
58729
58730
58731
58732
58733
58734
58735
58736
58737
58738
58739
58740
58741
58742
58743
58744
58745
58746
58747
58748
58749
58750
58751
58752
58753
58754
58755
58756
58757
58758
58759
58760
58761
58762
58763
58764
58765
58766
58767
58768
58769
58770
58771
58772
58773
58774
58775
58776
58777
58778
58779
58780
58781
58782
58783
58784
58785
58786
58787
58788
58789
58790
58791
58792
58793
58794
58795
58796
58797
58798
58799
58800
58801
58802
58803
58804
58805
58806
58807
58808
58809
58810
58811
58812
58813
58814
58815
58816
58817
58818
58819
58820
58821
58822
58823
58824
58825
58826
58827
58828
58829
58830
58831
58832
58833
58834
58835
58836
58837
58838
58839
58840
58841
58842
58843
58844
58845
58846
58847
58848
58849
58850
58851
58852
58853
58854
58855
58856
58857
58858
58859
58860
58861
58862
58863
58864
58865
58866
58867
58868
58869
58870
58871
58872
58873
58874
58875
58876
58877
58878
58879
58880
58881
58882
58883
58884
58885
58886
58887
58888
58889
58890
58891
58892
58893
58894
58895
58896
58897
58898
58899
58900
58901
58902
58903
58904
58905
58906
58907
58908
58909
58910
58911
58912
58913
58914
58915
58916
58917
58918
58919
58920
58921
58922
58923
58924
58925
58926
58927
58928
58929
58930
58931
58932
58933
58934
58935
58936
58937
58938
58939
58940
58941
58942
58943
58944
58945
58946
58947
58948
58949
58950
58951
58952
58953
58954
58955
58956
58957
58958
58959
58960
58961
58962
58963
58964
58965
58966
58967
58968
58969
58970
58971
58972
58973
58974
58975
58976
58977
58978
58979
58980
58981
58982
58983
58984
58985
58986
58987
58988
58989
58990
58991
58992
58993
58994
58995
58996
58997
58998
58999
59000
59001
59002
59003
59004
59005
59006
59007
59008
59009
59010
59011
59012
59013
59014
59015
59016
59017
59018
59019
59020
59021
59022
59023
59024
59025
59026
59027
59028
59029
59030
59031
59032
59033
59034
59035
59036
59037
59038
59039
59040
59041
59042
59043
59044
59045
59046
59047
59048
59049
59050
59051
59052
59053
59054
59055
59056
59057
59058
59059
59060
59061
59062
59063
59064
59065
59066
59067
59068
59069
59070
59071
59072
59073
59074
59075
59076
59077
59078
59079
59080
59081
59082
59083
59084
59085
59086
59087
59088
59089
59090
59091
59092
59093
59094
59095
59096
59097
59098
59099
59100
59101
59102
59103
59104
59105
59106
59107
59108
59109
59110
59111
59112
59113
59114
59115
59116
59117
59118
59119
59120
59121
59122
59123
59124
59125
59126
59127
59128
59129
59130
59131
59132
59133
59134
59135
59136
59137
59138
59139
59140
59141
59142
59143
59144
59145
59146
59147
59148
59149
59150
59151
59152
59153
59154
59155
59156
59157
59158
59159
59160
59161
59162
59163
59164
59165
59166
59167
59168
59169
59170
59171
59172
59173
59174
59175
59176
59177
59178
59179
59180
59181
59182
59183
59184
59185
59186
59187
59188
59189
59190
59191
59192
59193
59194
59195
59196
59197
59198
59199
59200
59201
59202
59203
59204
59205
59206
59207
59208
59209
59210
59211
59212
59213
59214
59215
59216
59217
59218
59219
59220
59221
59222
59223
59224
59225
59226
59227
59228
59229
59230
59231
59232
59233
59234
59235
59236
59237
59238
59239
59240
59241
59242
59243
59244
59245
59246
59247
59248
59249
59250
59251
59252
59253
59254
59255
59256
59257
59258
59259
59260
59261
59262
59263
59264
59265
59266
59267
59268
59269
59270
59271
59272
59273
59274
59275
59276
59277
59278
59279
59280
59281
59282
59283
59284
59285
59286
59287
59288
59289
59290
59291
59292
59293
59294
59295
59296
59297
59298
59299
59300
59301
59302
59303
59304
59305
59306
59307
59308
59309
59310
59311
59312
59313
59314
59315
59316
59317
59318
59319
59320
59321
59322
59323
59324
59325
59326
59327
59328
59329
59330
59331
59332
59333
59334
59335
59336
59337
59338
59339
59340
59341
59342
59343
59344
59345
59346
59347
59348
59349
59350
59351
59352
59353
59354
59355
59356
59357
59358
59359
59360
59361
59362
59363
59364
59365
59366
59367
59368
59369
59370
59371
59372
59373
59374
59375
59376
59377
59378
59379
59380
59381
59382
59383
59384
59385
59386
59387
59388
59389
59390
59391
59392
59393
59394
59395
59396
59397
59398
59399
59400
59401
59402
59403
59404
59405
59406
59407
59408
59409
59410
59411
59412
59413
59414
59415
59416
59417
59418
59419
59420
59421
59422
59423
59424
59425
59426
59427
59428
59429
59430
59431
59432
59433
59434
59435
59436
59437
59438
59439
59440
59441
59442
59443
59444
59445
59446
59447
59448
59449
59450
59451
59452
59453
59454
59455
59456
59457
59458
59459
59460
59461
59462
59463
59464
59465
59466
59467
59468
59469
59470
59471
59472
59473
59474
59475
59476
59477
59478
59479
59480
59481
59482
59483
59484
59485
59486
59487
59488
59489
59490
59491
59492
59493
59494
59495
59496
59497
59498
59499
59500
59501
59502
59503
59504
59505
59506
59507
59508
59509
59510
59511
59512
59513
59514
59515
59516
59517
59518
59519
59520
59521
59522
59523
59524
59525
59526
59527
59528
59529
59530
59531
59532
59533
59534
59535
59536
59537
59538
59539
59540
59541
59542
59543
59544
59545
59546
59547
59548
59549
59550
59551
59552
59553
59554
59555
59556
59557
59558
59559
59560
59561
59562
59563
59564
59565
59566
59567
59568
59569
59570
59571
59572
59573
59574
59575
59576
59577
59578
59579
59580
59581
59582
59583
59584
59585
59586
59587
59588
59589
59590
59591
59592
59593
59594
59595
59596
59597
59598
59599
59600
59601
59602
59603
59604
59605
59606
59607
59608
59609
59610
59611
59612
59613
59614
59615
59616
59617
59618
59619
59620
59621
59622
59623
59624
59625
59626
59627
59628
59629
59630
59631
59632
59633
59634
59635
59636
59637
59638
59639
59640
59641
59642
59643
59644
59645
59646
59647
59648
59649
59650
59651
59652
59653
59654
59655
59656
59657
59658
59659
59660
59661
59662
59663
59664
59665
59666
59667
59668
59669
59670
59671
59672
59673
59674
59675
59676
59677
59678
59679
59680
59681
59682
59683
59684
59685
59686
59687
59688
59689
59690
59691
59692
59693
59694
59695
59696
59697
59698
59699
59700
59701
59702
59703
59704
59705
59706
59707
59708
59709
59710
59711
59712
59713
59714
59715
59716
59717
59718
59719
59720
59721
59722
59723
59724
59725
59726
59727
59728
59729
59730
59731
59732
59733
59734
59735
59736
59737
59738
59739
59740
59741
59742
59743
59744
59745
59746
59747
59748
59749
59750
59751
59752
59753
59754
59755
59756
59757
59758
59759
59760
59761
59762
59763
59764
59765
59766
59767
59768
59769
59770
59771
59772
59773
59774
59775
59776
59777
59778
59779
59780
59781
59782
59783
59784
59785
59786
59787
59788
59789
59790
59791
59792
59793
59794
59795
59796
59797
59798
59799
59800
59801
59802
59803
59804
59805
59806
59807
59808
59809
59810
59811
59812
59813
59814
59815
59816
59817
59818
59819
59820
59821
59822
59823
59824
59825
59826
59827
59828
59829
59830
59831
59832
59833
59834
59835
59836
59837
59838
59839
59840
59841
59842
59843
59844
59845
59846
59847
59848
59849
59850
59851
59852
59853
59854
59855
59856
59857
59858
59859
59860
59861
59862
59863
59864
59865
59866
59867
59868
59869
59870
59871
59872
59873
59874
59875
59876
59877
59878
59879
59880
59881
59882
59883
59884
59885
59886
59887
59888
59889
59890
59891
59892
59893
59894
59895
59896
59897
59898
59899
59900
59901
59902
59903
59904
59905
59906
59907
59908
59909
59910
59911
59912
59913
59914
59915
59916
59917
59918
59919
59920
59921
59922
59923
59924
59925
59926
59927
59928
59929
59930
59931
59932
59933
59934
59935
59936
59937
59938
59939
59940
59941
59942
59943
59944
59945
59946
59947
59948
59949
59950
59951
59952
59953
59954
59955
59956
59957
59958
59959
59960
59961
59962
59963
59964
59965
59966
59967
59968
59969
59970
59971
59972
59973
59974
59975
59976
59977
59978
59979
59980
59981
59982
59983
59984
59985
59986
59987
59988
59989
59990
59991
59992
59993
59994
59995
59996
59997
59998
59999
60000
60001
60002
60003
60004
60005
60006
60007
60008
60009
60010
60011
60012
60013
60014
60015
60016
60017
60018
60019
60020
60021
60022
60023
60024
60025
60026
60027
60028
60029
60030
60031
60032
60033
60034
60035
60036
60037
60038
60039
60040
60041
60042
60043
60044
60045
60046
60047
60048
60049
60050
60051
60052
60053
60054
60055
60056
60057
60058
60059
60060
60061
60062
60063
60064
60065
60066
60067
60068
60069
60070
60071
60072
60073
60074
60075
60076
60077
60078
60079
60080
60081
60082
60083
60084
60085
60086
60087
60088
60089
60090
60091
60092
60093
60094
60095
60096
60097
60098
60099
60100
60101
60102
60103
60104
60105
60106
60107
60108
60109
60110
60111
60112
60113
60114
60115
60116
60117
60118
60119
60120
60121
60122
60123
60124
60125
60126
60127
60128
60129
60130
60131
60132
60133
60134
60135
60136
60137
60138
60139
60140
60141
60142
60143
60144
60145
60146
60147
60148
60149
60150
60151
60152
60153
60154
60155
60156
60157
60158
60159
60160
60161
60162
60163
60164
60165
60166
60167
60168
60169
60170
60171
60172
60173
60174
60175
60176
60177
60178
60179
60180
60181
60182
60183
60184
60185
60186
60187
60188
60189
60190
60191
60192
60193
60194
60195
60196
60197
60198
60199
60200
60201
60202
60203
60204
60205
60206
60207
60208
60209
60210
60211
60212
60213
60214
60215
60216
60217
60218
60219
60220
60221
60222
60223
60224
60225
60226
60227
60228
60229
60230
60231
60232
60233
60234
60235
60236
60237
60238
60239
60240
60241
60242
60243
60244
60245
60246
60247
60248
60249
60250
60251
60252
60253
60254
60255
60256
60257
60258
60259
60260
60261
60262
60263
60264
60265
60266
60267
60268
60269
60270
60271
60272
60273
60274
60275
60276
60277
60278
60279
60280
60281
60282
60283
60284
60285
60286
60287
60288
60289
60290
60291
60292
60293
60294
60295
60296
60297
60298
60299
60300
60301
60302
60303
60304
60305
60306
60307
60308
60309
60310
60311
60312
60313
60314
60315
60316
60317
60318
60319
60320
60321
60322
60323
60324
60325
60326
60327
60328
60329
60330
60331
60332
60333
60334
60335
60336
60337
60338
60339
60340
60341
60342
60343
60344
60345
60346
60347
60348
60349
60350
60351
60352
60353
60354
60355
60356
60357
60358
60359
60360
60361
60362
60363
60364
60365
60366
60367
60368
60369
60370
60371
60372
60373
60374
60375
60376
60377
60378
60379
60380
60381
60382
60383
60384
60385
60386
60387
60388
60389
60390
60391
60392
60393
60394
60395
60396
60397
60398
60399
60400
60401
60402
60403
60404
60405
60406
60407
60408
60409
60410
60411
60412
60413
60414
60415
60416
60417
60418
60419
60420
60421
60422
60423
60424
60425
60426
60427
60428
60429
60430
60431
60432
60433
60434
60435
60436
60437
60438
60439
60440
60441
60442
60443
60444
60445
60446
60447
60448
60449
60450
60451
60452
60453
60454
60455
60456
60457
60458
60459
60460
60461
60462
60463
60464
60465
60466
60467
60468
60469
60470
60471
60472
60473
60474
60475
60476
60477
60478
60479
60480
60481
60482
60483
60484
60485
60486
60487
60488
60489
60490
60491
60492
60493
60494
60495
60496
60497
60498
60499
60500
60501
60502
60503
60504
60505
60506
60507
60508
60509
60510
60511
60512
60513
60514
60515
60516
60517
60518
60519
60520
60521
60522
60523
60524
60525
60526
60527
60528
60529
60530
60531
60532
60533
60534
60535
60536
60537
60538
60539
60540
60541
60542
60543
60544
60545
60546
60547
60548
60549
60550
60551
60552
60553
60554
60555
60556
60557
60558
60559
60560
60561
60562
60563
60564
60565
60566
60567
60568
60569
60570
60571
60572
60573
60574
60575
60576
60577
60578
60579
60580
60581
60582
60583
60584
60585
60586
60587
60588
60589
60590
60591
60592
60593
60594
60595
60596
60597
60598
60599
60600
60601
60602
60603
60604
60605
60606
60607
60608
60609
60610
60611
60612
60613
60614
60615
60616
60617
60618
60619
60620
60621
60622
60623
60624
60625
60626
60627
60628
60629
60630
60631
60632
60633
60634
60635
60636
60637
60638
60639
60640
60641
60642
60643
60644
60645
60646
60647
60648
60649
60650
60651
60652
60653
60654
60655
60656
60657
60658
60659
60660
60661
60662
60663
60664
60665
60666
60667
60668
60669
60670
60671
60672
60673
60674
60675
60676
60677
60678
60679
60680
60681
60682
60683
60684
60685
60686
60687
60688
60689
60690
60691
60692
60693
60694
60695
60696
60697
60698
60699
60700
60701
60702
60703
60704
60705
60706
60707
60708
60709
60710
60711
60712
60713
60714
60715
60716
60717
60718
60719
60720
60721
60722
60723
60724
60725
60726
60727
60728
60729
60730
60731
60732
60733
60734
60735
60736
60737
60738
60739
60740
60741
60742
60743
60744
60745
60746
60747
60748
60749
60750
60751
60752
60753
60754
60755
60756
60757
60758
60759
60760
60761
60762
60763
60764
60765
60766
60767
60768
60769
60770
60771
60772
60773
60774
60775
60776
60777
60778
60779
60780
60781
60782
60783
60784
60785
60786
60787
60788
60789
60790
60791
60792
60793
60794
60795
60796
60797
60798
60799
60800
60801
60802
60803
60804
60805
60806
60807
60808
60809
60810
60811
60812
60813
60814
60815
60816
60817
60818
60819
60820
60821
60822
60823
60824
60825
60826
60827
60828
60829
60830
60831
60832
60833
60834
60835
60836
60837
60838
60839
60840
60841
60842
60843
60844
60845
60846
60847
60848
60849
60850
60851
60852
60853
60854
60855
60856
60857
60858
60859
60860
60861
60862
60863
60864
60865
60866
60867
60868
60869
60870
60871
60872
60873
60874
60875
60876
60877
60878
60879
60880
60881
60882
60883
60884
60885
60886
60887
60888
60889
60890
60891
60892
60893
60894
60895
60896
60897
60898
60899
60900
60901
60902
60903
60904
60905
60906
60907
60908
60909
60910
60911
60912
60913
60914
60915
60916
60917
60918
60919
60920
60921
60922
60923
60924
60925
60926
60927
60928
60929
60930
60931
60932
60933
60934
60935
60936
60937
60938
60939
60940
60941
60942
60943
60944
60945
60946
60947
60948
60949
60950
60951
60952
60953
60954
60955
60956
60957
60958
60959
60960
60961
60962
60963
60964
60965
60966
60967
60968
60969
60970
60971
60972
60973
60974
60975
60976
60977
60978
60979
60980
60981
60982
60983
60984
60985
60986
60987
60988
60989
60990
60991
60992
60993
60994
60995
60996
60997
60998
60999
61000
61001
61002
61003
61004
61005
61006
61007
61008
61009
61010
61011
61012
61013
61014
61015
61016
61017
61018
61019
61020
61021
61022
61023
61024
61025
61026
61027
61028
61029
61030
61031
61032
61033
61034
61035
61036
61037
61038
61039
61040
61041
61042
61043
61044
61045
61046
61047
61048
61049
61050
61051
61052
61053
61054
61055
61056
61057
61058
61059
61060
61061
61062
61063
61064
61065
61066
61067
61068
61069
61070
61071
61072
61073
61074
61075
61076
61077
61078
61079
61080
61081
61082
61083
61084
61085
61086
61087
61088
61089
61090
61091
61092
61093
61094
61095
61096
61097
61098
61099
61100
61101
61102
61103
61104
61105
61106
61107
61108
61109
61110
61111
61112
61113
61114
61115
61116
61117
61118
61119
61120
61121
61122
61123
61124
61125
61126
61127
61128
61129
61130
61131
61132
61133
61134
61135
61136
61137
61138
61139
61140
61141
61142
61143
61144
61145
61146
61147
61148
61149
61150
61151
61152
61153
61154
61155
61156
61157
61158
61159
61160
61161
61162
61163
61164
61165
61166
61167
61168
61169
61170
61171
61172
61173
61174
61175
61176
61177
61178
61179
61180
61181
61182
61183
61184
61185
61186
61187
61188
61189
61190
61191
61192
61193
61194
61195
61196
61197
61198
61199
61200
61201
61202
61203
61204
61205
61206
61207
61208
61209
61210
61211
61212
61213
61214
61215
61216
61217
61218
61219
61220
61221
61222
61223
61224
61225
61226
61227
61228
61229
61230
61231
61232
61233
61234
61235
61236
61237
61238
61239
61240
61241
61242
61243
61244
61245
61246
61247
61248
61249
61250
61251
61252
61253
61254
61255
61256
61257
61258
61259
61260
61261
61262
61263
61264
61265
61266
61267
61268
61269
61270
61271
61272
61273
61274
61275
61276
61277
61278
61279
61280
61281
61282
61283
61284
61285
61286
61287
61288
61289
61290
61291
61292
61293
61294
61295
61296
61297
61298
61299
61300
61301
61302
61303
61304
61305
61306
61307
61308
61309
61310
61311
61312
61313
61314
61315
61316
61317
61318
61319
61320
61321
61322
61323
61324
61325
61326
61327
61328
61329
61330
61331
61332
61333
61334
61335
61336
61337
61338
61339
61340
61341
61342
61343
61344
61345
61346
61347
61348
61349
61350
61351
61352
61353
61354
61355
61356
61357
61358
61359
61360
61361
61362
61363
61364
61365
61366
61367
61368
61369
61370
61371
61372
61373
61374
61375
61376
61377
61378
61379
61380
61381
61382
61383
61384
61385
61386
61387
61388
61389
61390
61391
61392
61393
61394
61395
61396
61397
61398
61399
61400
61401
61402
61403
61404
61405
61406
61407
61408
61409
61410
61411
61412
61413
61414
61415
61416
61417
61418
61419
61420
61421
61422
61423
61424
61425
61426
61427
61428
61429
61430
61431
61432
61433
61434
61435
61436
61437
61438
61439
61440
61441
61442
61443
61444
61445
61446
61447
61448
61449
61450
61451
61452
61453
61454
61455
61456
61457
61458
61459
61460
61461
61462
61463
61464
61465
61466
61467
61468
61469
61470
61471
61472
61473
61474
61475
61476
61477
61478
61479
61480
61481
61482
61483
61484
61485
61486
61487
61488
61489
61490
61491
61492
61493
61494
61495
61496
61497
61498
61499
61500
61501
61502
61503
61504
61505
61506
61507
61508
61509
61510
61511
61512
61513
61514
61515
61516
61517
61518
61519
61520
61521
61522
61523
61524
61525
61526
61527
61528
61529
61530
61531
61532
61533
61534
61535
61536
61537
61538
61539
61540
61541
61542
61543
61544
61545
61546
61547
61548
61549
61550
61551
61552
61553
61554
61555
61556
61557
61558
61559
61560
61561
61562
61563
61564
61565
61566
61567
61568
61569
61570
61571
61572
61573
61574
61575
61576
61577
61578
61579
61580
61581
61582
61583
61584
61585
61586
61587
61588
61589
61590
61591
61592
61593
61594
61595
61596
61597
61598
61599
61600
61601
61602
61603
61604
61605
61606
61607
61608
61609
61610
61611
61612
61613
61614
61615
61616
61617
61618
61619
61620
61621
61622
61623
61624
61625
61626
61627
61628
61629
61630
61631
61632
61633
61634
61635
61636
61637
61638
61639
61640
61641
61642
61643
61644
61645
61646
61647
61648
61649
61650
61651
61652
61653
61654
61655
61656
61657
61658
61659
61660
61661
61662
61663
61664
61665
61666
61667
61668
61669
61670
61671
61672
61673
61674
61675
61676
61677
61678
61679
61680
61681
61682
61683
61684
61685
61686
61687
61688
61689
61690
61691
61692
61693
61694
61695
61696
61697
61698
61699
61700
61701
61702
61703
61704
61705
61706
61707
61708
61709
61710
61711
61712
61713
61714
61715
61716
61717
61718
61719
61720
61721
61722
61723
61724
61725
61726
61727
61728
61729
61730
61731
61732
61733
61734
61735
61736
61737
61738
61739
61740
61741
61742
61743
61744
61745
61746
61747
61748
61749
61750
61751
61752
61753
61754
61755
61756
61757
61758
61759
61760
61761
61762
61763
61764
61765
61766
61767
61768
61769
61770
61771
61772
61773
61774
61775
61776
61777
61778
61779
61780
61781
61782
61783
61784
61785
61786
61787
61788
61789
61790
61791
61792
61793
61794
61795
61796
61797
61798
61799
61800
61801
61802
61803
61804
61805
61806
61807
61808
61809
61810
61811
61812
61813
61814
61815
61816
61817
61818
61819
61820
61821
61822
61823
61824
61825
61826
61827
61828
61829
61830
61831
61832
61833
61834
61835
61836
61837
61838
61839
61840
61841
61842
61843
61844
61845
61846
61847
61848
61849
61850
61851
61852
61853
61854
61855
61856
61857
61858
61859
61860
61861
61862
61863
61864
61865
61866
61867
61868
61869
61870
61871
61872
61873
61874
61875
61876
61877
61878
61879
61880
61881
61882
61883
61884
61885
61886
61887
61888
61889
61890
61891
61892
61893
61894
61895
61896
61897
61898
61899
61900
61901
61902
61903
61904
61905
61906
61907
61908
61909
61910
61911
61912
61913
61914
61915
61916
61917
61918
61919
61920
61921
61922
61923
61924
61925
61926
61927
61928
61929
61930
61931
61932
61933
61934
61935
61936
61937
61938
61939
61940
61941
61942
61943
61944
61945
61946
61947
61948
61949
61950
61951
61952
61953
61954
61955
61956
61957
61958
61959
61960
61961
61962
61963
61964
61965
61966
61967
61968
61969
61970
61971
61972
61973
61974
61975
61976
61977
61978
61979
61980
61981
61982
61983
61984
61985
61986
61987
61988
61989
61990
61991
61992
61993
61994
61995
61996
61997
61998
61999
62000
62001
62002
62003
62004
62005
62006
62007
62008
62009
62010
62011
62012
62013
62014
62015
62016
62017
62018
62019
62020
62021
62022
62023
62024
62025
62026
62027
62028
62029
62030
62031
62032
62033
62034
62035
62036
62037
62038
62039
62040
62041
62042
62043
62044
62045
62046
62047
62048
62049
62050
62051
62052
62053
62054
62055
62056
62057
62058
62059
62060
62061
62062
62063
62064
62065
62066
62067
62068
62069
62070
62071
62072
62073
62074
62075
62076
62077
62078
62079
62080
62081
62082
62083
62084
62085
62086
62087
62088
62089
62090
62091
62092
62093
62094
62095
62096
62097
62098
62099
62100
62101
62102
62103
62104
62105
62106
62107
62108
62109
62110
62111
62112
62113
62114
62115
62116
62117
62118
62119
62120
62121
62122
62123
62124
62125
62126
62127
62128
62129
62130
62131
62132
62133
62134
62135
62136
62137
62138
62139
62140
62141
62142
62143
62144
62145
62146
62147
62148
62149
62150
62151
62152
62153
62154
62155
62156
62157
62158
62159
62160
62161
62162
62163
62164
62165
62166
62167
62168
62169
62170
62171
62172
62173
62174
62175
62176
62177
62178
62179
62180
62181
62182
62183
62184
62185
62186
62187
62188
62189
62190
62191
62192
62193
62194
62195
62196
62197
62198
62199
62200
62201
62202
62203
62204
62205
62206
62207
62208
62209
62210
62211
62212
62213
62214
62215
62216
62217
62218
62219
62220
62221
62222
62223
62224
62225
62226
62227
62228
62229
62230
62231
62232
62233
62234
62235
62236
62237
62238
62239
62240
62241
62242
62243
62244
62245
62246
62247
62248
62249
62250
62251
62252
62253
62254
62255
62256
62257
62258
62259
62260
62261
62262
62263
62264
62265
62266
62267
62268
62269
62270
62271
62272
62273
62274
62275
62276
62277
62278
62279
62280
62281
62282
62283
62284
62285
62286
62287
62288
62289
62290
62291
62292
62293
62294
62295
62296
62297
62298
62299
62300
62301
62302
62303
62304
62305
62306
62307
62308
62309
62310
62311
62312
62313
62314
62315
62316
62317
62318
62319
62320
62321
62322
62323
62324
62325
62326
62327
62328
62329
62330
62331
62332
62333
62334
62335
62336
62337
62338
62339
62340
62341
62342
62343
62344
62345
62346
62347
62348
62349
62350
62351
62352
62353
62354
62355
62356
62357
62358
62359
62360
62361
62362
62363
62364
62365
62366
62367
62368
62369
62370
62371
62372
62373
62374
62375
62376
62377
62378
62379
62380
62381
62382
62383
62384
62385
62386
62387
62388
62389
62390
62391
62392
62393
62394
62395
62396
62397
62398
62399
62400
62401
62402
62403
62404
62405
62406
62407
62408
62409
62410
62411
62412
62413
62414
62415
62416
62417
62418
62419
62420
62421
62422
62423
62424
62425
62426
62427
62428
62429
62430
62431
62432
62433
62434
62435
62436
62437
62438
62439
62440
62441
62442
62443
62444
62445
62446
62447
62448
62449
62450
62451
62452
62453
62454
62455
62456
62457
62458
62459
62460
62461
62462
62463
62464
62465
62466
62467
62468
62469
62470
62471
62472
62473
62474
62475
62476
62477
62478
62479
62480
62481
62482
62483
62484
62485
62486
62487
62488
62489
62490
62491
62492
62493
62494
62495
62496
62497
62498
62499
62500
62501
62502
62503
62504
62505
62506
62507
62508
62509
62510
62511
62512
62513
62514
62515
62516
62517
62518
62519
62520
62521
62522
62523
62524
62525
62526
62527
62528
62529
62530
62531
62532
62533
62534
62535
62536
62537
62538
62539
62540
62541
62542
62543
62544
62545
62546
62547
62548
62549
62550
62551
62552
62553
62554
62555
62556
62557
62558
62559
62560
62561
62562
62563
62564
62565
62566
62567
62568
62569
62570
62571
62572
62573
62574
62575
62576
62577
62578
62579
62580
62581
62582
62583
62584
62585
62586
62587
62588
62589
62590
62591
62592
62593
62594
62595
62596
62597
62598
62599
62600
62601
62602
62603
62604
62605
62606
62607
62608
62609
62610
62611
62612
62613
62614
62615
62616
62617
62618
62619
62620
62621
62622
62623
62624
62625
62626
62627
62628
62629
62630
62631
62632
62633
62634
62635
62636
62637
62638
62639
62640
62641
62642
62643
62644
62645
62646
62647
62648
62649
62650
62651
62652
62653
62654
62655
62656
62657
62658
62659
62660
62661
62662
62663
62664
62665
62666
62667
62668
62669
62670
62671
62672
62673
62674
62675
62676
62677
62678
62679
62680
62681
62682
62683
62684
62685
62686
62687
62688
62689
62690
62691
62692
62693
62694
62695
62696
62697
62698
62699
62700
62701
62702
62703
62704
62705
62706
62707
62708
62709
62710
62711
62712
62713
62714
62715
62716
62717
62718
62719
62720
62721
62722
62723
62724
62725
62726
62727
62728
62729
62730
62731
62732
62733
62734
62735
62736
62737
62738
62739
62740
62741
62742
62743
62744
62745
62746
62747
62748
62749
62750
62751
62752
62753
62754
62755
62756
62757
62758
62759
62760
62761
62762
62763
62764
62765
62766
62767
62768
62769
62770
62771
62772
62773
62774
62775
62776
62777
62778
62779
62780
62781
62782
62783
62784
62785
62786
62787
62788
62789
62790
62791
62792
62793
62794
62795
62796
62797
62798
62799
62800
62801
62802
62803
62804
62805
62806
62807
62808
62809
62810
62811
62812
62813
62814
62815
62816
62817
62818
62819
62820
62821
62822
62823
62824
62825
62826
62827
62828
62829
62830
62831
62832
62833
62834
62835
62836
62837
62838
62839
62840
62841
62842
62843
62844
62845
62846
62847
62848
62849
62850
62851
62852
62853
62854
62855
62856
62857
62858
62859
62860
62861
62862
62863
62864
62865
62866
62867
62868
62869
62870
62871
62872
62873
62874
62875
62876
62877
62878
62879
62880
62881
62882
62883
62884
62885
62886
62887
62888
62889
62890
62891
62892
62893
62894
62895
62896
62897
62898
62899
62900
62901
62902
62903
62904
62905
62906
62907
62908
62909
62910
62911
62912
62913
62914
62915
62916
62917
62918
62919
62920
62921
62922
62923
62924
62925
62926
62927
62928
62929
62930
62931
62932
62933
62934
62935
62936
62937
62938
62939
62940
62941
62942
62943
62944
62945
62946
62947
62948
62949
62950
62951
62952
62953
62954
62955
62956
62957
62958
62959
62960
62961
62962
62963
62964
62965
62966
62967
62968
62969
62970
62971
62972
62973
62974
62975
62976
62977
62978
62979
62980
62981
62982
62983
62984
62985
62986
62987
62988
62989
62990
62991
62992
62993
62994
62995
62996
62997
62998
62999
63000
63001
63002
63003
63004
63005
63006
63007
63008
63009
63010
63011
63012
63013
63014
63015
63016
63017
63018
63019
63020
63021
63022
63023
63024
63025
63026
63027
63028
63029
63030
63031
63032
63033
63034
63035
63036
63037
63038
63039
63040
63041
63042
63043
63044
63045
63046
63047
63048
63049
63050
63051
63052
63053
63054
63055
63056
63057
63058
63059
63060
63061
63062
63063
63064
63065
63066
63067
63068
63069
63070
63071
63072
63073
63074
63075
63076
63077
63078
63079
63080
63081
63082
63083
63084
63085
63086
63087
63088
63089
63090
63091
63092
63093
63094
63095
63096
63097
63098
63099
63100
63101
63102
63103
63104
63105
63106
63107
63108
63109
63110
63111
63112
63113
63114
63115
63116
63117
63118
63119
63120
63121
63122
63123
63124
63125
63126
63127
63128
63129
63130
63131
63132
63133
63134
63135
63136
63137
63138
63139
63140
63141
63142
63143
63144
63145
63146
63147
63148
63149
63150
63151
63152
63153
63154
63155
63156
63157
63158
63159
63160
63161
63162
63163
63164
63165
63166
63167
63168
63169
63170
63171
63172
63173
63174
63175
63176
63177
63178
63179
63180
63181
63182
63183
63184
63185
63186
63187
63188
63189
63190
63191
63192
63193
63194
63195
63196
63197
63198
63199
63200
63201
63202
63203
63204
63205
63206
63207
63208
63209
63210
63211
63212
63213
63214
63215
63216
63217
63218
63219
63220
63221
63222
63223
63224
63225
63226
63227
63228
63229
63230
63231
63232
63233
63234
63235
63236
63237
63238
63239
63240
63241
63242
63243
63244
63245
63246
63247
63248
63249
63250
63251
63252
63253
63254
63255
63256
63257
63258
63259
63260
63261
63262
63263
63264
63265
63266
63267
63268
63269
63270
63271
63272
63273
63274
63275
63276
63277
63278
63279
63280
63281
63282
63283
63284
63285
63286
63287
63288
63289
63290
63291
63292
63293
63294
63295
63296
63297
63298
63299
63300
63301
63302
63303
63304
63305
63306
63307
63308
63309
63310
63311
63312
63313
63314
63315
63316
63317
63318
63319
63320
63321
63322
63323
63324
63325
63326
63327
63328
63329
63330
63331
63332
63333
63334
63335
63336
63337
63338
63339
63340
63341
63342
63343
63344
63345
63346
63347
63348
63349
63350
63351
63352
63353
63354
63355
63356
63357
63358
63359
63360
63361
63362
63363
63364
63365
63366
63367
63368
63369
63370
63371
63372
63373
63374
63375
63376
63377
63378
63379
63380
63381
63382
63383
63384
63385
63386
63387
63388
63389
63390
63391
63392
63393
63394
63395
63396
63397
63398
63399
63400
63401
63402
63403
63404
63405
63406
63407
63408
63409
63410
63411
63412
63413
63414
63415
63416
63417
63418
63419
63420
63421
63422
63423
63424
63425
63426
63427
63428
63429
63430
63431
63432
63433
63434
63435
63436
63437
63438
63439
63440
63441
63442
63443
63444
63445
63446
63447
63448
63449
63450
63451
63452
63453
63454
63455
63456
63457
63458
63459
63460
63461
63462
63463
63464
63465
63466
63467
63468
63469
63470
63471
63472
63473
63474
63475
63476
63477
63478
63479
63480
63481
63482
63483
63484
63485
63486
63487
63488
63489
63490
63491
63492
63493
63494
63495
63496
63497
63498
63499
63500
63501
63502
63503
63504
63505
63506
63507
63508
63509
63510
63511
63512
63513
63514
63515
63516
63517
63518
63519
63520
63521
63522
63523
63524
63525
63526
63527
63528
63529
63530
63531
63532
63533
63534
63535
63536
63537
63538
63539
63540
63541
63542
63543
63544
63545
63546
63547
63548
63549
63550
63551
63552
63553
63554
63555
63556
63557
63558
63559
63560
63561
63562
63563
63564
63565
63566
63567
63568
63569
63570
63571
63572
63573
63574
63575
63576
63577
63578
63579
63580
63581
63582
63583
63584
63585
63586
63587
63588
63589
63590
63591
63592
63593
63594
63595
63596
63597
63598
63599
63600
63601
63602
63603
63604
63605
63606
63607
63608
63609
63610
63611
63612
63613
63614
63615
63616
63617
63618
63619
63620
63621
63622
63623
63624
63625
63626
63627
63628
63629
63630
63631
63632
63633
63634
63635
63636
63637
63638
63639
63640
63641
63642
63643
63644
63645
63646
63647
63648
63649
63650
63651
63652
63653
63654
63655
63656
63657
63658
63659
63660
63661
63662
63663
63664
63665
63666
63667
63668
63669
63670
63671
63672
63673
63674
63675
63676
63677
63678
63679
63680
63681
63682
63683
63684
63685
63686
63687
63688
63689
63690
63691
63692
63693
63694
63695
63696
63697
63698
63699
63700
63701
63702
63703
63704
63705
63706
63707
63708
63709
63710
63711
63712
63713
63714
63715
63716
63717
63718
63719
63720
63721
63722
63723
63724
63725
63726
63727
63728
63729
63730
63731
63732
63733
63734
63735
63736
63737
63738
63739
63740
63741
63742
63743
63744
63745
63746
63747
63748
63749
63750
63751
63752
63753
63754
63755
63756
63757
63758
63759
63760
63761
63762
63763
63764
63765
63766
63767
63768
63769
63770
63771
63772
63773
63774
63775
63776
63777
63778
63779
63780
63781
63782
63783
63784
63785
63786
63787
63788
63789
63790
63791
63792
63793
63794
63795
63796
63797
63798
63799
63800
63801
63802
63803
63804
63805
63806
63807
63808
63809
63810
63811
63812
63813
63814
63815
63816
63817
63818
63819
63820
63821
63822
63823
63824
63825
63826
63827
63828
63829
63830
63831
63832
63833
63834
63835
63836
63837
63838
63839
63840
63841
63842
63843
63844
63845
63846
63847
63848
63849
63850
63851
63852
63853
63854
63855
63856
63857
63858
63859
63860
63861
63862
63863
63864
63865
63866
63867
63868
63869
63870
63871
63872
63873
63874
63875
63876
63877
63878
63879
63880
63881
63882
63883
63884
63885
63886
63887
63888
63889
63890
63891
63892
63893
63894
63895
63896
63897
63898
63899
63900
63901
63902
63903
63904
63905
63906
63907
63908
63909
63910
63911
63912
63913
63914
63915
63916
63917
63918
63919
63920
63921
63922
63923
63924
63925
63926
63927
63928
63929
63930
63931
63932
63933
63934
63935
63936
63937
63938
63939
63940
63941
63942
63943
63944
63945
63946
63947
63948
63949
63950
63951
63952
63953
63954
63955
63956
63957
63958
63959
63960
63961
63962
63963
63964
63965
63966
63967
63968
63969
63970
63971
63972
63973
63974
63975
63976
63977
63978
63979
63980
63981
63982
63983
63984
63985
63986
63987
63988
63989
63990
63991
63992
63993
63994
63995
63996
63997
63998
63999
64000
64001
64002
64003
64004
64005
64006
64007
64008
64009
64010
64011
64012
64013
64014
64015
64016
64017
64018
64019
64020
64021
64022
64023
64024
64025
64026
64027
64028
64029
64030
64031
64032
64033
64034
64035
64036
64037
64038
64039
64040
64041
64042
64043
64044
64045
64046
64047
64048
64049
64050
64051
64052
64053
64054
64055
64056
64057
64058
64059
64060
64061
64062
64063
64064
64065
64066
64067
64068
64069
64070
64071
64072
64073
64074
64075
64076
64077
64078
64079
64080
64081
64082
64083
64084
64085
64086
64087
64088
64089
64090
64091
64092
64093
64094
64095
64096
64097
64098
64099
64100
64101
64102
64103
64104
64105
64106
64107
64108
64109
64110
64111
64112
64113
64114
64115
64116
64117
64118
64119
64120
64121
64122
64123
64124
64125
64126
64127
64128
64129
64130
64131
64132
64133
64134
64135
64136
64137
64138
64139
64140
64141
64142
64143
64144
64145
64146
64147
64148
64149
64150
64151
64152
64153
64154
64155
64156
64157
64158
64159
64160
64161
64162
64163
64164
64165
64166
64167
64168
64169
64170
64171
64172
64173
64174
64175
64176
64177
64178
64179
64180
64181
64182
64183
64184
64185
64186
64187
64188
64189
64190
64191
64192
64193
64194
64195
64196
64197
64198
64199
64200
64201
64202
64203
64204
64205
64206
64207
64208
64209
64210
64211
64212
64213
64214
64215
64216
64217
64218
64219
64220
64221
64222
64223
64224
64225
64226
64227
64228
64229
64230
64231
64232
64233
64234
64235
64236
64237
64238
64239
64240
64241
64242
64243
64244
64245
64246
64247
64248
64249
64250
64251
64252
64253
64254
64255
64256
64257
64258
64259
64260
64261
64262
64263
64264
64265
64266
64267
64268
64269
64270
64271
64272
64273
64274
64275
64276
64277
64278
64279
64280
64281
64282
64283
64284
64285
64286
64287
64288
64289
64290
64291
64292
64293
64294
64295
64296
64297
64298
64299
64300
64301
64302
64303
64304
64305
64306
64307
64308
64309
64310
64311
64312
64313
64314
64315
64316
64317
64318
64319
64320
64321
64322
64323
64324
64325
64326
64327
64328
64329
64330
64331
64332
64333
64334
64335
64336
64337
64338
64339
64340
64341
64342
64343
64344
64345
64346
64347
64348
64349
64350
64351
64352
64353
64354
64355
64356
64357
64358
64359
64360
64361
64362
64363
64364
64365
64366
64367
64368
64369
64370
64371
64372
64373
64374
64375
64376
64377
64378
64379
64380
64381
64382
64383
64384
64385
64386
64387
64388
64389
64390
64391
64392
64393
64394
64395
64396
64397
64398
64399
64400
64401
64402
64403
64404
64405
64406
64407
64408
64409
64410
64411
64412
64413
64414
64415
64416
64417
64418
64419
64420
64421
64422
64423
64424
64425
64426
64427
64428
64429
64430
64431
64432
64433
64434
64435
64436
64437
64438
64439
64440
64441
64442
64443
64444
64445
64446
64447
64448
64449
64450
64451
64452
64453
64454
64455
64456
64457
64458
64459
64460
64461
64462
64463
64464
64465
64466
64467
64468
64469
64470
64471
64472
64473
64474
64475
64476
64477
64478
64479
64480
64481
64482
64483
64484
64485
64486
64487
64488
64489
64490
64491
64492
64493
64494
64495
64496
64497
64498
64499
64500
64501
64502
64503
64504
64505
64506
64507
64508
64509
64510
64511
64512
64513
64514
64515
64516
64517
64518
64519
64520
64521
64522
64523
64524
64525
64526
64527
64528
64529
64530
64531
64532
64533
64534
64535
64536
64537
64538
64539
64540
64541
64542
64543
64544
64545
64546
64547
64548
64549
64550
64551
64552
64553
64554
64555
64556
64557
64558
64559
64560
64561
64562
64563
64564
64565
64566
64567
64568
64569
64570
64571
64572
64573
64574
64575
64576
64577
64578
64579
64580
64581
64582
64583
64584
64585
64586
64587
64588
64589
64590
64591
64592
64593
64594
64595
64596
64597
64598
64599
64600
64601
64602
64603
64604
64605
64606
64607
64608
64609
64610
64611
64612
64613
64614
64615
64616
64617
64618
64619
64620
64621
64622
64623
64624
64625
64626
64627
64628
64629
64630
64631
64632
64633
64634
64635
64636
64637
64638
64639
64640
64641
64642
64643
64644
64645
64646
64647
64648
64649
64650
64651
64652
64653
64654
64655
64656
64657
64658
64659
64660
64661
64662
64663
64664
64665
64666
64667
64668
64669
64670
64671
64672
64673
64674
64675
64676
64677
64678
64679
64680
64681
64682
64683
64684
64685
64686
64687
64688
64689
64690
64691
64692
64693
64694
64695
64696
64697
64698
64699
64700
64701
64702
64703
64704
64705
64706
64707
64708
64709
64710
64711
64712
64713
64714
64715
64716
64717
64718
64719
64720
64721
64722
64723
64724
64725
64726
64727
64728
64729
64730
64731
64732
64733
64734
64735
64736
64737
64738
64739
64740
64741
64742
64743
64744
64745
64746
64747
64748
64749
64750
64751
64752
64753
64754
64755
64756
64757
64758
64759
64760
64761
64762
64763
64764
64765
64766
64767
64768
64769
64770
64771
64772
64773
64774
64775
64776
64777
64778
64779
64780
64781
64782
64783
64784
64785
64786
64787
64788
64789
64790
64791
64792
64793
64794
64795
64796
64797
64798
64799
64800
64801
64802
64803
64804
64805
64806
64807
64808
64809
64810
64811
64812
64813
64814
64815
64816
64817
64818
64819
64820
64821
64822
64823
64824
64825
64826
64827
64828
64829
64830
64831
64832
64833
64834
64835
64836
64837
64838
64839
64840
64841
64842
64843
64844
64845
64846
64847
64848
64849
64850
64851
64852
64853
64854
64855
64856
64857
64858
64859
64860
64861
64862
64863
64864
64865
64866
64867
64868
64869
64870
64871
64872
64873
64874
64875
64876
64877
64878
64879
64880
64881
64882
64883
64884
64885
64886
64887
64888
64889
64890
64891
64892
64893
64894
64895
64896
64897
64898
64899
64900
64901
64902
64903
64904
64905
64906
64907
64908
64909
64910
64911
64912
64913
64914
64915
64916
64917
64918
64919
64920
64921
64922
64923
64924
64925
64926
64927
64928
64929
64930
64931
64932
64933
64934
64935
64936
64937
64938
64939
64940
64941
64942
64943
64944
64945
64946
64947
64948
64949
64950
64951
64952
64953
64954
64955
64956
64957
64958
64959
64960
64961
64962
64963
64964
64965
64966
64967
64968
64969
64970
64971
64972
64973
64974
64975
64976
64977
64978
64979
64980
64981
64982
64983
64984
64985
64986
64987
64988
64989
64990
64991
64992
64993
64994
64995
64996
64997
64998
64999
65000
65001
65002
65003
65004
65005
65006
65007
65008
65009
65010
65011
65012
65013
65014
65015
65016
65017
65018
65019
65020
65021
65022
65023
65024
65025
65026
65027
65028
65029
65030
65031
65032
65033
65034
65035
65036
65037
65038
65039
65040
65041
65042
65043
65044
65045
65046
65047
65048
65049
65050
65051
65052
65053
65054
65055
65056
65057
65058
65059
65060
65061
65062
65063
65064
65065
65066
65067
65068
65069
65070
65071
65072
65073
65074
65075
65076
65077
65078
65079
65080
65081
65082
65083
65084
65085
65086
65087
65088
65089
65090
65091
65092
65093
65094
65095
65096
65097
65098
65099
65100
65101
65102
65103
65104
65105
65106
65107
65108
65109
65110
65111
65112
65113
65114
65115
65116
65117
65118
65119
65120
65121
65122
65123
65124
65125
65126
65127
65128
65129
65130
65131
65132
65133
65134
65135
65136
65137
65138
65139
65140
65141
65142
65143
65144
65145
65146
65147
65148
65149
65150
65151
65152
65153
65154
65155
65156
65157
65158
65159
65160
65161
65162
65163
65164
65165
65166
65167
65168
65169
65170
65171
65172
65173
65174
65175
65176
65177
65178
65179
65180
65181
65182
65183
65184
65185
65186
65187
65188
65189
65190
65191
65192
65193
65194
65195
65196
65197
65198
65199
65200
65201
65202
65203
65204
65205
65206
65207
65208
65209
65210
65211
65212
65213
65214
65215
65216
65217
65218
65219
65220
65221
65222
65223
65224
65225
65226
65227
65228
65229
65230
65231
65232
65233
65234
65235
65236
65237
65238
65239
65240
65241
65242
65243
65244
65245
65246
65247
65248
65249
65250
65251
65252
65253
65254
65255
65256
65257
65258
65259
65260
65261
65262
65263
65264
65265
65266
65267
65268
65269
65270
65271
65272
65273
65274
65275
65276
65277
65278
65279
65280
65281
65282
65283
65284
65285
65286
65287
65288
65289
65290
65291
65292
65293
65294
65295
65296
65297
65298
65299
65300
65301
65302
65303
65304
65305
65306
65307
65308
65309
65310
65311
65312
65313
65314
65315
65316
65317
65318
65319
65320
65321
65322
65323
65324
65325
65326
65327
65328
65329
65330
65331
65332
65333
65334
65335
65336
65337
65338
65339
65340
65341
65342
65343
65344
65345
65346
65347
65348
65349
65350
65351
65352
65353
65354
65355
65356
65357
65358
65359
65360
65361
65362
65363
65364
65365
65366
65367
65368
65369
65370
65371
65372
65373
65374
65375
65376
65377
65378
65379
65380
65381
65382
65383
65384
65385
65386
65387
65388
65389
65390
65391
65392
65393
65394
65395
65396
65397
65398
65399
65400
65401
65402
65403
65404
65405
65406
65407
65408
65409
65410
65411
65412
65413
65414
65415
65416
65417
65418
65419
65420
65421
65422
65423
65424
65425
65426
65427
65428
65429
65430
65431
65432
65433
65434
65435
65436
65437
65438
65439
65440
65441
65442
65443
65444
65445
65446
65447
65448
65449
65450
65451
65452
65453
65454
65455
65456
65457
65458
65459
65460
65461
65462
65463
65464
65465
65466
65467
65468
65469
65470
65471
65472
65473
65474
65475
65476
65477
65478
65479
65480
65481
65482
65483
65484
65485
65486
65487
65488
65489
65490
65491
65492
65493
65494
65495
65496
65497
65498
65499
65500
65501
65502
65503
65504
65505
65506
65507
65508
65509
65510
65511
65512
65513
65514
65515
65516
65517
65518
65519
65520
65521
65522
65523
65524
65525
65526
65527
65528
65529
65530
65531
65532
65533
65534
65535
65536
65537
65538
65539
65540
65541
65542
65543
65544
65545
65546
65547
65548
65549
65550
65551
65552
65553
65554
65555
65556
65557
65558
65559
65560
65561
65562
65563
65564
65565
65566
65567
65568
65569
65570
65571
65572
65573
65574
65575
65576
65577
65578
65579
65580
65581
65582
65583
65584
65585
65586
65587
65588
65589
65590
65591
65592
65593
65594
65595
65596
65597
65598
65599
65600
65601
65602
65603
65604
65605
65606
65607
65608
65609
65610
65611
65612
65613
65614
65615
65616
65617
65618
65619
65620
65621
65622
65623
65624
65625
65626
65627
65628
65629
65630
65631
65632
65633
65634
65635
65636
65637
65638
65639
65640
65641
65642
65643
65644
65645
65646
65647
65648
65649
65650
65651
65652
65653
65654
65655
65656
65657
65658
65659
65660
65661
65662
65663
65664
65665
65666
65667
65668
65669
65670
65671
65672
65673
65674
65675
65676
65677
65678
65679
65680
65681
65682
65683
65684
65685
65686
65687
65688
65689
65690
65691
65692
65693
65694
65695
65696
65697
65698
65699
65700
65701
65702
65703
65704
65705
65706
65707
65708
65709
65710
65711
65712
65713
65714
65715
65716
65717
65718
65719
65720
65721
65722
65723
65724
65725
65726
65727
65728
65729
65730
65731
65732
65733
65734
65735
65736
65737
65738
65739
65740
65741
65742
65743
65744
65745
65746
65747
65748
65749
65750
65751
65752
65753
65754
65755
65756
65757
65758
65759
65760
65761
65762
65763
65764
65765
65766
65767
65768
65769
65770
65771
65772
65773
65774
65775
65776
65777
65778
65779
65780
65781
65782
65783
65784
65785
65786
65787
65788
65789
65790
65791
65792
65793
65794
65795
65796
65797
65798
65799
65800
65801
65802
65803
65804
65805
65806
65807
65808
65809
65810
65811
65812
65813
65814
65815
65816
65817
65818
65819
65820
65821
65822
65823
65824
65825
65826
65827
65828
65829
65830
65831
65832
65833
65834
65835
65836
65837
65838
65839
65840
65841
65842
65843
65844
65845
65846
65847
65848
65849
65850
65851
65852
65853
65854
65855
65856
65857
65858
65859
65860
65861
65862
65863
65864
65865
65866
65867
65868
65869
65870
65871
65872
65873
65874
65875
65876
65877
65878
65879
65880
65881
65882
65883
65884
65885
65886
65887
65888
65889
65890
65891
65892
65893
65894
65895
65896
65897
65898
65899
65900
65901
65902
65903
65904
65905
65906
65907
65908
65909
65910
65911
65912
65913
65914
65915
65916
65917
65918
65919
65920
65921
65922
65923
65924
65925
65926
65927
65928
65929
65930
65931
65932
65933
65934
65935
65936
65937
65938
65939
65940
65941
65942
65943
65944
65945
65946
65947
65948
65949
65950
65951
65952
65953
65954
65955
65956
65957
65958
65959
65960
65961
65962
65963
65964
65965
65966
65967
65968
65969
65970
65971
65972
65973
65974
65975
65976
65977
65978
65979
65980
65981
65982
65983
65984
65985
65986
65987
65988
65989
65990
65991
65992
65993
65994
65995
65996
65997
65998
65999
66000
66001
66002
66003
66004
66005
66006
66007
66008
66009
66010
66011
66012
66013
66014
66015
66016
66017
66018
66019
66020
66021
66022
66023
66024
66025
66026
66027
66028
66029
66030
66031
66032
66033
66034
66035
66036
66037
66038
66039
66040
66041
66042
66043
66044
66045
66046
66047
66048
66049
66050
66051
66052
66053
66054
66055
66056
66057
66058
66059
66060
66061
66062
66063
66064
66065
66066
66067
66068
66069
66070
66071
66072
66073
66074
66075
66076
66077
66078
66079
66080
66081
66082
66083
66084
66085
66086
66087
66088
66089
66090
66091
66092
66093
66094
66095
66096
66097
66098
66099
66100
66101
66102
66103
66104
66105
66106
66107
66108
66109
66110
66111
66112
66113
66114
66115
66116
66117
66118
66119
66120
66121
66122
66123
66124
66125
66126
66127
66128
66129
66130
66131
66132
66133
66134
66135
66136
66137
66138
66139
66140
66141
66142
66143
66144
66145
66146
66147
66148
66149
66150
66151
66152
66153
66154
66155
66156
66157
66158
66159
66160
66161
66162
66163
66164
66165
66166
66167
66168
66169
66170
66171
66172
66173
66174
66175
66176
66177
66178
66179
66180
66181
66182
66183
66184
66185
66186
66187
66188
66189
66190
66191
66192
66193
66194
66195
66196
66197
66198
66199
66200
66201
66202
66203
66204
66205
66206
66207
66208
66209
66210
66211
66212
66213
66214
66215
66216
66217
66218
66219
66220
66221
66222
66223
66224
66225
66226
66227
66228
66229
66230
66231
66232
66233
66234
66235
66236
66237
66238
66239
66240
66241
66242
66243
66244
66245
66246
66247
66248
66249
66250
66251
66252
66253
66254
66255
66256
66257
66258
66259
66260
66261
66262
66263
66264
66265
66266
66267
66268
66269
66270
66271
66272
66273
66274
66275
66276
66277
66278
66279
66280
66281
66282
66283
66284
66285
66286
66287
66288
66289
66290
66291
66292
66293
66294
66295
66296
66297
66298
66299
66300
66301
66302
66303
66304
66305
66306
66307
66308
66309
66310
66311
66312
66313
66314
66315
66316
66317
66318
66319
66320
66321
66322
66323
66324
66325
66326
66327
66328
66329
66330
66331
66332
66333
66334
66335
66336
66337
66338
66339
66340
66341
66342
66343
66344
66345
66346
66347
66348
66349
66350
66351
66352
66353
66354
66355
66356
66357
66358
66359
66360
66361
66362
66363
66364
66365
66366
66367
66368
66369
66370
66371
66372
66373
66374
66375
66376
66377
66378
66379
66380
66381
66382
66383
66384
66385
66386
66387
66388
66389
66390
66391
66392
66393
66394
66395
66396
66397
66398
66399
66400
66401
66402
66403
66404
66405
66406
66407
66408
66409
66410
66411
66412
66413
66414
66415
66416
66417
66418
66419
66420
66421
66422
66423
66424
66425
66426
66427
66428
66429
66430
66431
66432
66433
66434
66435
66436
66437
66438
66439
66440
66441
66442
66443
66444
66445
66446
66447
66448
66449
66450
66451
66452
66453
66454
66455
66456
66457
66458
66459
66460
66461
66462
66463
66464
66465
66466
66467
66468
66469
66470
66471
66472
66473
66474
66475
66476
66477
66478
66479
66480
66481
66482
66483
66484
66485
66486
66487
66488
66489
66490
66491
66492
66493
66494
66495
66496
66497
66498
66499
66500
66501
66502
66503
66504
66505
66506
66507
66508
66509
66510
66511
66512
66513
66514
66515
66516
66517
66518
66519
66520
66521
66522
66523
66524
66525
66526
66527
66528
66529
66530
66531
66532
66533
66534
66535
66536
66537
66538
66539
66540
66541
66542
66543
66544
66545
66546
66547
66548
66549
66550
66551
66552
66553
66554
66555
66556
66557
66558
66559
66560
66561
66562
66563
66564
66565
66566
66567
66568
66569
66570
66571
66572
66573
66574
66575
66576
66577
66578
66579
66580
66581
66582
66583
66584
66585
66586
66587
66588
66589
66590
66591
66592
66593
66594
66595
66596
66597
66598
66599
66600
66601
66602
66603
66604
66605
66606
66607
66608
66609
66610
66611
66612
66613
66614
66615
66616
66617
66618
66619
66620
66621
66622
66623
66624
66625
66626
66627
66628
66629
66630
66631
66632
66633
66634
66635
66636
66637
66638
66639
66640
66641
66642
66643
66644
66645
66646
66647
66648
66649
66650
66651
66652
66653
66654
66655
66656
66657
66658
66659
66660
66661
66662
66663
66664
66665
66666
66667
66668
66669
66670
66671
66672
66673
66674
66675
66676
66677
66678
66679
66680
66681
66682
66683
66684
66685
66686
66687
66688
66689
66690
66691
66692
66693
66694
66695
66696
66697
66698
66699
66700
66701
66702
66703
66704
66705
66706
66707
66708
66709
66710
66711
66712
66713
66714
66715
66716
66717
66718
66719
66720
66721
66722
66723
66724
66725
66726
66727
66728
66729
66730
66731
66732
66733
66734
66735
66736
66737
66738
66739
66740
66741
66742
66743
66744
66745
66746
66747
66748
66749
66750
66751
66752
66753
66754
66755
66756
66757
66758
66759
66760
66761
66762
66763
66764
66765
66766
66767
66768
66769
66770
66771
66772
66773
66774
66775
66776
66777
66778
66779
66780
66781
66782
66783
66784
66785
66786
66787
66788
66789
66790
66791
66792
66793
66794
66795
66796
66797
66798
66799
66800
66801
66802
66803
66804
66805
66806
66807
66808
66809
66810
66811
66812
66813
66814
66815
66816
66817
66818
66819
66820
66821
66822
66823
66824
66825
66826
66827
66828
66829
66830
66831
66832
66833
66834
66835
66836
66837
66838
66839
66840
66841
66842
66843
66844
66845
66846
66847
66848
66849
66850
66851
66852
66853
66854
66855
66856
66857
66858
66859
66860
66861
66862
66863
66864
66865
66866
66867
66868
66869
66870
66871
66872
66873
66874
66875
66876
66877
66878
66879
66880
66881
66882
66883
66884
66885
66886
66887
66888
66889
66890
66891
66892
66893
66894
66895
66896
66897
66898
66899
66900
66901
66902
66903
66904
66905
66906
66907
66908
66909
66910
66911
66912
66913
66914
66915
66916
66917
66918
66919
66920
66921
66922
66923
66924
66925
66926
66927
66928
66929
66930
66931
66932
66933
66934
66935
66936
66937
66938
66939
66940
66941
66942
66943
66944
66945
66946
66947
66948
66949
66950
66951
66952
66953
66954
66955
66956
66957
66958
66959
66960
66961
66962
66963
66964
66965
66966
66967
66968
66969
66970
66971
66972
66973
66974
66975
66976
66977
66978
66979
66980
66981
66982
66983
66984
66985
66986
66987
66988
66989
66990
66991
66992
66993
66994
66995
66996
66997
66998
66999
67000
67001
67002
67003
67004
67005
67006
67007
67008
67009
67010
67011
67012
67013
67014
67015
67016
67017
67018
67019
67020
67021
67022
67023
67024
67025
67026
67027
67028
67029
67030
67031
67032
67033
67034
67035
67036
67037
67038
67039
67040
67041
67042
67043
67044
67045
67046
67047
67048
67049
67050
67051
67052
67053
67054
67055
67056
67057
67058
67059
67060
67061
67062
67063
67064
67065
67066
67067
67068
67069
67070
67071
67072
67073
67074
67075
67076
67077
67078
67079
67080
67081
67082
67083
67084
67085
67086
67087
67088
67089
67090
67091
67092
67093
67094
67095
67096
67097
67098
67099
67100
67101
67102
67103
67104
67105
67106
67107
67108
67109
67110
67111
67112
67113
67114
67115
67116
67117
67118
67119
67120
67121
67122
67123
67124
67125
67126
67127
67128
67129
67130
67131
67132
67133
67134
67135
67136
67137
67138
67139
67140
67141
67142
67143
67144
67145
67146
67147
67148
67149
67150
67151
67152
67153
67154
67155
67156
67157
67158
67159
67160
67161
67162
67163
67164
67165
67166
67167
67168
67169
67170
67171
67172
67173
67174
67175
67176
67177
67178
67179
67180
67181
67182
67183
67184
67185
67186
67187
67188
67189
67190
67191
67192
67193
67194
67195
67196
67197
67198
67199
67200
67201
67202
67203
67204
67205
67206
67207
67208
67209
67210
67211
67212
67213
67214
67215
67216
67217
67218
67219
67220
67221
67222
67223
67224
67225
67226
67227
67228
67229
67230
67231
67232
67233
67234
67235
67236
67237
67238
67239
67240
67241
67242
67243
67244
67245
67246
67247
67248
67249
67250
67251
67252
67253
67254
67255
67256
67257
67258
67259
67260
67261
67262
67263
67264
67265
67266
67267
67268
67269
67270
67271
67272
67273
67274
67275
67276
67277
67278
67279
67280
67281
67282
67283
67284
67285
67286
67287
67288
67289
67290
67291
67292
67293
67294
67295
67296
67297
67298
67299
67300
67301
67302
67303
67304
67305
67306
67307
67308
67309
67310
67311
67312
67313
67314
67315
67316
67317
67318
67319
67320
67321
67322
67323
67324
67325
67326
67327
67328
67329
67330
67331
67332
67333
67334
67335
67336
67337
67338
67339
67340
67341
67342
67343
67344
67345
67346
67347
67348
67349
67350
67351
67352
67353
67354
67355
67356
67357
67358
67359
67360
67361
67362
67363
67364
67365
67366
67367
67368
67369
67370
67371
67372
67373
67374
67375
67376
67377
67378
67379
67380
67381
67382
67383
67384
67385
67386
67387
67388
67389
67390
67391
67392
67393
67394
67395
67396
67397
67398
67399
67400
67401
67402
67403
67404
67405
67406
67407
67408
67409
67410
67411
67412
67413
67414
67415
67416
67417
67418
67419
67420
67421
67422
67423
67424
67425
67426
67427
67428
67429
67430
67431
67432
67433
67434
67435
67436
67437
67438
67439
67440
67441
67442
67443
67444
67445
67446
67447
67448
67449
67450
67451
67452
67453
67454
67455
67456
67457
67458
67459
67460
67461
67462
67463
67464
67465
67466
67467
67468
67469
67470
67471
67472
67473
67474
67475
67476
67477
67478
67479
67480
67481
67482
67483
67484
67485
67486
67487
67488
67489
67490
67491
67492
67493
67494
67495
67496
67497
67498
67499
67500
67501
67502
67503
67504
67505
67506
67507
67508
67509
67510
67511
67512
67513
67514
67515
67516
67517
67518
67519
67520
67521
67522
67523
67524
67525
67526
67527
67528
67529
67530
67531
67532
67533
67534
67535
67536
67537
67538
67539
67540
67541
67542
67543
67544
67545
67546
67547
67548
67549
67550
67551
67552
67553
67554
67555
67556
67557
67558
67559
67560
67561
67562
67563
67564
67565
67566
67567
67568
67569
67570
67571
67572
67573
67574
67575
67576
67577
67578
67579
67580
67581
67582
67583
67584
67585
67586
67587
67588
67589
67590
67591
67592
67593
67594
67595
67596
67597
67598
67599
67600
67601
67602
67603
67604
67605
67606
67607
67608
67609
67610
67611
67612
67613
67614
67615
67616
67617
67618
67619
67620
67621
67622
67623
67624
67625
67626
67627
67628
67629
67630
67631
67632
67633
67634
67635
67636
67637
67638
67639
67640
67641
67642
67643
67644
67645
67646
67647
67648
67649
67650
67651
67652
67653
67654
67655
67656
67657
67658
67659
67660
67661
67662
67663
67664
67665
67666
67667
67668
67669
67670
67671
67672
67673
67674
67675
67676
67677
67678
67679
67680
67681
67682
67683
67684
67685
67686
67687
67688
67689
67690
67691
67692
67693
67694
67695
67696
67697
67698
67699
67700
67701
67702
67703
67704
67705
67706
67707
67708
67709
67710
67711
67712
67713
67714
67715
67716
67717
67718
67719
67720
67721
67722
67723
67724
67725
67726
67727
67728
67729
67730
67731
67732
67733
67734
67735
67736
67737
67738
67739
67740
67741
67742
67743
67744
67745
67746
67747
67748
67749
67750
67751
67752
67753
67754
67755
67756
67757
67758
67759
67760
67761
67762
67763
67764
67765
67766
67767
67768
67769
67770
67771
67772
67773
67774
67775
67776
67777
67778
67779
67780
67781
67782
67783
67784
67785
67786
67787
67788
67789
67790
67791
67792
67793
67794
67795
67796
67797
67798
67799
67800
67801
67802
67803
67804
67805
67806
67807
67808
67809
67810
67811
67812
67813
67814
67815
67816
67817
67818
67819
67820
67821
67822
67823
67824
67825
67826
67827
67828
67829
67830
67831
67832
67833
67834
67835
67836
67837
67838
67839
67840
67841
67842
67843
67844
67845
67846
67847
67848
67849
67850
67851
67852
67853
67854
67855
67856
67857
67858
67859
67860
67861
67862
67863
67864
67865
67866
67867
67868
67869
67870
67871
67872
67873
67874
67875
67876
67877
67878
67879
67880
67881
67882
67883
67884
67885
67886
67887
67888
67889
67890
67891
67892
67893
67894
67895
67896
67897
67898
67899
67900
67901
67902
67903
67904
67905
67906
67907
67908
67909
67910
67911
67912
67913
67914
67915
67916
67917
67918
67919
67920
67921
67922
67923
67924
67925
67926
67927
67928
67929
67930
67931
67932
67933
67934
67935
67936
67937
67938
67939
67940
67941
67942
67943
67944
67945
67946
67947
67948
67949
67950
67951
67952
67953
67954
67955
67956
67957
67958
67959
67960
67961
67962
67963
67964
67965
67966
67967
67968
67969
67970
67971
67972
67973
67974
67975
67976
67977
67978
67979
67980
67981
67982
67983
67984
67985
67986
67987
67988
67989
67990
67991
67992
67993
67994
67995
67996
67997
67998
67999
68000
68001
68002
68003
68004
68005
68006
68007
68008
68009
68010
68011
68012
68013
68014
68015
68016
68017
68018
68019
68020
68021
68022
68023
68024
68025
68026
68027
68028
68029
68030
68031
68032
68033
68034
68035
68036
68037
68038
68039
68040
68041
68042
68043
68044
68045
68046
68047
68048
68049
68050
68051
68052
68053
68054
68055
68056
68057
68058
68059
68060
68061
68062
68063
68064
68065
68066
68067
68068
68069
68070
68071
68072
68073
68074
68075
68076
68077
68078
68079
68080
68081
68082
68083
68084
68085
68086
68087
68088
68089
68090
68091
68092
68093
68094
68095
68096
68097
68098
68099
68100
68101
68102
68103
68104
68105
68106
68107
68108
68109
68110
68111
68112
68113
68114
68115
68116
68117
68118
68119
68120
68121
68122
68123
68124
68125
68126
68127
68128
68129
68130
68131
68132
68133
68134
68135
68136
68137
68138
68139
68140
68141
68142
68143
68144
68145
68146
68147
68148
68149
68150
68151
68152
68153
68154
68155
68156
68157
68158
68159
68160
68161
68162
68163
68164
68165
68166
68167
68168
68169
68170
68171
68172
68173
68174
68175
68176
68177
68178
68179
68180
68181
68182
68183
68184
68185
68186
68187
68188
68189
68190
68191
68192
68193
68194
68195
68196
68197
68198
68199
68200
68201
68202
68203
68204
68205
68206
68207
68208
68209
68210
68211
68212
68213
68214
68215
68216
68217
68218
68219
68220
68221
68222
68223
68224
68225
68226
68227
68228
68229
68230
68231
68232
68233
68234
68235
68236
68237
68238
68239
68240
68241
68242
68243
68244
68245
68246
68247
68248
68249
68250
68251
68252
68253
68254
68255
68256
68257
68258
68259
68260
68261
68262
68263
68264
68265
68266
68267
68268
68269
68270
68271
68272
68273
68274
68275
68276
68277
68278
68279
68280
68281
68282
68283
68284
68285
68286
68287
68288
68289
68290
68291
68292
68293
68294
68295
68296
68297
68298
68299
68300
68301
68302
68303
68304
68305
68306
68307
68308
68309
68310
68311
68312
68313
68314
68315
68316
68317
68318
68319
68320
68321
68322
68323
68324
68325
68326
68327
68328
68329
68330
68331
68332
68333
68334
68335
68336
68337
68338
68339
68340
68341
68342
68343
68344
68345
68346
68347
68348
68349
68350
68351
68352
68353
68354
68355
68356
68357
68358
68359
68360
68361
68362
68363
68364
68365
68366
68367
68368
68369
68370
68371
68372
68373
68374
68375
68376
68377
68378
68379
68380
68381
68382
68383
68384
68385
68386
68387
68388
68389
68390
68391
68392
68393
68394
68395
68396
68397
68398
68399
68400
68401
68402
68403
68404
68405
68406
68407
68408
68409
68410
68411
68412
68413
68414
68415
68416
68417
68418
68419
68420
68421
68422
68423
68424
68425
68426
68427
68428
68429
68430
68431
68432
68433
68434
68435
68436
68437
68438
68439
68440
68441
68442
68443
68444
68445
68446
68447
68448
68449
68450
68451
68452
68453
68454
68455
68456
68457
68458
68459
68460
68461
68462
68463
68464
68465
68466
68467
68468
68469
68470
68471
68472
68473
68474
68475
68476
68477
68478
68479
68480
68481
68482
68483
68484
68485
68486
68487
68488
68489
68490
68491
68492
68493
68494
68495
68496
68497
68498
68499
68500
68501
68502
68503
68504
68505
68506
68507
68508
68509
68510
68511
68512
68513
68514
68515
68516
68517
68518
68519
68520
68521
68522
68523
68524
68525
68526
68527
68528
68529
68530
68531
68532
68533
68534
68535
68536
68537
68538
68539
68540
68541
68542
68543
68544
68545
68546
68547
68548
68549
68550
68551
68552
68553
68554
68555
68556
68557
68558
68559
68560
68561
68562
68563
68564
68565
68566
68567
68568
68569
68570
68571
68572
68573
68574
68575
68576
68577
68578
68579
68580
68581
68582
68583
68584
68585
68586
68587
68588
68589
68590
68591
68592
68593
68594
68595
68596
68597
68598
68599
68600
68601
68602
68603
68604
68605
68606
68607
68608
68609
68610
68611
68612
68613
68614
68615
68616
68617
68618
68619
68620
68621
68622
68623
68624
68625
68626
68627
68628
68629
68630
68631
68632
68633
68634
68635
68636
68637
68638
68639
68640
68641
68642
68643
68644
68645
68646
68647
68648
68649
68650
68651
68652
68653
68654
68655
68656
68657
68658
68659
68660
68661
68662
68663
68664
68665
68666
68667
68668
68669
68670
68671
68672
68673
68674
68675
68676
68677
68678
68679
68680
68681
68682
68683
68684
68685
68686
68687
68688
68689
68690
68691
68692
68693
68694
68695
68696
68697
68698
68699
68700
68701
68702
68703
68704
68705
68706
68707
68708
68709
68710
68711
68712
68713
68714
68715
68716
68717
68718
68719
68720
68721
68722
68723
68724
68725
68726
68727
68728
68729
68730
68731
68732
68733
68734
68735
68736
68737
68738
68739
68740
68741
68742
68743
68744
68745
68746
68747
68748
68749
68750
68751
68752
68753
68754
68755
68756
68757
68758
68759
68760
68761
68762
68763
68764
68765
68766
68767
68768
68769
68770
68771
68772
68773
68774
68775
68776
68777
68778
68779
68780
68781
68782
68783
68784
68785
68786
68787
68788
68789
68790
68791
68792
68793
68794
68795
68796
68797
68798
68799
68800
68801
68802
68803
68804
68805
68806
68807
68808
68809
68810
68811
68812
68813
68814
68815
68816
68817
68818
68819
68820
68821
68822
68823
68824
68825
68826
68827
68828
68829
68830
68831
68832
68833
68834
68835
68836
68837
68838
68839
68840
68841
68842
68843
68844
68845
68846
68847
68848
68849
68850
68851
68852
68853
68854
68855
68856
68857
68858
68859
68860
68861
68862
68863
68864
68865
68866
68867
68868
68869
68870
68871
68872
68873
68874
68875
68876
68877
68878
68879
68880
68881
68882
68883
68884
68885
68886
68887
68888
68889
68890
68891
68892
68893
68894
68895
68896
68897
68898
68899
68900
68901
68902
68903
68904
68905
68906
68907
68908
68909
68910
68911
68912
68913
68914
68915
68916
68917
68918
68919
68920
68921
68922
68923
68924
68925
68926
68927
68928
68929
68930
68931
68932
68933
68934
68935
68936
68937
68938
68939
68940
68941
68942
68943
68944
68945
68946
68947
68948
68949
68950
68951
68952
68953
68954
68955
68956
68957
68958
68959
68960
68961
68962
68963
68964
68965
68966
68967
68968
68969
68970
68971
68972
68973
68974
68975
68976
68977
68978
68979
68980
68981
68982
68983
68984
68985
68986
68987
68988
68989
68990
68991
68992
68993
68994
68995
68996
68997
68998
68999
69000
69001
69002
69003
69004
69005
69006
69007
69008
69009
69010
69011
69012
69013
69014
69015
69016
69017
69018
69019
69020
69021
69022
69023
69024
69025
69026
69027
69028
69029
69030
69031
69032
69033
69034
69035
69036
69037
69038
69039
69040
69041
69042
69043
69044
69045
69046
69047
69048
69049
69050
69051
69052
69053
69054
69055
69056
69057
69058
69059
69060
69061
69062
69063
69064
69065
69066
69067
69068
69069
69070
69071
69072
69073
69074
69075
69076
69077
69078
69079
69080
69081
69082
69083
69084
69085
69086
69087
69088
69089
69090
69091
69092
69093
69094
69095
69096
69097
69098
69099
69100
69101
69102
69103
69104
69105
69106
69107
69108
69109
69110
69111
69112
69113
69114
69115
69116
69117
69118
69119
69120
69121
69122
69123
69124
69125
69126
69127
69128
69129
69130
69131
69132
69133
69134
69135
69136
69137
69138
69139
69140
69141
69142
69143
69144
69145
69146
69147
69148
69149
69150
69151
69152
69153
69154
69155
69156
69157
69158
69159
69160
69161
69162
69163
69164
69165
69166
69167
69168
69169
69170
69171
69172
69173
69174
69175
69176
69177
69178
69179
69180
69181
69182
69183
69184
69185
69186
69187
69188
69189
69190
69191
69192
69193
69194
69195
69196
69197
69198
69199
69200
69201
69202
69203
69204
69205
69206
69207
69208
69209
69210
69211
69212
69213
69214
69215
69216
69217
69218
69219
69220
69221
69222
69223
69224
69225
69226
69227
69228
69229
69230
69231
69232
69233
69234
69235
69236
69237
69238
69239
69240
69241
69242
69243
69244
69245
69246
69247
69248
69249
69250
69251
69252
69253
69254
69255
69256
69257
69258
69259
69260
69261
69262
69263
69264
69265
69266
69267
69268
69269
69270
69271
69272
69273
69274
69275
69276
69277
69278
69279
69280
69281
69282
69283
69284
69285
69286
69287
69288
69289
69290
69291
69292
69293
69294
69295
69296
69297
69298
69299
69300
69301
69302
69303
69304
69305
69306
69307
69308
69309
69310
69311
69312
69313
69314
69315
69316
69317
69318
69319
69320
69321
69322
69323
69324
69325
69326
69327
69328
69329
69330
69331
69332
69333
69334
69335
69336
69337
69338
69339
69340
69341
69342
69343
69344
69345
69346
69347
69348
69349
69350
69351
69352
69353
69354
69355
69356
69357
69358
69359
69360
69361
69362
69363
69364
69365
69366
69367
69368
69369
69370
69371
69372
69373
69374
69375
69376
69377
69378
69379
69380
69381
69382
69383
69384
69385
69386
69387
69388
69389
69390
69391
69392
69393
69394
69395
69396
69397
69398
69399
69400
69401
69402
69403
69404
69405
69406
69407
69408
69409
69410
69411
69412
69413
69414
69415
69416
69417
69418
69419
69420
69421
69422
69423
69424
69425
69426
69427
69428
69429
69430
69431
69432
69433
69434
69435
69436
69437
69438
69439
69440
69441
69442
69443
69444
69445
69446
69447
69448
69449
69450
69451
69452
69453
69454
69455
69456
69457
69458
69459
69460
69461
69462
69463
69464
69465
69466
69467
69468
69469
69470
69471
69472
69473
69474
69475
69476
69477
69478
69479
69480
69481
69482
69483
69484
69485
69486
69487
69488
69489
69490
69491
69492
69493
69494
69495
69496
69497
69498
69499
69500
69501
69502
69503
69504
69505
69506
69507
69508
69509
69510
69511
69512
69513
69514
69515
69516
69517
69518
69519
69520
69521
69522
69523
69524
69525
69526
69527
69528
69529
69530
69531
69532
69533
69534
69535
69536
69537
69538
69539
69540
69541
69542
69543
69544
69545
69546
69547
69548
69549
69550
69551
69552
69553
69554
69555
69556
69557
69558
69559
69560
69561
69562
69563
69564
69565
69566
69567
69568
69569
69570
69571
69572
69573
69574
69575
69576
69577
69578
69579
69580
69581
69582
69583
69584
69585
69586
69587
69588
69589
69590
69591
69592
69593
69594
69595
69596
69597
69598
69599
69600
69601
69602
69603
69604
69605
69606
69607
69608
69609
69610
69611
69612
69613
69614
69615
69616
69617
69618
69619
69620
69621
69622
69623
69624
69625
69626
69627
69628
69629
69630
69631
69632
69633
69634
69635
69636
69637
69638
69639
69640
69641
69642
69643
69644
69645
69646
69647
69648
69649
69650
69651
69652
69653
69654
69655
69656
69657
69658
69659
69660
69661
69662
69663
69664
69665
69666
69667
69668
69669
69670
69671
69672
69673
69674
69675
69676
69677
69678
69679
69680
69681
69682
69683
69684
69685
69686
69687
69688
69689
69690
69691
69692
69693
69694
69695
69696
69697
69698
69699
69700
69701
69702
69703
69704
69705
69706
69707
69708
69709
69710
69711
69712
69713
69714
69715
69716
69717
69718
69719
69720
69721
69722
69723
69724
69725
69726
69727
69728
69729
69730
69731
69732
69733
69734
69735
69736
69737
69738
69739
69740
69741
69742
69743
69744
69745
69746
69747
69748
69749
69750
69751
69752
69753
69754
69755
69756
69757
69758
69759
69760
69761
69762
69763
69764
69765
69766
69767
69768
69769
69770
69771
69772
69773
69774
69775
69776
69777
69778
69779
69780
69781
69782
69783
69784
69785
69786
69787
69788
69789
69790
69791
69792
69793
69794
69795
69796
69797
69798
69799
69800
69801
69802
69803
69804
69805
69806
69807
69808
69809
69810
69811
69812
69813
69814
69815
69816
69817
69818
69819
69820
69821
69822
69823
69824
69825
69826
69827
69828
69829
69830
69831
69832
69833
69834
69835
69836
69837
69838
69839
69840
69841
69842
69843
69844
69845
69846
69847
69848
69849
69850
69851
69852
69853
69854
69855
69856
69857
69858
69859
69860
69861
69862
69863
69864
69865
69866
69867
69868
69869
69870
69871
69872
69873
69874
69875
69876
69877
69878
69879
69880
69881
69882
69883
69884
69885
69886
69887
69888
69889
69890
69891
69892
69893
69894
69895
69896
69897
69898
69899
69900
69901
69902
69903
69904
69905
69906
69907
69908
69909
69910
69911
69912
69913
69914
69915
69916
69917
69918
69919
69920
69921
69922
69923
69924
69925
69926
69927
69928
69929
69930
69931
69932
69933
69934
69935
69936
69937
69938
69939
69940
69941
69942
69943
69944
69945
69946
69947
69948
69949
69950
69951
69952
69953
69954
69955
69956
69957
69958
69959
69960
69961
69962
69963
69964
69965
69966
69967
69968
69969
69970
69971
69972
69973
69974
69975
69976
69977
69978
69979
69980
69981
69982
69983
69984
69985
69986
69987
69988
69989
69990
69991
69992
69993
69994
69995
69996
69997
69998
69999
70000
70001
70002
70003
70004
70005
70006
70007
70008
70009
70010
70011
70012
70013
70014
70015
70016
70017
70018
70019
70020
70021
70022
70023
70024
70025
70026
70027
70028
70029
70030
70031
70032
70033
70034
70035
70036
70037
70038
70039
70040
70041
70042
70043
70044
70045
70046
70047
70048
70049
70050
70051
70052
70053
70054
70055
70056
70057
70058
70059
70060
70061
70062
70063
70064
70065
70066
70067
70068
70069
70070
70071
70072
70073
70074
70075
70076
70077
70078
70079
70080
70081
70082
70083
70084
70085
70086
70087
70088
70089
70090
70091
70092
70093
70094
70095
70096
70097
70098
70099
70100
70101
70102
70103
70104
70105
70106
70107
70108
70109
70110
70111
70112
70113
70114
70115
70116
70117
70118
70119
70120
70121
70122
70123
70124
70125
70126
70127
70128
70129
70130
70131
70132
70133
70134
70135
70136
70137
70138
70139
70140
70141
70142
70143
70144
70145
70146
70147
70148
70149
70150
70151
70152
70153
70154
70155
70156
70157
70158
70159
70160
70161
70162
70163
70164
70165
70166
70167
70168
70169
70170
70171
70172
70173
70174
70175
70176
70177
70178
70179
70180
70181
70182
70183
70184
70185
70186
70187
70188
70189
70190
70191
70192
70193
70194
70195
70196
70197
70198
70199
70200
70201
70202
70203
70204
70205
70206
70207
70208
70209
70210
70211
70212
70213
70214
70215
70216
70217
70218
70219
70220
70221
70222
70223
70224
70225
70226
70227
70228
70229
70230
70231
70232
70233
70234
70235
70236
70237
70238
70239
70240
70241
70242
70243
70244
70245
70246
70247
70248
70249
70250
70251
70252
70253
70254
70255
70256
70257
70258
70259
70260
70261
70262
70263
70264
70265
70266
70267
70268
70269
70270
70271
70272
70273
70274
70275
70276
70277
70278
70279
70280
70281
70282
70283
70284
70285
70286
70287
70288
70289
70290
70291
70292
70293
70294
70295
70296
70297
70298
70299
70300
70301
70302
70303
70304
70305
70306
70307
70308
70309
70310
70311
70312
70313
70314
70315
70316
70317
70318
70319
70320
70321
70322
70323
70324
70325
70326
70327
70328
70329
70330
70331
70332
70333
70334
70335
70336
70337
70338
70339
70340
70341
70342
70343
70344
70345
70346
70347
70348
70349
70350
70351
70352
70353
70354
70355
70356
70357
70358
70359
70360
70361
70362
70363
70364
70365
70366
70367
70368
70369
70370
70371
70372
70373
70374
70375
70376
70377
70378
70379
70380
70381
70382
70383
70384
70385
70386
70387
70388
70389
70390
70391
70392
70393
70394
70395
70396
70397
70398
70399
70400
70401
70402
70403
70404
70405
70406
70407
70408
70409
70410
70411
70412
70413
70414
70415
70416
70417
70418
70419
70420
70421
70422
70423
70424
70425
70426
70427
70428
70429
70430
70431
70432
70433
70434
70435
70436
70437
70438
70439
70440
70441
70442
70443
70444
70445
70446
70447
70448
70449
70450
70451
70452
70453
70454
70455
70456
70457
70458
70459
70460
70461
70462
70463
70464
70465
70466
70467
70468
70469
70470
70471
70472
70473
70474
70475
70476
70477
70478
70479
70480
70481
70482
70483
70484
70485
70486
70487
70488
70489
70490
70491
70492
70493
70494
70495
70496
70497
70498
70499
70500
70501
70502
70503
70504
70505
70506
70507
70508
70509
70510
70511
70512
70513
70514
70515
70516
70517
70518
70519
70520
70521
70522
70523
70524
70525
70526
70527
70528
70529
70530
70531
70532
70533
70534
70535
70536
70537
70538
70539
70540
70541
70542
70543
70544
70545
70546
70547
70548
70549
70550
70551
70552
70553
70554
70555
70556
70557
70558
70559
70560
70561
70562
70563
70564
70565
70566
70567
70568
70569
70570
70571
70572
70573
70574
70575
70576
70577
70578
70579
70580
70581
70582
70583
70584
70585
70586
70587
70588
70589
70590
70591
70592
70593
70594
70595
70596
70597
70598
70599
70600
70601
70602
70603
70604
70605
70606
70607
70608
70609
70610
70611
70612
70613
70614
70615
70616
70617
70618
70619
70620
70621
70622
70623
70624
70625
70626
70627
70628
70629
70630
70631
70632
70633
70634
70635
70636
70637
70638
70639
70640
70641
70642
70643
70644
70645
70646
70647
70648
70649
70650
70651
70652
70653
70654
70655
70656
70657
70658
70659
70660
70661
70662
70663
70664
70665
70666
70667
70668
70669
70670
70671
70672
70673
70674
70675
70676
70677
70678
70679
70680
70681
70682
70683
70684
70685
70686
70687
70688
70689
70690
70691
70692
70693
70694
70695
70696
70697
70698
70699
70700
70701
70702
70703
70704
70705
70706
70707
70708
70709
70710
70711
70712
70713
70714
70715
70716
70717
70718
70719
70720
70721
70722
70723
70724
70725
70726
70727
70728
70729
70730
70731
70732
70733
70734
70735
70736
70737
70738
70739
70740
70741
70742
70743
70744
70745
70746
70747
70748
70749
70750
70751
70752
70753
70754
70755
70756
70757
70758
70759
70760
70761
70762
70763
70764
70765
70766
70767
70768
70769
70770
70771
70772
70773
70774
70775
70776
70777
70778
70779
70780
70781
70782
70783
70784
70785
70786
70787
70788
70789
70790
70791
70792
70793
70794
70795
70796
70797
70798
70799
70800
70801
70802
70803
70804
70805
70806
70807
70808
70809
70810
70811
70812
70813
70814
70815
70816
70817
70818
70819
70820
70821
70822
70823
70824
70825
70826
70827
70828
70829
70830
70831
70832
70833
70834
70835
70836
70837
70838
70839
70840
70841
70842
70843
70844
70845
70846
70847
70848
70849
70850
70851
70852
70853
70854
70855
70856
70857
70858
70859
70860
70861
70862
70863
70864
70865
70866
70867
70868
70869
70870
70871
70872
70873
70874
70875
70876
70877
70878
70879
70880
70881
70882
70883
70884
70885
70886
70887
70888
70889
70890
70891
70892
70893
70894
70895
70896
70897
70898
70899
70900
70901
70902
70903
70904
70905
70906
70907
70908
70909
70910
70911
70912
70913
70914
70915
70916
70917
70918
70919
70920
70921
70922
70923
70924
70925
70926
70927
70928
70929
70930
70931
70932
70933
70934
70935
70936
70937
70938
70939
70940
70941
70942
70943
70944
70945
70946
70947
70948
70949
70950
70951
70952
70953
70954
70955
70956
70957
70958
70959
70960
70961
70962
70963
70964
70965
70966
70967
70968
70969
70970
70971
70972
70973
70974
70975
70976
70977
70978
70979
70980
70981
70982
70983
70984
70985
70986
70987
70988
70989
70990
70991
70992
70993
70994
70995
70996
70997
70998
70999
71000
71001
71002
71003
71004
71005
71006
71007
71008
71009
71010
71011
71012
71013
71014
71015
71016
71017
71018
71019
71020
71021
71022
71023
71024
71025
71026
71027
71028
71029
71030
71031
71032
71033
71034
71035
71036
71037
71038
71039
71040
71041
71042
71043
71044
71045
71046
71047
71048
71049
71050
71051
71052
71053
71054
71055
71056
71057
71058
71059
71060
71061
71062
71063
71064
71065
71066
71067
71068
71069
71070
71071
71072
71073
71074
71075
71076
71077
71078
71079
71080
71081
71082
71083
71084
71085
71086
71087
71088
71089
71090
71091
71092
71093
71094
71095
71096
71097
71098
71099
71100
71101
71102
71103
71104
71105
71106
71107
71108
71109
71110
71111
71112
71113
71114
71115
71116
71117
71118
71119
71120
71121
71122
71123
71124
71125
71126
71127
71128
71129
71130
71131
71132
71133
71134
71135
71136
71137
71138
71139
71140
71141
71142
71143
71144
71145
71146
71147
71148
71149
71150
71151
71152
71153
71154
71155
71156
71157
71158
71159
71160
71161
71162
71163
71164
71165
71166
71167
71168
71169
71170
71171
71172
71173
71174
71175
71176
71177
71178
71179
71180
71181
71182
71183
71184
71185
71186
71187
71188
71189
71190
71191
71192
71193
71194
71195
71196
71197
71198
71199
71200
71201
71202
71203
71204
71205
71206
71207
71208
71209
71210
71211
71212
71213
71214
71215
71216
71217
71218
71219
71220
71221
71222
71223
71224
71225
71226
71227
71228
71229
71230
71231
71232
71233
71234
71235
71236
71237
71238
71239
71240
71241
71242
71243
71244
71245
71246
71247
71248
71249
71250
71251
71252
71253
71254
71255
71256
71257
71258
71259
71260
71261
71262
71263
71264
71265
71266
71267
71268
71269
71270
71271
71272
71273
71274
71275
71276
71277
71278
71279
71280
71281
71282
71283
71284
71285
71286
71287
71288
71289
71290
71291
71292
71293
71294
71295
71296
71297
71298
71299
71300
71301
71302
71303
71304
71305
71306
71307
71308
71309
71310
71311
71312
71313
71314
71315
71316
71317
71318
71319
71320
71321
71322
71323
71324
71325
71326
71327
71328
71329
71330
71331
71332
71333
71334
71335
71336
71337
71338
71339
71340
71341
71342
71343
71344
71345
71346
71347
71348
71349
71350
71351
71352
71353
71354
71355
71356
71357
71358
71359
71360
71361
71362
71363
71364
71365
71366
71367
71368
71369
71370
71371
71372
71373
71374
71375
71376
71377
71378
71379
71380
71381
71382
71383
71384
71385
71386
71387
71388
71389
71390
71391
71392
71393
71394
71395
71396
71397
71398
71399
71400
71401
71402
71403
71404
71405
71406
71407
71408
71409
71410
71411
71412
71413
71414
71415
71416
71417
71418
71419
71420
71421
71422
71423
71424
71425
71426
71427
71428
71429
71430
71431
71432
71433
71434
71435
71436
71437
71438
71439
71440
71441
71442
71443
71444
71445
71446
71447
71448
71449
71450
71451
71452
71453
71454
71455
71456
71457
71458
71459
71460
71461
71462
71463
71464
71465
71466
71467
71468
71469
71470
71471
71472
71473
71474
71475
71476
71477
71478
71479
71480
71481
71482
71483
71484
71485
71486
71487
71488
71489
71490
71491
71492
71493
71494
71495
71496
71497
71498
71499
71500
71501
71502
71503
71504
71505
71506
71507
71508
71509
71510
71511
71512
71513
71514
71515
71516
71517
71518
71519
71520
71521
71522
71523
71524
71525
71526
71527
71528
71529
71530
71531
71532
71533
71534
71535
71536
71537
71538
71539
71540
71541
71542
71543
71544
71545
71546
71547
71548
71549
71550
71551
71552
71553
71554
71555
71556
71557
71558
71559
71560
71561
71562
71563
71564
71565
71566
71567
71568
71569
71570
71571
71572
71573
71574
71575
71576
71577
71578
71579
71580
71581
71582
71583
71584
71585
71586
71587
71588
71589
71590
71591
71592
71593
71594
71595
71596
71597
71598
71599
71600
71601
71602
71603
71604
71605
71606
71607
71608
71609
71610
71611
71612
71613
71614
71615
71616
71617
71618
71619
71620
71621
71622
71623
71624
71625
71626
71627
71628
71629
71630
71631
71632
71633
71634
71635
71636
71637
71638
71639
71640
71641
71642
71643
71644
71645
71646
71647
71648
71649
71650
71651
71652
71653
71654
71655
71656
71657
71658
71659
71660
71661
71662
71663
71664
71665
71666
71667
71668
71669
71670
71671
71672
71673
71674
71675
71676
71677
71678
71679
71680
71681
71682
71683
71684
71685
71686
71687
71688
71689
71690
71691
71692
71693
71694
71695
71696
71697
71698
71699
71700
71701
71702
71703
71704
71705
71706
71707
71708
71709
71710
71711
71712
71713
71714
71715
71716
71717
71718
71719
71720
71721
71722
71723
71724
71725
71726
71727
71728
71729
71730
71731
71732
71733
71734
71735
71736
71737
71738
71739
71740
71741
71742
71743
71744
71745
71746
71747
71748
71749
71750
71751
71752
71753
71754
71755
71756
71757
71758
71759
71760
71761
71762
71763
71764
71765
71766
71767
71768
71769
71770
71771
71772
71773
71774
71775
71776
71777
71778
71779
71780
71781
71782
71783
71784
71785
71786
71787
71788
71789
71790
71791
71792
71793
71794
71795
71796
71797
71798
71799
71800
71801
71802
71803
71804
71805
71806
71807
71808
71809
71810
71811
71812
71813
71814
71815
71816
71817
71818
71819
71820
71821
71822
71823
71824
71825
71826
71827
71828
71829
71830
71831
71832
71833
71834
71835
71836
71837
71838
71839
71840
71841
71842
71843
71844
71845
71846
71847
71848
71849
71850
71851
71852
71853
71854
71855
71856
71857
71858
71859
71860
71861
71862
71863
71864
71865
71866
71867
71868
71869
71870
71871
71872
71873
71874
71875
71876
71877
71878
71879
71880
71881
71882
71883
71884
71885
71886
71887
71888
71889
71890
71891
71892
71893
71894
71895
71896
71897
71898
71899
71900
71901
71902
71903
71904
71905
71906
71907
71908
71909
71910
71911
71912
71913
71914
71915
71916
71917
71918
71919
71920
71921
71922
71923
71924
71925
71926
71927
71928
71929
71930
71931
71932
71933
71934
71935
71936
71937
71938
71939
71940
71941
71942
71943
71944
71945
71946
71947
71948
71949
71950
71951
71952
71953
71954
71955
71956
71957
71958
71959
71960
71961
71962
71963
71964
71965
71966
71967
71968
71969
71970
71971
71972
71973
71974
71975
71976
71977
71978
71979
71980
71981
71982
71983
71984
71985
71986
71987
71988
71989
71990
71991
71992
71993
71994
71995
71996
71997
71998
71999
72000
72001
72002
72003
72004
72005
72006
72007
72008
72009
72010
72011
72012
72013
72014
72015
72016
72017
72018
72019
72020
72021
72022
72023
72024
72025
72026
72027
72028
72029
72030
72031
72032
72033
72034
72035
72036
72037
72038
72039
72040
72041
72042
72043
72044
72045
72046
72047
72048
72049
72050
72051
72052
72053
72054
72055
72056
72057
72058
72059
72060
72061
72062
72063
72064
72065
72066
72067
72068
72069
72070
72071
72072
72073
72074
72075
72076
72077
72078
72079
72080
72081
72082
72083
72084
72085
72086
72087
72088
72089
72090
72091
72092
72093
72094
72095
72096
72097
72098
72099
72100
72101
72102
72103
72104
72105
72106
72107
72108
72109
72110
72111
72112
72113
72114
72115
72116
72117
72118
72119
72120
72121
72122
72123
72124
72125
72126
72127
72128
72129
72130
72131
72132
72133
72134
72135
72136
72137
72138
72139
72140
72141
72142
72143
72144
72145
72146
72147
72148
72149
72150
72151
72152
72153
72154
72155
72156
72157
72158
72159
72160
72161
72162
72163
72164
72165
72166
72167
72168
72169
72170
72171
72172
72173
72174
72175
72176
72177
72178
72179
72180
72181
72182
72183
72184
72185
72186
72187
72188
72189
72190
72191
72192
72193
72194
72195
72196
72197
72198
72199
72200
72201
72202
72203
72204
72205
72206
72207
72208
72209
72210
72211
72212
72213
72214
72215
72216
72217
72218
72219
72220
72221
72222
72223
72224
72225
72226
72227
72228
72229
72230
72231
72232
72233
72234
72235
72236
72237
72238
72239
72240
72241
72242
72243
72244
72245
72246
72247
72248
72249
72250
72251
72252
72253
72254
72255
72256
72257
72258
72259
72260
72261
72262
72263
72264
72265
72266
72267
72268
72269
72270
72271
72272
72273
72274
72275
72276
72277
72278
72279
72280
72281
72282
72283
72284
72285
72286
72287
72288
72289
72290
72291
72292
72293
72294
72295
72296
72297
72298
72299
72300
72301
72302
72303
72304
72305
72306
72307
72308
72309
72310
72311
72312
72313
72314
72315
72316
72317
72318
72319
72320
72321
72322
72323
72324
72325
72326
72327
72328
72329
72330
72331
72332
72333
72334
72335
72336
72337
72338
72339
72340
72341
72342
72343
72344
72345
72346
72347
72348
72349
72350
72351
72352
72353
72354
72355
72356
72357
72358
72359
72360
72361
72362
72363
72364
72365
72366
72367
72368
72369
72370
72371
72372
72373
72374
72375
72376
72377
72378
72379
72380
72381
72382
72383
72384
72385
72386
72387
72388
72389
72390
72391
72392
72393
72394
72395
72396
72397
72398
72399
72400
72401
72402
72403
72404
72405
72406
72407
72408
72409
72410
72411
72412
72413
72414
72415
72416
72417
72418
72419
72420
72421
72422
72423
72424
72425
72426
72427
72428
72429
72430
72431
72432
72433
72434
72435
72436
72437
72438
72439
72440
72441
72442
72443
72444
72445
72446
72447
72448
72449
72450
72451
72452
72453
72454
72455
72456
72457
72458
72459
72460
72461
72462
72463
72464
72465
72466
72467
72468
72469
72470
72471
72472
72473
72474
72475
72476
72477
72478
72479
72480
72481
72482
72483
72484
72485
72486
72487
72488
72489
72490
72491
72492
72493
72494
72495
72496
72497
72498
72499
72500
72501
72502
72503
72504
72505
72506
72507
72508
72509
72510
72511
72512
72513
72514
72515
72516
72517
72518
72519
72520
72521
72522
72523
72524
72525
72526
72527
72528
72529
72530
72531
72532
72533
72534
72535
72536
72537
72538
72539
72540
72541
72542
72543
72544
72545
72546
72547
72548
72549
72550
72551
72552
72553
72554
72555
72556
72557
72558
72559
72560
72561
72562
72563
72564
72565
72566
72567
72568
72569
72570
72571
72572
72573
72574
72575
72576
72577
72578
72579
72580
72581
72582
72583
72584
72585
72586
72587
72588
72589
72590
72591
72592
72593
72594
72595
72596
72597
72598
72599
72600
72601
72602
72603
72604
72605
72606
72607
72608
72609
72610
72611
72612
72613
72614
72615
72616
72617
72618
72619
72620
72621
72622
72623
72624
72625
72626
72627
72628
72629
72630
72631
72632
72633
72634
72635
72636
72637
72638
72639
72640
72641
72642
72643
72644
72645
72646
72647
72648
72649
72650
72651
72652
72653
72654
72655
72656
72657
72658
72659
72660
72661
72662
72663
72664
72665
72666
72667
72668
72669
72670
72671
72672
72673
72674
72675
72676
72677
72678
72679
72680
72681
72682
72683
72684
72685
72686
72687
72688
72689
72690
72691
72692
72693
72694
72695
72696
72697
72698
72699
72700
72701
72702
72703
72704
72705
72706
72707
72708
72709
72710
72711
72712
72713
72714
72715
72716
72717
72718
72719
72720
72721
72722
72723
72724
72725
72726
72727
72728
72729
72730
72731
72732
72733
72734
72735
72736
72737
72738
72739
72740
72741
72742
72743
72744
72745
72746
72747
72748
72749
72750
72751
72752
72753
72754
72755
72756
72757
72758
72759
72760
72761
72762
72763
72764
72765
72766
72767
72768
72769
72770
72771
72772
72773
72774
72775
72776
72777
72778
72779
72780
72781
72782
72783
72784
72785
72786
72787
72788
72789
72790
72791
72792
72793
72794
72795
72796
72797
72798
72799
72800
72801
72802
72803
72804
72805
72806
72807
72808
72809
72810
72811
72812
72813
72814
72815
72816
72817
72818
72819
72820
72821
72822
72823
72824
72825
72826
72827
72828
72829
72830
72831
72832
72833
72834
72835
72836
72837
72838
72839
72840
72841
72842
72843
72844
72845
72846
72847
72848
72849
72850
72851
72852
72853
72854
72855
72856
72857
72858
72859
72860
72861
72862
72863
72864
72865
72866
72867
72868
72869
72870
72871
72872
72873
72874
72875
72876
72877
72878
72879
72880
72881
72882
72883
72884
72885
72886
72887
72888
72889
72890
72891
72892
72893
72894
72895
72896
72897
72898
72899
72900
72901
72902
72903
72904
72905
72906
72907
72908
72909
72910
72911
72912
72913
72914
72915
72916
72917
72918
72919
72920
72921
72922
72923
72924
72925
72926
72927
72928
72929
72930
72931
72932
72933
72934
72935
72936
72937
72938
72939
72940
72941
72942
72943
72944
72945
72946
72947
72948
72949
72950
72951
72952
72953
72954
72955
72956
72957
72958
72959
72960
72961
72962
72963
72964
72965
72966
72967
72968
72969
72970
72971
72972
72973
72974
72975
72976
72977
72978
72979
72980
72981
72982
72983
72984
72985
72986
72987
72988
72989
72990
72991
72992
72993
72994
72995
72996
72997
72998
72999
73000
73001
73002
73003
73004
73005
73006
73007
73008
73009
73010
73011
73012
73013
73014
73015
73016
73017
73018
73019
73020
73021
73022
73023
73024
73025
73026
73027
73028
73029
73030
73031
73032
73033
73034
73035
73036
73037
73038
73039
73040
73041
73042
73043
73044
73045
73046
73047
73048
73049
73050
73051
73052
73053
73054
73055
73056
73057
73058
73059
73060
73061
73062
73063
73064
73065
73066
73067
73068
73069
73070
73071
73072
73073
73074
73075
73076
73077
73078
73079
73080
73081
73082
73083
73084
73085
73086
73087
73088
73089
73090
73091
73092
73093
73094
73095
73096
73097
73098
73099
73100
73101
73102
73103
73104
73105
73106
73107
73108
73109
73110
73111
73112
73113
73114
73115
73116
73117
73118
73119
73120
73121
73122
73123
73124
73125
73126
73127
73128
73129
73130
73131
73132
73133
73134
73135
73136
73137
73138
73139
73140
73141
73142
73143
73144
73145
73146
73147
73148
73149
73150
73151
73152
73153
73154
73155
73156
73157
73158
73159
73160
73161
73162
73163
73164
73165
73166
73167
73168
73169
73170
73171
73172
73173
73174
73175
73176
73177
73178
73179
73180
73181
73182
73183
73184
73185
73186
73187
73188
73189
73190
73191
73192
73193
73194
73195
73196
73197
73198
73199
73200
73201
73202
73203
73204
73205
73206
73207
73208
73209
73210
73211
73212
73213
73214
73215
73216
73217
73218
73219
73220
73221
73222
73223
73224
73225
73226
73227
73228
73229
73230
73231
73232
73233
73234
73235
73236
73237
73238
73239
73240
73241
73242
73243
73244
73245
73246
73247
73248
73249
73250
73251
73252
73253
73254
73255
73256
73257
73258
73259
73260
73261
73262
73263
73264
73265
73266
73267
73268
73269
73270
73271
73272
73273
73274
73275
73276
73277
73278
73279
73280
73281
73282
73283
73284
73285
73286
73287
73288
73289
73290
73291
73292
73293
73294
73295
73296
73297
73298
73299
73300
73301
73302
73303
73304
73305
73306
73307
73308
73309
73310
73311
73312
73313
73314
73315
73316
73317
73318
73319
73320
73321
73322
73323
73324
73325
73326
73327
73328
73329
73330
73331
73332
73333
73334
73335
73336
73337
73338
73339
73340
73341
73342
73343
73344
73345
73346
73347
73348
73349
73350
73351
73352
73353
73354
73355
73356
73357
73358
73359
73360
73361
73362
73363
73364
73365
73366
73367
73368
73369
73370
73371
73372
73373
73374
73375
73376
73377
73378
73379
73380
73381
73382
73383
73384
73385
73386
73387
73388
73389
73390
73391
73392
73393
73394
73395
73396
73397
73398
73399
73400
73401
73402
73403
73404
73405
73406
73407
73408
73409
73410
73411
73412
73413
73414
73415
73416
73417
73418
73419
73420
73421
73422
73423
73424
73425
73426
73427
73428
73429
73430
73431
73432
73433
73434
73435
73436
73437
73438
73439
73440
73441
73442
73443
73444
73445
73446
73447
73448
73449
73450
73451
73452
73453
73454
73455
73456
73457
73458
73459
73460
73461
73462
73463
73464
73465
73466
73467
73468
73469
73470
73471
73472
73473
73474
73475
73476
73477
73478
73479
73480
73481
73482
73483
73484
73485
73486
73487
73488
73489
73490
73491
73492
73493
73494
73495
73496
73497
73498
73499
73500
73501
73502
73503
73504
73505
73506
73507
73508
73509
73510
73511
73512
73513
73514
73515
73516
73517
73518
73519
73520
73521
73522
73523
73524
73525
73526
73527
73528
73529
73530
73531
73532
73533
73534
73535
73536
73537
73538
73539
73540
73541
73542
73543
73544
73545
73546
73547
73548
73549
73550
73551
73552
73553
73554
73555
73556
73557
73558
73559
73560
73561
73562
73563
73564
73565
73566
73567
73568
73569
73570
73571
73572
73573
73574
73575
73576
73577
73578
73579
73580
73581
73582
73583
73584
73585
73586
73587
73588
73589
73590
73591
73592
73593
73594
73595
73596
73597
73598
73599
73600
73601
73602
73603
73604
73605
73606
73607
73608
73609
73610
73611
73612
73613
73614
73615
73616
73617
73618
73619
73620
73621
73622
73623
73624
73625
73626
73627
73628
73629
73630
73631
73632
73633
73634
73635
73636
73637
73638
73639
73640
73641
73642
73643
73644
73645
73646
73647
73648
73649
73650
73651
73652
73653
73654
73655
73656
73657
73658
73659
73660
73661
73662
73663
73664
73665
73666
73667
73668
73669
73670
73671
73672
73673
73674
73675
73676
73677
73678
73679
73680
73681
73682
73683
73684
73685
73686
73687
73688
73689
73690
73691
73692
73693
73694
73695
73696
73697
73698
73699
73700
73701
73702
73703
73704
73705
73706
73707
73708
73709
73710
73711
73712
73713
73714
73715
73716
73717
73718
73719
73720
73721
73722
73723
73724
73725
73726
73727
73728
73729
73730
73731
73732
73733
73734
73735
73736
73737
73738
73739
73740
73741
73742
73743
73744
73745
73746
73747
73748
73749
73750
73751
73752
73753
73754
73755
73756
73757
73758
73759
73760
73761
73762
73763
73764
73765
73766
73767
73768
73769
73770
73771
73772
73773
73774
73775
73776
73777
73778
73779
73780
73781
73782
73783
73784
73785
73786
73787
73788
73789
73790
73791
73792
73793
73794
73795
73796
73797
73798
73799
73800
73801
73802
73803
73804
73805
73806
73807
73808
73809
73810
73811
73812
73813
73814
73815
73816
73817
73818
73819
73820
73821
73822
73823
73824
73825
73826
73827
73828
73829
73830
73831
73832
73833
73834
73835
73836
73837
73838
73839
73840
73841
73842
73843
73844
73845
73846
73847
73848
73849
73850
73851
73852
73853
73854
73855
73856
73857
73858
73859
73860
73861
73862
73863
73864
73865
73866
73867
73868
73869
73870
73871
73872
73873
73874
73875
73876
73877
73878
73879
73880
73881
73882
73883
73884
73885
73886
73887
73888
73889
73890
73891
73892
73893
73894
73895
73896
73897
73898
73899
73900
73901
73902
73903
73904
73905
73906
73907
73908
73909
73910
73911
73912
73913
73914
73915
73916
73917
73918
73919
73920
73921
73922
73923
73924
73925
73926
73927
73928
73929
73930
73931
73932
73933
73934
73935
73936
73937
73938
73939
73940
73941
73942
73943
73944
73945
73946
73947
73948
73949
73950
73951
73952
73953
73954
73955
73956
73957
73958
73959
73960
73961
73962
73963
73964
73965
73966
73967
73968
73969
73970
73971
73972
73973
73974
73975
73976
73977
73978
73979
73980
73981
73982
73983
73984
73985
73986
73987
73988
73989
73990
73991
73992
73993
73994
73995
73996
73997
73998
73999
74000
74001
74002
74003
74004
74005
74006
74007
74008
74009
74010
74011
74012
74013
74014
74015
74016
74017
74018
74019
74020
74021
74022
74023
74024
74025
74026
74027
74028
74029
74030
74031
74032
74033
74034
74035
74036
74037
74038
74039
74040
74041
74042
74043
74044
74045
74046
74047
74048
74049
74050
74051
74052
74053
74054
74055
74056
74057
74058
74059
74060
74061
74062
74063
74064
74065
74066
74067
74068
74069
74070
74071
74072
74073
74074
74075
74076
74077
74078
74079
74080
74081
74082
74083
74084
74085
74086
74087
74088
74089
74090
74091
74092
74093
74094
74095
74096
74097
74098
74099
74100
74101
74102
74103
74104
74105
74106
74107
74108
74109
74110
74111
74112
74113
74114
74115
74116
74117
74118
74119
74120
74121
74122
74123
74124
74125
74126
74127
74128
74129
74130
74131
74132
74133
74134
74135
74136
74137
74138
74139
74140
74141
74142
74143
74144
74145
74146
74147
74148
74149
74150
74151
74152
74153
74154
74155
74156
74157
74158
74159
74160
74161
74162
74163
74164
74165
74166
74167
74168
74169
74170
74171
74172
74173
74174
74175
74176
74177
74178
74179
74180
74181
74182
74183
74184
74185
74186
74187
74188
74189
74190
74191
74192
74193
74194
74195
74196
74197
74198
74199
74200
74201
74202
74203
74204
74205
74206
74207
74208
74209
74210
74211
74212
74213
74214
74215
74216
74217
74218
74219
74220
74221
74222
74223
74224
74225
74226
74227
74228
74229
74230
74231
74232
74233
74234
74235
74236
74237
74238
74239
74240
74241
74242
74243
74244
74245
74246
74247
74248
74249
74250
74251
74252
74253
74254
74255
74256
74257
74258
74259
74260
74261
74262
74263
74264
74265
74266
74267
74268
74269
74270
74271
74272
74273
74274
74275
74276
74277
74278
74279
74280
74281
74282
74283
74284
74285
74286
74287
74288
74289
74290
74291
74292
74293
74294
74295
74296
74297
74298
74299
74300
74301
74302
74303
74304
74305
74306
74307
74308
74309
74310
74311
74312
74313
74314
74315
74316
74317
74318
74319
74320
74321
74322
74323
74324
74325
74326
74327
74328
74329
74330
74331
74332
74333
74334
74335
74336
74337
74338
74339
74340
74341
74342
74343
74344
74345
74346
74347
74348
74349
74350
74351
74352
74353
74354
74355
74356
74357
74358
74359
74360
74361
74362
74363
74364
74365
74366
74367
74368
74369
74370
74371
74372
74373
74374
74375
74376
74377
74378
74379
74380
74381
74382
74383
74384
74385
74386
74387
74388
74389
74390
74391
74392
74393
74394
74395
74396
74397
74398
74399
74400
74401
74402
74403
74404
74405
74406
74407
74408
74409
74410
74411
74412
74413
74414
74415
74416
74417
74418
74419
74420
74421
74422
74423
74424
74425
74426
74427
74428
74429
74430
74431
74432
74433
74434
74435
74436
74437
74438
74439
74440
74441
74442
74443
74444
74445
74446
74447
74448
74449
74450
74451
74452
74453
74454
74455
74456
74457
74458
74459
74460
74461
74462
74463
74464
74465
74466
74467
74468
74469
74470
74471
74472
74473
74474
74475
74476
74477
74478
74479
74480
74481
74482
74483
74484
74485
74486
74487
74488
74489
74490
74491
74492
74493
74494
74495
74496
74497
74498
74499
74500
74501
74502
74503
74504
74505
74506
74507
74508
74509
74510
74511
74512
74513
74514
74515
74516
74517
74518
74519
74520
74521
74522
74523
74524
74525
74526
74527
74528
74529
74530
74531
74532
74533
74534
74535
74536
74537
74538
74539
74540
74541
74542
74543
74544
74545
74546
74547
74548
74549
74550
74551
74552
74553
74554
74555
74556
74557
74558
74559
74560
74561
74562
74563
74564
74565
74566
74567
74568
74569
74570
74571
74572
74573
74574
74575
74576
74577
74578
74579
74580
74581
74582
74583
74584
74585
74586
74587
74588
74589
74590
74591
74592
74593
74594
74595
74596
74597
74598
74599
74600
74601
74602
74603
74604
74605
74606
74607
74608
74609
74610
74611
74612
74613
74614
74615
74616
74617
74618
74619
74620
74621
74622
74623
74624
74625
74626
74627
74628
74629
74630
74631
74632
74633
74634
74635
74636
74637
74638
74639
74640
74641
74642
74643
74644
74645
74646
74647
74648
74649
74650
74651
74652
74653
74654
74655
74656
74657
74658
74659
74660
74661
74662
74663
74664
74665
74666
74667
74668
74669
74670
74671
74672
74673
74674
74675
74676
74677
74678
74679
74680
74681
74682
74683
74684
74685
74686
74687
74688
74689
74690
74691
74692
74693
74694
74695
74696
74697
74698
74699
74700
74701
74702
74703
74704
74705
74706
74707
74708
74709
74710
74711
74712
74713
74714
74715
74716
74717
74718
74719
74720
74721
74722
74723
74724
74725
74726
74727
74728
74729
74730
74731
74732
74733
74734
74735
74736
74737
74738
74739
74740
74741
74742
74743
74744
74745
74746
74747
74748
74749
74750
74751
74752
74753
74754
74755
74756
74757
74758
74759
74760
74761
74762
74763
74764
74765
74766
74767
74768
74769
74770
74771
74772
74773
74774
74775
74776
74777
74778
74779
74780
74781
74782
74783
74784
74785
74786
74787
74788
74789
74790
74791
74792
74793
74794
74795
74796
74797
74798
74799
74800
74801
74802
74803
74804
74805
74806
74807
74808
74809
74810
74811
74812
74813
74814
74815
74816
74817
74818
74819
74820
74821
74822
74823
74824
74825
74826
74827
74828
74829
74830
74831
74832
74833
74834
74835
74836
74837
74838
74839
74840
74841
74842
74843
74844
74845
74846
74847
74848
74849
74850
74851
74852
74853
74854
74855
74856
74857
74858
74859
74860
74861
74862
74863
74864
74865
74866
74867
74868
74869
74870
74871
74872
74873
74874
74875
74876
74877
74878
74879
74880
74881
74882
74883
74884
74885
74886
74887
74888
74889
74890
74891
74892
74893
74894
74895
74896
74897
74898
74899
74900
74901
74902
74903
74904
74905
74906
74907
74908
74909
74910
74911
74912
74913
74914
74915
74916
74917
74918
74919
74920
74921
74922
74923
74924
74925
74926
74927
74928
74929
74930
74931
74932
74933
74934
74935
74936
74937
74938
74939
74940
74941
74942
74943
74944
74945
74946
74947
74948
74949
74950
74951
74952
74953
74954
74955
74956
74957
74958
74959
74960
74961
74962
74963
74964
74965
74966
74967
74968
74969
74970
74971
74972
74973
74974
74975
74976
74977
74978
74979
74980
74981
74982
74983
74984
74985
74986
74987
74988
74989
74990
74991
74992
74993
74994
74995
74996
74997
74998
74999
75000
75001
75002
75003
75004
75005
75006
75007
75008
75009
75010
75011
75012
75013
75014
75015
75016
75017
75018
75019
75020
75021
75022
75023
75024
75025
75026
75027
75028
75029
75030
75031
75032
75033
75034
75035
75036
75037
75038
75039
75040
75041
75042
75043
75044
75045
75046
75047
75048
75049
75050
75051
75052
75053
75054
75055
75056
75057
75058
75059
75060
75061
75062
75063
75064
75065
75066
75067
75068
75069
75070
75071
75072
75073
75074
75075
75076
75077
75078
75079
75080
75081
75082
75083
75084
75085
75086
75087
75088
75089
75090
75091
75092
75093
75094
75095
75096
75097
75098
75099
75100
75101
75102
75103
75104
75105
75106
75107
75108
75109
75110
75111
75112
75113
75114
75115
75116
75117
75118
75119
75120
75121
75122
75123
75124
75125
75126
75127
75128
75129
75130
75131
75132
75133
75134
75135
75136
75137
75138
75139
75140
75141
75142
75143
75144
75145
75146
75147
75148
75149
75150
75151
75152
75153
75154
75155
75156
75157
75158
75159
75160
75161
75162
75163
75164
75165
75166
75167
75168
75169
75170
75171
75172
75173
75174
75175
75176
75177
75178
75179
75180
75181
75182
75183
75184
75185
75186
75187
75188
75189
75190
75191
75192
75193
75194
75195
75196
75197
75198
75199
75200
75201
75202
75203
75204
75205
75206
75207
75208
75209
75210
75211
75212
75213
75214
75215
75216
75217
75218
75219
75220
75221
75222
75223
75224
75225
75226
75227
75228
75229
75230
75231
75232
75233
75234
75235
75236
75237
75238
75239
75240
75241
75242
75243
75244
75245
75246
75247
75248
75249
75250
75251
75252
75253
75254
75255
75256
75257
75258
75259
75260
75261
75262
75263
75264
75265
75266
75267
75268
75269
75270
75271
75272
75273
75274
75275
75276
75277
75278
75279
75280
75281
75282
75283
75284
75285
75286
75287
75288
75289
75290
75291
75292
75293
75294
75295
75296
75297
75298
75299
75300
75301
75302
75303
75304
75305
75306
75307
75308
75309
75310
75311
75312
75313
75314
75315
75316
75317
75318
75319
75320
75321
75322
75323
75324
75325
75326
75327
75328
75329
75330
75331
75332
75333
75334
75335
75336
75337
75338
75339
75340
75341
75342
75343
75344
75345
75346
75347
75348
75349
75350
75351
75352
75353
75354
75355
75356
75357
75358
75359
75360
75361
75362
75363
75364
75365
75366
75367
75368
75369
75370
75371
75372
75373
75374
75375
75376
75377
75378
75379
75380
75381
75382
75383
75384
75385
75386
75387
75388
75389
75390
75391
75392
75393
75394
75395
75396
75397
75398
75399
75400
75401
75402
75403
75404
75405
75406
75407
75408
75409
75410
75411
75412
75413
75414
75415
75416
75417
75418
75419
75420
75421
75422
75423
75424
75425
75426
75427
75428
75429
75430
75431
75432
75433
75434
75435
75436
75437
75438
75439
75440
75441
75442
75443
75444
75445
75446
75447
75448
75449
75450
75451
75452
75453
75454
75455
75456
75457
75458
75459
75460
75461
75462
75463
75464
75465
75466
75467
75468
75469
75470
75471
75472
75473
75474
75475
75476
75477
75478
75479
75480
75481
75482
75483
75484
75485
75486
75487
75488
75489
75490
75491
75492
75493
75494
75495
75496
75497
75498
75499
75500
75501
75502
75503
75504
75505
75506
75507
75508
75509
75510
75511
75512
75513
75514
75515
75516
75517
75518
75519
75520
75521
75522
75523
75524
75525
75526
75527
75528
75529
75530
75531
75532
75533
75534
75535
75536
75537
75538
75539
75540
75541
75542
75543
75544
75545
75546
75547
75548
75549
75550
75551
75552
75553
75554
75555
75556
75557
75558
75559
75560
75561
75562
75563
75564
75565
75566
75567
75568
75569
75570
75571
75572
75573
75574
75575
75576
75577
75578
75579
75580
75581
75582
75583
75584
75585
75586
75587
75588
75589
75590
75591
75592
75593
75594
75595
75596
75597
75598
75599
75600
75601
75602
75603
75604
75605
75606
75607
75608
75609
75610
75611
75612
75613
75614
75615
75616
75617
75618
75619
75620
75621
75622
75623
75624
75625
75626
75627
75628
75629
75630
75631
75632
75633
75634
75635
75636
75637
75638
75639
75640
75641
75642
75643
75644
75645
75646
75647
75648
75649
75650
75651
75652
75653
75654
75655
75656
75657
75658
75659
75660
75661
75662
75663
75664
75665
75666
75667
75668
75669
75670
75671
75672
75673
75674
75675
75676
75677
75678
75679
75680
75681
75682
75683
75684
75685
75686
75687
75688
75689
75690
75691
75692
75693
75694
75695
75696
75697
75698
75699
75700
75701
75702
75703
75704
75705
75706
75707
75708
75709
75710
75711
75712
75713
75714
75715
75716
75717
75718
75719
75720
75721
75722
75723
75724
75725
75726
75727
75728
75729
75730
75731
75732
75733
75734
75735
75736
75737
75738
75739
75740
75741
75742
75743
75744
75745
75746
75747
75748
75749
75750
75751
75752
75753
75754
75755
75756
75757
75758
75759
75760
75761
75762
75763
75764
75765
75766
75767
75768
75769
75770
75771
75772
75773
75774
75775
75776
75777
75778
75779
75780
75781
75782
75783
75784
75785
75786
75787
75788
75789
75790
75791
75792
75793
75794
75795
75796
75797
75798
75799
75800
75801
75802
75803
75804
75805
75806
75807
75808
75809
75810
75811
75812
75813
75814
75815
75816
75817
75818
75819
75820
75821
75822
75823
75824
75825
75826
75827
75828
75829
75830
75831
75832
75833
75834
75835
75836
75837
75838
75839
75840
75841
75842
75843
75844
75845
75846
75847
75848
75849
75850
75851
75852
75853
75854
75855
75856
75857
75858
75859
75860
75861
75862
75863
75864
75865
75866
75867
75868
75869
75870
75871
75872
75873
75874
75875
75876
75877
75878
75879
75880
75881
75882
75883
75884
75885
75886
75887
75888
75889
75890
75891
75892
75893
75894
75895
75896
75897
75898
75899
75900
75901
75902
75903
75904
75905
75906
75907
75908
75909
75910
75911
75912
75913
75914
75915
75916
75917
75918
75919
75920
75921
75922
75923
75924
75925
75926
75927
75928
75929
75930
75931
75932
75933
75934
75935
75936
75937
75938
75939
75940
75941
75942
75943
75944
75945
75946
75947
75948
75949
75950
75951
75952
75953
75954
75955
75956
75957
75958
75959
75960
75961
75962
75963
75964
75965
75966
75967
75968
75969
75970
75971
75972
75973
75974
75975
75976
75977
75978
75979
75980
75981
75982
75983
75984
75985
75986
75987
75988
75989
75990
75991
75992
75993
75994
75995
75996
75997
75998
75999
76000
76001
76002
76003
76004
76005
76006
76007
76008
76009
76010
76011
76012
76013
76014
76015
76016
76017
76018
76019
76020
76021
76022
76023
76024
76025
76026
76027
76028
76029
76030
76031
76032
76033
76034
76035
76036
76037
76038
76039
76040
76041
76042
76043
76044
76045
76046
76047
76048
76049
76050
76051
76052
76053
76054
76055
76056
76057
76058
76059
76060
76061
76062
76063
76064
76065
76066
76067
76068
76069
76070
76071
76072
76073
76074
76075
76076
76077
76078
76079
76080
76081
76082
76083
76084
76085
76086
76087
76088
76089
76090
76091
76092
76093
76094
76095
76096
76097
76098
76099
76100
76101
76102
76103
76104
76105
76106
76107
76108
76109
76110
76111
76112
76113
76114
76115
76116
76117
76118
76119
76120
76121
76122
76123
76124
76125
76126
76127
76128
76129
76130
76131
76132
76133
76134
76135
76136
76137
76138
76139
76140
76141
76142
76143
76144
76145
76146
76147
76148
76149
76150
76151
76152
76153
76154
76155
76156
76157
76158
76159
76160
76161
76162
76163
76164
76165
76166
76167
76168
76169
76170
76171
76172
76173
76174
76175
76176
76177
76178
76179
76180
76181
76182
76183
76184
76185
76186
76187
76188
76189
76190
76191
76192
76193
76194
76195
76196
76197
76198
76199
76200
76201
76202
76203
76204
76205
76206
76207
76208
76209
76210
76211
76212
76213
76214
76215
76216
76217
76218
76219
76220
76221
76222
76223
76224
76225
76226
76227
76228
76229
76230
76231
76232
76233
76234
76235
76236
76237
76238
76239
76240
76241
76242
76243
76244
76245
76246
76247
76248
76249
76250
76251
76252
76253
76254
76255
76256
76257
76258
76259
76260
76261
76262
76263
76264
76265
76266
76267
76268
76269
76270
76271
76272
76273
76274
76275
76276
76277
76278
76279
76280
76281
76282
76283
76284
76285
76286
76287
76288
76289
76290
76291
76292
76293
76294
76295
76296
76297
76298
76299
76300
76301
76302
76303
76304
76305
76306
76307
76308
76309
76310
76311
76312
76313
76314
76315
76316
76317
76318
76319
76320
76321
76322
76323
76324
76325
76326
76327
76328
76329
76330
76331
76332
76333
76334
76335
76336
76337
76338
76339
76340
76341
76342
76343
76344
76345
76346
76347
76348
76349
76350
76351
76352
76353
76354
76355
76356
76357
76358
76359
76360
76361
76362
76363
76364
76365
76366
76367
76368
76369
76370
76371
76372
76373
76374
76375
76376
76377
76378
76379
76380
76381
76382
76383
76384
76385
76386
76387
76388
76389
76390
76391
76392
76393
76394
76395
76396
76397
76398
76399
76400
76401
76402
76403
76404
76405
76406
76407
76408
76409
76410
76411
76412
76413
76414
76415
76416
76417
76418
76419
76420
76421
76422
76423
76424
76425
76426
76427
76428
76429
76430
76431
76432
76433
76434
76435
76436
76437
76438
76439
76440
76441
76442
76443
76444
76445
76446
76447
76448
76449
76450
76451
76452
76453
76454
76455
76456
76457
76458
76459
76460
76461
76462
76463
76464
76465
76466
76467
76468
76469
76470
76471
76472
76473
76474
76475
76476
76477
76478
76479
76480
76481
76482
76483
76484
76485
76486
76487
76488
76489
76490
76491
76492
76493
76494
76495
76496
76497
76498
76499
76500
76501
76502
76503
76504
76505
76506
76507
76508
76509
76510
76511
76512
76513
76514
76515
76516
76517
76518
76519
76520
76521
76522
76523
76524
76525
76526
76527
76528
76529
76530
76531
76532
76533
76534
76535
76536
76537
76538
76539
76540
76541
76542
76543
76544
76545
76546
76547
76548
76549
76550
76551
76552
76553
76554
76555
76556
76557
76558
76559
76560
76561
76562
76563
76564
76565
76566
76567
76568
76569
76570
76571
76572
76573
76574
76575
76576
76577
76578
76579
76580
76581
76582
76583
76584
76585
76586
76587
76588
76589
76590
76591
76592
76593
76594
76595
76596
76597
76598
76599
76600
76601
76602
76603
76604
76605
76606
76607
76608
76609
76610
76611
76612
76613
76614
76615
76616
76617
76618
76619
76620
76621
76622
76623
76624
76625
76626
76627
76628
76629
76630
76631
76632
76633
76634
76635
76636
76637
76638
76639
76640
76641
76642
76643
76644
76645
76646
76647
76648
76649
76650
76651
76652
76653
76654
76655
76656
76657
76658
76659
76660
76661
76662
76663
76664
76665
76666
76667
76668
76669
76670
76671
76672
76673
76674
76675
76676
76677
76678
76679
76680
76681
76682
76683
76684
76685
76686
76687
76688
76689
76690
76691
76692
76693
76694
76695
76696
76697
76698
76699
76700
76701
76702
76703
76704
76705
76706
76707
76708
76709
76710
76711
76712
76713
76714
76715
76716
76717
76718
76719
76720
76721
76722
76723
76724
76725
76726
76727
76728
76729
76730
76731
76732
76733
76734
76735
76736
76737
76738
76739
76740
76741
76742
76743
76744
76745
76746
76747
76748
76749
76750
76751
76752
76753
76754
76755
76756
76757
76758
76759
76760
76761
76762
76763
76764
76765
76766
76767
76768
76769
76770
76771
76772
76773
76774
76775
76776
76777
76778
76779
76780
76781
76782
76783
76784
76785
76786
76787
76788
76789
76790
76791
76792
76793
76794
76795
76796
76797
76798
76799
76800
76801
76802
76803
76804
76805
76806
76807
76808
76809
76810
76811
76812
76813
76814
76815
76816
76817
76818
76819
76820
76821
76822
76823
76824
76825
76826
76827
76828
76829
76830
76831
76832
76833
76834
76835
76836
76837
76838
76839
76840
76841
76842
76843
76844
76845
76846
76847
76848
76849
76850
76851
76852
76853
76854
76855
76856
76857
76858
76859
76860
76861
76862
76863
76864
76865
76866
76867
76868
76869
76870
76871
76872
76873
76874
76875
76876
76877
76878
76879
76880
76881
76882
76883
76884
76885
76886
76887
76888
76889
76890
76891
76892
76893
76894
76895
76896
76897
76898
76899
76900
76901
76902
76903
76904
76905
76906
76907
76908
76909
76910
76911
76912
76913
76914
76915
76916
76917
76918
76919
76920
76921
76922
76923
76924
76925
76926
76927
76928
76929
76930
76931
76932
76933
76934
76935
76936
76937
76938
76939
76940
76941
76942
76943
76944
76945
76946
76947
76948
76949
76950
76951
76952
76953
76954
76955
76956
76957
76958
76959
76960
76961
76962
76963
76964
76965
76966
76967
76968
76969
76970
76971
76972
76973
76974
76975
76976
76977
76978
76979
76980
76981
76982
76983
76984
76985
76986
76987
76988
76989
76990
76991
76992
76993
76994
76995
76996
76997
76998
76999
77000
77001
77002
77003
77004
77005
77006
77007
77008
77009
77010
77011
77012
77013
77014
77015
77016
77017
77018
77019
77020
77021
77022
77023
77024
77025
77026
77027
77028
77029
77030
77031
77032
77033
77034
77035
77036
77037
77038
77039
77040
77041
77042
77043
77044
77045
77046
77047
77048
77049
77050
77051
77052
77053
77054
77055
77056
77057
77058
77059
77060
77061
77062
77063
77064
77065
77066
77067
77068
77069
77070
77071
77072
77073
77074
77075
77076
77077
77078
77079
77080
77081
77082
77083
77084
77085
77086
77087
77088
77089
77090
77091
77092
77093
77094
77095
77096
77097
77098
77099
77100
77101
77102
77103
77104
77105
77106
77107
77108
77109
77110
77111
77112
77113
77114
77115
77116
77117
77118
77119
77120
77121
77122
77123
77124
77125
77126
77127
77128
77129
77130
77131
77132
77133
77134
77135
77136
77137
77138
77139
77140
77141
77142
77143
77144
77145
77146
77147
77148
77149
77150
77151
77152
77153
77154
77155
77156
77157
77158
77159
77160
77161
77162
77163
77164
77165
77166
77167
77168
77169
77170
77171
77172
77173
77174
77175
77176
77177
77178
77179
77180
77181
77182
77183
77184
77185
77186
77187
77188
77189
77190
77191
77192
77193
77194
77195
77196
77197
77198
77199
77200
77201
77202
77203
77204
77205
77206
77207
77208
77209
77210
77211
77212
77213
77214
77215
77216
77217
77218
77219
77220
77221
77222
77223
77224
77225
77226
77227
77228
77229
77230
77231
77232
77233
77234
77235
77236
77237
77238
77239
77240
77241
77242
77243
77244
77245
77246
77247
77248
77249
77250
77251
77252
77253
77254
77255
77256
77257
77258
77259
77260
77261
77262
77263
77264
77265
77266
77267
77268
77269
77270
77271
77272
77273
77274
77275
77276
77277
77278
77279
77280
77281
77282
77283
77284
77285
77286
77287
77288
77289
77290
77291
77292
77293
77294
77295
77296
77297
77298
77299
77300
77301
77302
77303
77304
77305
77306
77307
77308
77309
77310
77311
77312
77313
77314
77315
77316
77317
77318
77319
77320
77321
77322
77323
77324
77325
77326
77327
77328
77329
77330
77331
77332
77333
77334
77335
77336
77337
77338
77339
77340
77341
77342
77343
77344
77345
77346
77347
77348
77349
77350
77351
77352
77353
77354
77355
77356
77357
77358
77359
77360
77361
77362
77363
77364
77365
77366
77367
77368
77369
77370
77371
77372
77373
77374
77375
77376
77377
77378
77379
77380
77381
77382
77383
77384
77385
77386
77387
77388
77389
77390
77391
77392
77393
77394
77395
77396
77397
77398
77399
77400
77401
77402
77403
77404
77405
77406
77407
77408
77409
77410
77411
77412
77413
77414
77415
77416
77417
77418
77419
77420
77421
77422
77423
77424
77425
77426
77427
77428
77429
77430
77431
77432
77433
77434
77435
77436
77437
77438
77439
77440
77441
77442
77443
77444
77445
77446
77447
77448
77449
77450
77451
77452
77453
77454
77455
77456
77457
77458
77459
77460
77461
77462
77463
77464
77465
77466
77467
77468
77469
77470
77471
77472
77473
77474
77475
77476
77477
77478
77479
77480
77481
77482
77483
77484
77485
77486
77487
77488
77489
77490
77491
77492
77493
77494
77495
77496
77497
77498
77499
77500
77501
77502
77503
77504
77505
77506
77507
77508
77509
77510
77511
77512
77513
77514
77515
77516
77517
77518
77519
77520
77521
77522
77523
77524
77525
77526
77527
77528
77529
77530
77531
77532
77533
77534
77535
77536
77537
77538
77539
77540
77541
77542
77543
77544
77545
77546
77547
77548
77549
77550
77551
77552
77553
77554
77555
77556
77557
77558
77559
77560
77561
77562
77563
77564
77565
77566
77567
77568
77569
77570
77571
77572
77573
77574
77575
77576
77577
77578
77579
77580
77581
77582
77583
77584
77585
77586
77587
77588
77589
77590
77591
77592
77593
77594
77595
77596
77597
77598
77599
77600
77601
77602
77603
77604
77605
77606
77607
77608
77609
77610
77611
77612
77613
77614
77615
77616
77617
77618
77619
77620
77621
77622
77623
77624
77625
77626
77627
77628
77629
77630
77631
77632
77633
77634
77635
77636
77637
77638
77639
77640
77641
77642
77643
77644
77645
77646
77647
77648
77649
77650
77651
77652
77653
77654
77655
77656
77657
77658
77659
77660
77661
77662
77663
77664
77665
77666
77667
77668
77669
77670
77671
77672
77673
77674
77675
77676
77677
77678
77679
77680
77681
77682
77683
77684
77685
77686
77687
77688
77689
77690
77691
77692
77693
77694
77695
77696
77697
77698
77699
77700
77701
77702
77703
77704
77705
77706
77707
77708
77709
77710
77711
77712
77713
77714
77715
77716
77717
77718
77719
77720
77721
77722
77723
77724
77725
77726
77727
77728
77729
77730
77731
77732
77733
77734
77735
77736
77737
77738
77739
77740
77741
77742
77743
77744
77745
77746
77747
77748
77749
77750
77751
77752
77753
77754
77755
77756
77757
77758
77759
77760
77761
77762
77763
77764
77765
77766
77767
77768
77769
77770
77771
77772
77773
77774
77775
77776
77777
77778
77779
77780
77781
77782
77783
77784
77785
77786
77787
77788
77789
77790
77791
77792
77793
77794
77795
77796
77797
77798
77799
77800
77801
77802
77803
77804
77805
77806
77807
77808
77809
77810
77811
77812
77813
77814
77815
77816
77817
77818
77819
77820
77821
77822
77823
77824
77825
77826
77827
77828
77829
77830
77831
77832
77833
77834
77835
77836
77837
77838
77839
77840
77841
77842
77843
77844
77845
77846
77847
77848
77849
77850
77851
77852
77853
77854
77855
77856
77857
77858
77859
77860
77861
77862
77863
77864
77865
77866
77867
77868
77869
77870
77871
77872
77873
77874
77875
77876
77877
77878
77879
77880
77881
77882
77883
77884
77885
77886
77887
77888
77889
77890
77891
77892
77893
77894
77895
77896
77897
77898
77899
77900
77901
77902
77903
77904
77905
77906
77907
77908
77909
77910
77911
77912
77913
77914
77915
77916
77917
77918
77919
77920
77921
77922
77923
77924
77925
77926
77927
77928
77929
77930
77931
77932
77933
77934
77935
77936
77937
77938
77939
77940
77941
77942
77943
77944
77945
77946
77947
77948
77949
77950
77951
77952
77953
77954
77955
77956
77957
77958
77959
77960
77961
77962
77963
77964
77965
77966
77967
77968
77969
77970
77971
77972
77973
77974
77975
77976
77977
77978
77979
77980
77981
77982
77983
77984
77985
77986
77987
77988
77989
77990
77991
77992
77993
77994
77995
77996
77997
77998
77999
78000
78001
78002
78003
78004
78005
78006
78007
78008
78009
78010
78011
78012
78013
78014
78015
78016
78017
78018
78019
78020
78021
78022
78023
78024
78025
78026
78027
78028
78029
78030
78031
78032
78033
78034
78035
78036
78037
78038
78039
78040
78041
78042
78043
78044
78045
78046
78047
78048
78049
78050
78051
78052
78053
78054
78055
78056
78057
78058
78059
78060
78061
78062
78063
78064
78065
78066
78067
78068
78069
78070
78071
78072
78073
78074
78075
78076
78077
78078
78079
78080
78081
78082
78083
78084
78085
78086
78087
78088
78089
78090
78091
78092
78093
78094
78095
78096
78097
78098
78099
78100
78101
78102
78103
78104
78105
78106
78107
78108
78109
78110
78111
78112
78113
78114
78115
78116
78117
78118
78119
78120
78121
78122
78123
78124
78125
78126
78127
78128
78129
78130
78131
78132
78133
78134
78135
78136
78137
78138
78139
78140
78141
78142
78143
78144
78145
78146
78147
78148
78149
78150
78151
78152
78153
78154
78155
78156
78157
78158
78159
78160
78161
78162
78163
78164
78165
78166
78167
78168
78169
78170
78171
78172
78173
78174
78175
78176
78177
78178
78179
78180
78181
78182
78183
78184
78185
78186
78187
78188
78189
78190
78191
78192
78193
78194
78195
78196
78197
78198
78199
78200
78201
78202
78203
78204
78205
78206
78207
78208
78209
78210
78211
78212
78213
78214
78215
78216
78217
78218
78219
78220
78221
78222
78223
78224
78225
78226
78227
78228
78229
78230
78231
78232
78233
78234
78235
78236
78237
78238
78239
78240
78241
78242
78243
78244
78245
78246
78247
78248
78249
78250
78251
78252
78253
78254
78255
78256
78257
78258
78259
78260
78261
78262
78263
78264
78265
78266
78267
78268
78269
78270
78271
78272
78273
78274
78275
78276
78277
78278
78279
78280
78281
78282
78283
78284
78285
78286
78287
78288
78289
78290
78291
78292
78293
78294
78295
78296
78297
78298
78299
78300
78301
78302
78303
78304
78305
78306
78307
78308
78309
78310
78311
78312
78313
78314
78315
78316
78317
78318
78319
78320
78321
78322
78323
78324
78325
78326
78327
78328
78329
78330
78331
78332
78333
78334
78335
78336
78337
78338
78339
78340
78341
78342
78343
78344
78345
78346
78347
78348
78349
78350
78351
78352
78353
78354
78355
78356
78357
78358
78359
78360
78361
78362
78363
78364
78365
78366
78367
78368
78369
78370
78371
78372
78373
78374
78375
78376
78377
78378
78379
78380
78381
78382
78383
78384
78385
78386
78387
78388
78389
78390
78391
78392
78393
78394
78395
78396
78397
78398
78399
78400
78401
78402
78403
78404
78405
78406
78407
78408
78409
78410
78411
78412
78413
78414
78415
78416
78417
78418
78419
78420
78421
78422
78423
78424
78425
78426
78427
78428
78429
78430
78431
78432
78433
78434
78435
78436
78437
78438
78439
78440
78441
78442
78443
78444
78445
78446
78447
78448
78449
78450
78451
78452
78453
78454
78455
78456
78457
78458
78459
78460
78461
78462
78463
78464
78465
78466
78467
78468
78469
78470
78471
78472
78473
78474
78475
78476
78477
78478
78479
78480
78481
78482
78483
78484
78485
78486
78487
78488
78489
78490
78491
78492
78493
78494
78495
78496
78497
78498
78499
78500
78501
78502
78503
78504
78505
78506
78507
78508
78509
78510
78511
78512
78513
78514
78515
78516
78517
78518
78519
78520
78521
78522
78523
78524
78525
78526
78527
78528
78529
78530
78531
78532
78533
78534
78535
78536
78537
78538
78539
78540
78541
78542
78543
78544
78545
78546
78547
78548
78549
78550
78551
78552
78553
78554
78555
78556
78557
78558
78559
78560
78561
78562
78563
78564
78565
78566
78567
78568
78569
78570
78571
78572
78573
78574
78575
78576
78577
78578
78579
78580
78581
78582
78583
78584
78585
78586
78587
78588
78589
78590
78591
78592
78593
78594
78595
78596
78597
78598
78599
78600
78601
78602
78603
78604
78605
78606
78607
78608
78609
78610
78611
78612
78613
78614
78615
78616
78617
78618
78619
78620
78621
78622
78623
78624
78625
78626
78627
78628
78629
78630
78631
78632
78633
78634
78635
78636
78637
78638
78639
78640
78641
78642
78643
78644
78645
78646
78647
78648
78649
78650
78651
78652
78653
78654
78655
78656
78657
78658
78659
78660
78661
78662
78663
78664
78665
78666
78667
78668
78669
78670
78671
78672
78673
78674
78675
78676
78677
78678
78679
78680
78681
78682
78683
78684
78685
78686
78687
78688
78689
78690
78691
78692
78693
78694
78695
78696
78697
78698
78699
78700
78701
78702
78703
78704
78705
78706
78707
78708
78709
78710
78711
78712
78713
78714
78715
78716
78717
78718
78719
78720
78721
78722
78723
78724
78725
78726
78727
78728
78729
78730
78731
78732
78733
78734
78735
78736
78737
78738
78739
78740
78741
78742
78743
78744
78745
78746
78747
78748
78749
78750
78751
78752
78753
78754
78755
78756
78757
78758
78759
78760
78761
78762
78763
78764
78765
78766
78767
78768
78769
78770
78771
78772
78773
78774
78775
78776
78777
78778
78779
78780
78781
78782
78783
78784
78785
78786
78787
78788
78789
78790
78791
78792
78793
78794
78795
78796
78797
78798
78799
78800
78801
78802
78803
78804
78805
78806
78807
78808
78809
78810
78811
78812
78813
78814
78815
78816
78817
78818
78819
78820
78821
78822
78823
78824
78825
78826
78827
78828
78829
78830
78831
78832
78833
78834
78835
78836
78837
78838
78839
78840
78841
78842
78843
78844
78845
78846
78847
78848
78849
78850
78851
78852
78853
78854
78855
78856
78857
78858
78859
78860
78861
78862
78863
78864
78865
78866
78867
78868
78869
78870
78871
78872
78873
78874
78875
78876
78877
78878
78879
78880
78881
78882
78883
78884
78885
78886
78887
78888
78889
78890
78891
78892
78893
78894
78895
78896
78897
78898
78899
78900
78901
78902
78903
78904
78905
78906
78907
78908
78909
78910
78911
78912
78913
78914
78915
78916
78917
78918
78919
78920
78921
78922
78923
78924
78925
78926
78927
78928
78929
78930
78931
78932
78933
78934
78935
78936
78937
78938
78939
78940
78941
78942
78943
78944
78945
78946
78947
78948
78949
78950
78951
78952
78953
78954
78955
78956
78957
78958
78959
78960
78961
78962
78963
78964
78965
78966
78967
78968
78969
78970
78971
78972
78973
78974
78975
78976
78977
78978
78979
78980
78981
78982
78983
78984
78985
78986
78987
78988
78989
78990
78991
78992
78993
78994
78995
78996
78997
78998
78999
79000
79001
79002
79003
79004
79005
79006
79007
79008
79009
79010
79011
79012
79013
79014
79015
79016
79017
79018
79019
79020
79021
79022
79023
79024
79025
79026
79027
79028
79029
79030
79031
79032
79033
79034
79035
79036
79037
79038
79039
79040
79041
79042
79043
79044
79045
79046
79047
79048
79049
79050
79051
79052
79053
79054
79055
79056
79057
79058
79059
79060
79061
79062
79063
79064
79065
79066
79067
79068
79069
79070
79071
79072
79073
79074
79075
79076
79077
79078
79079
79080
79081
79082
79083
79084
79085
79086
79087
79088
79089
79090
79091
79092
79093
79094
79095
79096
79097
79098
79099
79100
79101
79102
79103
79104
79105
79106
79107
79108
79109
79110
79111
79112
79113
79114
79115
79116
79117
79118
79119
79120
79121
79122
79123
79124
79125
79126
79127
79128
79129
79130
79131
79132
79133
79134
79135
79136
79137
79138
79139
79140
79141
79142
79143
79144
79145
79146
79147
79148
79149
79150
79151
79152
79153
79154
79155
79156
79157
79158
79159
79160
79161
79162
79163
79164
79165
79166
79167
79168
79169
79170
79171
79172
79173
79174
79175
79176
79177
79178
79179
79180
79181
79182
79183
79184
79185
79186
79187
79188
79189
79190
79191
79192
79193
79194
79195
79196
79197
79198
79199
79200
79201
79202
79203
79204
79205
79206
79207
79208
79209
79210
79211
79212
79213
79214
79215
79216
79217
79218
79219
79220
79221
79222
79223
79224
79225
79226
79227
79228
79229
79230
79231
79232
79233
79234
79235
79236
79237
79238
79239
79240
79241
79242
79243
79244
79245
79246
79247
79248
79249
79250
79251
79252
79253
79254
79255
79256
79257
79258
79259
79260
79261
79262
79263
79264
79265
79266
79267
79268
79269
79270
79271
79272
79273
79274
79275
79276
79277
79278
79279
79280
79281
79282
79283
79284
79285
79286
79287
79288
79289
79290
79291
79292
79293
79294
79295
79296
79297
79298
79299
79300
79301
79302
79303
79304
79305
79306
79307
79308
79309
79310
79311
79312
79313
79314
79315
79316
79317
79318
79319
79320
79321
79322
79323
79324
79325
79326
79327
79328
79329
79330
79331
79332
79333
79334
79335
79336
79337
79338
79339
79340
79341
79342
79343
79344
79345
79346
79347
79348
79349
79350
79351
79352
79353
79354
79355
79356
79357
79358
79359
79360
79361
79362
79363
79364
79365
79366
79367
79368
79369
79370
79371
79372
79373
79374
79375
79376
79377
79378
79379
79380
79381
79382
79383
79384
79385
79386
79387
79388
79389
79390
79391
79392
79393
79394
79395
79396
79397
79398
79399
79400
79401
79402
79403
79404
79405
79406
79407
79408
79409
79410
79411
79412
79413
79414
79415
79416
79417
79418
79419
79420
79421
79422
79423
79424
79425
79426
79427
79428
79429
79430
79431
79432
79433
79434
79435
79436
79437
79438
79439
79440
79441
79442
79443
79444
79445
79446
79447
79448
79449
79450
79451
79452
79453
79454
79455
79456
79457
79458
79459
79460
79461
79462
79463
79464
79465
79466
79467
79468
79469
79470
79471
79472
79473
79474
79475
79476
79477
79478
79479
79480
79481
79482
79483
79484
79485
79486
79487
79488
79489
79490
79491
79492
79493
79494
79495
79496
79497
79498
79499
79500
79501
79502
79503
79504
79505
79506
79507
79508
79509
79510
79511
79512
79513
79514
79515
79516
79517
79518
79519
79520
79521
79522
79523
79524
79525
79526
79527
79528
79529
79530
79531
79532
79533
79534
79535
79536
79537
79538
79539
79540
79541
79542
79543
79544
79545
79546
79547
79548
79549
79550
79551
79552
79553
79554
79555
79556
79557
79558
79559
79560
79561
79562
79563
79564
79565
79566
79567
79568
79569
79570
79571
79572
79573
79574
79575
79576
79577
79578
79579
79580
79581
79582
79583
79584
79585
79586
79587
79588
79589
79590
79591
79592
79593
79594
79595
79596
79597
79598
79599
79600
79601
79602
79603
79604
79605
79606
79607
79608
79609
79610
79611
79612
79613
79614
79615
79616
79617
79618
79619
79620
79621
79622
79623
79624
79625
79626
79627
79628
79629
79630
79631
79632
79633
79634
79635
79636
79637
79638
79639
79640
79641
79642
79643
79644
79645
79646
79647
79648
79649
79650
79651
79652
79653
79654
79655
79656
79657
79658
79659
79660
79661
79662
79663
79664
79665
79666
79667
79668
79669
79670
79671
79672
79673
79674
79675
79676
79677
79678
79679
79680
79681
79682
79683
79684
79685
79686
79687
79688
79689
79690
79691
79692
79693
79694
79695
79696
79697
79698
79699
79700
79701
79702
79703
79704
79705
79706
79707
79708
79709
79710
79711
79712
79713
79714
79715
79716
79717
79718
79719
79720
79721
79722
79723
79724
79725
79726
79727
79728
79729
79730
79731
79732
79733
79734
79735
79736
79737
79738
79739
79740
79741
79742
79743
79744
79745
79746
79747
79748
79749
79750
79751
79752
79753
79754
79755
79756
79757
79758
79759
79760
79761
79762
79763
79764
79765
79766
79767
79768
79769
79770
79771
79772
79773
79774
79775
79776
79777
79778
79779
79780
79781
79782
79783
79784
79785
79786
79787
79788
79789
79790
79791
79792
79793
79794
79795
79796
79797
79798
79799
79800
79801
79802
79803
79804
79805
79806
79807
79808
79809
79810
79811
79812
79813
79814
79815
79816
79817
79818
79819
79820
79821
79822
79823
79824
79825
79826
79827
79828
79829
79830
79831
79832
79833
79834
79835
79836
79837
79838
79839
79840
79841
79842
79843
79844
79845
79846
79847
79848
79849
79850
79851
79852
79853
79854
79855
79856
79857
79858
79859
79860
79861
79862
79863
79864
79865
79866
79867
79868
79869
79870
79871
79872
79873
79874
79875
79876
79877
79878
79879
79880
79881
79882
79883
79884
79885
79886
79887
79888
79889
79890
79891
79892
79893
79894
79895
79896
79897
79898
79899
79900
79901
79902
79903
79904
79905
79906
79907
79908
79909
79910
79911
79912
79913
79914
79915
79916
79917
79918
79919
79920
79921
79922
79923
79924
79925
79926
79927
79928
79929
79930
79931
79932
79933
79934
79935
79936
79937
79938
79939
79940
79941
79942
79943
79944
79945
79946
79947
79948
79949
79950
79951
79952
79953
79954
79955
79956
79957
79958
79959
79960
79961
79962
79963
79964
79965
79966
79967
79968
79969
79970
79971
79972
79973
79974
79975
79976
79977
79978
79979
79980
79981
79982
79983
79984
79985
79986
79987
79988
79989
79990
79991
79992
79993
79994
79995
79996
79997
79998
79999
80000
80001
80002
80003
80004
80005
80006
80007
80008
80009
80010
80011
80012
80013
80014
80015
80016
80017
80018
80019
80020
80021
80022
80023
80024
80025
80026
80027
80028
80029
80030
80031
80032
80033
80034
80035
80036
80037
80038
80039
80040
80041
80042
80043
80044
80045
80046
80047
80048
80049
80050
80051
80052
80053
80054
80055
80056
80057
80058
80059
80060
80061
80062
80063
80064
80065
80066
80067
80068
80069
80070
80071
80072
80073
80074
80075
80076
80077
80078
80079
80080
80081
80082
80083
80084
80085
80086
80087
80088
80089
80090
80091
80092
80093
80094
80095
80096
80097
80098
80099
80100
80101
80102
80103
80104
80105
80106
80107
80108
80109
80110
80111
80112
80113
80114
80115
80116
80117
80118
80119
80120
80121
80122
80123
80124
80125
80126
80127
80128
80129
80130
80131
80132
80133
80134
80135
80136
80137
80138
80139
80140
80141
80142
80143
80144
80145
80146
80147
80148
80149
80150
80151
80152
80153
80154
80155
80156
80157
80158
80159
80160
80161
80162
80163
80164
80165
80166
80167
80168
80169
80170
80171
80172
80173
80174
80175
80176
80177
80178
80179
80180
80181
80182
80183
80184
80185
80186
80187
80188
80189
80190
80191
80192
80193
80194
80195
80196
80197
80198
80199
80200
80201
80202
80203
80204
80205
80206
80207
80208
80209
80210
80211
80212
80213
80214
80215
80216
80217
80218
80219
80220
80221
80222
80223
80224
80225
80226
80227
80228
80229
80230
80231
80232
80233
80234
80235
80236
80237
80238
80239
80240
80241
80242
80243
80244
80245
80246
80247
80248
80249
80250
80251
80252
80253
80254
80255
80256
80257
80258
80259
80260
80261
80262
80263
80264
80265
80266
80267
80268
80269
80270
80271
80272
80273
80274
80275
80276
80277
80278
80279
80280
80281
80282
80283
80284
80285
80286
80287
80288
80289
80290
80291
80292
80293
80294
80295
80296
80297
80298
80299
80300
80301
80302
80303
80304
80305
80306
80307
80308
80309
80310
80311
80312
80313
80314
80315
80316
80317
80318
80319
80320
80321
80322
80323
80324
80325
80326
80327
80328
80329
80330
80331
80332
80333
80334
80335
80336
80337
80338
80339
80340
80341
80342
80343
80344
80345
80346
80347
80348
80349
80350
80351
80352
80353
80354
80355
80356
80357
80358
80359
80360
80361
80362
80363
80364
80365
80366
80367
80368
80369
80370
80371
80372
80373
80374
80375
80376
80377
80378
80379
80380
80381
80382
80383
80384
80385
80386
80387
80388
80389
80390
80391
80392
80393
80394
80395
80396
80397
80398
80399
80400
80401
80402
80403
80404
80405
80406
80407
80408
80409
80410
80411
80412
80413
80414
80415
80416
80417
80418
80419
80420
80421
80422
80423
80424
80425
80426
80427
80428
80429
80430
80431
80432
80433
80434
80435
80436
80437
80438
80439
80440
80441
80442
80443
80444
80445
80446
80447
80448
80449
80450
80451
80452
80453
80454
80455
80456
80457
80458
80459
80460
80461
80462
80463
80464
80465
80466
80467
80468
80469
80470
80471
80472
80473
80474
80475
80476
80477
80478
80479
80480
80481
80482
80483
80484
80485
80486
80487
80488
80489
80490
80491
80492
80493
80494
80495
80496
80497
80498
80499
80500
80501
80502
80503
80504
80505
80506
80507
80508
80509
80510
80511
80512
80513
80514
80515
80516
80517
80518
80519
80520
80521
80522
80523
80524
80525
80526
80527
80528
80529
80530
80531
80532
80533
80534
80535
80536
80537
80538
80539
80540
80541
80542
80543
80544
80545
80546
80547
80548
80549
80550
80551
80552
80553
80554
80555
80556
80557
80558
80559
80560
80561
80562
80563
80564
80565
80566
80567
80568
80569
80570
80571
80572
80573
80574
80575
80576
80577
80578
80579
80580
80581
80582
80583
80584
80585
80586
80587
80588
80589
80590
80591
80592
80593
80594
80595
80596
80597
80598
80599
80600
80601
80602
80603
80604
80605
80606
80607
80608
80609
80610
80611
80612
80613
80614
80615
80616
80617
80618
80619
80620
80621
80622
80623
80624
80625
80626
80627
80628
80629
80630
80631
80632
80633
80634
80635
80636
80637
80638
80639
80640
80641
80642
80643
80644
80645
80646
80647
80648
80649
80650
80651
80652
80653
80654
80655
80656
80657
80658
80659
80660
80661
80662
80663
80664
80665
80666
80667
80668
80669
80670
80671
80672
80673
80674
80675
80676
80677
80678
80679
80680
80681
80682
80683
80684
80685
80686
80687
80688
80689
80690
80691
80692
80693
80694
80695
80696
80697
80698
80699
80700
80701
80702
80703
80704
80705
80706
80707
80708
80709
80710
80711
80712
80713
80714
80715
80716
80717
80718
80719
80720
80721
80722
80723
80724
80725
80726
80727
80728
80729
80730
80731
80732
80733
80734
80735
80736
80737
80738
80739
80740
80741
80742
80743
80744
80745
80746
80747
80748
80749
80750
80751
80752
80753
80754
80755
80756
80757
80758
80759
80760
80761
80762
80763
80764
80765
80766
80767
80768
80769
80770
80771
80772
80773
80774
80775
80776
80777
80778
80779
80780
80781
80782
80783
80784
80785
80786
80787
80788
80789
80790
80791
80792
80793
80794
80795
80796
80797
80798
80799
80800
80801
80802
80803
80804
80805
80806
80807
80808
80809
80810
80811
80812
80813
80814
80815
80816
80817
80818
80819
80820
80821
80822
80823
80824
80825
80826
80827
80828
80829
80830
80831
80832
80833
80834
80835
80836
80837
80838
80839
80840
80841
80842
80843
80844
80845
80846
80847
80848
80849
80850
80851
80852
80853
80854
80855
80856
80857
80858
80859
80860
80861
80862
80863
80864
80865
80866
80867
80868
80869
80870
80871
80872
80873
80874
80875
80876
80877
80878
80879
80880
80881
80882
80883
80884
80885
80886
80887
80888
80889
80890
80891
80892
80893
80894
80895
80896
80897
80898
80899
80900
80901
80902
80903
80904
80905
80906
80907
80908
80909
80910
80911
80912
80913
80914
80915
80916
80917
80918
80919
80920
80921
80922
80923
80924
80925
80926
80927
80928
80929
80930
80931
80932
80933
80934
80935
80936
80937
80938
80939
80940
80941
80942
80943
80944
80945
80946
80947
80948
80949
80950
80951
80952
80953
80954
80955
80956
80957
80958
80959
80960
80961
80962
80963
80964
80965
80966
80967
80968
80969
80970
80971
80972
80973
80974
80975
80976
80977
80978
80979
80980
80981
80982
80983
80984
80985
80986
80987
80988
80989
80990
80991
80992
80993
80994
80995
80996
80997
80998
80999
81000
81001
81002
81003
81004
81005
81006
81007
81008
81009
81010
81011
81012
81013
81014
81015
81016
81017
81018
81019
81020
81021
81022
81023
81024
81025
81026
81027
81028
81029
81030
81031
81032
81033
81034
81035
81036
81037
81038
81039
81040
81041
81042
81043
81044
81045
81046
81047
81048
81049
81050
81051
81052
81053
81054
81055
81056
81057
81058
81059
81060
81061
81062
81063
81064
81065
81066
81067
81068
81069
81070
81071
81072
81073
81074
81075
81076
81077
81078
81079
81080
81081
81082
81083
81084
81085
81086
81087
81088
81089
81090
81091
81092
81093
81094
81095
81096
81097
81098
81099
81100
81101
81102
81103
81104
81105
81106
81107
81108
81109
81110
81111
81112
81113
81114
81115
81116
81117
81118
81119
81120
81121
81122
81123
81124
81125
81126
81127
81128
81129
81130
81131
81132
81133
81134
81135
81136
81137
81138
81139
81140
81141
81142
81143
81144
81145
81146
81147
81148
81149
81150
81151
81152
81153
81154
81155
81156
81157
81158
81159
81160
81161
81162
81163
81164
81165
81166
81167
81168
81169
81170
81171
81172
81173
81174
81175
81176
81177
81178
81179
81180
81181
81182
81183
81184
81185
81186
81187
81188
81189
81190
81191
81192
81193
81194
81195
81196
81197
81198
81199
81200
81201
81202
81203
81204
81205
81206
81207
81208
81209
81210
81211
81212
81213
81214
81215
81216
81217
81218
81219
81220
81221
81222
81223
81224
81225
81226
81227
81228
81229
81230
81231
81232
81233
81234
81235
81236
81237
81238
81239
81240
81241
81242
81243
81244
81245
81246
81247
81248
81249
81250
81251
81252
81253
81254
81255
81256
81257
81258
81259
81260
81261
81262
81263
81264
81265
81266
81267
81268
81269
81270
81271
81272
81273
81274
81275
81276
81277
81278
81279
81280
81281
81282
81283
81284
81285
81286
81287
81288
81289
81290
81291
81292
81293
81294
81295
81296
81297
81298
81299
81300
81301
81302
81303
81304
81305
81306
81307
81308
81309
81310
81311
81312
81313
81314
81315
81316
81317
81318
81319
81320
81321
81322
81323
81324
81325
81326
81327
81328
81329
81330
81331
81332
81333
81334
81335
81336
81337
81338
81339
81340
81341
81342
81343
81344
81345
81346
81347
81348
81349
81350
81351
81352
81353
81354
81355
81356
81357
81358
81359
81360
81361
81362
81363
81364
81365
81366
81367
81368
81369
81370
81371
81372
81373
81374
81375
81376
81377
81378
81379
81380
81381
81382
81383
81384
81385
81386
81387
81388
81389
81390
81391
81392
81393
81394
81395
81396
81397
81398
81399
81400
81401
81402
81403
81404
81405
81406
81407
81408
81409
81410
81411
81412
81413
81414
81415
81416
81417
81418
81419
81420
81421
81422
81423
81424
81425
81426
81427
81428
81429
81430
81431
81432
81433
81434
81435
81436
81437
81438
81439
81440
81441
81442
81443
81444
81445
81446
81447
81448
81449
81450
81451
81452
81453
81454
81455
81456
81457
81458
81459
81460
81461
81462
81463
81464
81465
81466
81467
81468
81469
81470
81471
81472
81473
81474
81475
81476
81477
81478
81479
81480
81481
81482
81483
81484
81485
81486
81487
81488
81489
81490
81491
81492
81493
81494
81495
81496
81497
81498
81499
81500
81501
81502
81503
81504
81505
81506
81507
81508
81509
81510
81511
81512
81513
81514
81515
81516
81517
81518
81519
81520
81521
81522
81523
81524
81525
81526
81527
81528
81529
81530
81531
81532
81533
81534
81535
81536
81537
81538
81539
81540
81541
81542
81543
81544
81545
81546
81547
81548
81549
81550
81551
81552
81553
81554
81555
81556
81557
81558
81559
81560
81561
81562
81563
81564
81565
81566
81567
81568
81569
81570
81571
81572
81573
81574
81575
81576
81577
81578
81579
81580
81581
81582
81583
81584
81585
81586
81587
81588
81589
81590
81591
81592
81593
81594
81595
81596
81597
81598
81599
81600
81601
81602
81603
81604
81605
81606
81607
81608
81609
81610
81611
81612
81613
81614
81615
81616
81617
81618
81619
81620
81621
81622
81623
81624
81625
81626
81627
81628
81629
81630
81631
81632
81633
81634
81635
81636
81637
81638
81639
81640
81641
81642
81643
81644
81645
81646
81647
81648
81649
81650
81651
81652
81653
81654
81655
81656
81657
81658
81659
81660
81661
81662
81663
81664
81665
81666
81667
81668
81669
81670
81671
81672
81673
81674
81675
81676
81677
81678
81679
81680
81681
81682
81683
81684
81685
81686
81687
81688
81689
81690
81691
81692
81693
81694
81695
81696
81697
81698
81699
81700
81701
81702
81703
81704
81705
81706
81707
81708
81709
81710
81711
81712
81713
81714
81715
81716
81717
81718
81719
81720
81721
81722
81723
81724
81725
81726
81727
81728
81729
81730
81731
81732
81733
81734
81735
81736
81737
81738
81739
81740
81741
81742
81743
81744
81745
81746
81747
81748
81749
81750
81751
81752
81753
81754
81755
81756
81757
81758
81759
81760
81761
81762
81763
81764
81765
81766
81767
81768
81769
81770
81771
81772
81773
81774
81775
81776
81777
81778
81779
81780
81781
81782
81783
81784
81785
81786
81787
81788
81789
81790
81791
81792
81793
81794
81795
81796
81797
81798
81799
81800
81801
81802
81803
81804
81805
81806
81807
81808
81809
81810
81811
81812
81813
81814
81815
81816
81817
81818
81819
81820
81821
81822
81823
81824
81825
81826
81827
81828
81829
81830
81831
81832
81833
81834
81835
81836
81837
81838
81839
81840
81841
81842
81843
81844
81845
81846
81847
81848
81849
81850
81851
81852
81853
81854
81855
81856
81857
81858
81859
81860
81861
81862
81863
81864
81865
81866
81867
81868
81869
81870
81871
81872
81873
81874
81875
81876
81877
81878
81879
81880
81881
81882
81883
81884
81885
81886
81887
81888
81889
81890
81891
81892
81893
81894
81895
81896
81897
81898
81899
81900
81901
81902
81903
81904
81905
81906
81907
81908
81909
81910
81911
81912
81913
81914
81915
81916
81917
81918
81919
81920
81921
81922
81923
81924
81925
81926
81927
81928
81929
81930
81931
81932
81933
81934
81935
81936
81937
81938
81939
81940
81941
81942
81943
81944
81945
81946
81947
81948
81949
81950
81951
81952
81953
81954
81955
81956
81957
81958
81959
81960
81961
81962
81963
81964
81965
81966
81967
81968
81969
81970
81971
81972
81973
81974
81975
81976
81977
81978
81979
81980
81981
81982
81983
81984
81985
81986
81987
81988
81989
81990
81991
81992
81993
81994
81995
81996
81997
81998
81999
82000
82001
82002
82003
82004
82005
82006
82007
82008
82009
82010
82011
82012
82013
82014
82015
82016
82017
82018
82019
82020
82021
82022
82023
82024
82025
82026
82027
82028
82029
82030
82031
82032
82033
82034
82035
82036
82037
82038
82039
82040
82041
82042
82043
82044
82045
82046
82047
82048
82049
82050
82051
82052
82053
82054
82055
82056
82057
82058
82059
82060
82061
82062
82063
82064
82065
82066
82067
82068
82069
82070
82071
82072
82073
82074
82075
82076
82077
82078
82079
82080
82081
82082
82083
82084
82085
82086
82087
82088
82089
82090
82091
82092
82093
82094
82095
82096
82097
82098
82099
82100
82101
82102
82103
82104
82105
82106
82107
82108
82109
82110
82111
82112
82113
82114
82115
82116
82117
82118
82119
82120
82121
82122
82123
82124
82125
82126
82127
82128
82129
82130
82131
82132
82133
82134
82135
82136
82137
82138
82139
82140
82141
82142
82143
82144
82145
82146
82147
82148
82149
82150
82151
82152
82153
82154
82155
82156
82157
82158
82159
82160
82161
82162
82163
82164
82165
82166
82167
82168
82169
82170
82171
82172
82173
82174
82175
82176
82177
82178
82179
82180
82181
82182
82183
82184
82185
82186
82187
82188
82189
82190
82191
82192
82193
82194
82195
82196
82197
82198
82199
82200
82201
82202
82203
82204
82205
82206
82207
82208
82209
82210
82211
82212
82213
82214
82215
82216
82217
82218
82219
82220
82221
82222
82223
82224
82225
82226
82227
82228
82229
82230
82231
82232
82233
82234
82235
82236
82237
82238
82239
82240
82241
82242
82243
82244
82245
82246
82247
82248
82249
82250
82251
82252
82253
82254
82255
82256
82257
82258
82259
82260
82261
82262
82263
82264
82265
82266
82267
82268
82269
82270
82271
82272
82273
82274
82275
82276
82277
82278
82279
82280
82281
82282
82283
82284
82285
82286
82287
82288
82289
82290
82291
82292
82293
82294
82295
82296
82297
82298
82299
82300
82301
82302
82303
82304
82305
82306
82307
82308
82309
82310
82311
82312
82313
82314
82315
82316
82317
82318
82319
82320
82321
82322
82323
82324
82325
82326
82327
82328
82329
82330
82331
82332
82333
82334
82335
82336
82337
82338
82339
82340
82341
82342
82343
82344
82345
82346
82347
82348
82349
82350
82351
82352
82353
82354
82355
82356
82357
82358
82359
82360
82361
82362
82363
82364
82365
82366
82367
82368
82369
82370
82371
82372
82373
82374
82375
82376
82377
82378
82379
82380
82381
82382
82383
82384
82385
82386
82387
82388
82389
82390
82391
82392
82393
82394
82395
82396
82397
82398
82399
82400
82401
82402
82403
82404
82405
82406
82407
82408
82409
82410
82411
82412
82413
82414
82415
82416
82417
82418
82419
82420
82421
82422
82423
82424
82425
82426
82427
82428
82429
82430
82431
82432
82433
82434
82435
82436
82437
82438
82439
82440
82441
82442
82443
82444
82445
82446
82447
82448
82449
82450
82451
82452
82453
82454
82455
82456
82457
82458
82459
82460
82461
82462
82463
82464
82465
82466
82467
82468
82469
82470
82471
82472
82473
82474
82475
82476
82477
82478
82479
82480
82481
82482
82483
82484
82485
82486
82487
82488
82489
82490
82491
82492
82493
82494
82495
82496
82497
82498
82499
82500
82501
82502
82503
82504
82505
82506
82507
82508
82509
82510
82511
82512
82513
82514
82515
82516
82517
82518
82519
82520
82521
82522
82523
82524
82525
82526
82527
82528
82529
82530
82531
82532
82533
82534
82535
82536
82537
82538
82539
82540
82541
82542
82543
82544
82545
82546
82547
82548
82549
82550
82551
82552
82553
82554
82555
82556
82557
82558
82559
82560
82561
82562
82563
82564
82565
82566
82567
82568
82569
82570
82571
82572
82573
82574
82575
82576
82577
82578
82579
82580
82581
82582
82583
82584
82585
82586
82587
82588
82589
82590
82591
82592
82593
82594
82595
82596
82597
82598
82599
82600
82601
82602
82603
82604
82605
82606
82607
82608
82609
82610
82611
82612
82613
82614
82615
82616
82617
82618
82619
82620
82621
82622
82623
82624
82625
82626
82627
82628
82629
82630
82631
82632
82633
82634
82635
82636
82637
82638
82639
82640
82641
82642
82643
82644
82645
82646
82647
82648
82649
82650
82651
82652
82653
82654
82655
82656
82657
82658
82659
82660
82661
82662
82663
82664
82665
82666
82667
82668
82669
82670
82671
82672
82673
82674
82675
82676
82677
82678
82679
82680
82681
82682
82683
82684
82685
82686
82687
82688
82689
82690
82691
82692
82693
82694
82695
82696
82697
82698
82699
82700
82701
82702
82703
82704
82705
82706
82707
82708
82709
82710
82711
82712
82713
82714
82715
82716
82717
82718
82719
82720
82721
82722
82723
82724
82725
82726
82727
82728
82729
82730
82731
82732
82733
82734
82735
82736
82737
82738
82739
82740
82741
82742
82743
82744
82745
82746
82747
82748
82749
82750
82751
82752
82753
82754
82755
82756
82757
82758
82759
82760
82761
82762
82763
82764
82765
82766
82767
82768
82769
82770
82771
82772
82773
82774
82775
82776
82777
82778
82779
82780
82781
82782
82783
82784
82785
82786
82787
82788
82789
82790
82791
82792
82793
82794
82795
82796
82797
82798
82799
82800
82801
82802
82803
82804
82805
82806
82807
82808
82809
82810
82811
82812
82813
82814
82815
82816
82817
82818
82819
82820
82821
82822
82823
82824
82825
82826
82827
82828
82829
82830
82831
82832
82833
82834
82835
82836
82837
82838
82839
82840
82841
82842
82843
82844
82845
82846
82847
82848
82849
82850
82851
82852
82853
82854
82855
82856
82857
82858
82859
82860
82861
82862
82863
82864
82865
82866
82867
82868
82869
82870
82871
82872
82873
82874
82875
82876
82877
82878
82879
82880
82881
82882
82883
82884
82885
82886
82887
82888
82889
82890
82891
82892
82893
82894
82895
82896
82897
82898
82899
82900
82901
82902
82903
82904
82905
82906
82907
82908
82909
82910
82911
82912
82913
82914
82915
82916
82917
82918
82919
82920
82921
82922
82923
82924
82925
82926
82927
82928
82929
82930
82931
82932
82933
82934
82935
82936
82937
82938
82939
82940
82941
82942
82943
82944
82945
82946
82947
82948
82949
82950
82951
82952
82953
82954
82955
82956
82957
82958
82959
82960
82961
82962
82963
82964
82965
82966
82967
82968
82969
82970
82971
82972
82973
82974
82975
82976
82977
82978
82979
82980
82981
82982
82983
82984
82985
82986
82987
82988
82989
82990
82991
82992
82993
82994
82995
82996
82997
82998
82999
83000
83001
83002
83003
83004
83005
83006
83007
83008
83009
83010
83011
83012
83013
83014
83015
83016
83017
83018
83019
83020
83021
83022
83023
83024
83025
83026
83027
83028
83029
83030
83031
83032
83033
83034
83035
83036
83037
83038
83039
83040
83041
83042
83043
83044
83045
83046
83047
83048
83049
83050
83051
83052
83053
83054
83055
83056
83057
83058
83059
83060
83061
83062
83063
83064
83065
83066
83067
83068
83069
83070
83071
83072
83073
83074
83075
83076
83077
83078
83079
83080
83081
83082
83083
83084
83085
83086
83087
83088
83089
83090
83091
83092
83093
83094
83095
83096
83097
83098
83099
83100
83101
83102
83103
83104
83105
83106
83107
83108
83109
83110
83111
83112
83113
83114
83115
83116
83117
83118
83119
83120
83121
83122
83123
83124
83125
83126
83127
83128
83129
83130
83131
83132
83133
83134
83135
83136
83137
83138
83139
83140
83141
83142
83143
83144
83145
83146
83147
83148
83149
83150
83151
83152
83153
83154
83155
83156
83157
83158
83159
83160
83161
83162
83163
83164
83165
83166
83167
83168
83169
83170
83171
83172
83173
83174
83175
83176
83177
83178
83179
83180
83181
83182
83183
83184
83185
83186
83187
83188
83189
83190
83191
83192
83193
83194
83195
83196
83197
83198
83199
83200
83201
83202
83203
83204
83205
83206
83207
83208
83209
83210
83211
83212
83213
83214
83215
83216
83217
83218
83219
83220
83221
83222
83223
83224
83225
83226
83227
83228
83229
83230
83231
83232
83233
83234
83235
83236
83237
83238
83239
83240
83241
83242
83243
83244
83245
83246
83247
83248
83249
83250
83251
83252
83253
83254
83255
83256
83257
83258
83259
83260
83261
83262
83263
83264
83265
83266
83267
83268
83269
83270
83271
83272
83273
83274
83275
83276
83277
83278
83279
83280
83281
83282
83283
83284
83285
83286
83287
83288
83289
83290
83291
83292
83293
83294
83295
83296
83297
83298
83299
83300
83301
83302
83303
83304
83305
83306
83307
83308
83309
83310
83311
83312
83313
83314
83315
83316
83317
83318
83319
83320
83321
83322
83323
83324
83325
83326
83327
83328
83329
83330
83331
83332
83333
83334
83335
83336
83337
83338
83339
83340
83341
83342
83343
83344
83345
83346
83347
83348
83349
83350
83351
83352
83353
83354
83355
83356
83357
83358
83359
83360
83361
83362
83363
83364
83365
83366
83367
83368
83369
83370
83371
83372
83373
83374
83375
83376
83377
83378
83379
83380
83381
83382
83383
83384
83385
83386
83387
83388
83389
83390
83391
83392
83393
83394
83395
83396
83397
83398
83399
83400
83401
83402
83403
83404
83405
83406
83407
83408
83409
83410
83411
83412
83413
83414
83415
83416
83417
83418
83419
83420
83421
83422
83423
83424
83425
83426
83427
83428
83429
83430
83431
83432
83433
83434
83435
83436
83437
83438
83439
83440
83441
83442
83443
83444
83445
83446
83447
83448
83449
83450
83451
83452
83453
83454
83455
83456
83457
83458
83459
83460
83461
83462
83463
83464
83465
83466
83467
83468
83469
83470
83471
83472
83473
83474
83475
83476
83477
83478
83479
83480
83481
83482
83483
83484
83485
83486
83487
83488
83489
83490
83491
83492
83493
83494
83495
83496
83497
83498
83499
83500
83501
83502
83503
83504
83505
83506
83507
83508
83509
83510
83511
83512
83513
83514
83515
83516
83517
83518
83519
83520
83521
83522
83523
83524
83525
83526
83527
83528
83529
83530
83531
83532
83533
83534
83535
83536
83537
83538
83539
83540
83541
83542
83543
83544
83545
83546
83547
83548
83549
83550
83551
83552
83553
83554
83555
83556
83557
83558
83559
83560
83561
83562
83563
83564
83565
83566
83567
83568
83569
83570
83571
83572
83573
83574
83575
83576
83577
83578
83579
83580
83581
83582
83583
83584
83585
83586
83587
83588
83589
83590
83591
83592
83593
83594
83595
83596
83597
83598
83599
83600
83601
83602
83603
83604
83605
83606
83607
83608
83609
83610
83611
83612
83613
83614
83615
83616
83617
83618
83619
83620
83621
83622
83623
83624
83625
83626
83627
83628
83629
83630
83631
83632
83633
83634
83635
83636
83637
83638
83639
83640
83641
83642
83643
83644
83645
83646
83647
83648
83649
83650
83651
83652
83653
83654
83655
83656
83657
83658
83659
83660
83661
83662
83663
83664
83665
83666
83667
83668
83669
83670
83671
83672
83673
83674
83675
83676
83677
83678
83679
83680
83681
83682
83683
83684
83685
83686
83687
83688
83689
83690
83691
83692
83693
83694
83695
83696
83697
83698
83699
83700
83701
83702
83703
83704
83705
83706
83707
83708
83709
83710
83711
83712
83713
83714
83715
83716
83717
83718
83719
83720
83721
83722
83723
83724
83725
83726
83727
83728
83729
83730
83731
83732
83733
83734
83735
83736
83737
83738
83739
83740
83741
83742
83743
83744
83745
83746
83747
83748
83749
83750
83751
83752
83753
83754
83755
83756
83757
83758
83759
83760
83761
83762
83763
83764
83765
83766
83767
83768
83769
83770
83771
83772
83773
83774
83775
83776
83777
83778
83779
83780
83781
83782
83783
83784
83785
83786
83787
83788
83789
83790
83791
83792
83793
83794
83795
83796
83797
83798
83799
83800
83801
83802
83803
83804
83805
83806
83807
83808
83809
83810
83811
83812
83813
83814
83815
83816
83817
83818
83819
83820
83821
83822
83823
83824
83825
83826
83827
83828
83829
83830
83831
83832
83833
83834
83835
83836
83837
83838
83839
83840
83841
83842
83843
83844
83845
83846
83847
83848
83849
83850
83851
83852
83853
83854
83855
83856
83857
83858
83859
83860
83861
83862
83863
83864
83865
83866
83867
83868
83869
83870
83871
83872
83873
83874
83875
83876
83877
83878
83879
83880
83881
83882
83883
83884
83885
83886
83887
83888
83889
83890
83891
83892
83893
83894
83895
83896
83897
83898
83899
83900
83901
83902
83903
83904
83905
83906
83907
83908
83909
83910
83911
83912
83913
83914
83915
83916
83917
83918
83919
83920
83921
83922
83923
83924
83925
83926
83927
83928
83929
83930
83931
83932
83933
83934
83935
83936
83937
83938
83939
83940
83941
83942
83943
83944
83945
83946
83947
83948
83949
83950
83951
83952
83953
83954
83955
83956
83957
83958
83959
83960
83961
83962
83963
83964
83965
83966
83967
83968
83969
83970
83971
83972
83973
83974
83975
83976
83977
83978
83979
83980
83981
83982
83983
83984
83985
83986
83987
83988
83989
83990
83991
83992
83993
83994
83995
83996
83997
83998
83999
84000
84001
84002
84003
84004
84005
84006
84007
84008
84009
84010
84011
84012
84013
84014
84015
84016
84017
84018
84019
84020
84021
84022
84023
84024
84025
84026
84027
84028
84029
84030
84031
84032
84033
84034
84035
84036
84037
84038
84039
84040
84041
84042
84043
84044
84045
84046
84047
84048
84049
84050
84051
84052
84053
84054
84055
84056
84057
84058
84059
84060
84061
84062
84063
84064
84065
84066
84067
84068
84069
84070
84071
84072
84073
84074
84075
84076
84077
84078
84079
84080
84081
84082
84083
84084
84085
84086
84087
84088
84089
84090
84091
84092
84093
84094
84095
84096
84097
84098
84099
84100
84101
84102
84103
84104
84105
84106
84107
84108
84109
84110
84111
84112
84113
84114
84115
84116
84117
84118
84119
84120
84121
84122
84123
84124
84125
84126
84127
84128
84129
84130
84131
84132
84133
84134
84135
84136
84137
84138
84139
84140
84141
84142
84143
84144
84145
84146
84147
84148
84149
84150
84151
84152
84153
84154
84155
84156
84157
84158
84159
84160
84161
84162
84163
84164
84165
84166
84167
84168
84169
84170
84171
84172
84173
84174
84175
84176
84177
84178
84179
84180
84181
84182
84183
84184
84185
84186
84187
84188
84189
84190
84191
84192
84193
84194
84195
84196
84197
84198
84199
84200
84201
84202
84203
84204
84205
84206
84207
84208
84209
84210
84211
84212
84213
84214
84215
84216
84217
84218
84219
84220
84221
84222
84223
84224
84225
84226
84227
84228
84229
84230
84231
84232
84233
84234
84235
84236
84237
84238
84239
84240
84241
84242
84243
84244
84245
84246
84247
84248
84249
84250
84251
84252
84253
84254
84255
84256
84257
84258
84259
84260
84261
84262
84263
84264
84265
84266
84267
84268
84269
84270
84271
84272
84273
84274
84275
84276
84277
84278
84279
84280
84281
84282
84283
84284
84285
84286
84287
84288
84289
84290
84291
84292
84293
84294
84295
84296
84297
84298
84299
84300
84301
84302
84303
84304
84305
84306
84307
84308
84309
84310
84311
84312
84313
84314
84315
84316
84317
84318
84319
84320
84321
84322
84323
84324
84325
84326
84327
84328
84329
84330
84331
84332
84333
84334
84335
84336
84337
84338
84339
84340
84341
84342
84343
84344
84345
84346
84347
84348
84349
84350
84351
84352
84353
84354
84355
84356
84357
84358
84359
84360
84361
84362
84363
84364
84365
84366
84367
84368
84369
84370
84371
84372
84373
84374
84375
84376
84377
84378
84379
84380
84381
84382
84383
84384
84385
84386
84387
84388
84389
84390
84391
84392
84393
84394
84395
84396
84397
84398
84399
84400
84401
84402
84403
84404
84405
84406
84407
84408
84409
84410
84411
84412
84413
84414
84415
84416
84417
84418
84419
84420
84421
84422
84423
84424
84425
84426
84427
84428
84429
84430
84431
84432
84433
84434
84435
84436
84437
84438
84439
84440
84441
84442
84443
84444
84445
84446
84447
84448
84449
84450
84451
84452
84453
84454
84455
84456
84457
84458
84459
84460
84461
84462
84463
84464
84465
84466
84467
84468
84469
84470
84471
84472
84473
84474
84475
84476
84477
84478
84479
84480
84481
84482
84483
84484
84485
84486
84487
84488
84489
84490
84491
84492
84493
84494
84495
84496
84497
84498
84499
84500
84501
84502
84503
84504
84505
84506
84507
84508
84509
84510
84511
84512
84513
84514
84515
84516
84517
84518
84519
84520
84521
84522
84523
84524
84525
84526
84527
84528
84529
84530
84531
84532
84533
84534
84535
84536
84537
84538
84539
84540
84541
84542
84543
84544
84545
84546
84547
84548
84549
84550
84551
84552
84553
84554
84555
84556
84557
84558
84559
84560
84561
84562
84563
84564
84565
84566
84567
84568
84569
84570
84571
84572
84573
84574
84575
84576
84577
84578
84579
84580
84581
84582
84583
84584
84585
84586
84587
84588
84589
84590
84591
84592
84593
84594
84595
84596
84597
84598
84599
84600
84601
84602
84603
84604
84605
84606
84607
84608
84609
84610
84611
84612
84613
84614
84615
84616
84617
84618
84619
84620
84621
84622
84623
84624
84625
84626
84627
84628
84629
84630
84631
84632
84633
84634
84635
84636
84637
84638
84639
84640
84641
84642
84643
84644
84645
84646
84647
84648
84649
84650
84651
84652
84653
84654
84655
84656
84657
84658
84659
84660
84661
84662
84663
84664
84665
84666
84667
84668
84669
84670
84671
84672
84673
84674
84675
84676
84677
84678
84679
84680
84681
84682
84683
84684
84685
84686
84687
84688
84689
84690
84691
84692
84693
84694
84695
84696
84697
84698
84699
84700
84701
84702
84703
84704
84705
84706
84707
84708
84709
84710
84711
84712
84713
84714
84715
84716
84717
84718
84719
84720
84721
84722
84723
84724
84725
84726
84727
84728
84729
84730
84731
84732
84733
84734
84735
84736
84737
84738
84739
84740
84741
84742
84743
84744
84745
84746
84747
84748
84749
84750
84751
84752
84753
84754
84755
84756
84757
84758
84759
84760
84761
84762
84763
84764
84765
84766
84767
84768
84769
84770
84771
84772
84773
84774
84775
84776
84777
84778
84779
84780
84781
84782
84783
84784
84785
84786
84787
84788
84789
84790
84791
84792
84793
84794
84795
84796
84797
84798
84799
84800
84801
84802
84803
84804
84805
84806
84807
84808
84809
84810
84811
84812
84813
84814
84815
84816
84817
84818
84819
84820
84821
84822
84823
84824
84825
84826
84827
84828
84829
84830
84831
84832
84833
84834
84835
84836
84837
84838
84839
84840
84841
84842
84843
84844
84845
84846
84847
84848
84849
84850
84851
84852
84853
84854
84855
84856
84857
84858
84859
84860
84861
84862
84863
84864
84865
84866
84867
84868
84869
84870
84871
84872
84873
84874
84875
84876
84877
84878
84879
84880
84881
84882
84883
84884
84885
84886
84887
84888
84889
84890
84891
84892
84893
84894
84895
84896
84897
84898
84899
84900
84901
84902
84903
84904
84905
84906
84907
84908
84909
84910
84911
84912
84913
84914
84915
84916
84917
84918
84919
84920
84921
84922
84923
84924
84925
84926
84927
84928
84929
84930
84931
84932
84933
84934
84935
84936
84937
84938
84939
84940
84941
84942
84943
84944
84945
84946
84947
84948
84949
84950
84951
84952
84953
84954
84955
84956
84957
84958
84959
84960
84961
84962
84963
84964
84965
84966
84967
84968
84969
84970
84971
84972
84973
84974
84975
84976
84977
84978
84979
84980
84981
84982
84983
84984
84985
84986
84987
84988
84989
84990
84991
84992
84993
84994
84995
84996
84997
84998
84999
85000
85001
85002
85003
85004
85005
85006
85007
85008
85009
85010
85011
85012
85013
85014
85015
85016
85017
85018
85019
85020
85021
85022
85023
85024
85025
85026
85027
85028
85029
85030
85031
85032
85033
85034
85035
85036
85037
85038
85039
85040
85041
85042
85043
85044
85045
85046
85047
85048
85049
85050
85051
85052
85053
85054
85055
85056
85057
85058
85059
85060
85061
85062
85063
85064
85065
85066
85067
85068
85069
85070
85071
85072
85073
85074
85075
85076
85077
85078
85079
85080
85081
85082
85083
85084
85085
85086
85087
85088
85089
85090
85091
85092
85093
85094
85095
85096
85097
85098
85099
85100
85101
85102
85103
85104
85105
85106
85107
85108
85109
85110
85111
85112
85113
85114
85115
85116
85117
85118
85119
85120
85121
85122
85123
85124
85125
85126
85127
85128
85129
85130
85131
85132
85133
85134
85135
85136
85137
85138
85139
85140
85141
85142
85143
85144
85145
85146
85147
85148
85149
85150
85151
85152
85153
85154
85155
85156
85157
85158
85159
85160
85161
85162
85163
85164
85165
85166
85167
85168
85169
85170
85171
85172
85173
85174
85175
85176
85177
85178
85179
85180
85181
85182
85183
85184
85185
85186
85187
85188
85189
85190
85191
85192
85193
85194
85195
85196
85197
85198
85199
85200
85201
85202
85203
85204
85205
85206
85207
85208
85209
85210
85211
85212
85213
85214
85215
85216
85217
85218
85219
85220
85221
85222
85223
85224
85225
85226
85227
85228
85229
85230
85231
85232
85233
85234
85235
85236
85237
85238
85239
85240
85241
85242
85243
85244
85245
85246
85247
85248
85249
85250
85251
85252
85253
85254
85255
85256
85257
85258
85259
85260
85261
85262
85263
85264
85265
85266
85267
85268
85269
85270
85271
85272
85273
85274
85275
85276
85277
85278
85279
85280
85281
85282
85283
85284
85285
85286
85287
85288
85289
85290
85291
85292
85293
85294
85295
85296
85297
85298
85299
85300
85301
85302
85303
85304
85305
85306
85307
85308
85309
85310
85311
85312
85313
85314
85315
85316
85317
85318
85319
85320
85321
85322
85323
85324
85325
85326
85327
85328
85329
85330
85331
85332
85333
85334
85335
85336
85337
85338
85339
85340
85341
85342
85343
85344
85345
85346
85347
85348
85349
85350
85351
85352
85353
85354
85355
85356
85357
85358
85359
85360
85361
85362
85363
85364
85365
85366
85367
85368
85369
85370
85371
85372
85373
85374
85375
85376
85377
85378
85379
85380
85381
85382
85383
85384
85385
85386
85387
85388
85389
85390
85391
85392
85393
85394
85395
85396
85397
85398
85399
85400
85401
85402
85403
85404
85405
85406
85407
85408
85409
85410
85411
85412
85413
85414
85415
85416
85417
85418
85419
85420
85421
85422
85423
85424
85425
85426
85427
85428
85429
85430
85431
85432
85433
85434
85435
85436
85437
85438
85439
85440
85441
85442
85443
85444
85445
85446
85447
85448
85449
85450
85451
85452
85453
85454
85455
85456
85457
85458
85459
85460
85461
85462
85463
85464
85465
85466
85467
85468
85469
85470
85471
85472
85473
85474
85475
85476
85477
85478
85479
85480
85481
85482
85483
85484
85485
85486
85487
85488
85489
85490
85491
85492
85493
85494
85495
85496
85497
85498
85499
85500
85501
85502
85503
85504
85505
85506
85507
85508
85509
85510
85511
85512
85513
85514
85515
85516
85517
85518
85519
85520
85521
85522
85523
85524
85525
85526
85527
85528
85529
85530
85531
85532
85533
85534
85535
85536
85537
85538
85539
85540
85541
85542
85543
85544
85545
85546
85547
85548
85549
85550
85551
85552
85553
85554
85555
85556
85557
85558
85559
85560
85561
85562
85563
85564
85565
85566
85567
85568
85569
85570
85571
85572
85573
85574
85575
85576
85577
85578
85579
85580
85581
85582
85583
85584
85585
85586
85587
85588
85589
85590
85591
85592
85593
85594
85595
85596
85597
85598
85599
85600
85601
85602
85603
85604
85605
85606
85607
85608
85609
85610
85611
85612
85613
85614
85615
85616
85617
85618
85619
85620
85621
85622
85623
85624
85625
85626
85627
85628
85629
85630
85631
85632
85633
85634
85635
85636
85637
85638
85639
85640
85641
85642
85643
85644
85645
85646
85647
85648
85649
85650
85651
85652
85653
85654
85655
85656
85657
85658
85659
85660
85661
85662
85663
85664
85665
85666
85667
85668
85669
85670
85671
85672
85673
85674
85675
85676
85677
85678
85679
85680
85681
85682
85683
85684
85685
85686
85687
85688
85689
85690
85691
85692
85693
85694
85695
85696
85697
85698
85699
85700
85701
85702
85703
85704
85705
85706
85707
85708
85709
85710
85711
85712
85713
85714
85715
85716
85717
85718
85719
85720
85721
85722
85723
85724
85725
85726
85727
85728
85729
85730
85731
85732
85733
85734
85735
85736
85737
85738
85739
85740
85741
85742
85743
85744
85745
85746
85747
85748
85749
85750
85751
85752
85753
85754
85755
85756
85757
85758
85759
85760
85761
85762
85763
85764
85765
85766
85767
85768
85769
85770
85771
85772
85773
85774
85775
85776
85777
85778
85779
85780
85781
85782
85783
85784
85785
85786
85787
85788
85789
85790
85791
85792
85793
85794
85795
85796
85797
85798
85799
85800
85801
85802
85803
85804
85805
85806
85807
85808
85809
85810
85811
85812
85813
85814
85815
85816
85817
85818
85819
85820
85821
85822
85823
85824
85825
85826
85827
85828
85829
85830
85831
85832
85833
85834
85835
85836
85837
85838
85839
85840
85841
85842
85843
85844
85845
85846
85847
85848
85849
85850
85851
85852
85853
85854
85855
85856
85857
85858
85859
85860
85861
85862
85863
85864
85865
85866
85867
85868
85869
85870
85871
85872
85873
85874
85875
85876
85877
85878
85879
85880
85881
85882
85883
85884
85885
85886
85887
85888
85889
85890
85891
85892
85893
85894
85895
85896
85897
85898
85899
85900
85901
85902
85903
85904
85905
85906
85907
85908
85909
85910
85911
85912
85913
85914
85915
85916
85917
85918
85919
85920
85921
85922
85923
85924
85925
85926
85927
85928
85929
85930
85931
85932
85933
85934
85935
85936
85937
85938
85939
85940
85941
85942
85943
85944
85945
85946
85947
85948
85949
85950
85951
85952
85953
85954
85955
85956
85957
85958
85959
85960
85961
85962
85963
85964
85965
85966
85967
85968
85969
85970
85971
85972
85973
85974
85975
85976
85977
85978
85979
85980
85981
85982
85983
85984
85985
85986
85987
85988
85989
85990
85991
85992
85993
85994
85995
85996
85997
85998
85999
86000
86001
86002
86003
86004
86005
86006
86007
86008
86009
86010
86011
86012
86013
86014
86015
86016
86017
86018
86019
86020
86021
86022
86023
86024
86025
86026
86027
86028
86029
86030
86031
86032
86033
86034
86035
86036
86037
86038
86039
86040
86041
86042
86043
86044
86045
86046
86047
86048
86049
86050
86051
86052
86053
86054
86055
86056
86057
86058
86059
86060
86061
86062
86063
86064
86065
86066
86067
86068
86069
86070
86071
86072
86073
86074
86075
86076
86077
86078
86079
86080
86081
86082
86083
86084
86085
86086
86087
86088
86089
86090
86091
86092
86093
86094
86095
86096
86097
86098
86099
86100
86101
86102
86103
86104
86105
86106
86107
86108
86109
86110
86111
86112
86113
86114
86115
86116
86117
86118
86119
86120
86121
86122
86123
86124
86125
86126
86127
86128
86129
86130
86131
86132
86133
86134
86135
86136
86137
86138
86139
86140
86141
86142
86143
86144
86145
86146
86147
86148
86149
86150
86151
86152
86153
86154
86155
86156
86157
86158
86159
86160
86161
86162
86163
86164
86165
86166
86167
86168
86169
86170
86171
86172
86173
86174
86175
86176
86177
86178
86179
86180
86181
86182
86183
86184
86185
86186
86187
86188
86189
86190
86191
86192
86193
86194
86195
86196
86197
86198
86199
86200
86201
86202
86203
86204
86205
86206
86207
86208
86209
86210
86211
86212
86213
86214
86215
86216
86217
86218
86219
86220
86221
86222
86223
86224
86225
86226
86227
86228
86229
86230
86231
86232
86233
86234
86235
86236
86237
86238
86239
86240
86241
86242
86243
86244
86245
86246
86247
86248
86249
86250
86251
86252
86253
86254
86255
86256
86257
86258
86259
86260
86261
86262
86263
86264
86265
86266
86267
86268
86269
86270
86271
86272
86273
86274
86275
86276
86277
86278
86279
86280
86281
86282
86283
86284
86285
86286
86287
86288
86289
86290
86291
86292
86293
86294
86295
86296
86297
86298
86299
86300
86301
86302
86303
86304
86305
86306
86307
86308
86309
86310
86311
86312
86313
86314
86315
86316
86317
86318
86319
86320
86321
86322
86323
86324
86325
86326
86327
86328
86329
86330
86331
86332
86333
86334
86335
86336
86337
86338
86339
86340
86341
86342
86343
86344
86345
86346
86347
86348
86349
86350
86351
86352
86353
86354
86355
86356
86357
86358
86359
86360
86361
86362
86363
86364
86365
86366
86367
86368
86369
86370
86371
86372
86373
86374
86375
86376
86377
86378
86379
86380
86381
86382
86383
86384
86385
86386
86387
86388
86389
86390
86391
86392
86393
86394
86395
86396
86397
86398
86399
86400
86401
86402
86403
86404
86405
86406
86407
86408
86409
86410
86411
86412
86413
86414
86415
86416
86417
86418
86419
86420
86421
86422
86423
86424
86425
86426
86427
86428
86429
86430
86431
86432
86433
86434
86435
86436
86437
86438
86439
86440
86441
86442
86443
86444
86445
86446
86447
86448
86449
86450
86451
86452
86453
86454
86455
86456
86457
86458
86459
86460
86461
86462
86463
86464
86465
86466
86467
86468
86469
86470
86471
86472
86473
86474
86475
86476
86477
86478
86479
86480
86481
86482
86483
86484
86485
86486
86487
86488
86489
86490
86491
86492
86493
86494
86495
86496
86497
86498
86499
86500
86501
86502
86503
86504
86505
86506
86507
86508
86509
86510
86511
86512
86513
86514
86515
86516
86517
86518
86519
86520
86521
86522
86523
86524
86525
86526
86527
86528
86529
86530
86531
86532
86533
86534
86535
86536
86537
86538
86539
86540
86541
86542
86543
86544
86545
86546
86547
86548
86549
86550
86551
86552
86553
86554
86555
86556
86557
86558
86559
86560
86561
86562
86563
86564
86565
86566
86567
86568
86569
86570
86571
86572
86573
86574
86575
86576
86577
86578
86579
86580
86581
86582
86583
86584
86585
86586
86587
86588
86589
86590
86591
86592
86593
86594
86595
86596
86597
86598
86599
86600
86601
86602
86603
86604
86605
86606
86607
86608
86609
86610
86611
86612
86613
86614
86615
86616
86617
86618
86619
86620
86621
86622
86623
86624
86625
86626
86627
86628
86629
86630
86631
86632
86633
86634
86635
86636
86637
86638
86639
86640
86641
86642
86643
86644
86645
86646
86647
86648
86649
86650
86651
86652
86653
86654
86655
86656
86657
86658
86659
86660
86661
86662
86663
86664
86665
86666
86667
86668
86669
86670
86671
86672
86673
86674
86675
86676
86677
86678
86679
86680
86681
86682
86683
86684
86685
86686
86687
86688
86689
86690
86691
86692
86693
86694
86695
86696
86697
86698
86699
86700
86701
86702
86703
86704
86705
86706
86707
86708
86709
86710
86711
86712
86713
86714
86715
86716
86717
86718
86719
86720
86721
86722
86723
86724
86725
86726
86727
86728
86729
86730
86731
86732
86733
86734
86735
86736
86737
86738
86739
86740
86741
86742
86743
86744
86745
86746
86747
86748
86749
86750
86751
86752
86753
86754
86755
86756
86757
86758
86759
86760
86761
86762
86763
86764
86765
86766
86767
86768
86769
86770
86771
86772
86773
86774
86775
86776
86777
86778
86779
86780
86781
86782
86783
86784
86785
86786
86787
86788
86789
86790
86791
86792
86793
86794
86795
86796
86797
86798
86799
86800
86801
86802
86803
86804
86805
86806
86807
86808
86809
86810
86811
86812
86813
86814
86815
86816
86817
86818
86819
86820
86821
86822
86823
86824
86825
86826
86827
86828
86829
86830
86831
86832
86833
86834
86835
86836
86837
86838
86839
86840
86841
86842
86843
86844
86845
86846
86847
86848
86849
86850
86851
86852
86853
86854
86855
86856
86857
86858
86859
86860
86861
86862
86863
86864
86865
86866
86867
86868
86869
86870
86871
86872
86873
86874
86875
86876
86877
86878
86879
86880
86881
86882
86883
86884
86885
86886
86887
86888
86889
86890
86891
86892
86893
86894
86895
86896
86897
86898
86899
86900
86901
86902
86903
86904
86905
86906
86907
86908
86909
86910
86911
86912
86913
86914
86915
86916
86917
86918
86919
86920
86921
86922
86923
86924
86925
86926
86927
86928
86929
86930
86931
86932
86933
86934
86935
86936
86937
86938
86939
86940
86941
86942
86943
86944
86945
86946
86947
86948
86949
86950
86951
86952
86953
86954
86955
86956
86957
86958
86959
86960
86961
86962
86963
86964
86965
86966
86967
86968
86969
86970
86971
86972
86973
86974
86975
86976
86977
86978
86979
86980
86981
86982
86983
86984
86985
86986
86987
86988
86989
86990
86991
86992
86993
86994
86995
86996
86997
86998
86999
87000
87001
87002
87003
87004
87005
87006
87007
87008
87009
87010
87011
87012
87013
87014
87015
87016
87017
87018
87019
87020
87021
87022
87023
87024
87025
87026
87027
87028
87029
87030
87031
87032
87033
87034
87035
87036
87037
87038
87039
87040
87041
87042
87043
87044
87045
87046
87047
87048
87049
87050
87051
87052
87053
87054
87055
87056
87057
87058
87059
87060
87061
87062
87063
87064
87065
87066
87067
87068
87069
87070
87071
87072
87073
87074
87075
87076
87077
87078
87079
87080
87081
87082
87083
87084
87085
87086
87087
87088
87089
87090
87091
87092
87093
87094
87095
87096
87097
87098
87099
87100
87101
87102
87103
87104
87105
87106
87107
87108
87109
87110
87111
87112
87113
87114
87115
87116
87117
87118
87119
87120
87121
87122
87123
87124
87125
87126
87127
87128
87129
87130
87131
87132
87133
87134
87135
87136
87137
87138
87139
87140
87141
87142
87143
87144
87145
87146
87147
87148
87149
87150
87151
87152
87153
87154
87155
87156
87157
87158
87159
87160
87161
87162
87163
87164
87165
87166
87167
87168
87169
87170
87171
87172
87173
87174
87175
87176
87177
87178
87179
87180
87181
87182
87183
87184
87185
87186
87187
87188
87189
87190
87191
87192
87193
87194
87195
87196
87197
87198
87199
87200
87201
87202
87203
87204
87205
87206
87207
87208
87209
87210
87211
87212
87213
87214
87215
87216
87217
87218
87219
87220
87221
87222
87223
87224
87225
87226
87227
87228
87229
87230
87231
87232
87233
87234
87235
87236
87237
87238
87239
87240
87241
87242
87243
87244
87245
87246
87247
87248
87249
87250
87251
87252
87253
87254
87255
87256
87257
87258
87259
87260
87261
87262
87263
87264
87265
87266
87267
87268
87269
87270
87271
87272
87273
87274
87275
87276
87277
87278
87279
87280
87281
87282
87283
87284
87285
87286
87287
87288
87289
87290
87291
87292
87293
87294
87295
87296
87297
87298
87299
87300
87301
87302
87303
87304
87305
87306
87307
87308
87309
87310
87311
87312
87313
87314
87315
87316
87317
87318
87319
87320
87321
87322
87323
87324
87325
87326
87327
87328
87329
87330
87331
87332
87333
87334
87335
87336
87337
87338
87339
87340
87341
87342
87343
87344
87345
87346
87347
87348
87349
87350
87351
87352
87353
87354
87355
87356
87357
87358
87359
87360
87361
87362
87363
87364
87365
87366
87367
87368
87369
87370
87371
87372
87373
87374
87375
87376
87377
87378
87379
87380
87381
87382
87383
87384
87385
87386
87387
87388
87389
87390
87391
87392
87393
87394
87395
87396
87397
87398
87399
87400
87401
87402
87403
87404
87405
87406
87407
87408
87409
87410
87411
87412
87413
87414
87415
87416
87417
87418
87419
87420
87421
87422
87423
87424
87425
87426
87427
87428
87429
87430
87431
87432
87433
87434
87435
87436
87437
87438
87439
87440
87441
87442
87443
87444
87445
87446
87447
87448
87449
87450
87451
87452
87453
87454
87455
87456
87457
87458
87459
87460
87461
87462
87463
87464
87465
87466
87467
87468
87469
87470
87471
87472
87473
87474
87475
87476
87477
87478
87479
87480
87481
87482
87483
87484
87485
87486
87487
87488
87489
87490
87491
87492
87493
87494
87495
87496
87497
87498
87499
87500
87501
87502
87503
87504
87505
87506
87507
87508
87509
87510
87511
87512
87513
87514
87515
87516
87517
87518
87519
87520
87521
87522
87523
87524
87525
87526
87527
87528
87529
87530
87531
87532
87533
87534
87535
87536
87537
87538
87539
87540
87541
87542
87543
87544
87545
87546
87547
87548
87549
87550
87551
87552
87553
87554
87555
87556
87557
87558
87559
87560
87561
87562
87563
87564
87565
87566
87567
87568
87569
87570
87571
87572
87573
87574
87575
87576
87577
87578
87579
87580
87581
87582
87583
87584
87585
87586
87587
87588
87589
87590
87591
87592
87593
87594
87595
87596
87597
87598
87599
87600
87601
87602
87603
87604
87605
87606
87607
87608
87609
87610
87611
87612
87613
87614
87615
87616
87617
87618
87619
87620
87621
87622
87623
87624
87625
87626
87627
87628
87629
87630
87631
87632
87633
87634
87635
87636
87637
87638
87639
87640
87641
87642
87643
87644
87645
87646
87647
87648
87649
87650
87651
87652
87653
87654
87655
87656
87657
87658
87659
87660
87661
87662
87663
87664
87665
87666
87667
87668
87669
87670
87671
87672
87673
87674
87675
87676
87677
87678
87679
87680
87681
87682
87683
87684
87685
87686
87687
87688
87689
87690
87691
87692
87693
87694
87695
87696
87697
87698
87699
87700
87701
87702
87703
87704
87705
87706
87707
87708
87709
87710
87711
87712
87713
87714
87715
87716
87717
87718
87719
87720
87721
87722
87723
87724
87725
87726
87727
87728
87729
87730
87731
87732
87733
87734
87735
87736
87737
87738
87739
87740
87741
87742
87743
87744
87745
87746
87747
87748
87749
87750
87751
87752
87753
87754
87755
87756
87757
87758
87759
87760
87761
87762
87763
87764
87765
87766
87767
87768
87769
87770
87771
87772
87773
87774
87775
87776
87777
87778
87779
87780
87781
87782
87783
87784
87785
87786
87787
87788
87789
87790
87791
87792
87793
87794
87795
87796
87797
87798
87799
87800
87801
87802
87803
87804
87805
87806
87807
87808
87809
87810
87811
87812
87813
87814
87815
87816
87817
87818
87819
87820
87821
87822
87823
87824
87825
87826
87827
87828
87829
87830
87831
87832
87833
87834
87835
87836
87837
87838
87839
87840
87841
87842
87843
87844
87845
87846
87847
87848
87849
87850
87851
87852
87853
87854
87855
87856
87857
87858
87859
87860
87861
87862
87863
87864
87865
87866
87867
87868
87869
87870
87871
87872
87873
87874
87875
87876
87877
87878
87879
87880
87881
87882
87883
87884
87885
87886
87887
87888
87889
87890
87891
87892
87893
87894
87895
87896
87897
87898
87899
87900
87901
87902
87903
87904
87905
87906
87907
87908
87909
87910
87911
87912
87913
87914
87915
87916
87917
87918
87919
87920
87921
87922
87923
87924
87925
87926
87927
87928
87929
87930
87931
87932
87933
87934
87935
87936
87937
87938
87939
87940
87941
87942
87943
87944
87945
87946
87947
87948
87949
87950
87951
87952
87953
87954
87955
87956
87957
87958
87959
87960
87961
87962
87963
87964
87965
87966
87967
87968
87969
87970
87971
87972
87973
87974
87975
87976
87977
87978
87979
87980
87981
87982
87983
87984
87985
87986
87987
87988
87989
87990
87991
87992
87993
87994
87995
87996
87997
87998
87999
88000
88001
88002
88003
88004
88005
88006
88007
88008
88009
88010
88011
88012
88013
88014
88015
88016
88017
88018
88019
88020
88021
88022
88023
88024
88025
88026
88027
88028
88029
88030
88031
88032
88033
88034
88035
88036
88037
88038
88039
88040
88041
88042
88043
88044
88045
88046
88047
88048
88049
88050
88051
88052
88053
88054
88055
88056
88057
88058
88059
88060
88061
88062
88063
88064
88065
88066
88067
88068
88069
88070
88071
88072
88073
88074
88075
88076
88077
88078
88079
88080
88081
88082
88083
88084
88085
88086
88087
88088
88089
88090
88091
88092
88093
88094
88095
88096
88097
88098
88099
88100
88101
88102
88103
88104
88105
88106
88107
88108
88109
88110
88111
88112
88113
88114
88115
88116
88117
88118
88119
88120
88121
88122
88123
88124
88125
88126
88127
88128
88129
88130
88131
88132
88133
88134
88135
88136
88137
88138
88139
88140
88141
88142
88143
88144
88145
88146
88147
88148
88149
88150
88151
88152
88153
88154
88155
88156
88157
88158
88159
88160
88161
88162
88163
88164
88165
88166
88167
88168
88169
88170
88171
88172
88173
88174
88175
88176
88177
88178
88179
88180
88181
88182
88183
88184
88185
88186
88187
88188
88189
88190
88191
88192
88193
88194
88195
88196
88197
88198
88199
88200
88201
88202
88203
88204
88205
88206
88207
88208
88209
88210
88211
88212
88213
88214
88215
88216
88217
88218
88219
88220
88221
88222
88223
88224
88225
88226
88227
88228
88229
88230
88231
88232
88233
88234
88235
88236
88237
88238
88239
88240
88241
88242
88243
88244
88245
88246
88247
88248
88249
88250
88251
88252
88253
88254
88255
88256
88257
88258
88259
88260
88261
88262
88263
88264
88265
88266
88267
88268
88269
88270
88271
88272
88273
88274
88275
88276
88277
88278
88279
88280
88281
88282
88283
88284
88285
88286
88287
88288
88289
88290
88291
88292
88293
88294
88295
88296
88297
88298
88299
88300
88301
88302
88303
88304
88305
88306
88307
88308
88309
88310
88311
88312
88313
88314
88315
88316
88317
88318
88319
88320
88321
88322
88323
88324
88325
88326
88327
88328
88329
88330
88331
88332
88333
88334
88335
88336
88337
88338
88339
88340
88341
88342
88343
88344
88345
88346
88347
88348
88349
88350
88351
88352
88353
88354
88355
88356
88357
88358
88359
88360
88361
88362
88363
88364
88365
88366
88367
88368
88369
88370
88371
88372
88373
88374
88375
88376
88377
88378
88379
88380
88381
88382
88383
88384
88385
88386
88387
88388
88389
88390
88391
88392
88393
88394
88395
88396
88397
88398
88399
88400
88401
88402
88403
88404
88405
88406
88407
88408
88409
88410
88411
88412
88413
88414
88415
88416
88417
88418
88419
88420
88421
88422
88423
88424
88425
88426
88427
88428
88429
88430
88431
88432
88433
88434
88435
88436
88437
88438
88439
88440
88441
88442
88443
88444
88445
88446
88447
88448
88449
88450
88451
88452
88453
88454
88455
88456
88457
88458
88459
88460
88461
88462
88463
88464
88465
88466
88467
88468
88469
88470
88471
88472
88473
88474
88475
88476
88477
88478
88479
88480
88481
88482
88483
88484
88485
88486
88487
88488
88489
88490
88491
88492
88493
88494
88495
88496
88497
88498
88499
88500
88501
88502
88503
88504
88505
88506
88507
88508
88509
88510
88511
88512
88513
88514
88515
88516
88517
88518
88519
88520
88521
88522
88523
88524
88525
88526
88527
88528
88529
88530
88531
88532
88533
88534
88535
88536
88537
88538
88539
88540
88541
88542
88543
88544
88545
88546
88547
88548
88549
88550
88551
88552
88553
88554
88555
88556
88557
88558
88559
88560
88561
88562
88563
88564
88565
88566
88567
88568
88569
88570
88571
88572
88573
88574
88575
88576
88577
88578
88579
88580
88581
88582
88583
88584
88585
88586
88587
88588
88589
88590
88591
88592
88593
88594
88595
88596
88597
88598
88599
88600
88601
88602
88603
88604
88605
88606
88607
88608
88609
88610
88611
88612
88613
88614
88615
88616
88617
88618
88619
88620
88621
88622
88623
88624
88625
88626
88627
88628
88629
88630
88631
88632
88633
88634
88635
88636
88637
88638
88639
88640
88641
88642
88643
88644
88645
88646
88647
88648
88649
88650
88651
88652
88653
88654
88655
88656
88657
88658
88659
88660
88661
88662
88663
88664
88665
88666
88667
88668
88669
88670
88671
88672
88673
88674
88675
88676
88677
88678
88679
88680
88681
88682
88683
88684
88685
88686
88687
88688
88689
88690
88691
88692
88693
88694
88695
88696
88697
88698
88699
88700
88701
88702
88703
88704
88705
88706
88707
88708
88709
88710
88711
88712
88713
88714
88715
88716
88717
88718
88719
88720
88721
88722
88723
88724
88725
88726
88727
88728
88729
88730
88731
88732
88733
88734
88735
88736
88737
88738
88739
88740
88741
88742
88743
88744
88745
88746
88747
88748
88749
88750
88751
88752
88753
88754
88755
88756
88757
88758
88759
88760
88761
88762
88763
88764
88765
88766
88767
88768
88769
88770
88771
88772
88773
88774
88775
88776
88777
88778
88779
88780
88781
88782
88783
88784
88785
88786
88787
88788
88789
88790
88791
88792
88793
88794
88795
88796
88797
88798
88799
88800
88801
88802
88803
88804
88805
88806
88807
88808
88809
88810
88811
88812
88813
88814
88815
88816
88817
88818
88819
88820
88821
88822
88823
88824
88825
88826
88827
88828
88829
88830
88831
88832
88833
88834
88835
88836
88837
88838
88839
88840
88841
88842
88843
88844
88845
88846
88847
88848
88849
88850
88851
88852
88853
88854
88855
88856
88857
88858
88859
88860
88861
88862
88863
88864
88865
88866
88867
88868
88869
88870
88871
88872
88873
88874
88875
88876
88877
88878
88879
88880
88881
88882
88883
88884
88885
88886
88887
88888
88889
88890
88891
88892
88893
88894
88895
88896
88897
88898
88899
88900
88901
88902
88903
88904
88905
88906
88907
88908
88909
88910
88911
88912
88913
88914
88915
88916
88917
88918
88919
88920
88921
88922
88923
88924
88925
88926
88927
88928
88929
88930
88931
88932
88933
88934
88935
88936
88937
88938
88939
88940
88941
88942
88943
88944
88945
88946
88947
88948
88949
88950
88951
88952
88953
88954
88955
88956
88957
88958
88959
88960
88961
88962
88963
88964
88965
88966
88967
88968
88969
88970
88971
88972
88973
88974
88975
88976
88977
88978
88979
88980
88981
88982
88983
88984
88985
88986
88987
88988
88989
88990
88991
88992
88993
88994
88995
88996
88997
88998
88999
89000
89001
89002
89003
89004
89005
89006
89007
89008
89009
89010
89011
89012
89013
89014
89015
89016
89017
89018
89019
89020
89021
89022
89023
89024
89025
89026
89027
89028
89029
89030
89031
89032
89033
89034
89035
89036
89037
89038
89039
89040
89041
89042
89043
89044
89045
89046
89047
89048
89049
89050
89051
89052
89053
89054
89055
89056
89057
89058
89059
89060
89061
89062
89063
89064
89065
89066
89067
89068
89069
89070
89071
89072
89073
89074
89075
89076
89077
89078
89079
89080
89081
89082
89083
89084
89085
89086
89087
89088
89089
89090
89091
89092
89093
89094
89095
89096
89097
89098
89099
89100
89101
89102
89103
89104
89105
89106
89107
89108
89109
89110
89111
89112
89113
89114
89115
89116
89117
89118
89119
89120
89121
89122
89123
89124
89125
89126
89127
89128
89129
89130
89131
89132
89133
89134
89135
89136
89137
89138
89139
89140
89141
89142
89143
89144
89145
89146
89147
89148
89149
89150
89151
89152
89153
89154
89155
89156
89157
89158
89159
89160
89161
89162
89163
89164
89165
89166
89167
89168
89169
89170
89171
89172
89173
89174
89175
89176
89177
89178
89179
89180
89181
89182
89183
89184
89185
89186
89187
89188
89189
89190
89191
89192
89193
89194
89195
89196
89197
89198
89199
89200
89201
89202
89203
89204
89205
89206
89207
89208
89209
89210
89211
89212
89213
89214
89215
89216
89217
89218
89219
89220
89221
89222
89223
89224
89225
89226
89227
89228
89229
89230
89231
89232
89233
89234
89235
89236
89237
89238
89239
89240
89241
89242
89243
89244
89245
89246
89247
89248
89249
89250
89251
89252
89253
89254
89255
89256
89257
89258
89259
89260
89261
89262
89263
89264
89265
89266
89267
89268
89269
89270
89271
89272
89273
89274
89275
89276
89277
89278
89279
89280
89281
89282
89283
89284
89285
89286
89287
89288
89289
89290
89291
89292
89293
89294
89295
89296
89297
89298
89299
89300
89301
89302
89303
89304
89305
89306
89307
89308
89309
89310
89311
89312
89313
89314
89315
89316
89317
89318
89319
89320
89321
89322
89323
89324
89325
89326
89327
89328
89329
89330
89331
89332
89333
89334
89335
89336
89337
89338
89339
89340
89341
89342
89343
89344
89345
89346
89347
89348
89349
89350
89351
89352
89353
89354
89355
89356
89357
89358
89359
89360
89361
89362
89363
89364
89365
89366
89367
89368
89369
89370
89371
89372
89373
89374
89375
89376
89377
89378
89379
89380
89381
89382
89383
89384
89385
89386
89387
89388
89389
89390
89391
89392
89393
89394
89395
89396
89397
89398
89399
89400
89401
89402
89403
89404
89405
89406
89407
89408
89409
89410
89411
89412
89413
89414
89415
89416
89417
89418
89419
89420
89421
89422
89423
89424
89425
89426
89427
89428
89429
89430
89431
89432
89433
89434
89435
89436
89437
89438
89439
89440
89441
89442
89443
89444
89445
89446
89447
89448
89449
89450
89451
89452
89453
89454
89455
89456
89457
89458
89459
89460
89461
89462
89463
89464
89465
89466
89467
89468
89469
89470
89471
89472
89473
89474
89475
89476
89477
89478
89479
89480
89481
89482
89483
89484
89485
89486
89487
89488
89489
89490
89491
89492
89493
89494
89495
89496
89497
89498
89499
89500
89501
89502
89503
89504
89505
89506
89507
89508
89509
89510
89511
89512
89513
89514
89515
89516
89517
89518
89519
89520
89521
89522
89523
89524
89525
89526
89527
89528
89529
89530
89531
89532
89533
89534
89535
89536
89537
89538
89539
89540
89541
89542
89543
89544
89545
89546
89547
89548
89549
89550
89551
89552
89553
89554
89555
89556
89557
89558
89559
89560
89561
89562
89563
89564
89565
89566
89567
89568
89569
89570
89571
89572
89573
89574
89575
89576
89577
89578
89579
89580
89581
89582
89583
89584
89585
89586
89587
89588
89589
89590
89591
89592
89593
89594
89595
89596
89597
89598
89599
89600
89601
89602
89603
89604
89605
89606
89607
89608
89609
89610
89611
89612
89613
89614
89615
89616
89617
89618
89619
89620
89621
89622
89623
89624
89625
89626
89627
89628
89629
89630
89631
89632
89633
89634
89635
89636
89637
89638
89639
89640
89641
89642
89643
89644
89645
89646
89647
89648
89649
89650
89651
89652
89653
89654
89655
89656
89657
89658
89659
89660
89661
89662
89663
89664
89665
89666
89667
89668
89669
89670
89671
89672
89673
89674
89675
89676
89677
89678
89679
89680
89681
89682
89683
89684
89685
89686
89687
89688
89689
89690
89691
89692
89693
89694
89695
89696
89697
89698
89699
89700
89701
89702
89703
89704
89705
89706
89707
89708
89709
89710
89711
89712
89713
89714
89715
89716
89717
89718
89719
89720
89721
89722
89723
89724
89725
89726
89727
89728
89729
89730
89731
89732
89733
89734
89735
89736
89737
89738
89739
89740
89741
89742
89743
89744
89745
89746
89747
89748
89749
89750
89751
89752
89753
89754
89755
89756
89757
89758
89759
89760
89761
89762
89763
89764
89765
89766
89767
89768
89769
89770
89771
89772
89773
89774
89775
89776
89777
89778
89779
89780
89781
89782
89783
89784
89785
89786
89787
89788
89789
89790
89791
89792
89793
89794
89795
89796
89797
89798
89799
89800
89801
89802
89803
89804
89805
89806
89807
89808
89809
89810
89811
89812
89813
89814
89815
89816
89817
89818
89819
89820
89821
89822
89823
89824
89825
89826
89827
89828
89829
89830
89831
89832
89833
89834
89835
89836
89837
89838
89839
89840
89841
89842
89843
89844
89845
89846
89847
89848
89849
89850
89851
89852
89853
89854
89855
89856
89857
89858
89859
89860
89861
89862
89863
89864
89865
89866
89867
89868
89869
89870
89871
89872
89873
89874
89875
89876
89877
89878
89879
89880
89881
89882
89883
89884
89885
89886
89887
89888
89889
89890
89891
89892
89893
89894
89895
89896
89897
89898
89899
89900
89901
89902
89903
89904
89905
89906
89907
89908
89909
89910
89911
89912
89913
89914
89915
89916
89917
89918
89919
89920
89921
89922
89923
89924
89925
89926
89927
89928
89929
89930
89931
89932
89933
89934
89935
89936
89937
89938
89939
89940
89941
89942
89943
89944
89945
89946
89947
89948
89949
89950
89951
89952
89953
89954
89955
89956
89957
89958
89959
89960
89961
89962
89963
89964
89965
89966
89967
89968
89969
89970
89971
89972
89973
89974
89975
89976
89977
89978
89979
89980
89981
89982
89983
89984
89985
89986
89987
89988
89989
89990
89991
89992
89993
89994
89995
89996
89997
89998
89999
90000
90001
90002
90003
90004
90005
90006
90007
90008
90009
90010
90011
90012
90013
90014
90015
90016
90017
90018
90019
90020
90021
90022
90023
90024
90025
90026
90027
90028
90029
90030
90031
90032
90033
90034
90035
90036
90037
90038
90039
90040
90041
90042
90043
90044
90045
90046
90047
90048
90049
90050
90051
90052
90053
90054
90055
90056
90057
90058
90059
90060
90061
90062
90063
90064
90065
90066
90067
90068
90069
90070
90071
90072
90073
90074
90075
90076
90077
90078
90079
90080
90081
90082
90083
90084
90085
90086
90087
90088
90089
90090
90091
90092
90093
90094
90095
90096
90097
90098
90099
90100
90101
90102
90103
90104
90105
90106
90107
90108
90109
90110
90111
90112
90113
90114
90115
90116
90117
90118
90119
90120
90121
90122
90123
90124
90125
90126
90127
90128
90129
90130
90131
90132
90133
90134
90135
90136
90137
90138
90139
90140
90141
90142
90143
90144
90145
90146
90147
90148
90149
90150
90151
90152
90153
90154
90155
90156
90157
90158
90159
90160
90161
90162
90163
90164
90165
90166
90167
90168
90169
90170
90171
90172
90173
90174
90175
90176
90177
90178
90179
90180
90181
90182
90183
90184
90185
90186
90187
90188
90189
90190
90191
90192
90193
90194
90195
90196
90197
90198
90199
90200
90201
90202
90203
90204
90205
90206
90207
90208
90209
90210
90211
90212
90213
90214
90215
90216
90217
90218
90219
90220
90221
90222
90223
90224
90225
90226
90227
90228
90229
90230
90231
90232
90233
90234
90235
90236
90237
90238
90239
90240
90241
90242
90243
90244
90245
90246
90247
90248
90249
90250
90251
90252
90253
90254
90255
90256
90257
90258
90259
90260
90261
90262
90263
90264
90265
90266
90267
90268
90269
90270
90271
90272
90273
90274
90275
90276
90277
90278
90279
90280
90281
90282
90283
90284
90285
90286
90287
90288
90289
90290
90291
90292
90293
90294
90295
90296
90297
90298
90299
90300
90301
90302
90303
90304
90305
90306
90307
90308
90309
90310
90311
90312
90313
90314
90315
90316
90317
90318
90319
90320
90321
90322
90323
90324
90325
90326
90327
90328
90329
90330
90331
90332
90333
90334
90335
90336
90337
90338
90339
90340
90341
90342
90343
90344
90345
90346
90347
90348
90349
90350
90351
90352
90353
90354
90355
90356
90357
90358
90359
90360
90361
90362
90363
90364
90365
90366
90367
90368
90369
90370
90371
90372
90373
90374
90375
90376
90377
90378
90379
90380
90381
90382
90383
90384
90385
90386
90387
90388
90389
90390
90391
90392
90393
90394
90395
90396
90397
90398
90399
90400
90401
90402
90403
90404
90405
90406
90407
90408
90409
90410
90411
90412
90413
90414
90415
90416
90417
90418
90419
90420
90421
90422
90423
90424
90425
90426
90427
90428
90429
90430
90431
90432
90433
90434
90435
90436
90437
90438
90439
90440
90441
90442
90443
90444
90445
90446
90447
90448
90449
90450
90451
90452
90453
90454
90455
90456
90457
90458
90459
90460
90461
90462
90463
90464
90465
90466
90467
90468
90469
90470
90471
90472
90473
90474
90475
90476
90477
90478
90479
90480
90481
90482
90483
90484
90485
90486
90487
90488
90489
90490
90491
90492
90493
90494
90495
90496
90497
90498
90499
90500
90501
90502
90503
90504
90505
90506
90507
90508
90509
90510
90511
90512
90513
90514
90515
90516
90517
90518
90519
90520
90521
90522
90523
90524
90525
90526
90527
90528
90529
90530
90531
90532
90533
90534
90535
90536
90537
90538
90539
90540
90541
90542
90543
90544
90545
90546
90547
90548
90549
90550
90551
90552
90553
90554
90555
90556
90557
90558
90559
90560
90561
90562
90563
90564
90565
90566
90567
90568
90569
90570
90571
90572
90573
90574
90575
90576
90577
90578
90579
90580
90581
90582
90583
90584
90585
90586
90587
90588
90589
90590
90591
90592
90593
90594
90595
90596
90597
90598
90599
90600
90601
90602
90603
90604
90605
90606
90607
90608
90609
90610
90611
90612
90613
90614
90615
90616
90617
90618
90619
90620
90621
90622
90623
90624
90625
90626
90627
90628
90629
90630
90631
90632
90633
90634
90635
90636
90637
90638
90639
90640
90641
90642
90643
90644
90645
90646
90647
90648
90649
90650
90651
90652
90653
90654
90655
90656
90657
90658
90659
90660
90661
90662
90663
90664
90665
90666
90667
90668
90669
90670
90671
90672
90673
90674
90675
90676
90677
90678
90679
90680
90681
90682
90683
90684
90685
90686
90687
90688
90689
90690
90691
90692
90693
90694
90695
90696
90697
90698
90699
90700
90701
90702
90703
90704
90705
90706
90707
90708
90709
90710
90711
90712
90713
90714
90715
90716
90717
90718
90719
90720
90721
90722
90723
90724
90725
90726
90727
90728
90729
90730
90731
90732
90733
90734
90735
90736
90737
90738
90739
90740
90741
90742
90743
90744
90745
90746
90747
90748
90749
90750
90751
90752
90753
90754
90755
90756
90757
90758
90759
90760
90761
90762
90763
90764
90765
90766
90767
90768
90769
90770
90771
90772
90773
90774
90775
90776
90777
90778
90779
90780
90781
90782
90783
90784
90785
90786
90787
90788
90789
90790
90791
90792
90793
90794
90795
90796
90797
90798
90799
90800
90801
90802
90803
90804
90805
90806
90807
90808
90809
90810
90811
90812
90813
90814
90815
90816
90817
90818
90819
90820
90821
90822
90823
90824
90825
90826
90827
90828
90829
90830
90831
90832
90833
90834
90835
90836
90837
90838
90839
90840
90841
90842
90843
90844
90845
90846
90847
90848
90849
90850
90851
90852
90853
90854
90855
90856
90857
90858
90859
90860
90861
90862
90863
90864
90865
90866
90867
90868
90869
90870
90871
90872
90873
90874
90875
90876
90877
90878
90879
90880
90881
90882
90883
90884
90885
90886
90887
90888
90889
90890
90891
90892
90893
90894
90895
90896
90897
90898
90899
90900
90901
90902
90903
90904
90905
90906
90907
90908
90909
90910
90911
90912
90913
90914
90915
90916
90917
90918
90919
90920
90921
90922
90923
90924
90925
90926
90927
90928
90929
90930
90931
90932
90933
90934
90935
90936
90937
90938
90939
90940
90941
90942
90943
90944
90945
90946
90947
90948
90949
90950
90951
90952
90953
90954
90955
90956
90957
90958
90959
90960
90961
90962
90963
90964
90965
90966
90967
90968
90969
90970
90971
90972
90973
90974
90975
90976
90977
90978
90979
90980
90981
90982
90983
90984
90985
90986
90987
90988
90989
90990
90991
90992
90993
90994
90995
90996
90997
90998
90999
91000
91001
91002
91003
91004
91005
91006
91007
91008
91009
91010
91011
91012
91013
91014
91015
91016
91017
91018
91019
91020
91021
91022
91023
91024
91025
91026
91027
91028
91029
91030
91031
91032
91033
91034
91035
91036
91037
91038
91039
91040
91041
91042
91043
91044
91045
91046
91047
91048
91049
91050
91051
91052
91053
91054
91055
91056
91057
91058
91059
91060
91061
91062
91063
91064
91065
91066
91067
91068
91069
91070
91071
91072
91073
91074
91075
91076
91077
91078
91079
91080
91081
91082
91083
91084
91085
91086
91087
91088
91089
91090
91091
91092
91093
91094
91095
91096
91097
91098
91099
91100
91101
91102
91103
91104
91105
91106
91107
91108
91109
91110
91111
91112
91113
91114
91115
91116
91117
91118
91119
91120
91121
91122
91123
91124
91125
91126
91127
91128
91129
91130
91131
91132
91133
91134
91135
91136
91137
91138
91139
91140
91141
91142
91143
91144
91145
91146
91147
91148
91149
91150
91151
91152
91153
91154
91155
91156
91157
91158
91159
91160
91161
91162
91163
91164
91165
91166
91167
91168
91169
91170
91171
91172
91173
91174
91175
91176
91177
91178
91179
91180
91181
91182
91183
91184
91185
91186
91187
91188
91189
91190
91191
91192
91193
91194
91195
91196
91197
91198
91199
91200
91201
91202
91203
91204
91205
91206
91207
91208
91209
91210
91211
91212
91213
91214
91215
91216
91217
91218
91219
91220
91221
91222
91223
91224
91225
91226
91227
91228
91229
91230
91231
91232
91233
91234
91235
91236
91237
91238
91239
91240
91241
91242
91243
91244
91245
91246
91247
91248
91249
91250
91251
91252
91253
91254
91255
91256
91257
91258
91259
91260
91261
91262
91263
91264
91265
91266
91267
91268
91269
91270
91271
91272
91273
91274
91275
91276
91277
91278
91279
91280
91281
91282
91283
91284
91285
91286
91287
91288
91289
91290
91291
91292
91293
91294
91295
91296
91297
91298
91299
91300
91301
91302
91303
91304
91305
91306
91307
91308
91309
91310
91311
91312
91313
91314
91315
91316
91317
91318
91319
91320
91321
91322
91323
91324
91325
91326
91327
91328
91329
91330
91331
91332
91333
91334
91335
91336
91337
91338
91339
91340
91341
91342
91343
91344
91345
91346
91347
91348
91349
91350
91351
91352
91353
91354
91355
91356
91357
91358
91359
91360
91361
91362
91363
91364
91365
91366
91367
91368
91369
91370
91371
91372
91373
91374
91375
91376
91377
91378
91379
91380
91381
91382
91383
91384
91385
91386
91387
91388
91389
91390
91391
91392
91393
91394
91395
91396
91397
91398
91399
91400
91401
91402
91403
91404
91405
91406
91407
91408
91409
91410
91411
91412
91413
91414
91415
91416
91417
91418
91419
91420
91421
91422
91423
91424
91425
91426
91427
91428
91429
91430
91431
91432
91433
91434
91435
91436
91437
91438
91439
91440
91441
91442
91443
91444
91445
91446
91447
91448
91449
91450
91451
91452
91453
91454
91455
91456
91457
91458
91459
91460
91461
91462
91463
91464
91465
91466
91467
91468
91469
91470
91471
91472
91473
91474
91475
91476
91477
91478
91479
91480
91481
91482
91483
91484
91485
91486
91487
91488
91489
91490
91491
91492
91493
91494
91495
91496
91497
91498
91499
91500
91501
91502
91503
91504
91505
91506
91507
91508
91509
91510
91511
91512
91513
91514
91515
91516
91517
91518
91519
91520
91521
91522
91523
91524
91525
91526
91527
91528
91529
91530
91531
91532
91533
91534
91535
91536
91537
91538
91539
91540
91541
91542
91543
91544
91545
91546
91547
91548
91549
91550
91551
91552
91553
91554
91555
91556
91557
91558
91559
91560
91561
91562
91563
91564
91565
91566
91567
91568
91569
91570
91571
91572
91573
91574
91575
91576
91577
91578
91579
91580
91581
91582
91583
91584
91585
91586
91587
91588
91589
91590
91591
91592
91593
91594
91595
91596
91597
91598
91599
91600
91601
91602
91603
91604
91605
91606
91607
91608
91609
91610
91611
91612
91613
91614
91615
91616
91617
91618
91619
91620
91621
91622
91623
91624
91625
91626
91627
91628
91629
91630
91631
91632
91633
91634
91635
91636
91637
91638
91639
91640
91641
91642
91643
91644
91645
91646
91647
91648
91649
91650
91651
91652
91653
91654
91655
91656
91657
91658
91659
91660
91661
91662
91663
91664
91665
91666
91667
91668
91669
91670
91671
91672
91673
91674
91675
91676
91677
91678
91679
91680
91681
91682
91683
91684
91685
91686
91687
91688
91689
91690
91691
91692
91693
91694
91695
91696
91697
91698
91699
91700
91701
91702
91703
91704
91705
91706
91707
91708
91709
91710
91711
91712
91713
91714
91715
91716
91717
91718
91719
91720
91721
91722
91723
91724
91725
91726
91727
91728
91729
91730
91731
91732
91733
91734
91735
91736
91737
91738
91739
91740
91741
91742
91743
91744
91745
91746
91747
91748
91749
91750
91751
91752
91753
91754
91755
91756
91757
91758
91759
91760
91761
91762
91763
91764
91765
91766
91767
91768
91769
91770
91771
91772
91773
91774
91775
91776
91777
91778
91779
91780
91781
91782
91783
91784
91785
91786
91787
91788
91789
91790
91791
91792
91793
91794
91795
91796
91797
91798
91799
91800
91801
91802
91803
91804
91805
91806
91807
91808
91809
91810
91811
91812
91813
91814
91815
91816
91817
91818
91819
91820
91821
91822
91823
91824
91825
91826
91827
91828
91829
91830
91831
91832
91833
91834
91835
91836
91837
91838
91839
91840
91841
91842
91843
91844
91845
91846
91847
91848
91849
91850
91851
91852
91853
91854
91855
91856
91857
91858
91859
91860
91861
91862
91863
91864
91865
91866
91867
91868
91869
91870
91871
91872
91873
91874
91875
91876
91877
91878
91879
91880
91881
91882
91883
91884
91885
91886
91887
91888
91889
91890
91891
91892
91893
91894
91895
91896
91897
91898
91899
91900
91901
91902
91903
91904
91905
91906
91907
91908
91909
91910
91911
91912
91913
91914
91915
91916
91917
91918
91919
91920
91921
91922
91923
91924
91925
91926
91927
91928
91929
91930
91931
91932
91933
91934
91935
91936
91937
91938
91939
91940
91941
91942
91943
91944
91945
91946
91947
91948
91949
91950
91951
91952
91953
91954
91955
91956
91957
91958
91959
91960
91961
91962
91963
91964
91965
91966
91967
91968
91969
91970
91971
91972
91973
91974
91975
91976
91977
91978
91979
91980
91981
91982
91983
91984
91985
91986
91987
91988
91989
91990
91991
91992
91993
91994
91995
91996
91997
91998
91999
92000
92001
92002
92003
92004
92005
92006
92007
92008
92009
92010
92011
92012
92013
92014
92015
92016
92017
92018
92019
92020
92021
92022
92023
92024
92025
92026
92027
92028
92029
92030
92031
92032
92033
92034
92035
92036
92037
92038
92039
92040
92041
92042
92043
92044
92045
92046
92047
92048
92049
92050
92051
92052
92053
92054
92055
92056
92057
92058
92059
92060
92061
92062
92063
92064
92065
92066
92067
92068
92069
92070
92071
92072
92073
92074
92075
92076
92077
92078
92079
92080
92081
92082
92083
92084
92085
92086
92087
92088
92089
92090
92091
92092
92093
92094
92095
92096
92097
92098
92099
92100
92101
92102
92103
92104
92105
92106
92107
92108
92109
92110
92111
92112
92113
92114
92115
92116
92117
92118
92119
92120
92121
92122
92123
92124
92125
92126
92127
92128
92129
92130
92131
92132
92133
92134
92135
92136
92137
92138
92139
92140
92141
92142
92143
92144
92145
92146
92147
92148
92149
92150
92151
92152
92153
92154
92155
92156
92157
92158
92159
92160
92161
92162
92163
92164
92165
92166
92167
92168
92169
92170
92171
92172
92173
92174
92175
92176
92177
92178
92179
92180
92181
92182
92183
92184
92185
92186
92187
92188
92189
92190
92191
92192
92193
92194
92195
92196
92197
92198
92199
92200
92201
92202
92203
92204
92205
92206
92207
92208
92209
92210
92211
92212
92213
92214
92215
92216
92217
92218
92219
92220
92221
92222
92223
92224
92225
92226
92227
92228
92229
92230
92231
92232
92233
92234
92235
92236
92237
92238
92239
92240
92241
92242
92243
92244
92245
92246
92247
92248
92249
92250
92251
92252
92253
92254
92255
92256
92257
92258
92259
92260
92261
92262
92263
92264
92265
92266
92267
92268
92269
92270
92271
92272
92273
92274
92275
92276
92277
92278
92279
92280
92281
92282
92283
92284
92285
92286
92287
92288
92289
92290
92291
92292
92293
92294
92295
92296
92297
92298
92299
92300
92301
92302
92303
92304
92305
92306
92307
92308
92309
92310
92311
92312
92313
92314
92315
92316
92317
92318
92319
92320
92321
92322
92323
92324
92325
92326
92327
92328
92329
92330
92331
92332
92333
92334
92335
92336
92337
92338
92339
92340
92341
92342
92343
92344
92345
92346
92347
92348
92349
92350
92351
92352
92353
92354
92355
92356
92357
92358
92359
92360
92361
92362
92363
92364
92365
92366
92367
92368
92369
92370
92371
92372
92373
92374
92375
92376
92377
92378
92379
92380
92381
92382
92383
92384
92385
92386
92387
92388
92389
92390
92391
92392
92393
92394
92395
92396
92397
92398
92399
92400
92401
92402
92403
92404
92405
92406
92407
92408
92409
92410
92411
92412
92413
92414
92415
92416
92417
92418
92419
92420
92421
92422
92423
92424
92425
92426
92427
92428
92429
92430
92431
92432
92433
92434
92435
92436
92437
92438
92439
92440
92441
92442
92443
92444
92445
92446
92447
92448
92449
92450
92451
92452
92453
92454
92455
92456
92457
92458
92459
92460
92461
92462
92463
92464
92465
92466
92467
92468
92469
92470
92471
92472
92473
92474
92475
92476
92477
92478
92479
92480
92481
92482
92483
92484
92485
92486
92487
92488
92489
92490
92491
92492
92493
92494
92495
92496
92497
92498
92499
92500
92501
92502
92503
92504
92505
92506
92507
92508
92509
92510
92511
92512
92513
92514
92515
92516
92517
92518
92519
92520
92521
92522
92523
92524
92525
92526
92527
92528
92529
92530
92531
92532
92533
92534
92535
92536
92537
92538
92539
92540
92541
92542
92543
92544
92545
92546
92547
92548
92549
92550
92551
92552
92553
92554
92555
92556
92557
92558
92559
92560
92561
92562
92563
92564
92565
92566
92567
92568
92569
92570
92571
92572
92573
92574
92575
92576
92577
92578
92579
92580
92581
92582
92583
92584
92585
92586
92587
92588
92589
92590
92591
92592
92593
92594
92595
92596
92597
92598
92599
92600
92601
92602
92603
92604
92605
92606
92607
92608
92609
92610
92611
92612
92613
92614
92615
92616
92617
92618
92619
92620
92621
92622
92623
92624
92625
92626
92627
92628
92629
92630
92631
92632
92633
92634
92635
92636
92637
92638
92639
92640
92641
92642
92643
92644
92645
92646
92647
92648
92649
92650
92651
92652
92653
92654
92655
92656
92657
92658
92659
92660
92661
92662
92663
92664
92665
92666
92667
92668
92669
92670
92671
92672
92673
92674
92675
92676
92677
92678
92679
92680
92681
92682
92683
92684
92685
92686
92687
92688
92689
92690
92691
92692
92693
92694
92695
92696
92697
92698
92699
92700
92701
92702
92703
92704
92705
92706
92707
92708
92709
92710
92711
92712
92713
92714
92715
92716
92717
92718
92719
92720
92721
92722
92723
92724
92725
92726
92727
92728
92729
92730
92731
92732
92733
92734
92735
92736
92737
92738
92739
92740
92741
92742
92743
92744
92745
92746
92747
92748
92749
92750
92751
92752
92753
92754
92755
92756
92757
92758
92759
92760
92761
92762
92763
92764
92765
92766
92767
92768
92769
92770
92771
92772
92773
92774
92775
92776
92777
92778
92779
92780
92781
92782
92783
92784
92785
92786
92787
92788
92789
92790
92791
92792
92793
92794
92795
92796
92797
92798
92799
92800
92801
92802
92803
92804
92805
92806
92807
92808
92809
92810
92811
92812
92813
92814
92815
92816
92817
92818
92819
92820
92821
92822
92823
92824
92825
92826
92827
92828
92829
92830
92831
92832
92833
92834
92835
92836
92837
92838
92839
92840
92841
92842
92843
92844
92845
92846
92847
92848
92849
92850
92851
92852
92853
92854
92855
92856
92857
92858
92859
92860
92861
92862
92863
92864
92865
92866
92867
92868
92869
92870
92871
92872
92873
92874
92875
92876
92877
92878
92879
92880
92881
92882
92883
92884
92885
92886
92887
92888
92889
92890
92891
92892
92893
92894
92895
92896
92897
92898
92899
92900
92901
92902
92903
92904
92905
92906
92907
92908
92909
92910
92911
92912
92913
92914
92915
92916
92917
92918
92919
92920
92921
92922
92923
92924
92925
92926
92927
92928
92929
92930
92931
92932
92933
92934
92935
92936
92937
92938
92939
92940
92941
92942
92943
92944
92945
92946
92947
92948
92949
92950
92951
92952
92953
92954
92955
92956
92957
92958
92959
92960
92961
92962
92963
92964
92965
92966
92967
92968
92969
92970
92971
92972
92973
92974
92975
92976
92977
92978
92979
92980
92981
92982
92983
92984
92985
92986
92987
92988
92989
92990
92991
92992
92993
92994
92995
92996
92997
92998
92999
93000
93001
93002
93003
93004
93005
93006
93007
93008
93009
93010
93011
93012
93013
93014
93015
93016
93017
93018
93019
93020
93021
93022
93023
93024
93025
93026
93027
93028
93029
93030
93031
93032
93033
93034
93035
93036
93037
93038
93039
93040
93041
93042
93043
93044
93045
93046
93047
93048
93049
93050
93051
93052
93053
93054
93055
93056
93057
93058
93059
93060
93061
93062
93063
93064
93065
93066
93067
93068
93069
93070
93071
93072
93073
93074
93075
93076
93077
93078
93079
93080
93081
93082
93083
93084
93085
93086
93087
93088
93089
93090
93091
93092
93093
93094
93095
93096
93097
93098
93099
93100
93101
93102
93103
93104
93105
93106
93107
93108
93109
93110
93111
93112
93113
93114
93115
93116
93117
93118
93119
93120
93121
93122
93123
93124
93125
93126
93127
93128
93129
93130
93131
93132
93133
93134
93135
93136
93137
93138
93139
93140
93141
93142
93143
93144
93145
93146
93147
93148
93149
93150
93151
93152
93153
93154
93155
93156
93157
93158
93159
93160
93161
93162
93163
93164
93165
93166
93167
93168
93169
93170
93171
93172
93173
93174
93175
93176
93177
93178
93179
93180
93181
93182
93183
93184
93185
93186
93187
93188
93189
93190
93191
93192
93193
93194
93195
93196
93197
93198
93199
93200
93201
93202
93203
93204
93205
93206
93207
93208
93209
93210
93211
93212
93213
93214
93215
93216
93217
93218
93219
93220
93221
93222
93223
93224
93225
93226
93227
93228
93229
93230
93231
93232
93233
93234
93235
93236
93237
93238
93239
93240
93241
93242
93243
93244
93245
93246
93247
93248
93249
93250
93251
93252
93253
93254
93255
93256
93257
93258
93259
93260
93261
93262
93263
93264
93265
93266
93267
93268
93269
93270
93271
93272
93273
93274
93275
93276
93277
93278
93279
93280
93281
93282
93283
93284
93285
93286
93287
93288
93289
93290
93291
93292
93293
93294
93295
93296
93297
93298
93299
93300
93301
93302
93303
93304
93305
93306
93307
93308
93309
93310
93311
93312
93313
93314
93315
93316
93317
93318
93319
93320
93321
93322
93323
93324
93325
93326
93327
93328
93329
93330
93331
93332
93333
93334
93335
93336
93337
93338
93339
93340
93341
93342
93343
93344
93345
93346
93347
93348
93349
93350
93351
93352
93353
93354
93355
93356
93357
93358
93359
93360
93361
93362
93363
93364
93365
93366
93367
93368
93369
93370
93371
93372
93373
93374
93375
93376
93377
93378
93379
93380
93381
93382
93383
93384
93385
93386
93387
93388
93389
93390
93391
93392
93393
93394
93395
93396
93397
93398
93399
93400
93401
93402
93403
93404
93405
93406
93407
93408
93409
93410
93411
93412
93413
93414
93415
93416
93417
93418
93419
93420
93421
93422
93423
93424
93425
93426
93427
93428
93429
93430
93431
93432
93433
93434
93435
93436
93437
93438
93439
93440
93441
93442
93443
93444
93445
93446
93447
93448
93449
93450
93451
93452
93453
93454
93455
93456
93457
93458
93459
93460
93461
93462
93463
93464
93465
93466
93467
93468
93469
93470
93471
93472
93473
93474
93475
93476
93477
93478
93479
93480
93481
93482
93483
93484
93485
93486
93487
93488
93489
93490
93491
93492
93493
93494
93495
93496
93497
93498
93499
93500
93501
93502
93503
93504
93505
93506
93507
93508
93509
93510
93511
93512
93513
93514
93515
93516
93517
93518
93519
93520
93521
93522
93523
93524
93525
93526
93527
93528
93529
93530
93531
93532
93533
93534
93535
93536
93537
93538
93539
93540
93541
93542
93543
93544
93545
93546
93547
93548
93549
93550
93551
93552
93553
93554
93555
93556
93557
93558
93559
93560
93561
93562
93563
93564
93565
93566
93567
93568
93569
93570
93571
93572
93573
93574
93575
93576
93577
93578
93579
93580
93581
93582
93583
93584
93585
93586
93587
93588
93589
93590
93591
93592
93593
93594
93595
93596
93597
93598
93599
93600
93601
93602
93603
93604
93605
93606
93607
93608
93609
93610
93611
93612
93613
93614
93615
93616
93617
93618
93619
93620
93621
93622
93623
93624
93625
93626
93627
93628
93629
93630
93631
93632
93633
93634
93635
93636
93637
93638
93639
93640
93641
93642
93643
93644
93645
93646
93647
93648
93649
93650
93651
93652
93653
93654
93655
93656
93657
93658
93659
93660
93661
93662
93663
93664
93665
93666
93667
93668
93669
93670
93671
93672
93673
93674
93675
93676
93677
93678
93679
93680
93681
93682
93683
93684
93685
93686
93687
93688
93689
93690
93691
93692
93693
93694
93695
93696
93697
93698
93699
93700
93701
93702
93703
93704
93705
93706
93707
93708
93709
93710
93711
93712
93713
93714
93715
93716
93717
93718
93719
93720
93721
93722
93723
93724
93725
93726
93727
93728
93729
93730
93731
93732
93733
93734
93735
93736
93737
93738
93739
93740
93741
93742
93743
93744
93745
93746
93747
93748
93749
93750
93751
93752
93753
93754
93755
93756
93757
93758
93759
93760
93761
93762
93763
93764
93765
93766
93767
93768
93769
93770
93771
93772
93773
93774
93775
93776
93777
93778
93779
93780
93781
93782
93783
93784
93785
93786
93787
93788
93789
93790
93791
93792
93793
93794
93795
93796
93797
93798
93799
93800
93801
93802
93803
93804
93805
93806
93807
93808
93809
93810
93811
93812
93813
93814
93815
93816
93817
93818
93819
93820
93821
93822
93823
93824
93825
93826
93827
93828
93829
93830
93831
93832
93833
93834
93835
93836
93837
93838
93839
93840
93841
93842
93843
93844
93845
93846
93847
93848
93849
93850
93851
93852
93853
93854
93855
93856
93857
93858
93859
93860
93861
93862
93863
93864
93865
93866
93867
93868
93869
93870
93871
93872
93873
93874
93875
93876
93877
93878
93879
93880
93881
93882
93883
93884
93885
93886
93887
93888
93889
93890
93891
93892
93893
93894
93895
93896
93897
93898
93899
93900
93901
93902
93903
93904
93905
93906
93907
93908
93909
93910
93911
93912
93913
93914
93915
93916
93917
93918
93919
93920
93921
93922
93923
93924
93925
93926
93927
93928
93929
93930
93931
93932
93933
93934
93935
93936
93937
93938
93939
93940
93941
93942
93943
93944
93945
93946
93947
93948
93949
93950
93951
93952
93953
93954
93955
93956
93957
93958
93959
93960
93961
93962
93963
93964
93965
93966
93967
93968
93969
93970
93971
93972
93973
93974
93975
93976
93977
93978
93979
93980
93981
93982
93983
93984
93985
93986
93987
93988
93989
93990
93991
93992
93993
93994
93995
93996
93997
93998
93999
94000
94001
94002
94003
94004
94005
94006
94007
94008
94009
94010
94011
94012
94013
94014
94015
94016
94017
94018
94019
94020
94021
94022
94023
94024
94025
94026
94027
94028
94029
94030
94031
94032
94033
94034
94035
94036
94037
94038
94039
94040
94041
94042
94043
94044
94045
94046
94047
94048
94049
94050
94051
94052
94053
94054
94055
94056
94057
94058
94059
94060
94061
94062
94063
94064
94065
94066
94067
94068
94069
94070
94071
94072
94073
94074
94075
94076
94077
94078
94079
94080
94081
94082
94083
94084
94085
94086
94087
94088
94089
94090
94091
94092
94093
94094
94095
94096
94097
94098
94099
94100
94101
94102
94103
94104
94105
94106
94107
94108
94109
94110
94111
94112
94113
94114
94115
94116
94117
94118
94119
94120
94121
94122
94123
94124
94125
94126
94127
94128
94129
94130
94131
94132
94133
94134
94135
94136
94137
94138
94139
94140
94141
94142
94143
94144
94145
94146
94147
94148
94149
94150
94151
94152
94153
94154
94155
94156
94157
94158
94159
94160
94161
94162
94163
94164
94165
94166
94167
94168
94169
94170
94171
94172
94173
94174
94175
94176
94177
94178
94179
94180
94181
94182
94183
94184
94185
94186
94187
94188
94189
94190
94191
94192
94193
94194
94195
94196
94197
94198
94199
94200
94201
94202
94203
94204
94205
94206
94207
94208
94209
94210
94211
94212
94213
94214
94215
94216
94217
94218
94219
94220
94221
94222
94223
94224
94225
94226
94227
94228
94229
94230
94231
94232
94233
94234
94235
94236
94237
94238
94239
94240
94241
94242
94243
94244
94245
94246
94247
94248
94249
94250
94251
94252
94253
94254
94255
94256
94257
94258
94259
94260
94261
94262
94263
94264
94265
94266
94267
94268
94269
94270
94271
94272
94273
94274
94275
94276
94277
94278
94279
94280
94281
94282
94283
94284
94285
94286
94287
94288
94289
94290
94291
94292
94293
94294
94295
94296
94297
94298
94299
94300
94301
94302
94303
94304
94305
94306
94307
94308
94309
94310
94311
94312
94313
94314
94315
94316
94317
94318
94319
94320
94321
94322
94323
94324
94325
94326
94327
94328
94329
94330
94331
94332
94333
94334
94335
94336
94337
94338
94339
94340
94341
94342
94343
94344
94345
94346
94347
94348
94349
94350
94351
94352
94353
94354
94355
94356
94357
94358
94359
94360
94361
94362
94363
94364
94365
94366
94367
94368
94369
94370
94371
94372
94373
94374
94375
94376
94377
94378
94379
94380
94381
94382
94383
94384
94385
94386
94387
94388
94389
94390
94391
94392
94393
94394
94395
94396
94397
94398
94399
94400
94401
94402
94403
94404
94405
94406
94407
94408
94409
94410
94411
94412
94413
94414
94415
94416
94417
94418
94419
94420
94421
94422
94423
94424
94425
94426
94427
94428
94429
94430
94431
94432
94433
94434
94435
94436
94437
94438
94439
94440
94441
94442
94443
94444
94445
94446
94447
94448
94449
94450
94451
94452
94453
94454
94455
94456
94457
94458
94459
94460
94461
94462
94463
94464
94465
94466
94467
94468
94469
94470
94471
94472
94473
94474
94475
94476
94477
94478
94479
94480
94481
94482
94483
94484
94485
94486
94487
94488
94489
94490
94491
94492
94493
94494
94495
94496
94497
94498
94499
94500
94501
94502
94503
94504
94505
94506
94507
94508
94509
94510
94511
94512
94513
94514
94515
94516
94517
94518
94519
94520
94521
94522
94523
94524
94525
94526
94527
94528
94529
94530
94531
94532
94533
94534
94535
94536
94537
94538
94539
94540
94541
94542
94543
94544
94545
94546
94547
94548
94549
94550
94551
94552
94553
94554
94555
94556
94557
94558
94559
94560
94561
94562
94563
94564
94565
94566
94567
94568
94569
94570
94571
94572
94573
94574
94575
94576
94577
94578
94579
94580
94581
94582
94583
94584
94585
94586
94587
94588
94589
94590
94591
94592
94593
94594
94595
94596
94597
94598
94599
94600
94601
94602
94603
94604
94605
94606
94607
94608
94609
94610
94611
94612
94613
94614
94615
94616
94617
94618
94619
94620
94621
94622
94623
94624
94625
94626
94627
94628
94629
94630
94631
94632
94633
94634
94635
94636
94637
94638
94639
94640
94641
94642
94643
94644
94645
94646
94647
94648
94649
94650
94651
94652
94653
94654
94655
94656
94657
94658
94659
94660
94661
94662
94663
94664
94665
94666
94667
94668
94669
94670
94671
94672
94673
94674
94675
94676
94677
94678
94679
94680
94681
94682
94683
94684
94685
94686
94687
94688
94689
94690
94691
94692
94693
94694
94695
94696
94697
94698
94699
94700
94701
94702
94703
94704
94705
94706
94707
94708
94709
94710
94711
94712
94713
94714
94715
94716
94717
94718
94719
94720
94721
94722
94723
94724
94725
94726
94727
94728
94729
94730
94731
94732
94733
94734
94735
94736
94737
94738
94739
94740
94741
94742
94743
94744
94745
94746
94747
94748
94749
94750
94751
94752
94753
94754
94755
94756
94757
94758
94759
94760
94761
94762
94763
94764
94765
94766
94767
94768
94769
94770
94771
94772
94773
94774
94775
94776
94777
94778
94779
94780
94781
94782
94783
94784
94785
94786
94787
94788
94789
94790
94791
94792
94793
94794
94795
94796
94797
94798
94799
94800
94801
94802
94803
94804
94805
94806
94807
94808
94809
94810
94811
94812
94813
94814
94815
94816
94817
94818
94819
94820
94821
94822
94823
94824
94825
94826
94827
94828
94829
94830
94831
94832
94833
94834
94835
94836
94837
94838
94839
94840
94841
94842
94843
94844
94845
94846
94847
94848
94849
94850
94851
94852
94853
94854
94855
94856
94857
94858
94859
94860
94861
94862
94863
94864
94865
94866
94867
94868
94869
94870
94871
94872
94873
94874
94875
94876
94877
94878
94879
94880
94881
94882
94883
94884
94885
94886
94887
94888
94889
94890
94891
94892
94893
94894
94895
94896
94897
94898
94899
94900
94901
94902
94903
94904
94905
94906
94907
94908
94909
94910
94911
94912
94913
94914
94915
94916
94917
94918
94919
94920
94921
94922
94923
94924
94925
94926
94927
94928
94929
94930
94931
94932
94933
94934
94935
94936
94937
94938
94939
94940
94941
94942
94943
94944
94945
94946
94947
94948
94949
94950
94951
94952
94953
94954
94955
94956
94957
94958
94959
94960
94961
94962
94963
94964
94965
94966
94967
94968
94969
94970
94971
94972
94973
94974
94975
94976
94977
94978
94979
94980
94981
94982
94983
94984
94985
94986
94987
94988
94989
94990
94991
94992
94993
94994
94995
94996
94997
94998
94999
95000
95001
95002
95003
95004
95005
95006
95007
95008
95009
95010
95011
95012
95013
95014
95015
95016
95017
95018
95019
95020
95021
95022
95023
95024
95025
95026
95027
95028
95029
95030
95031
95032
95033
95034
95035
95036
95037
95038
95039
95040
95041
95042
95043
95044
95045
95046
95047
95048
95049
95050
95051
95052
95053
95054
95055
95056
95057
95058
95059
95060
95061
95062
95063
95064
95065
95066
95067
95068
95069
95070
95071
95072
95073
95074
95075
95076
95077
95078
95079
95080
95081
95082
95083
95084
95085
95086
95087
95088
95089
95090
95091
95092
95093
95094
95095
95096
95097
95098
95099
95100
95101
95102
95103
95104
95105
95106
95107
95108
95109
95110
95111
95112
95113
95114
95115
95116
95117
95118
95119
95120
95121
95122
95123
95124
95125
95126
95127
95128
95129
95130
95131
95132
95133
95134
95135
95136
95137
95138
95139
95140
95141
95142
95143
95144
95145
95146
95147
95148
95149
95150
95151
95152
95153
95154
95155
95156
95157
95158
95159
95160
95161
95162
95163
95164
95165
95166
95167
95168
95169
95170
95171
95172
95173
95174
95175
95176
95177
95178
95179
95180
95181
95182
95183
95184
95185
95186
95187
95188
95189
95190
95191
95192
95193
95194
95195
95196
95197
95198
95199
95200
95201
95202
95203
95204
95205
95206
95207
95208
95209
95210
95211
95212
95213
95214
95215
95216
95217
95218
95219
95220
95221
95222
95223
95224
95225
95226
95227
95228
95229
95230
95231
95232
95233
95234
95235
95236
95237
95238
95239
95240
95241
95242
95243
95244
95245
95246
95247
95248
95249
95250
95251
95252
95253
95254
95255
95256
95257
95258
95259
95260
95261
95262
95263
95264
95265
95266
95267
95268
95269
95270
95271
95272
95273
95274
95275
95276
95277
95278
95279
95280
95281
95282
95283
95284
95285
95286
95287
95288
95289
95290
95291
95292
95293
95294
95295
95296
95297
95298
95299
95300
95301
95302
95303
95304
95305
95306
95307
95308
95309
95310
95311
95312
95313
95314
95315
95316
95317
95318
95319
95320
95321
95322
95323
95324
95325
95326
95327
95328
95329
95330
95331
95332
95333
95334
95335
95336
95337
95338
95339
95340
95341
95342
95343
95344
95345
95346
95347
95348
95349
95350
95351
95352
95353
95354
95355
95356
95357
95358
95359
95360
95361
95362
95363
95364
95365
95366
95367
95368
95369
95370
95371
95372
95373
95374
95375
95376
95377
95378
95379
95380
95381
95382
95383
95384
95385
95386
95387
95388
95389
95390
95391
95392
95393
95394
95395
95396
95397
95398
95399
95400
95401
95402
95403
95404
95405
95406
95407
95408
95409
95410
95411
95412
95413
95414
95415
95416
95417
95418
95419
95420
95421
95422
95423
95424
95425
95426
95427
95428
95429
95430
95431
95432
95433
95434
95435
95436
95437
95438
95439
95440
95441
95442
95443
95444
95445
95446
95447
95448
95449
95450
95451
95452
95453
95454
95455
95456
95457
95458
95459
95460
95461
95462
95463
95464
95465
95466
95467
95468
95469
95470
95471
95472
95473
95474
95475
95476
95477
95478
95479
95480
95481
95482
95483
95484
95485
95486
95487
95488
95489
95490
95491
95492
95493
95494
95495
95496
95497
95498
95499
95500
95501
95502
95503
95504
95505
95506
95507
95508
95509
95510
95511
95512
95513
95514
95515
95516
95517
95518
95519
95520
95521
95522
95523
95524
95525
95526
95527
95528
95529
95530
95531
95532
95533
95534
95535
95536
95537
95538
95539
95540
95541
95542
95543
95544
95545
95546
95547
95548
95549
95550
95551
95552
95553
95554
95555
95556
95557
95558
95559
95560
95561
95562
95563
95564
95565
95566
95567
95568
95569
95570
95571
95572
95573
95574
95575
95576
95577
95578
95579
95580
95581
95582
95583
95584
95585
95586
95587
95588
95589
95590
95591
95592
95593
95594
95595
95596
95597
95598
95599
95600
95601
95602
95603
95604
95605
95606
95607
95608
95609
95610
95611
95612
95613
95614
95615
95616
95617
95618
95619
95620
95621
95622
95623
95624
95625
95626
95627
95628
95629
95630
95631
95632
95633
95634
95635
95636
95637
95638
95639
95640
95641
95642
95643
95644
95645
95646
95647
95648
95649
95650
95651
95652
95653
95654
95655
95656
95657
95658
95659
95660
95661
95662
95663
95664
95665
95666
95667
95668
95669
95670
95671
95672
95673
95674
95675
95676
95677
95678
95679
95680
95681
95682
95683
95684
95685
95686
95687
95688
95689
95690
95691
95692
95693
95694
95695
95696
95697
95698
95699
95700
95701
95702
95703
95704
95705
95706
95707
95708
95709
95710
95711
95712
95713
95714
95715
95716
95717
95718
95719
95720
95721
95722
95723
95724
95725
95726
95727
95728
95729
95730
95731
95732
95733
95734
95735
95736
95737
95738
95739
95740
95741
95742
95743
95744
95745
95746
95747
95748
95749
95750
95751
95752
95753
95754
95755
95756
95757
95758
95759
95760
95761
95762
95763
95764
95765
95766
95767
95768
95769
95770
95771
95772
95773
95774
95775
95776
95777
95778
95779
95780
95781
95782
95783
95784
95785
95786
95787
95788
95789
95790
95791
95792
95793
95794
95795
95796
95797
95798
95799
95800
95801
95802
95803
95804
95805
95806
95807
95808
95809
95810
95811
95812
95813
95814
95815
95816
95817
95818
95819
95820
95821
95822
95823
95824
95825
95826
95827
95828
95829
95830
95831
95832
95833
95834
95835
95836
95837
95838
95839
95840
95841
95842
95843
95844
95845
95846
95847
95848
95849
95850
95851
95852
95853
95854
95855
95856
95857
95858
95859
95860
95861
95862
95863
95864
95865
95866
95867
95868
95869
95870
95871
95872
95873
95874
95875
95876
95877
95878
95879
95880
95881
95882
95883
95884
95885
95886
95887
95888
95889
95890
95891
95892
95893
95894
95895
95896
95897
95898
95899
95900
95901
95902
95903
95904
95905
95906
95907
95908
95909
95910
95911
95912
95913
95914
95915
95916
95917
95918
95919
95920
95921
95922
95923
95924
95925
95926
95927
95928
95929
95930
95931
95932
95933
95934
95935
95936
95937
95938
95939
95940
95941
95942
95943
95944
95945
95946
95947
95948
95949
95950
95951
95952
95953
95954
95955
95956
95957
95958
95959
95960
95961
95962
95963
95964
95965
95966
95967
95968
95969
95970
95971
95972
95973
95974
95975
95976
95977
95978
95979
95980
95981
95982
95983
95984
95985
95986
95987
95988
95989
95990
95991
95992
95993
95994
95995
95996
95997
95998
95999
96000
96001
96002
96003
96004
96005
96006
96007
96008
96009
96010
96011
96012
96013
96014
96015
96016
96017
96018
96019
96020
96021
96022
96023
96024
96025
96026
96027
96028
96029
96030
96031
96032
96033
96034
96035
96036
96037
96038
96039
96040
96041
96042
96043
96044
96045
96046
96047
96048
96049
96050
96051
96052
96053
96054
96055
96056
96057
96058
96059
96060
96061
96062
96063
96064
96065
96066
96067
96068
96069
96070
96071
96072
96073
96074
96075
96076
96077
96078
96079
96080
96081
96082
96083
96084
96085
96086
96087
96088
96089
96090
96091
96092
96093
96094
96095
96096
96097
96098
96099
96100
96101
96102
96103
96104
96105
96106
96107
96108
96109
96110
96111
96112
96113
96114
96115
96116
96117
96118
96119
96120
96121
96122
96123
96124
96125
96126
96127
96128
96129
96130
96131
96132
96133
96134
96135
96136
96137
96138
96139
96140
96141
96142
96143
96144
96145
96146
96147
96148
96149
96150
96151
96152
96153
96154
96155
96156
96157
96158
96159
96160
96161
96162
96163
96164
96165
96166
96167
96168
96169
96170
96171
96172
96173
96174
96175
96176
96177
96178
96179
96180
96181
96182
96183
96184
96185
96186
96187
96188
96189
96190
96191
96192
96193
96194
96195
96196
96197
96198
96199
96200
96201
96202
96203
96204
96205
96206
96207
96208
96209
96210
96211
96212
96213
96214
96215
96216
96217
96218
96219
96220
96221
96222
96223
96224
96225
96226
96227
96228
96229
96230
96231
96232
96233
96234
96235
96236
96237
96238
96239
96240
96241
96242
96243
96244
96245
96246
96247
96248
96249
96250
96251
96252
96253
96254
96255
96256
96257
96258
96259
96260
96261
96262
96263
96264
96265
96266
96267
96268
96269
96270
96271
96272
96273
96274
96275
96276
96277
96278
96279
96280
96281
96282
96283
96284
96285
96286
96287
96288
96289
96290
96291
96292
96293
96294
96295
96296
96297
96298
96299
96300
96301
96302
96303
96304
96305
96306
96307
96308
96309
96310
96311
96312
96313
96314
96315
96316
96317
96318
96319
96320
96321
96322
96323
96324
96325
96326
96327
96328
96329
96330
96331
96332
96333
96334
96335
96336
96337
96338
96339
96340
96341
96342
96343
96344
96345
96346
96347
96348
96349
96350
96351
96352
96353
96354
96355
96356
96357
96358
96359
96360
96361
96362
96363
96364
96365
96366
96367
96368
96369
96370
96371
96372
96373
96374
96375
96376
96377
96378
96379
96380
96381
96382
96383
96384
96385
96386
96387
96388
96389
96390
96391
96392
96393
96394
96395
96396
96397
96398
96399
96400
96401
96402
96403
96404
96405
96406
96407
96408
96409
96410
96411
96412
96413
96414
96415
96416
96417
96418
96419
96420
96421
96422
96423
96424
96425
96426
96427
96428
96429
96430
96431
96432
96433
96434
96435
96436
96437
96438
96439
96440
96441
96442
96443
96444
96445
96446
96447
96448
96449
96450
96451
96452
96453
96454
96455
96456
96457
96458
96459
96460
96461
96462
96463
96464
96465
96466
96467
96468
96469
96470
96471
96472
96473
96474
96475
96476
96477
96478
96479
96480
96481
96482
96483
96484
96485
96486
96487
96488
96489
96490
96491
96492
96493
96494
96495
96496
96497
96498
96499
96500
96501
96502
96503
96504
96505
96506
96507
96508
96509
96510
96511
96512
96513
96514
96515
96516
96517
96518
96519
96520
96521
96522
96523
96524
96525
96526
96527
96528
96529
96530
96531
96532
96533
96534
96535
96536
96537
96538
96539
96540
96541
96542
96543
96544
96545
96546
96547
96548
96549
96550
96551
96552
96553
96554
96555
96556
96557
96558
96559
96560
96561
96562
96563
96564
96565
96566
96567
96568
96569
96570
96571
96572
96573
96574
96575
96576
96577
96578
96579
96580
96581
96582
96583
96584
96585
96586
96587
96588
96589
96590
96591
96592
96593
96594
96595
96596
96597
96598
96599
96600
96601
96602
96603
96604
96605
96606
96607
96608
96609
96610
96611
96612
96613
96614
96615
96616
96617
96618
96619
96620
96621
96622
96623
96624
96625
96626
96627
96628
96629
96630
96631
96632
96633
96634
96635
96636
96637
96638
96639
96640
96641
96642
96643
96644
96645
96646
96647
96648
96649
96650
96651
96652
96653
96654
96655
96656
96657
96658
96659
96660
96661
96662
96663
96664
96665
96666
96667
96668
96669
96670
96671
96672
96673
96674
96675
96676
96677
96678
96679
96680
96681
96682
96683
96684
96685
96686
96687
96688
96689
96690
96691
96692
96693
96694
96695
96696
96697
96698
96699
96700
96701
96702
96703
96704
96705
96706
96707
96708
96709
96710
96711
96712
96713
96714
96715
96716
96717
96718
96719
96720
96721
96722
96723
96724
96725
96726
96727
96728
96729
96730
96731
96732
96733
96734
96735
96736
96737
96738
96739
96740
96741
96742
96743
96744
96745
96746
96747
96748
96749
96750
96751
96752
96753
96754
96755
96756
96757
96758
96759
96760
96761
96762
96763
96764
96765
96766
96767
96768
96769
96770
96771
96772
96773
96774
96775
96776
96777
96778
96779
96780
96781
96782
96783
96784
96785
96786
96787
96788
96789
96790
96791
96792
96793
96794
96795
96796
96797
96798
96799
96800
96801
96802
96803
96804
96805
96806
96807
96808
96809
96810
96811
96812
96813
96814
96815
96816
96817
96818
96819
96820
96821
96822
96823
96824
96825
96826
96827
96828
96829
96830
96831
96832
96833
96834
96835
96836
96837
96838
96839
96840
96841
96842
96843
96844
96845
96846
96847
96848
96849
96850
96851
96852
96853
96854
96855
96856
96857
96858
96859
96860
96861
96862
96863
96864
96865
96866
96867
96868
96869
96870
96871
96872
96873
96874
96875
96876
96877
96878
96879
96880
96881
96882
96883
96884
96885
96886
96887
96888
96889
96890
96891
96892
96893
96894
96895
96896
96897
96898
96899
96900
96901
96902
96903
96904
96905
96906
96907
96908
96909
96910
96911
96912
96913
96914
96915
96916
96917
96918
96919
96920
96921
96922
96923
96924
96925
96926
96927
96928
96929
96930
96931
96932
96933
96934
96935
96936
96937
96938
96939
96940
96941
96942
96943
96944
96945
96946
96947
96948
96949
96950
96951
96952
96953
96954
96955
96956
96957
96958
96959
96960
96961
96962
96963
96964
96965
96966
96967
96968
96969
96970
96971
96972
96973
96974
96975
96976
96977
96978
96979
96980
96981
96982
96983
96984
96985
96986
96987
96988
96989
96990
96991
96992
96993
96994
96995
96996
96997
96998
96999
97000
97001
97002
97003
97004
97005
97006
97007
97008
97009
97010
97011
97012
97013
97014
97015
97016
97017
97018
97019
97020
97021
97022
97023
97024
97025
97026
97027
97028
97029
97030
97031
97032
97033
97034
97035
97036
97037
97038
97039
97040
97041
97042
97043
97044
97045
97046
97047
97048
97049
97050
97051
97052
97053
97054
97055
97056
97057
97058
97059
97060
97061
97062
97063
97064
97065
97066
97067
97068
97069
97070
97071
97072
97073
97074
97075
97076
97077
97078
97079
97080
97081
97082
97083
97084
97085
97086
97087
97088
97089
97090
97091
97092
97093
97094
97095
97096
97097
97098
97099
97100
97101
97102
97103
97104
97105
97106
97107
97108
97109
97110
97111
97112
97113
97114
97115
97116
97117
97118
97119
97120
97121
97122
97123
97124
97125
97126
97127
97128
97129
97130
97131
97132
97133
97134
97135
97136
97137
97138
97139
97140
97141
97142
97143
97144
97145
97146
97147
97148
97149
97150
97151
97152
97153
97154
97155
97156
97157
97158
97159
97160
97161
97162
97163
97164
97165
97166
97167
97168
97169
97170
97171
97172
97173
97174
97175
97176
97177
97178
97179
97180
97181
97182
97183
97184
97185
97186
97187
97188
97189
97190
97191
97192
97193
97194
97195
97196
97197
97198
97199
97200
97201
97202
97203
97204
97205
97206
97207
97208
97209
97210
97211
97212
97213
97214
97215
97216
97217
97218
97219
97220
97221
97222
97223
97224
97225
97226
97227
97228
97229
97230
97231
97232
97233
97234
97235
97236
97237
97238
97239
97240
97241
97242
97243
97244
97245
97246
97247
97248
97249
97250
97251
97252
97253
97254
97255
97256
97257
97258
97259
97260
97261
97262
97263
97264
97265
97266
97267
97268
97269
97270
97271
97272
97273
97274
97275
97276
97277
97278
97279
97280
97281
97282
97283
97284
97285
97286
97287
97288
97289
97290
97291
97292
97293
97294
97295
97296
97297
97298
97299
97300
97301
97302
97303
97304
97305
97306
97307
97308
97309
97310
97311
97312
97313
97314
97315
97316
97317
97318
97319
97320
97321
97322
97323
97324
97325
97326
97327
97328
97329
97330
97331
97332
97333
97334
97335
97336
97337
97338
97339
97340
97341
97342
97343
97344
97345
97346
97347
97348
97349
97350
97351
97352
97353
97354
97355
97356
97357
97358
97359
97360
97361
97362
97363
97364
97365
97366
97367
97368
97369
97370
97371
97372
97373
97374
97375
97376
97377
97378
97379
97380
97381
97382
97383
97384
97385
97386
97387
97388
97389
97390
97391
97392
97393
97394
97395
97396
97397
97398
97399
97400
97401
97402
97403
97404
97405
97406
97407
97408
97409
97410
97411
97412
97413
97414
97415
97416
97417
97418
97419
97420
97421
97422
97423
97424
97425
97426
97427
97428
97429
97430
97431
97432
97433
97434
97435
97436
97437
97438
97439
97440
97441
97442
97443
97444
97445
97446
97447
97448
97449
97450
97451
97452
97453
97454
97455
97456
97457
97458
97459
97460
97461
97462
97463
97464
97465
97466
97467
97468
97469
97470
97471
97472
97473
97474
97475
97476
97477
97478
97479
97480
97481
97482
97483
97484
97485
97486
97487
97488
97489
97490
97491
97492
97493
97494
97495
97496
97497
97498
97499
97500
97501
97502
97503
97504
97505
97506
97507
97508
97509
97510
97511
97512
97513
97514
97515
97516
97517
97518
97519
97520
97521
97522
97523
97524
97525
97526
97527
97528
97529
97530
97531
97532
97533
97534
97535
97536
97537
97538
97539
97540
97541
97542
97543
97544
97545
97546
97547
97548
97549
97550
97551
97552
97553
97554
97555
97556
97557
97558
97559
97560
97561
97562
97563
97564
97565
97566
97567
97568
97569
97570
97571
97572
97573
97574
97575
97576
97577
97578
97579
97580
97581
97582
97583
97584
97585
97586
97587
97588
97589
97590
97591
97592
97593
97594
97595
97596
97597
97598
97599
97600
97601
97602
97603
97604
97605
97606
97607
97608
97609
97610
97611
97612
97613
97614
97615
97616
97617
97618
97619
97620
97621
97622
97623
97624
97625
97626
97627
97628
97629
97630
97631
97632
97633
97634
97635
97636
97637
97638
97639
97640
97641
97642
97643
97644
97645
97646
97647
97648
97649
97650
97651
97652
97653
97654
97655
97656
97657
97658
97659
97660
97661
97662
97663
97664
97665
97666
97667
97668
97669
97670
97671
97672
97673
97674
97675
97676
97677
97678
97679
97680
97681
97682
97683
97684
97685
97686
97687
97688
97689
97690
97691
97692
97693
97694
97695
97696
97697
97698
97699
97700
97701
97702
97703
97704
97705
97706
97707
97708
97709
97710
97711
97712
97713
97714
97715
97716
97717
97718
97719
97720
97721
97722
97723
97724
97725
97726
97727
97728
97729
97730
97731
97732
97733
97734
97735
97736
97737
97738
97739
97740
97741
97742
97743
97744
97745
97746
97747
97748
97749
97750
97751
97752
97753
97754
97755
97756
97757
97758
97759
97760
97761
97762
97763
97764
97765
97766
97767
97768
97769
97770
97771
97772
97773
97774
97775
97776
97777
97778
97779
97780
97781
97782
97783
97784
97785
97786
97787
97788
97789
97790
97791
97792
97793
97794
97795
97796
97797
97798
97799
97800
97801
97802
97803
97804
97805
97806
97807
97808
97809
97810
97811
97812
97813
97814
97815
97816
97817
97818
97819
97820
97821
97822
97823
97824
97825
97826
97827
97828
97829
97830
97831
97832
97833
97834
97835
97836
97837
97838
97839
97840
97841
97842
97843
97844
97845
97846
97847
97848
97849
97850
97851
97852
97853
97854
97855
97856
97857
97858
97859
97860
97861
97862
97863
97864
97865
97866
97867
97868
97869
97870
97871
97872
97873
97874
97875
97876
97877
97878
97879
97880
97881
97882
97883
97884
97885
97886
97887
97888
97889
97890
97891
97892
97893
97894
97895
97896
97897
97898
97899
97900
97901
97902
97903
97904
97905
97906
97907
97908
97909
97910
97911
97912
97913
97914
97915
97916
97917
97918
97919
97920
97921
97922
97923
97924
97925
97926
97927
97928
97929
97930
97931
97932
97933
97934
97935
97936
97937
97938
97939
97940
97941
97942
97943
97944
97945
97946
97947
97948
97949
97950
97951
97952
97953
97954
97955
97956
97957
97958
97959
97960
97961
97962
97963
97964
97965
97966
97967
97968
97969
97970
97971
97972
97973
97974
97975
97976
97977
97978
97979
97980
97981
97982
97983
97984
97985
97986
97987
97988
97989
97990
97991
97992
97993
97994
97995
97996
97997
97998
97999
98000
98001
98002
98003
98004
98005
98006
98007
98008
98009
98010
98011
98012
98013
98014
98015
98016
98017
98018
98019
98020
98021
98022
98023
98024
98025
98026
98027
98028
98029
98030
98031
98032
98033
98034
98035
98036
98037
98038
98039
98040
98041
98042
98043
98044
98045
98046
98047
98048
98049
98050
98051
98052
98053
98054
98055
98056
98057
98058
98059
98060
98061
98062
98063
98064
98065
98066
98067
98068
98069
98070
98071
98072
98073
98074
98075
98076
98077
98078
98079
98080
98081
98082
98083
98084
98085
98086
98087
98088
98089
98090
98091
98092
98093
98094
98095
98096
98097
98098
98099
98100
98101
98102
98103
98104
98105
98106
98107
98108
98109
98110
98111
98112
98113
98114
98115
98116
98117
98118
98119
98120
98121
98122
98123
98124
98125
98126
98127
98128
98129
98130
98131
98132
98133
98134
98135
98136
98137
98138
98139
98140
98141
98142
98143
98144
98145
98146
98147
98148
98149
98150
98151
98152
98153
98154
98155
98156
98157
98158
98159
98160
98161
98162
98163
98164
98165
98166
98167
98168
98169
98170
98171
98172
98173
98174
98175
98176
98177
98178
98179
98180
98181
98182
98183
98184
98185
98186
98187
98188
98189
98190
98191
98192
98193
98194
98195
98196
98197
98198
98199
98200
98201
98202
98203
98204
98205
98206
98207
98208
98209
98210
98211
98212
98213
98214
98215
98216
98217
98218
98219
98220
98221
98222
98223
98224
98225
98226
98227
98228
98229
98230
98231
98232
98233
98234
98235
98236
98237
98238
98239
98240
98241
98242
98243
98244
98245
98246
98247
98248
98249
98250
98251
98252
98253
98254
98255
98256
98257
98258
98259
98260
98261
98262
98263
98264
98265
98266
98267
98268
98269
98270
98271
98272
98273
98274
98275
98276
98277
98278
98279
98280
98281
98282
98283
98284
98285
98286
98287
98288
98289
98290
98291
98292
98293
98294
98295
98296
98297
98298
98299
98300
98301
98302
98303
98304
98305
98306
98307
98308
98309
98310
98311
98312
98313
98314
98315
98316
98317
98318
98319
98320
98321
98322
98323
98324
98325
98326
98327
98328
98329
98330
98331
98332
98333
98334
98335
98336
98337
98338
98339
98340
98341
98342
98343
98344
98345
98346
98347
98348
98349
98350
98351
98352
98353
98354
98355
98356
98357
98358
98359
98360
98361
98362
98363
98364
98365
98366
98367
98368
98369
98370
98371
98372
98373
98374
98375
98376
98377
98378
98379
98380
98381
98382
98383
98384
98385
98386
98387
98388
98389
98390
98391
98392
98393
98394
98395
98396
98397
98398
98399
98400
98401
98402
98403
98404
98405
98406
98407
98408
98409
98410
98411
98412
98413
98414
98415
98416
98417
98418
98419
98420
98421
98422
98423
98424
98425
98426
98427
98428
98429
98430
98431
98432
98433
98434
98435
98436
98437
98438
98439
98440
98441
98442
98443
98444
98445
98446
98447
98448
98449
98450
98451
98452
98453
98454
98455
98456
98457
98458
98459
98460
98461
98462
98463
98464
98465
98466
98467
98468
98469
98470
98471
98472
98473
98474
98475
98476
98477
98478
98479
98480
98481
98482
98483
98484
98485
98486
98487
98488
98489
98490
98491
98492
98493
98494
98495
98496
98497
98498
98499
98500
98501
98502
98503
98504
98505
98506
98507
98508
98509
98510
98511
98512
98513
98514
98515
98516
98517
98518
98519
98520
98521
98522
98523
98524
98525
98526
98527
98528
98529
98530
98531
98532
98533
98534
98535
98536
98537
98538
98539
98540
98541
98542
98543
98544
98545
98546
98547
98548
98549
98550
98551
98552
98553
98554
98555
98556
98557
98558
98559
98560
98561
98562
98563
98564
98565
98566
98567
98568
98569
98570
98571
98572
98573
98574
98575
98576
98577
98578
98579
98580
98581
98582
98583
98584
98585
98586
98587
98588
98589
98590
98591
98592
98593
98594
98595
98596
98597
98598
98599
98600
98601
98602
98603
98604
98605
98606
98607
98608
98609
98610
98611
98612
98613
98614
98615
98616
98617
98618
98619
98620
98621
98622
98623
98624
98625
98626
98627
98628
98629
98630
98631
98632
98633
98634
98635
98636
98637
98638
98639
98640
98641
98642
98643
98644
98645
98646
98647
98648
98649
98650
98651
98652
98653
98654
98655
98656
98657
98658
98659
98660
98661
98662
98663
98664
98665
98666
98667
98668
98669
98670
98671
98672
98673
98674
98675
98676
98677
98678
98679
98680
98681
98682
98683
98684
98685
98686
98687
98688
98689
98690
98691
98692
98693
98694
98695
98696
98697
98698
98699
98700
98701
98702
98703
98704
98705
98706
98707
98708
98709
98710
98711
98712
98713
98714
98715
98716
98717
98718
98719
98720
98721
98722
98723
98724
98725
98726
98727
98728
98729
98730
98731
98732
98733
98734
98735
98736
98737
98738
98739
98740
98741
98742
98743
98744
98745
98746
98747
98748
98749
98750
98751
98752
98753
98754
98755
98756
98757
98758
98759
98760
98761
98762
98763
98764
98765
98766
98767
98768
98769
98770
98771
98772
98773
98774
98775
98776
98777
98778
98779
98780
98781
98782
98783
98784
98785
98786
98787
98788
98789
98790
98791
98792
98793
98794
98795
98796
98797
98798
98799
98800
98801
98802
98803
98804
98805
98806
98807
98808
98809
98810
98811
98812
98813
98814
98815
98816
98817
98818
98819
98820
98821
98822
98823
98824
98825
98826
98827
98828
98829
98830
98831
98832
98833
98834
98835
98836
98837
98838
98839
98840
98841
98842
98843
98844
98845
98846
98847
98848
98849
98850
98851
98852
98853
98854
98855
98856
98857
98858
98859
98860
98861
98862
98863
98864
98865
98866
98867
98868
98869
98870
98871
98872
98873
98874
98875
98876
98877
98878
98879
98880
98881
98882
98883
98884
98885
98886
98887
98888
98889
98890
98891
98892
98893
98894
98895
98896
98897
98898
98899
98900
98901
98902
98903
98904
98905
98906
98907
98908
98909
98910
98911
98912
98913
98914
98915
98916
98917
98918
98919
98920
98921
98922
98923
98924
98925
98926
98927
98928
98929
98930
98931
98932
98933
98934
98935
98936
98937
98938
98939
98940
98941
98942
98943
98944
98945
98946
98947
98948
98949
98950
98951
98952
98953
98954
98955
98956
98957
98958
98959
98960
98961
98962
98963
98964
98965
98966
98967
98968
98969
98970
98971
98972
98973
98974
98975
98976
98977
98978
98979
98980
98981
98982
98983
98984
98985
98986
98987
98988
98989
98990
98991
98992
98993
98994
98995
98996
98997
98998
98999
99000
99001
99002
99003
99004
99005
99006
99007
99008
99009
99010
99011
99012
99013
99014
99015
99016
99017
99018
99019
99020
99021
99022
99023
99024
99025
99026
99027
99028
99029
99030
99031
99032
99033
99034
99035
99036
99037
99038
99039
99040
99041
99042
99043
99044
99045
99046
99047
99048
99049
99050
99051
99052
99053
99054
99055
99056
99057
99058
99059
99060
99061
99062
99063
99064
99065
99066
99067
99068
99069
99070
99071
99072
99073
99074
99075
99076
99077
99078
99079
99080
99081
99082
99083
99084
99085
99086
99087
99088
99089
99090
99091
99092
99093
99094
99095
99096
99097
99098
99099
99100
99101
99102
99103
99104
99105
99106
99107
99108
99109
99110
99111
99112
99113
99114
99115
99116
99117
99118
99119
99120
99121
99122
99123
99124
99125
99126
99127
99128
99129
99130
99131
99132
99133
99134
99135
99136
99137
99138
99139
99140
99141
99142
99143
99144
99145
99146
99147
99148
99149
99150
99151
99152
99153
99154
99155
99156
99157
99158
99159
99160
99161
99162
99163
99164
99165
99166
99167
99168
99169
99170
99171
99172
99173
99174
99175
99176
99177
99178
99179
99180
99181
99182
99183
99184
99185
99186
99187
99188
99189
99190
99191
99192
99193
99194
99195
99196
99197
99198
99199
99200
99201
99202
99203
99204
99205
99206
99207
99208
99209
99210
99211
99212
99213
99214
99215
99216
99217
99218
99219
99220
99221
99222
99223
99224
99225
99226
99227
99228
99229
99230
99231
99232
99233
99234
99235
99236
99237
99238
99239
99240
99241
99242
99243
99244
99245
99246
99247
99248
99249
99250
99251
99252
99253
99254
99255
99256
99257
99258
99259
99260
99261
99262
99263
99264
99265
99266
99267
99268
99269
99270
99271
99272
99273
99274
99275
99276
99277
99278
99279
99280
99281
99282
99283
99284
99285
99286
99287
99288
99289
99290
99291
99292
99293
99294
99295
99296
99297
99298
99299
99300
99301
99302
99303
99304
99305
99306
99307
99308
99309
99310
99311
99312
99313
99314
99315
99316
99317
99318
99319
99320
99321
99322
99323
99324
99325
99326
99327
99328
99329
99330
99331
99332
99333
99334
99335
99336
99337
99338
99339
99340
99341
99342
99343
99344
99345
99346
99347
99348
99349
99350
99351
99352
99353
99354
99355
99356
99357
99358
99359
99360
99361
99362
99363
99364
99365
99366
99367
99368
99369
99370
99371
99372
99373
99374
99375
99376
99377
99378
99379
99380
99381
99382
99383
99384
99385
99386
99387
99388
99389
99390
99391
99392
99393
99394
99395
99396
99397
99398
99399
99400
99401
99402
99403
99404
99405
99406
99407
99408
99409
99410
99411
99412
99413
99414
99415
99416
99417
99418
99419
99420
99421
99422
99423
99424
99425
99426
99427
99428
99429
99430
99431
99432
99433
99434
99435
99436
99437
99438
99439
99440
99441
99442
99443
99444
99445
99446
99447
99448
99449
99450
99451
99452
99453
99454
99455
99456
99457
99458
99459
99460
99461
99462
99463
99464
99465
99466
99467
99468
99469
99470
99471
99472
99473
99474
99475
99476
99477
99478
99479
99480
99481
99482
99483
99484
99485
99486
99487
99488
99489
99490
99491
99492
99493
99494
99495
99496
99497
99498
99499
99500
99501
99502
99503
99504
99505
99506
99507
99508
99509
99510
99511
99512
99513
99514
99515
99516
99517
99518
99519
99520
99521
99522
99523
99524
99525
99526
99527
99528
99529
99530
99531
99532
99533
99534
99535
99536
99537
99538
99539
99540
99541
99542
99543
99544
99545
99546
99547
99548
99549
99550
99551
99552
99553
99554
99555
99556
99557
99558
99559
99560
99561
99562
99563
99564
99565
99566
99567
99568
99569
99570
99571
99572
99573
99574
99575
99576
99577
99578
99579
99580
99581
99582
99583
99584
99585
99586
99587
99588
99589
99590
99591
99592
99593
99594
99595
99596
99597
99598
99599
99600
99601
99602
99603
99604
99605
99606
99607
99608
99609
99610
99611
99612
99613
99614
99615
99616
99617
99618
99619
99620
99621
99622
99623
99624
99625
99626
99627
99628
99629
99630
99631
99632
99633
99634
99635
99636
99637
99638
99639
99640
99641
99642
99643
99644
99645
99646
99647
99648
99649
99650
99651
99652
99653
99654
99655
99656
99657
99658
99659
99660
99661
99662
99663
99664
99665
99666
99667
99668
99669
99670
99671
99672
99673
99674
99675
99676
99677
99678
99679
99680
99681
99682
99683
99684
99685
99686
99687
99688
99689
99690
99691
99692
99693
99694
99695
99696
99697
99698
99699
99700
99701
99702
99703
99704
99705
99706
99707
99708
99709
99710
99711
99712
99713
99714
99715
99716
99717
99718
99719
99720
99721
99722
99723
99724
99725
99726
99727
99728
99729
99730
99731
99732
99733
99734
99735
99736
99737
99738
99739
99740
99741
99742
99743
99744
99745
99746
99747
99748
99749
99750
99751
99752
99753
99754
99755
99756
99757
99758
99759
99760
99761
99762
99763
99764
99765
99766
99767
99768
99769
99770
99771
99772
99773
99774
99775
99776
99777
99778
99779
99780
99781
99782
99783
99784
99785
99786
99787
99788
99789
99790
99791
99792
99793
99794
99795
99796
99797
99798
99799
99800
99801
99802
99803
99804
99805
99806
99807
99808
99809
99810
99811
99812
99813
99814
99815
99816
99817
99818
99819
99820
99821
99822
99823
99824
99825
99826
99827
99828
99829
99830
99831
99832
99833
99834
99835
99836
99837
99838
99839
99840
99841
99842
99843
99844
99845
99846
99847
99848
99849
99850
99851
99852
99853
99854
99855
99856
99857
99858
99859
99860
99861
99862
99863
99864
99865
99866
99867
99868
99869
99870
99871
99872
99873
99874
99875
99876
99877
99878
99879
99880
99881
99882
99883
99884
99885
99886
99887
99888
99889
99890
99891
99892
99893
99894
99895
99896
99897
99898
99899
99900
99901
99902
99903
99904
99905
99906
99907
99908
99909
99910
99911
99912
99913
99914
99915
99916
99917
99918
99919
99920
99921
99922
99923
99924
99925
99926
99927
99928
99929
99930
99931
99932
99933
99934
99935
99936
99937
99938
99939
99940
99941
99942
99943
99944
99945
99946
99947
99948
99949
99950
99951
99952
99953
99954
99955
99956
99957
99958
99959
99960
99961
99962
99963
99964
99965
99966
99967
99968
99969
99970
99971
99972
99973
99974
99975
99976
99977
99978
99979
99980
99981
99982
99983
99984
99985
99986
99987
99988
99989
99990
99991
99992
99993
99994
99995
99996
99997
99998
99999
100000
100001
100002
100003
100004
100005
100006
100007
100008
100009
100010
100011
100012
100013
100014
100015
100016
100017
100018
100019
100020
100021
100022
100023
100024
100025
100026
100027
100028
100029
100030
100031
100032
100033
100034
100035
100036
100037
100038
100039
100040
100041
100042
100043
100044
100045
100046
100047
100048
100049
100050
100051
100052
100053
100054
100055
100056
100057
100058
100059
100060
100061
100062
100063
100064
100065
100066
100067
100068
100069
100070
100071
100072
100073
100074
100075
100076
100077
100078
100079
100080
100081
100082
100083
100084
100085
100086
100087
100088
100089
100090
100091
100092
100093
100094
100095
100096
100097
100098
100099
100100
100101
100102
100103
100104
100105
100106
100107
100108
100109
100110
100111
100112
100113
100114
100115
100116
100117
100118
100119
100120
100121
100122
100123
100124
100125
100126
100127
100128
100129
100130
100131
100132
100133
100134
100135
100136
100137
100138
100139
100140
100141
100142
100143
100144
100145
100146
100147
100148
100149
100150
100151
100152
100153
100154
100155
100156
100157
100158
100159
100160
100161
100162
100163
100164
100165
100166
100167
100168
100169
100170
100171
100172
100173
100174
100175
100176
100177
100178
100179
100180
100181
100182
100183
100184
100185
100186
100187
100188
100189
100190
100191
100192
100193
100194
100195
100196
100197
100198
100199
100200
100201
100202
100203
100204
100205
100206
100207
100208
100209
100210
100211
100212
100213
100214
100215
100216
100217
100218
100219
100220
100221
100222
100223
100224
100225
100226
100227
100228
100229
100230
100231
100232
100233
100234
100235
100236
100237
100238
100239
100240
100241
100242
100243
100244
100245
100246
100247
100248
100249
100250
100251
100252
100253
100254
100255
100256
100257
100258
100259
100260
100261
100262
100263
100264
100265
100266
100267
100268
100269
100270
100271
100272
100273
100274
100275
100276
100277
100278
100279
100280
100281
100282
100283
100284
100285
100286
100287
100288
100289
100290
100291
100292
100293
100294
100295
100296
100297
100298
100299
100300
100301
100302
100303
100304
100305
100306
100307
100308
100309
100310
100311
100312
100313
100314
100315
100316
100317
100318
100319
100320
100321
100322
100323
100324
100325
100326
100327
100328
100329
100330
100331
100332
100333
100334
100335
100336
100337
100338
100339
100340
100341
100342
100343
100344
100345
100346
100347
100348
100349
100350
100351
100352
100353
100354
100355
100356
100357
100358
100359
100360
100361
100362
100363
100364
100365
100366
100367
100368
100369
100370
100371
100372
100373
100374
100375
100376
100377
100378
100379
100380
100381
100382
100383
100384
100385
100386
100387
100388
100389
100390
100391
100392
100393
100394
100395
100396
100397
100398
100399
100400
100401
100402
100403
100404
100405
100406
100407
100408
100409
100410
100411
100412
100413
100414
100415
100416
100417
100418
100419
100420
100421
100422
100423
100424
100425
100426
100427
100428
100429
100430
100431
100432
100433
100434
100435
100436
100437
100438
100439
100440
100441
100442
100443
100444
100445
100446
100447
100448
100449
100450
100451
100452
100453
100454
100455
100456
100457
100458
100459
100460
100461
100462
100463
100464
100465
100466
100467
100468
100469
100470
100471
100472
100473
100474
100475
100476
100477
100478
100479
100480
100481
100482
100483
100484
100485
100486
100487
100488
100489
100490
100491
100492
100493
100494
100495
100496
100497
100498
100499
100500
100501
100502
100503
100504
100505
100506
100507
100508
100509
100510
100511
100512
100513
100514
100515
100516
100517
100518
100519
100520
100521
100522
100523
100524
100525
100526
100527
100528
100529
100530
100531
100532
100533
100534
100535
100536
100537
100538
100539
100540
100541
100542
100543
100544
100545
100546
100547
100548
100549
100550
100551
100552
100553
100554
100555
100556
100557
100558
100559
100560
100561
100562
100563
100564
100565
100566
100567
100568
100569
100570
100571
100572
100573
100574
100575
100576
100577
100578
100579
100580
100581
100582
100583
100584
100585
100586
100587
100588
100589
100590
100591
100592
100593
100594
100595
100596
100597
100598
100599
100600
100601
100602
100603
100604
100605
100606
100607
100608
100609
100610
100611
100612
100613
100614
100615
100616
100617
100618
100619
100620
100621
100622
100623
100624
100625
100626
100627
100628
100629
100630
100631
100632
100633
100634
100635
100636
100637
100638
100639
100640
100641
100642
100643
100644
100645
100646
100647
100648
100649
100650
100651
100652
100653
100654
100655
100656
100657
100658
100659
100660
100661
100662
100663
100664
100665
100666
100667
100668
100669
100670
100671
100672
100673
100674
100675
100676
100677
100678
100679
100680
100681
100682
100683
100684
100685
100686
100687
100688
100689
100690
100691
100692
100693
100694
100695
100696
100697
100698
100699
100700
100701
100702
100703
100704
100705
100706
100707
100708
100709
100710
100711
100712
100713
100714
100715
100716
100717
100718
100719
100720
100721
100722
100723
100724
100725
100726
100727
100728
100729
100730
100731
100732
100733
100734
100735
100736
100737
100738
100739
100740
100741
100742
100743
100744
100745
100746
100747
100748
100749
100750
100751
100752
100753
100754
100755
100756
100757
100758
100759
100760
100761
100762
100763
100764
100765
100766
100767
100768
100769
100770
100771
100772
100773
100774
100775
100776
100777
100778
100779
100780
100781
100782
100783
100784
100785
100786
100787
100788
100789
100790
100791
100792
100793
100794
100795
100796
100797
100798
100799
100800
100801
100802
100803
100804
100805
100806
100807
100808
100809
100810
100811
100812
100813
100814
100815
100816
100817
100818
100819
100820
100821
100822
100823
100824
100825
100826
100827
100828
100829
100830
100831
100832
100833
100834
100835
100836
100837
100838
100839
100840
100841
100842
100843
100844
100845
100846
100847
100848
100849
100850
100851
100852
100853
100854
100855
100856
100857
100858
100859
100860
100861
100862
100863
100864
100865
100866
100867
100868
100869
100870
100871
100872
100873
100874
100875
100876
100877
100878
100879
100880
100881
100882
100883
100884
100885
100886
100887
100888
100889
100890
100891
100892
100893
100894
100895
100896
100897
100898
100899
100900
100901
100902
100903
100904
100905
100906
100907
100908
100909
100910
100911
100912
100913
100914
100915
100916
100917
100918
100919
100920
100921
100922
100923
100924
100925
100926
100927
100928
100929
100930
100931
100932
100933
100934
100935
100936
100937
100938
100939
100940
100941
100942
100943
100944
100945
100946
100947
100948
100949
100950
100951
100952
100953
100954
100955
100956
100957
100958
100959
100960
100961
100962
100963
100964
100965
100966
100967
100968
100969
100970
100971
100972
100973
100974
100975
100976
100977
100978
100979
100980
100981
100982
100983
100984
100985
100986
100987
100988
100989
100990
100991
100992
100993
100994
100995
100996
100997
100998
100999
101000
101001
101002
101003
101004
101005
101006
101007
101008
101009
101010
101011
101012
101013
101014
101015
101016
101017
101018
101019
101020
101021
101022
101023
101024
101025
101026
101027
101028
101029
101030
101031
101032
101033
101034
101035
101036
101037
101038
101039
101040
101041
101042
101043
101044
101045
101046
101047
101048
101049
101050
101051
101052
101053
101054
101055
101056
101057
101058
101059
101060
101061
101062
101063
101064
101065
101066
101067
101068
101069
101070
101071
101072
101073
101074
101075
101076
101077
101078
101079
101080
101081
101082
101083
101084
101085
101086
101087
101088
101089
101090
101091
101092
101093
101094
101095
101096
101097
101098
101099
101100
101101
101102
101103
101104
101105
101106
101107
101108
101109
101110
101111
101112
101113
101114
101115
101116
101117
101118
101119
101120
101121
101122
101123
101124
101125
101126
101127
101128
101129
101130
101131
101132
101133
101134
101135
101136
101137
101138
101139
101140
101141
101142
101143
101144
101145
101146
101147
101148
101149
101150
101151
101152
101153
101154
101155
101156
101157
101158
101159
101160
101161
101162
101163
101164
101165
101166
101167
101168
101169
101170
101171
101172
101173
101174
101175
101176
101177
101178
101179
101180
101181
101182
101183
101184
101185
101186
101187
101188
101189
101190
101191
101192
101193
101194
101195
101196
101197
101198
101199
101200
101201
101202
101203
101204
101205
101206
101207
101208
101209
101210
101211
101212
101213
101214
101215
101216
101217
101218
101219
101220
101221
101222
101223
101224
101225
101226
101227
101228
101229
101230
101231
101232
101233
101234
101235
101236
101237
101238
101239
101240
101241
101242
101243
101244
101245
101246
101247
101248
101249
101250
101251
101252
101253
101254
101255
101256
101257
101258
101259
101260
101261
101262
101263
101264
101265
101266
101267
101268
101269
101270
101271
101272
101273
101274
101275
101276
101277
101278
101279
101280
101281
101282
101283
101284
101285
101286
101287
101288
101289
101290
101291
101292
101293
101294
101295
101296
101297
101298
101299
101300
101301
101302
101303
101304
101305
101306
101307
101308
101309
101310
101311
101312
101313
101314
101315
101316
101317
101318
101319
101320
101321
101322
101323
101324
101325
101326
101327
101328
101329
101330
101331
101332
101333
101334
101335
101336
101337
101338
101339
101340
101341
101342
101343
101344
101345
101346
101347
101348
101349
101350
101351
101352
101353
101354
101355
101356
101357
101358
101359
101360
101361
101362
101363
101364
101365
101366
101367
101368
101369
101370
101371
101372
101373
101374
101375
101376
101377
101378
101379
101380
101381
101382
101383
101384
101385
101386
101387
101388
101389
101390
101391
101392
101393
101394
101395
101396
101397
101398
101399
101400
101401
101402
101403
101404
101405
101406
101407
101408
101409
101410
101411
101412
101413
101414
101415
101416
101417
101418
101419
101420
101421
101422
101423
101424
101425
101426
101427
101428
101429
101430
101431
101432
101433
101434
101435
101436
101437
101438
101439
101440
101441
101442
101443
101444
101445
101446
101447
101448
101449
101450
101451
101452
101453
101454
101455
101456
101457
101458
101459
101460
101461
101462
101463
101464
101465
101466
101467
101468
101469
101470
101471
101472
101473
101474
101475
101476
101477
101478
101479
101480
101481
101482
101483
101484
101485
101486
101487
101488
101489
101490
101491
101492
101493
101494
101495
101496
101497
101498
101499
101500
101501
101502
101503
101504
101505
101506
101507
101508
101509
101510
101511
101512
101513
101514
101515
101516
101517
101518
101519
101520
101521
101522
101523
101524
101525
101526
101527
101528
101529
101530
101531
101532
101533
101534
101535
101536
101537
101538
101539
101540
101541
101542
101543
101544
101545
101546
101547
101548
101549
101550
101551
101552
101553
101554
101555
101556
101557
101558
101559
101560
101561
101562
101563
101564
101565
101566
101567
101568
101569
101570
101571
101572
101573
101574
101575
101576
101577
101578
101579
101580
101581
101582
101583
101584
101585
101586
101587
101588
101589
101590
101591
101592
101593
101594
101595
101596
101597
101598
101599
101600
101601
101602
101603
101604
101605
101606
101607
101608
101609
101610
101611
101612
101613
101614
101615
101616
101617
101618
101619
101620
101621
101622
101623
101624
101625
101626
101627
101628
101629
101630
101631
101632
101633
101634
101635
101636
101637
101638
101639
101640
101641
101642
101643
101644
101645
101646
101647
101648
101649
101650
101651
101652
101653
101654
101655
101656
101657
101658
101659
101660
101661
101662
101663
101664
101665
101666
101667
101668
101669
101670
101671
101672
101673
101674
101675
101676
101677
101678
101679
101680
101681
101682
101683
101684
101685
101686
101687
101688
101689
101690
101691
101692
101693
101694
101695
101696
101697
101698
101699
101700
101701
101702
101703
101704
101705
101706
101707
101708
101709
101710
101711
101712
101713
101714
101715
101716
101717
101718
101719
101720
101721
101722
101723
101724
101725
101726
101727
101728
101729
101730
101731
101732
101733
101734
101735
101736
101737
101738
101739
101740
101741
101742
101743
101744
101745
101746
101747
101748
101749
101750
101751
101752
101753
101754
101755
101756
101757
101758
101759
101760
101761
101762
101763
101764
101765
101766
101767
101768
101769
101770
101771
101772
101773
101774
101775
101776
101777
101778
101779
101780
101781
101782
101783
101784
101785
101786
101787
101788
101789
101790
101791
101792
101793
101794
101795
101796
101797
101798
101799
101800
101801
101802
101803
101804
101805
101806
101807
101808
101809
101810
101811
101812
101813
101814
101815
101816
101817
101818
101819
101820
101821
101822
101823
101824
101825
101826
101827
101828
101829
101830
101831
101832
101833
101834
101835
101836
101837
101838
101839
101840
101841
101842
101843
101844
101845
101846
101847
101848
101849
101850
101851
101852
101853
101854
101855
101856
101857
101858
101859
101860
101861
101862
101863
101864
101865
101866
101867
101868
101869
101870
101871
101872
101873
101874
101875
101876
101877
101878
101879
101880
101881
101882
101883
101884
101885
101886
101887
101888
101889
101890
101891
101892
101893
101894
101895
101896
101897
101898
101899
101900
101901
101902
101903
101904
101905
101906
101907
101908
101909
101910
101911
101912
101913
101914
101915
101916
101917
101918
101919
101920
101921
101922
101923
101924
101925
101926
101927
101928
101929
101930
101931
101932
101933
101934
101935
101936
101937
101938
101939
101940
101941
101942
101943
101944
101945
101946
101947
101948
101949
101950
101951
101952
101953
101954
101955
101956
101957
101958
101959
101960
101961
101962
101963
101964
101965
101966
101967
101968
101969
101970
101971
101972
101973
101974
101975
101976
101977
101978
101979
101980
101981
101982
101983
101984
101985
101986
101987
101988
101989
101990
101991
101992
101993
101994
101995
101996
101997
101998
101999
102000
102001
102002
102003
102004
102005
102006
102007
102008
102009
102010
102011
102012
102013
102014
102015
102016
102017
102018
102019
102020
102021
102022
102023
102024
102025
102026
102027
102028
102029
102030
102031
102032
102033
102034
102035
102036
102037
102038
102039
102040
102041
102042
102043
102044
102045
102046
102047
102048
102049
102050
102051
102052
102053
102054
102055
102056
102057
102058
102059
102060
102061
102062
102063
102064
102065
102066
102067
102068
102069
102070
102071
102072
102073
102074
102075
102076
102077
102078
102079
102080
102081
102082
102083
102084
102085
102086
102087
102088
102089
102090
102091
102092
102093
102094
102095
102096
102097
102098
102099
102100
102101
102102
102103
102104
102105
102106
102107
102108
102109
102110
102111
102112
102113
102114
102115
102116
102117
102118
102119
102120
102121
102122
102123
102124
102125
102126
102127
102128
102129
102130
102131
102132
102133
102134
102135
102136
102137
102138
102139
102140
102141
102142
102143
102144
102145
102146
102147
102148
102149
102150
102151
102152
102153
102154
102155
102156
102157
102158
102159
102160
102161
102162
102163
102164
102165
102166
102167
102168
102169
102170
102171
102172
102173
102174
102175
102176
102177
102178
102179
102180
102181
102182
102183
102184
102185
102186
102187
102188
102189
102190
102191
102192
102193
102194
102195
102196
102197
102198
102199
102200
102201
102202
102203
102204
102205
102206
102207
102208
102209
102210
102211
102212
102213
102214
102215
102216
102217
102218
102219
102220
102221
102222
102223
102224
102225
102226
102227
102228
102229
102230
102231
102232
102233
102234
102235
102236
2023-01-14  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2023-01-13  Nick Clifton  <nickc@redhat.com>

	Updated Romainian translation for the bfd sub-directory

2023-01-13  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2023-01-12  Hans-Peter Nilsson  <hp@axis.com>

	ARM: Fix ld bloat introduced between binutils-2.38 and 2.39
	Since commit 9833b7757d24, "PR28824, relro security issues",
	ELF_MAXPAGESIZE matters much more, with regards to layout of
	the linked file.  That commit fixed an actual bug, but also
	exposes a problem for targets were that value is too high.

	For example, for ARM(32, a.k.a. "Aarch32") specifically
	bfd_arch_arm, it's set to 64 KiB, making all Linux(/GNU)
	targets pay an extra amount of up to 60 KiB of bloat in
	DSO:s and executables.  This matters when there are many
	such files, and where storage is expensive.

	It's *mostly* bloat when using a Linux kernel, as ARM(32) is
	a good example of an target where ELF_MAXPAGESIZE is set to
	an extreme value for an obscure corner-case.  The ARM
	(32-bit) kernel has 4 KiB pages, has had that value forever,
	and can't be configured to any other value.  The use-case is
	IIUC "Aarch32" emulation on an "Aarch64" (arm64) kernel, but
	not just that, but a setup where the Linux page-size is
	configured to something other than the *default* 4 KiB.  Not
	sure there actually any such systems in use, again with
	both Aarch32 compatibility support and a non-4KiB pagesize,
	with all the warnings in the kernel config and requiring the
	"EXPERT" level set on.

	So, let's do like x86-64 in a2267dbfc9e1 "x86-64: Use only
	one default max-page-size" and set ELF_MAXPAGESIZE to 4096.

	bfd:
		* elf32-arm.c (ELF_MAXPAGESIZE): Always set to 0x1000.
	(cherry picked from commit 1a26a53a0dee39106ba58fcb15496c5f13074652)

2023-01-12  Hans-Peter Nilsson  <hp@axis.com>

	ld/testsuite: Adjust for ELF_MAXPAGESIZE 0x1000
	Many tests reflect a setting of ELF_MAXPAGESIZE to 64 KiB.
	With ELF_MAXPAGESIZE changed to 4 KiB, layout is sometimes
	different and symbols end up in other places.  Avoid churn
	and regexpification of old test patterns by passing the
	max-page-size setting active at the time.

	ld/testsuite:

		* testsuite/ld-arm/arm-elf.exp,
	        testsuite/ld-arm/non-contiguous-arm2.d,
	        testsuite/ld-arm/non-contiguous-arm3.d,
	        testsuite/ld-arm/non-contiguous-arm5.d,
	        testsuite/ld-arm/non-contiguous-arm6.d,
	        testsuite/ld-arm/thumb-plt-got.d, testsuite/ld-arm/thumb-plt.d:
		Pass -z max-page-size=0x10000 explicitly to test that rely on
		that value in output-matching patterns.
	(cherry picked from commit b305015577bb92d3041e55a72ca8cd43f7c05748)

2023-01-12  Nick Alcock  <nick.alcock@oracle.com>

	libctf: ctf-link outdated input check faulty
	This check has a pair of faults which, combined, can lead to memory
	corruption.  Firstly, it assumes that the values of the ctf_link_inputs
	hash are ctf_dict_t's: they are not, they are ctf_link_input_t's, a much
	shorter structure.  So the flags check which is the core of this is
	faulty (but happens, by chance, to give the right output on most
	architectures, since usually we happen to get a 0 here, so the test that
	checks this usually passes).  Worse, the warning that is emitted when
	the test fails is added to the wrong dict -- it's added to the input
	dict, whose warning list is never consumed, rendering the whole check
	useless.  But the dict it adds to is still the wrong type, so we end up
	overwriting something deep in memory (or, much more likely,
	dereferencing a garbage pointer and crashing).

	Fixing both reveals another problem: the link input is an *archive*
	consisting of multiple members, so we have to consider whether to check
	all of them for the outdated-func-info thing we are checking here.
	However, no compiler exists that emits a mixture of members with this
	flag on and members with it off, and the linker always reserializes (and
	upgrades) such things when it sees them: so all members in a given
	archive must have the same value of the flag, so we only need to check
	one member per input archive.

	libctf/
		PR libctf/29983
		* ctf-link.c (ctf_link_warn_outdated_inputs): Get the types of
	        members of ctf_link_inputs right, fixing a possible spurious
	        tesst failure / wild pointer deref / overwrite.  Emit the
	        warning message into the right dict.

2023-01-12  Nick Clifton  <nickc@redhat.com>

	Ensure that libbacktrace/allocfail.sh is not deleted when creating release tarballs.
		* Makefile.am (CLEANFILES): Import patch from upstream to prevent
		allocafail.sh from being removed when running 'make clean'.

2023-01-12  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2023-01-11  Nick Clifton  <nickc@redhat.com>

	Fix a potential illegal memory access in the BFD library when parsing a corrupt DWARF file.
		PR 29988
		* dwarf2.c (read_indexed_address): Fix check for an out of range
		offset.

2023-01-11  Jan Beulich  <jbeulich@suse.com>

	gas/RISC-V: adjust assembler for opcode table re-ordering
	PR gas/29940

	With the single-operand JAL entry now sitting ahead of the two-operand
	one, the parsing of a two-operand insn would first try to parse an 'a'-
	style operand, resulting in the insertion of bogus (and otherwise
	unused) undefined symbols in the symbol table, having register names.
	Since 'a' is used as 1st operand only with J and JAL, and since JAL is
	the only insn _also_ allowing for a register as 1st operand (and then
	there being a 2nd one), special case this parsing aspect right there.

	Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>

2023-01-11  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2023-01-10  Stefan Schulze Frielinghaus  <stefansf@linux.ibm.com>

	IBM zSystems: Fix offset relative to static TLS
	For local exec TLS relocations of the form foo@NTPOFF+x the addend was
	ignored.

	bfd/ChangeLog:

		* elf32-s390.c (elf_s390_relocate_section): Honor addend for
		R_390_TLS_LE32.
		* elf64-s390.c (elf_s390_relocate_section): Honor addend for
		R_390_TLS_LE64.

	ld/ChangeLog:

		* testsuite/ld-s390/reloctlsle-1.d: New test.
		* testsuite/ld-s390/reloctlsle-1.s: New test.

	(cherry picked from commit aefebe82dc89711384b85329daa48d04c1d3a45b)

2023-01-10  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2023-01-09  Indu Bhagat  <indu.bhagat@oracle.com>

	sframe: fix the defined SFRAME_FRE_TYPE_*_LIMIT constants
	An earlier commit 3f107464 defined the SFRAME_FRE_TYPE_*_LIMIT
	constants.  These constants are used (by gas and libsframe) to pick an
	SFrame FRE type based on the function size.  Those constants, however,
	were buggy, causing the generated SFrame sections to be bloated as
	SFRAME_FRE_TYPE_ADDR2/SFRAME_FRE_TYPE_ADDR4 got chosen more often than
	necessary.

	gas/
		* sframe-opt.c (sframe_estimate_size_before_relax): Use
		typecast.
		(sframe_convert_frag): Likewise.

	libsframe/
		* sframe.c (sframe_calc_fre_type): Use a more appropriate type
		for argument.  Adjust the check for SFRAME_FRE_TYPE_ADDR4_LIMIT
		to keep it warning-free but meaningful.

	include/
		* sframe-api.h (sframe_calc_fre_type): Use a more appropriate
		type for the argument.
		* sframe.h (SFRAME_FRE_TYPE_ADDR1_LIMIT): Correct the constant.
		(SFRAME_FRE_TYPE_ADDR2_LIMIT): Likewise.
		(SFRAME_FRE_TYPE_ADDR4_LIMIT): Likewise.

	(cherry picked from commit 725a19bfd142c845bf76ae28f6289972fd1cf5db)

2023-01-09  Indu Bhagat  <indu.bhagat@oracle.com>

	libsframe: adjust an incorrect check in flip_sframe
	When sframe_encoder_write needs to flip the buffer containing the SFrame
	section before writing, it is not necessary that the SFrame FDES are in
	the order of their sfde_func_start_fre_off.  On the contrary, SFrame
	FDEs will be sorted in the order of their start address.  So, remove
	this incorrect assumption which is basically assuming that the last
	sfde_func_start_fre_off seen will help determine the end of the flipped
	buffer.

	The function now keeps track of the bytes_flipped and then compares it with
	the expected value.  Also, added two more checks at appropriate places:
	 - check that the SFrame FDE read is within bounds
	 - check that the SFrame FRE read is within bounds

	libsframe/

		* sframe.c (flip_sframe): Adjust an incorrect check.
		Add other checks to ensure reads are within the buffer size.

	(cherry picked from commit cd9aea32cffd8089f6f63f4eb86d4dccfc0b3850)

2023-01-09  Christophe Lyon  <christophe.lyon@arm.com>

	Skip ld/pr23169 test on arm.
	The test is already skipped on several targets (including AArch64)
	because it's invalid.

		* testsuite/ld-ifunc/ifunc.exp: Skip pr23169 on arm.

2023-01-09  Christophe Lyon  <christophe.lyon@arm.com>

	Fix PR18841 ifunc relocation ordering
	In order to get the ifunc relocs properly sorted the correct class
	needs to be returned.  The code mimics what has been done for AArch64.

	Fixes:
	FAIL: Run pr18841 with libpr18841b.so
	FAIL: Run pr18841 with libpr18841c.so
	FAIL: Run pr18841 with libpr18841bn.so (-z now)
	FAIL: Run pr18841 with libpr18841cn.so (-z now)

		bfd/
		PR ld/18841
		* elf32-arm.c (elf32_arm_reloc_type_class): Return
		reloc_class_ifunc for ifunc symbols.

		ld/testsuite/
		* ld-arm/ifunc-12.rd: Update relocations order.
		* ld-arm/ifunc-3.rd: Likewise.
		* ld-arm/ifunc-4.rd: Likewise.

2023-01-09  Nick Clifton  <nickc@redhat.com>

	Updated transaltions for the gprof and binutils sub-directories

2023-01-09  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2023-01-08  Alan Modra  <amodra@gmail.com>

	PR29972, inconsistent format specification in singular form
		PR 29972
		* readelf.c (process_dynamic_section): Correct format string.

	(cherry picked from commit 02da71ee20ec71f7b3be85cf2266e09c124983bf)

2023-01-08  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2023-01-07  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2023-01-06  Jan Beulich  <jbeulich@suse.com>

	ld: yet another PDB build fix (or workaround)
	Older bash looks to improperly deal with backslashes in here-documents,
	leaving them in place on the escaped double quotes inside the parameter
	expansion. Convert to a model without using such a construct, by simply
	splitting the here-documents into three ones.

2023-01-06  Nick Clifton  <nickc@redhat.com>

	Updated Bulgarian and Russian translations for LD and BFD respectively

2023-01-06  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2023-01-05  Nick Clifton  <nickc@redhat.com>

	Avoid unaligned pointer reads in PEP idata section

	Updated Bulgarian and Russian translations for the gprof subdirectory

2023-01-05  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2023-01-04  Alan Modra  <amodra@gmail.com>

	Merge config/picflag.m4 from gcc

	Update some more copyright year ranges
	These files disappear in commit 3002e78a7d3d but are still on the branch.

	Update year range in gprofng copyright notices
	This adds 'Innovative Computing Labs' as an external author to
	update-copyright.py, to cover the copyright notice in
	gprofng/common/opteron_pcbe.c, and uses that plus another external
	author 'Oracle and' to update gprofng copyright dates.  I'm not going
	to commit 'Oracle and' as an accepted author, but that covers the
	string "Copyright (c) 2006, 2012, Oracle and/or its affiliates. All
	rights reserved." found in gprofng/testsuite/gprofng.display/jsynprog
	files.

	Update year range in copyright notice of binutils files
	The newer update-copyright.py fixes file encoding too, removing cr/lf
	on binutils/bfdtest2.c and ld/testsuite/ld-cygwin/exe-export.exp, and
	embedded cr in binutils/testsuite/binutils-all/ar.exp string match.

2023-01-04  Alan Modra  <amodra@gmail.com>

	Update etc/update-copyright.py
	This picks up some improvements from gcc/contrib.  exceptions must
	derive from BaseException, port to python3, retain original file mode,
	fix name of script in examples.

	Adds libsframe to list of default dirs.  I would have added gprofng
	too but there are some files claiming copyright by authors other than
	the Free Software Foundation.

2023-01-04  Andreas K. Huettel  <dilfridge@gentoo.org>

	Fix AArch64 linker testsuite failures triggered by differences in build environments.
		PR 29843
		* testsuite/ld-aarch64/bti-plt-5.d: Relax regxps slightly to allow
		for differences in build environments.
		* testsuite/ld-aarch64/tls-relax-gdesc-le-now.d: Likewise.

2023-01-04  Mark Harmstone  <mark@harmstone.com>

	Avoid unaligned pointer reads in PEP .idata section
	This is something I discovered when working on aarch64, though it's
	relevant to x86_64 too.

	The PE32+ imports are located in the .idata section, which starts off
	with a 20-byte structure for each DLL, containing offsets into the rest
	of the section. This is the Import Directory Table in
	https://learn.microsoft.com/en-us/windows/win32/debug/pe-format, which
	is a concatenation of the .idata$2 sections. This is then followed by an
	20 zero bytes generated by the linker script, which calls this .idata$3.

	After this comes the .idata$4 entries for each function, which the
	loader overwrites with the function pointers. Because there's no padding
	between .idata$3 and .idata$4, this means that if there's an even number
	of DLLs, the function pointers won't be aligned on an 8-byte boundary.

	Misaligned reads are slower on x86_64, but this is more important on
	aarch64, as the e.g. `ldr x0, [x0, :lo12:__imp__func]` the compiler
	might generate requires __imp__func (the .idata$4 entry) to be aligned
	to 8 bytes. Without this you get IMAGE_REL_ARM64_PAGEOFFSET_12L overflow
	errors.

2023-01-04  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2023-01-03  Nick Clifton  <nickc@redhat.com>

	Updated translations for various languages and sub-directories

2023-01-03  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2023-01-02  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-31  Nick Clifton  <nickc@redhat.com>

	Update version number and regenerate files

	Add markers for 2.40 branch

	sync libiberty sources with gcc mainline

2022-12-31  Tom de Vries  <tdevries@suse.de>

	[gdb/cli] Add maintenance ignore-probes
	There's a command "disable probes", but SystemTap probes, for instance
	libc:longjmp cannot be disabled:
	...
	$ gdb -q -batch a.out -ex start -ex "disable probes libc ^longjmp$"
	  ...
	Probe libc:longjmp cannot be disabled.
	Probe libc:longjmp cannot be disabled.
	Probe libc:longjmp cannot be disabled.
	...

	Add a command "maintenance ignore-probes" that ignores probes during
	get_probes, such that we can easily pretend to use a libc without the
	libc:longjmp probe:
	...
	(gdb) maint ignore-probes -verbose libc ^longjmp$
	ignore-probes filter has been set to:
	PROVIDER: 'libc'
	PROBE_NAME: '^longjmp$'
	OBJNAME: ''
	(gdb) start ^M
	  ...
	Ignoring SystemTap probe libc longjmp in /lib64/libc.so.6.^M
	Ignoring SystemTap probe libc longjmp in /lib64/libc.so.6.^M
	Ignoring SystemTap probe libc longjmp in /lib64/libc.so.6.^M
	...

	The "Ignoring ..." messages can be suppressed by not using -verbose.

	Note that as with "disable probes", running simply "maint ignore-probes"
	ignores all probes.

	The ignore-probes filter can be reset by using:
	...
	(gdb) maint ignore-probes -reset
	ignore-probes filter has been reset
	...

	For now, the command is only supported for SystemTap probes.

	PR cli/27159
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=27159

2022-12-31  Mark Harmstone  <mark@harmstone.com>

	ld/testsuite: Don't add index to sizes in pdb.exp

	ld: Handle LF_VFTABLE types in PDBs

2022-12-31  Mark Harmstone  <mark@harmstone.com>

	ld: Handle extended-length data structures in PDB types
	A few fixes to minor issues I've discovered in my PDB patches.

	* If sizes or offsets are greater than 0x8000, they get encoded as
	extended values in the same way as for enum values - e.g. a LF_ULONG
	.short followed by a .long.

	* I've managed to coax MSVC to produce another type, LF_VFTABLE, which
	is seen when dealing with COM. I don't think LLVM emits this. Note that
	we can't just implement everything in Microsoft's header files, as most
	of it is obsolete.

	* Fixes a stupid bug in the test program, where I was adding an index to
	a size. The index was hard-coded to 0, so this didn't cause any actual
	issues.

2022-12-31  Nick Clifton  <nickc@redhat.com>

	Updated Romanian translation for the binutils sub-directory

2022-12-31  Tom de Vries  <tdevries@suse.de>

	[gdb/python] Fix gdb.python/py-finish-breakpoint2.exp for -m32
	[ Partial resubmission of an earlier submission by Andrew (
	https://sourceware.org/pipermail/gdb-patches/2012-September/096347.html ), so
	listing him as co-author. ]

	With x86_64-linux and target board unix/-m32, we have:
	...
	(gdb) continue^M
	Continuing.^M
	Exception #10^M
	^M
	Breakpoint 3, throw_exception_1 (e=10) at py-finish-breakpoint2.cc:23^M
	23        throw new int (e);^M
	(gdb) FAIL: gdb.python/py-finish-breakpoint2.exp: \
	  check FinishBreakpoint in catch()
	...

	The following scenario happens:
	- set breakpoint in throw_exception_1, a function that throws an exception
	- continue
	- hit breakpoint, with call stack main.c:38 -> throw_exception_1
	- set a finish breakpoint
	- continue
	- hit the breakpoint again, with call stack main.c:48 -> throw_exception
	  -> throw_exception_1

	Due to the exception, the function call did not properly terminate, and the
	finish breakpoint didn't trigger.  This is expected behaviour.

	However, the intention is that gdb detects this situation at the next stop
	and calls the out_of_scope callback, which would result here in this test-case
	in a rather confusing "exception did not finish" message.  So the problem is
	that this message doesn't show up, in other words, the out_of_scope callback
	is not called.

	[ Note that the fact that the situation is detected only at the next stop
	(wherever that happens to be) could be improved upon, and the earlier
	submission did that by setting a longjmp breakpoint.  But I'm considering this
	problem out-of-scope for this patch. ]

	Note that the message does show up later, at thread exit:
	...
	[Inferior 1 (process 20046) exited with code 0236]^M
	exception did not finish ...^M
	...

	The decision on whether to call the out_of_scope call back is taken in
	bpfinishpy_detect_out_scope_cb, and the interesting bit is here:
	...
	             if (b->pspace == current_inferior ()->pspace
	                 && (!target_has_registers ()
	                     || frame_find_by_id (b->frame_id) == NULL))
	               bpfinishpy_out_of_scope (finish_bp);
	...

	In the case of the thread exit, the callback triggers because
	target_has_registers () == 0.

	So why doesn't the callback trigger in the case of the breakpoint?

	Well, the b->frame_id is the frame_id of the frame of main (the frame
	in which the finish breakpoint is supposed to trigger), so AFAIU
	frame_find_by_id (b->frame_id) == NULL will only be true once we've
	left main, at which point I guess we don't stop till thread exit.

	Fix this by saving the frame in which the finish breakpoint was created, and
	using frame_find_by_id () == NULL on that frame instead, such that we have:
	...
	(gdb) continue^M
	Continuing.^M
	Exception #10^M
	^M
	Breakpoint 3, throw_exception_1 (e=10) at py-finish-breakpoint2.cc:23^M
	23        throw new int (e);^M
	exception did not finish ...^M
	(gdb) FAIL: gdb.python/py-finish-breakpoint2.exp: \
	  check FinishBreakpoint in catch()
	...

	Still, the test-case is failing because it's setup to match the behaviour that
	we get on x86_64-linux with target board unix/-m64:
	...
	(gdb) continue^M
	Continuing.^M
	Exception #10^M
	stopped at ExceptionFinishBreakpoint^M
	(gdb) PASS: gdb.python/py-finish-breakpoint2.exp: \
	  check FinishBreakpoint in catch()
	...

	So what happens here?  Again, due to the exception, the function call did not
	properly terminate, but the finish breakpoint still triggers.  This is somewhat
	unexpected.  This happens because it just so happens to be that the frame
	return address at which the breakpoint is set, is also the first instruction
	after the exception has been handled.  This is a know problem, filed as
	PR29909, so KFAIL it, and modify the test-case to expect the out_of_scope
	callback.

	Also add a breakpoint after setting the finish breakpoint but before throwing
	the exception, to check that we don't call the out_of_scope callback too early.

	Tested on x86_64-linux, with target boards unix/-m32.

	Co-Authored-By: Andrew Burgess <aburgess@redhat.com>
	PR python/27247
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=27247

2022-12-31  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/print-symbol-loading.exp on ubuntu 22.04.1
	On ubuntu 22.04.1 x86_64, I run into:
	...
	(gdb) PASS: gdb.base/print-symbol-loading.exp: shlib off: \
	  set print symbol-loading off
	sharedlibrary .*^M
	Symbols already loaded for /lib/x86_64-linux-gnu/libc.so.6^M
	Symbols already loaded for /lib/x86_64-linux-gnu/libpthread.so.0^M
	(gdb) FAIL: gdb.base/print-symbol-loading.exp: shlib off: load shared-lib
	...

	The test-case expects the libc.so line, but not the libpthread.so line.

	However, we have:
	...
	$ ldd /lib/x86_64-linux-gnu/libc.so.6
		linux-vdso.so.1 (0x00007ffd7f7e7000)
		libgtk3-nocsd.so.0 => /lib/x86_64-linux-gnu/libgtk3-nocsd.so.0 (0x00007f4468c00000)
		/lib64/ld-linux-x86-64.so.2 (0x00007f4469193000)
		libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4468f3e000)
		libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4468f39000)
	...
	so it's not unexpected that libpthread.so is loaded if libc.so is loaded.

	Fix this by accepting the libpthread.so line.

	Tested on x86_64-linux.

	PR testsuite/29919
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29919

2022-12-31  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Replace deprecated pthread_yield in gdb.threads/watchpoint-fork.exp
	On Ubuntu 22.04.1 x86_64, with glibc 2.35 I run into:
	...
	watchpoint-fork-mt.c: In function 'start':^M
	watchpoint-fork-mt.c:67:7: warning: 'pthread_yield' is deprecated: \
	  pthread_yield is deprecated, use sched_yield instead \
	  [-Wdeprecated-declarations]^M
	   67 |       i = pthread_yield ();^M
	      |       ^^M
	...

	Fix this as suggested, by using sched_yield instead.

	Tested on x86_64-linux.

2022-12-31  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/corefile.exp with glibc 2.35
	On Ubuntu 22.04.1 x86_64 (with glibc 2.35), I run into:
	...
	(gdb) PASS: gdb.base/corefile.exp: $_exitcode is void
	bt^M
	 #0  __pthread_kill_implementation (...) at ./nptl/pthread_kill.c:44^M
	 #1  __pthread_kill_internal (...) at ./nptl/pthread_kill.c:78^M
	 #2  __GI___pthread_kill (...) at ./nptl/pthread_kill.c:89^M
	 #3  0x00007f4985e1a476 in __GI_raise (...) at ../sysdeps/posix/raise.c:26^M
	 #4  0x00007f4985e007f3 in __GI_abort () at ./stdlib/abort.c:79^M
	 #5  0x0000556b4ea4b504 in func2 () at gdb.base/coremaker.c:153^M
	 #6  0x0000556b4ea4b516 in func1 () at gdb.base/coremaker.c:159^M
	 #7  0x0000556b4ea4b578 in main (...) at gdb.base/coremaker.c:171^M
	(gdb) PASS: gdb.base/corefile.exp: backtrace
	up^M
	 #1  __pthread_kill_internal (...) at ./nptl/pthread_kill.c:78^M
	 78      in ./nptl/pthread_kill.c^M
	(gdb) FAIL: gdb.base/corefile.exp: up
	...

	The problem is that the regexp used here:
	...
	gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(.*\\).*" "up"
	...
	does not fit the __pthread_kill_internal line which lacks the instruction
	address due to inlining.

	Fix this by making the regexp less strict.

	Tested on x86_64-linux.

2022-12-31  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-30  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.threads/dlopen-libpthread.exp for upstream glibc
	On ubuntu 22.04.1 x86_64, I run into:
	...
	(gdb) info probes all rtld rtld_map_complete^M
	No probes matched.^M
	(gdb) XFAIL: gdb.threads/dlopen-libpthread.exp: info probes all rtld rtld_map_complete
	UNTESTED: gdb.threads/dlopen-libpthread.exp: no matching probes
	...
	This has been filed as PR testsuite/17016.

	The problem is that the name rtld_map_complete is used, which was only
	available in Fedora 17, and upstream the name map_complete was used.

	In the email thread discussing a proposed patch (
	https://sourceware.org/legacy-ml/gdb-patches/2014-09/msg00712.html ) it was
	suggested to make the test-case handle both names.

	So, handle both names: map_complete and rtld_map_complete.

	This exposes the following FAIL:
	...
	(gdb) info sharedlibrary^M
	From To    Syms Read Shared Object Library^M
	$hex $hex  Yes       /lib64/ld-linux-x86-64.so.2^M
	$hex $hex  Yes (*)   /lib/x86_64-linux-gnu/libgtk3-nocsd.so.0^M
	$hex $hex  Yes       /lib/x86_64-linux-gnu/libc.so.6^M
	$hex $hex  Yes       /lib/x86_64-linux-gnu/libdl.so.2^M
	$hex $hex  Yes       /lib/x86_64-linux-gnu/libpthread.so.0^M
	(*): Shared library is missing debugging information.^M
	(gdb) FAIL: gdb.threads/dlopen-libpthread.exp: libpthread.so not found
	...
	due to using a glibc (v2.35) that has libpthread integrated into libc.

	Fix this by changing the FAIL into UNSUPPORTED.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=17016

2022-12-30  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.reverse/step-indirect-call-thunk.exp with -fcf-protection
	On Ubuntu 22.04.1 x86_64, I run into:
	...
	gdb.reverse/step-indirect-call-thunk.c: In function 'inc':^M
	gdb.reverse/step-indirect-call-thunk.c:22:1: error: '-mindirect-branch' and \
	  '-fcf-protection' are not compatible^M
	   22 | {                /* inc.1 */^M
	      | ^^M
	...

	Fix this by forcing -fcf-protection=none, if supported.

	Tested on x86_64-linux.

2022-12-30  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.cp/step-and-next-inline.exp with -fcf-protection
	On Ubuntu 22.04.1 x86_64, I run into:
	...
	(gdb) PASS: gdb.cp/step-and-next-inline.exp: no_header: not in inline 1
	next^M
	51        if (t != NULL^M
	(gdb) FAIL: gdb.cp/step-and-next-inline.exp: no_header: next step 1
	...

	This is due to -fcf-protection, which adds the endbr64 at the start of get_alias_set:
	...
	0000000000001180 <_Z13get_alias_setP4tree>:
	    1180:       f3 0f 1e fa             endbr64
	    1184:       48 85 ff                test   %rdi,%rdi
	...
	so the extra insn gets an is-stmt line number entry:
	...
	INDEX  LINE   ADDRESS            IS-STMT PROLOGUE-END
	  ...
	11     50     0x0000000000001180 Y
	12     50     0x0000000000001180
	13     51     0x0000000000001184 Y
	14     54     0x0000000000001184
	...
	and when stepping into get_alias_set we step to line 50:
	...
	(gdb) PASS: gdb.cp/step-and-next-inline.exp: no_header: in main
	step^M
	get_alias_set (t=t@entry=0x555555558018 <xx>) at step-and-next-inline.cc:50^M
	50      {^M
	...

	In contrast, with -fcf-protection=none, we get:
	...
	0000000000001170 <_Z13get_alias_setP4tree>:
	    1170:       48 85 ff                test   %rdi,%rdi
	...
	and:
	...
	INDEX  LINE   ADDRESS            IS-STMT PROLOGUE-END
	  ...
	11     50     0x0000000000001170 Y
	12     51     0x0000000000001170 Y
	13     54     0x0000000000001170
	...
	so when stepping into get_alias_set we step to line 51:
	...
	(gdb) PASS: gdb.cp/step-and-next-inline.exp: no_header: in main
	step^M
	get_alias_set (t=t@entry=0x555555558018 <xx>) at step-and-next-inline.cc:51^M
	51        if (t != NULL^M
	...

	Fix this by rewriting the gdb_test issuing the step command to check which
	line the step lands on, and issuing an extra next if needed.

	Tested on x86_64-linux, both with and without -fcf-protection=none.

	PR testsuite/29920
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29920

2022-12-30  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Make comp_unit_head.length private
	Make comp_unit_head.length private, to enforce using accessor functions.

	Replace accessor function get_length with get_length_with_initial and
	get_length_without_initial, to make it explicit which variant we're using.

	Tested on x86_64-linux.

	PR symtab/29343
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29343

2022-12-30  Alan Modra  <amodra@gmail.com>

	PR29948, heap-buffer-overflow in display_debug_lines_decoded
	This fixes a couple of places in display_debug_lines_decoded that were
	off by one in checking DWARF5 .debug_line directory indices.  It also
	displays the DWARF5 entry 0 for the program current directory rather
	than "." as is done for pre-DWARF5.  I decided against displaying
	DW_AT_comp_dir for pre-DWARF5 since I figure it is better for readelf
	to minimally interpret debug info.

	binutils/
		PR 29948
		* dwarf.c (display_debug_lines_decoded): Display the given
		directory entry 0 for DWARF5.  Properly check directory index
		against number of entries in the table.  Revert to using
		unsigned int for n_directories and associated variables.
		Correct warning messages.
	gas/
		* testsuite/gas/elf/dwarf-5-loc0.d: Update.

2022-12-30  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-29  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Simplify riscv_csr_address logic on state enable extensions
	This commit makes CSR class handling for 'Smstateen' and 'Ssstateen'
	extensions simpler using fall-throughs (as used in CSR_CLASS_I{,_32}).

	gas/ChangeLog:

		* config/tc-riscv.c (riscv_csr_address): Simplify the logic for
		'Smstateen' and 'Ssstateen' extensions.

2022-12-29  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-28  Tom Tromey  <tom@tromey.com>

	Use $decimal in timestamp.exp
	This patch fixes a review comment by Tom de Vries.  He pointed out
	that the new timestamp.exp should use the $decimal convenience regexp.

2022-12-28  Tom Tromey  <tom@tromey.com>

	Fix "set debug timestamp"
	PR cli/29945 points out that "set debug timestamp 1" stopped working
	-- this is a regression due to commit b8043d27 ("Remove a ui-related
	memory leak").

	This patch fixes the bug and adds a regression test.

	I think this should probably be backported to the gdb 13 branch.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29945

2022-12-28  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-27  H.J. Lu  <hjl.tools@gmail.com>

	x86-64: Allocate input section memory if needed
	When --no-keep-memory is used, the input section memory may not be cached.
	Allocate input section memory for -z pack-relative-relocs if needed.

	bfd/

		PR ld/29939
		* elfxx-x86.c (elf_x86_size_or_finish_relative_reloc): Allocate
		input section memory if needed.

	ld/

		PR ld/29939
		* testsuite/ld-elf/dt-relr-2i.d: New test.

2022-12-27  Christoph Müllner  <christoph.muellner@vrull.eu>

	RISC-V: Fix T-Head Fmv vendor extension encoding
	A recent change in the XTheadFmv spec fixed an encoding bug in the
	document. This patch changes the code to follow this bugfix.

	Spec patch can be found here:
	  https://github.com/T-head-Semi/thead-extension-spec/pull/11

2022-12-27  Tom Tromey  <tromey@adacore.com>

	Handle SIGSEGV in gdb selftests
	The gdb.gdb self-tests were timing out for me, which turned out to be
	PR testsuite/29325.  Looking into it, the problem is that the version
	of the Boehm GC that is used by Guile on my machine causes a SEGV
	during stack probing.  This unexpected stop confuses the tests and
	causes repeated timeouts.

	This patch adapts the two failing tests.  This makes them work for me,
	and reduces the running time of gdb.gdb from 20 minutes to about 11
	seconds.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29325

2022-12-27  Mike Frysinger  <vapier@gentoo.org>

	sim: build: clean up unused codegen logic
	Now that all igen ports are in the top-level makefile, we don't need
	this logic in any subdirs anymore, so clean it up.

	sim: mips: hoist "multi" igen rules up to common builds
	Since these are the last mips igen rules, we can clean up a number of
	bits in the local Makefile.in.

	sim: mips: hoist "m16" igen rules up to common builds

	sim: mips: hoist "single" igen rules up to common builds

	sim: mips: rename "igen" generation mode to "single"
	The naming in here has grown organically and is confusing to follow.
	Originally there was only one set of rules for generating code from
	the igen sources, so calling it "tmp-igen" and such made sense.  But
	when other multigen modes were added ("m16" & "multi") which also
	used igen, it's not clear what's common igen and what's specific to
	this generation  mode.  So rename the set of rules from "igen" to
	"single" so it's easier to follow.

	sim: mips: hoist itable igen rules up to common builds
	Since this rule is pretty simple, hoist it up to the common build.

2022-12-27  Mike Frysinger  <vapier@gentoo.org>

	sim: mips: unify itable generation (a bit)
	The m16 & multi targets generate itable once even when all the other
	modules are generated multiple times.  The default igen target will
	generate itable with everything else out of convenience.  This means
	flags are passed which don't affect the generated itable there.

	We can unify the itable generation by making sure the right -F/-M
	filter variables are passed down.  Since there's already a dedicated
	rule & variable in the multi build mode, generalize that and switch
	the m16 & igen builds over too.

	I spent a lot of time staring at this code, building for diff mips
	targets, and exploring all the shell code paths.  I think this is
	safe, but only time (and users) will really tell.

2022-12-27  Mike Frysinger  <vapier@gentoo.org>

	sim: mips: rename multi_flags to igen_itable_flags
	This variable is only used to generate the itable files.  In preparation
	for merging the itable logic among all ports, rename "multi_flags" to a
	more appropriate "igen_itable_flags" variable.  There should be no real
	chagnes here otherwise.

	sim: mips: drop unused micromips igen logic
	This code appears to be unused since it was first merged.  When
	micromips was enabled, it was via the "MULTI" config, not the
	"MICROMIPS" config, and the multi configs have sep vars.  Since
	nothing sets SIM_MIPS_GEN=MICROMIPS in the config, all of this
	should be unreachable, so punt it to simplify.  Further, the
	SIM_MIPS_MICROMIPS16_FLAGS & SIM_MIPS_MICROMIPS_FLAGS settings
	rely on sim_mips_micromips{,16}_{filter,machine} variables that
	are never set in the configure script.

2022-12-27  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-26  Tom Tromey  <tom@tromey.com>

	Add initializers to comp_unit_head
	PR symtab/29343 points out that it would be beneficial if
	comp_unit_head had a constructor and used initializers.  This patch
	implements this.  I'm unsure if this is sufficient to close the bug,
	but at least it's a step.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29343

2022-12-26  Alan Modra  <amodra@gmail.com>

	bfd/dwarf2.c: allow use of DWARF5 directory entry 0
	I think the test for table->files[file].dir being non-zero is wrong
	for DWARF5 where index zero is allowed and is the current directory of
	the compilation.  Most times this will be covered by the use of
	table->comp_dir (from DW_AT_comp_dir) in concat_filename but the point
	of putting the current dir in .debug_line was so the section could
	stand alone without .debug_info.

	Also, there is no need to check for table->dirs non-NULL, the
	table->num_dirs test is sufficient.

		* dwarf2.c (concat_filename): Correct and simplify tests of
		directory index.

2022-12-26  Flavio Cruz  <flaviocruz@gmail.com>

	Add support for x86_64-*-gnu-* targets to build x86_64 gnumach/hurd

2022-12-26  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-25  Mike Frysinger  <vapier@gentoo.org>

	sim: build: drop support for subdir distclean
	All ports that need to clean things up at distclean time have moved
	to the top-level build, so we can drop support for this hook.

	sim: mips: move distclean settings to common build
	This was missed when mips/configure was merged into the top-level.

2022-12-25  Indu Bhagat  <indu.bhagat@oracle.com>

	libsframe: write out SFrame FRE start address correctly
	The following test was failing on ppc64 and s390x:
	  "FAIL: encode-1: Encode buffer match"

	The offending stub was how we memcpy the FRE start address to the buffer
	(on-disk format).  When the host is big-endian, the address of the
	source buffer for the memcpy needs to point to the uint8_t/uint16_t sized
	value of the FRE start addr, not uint32_t sized value; we intend to copy
	out only the fre_start_addr_sz number of bytes.

	ChangeLog:

		* libsframe/sframe.c (sframe_encoder_write_fre_start_addr): New
		function.
		(sframe_encoder_write_fre): Use it instead of memcpy.

2022-12-25  Mike Frysinger  <vapier@gentoo.org>

	sim: smp: plumb igen flag down to all users
	While mips has respected sim_igen_smp at configure time (which was
	always empty since it defaulted smp to off), no other igen port did.
	Move this to a makefile variable and plumb it through the common
	IGEN_RUN variable instead so everyone gets it by default.  We also
	clean up some redundant -N0 setting with multirun mips.

	sim: smp: make option available again
	At some point we want this to work, but it's not easy to test if
	the configure option isn't available.  Restore it, but keep the
	default off.

	sim: cpu: change default init to handle all cpus
	All the runtimes were only initializing a single CPU.  When SMP is
	enabled, things quickly crash as none of the other CPU structs are
	setup.  Change the default from 0 to the compile time value.

	sim: msp430: add basic SMP cpu init
	There's no need to assert there's only 1 CPU when setting them all
	up here is trivial.

	sim: m32r: fix iterator typo when setting up cpus
	This code loops over available cpus with "c", but then looks up the
	cpu with "i".  Fix the typo so the code works correctly with smp.

	sim: v850: fix SMP compile
	The igen tool sets up the SD & CPU defines for code fragments to use,
	but v850 was expecting "sd".  Change all the igen related code to use
	SD so it actually compiles, and fix a few places to use "CPU" instead
	of hardcoding cpu0.

	sim: or1k: fix iterator typo when setting up cpus
	This code loops over available cpus with "c", but then looks up the
	cpu with "i".  Fix the typo so the code works correctly with smp.

	sim: mn10300: fix SMP compile
	The igen tool sets up the SD define for code fragments to use, but
	mn10300 was expecting "sd".  Change all the igen related code to use
	SD so it actually compiles.

	sim: cpu: fix SMP msg prefix helper
	This code fails to compile when SMP is enabled due to some obvious
	errors.  Fix those and change the logic to avoid CPP to prevent any
	future rot from creeping back in.

	sim: mips: clean up a bit after mips/configure removal
	Now that there is no subdir configure script, we can clean up some
	logic that was spread between the files.

	sim: mips: move igen settings to top-level configure
	This is the last bit of logic that exists in the mips configure
	script, so move it to the top-level configure to kill it off.
	We still have to move the Makefile.in igen logic to local.mk,
	but this is a required first step for that.

	sim: mips: namespace igen configure vars
	To prepare moving this logic to the top-level configure, the vars
	need to be namespaced.  Do that here to make it easier to review.
	Basically sim_xxx -> SIM_MIPS_XXX when a var is exported from the
	configure script to the Makefile, and sim_xxx -> sim_mips_xxx when
	the var is internal in the configure script.

	sim: mips: add igen recursive dep
	Make sure the igen tool exists before trying to compile the mips
	subdir.  This happens to work when mips has a subconfigure, but
	hits a race condition when that is removed.

	sim: mips: drop unused ENGINE_ISSUE_POSTFIX_HOOK
	Nothing defines this, and it isn't called in all the engine runtimes,
	so drop it entirely to avoid confusion.

	sim: igen: drop move-if-changed usage
	Now that igen itself has this logic, drop these custom build rules
	to greatly simplify.

	sim: igen: support in-place updates ourself
	Every file that igen outputs is then processed with the move-if-changed
	shell script.  This creates a lot of boilerplate in the build and not an
	insignificant amount of build-time overhead.  Move the simple "is the file
	changed" logic into igen itself.

	sim: igen: constify itable data structures
	These are const data arrays of strings and numbers.  We don't want
	or need them to be writable, so mark them all const.

2022-12-25  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-24  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: fix buffer overflow in gdb.base/signed-builtin-types.exp
	In commit:

	  commit 9f50fe0835850645bd8ea9bb1efe1fe6c48dfb12
	  Date:   Wed Dec 7 15:55:25 2022 +0000

	      gdb/testsuite: new test for recent dwarf reader issue

	A new test (gdb.base/signed-builtin-types.exp) was added that made use
	of 'info sources' to figure out if the debug information for a
	particular object file had been fully expanded or not.  Unfortunately
	some lines of the 'info sources' output can be very long, this was
	observed on some systems where the debug information for the
	dynamic-linker was installed, in this case, the list of source files
	associated with the dynamic linker was so long it would cause expect's
	internal buffer to overflow.

	This commit switches from using 'info sources' to 'maint print
	objfile', the output from the latter command is more compact, but
	also, can be restricted to a single named object file.

	With this change in place I am no longer seeing buffer overflow errors
	from expect when running gdb.base/signed-builtin-types.exp.

2022-12-24  Mike Frysinger  <vapier@gentoo.org>

	sim: or1k: move arch-specific settings to internal header
	There's no need for these settings to be in sim-main.h which is shared
	with common/ sim code, so move it all out to the existing or1k-sim.h.
	Unfortunately, we can't yet drop the or1k-sim.h include from sim-main.h
	as many of the generated CGEN files refer only to sim-main.h.  We'll
	have to improve the CGEN interface before we can make more progress,
	but this is at least a minor improvement.

2022-12-24  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-23  Tom Tromey  <tom@tromey.com>

	Use bool for dwarf2_has_info
	This changes dwarf2_has_info to return bool.

2022-12-23  Indu Bhagat  <indu.bhagat@oracle.com>

	libsframe: testsuite: fix memory leaks in testcases
	ChangeLog:

		* libsframe/testsuite/libsframe.decode/be-flipping.c: Free
		SFrame buffer.
		* libsframe/testsuite/libsframe.decode/frecnt-1.c: Likewise.
		* libsframe/testsuite/libsframe.decode/frecnt-2.c: Likewise.

2022-12-23  Indu Bhagat  <indu.bhagat@oracle.com>

	libsframe: fix a memory leak in sframe_decode
	sframe_decode () needs to malloc a temporary buffer of the same size as
	the input buffer (containing the SFrame section bytes) when endian
	flipping is needed.  The decoder keeps the endian flipped contents in
	this buffer for its usage.  This code is necessary when the target
	endianneess is not the same as host endianness.

	The malloc'd buffer needs to be kept track of, so that it can freed up in
	sframe_decoder_free () later.

	ChangeLog:

		* libsframe/sframe-impl.h (struct sframe_decoder_ctx): Add new
		member to keep track of the internally malloc'd buffer.
		* libsframe/sframe.c (sframe_decoder_free): Free it up.
		(sframe_decode): Update the reference to the buffer.

2022-12-23  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: remove MPFR detection in gdb.base/float128.exp
	I see this fail since commit 991180627851 ("Use toplevel configure for
	GMP and MPFR for gdb"):

	    FAIL: gdb.base/float128.exp: show configuration

	The test fails to find --with-mpfr or --without-mpfr in the "show
	configuration" output.  Since MPFR has become mandatory, we can just
	remove that check and simplify the test to assume MPFR support is there.

	Change-Id: I4f3458470db0029705b390dfefed3a66dfc0633a
	Approved-By: Tom de Vries <tdevries@suse.de>

2022-12-23  Mike Frysinger  <vapier@gentoo.org>

	sim: m32r: move arch-specific settings to internal header
	There's no need for these settings to be in sim-main.h which is shared
	with common/ sim code, so move it all out to the existing m32r-sim.h.
	Unfortunately, we can't yet drop the m32r-sim.h include from sim-main.h
	as many of the generated CGEN files refer only to sim-main.h.  We'll
	have to improve the CGEN interface before we can make more progress,
	but this is at least a minor improvement.

	sim: bfin: move arch-specific settings to internal header
	There's no need for these settings to be in sim-main.h which is shared
	with common/ sim code, so drop the bfin.h include and move the remaining
	bfin-specific settings into it.

	sim: m68hc11: move arch-specific settings to internal header
	There's no need for these settings to be in sim-main.h which is shared
	with common/ sim code, so move it all out to a new header which only
	this port will include.

	sim: sh: move arch-specific settings to internal header
	There's no need for these settings to be in sim-main.h which is shared
	with common/ sim code, so move it all out to a new header which only
	this port will include.

	sim: mcore: move arch-specific settings to internal header
	There's no need for these settings to be in sim-main.h which is shared
	with common/ sim code, so move it all out to a new header which only
	this port will include.

	sim: h8300: move arch-specific settings to internal header
	There's no need for these settings to be in sim-main.h which is shared
	with common/ sim code, so move it all out to a new header which only
	this port will include.

	sim: pru: move arch-specific settings to internal header
	There's no need for these settings to be in sim-main.h which is shared
	with common/ sim code, so drop the pru.h include and move the remaining
	pru-specific settings into it.

2022-12-23  Mike Frysinger  <vapier@gentoo.org>

	sim: mn10300: standardize the arch-specific settings a little
	Rename mn10300_sim.h to mn10300-sim.h to match other ports, and move most
	of the arch-specific content out of sim-main.h to it.  This isn't a big
	win though as we still have to include the header in sim-main.h due to the
	igen interface: it hardcodes including sim-main.h in its files.  So until
	we can fix that, we have to keep bleeding these settings into the common
	codes.

	Also take the opportunity to purge a lot of unused headers from these.
	The local modules should already include the right headers, so there's
	no need to force everyone to pull them in.  A lot of this is a hold over
	from the pre-igen days of this port.

2022-12-23  Mike Frysinger  <vapier@gentoo.org>

	sim: microblaze: move arch-specific settings to internal header
	There's no need for these settings to be in sim-main.h which is shared
	with common/ sim code, so move it all out to a new header which only
	this port will include.

	sim: example-synacor: move arch-specific settings to internal header
	There's no need for these settings to be in sim-main.h which is shared
	with common/ sim code, so move it all out to a new header which only
	this port will include.

	sim: moxie: move arch-specific settings to internal header
	There's no need for these settings to be in sim-main.h which is shared
	with common/ sim code, so move it all out to a new header which only
	this port will include.

2022-12-23  Mike Frysinger  <vapier@gentoo.org>

	sim: riscv: move arch-specific settings to internal header
	There's no need for these settings to be in sim-main.h which is shared
	with common/ sim code, so move it all out to a new header which only
	this port will include.

	We can also move the machs.h include out since the model logic was all
	generalized from compile-time to runtime last year.

2022-12-23  Mike Frysinger  <vapier@gentoo.org>

	sim: v850: standardize the arch-specific settings a little
	Rename v850_sim.h to v850-sim.h to match other ports, and move most
	of the arch-specific content out of sim-main.h to it.  This isn't a
	big win though as we still have to include the header in sim-main.h
	due to the igen interface: it hardcodes including sim-main.h in its
	files.  So until we can fix that, we have to keep bleeding these
	settings into the common codes.

2022-12-23  Mike Frysinger  <vapier@gentoo.org>

	sim: msp430: move arch-specific settings to internal header
	There's no need for these settings to be in sim-main.h which is shared
	with common/ sim code, so drop the msp430-sim.h include and move it to
	the few files that actually need it.

	While we're here, drop redundant includes from sim-main.h:
	* sim-config.h & sim-types.h included by sim-basics.h already
	* sim-engine.h included by sim-base.h already
	And move sim-options.h to the one file that needs it.

2022-12-23  Mike Frysinger  <vapier@gentoo.org>

	sim: ft32: move arch-specific settings to internal header
	There's no need for these settings to be in sim-main.h which is shared
	with common/ sim code, so drop the ft32-sim.h include and move it to
	the few files that actually need it.

2022-12-23  Mike Frysinger  <vapier@gentoo.org>

	sim: d10v: move arch-specific settings to internal header
	There's no need for these settings to be in sim-main.h which is shared
	with common/ sim code, so drop the d10v_sim.h include and move it to
	the few files that actually need it.

	Also rename the file to standardize it a bit better with other ports.

2022-12-23  Mike Frysinger  <vapier@gentoo.org>

	sim: cr16: move arch-specific settings to internal header
	There's no need for these settings to be in sim-main.h which is shared
	with common/ sim code, so drop the cr16_sim.h include and move it to
	the few files that actually need it.

	Also rename the file to standardize it a bit better with other ports.

2022-12-23  Mike Frysinger  <vapier@gentoo.org>

	sim: arm: move arch-specific settings to internal header
	There's no need for these settings to be in sim-main.h which is shared
	with common/ sim code, so move it all out to a new header which only
	this port will include.

	The BIT override would be better in the place where it's redefined, so
	move it to armdefs.h instead.

2022-12-23  Mike Frysinger  <vapier@gentoo.org>

	sim: aarch64: move arch-specific settings to internal header
	There's no need for these settings to be in sim-main.h which is shared
	with common/ sim code, so move it all out to a new header which only
	this port will include.

	While we're here, drop redundant includes from sim-main.h:
	* sim-types.h is included by sim-base.h already
	* sim-base.h is included twice
	* sim-io.h is included by sim-base.h already

2022-12-23  Mike Frysinger  <vapier@gentoo.org>

	sim: avr: move arch-specific settings to internal header
	There's no need for these settings to be in sim-main.h which is shared
	with common/ sim code, so move it all out to a new header which only
	this port will include.

2022-12-23  Nick Clifton  <nickc@redhat.com>

	Fix illegal memory access parsing corrupt DWARF information.
		PR 29936
		* dwarf2.c (concat_filename): Fix check for a directory index off
		the end of the directory table.

2022-12-23  Eli Zaretskii  <eliz@gnu.org>

	Fix MinGW build using mingw.org's MinGW
	This allows to build GDB even though the default value of
	_WIN32_WINNT is lower than the one needed to expose some
	new APIs used here, and leave the test for their actual
	support to run time.
	* gdb/nat/windows-nat.c (EXTENDED_STARTUPINFO_PRESENT): Define if
	not defined.
	(create_process_wrapper): Use 'gdb_lpproc_thread_attribute_list'
	instead of 'PPROC_THREAD_ATTRIBUTE_LIST' (which might not be defined
	at compile time).  This fixes compilation error using mingw.org's
	MinGW.

2022-12-23  Mark Harmstone  <mark@harmstone.com>

	ld: Write linker symbols in PDB

	ld: Copy other symbols into PDB file

	ld: Write globals stream in PDB

	ld: Parse LF_UDT_SRC_LINE records when creating PDB file

	ld: Write types into IPI stream of PDB

	ld: Write types into TPI stream of PDB

	ld: Write DEBUG_S_LINES entries in PDB file

	ld: Fix segfault in populate_publics_stream

	ld: Write DEBUG_S_FILECHKSMS entries in PDBs

	ld: Generate PDB string table

2022-12-23  Alan Modra  <amodra@gmail.com>

	pdb build fixes
	Enable compilation of ld/pdb.c just for x86, as is done for bfd/pdb.c.
	This reduces the size of ld and is necessary with the following
	patches that call a COFF-only bfd function from ld/pdb.c.  Without it
	we'd break every non-COFF target build.

2022-12-23  Mike Frysinger  <vapier@gentoo.org>

	sim: lm32/m32r: drop redundant opcode/cgen.h include
	The xxx-desc.h header file already includes this, and it's how the
	other cgen ports are getting it, so drop it from these two.

	sim: ppc: drop unused types from sim-main.h
	The common sim headers should define these for us already, so there's
	no need for the ppc header to set them up.

	sim: cgen: move symcat.h include to where it's used
	Move this out of the global sim-main.h and to the few files that
	actually use functions from it.  Only the cgen ports were pulling
	this, so this makes cgen & non-cgen behave more the same.

	sim: cgen: move cgen-types.h include to cgen-defs.h
	The cgen-types.h header sets up types that are needed by cgen-defs.h,
	so move the include out of sim-main.h and to that header.  It might
	be needed in other specific modules, but for now let's kick it out of
	sim-main.h to make some progress.  Things still build with just this.

2022-12-23  Mike Frysinger  <vapier@gentoo.org>

	Revert "sim: mn10300: drop unused sim-main.c"
	This reverts commit 681a422b855e4b20086554b170dae051361f00c7.

	I missed that this was included via common/sim-inline.c.  I thought
	I had grepped the top of the tree, but I must have only done mn10300.

	Add a comment to make it clear where/how this file is used.

2022-12-23  Mike Frysinger  <vapier@gentoo.org>

	sim: mn10300: drop unused sim-main.c
	Nothing compiles or references this, so punt it.

	sim: endian: move bfd.h from header to source
	The bfd APIs are used only by sim-n-endian.h which is only included by
	sim-endian.c, so move the bfd.h include there and out of sim-endian.h
	which is included by many other modules.

2022-12-23  Mike Frysinger  <vapier@gentoo.org>

	sim: move bfd.h include out of sim-main.h
	Not all arches include this in sim-main.h, and the ones that do don't
	actually use bfd defines in the sim-main.h header.  Prune it to make
	sim-main.h simpler so we can kill it off entirely in the future.

	We add the include to the files that utilize e.g. bfd_vma though.

2022-12-23  Mike Frysinger  <vapier@gentoo.org>

	sim: mcore: replace custom "word" type with int32_t
	This is a 32-bit architecture with 32-bit registers, so replace the
	custom "word" long int typedef with an explicit int32_t.  This is
	a correctness fix since long will be 64-bits on most 64-bit hosts.

	sim: moxie: replace custom "word" type with int32_t
	This is a 32-bit architecture with 32-bit registers, so replace the
	custom "word" int typedef with an explicit int32_t.  Practically
	speaking, this produces the same code, but it should hopefully make
	it easier to merge common code in the future.

	sim: cr16/d10v/mcore/moxie: clean up unused word & uword types
	Nothing actually uses these, so punt them.  Some of the ports are
	using local "word" types, but we'll clean those up in a follow up.

	sim: mips: trim redundant igen settings
	These variables are setting the same value as the defaults.  Trim
	this redundant logic to make it easier to see the real differences
	so we can try to keep unifying cases.

	sim: mips: merge mips64* with existing multi-run build
	Change the default (unhandled) mips64* targets to use the existing
	mips64 multi-run build.  It already handles the formats, we just
	have to list the mips8000 bfd for it.

	sim: mips: merge mips64vr5000 with existing multi-run build
	The existing mips64vr-* multi-run build already handles mips5000
	targets, so reuse that for mips64vr5* targets too.  This moves
	more logic from build-time to runtime so we can have a single
	binary that supports many targets.

2022-12-23  Nelson Chu  <nelson@rivosinc.com>

	RISC-V: Relax the order checking for the architecture string
	* riscv-toolchain-conventions,
	PR, https://github.com/riscv-non-isa/riscv-toolchain-conventions/pull/14
	Issue, https://github.com/riscv-non-isa/riscv-toolchain-conventions/issues/11

	* Refer to the commit afc41ffb,
	RISC-V: Reorder the prefixed extensions which are out of order.

	In the past we only allow to reorder the prefixed extensions.  But according
	to the PR 14 in the riscv-toolchain-convention, we can also relax the order
	checking to allow the whole extensions be written out of orders, including
	the single standard extensions and the prefixed multi-letter extensions.
	Just that we still need to follow the following rules as usual,

	1. prefixed extensions need to be seperated with `_'.
	2. prefixed extensions need complete <major>.<minor> version if set.

	Please see the details in the march-ok-reorder gas testcase.

	Passed the riscv-gnu-toolchain regressions.

	bfd/
	    * elfxx-riscv.c (enum riscv_prefix_ext_class): Changed RV_ISA_CLASS_UNKNOWN
	    to RV_ISA_CLASS_SINGLE, since everything that does not belong to the
	    multi-keyword will possible be a single extension for the current parser.
	    (parse_config): Likewise.
	    (riscv_get_prefix_class): Likewise.
	    (riscv_compare_subsets): Likewise.
	    (riscv_parse_std_ext): Removed, and merged with riscv_parse_prefixed_ext
	    into riscv_parse_extensions.
	    (riscv_parse_prefixed_ext): Likewise.
	    (riscv_parse_subset): Only need to call riscv_parse_extensions to parse
	    both single standard and prefixed extensions.
	gas/
	    * testsuite/gas/riscv/march-fail-order-std.d: Removed since the relaxed
	    order checking.
	    * testsuite/gas/riscv/march-fail-order-std.l: Likewise.
	    * testsuite/gas/riscv/march-fail-order-x-std.d: Likewise.
	    * testsuite/gas/riscv/march-fail-order-z-std.d: Likewise.
	    * testsuite/gas/riscv/march-fail-order-zx-std.l: Likewise.
	    * testsuite/gas/riscv/march-fail-unknown-std.l: Updated.
	    * testsuite/gas/riscv/march-ok-reorder.d: New testcase.

2022-12-23  Mike Frysinger  <vapier@gentoo.org>

	sim: drop unused SIM_ADDR type [PR sim/7504]
	Now that sim APIs either use 64-bit addresses all the time, or more
	appropriate target-specific types, drop this now-unused 32-bit-only
	address type.

	Bug: https://sourceware.org/PR7504

2022-12-23  Mike Frysinger  <vapier@gentoo.org>

	sim: mips: switch from SIM_ADDR to address_word
	The latter type matches the address size configured for this sim.

	Also take the opportunity to simplify printf logic by leveraging
	PRI* macros.

2022-12-23  Mike Frysinger  <vapier@gentoo.org>

	sim: v850: switch from SIM_ADDR to address_word
	The latter type matches the address size configured for this sim.

2022-12-23  Mike Frysinger  <vapier@gentoo.org>

	sim: switch sim_{read,write} APIs to 64-bit all the time [PR sim/7504]
	We've been using SIM_ADDR which has always been 32-bit.  This means
	the upper 32-bit address range in 64-bit sims is inaccessible.  Use
	64-bit addresses all the time since we want the APIs to be stable
	regardless of the active arch backend (which can be 32 or 64-bit).

	The length is also 64-bit because it's completely feasible to have
	a program that is larger than 4 GiB in size/image/runtime.  Forcing
	the caller to manually chunk those accesses up into 4 GiB at a time
	doesn't seem useful to anyone.

	Bug: https://sourceware.org/PR7504

2022-12-23  Mike Frysinger  <vapier@gentoo.org>

	sim: use bfd_vma when reading start addr from bfd info
	Since SIM_ADDR is always 32-bit, it might truncate the address with
	64-bit ELFs.  Since we load that addr from the bfd, use the bfd_vma
	type which matches the bfd_get_start_address API.

	sim: m32r: include sim-hw.h for sim_hw_parse

2022-12-23  Alan Modra  <amodra@gmail.com>

	COFF build-id writes uninitialised data to file
	1) The first write in write_build_id wrote rubbish past the struct
	external_IMAGE_DEBUG_DIRECTORY, which was later overwritten with
	correct data.  No user visible problem there, except that tools like
	valgrind complain.
	2) The size for the pdb name was incorrectly calculated.

		* emultempl/pe.em (write_build_id): Write the debug directory,
		not the entire section contents.
		(setup_build_id): Add size for the base name of pdb_name, not
		the full path.
		* emultempl/pep.em: Likewise.
		* testsuite/ld-pe/pdb2-section-contrib.d: Update.

2022-12-23  Mike Frysinger  <vapier@gentoo.org>

	sim: mips: merge mips64vr4300 with existing multi-run build
	The existing mips64vr-* multi-run build already handles mips4300
	targets, so reuse that for mips64vr43* targets too.  This moves
	more logic from build-time to runtime so we can have a single
	binary that supports many targets.

2022-12-23  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-22  Indu Bhagat  <indu.bhagat@oracle.com>

	sframe: doc: update documentation for pauth key in SFrame FDE
	ChangeLog:

		* libsframe/doc/sframe-spec.texi

2022-12-22  Indu Bhagat  <indu.bhagat@oracle.com>

	gas: sframe: testsuite: add testcase for .cfi_b_key_frame
	This is actually a composite test that checks SFrame unwind information
	generation for both the .cfi_negate_ra_state and .cfi_b_key_frame
	directives on aarch64.

	ChangeLog:

		* testsuite/gas/cfi-sframe/cfi-sframe-aarch64-pac-ab-key-1.d:
		New test.
		* testsuite/gas/cfi-sframe/cfi-sframe-aarch64-pac-ab-key-1.s:
		Likewise.
		* testsuite/gas/cfi-sframe/cfi-sframe.exp: Run new test.

2022-12-22  Indu Bhagat  <indu.bhagat@oracle.com>

	objdump/readelf: sframe: emit marker for SFrame FDE with B key
	ChangeLog:

		* libsframe/sframe-dump.c (is_sframe_abi_arch_aarch64): New
		definition.
		(dump_sframe_func_with_fres): Emit a string if B key is used.

2022-12-22  Indu Bhagat  <indu.bhagat@oracle.com>

	gas: sframe: add support for .cfi_b_key_frame
	Gather the information from the DWARF FDE on whether frame's return
	addresses are signed using the B key or A key.  Reflect the information in
	the SFrame counterpart data structure, the SFrame FDE.

	ChangeLog:

		* gas/gen-sframe.c (get_dw_fde_pauth_b_key_p): New definition.
		(sframe_v1_set_func_info): Add new argument for pauth_key.
		(sframe_set_func_info): Likewise.
		(output_sframe_funcdesc): Likewise.
		* gas/gen-sframe.h (struct sframe_version_ops): Add new argument
		to the function pointer declaration.
		* gas/sframe-opt.c (sframe_convert_frag): Handle pauth_key.

2022-12-22  Indu Bhagat  <indu.bhagat@oracle.com>

	sframe.h: add support for .cfi_b_key_frame
	ARM 8.3 provides five separate keys that can be used to authenticate
	pointers. There are two key for executable (instruction) pointers. The
	enum pointer_auth_key in gas/config/tc-aarch64.h currently holds two keys:
	  enum pointer_auth_key {
	    AARCH64_PAUTH_KEY_A,
	    AARCH64_PAUTH_KEY_B
	  };

	Analogous to the above, in SFrame format V1, a bit is reserved in the SFrame
	FDE to indicate which key is used for signing the frame's return addresses:
	  - SFRAME_AARCH64_PAUTH_KEY_A has a value of 0
	  - SFRAME_AARCH64_PAUTH_KEY_B has a value of 1

	Note that the information in this bit will always be used along with the
	mangled_ra_p bit, the latter indicates whether the return addresses are
	mangled/contain PAC auth bits.

	include/ChangeLog:

		* sframe.h (SFRAME_AARCH64_PAUTH_KEY_A): New definition.
		(SFRAME_AARCH64_PAUTH_KEY_B): Likewise.
		(SFRAME_V1_FUNC_INFO): Adjust to accommodate pauth_key.
		(SFRAME_V1_FUNC_PAUTH_KEY): New macro.
		(SFRAME_V1_FUNC_INFO_UPDATE_PAUTH_KEY): Likewise.

2022-12-22  Jan Beulich  <jbeulich@suse.com>

	gas: re-arrange listing output for .irp and alike
	It is kind of odd to have the expansions of such constructs ahead of
	their definition in listings with macro expansion enabled. Adjust this
	by pulling ahead the output of the definition lines, taking care to
	avoid producing a listing line for (non-existing) line 0 when the source
	is stdin.

	Note that with the code movement the conditional operator isn't
	necessary anymore - list->line now match up.

2022-12-22  Jan Beulich  <jbeulich@suse.com>

	x86: correct/improve TSX controls
	TSXLDTRK takes RTM as a prereq. Additionally introduce an umbrella "tsx"
	extension option covering both RTM and HLE, paralleling the "abm" one we
	already have.

2022-12-22  Jan Beulich  <jbeulich@suse.com>

	x86: add dependencies on SVME
	SEV-ES is an extension to SVME. SNP in turn is an extension to SEV-ES,
	and yet in turn RMPQUERY is a SNP extension.

	Note that cpu_arch[] has no SNP entry, so CPU_ANY_SNP_FLAGS remains
	unused (just like CPU_SNP_FLAGS already is).

2022-12-22  Jan Beulich  <jbeulich@suse.com>

	x86: add dependencies on VMX
	Both EPT and VMFUNC are extensions to VMX.

2022-12-22  Jan Beulich  <jbeulich@suse.com>

	x86: correct XSAVE* dependencies
	Like various other features AMX-TILE takes XSAVE as a prereq.

	XSAVES, unconditionally using compacted format, in turn effectively
	takes XSAVEC as a prereq (an SDM clarification to this effect is in the
	works).

2022-12-22  Jan Beulich  <jbeulich@suse.com>

	x86: correct dependencies of a few AVX512 sub-features
	Like AVX512-FP16, several other extensions require wider than 16-bit
	mask registers. As a result they take AVX512BW as a prereq, not (just)
	AVX512F. Which in turn points out wrong expectations in the noavx512-1
	testcase.

	x86: rework noavx512-1 testcase
	So far the set of ".noavx512*" has been accumulating, which isn't ideal.
	In particular this hides issues with dependencies between features.
	Switch back to the default ISA before disabling a particular subset.
	Furthermore limit redundancy by wrapping the repeated block of insns in
	an .irp.

	x86: add dependencies on AVX2
	Like AVX-VNNI both VAES and VPCLMUL take AVX2 as a prereq, for operating
	on up to 256-bit packed integer vectors.

	x86: correct SSE dependencies
	SSE itself takes FXSR as a prereq. Like AES, PCLMUL, and SHA both GFNI
	and KL take SSE2 as a prereq, for operating on packed integers. And
	while correcting KL also record it as a prereq to WIDEKL.

2022-12-22  Jan Beulich  <jbeulich@suse.com>

	x86: correct what gets disabled by certain ".arch .no*"
	Features with prereqs as well as features with dependents cannot re-use
	CPU_*_MASK for the 3rd argument of SUBARCH() - they need to use
	CPU_ANY_*_MASK in order to avoid disabling too many (when there are
	prereqs) and/or too few (when there are dependents) features.

	Generally any CPU_ANY_*_MASK which exist should not remain unused.
	Exceptions are
	- FISTTP which has no corresponding entry in cpu_arch[],
	- IAMCU which is a base architecture and hence uses ARCH(), not
	  SUBARCH() (only extensions can be disabled, but unlike for Cpu*86 it
	  would be a little more clumsy to suppress generating of the #define).

2022-12-22  Jan Beulich  <jbeulich@suse.com>

	x86: re-work ISA extension dependency handling
	Getting both forward and reverse ISA dependencies right / consistent has
	been a permanent source of mistakes. Reduce what needs specifying
	manually to just the direct forward dependencies. Transitive forward
	dependencies as well as reverse ones are now derived and hence cannot go
	out of sync anymore (at least in the vast majority of cases; there are a
	few special cases to still take care of manually). In the course of this
	several CPU_ANY_*_FLAGS disappear, requiring adjustment to the
	assembler's cpu_arch[].

	Note that to retain the correct reverse dependency of AVX512F wrt
	AVX512-VP2INTERSECT, the latter has the previously missing AVX512F
	prereq added.

	Note further that to avoid adding the following undue prereqs:
	* ATHLON, K8, and AMDFAM10 gain CMOV and FXSR,
	* IAMCU gains 387,
	auxiliary table entries (including a colon-separated modifier) are
	introduced in addition to the ones representing from converting the old
	table.

	To maintain forward-only dependencies between AVX (XOP) and SSE* (SSE4a)
	(i.e. "nosse" not disabling AVX), reverse dependency tracking is
	artifically suppressed.

	As a side effect disabling of SSE or SSE2 will now also disable AES,
	PCLMUL, and SHA (respective elements were missing from
	CPU_ANY_SSE2_FLAGS).

2022-12-22  Mike Frysinger  <vapier@gentoo.org>

	sim: mips: match target on cpu settings
	We don't need to enforce larger target settings when the only thing
	the sim should care about is the CPU target.  So reduce most of the
	target matches to only check the CPU.

	sim: mips: move fpu bitsize defines to top-level configure
	This drops support for the --enable-sim-float configure option,
	but it's not clear anyone ever actually used that.  Eventually
	we'll want this to be a runtime option anyways.

	sim: mips: move bitsize defines to top-level configure
	Since the msb value is always defined as the wordsize-1, stop
	hardcoding that value directly, and use a CPP value instead.

	sim: mips: move subtarget defines to top-level configure
	We want to kill off mips/configure entirely.  Move this small part
	out now to get started.

	sim: mips: always resolve active bfd mach dynamically
	Don't assume that the default bfd that we configured for is the one
	that is always active when running a program.  We already have access
	to the real runtime value, so use it directly.  This simplifies the
	code quite a bit, and will make it easier to support multiple mach's
	in a single binary.

	sim: hw-config.h: move generation to top-level
	In order to compile arch objects from the top-level, we need to
	generate the hw-config.h header, so move that logic up to the top
	level first.

	sim: build: hoist lists of hw devices up
	We need these in the top-level to generate libsim.a, but also in the
	subdirs to generate hw-config.h.  Move it to the local.mk, and pass
	it down when running recursive make.  This avoids duplication, and
	makes it available to both.  We can simplify this once we move the
	various steps up to the top-level too.

	sim: build: hoist lists of common objects up
	In order to create libsim.a in the common dir, we need the list of
	objects for each target.  To avoid duplicating the list with the
	recursive make in each port, pass it down as a variable.  This is
	a temporary hack until the top-level creates libsim.a for ports.

2022-12-22  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-21  Alan Modra  <amodra@gmail.com>

	PR29925, Memory leak in find_abstract_instance
	The testcase in the PR had a variable with both DW_AT_decl_file and
	DW_AT_specification, where the DW_AT_specification also specified
	DW_AT_decl_file.  This leads to a memory leak as the file name is
	malloced and duplicates are not expected.

	I've also changed find_abstract_instance to not use a temp for "name",
	because that can result in a change in behaviour from the usual last
	of duplicate attributes wins.

		PR 29925
		* dwarf2.c (find_abstract_instance): Delete "name" variable.
		Free *filename_ptr before assigning new file name.
		(scan_unit_for_symbols): Similarly free func->file and
		var->file before assigning.

2022-12-21  Andrew Pinski  <apinski@marvell.com>

	Fix compiling of top.c
	When I moved my last patch forward, somehow I missed removing
	the #endif for the HAVE_LIBMPFR case.

	Committed as obvious after a quick build.

	gdb/ChangeLog:
		* top.c: Remove the extra #endif which was missed.

2022-12-21  Andrew Pinski  <apinski@marvell.com>

	Use toplevel configure for GMP and MPFR for gdb
	This patch uses the toplevel configure parts for GMP/MPFR for
	gdb. The only thing is that gdb now requires MPFR for building.
	Before it was a recommended but not required library.
	Also this allows building of GMP and MPFR with the toplevel
	directory just like how it is done for GCC.
	We now error out in the toplevel configure of the version
	of GMP and MPFR that is wrong.

	OK after GDB 13 branches? Build gdb 3 ways:
	with GMP and MPFR in the toplevel (static library used at that point for both)
	With only MPFR in the toplevel (GMP distro library used and MPFR built from source)
	With neither GMP and MPFR in the toplevel (distro libraries used)

	Changes from v1:
	* Updated gdb/README and gdb/doc/gdb.texinfo.
	* Regenerated using unmodified autoconf-2.69

	Thanks,
	Andrew Pinski

	ChangeLog:
		* Makefile.def: Add configure-gdb dependencies
		on all-gmp and all-mpfr.
		* configure.ac: Split out MPC checking from MPFR.
		Require GMP and MPFR if the gdb directory exist.
		* Makefile.in: Regenerate.
		* configure: Regenerate.

	gdb/ChangeLog:

		PR bug/28500
		* configure.ac: Remove AC_LIB_HAVE_LINKFLAGS
		for gmp and mpfr.
		Use GMPLIBS and GMPINC which is provided by the
		toplevel configure.
		* Makefile.in (LIBGMP, LIBMPFR): Remove.
		(GMPLIBS, GMPINC): Add definition.
		(INTERNAL_CFLAGS_BASE): Add GMPINC.
		(CLIBS): Exchange LIBMPFR and LIBGMP
		for GMPLIBS.
		* target-float.c: Make the code conditional on
		HAVE_LIBMPFR unconditional.
		* top.c: Remove code checking HAVE_LIBMPFR.
		* configure: Regenerate.
		* config.in: Regenerate.
		* README: Update GMP/MPFR section of the config
		options.
		* doc/gdb.texinfo: Likewise.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28500

2022-12-21  Bruno Larsen  <blarsen@redhat.com>

	gdb/c++: validate 'using' directives based on the current line
	When asking GDB to print a variable from an imported namespace, we only
	want to see variables imported in lines that the inferior has already
	gone through, as is being tested last in gdb.cp/nsusing.exp. However
	with the proposed change to gdb.cp/nsusing.exp, we get the following
	failures:

	(gdb) PASS: gdb.cp/nsusing.exp: continue to breakpoint: marker10 stop
	print x
	$9 = 911
	(gdb) FAIL: gdb.cp/nsusing.exp: print x, before using statement
	next
	15        y += x;
	(gdb) PASS: gdb.cp/nsusing.exp: using namespace M
	print x
	$10 = 911
	(gdb) PASS: gdb.cp/nsusing.exp: print x, only using M

	Showing that the feature wasn't functioning properly, it just so
	happened that gcc ordered the namespaces in a convenient way.
	This happens because GDB doesn't take into account the line where the
	"using namespace" directive is written. So long as it shows up in the
	current scope, we assume it is valid.

	To fix this, add a new member to struct using_direct, that stores the
	line where the directive was written, and a new function that informs if
	the using directive is valid already.

	Unfortunately, due to a GCC bug, the failure still shows up. Compilers
	that set the declaration line of the using directive correctly (such as
	Clang) do not show such a bug, so the test includes an XFAIL for gcc
	code.

	Finally, because the final test of gdb.cp/nsusing.exp has turned into
	multiple that all would need XFAILs for older GCCs (<= 4.3), and that
	GCC is very old, if it is detected, the test just exits early.

	Approved-by: Tom Tromey <tom@tromey.com>

2022-12-21  Nick Clifton  <nickc@redhat.com>

	Updated Romanian translation for the BFD sub-directory.

	Fix an attempt to allocate an unreasonably large amount of memory when parsing a corrupt ELF file.
		PR  29924
		* objdump.c (load_specific_debug_section): Check for excessively
		large sections.

	Keep the .drectve section when performing a relocateable link.
		PR 29900
		* scripttempl/pe.sc: Keep the .drectve section when performing a
		relocateable link.
		* scripttempl/pep.sc: Likewise.

2022-12-21  Jan Beulich  <jbeulich@suse.com>

	x86: rename CheckRegSize to CheckOperandSize
	While originally indeed used for register size checking only, the
	attribute has been used for memory operand size checking as well already
	for quite a while, with more such uses recently having been added.

	gprofng/testsuite: restrict testing to native configurations
	The binaries involved in testing gprofng are native ones, and hence a
	cross build of binutils won't really test intended functionality. Since
	this testing takes quite a bit of time (typically more than running all
	of binutils, gas, and ld testsuites together), restrict the testing to
	native configurations only.

2022-12-21  Alan Modra  <amodra@gmail.com>

	enable-non-contiguous-regions warnings
	The warning about discarded sections in elf_link_input_bfd doesn't
	belong there since the code is dealing with symbols.  Multiple symbols
	in a discarded section will result in multiple identical warnings
	about the section.  Move the warning to a new function in ldlang.c.

	The patch also tidies the warning quoting of section and file names,
	consistently using `%pA' and `%pB'.  I'm no stickler for one style of
	section and file name quoting, but they ought to be consistent within
	a warning, eg. see the first one fixed in ldlang.c, and when a warning
	is emitted for multiple targets they all ought to use exactly the same
	format string to reduce translation work.  elf64-ppc.c loses the
	build_one_stub errors since we won't get there before hitting the
	fatal errors in size_one_stub.

	bfd/
		* elflink.c (elf_link_input_bfd): Don't warn here about
		discarded sections.
		* elf32-arm.c (arm_build_one_stub): Use consistent style in
		--enable-non-contiguous-regions error.
		* elf32-csky.c (csky_build_one_stub): Likewise.
		* elf32-hppa.c (hppa_build_one_stub): Likewise.
		* elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise.
		* elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise.
		* elf32-metag.c (metag_build_one_stub): Likewise.
		* elf32-nios2.c (nios2_build_one_stub): Likewise.
		* elfnn-aarch64.c (aarch64_build_one_stub): Likewise.
		* xcofflink.c (xcoff_build_one_stub): Likewise.
		* elf64-ppc.c (ppc_size_one_stub): Likewise.
		(ppc_build_one_stub): Delete dead code.
	ld/
		* ldlang.c (lang_add_section): Use consistent style in
		--enable-non-contiguous-regions warnings.
		(size_input_section): Likewise.
		(warn_non_contiguous_discards): New function.
		(lang_process): Call it.
		* testsuite/ld-arm/non-contiguous-arm.d: Update.
		* testsuite/ld-arm/non-contiguous-arm4.d: Update.
		* testsuite/ld-arm/non-contiguous-arm7.d: Add
		--enable-non-contiguous-regions-warnings.
		* testsuite/ld-arm/non-contiguous-arm7.err: New.
		* testsuite/ld-powerpc/non-contiguous-powerpc.d: Update.
		* testsuite/ld-powerpc/non-contiguous-powerpc64.d: Update.

2022-12-21  Alan Modra  <amodra@gmail.com>

	PR29922, SHT_NOBITS section avoids section size sanity check
		PR 29922
		* dwarf2.c (find_debug_info): Ignore sections without
		SEC_HAS_CONTENTS.

2022-12-21  Mike Frysinger  <vapier@gentoo.org>

	sim: fully merge sim_cpu_base into sim_cpu
	Now that all ports have migrated to the new framework, drop support
	for the old sim_cpu_base layout.  There's a lot of noise here, so
	it's been split into a dedicated commit.

	sim: enable common sim_cpu usage everywhere
	All ports should be migrated now.  Drop the SIM_HAVE_COMMON_SIM_CPU
	knob and require it be used everywhere now.

	sim: or1k: invert sim_cpu storage
	The cpu.h change is in generated cgen code, but that has been sent
	upstream too, so the next regen should include it automatically.

	sim: m32r: invert sim_cpu storage
	The cpu*.h changes are in generated cgen code, but that has been sent
	upstream too, so the next regen should include it automatically.

	sim: lm32: invert sim_cpu storage
	The cpu.h change is in generated cgen code, but that has been sent
	upstream too, so the next regen should include it automatically.

	sim: iq2000: invert sim_cpu storage
	The cpu.h change is in generated cgen code, but that has been sent
	upstream too, so the next regen should include it automatically.

	sim: frv: invert sim_cpu storage
	The cpu.h change is in generated cgen code, but that has been sent
	upstream too, so the next regen should include it automatically.

	sim: cris: invert sim_cpu storage
	The cpu*.h changes are in generated cgen code, but that has been sent
	upstream too, so the next regen should include it automatically.

	sim: bpf: invert sim_cpu storage
	The cpu.h change is in generated cgen code, but that has been sent
	upstream too, so the next regen should include it automatically.

	sim: cgen: prep for inverting sim_cpu storage
	Some common cgen code changes to allow cgen ports to invert their
	sim_cpu storage one-by-one.

	sim: riscv: invert sim_cpu storage

	sim: pru: invert sim_cpu storage

	sim: example-synacor: invert sim_cpu storage

	sim: h8300: invert sim_cpu storage

	sim: m68hc11: invert sim_cpu storage

	sim: mips: invert sim_cpu storage

	sim: v850: invert sim_cpu storage

	sim: mcore: invert sim_cpu storage

	sim: aarch64: invert sim_cpu storage

	sim: microblaze: invert sim_cpu storage

	sim: avr: invert sim_cpu storage

	sim: moxie: invert sim_cpu storage

	sim: msp430: invert sim_cpu storage

	sim: ft32: invert sim_cpu storage

	sim: bfin: invert sim_cpu storage

2022-12-21  Mike Frysinger  <vapier@gentoo.org>

	sim: sim_cpu: invert sim_cpu storage
	Currently all ports have to declare sim_cpu themselves in their
	sim-main.h and then embed the common sim_cpu_base in it.  This
	dynamic makes it impossible to share common object code among
	multiple ports because the core data structure is always different.

	Let's invert this relationship: common code declares sim_cpu, and
	the port uses the new arch_data field for its per-cpu state.

	This is the first in a series of changes: it adds a define to select
	between the old & new layouts, then converts all the ports that don't
	need custom state over to the new layout.  This includes mn10300 that,
	while it defines custom fields in its cpu struct, never uses them.

2022-12-21  Mike Frysinger  <vapier@gentoo.org>

	sim: move register headers into sim/ namespace [PR sim/29869]
	These headers define the register numbers for each port to implement
	the sim_fetch_register & sim_store_register interfaces.  While gdb
	uses these, the APIs are part of the sim, not gdb.  Move the headers
	out of the gdb/ include namespace and into sim/ instead.

	sim: ppc: drop old dgen.c generator
	The spreg.[ch] files live in the source tree now and are created
	with the dgen.py script, so we don't need this old tool anymore.

2022-12-21  Mike Frysinger  <vapier@gentoo.org>

	sim: ppc: move spreg.[ch] files to the source tree
	Simplify the build by moving the generation of these files from
	build-time (via dgen.c that we have to compile & execute on the
	build system) to maintainer/release mode (via spreg-gen.py that
	we only ever execute when the spreg table actually changes).  It
	speeds up the build process and makes it easier for us to reason
	about & review changes to the code generator.

	The tool is renamed from "dgen" because it's hardcoded to only
	generated spreg files.  It isn't a generalized tool for creating
	lookup tables.

2022-12-21  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-20  Hannes Domani  <ssbssa@yahoo.de>

	Fix install-strip target
	The libtool patch broke install-strip of gdb:

	/bin/sh ../../gdb/../mkinstalldirs /src/gdb/inst/share/gdb/python/gdb
	transformed_name=`t='s,y,y,'; \
	                  echo gdb | sed -e "$t"` ; \
	        if test "x$transformed_name" = x; then \
	          transformed_name=gdb ; \
	        else \
	          true ; \
	        fi ; \
	        /bin/sh ../../gdb/../mkinstalldirs /src/gdb/inst/bin ; \
	        /bin/sh ./libtool --mode=install STRIPPROG='strip' /bin/sh /src/gdb/gdb.git/install-sh -c -s \
	                gdb \
	                /src/gdb/inst/bin/$transformed_name ; \
	        /bin/sh ../../gdb/../mkinstalldirs /src/gdb/inst/include/gdb ; \
	        /usr/bin/install -c -m 644 jit-reader.h /src/gdb/inst/include/gdb/jit-reader.h
	libtool: install: `/src/gdb/inst/bin/gdb' is not a directory
	libtool: install: Try `libtool --help --mode=install' for more information.

	Since INSTALL_PROGRAM_ENV is no longer at the beginning of the command, the
	gdb executable is not installed with install-strip.

2022-12-20  Torbjörn SVENSSON  <torbjorn.svensson@foss.st.com>

	bfd: Discard symbol regardless of warning flag
	The discard of symbols should be performed whether the warning for
	the discard is enabled or not.
	Without this patch, ld would segfault in bfd_section_removed_from_list,
	called in the if-statement right after this block, as the argument
	isec->output_section can be NULL.

	Co-Authored-By: Yvan ROUX <yvan.roux@foss.st.com>

2022-12-20  Alan Modra  <amodra@gmail.com>

	PR29915, bfdio.c does not compile with mingw.org's MinGW
		PR 29915
		* configure.ac: Add AC_CHECK_DECLS test ___lc_codepage_func.
		* configure: Regenerate.
		* config.in: Regenerate.
		* bfdio.c (___lc_codepage_func): Move declaration to..
		(_bfd_real_fopen): ..here, and use !HAVE_DECL____LC_CODEPAGE_FUNC.

	Re: x86: remove i386-opc.c
	Regen opcodes/po/POTFILES.in

2022-12-20  Mike Frysinger  <vapier@gentoo.org>

	sim: ppc: change spreg switch table generation to compile-time
	Simplify the generator by always outputting the switch tables, and
	leave the choice of whether to use them to the compiler via a -D
	flag.

2022-12-20  Mike Frysinger  <vapier@gentoo.org>

	sim: dv-core: add hw_detach_address method [PR sim/25211]
	The core device has an attach address method as the root of the tree
	which calls out to the sim API.  But it doesn't have a corresponding
	detach method which means we just crash if anything tries to detach
	itself from the core.  In practice, the m68hc11 is the only model
	that actually tries to detach itself on the fly, so no one noticed
	earlier.

	With this in place, we can delete the existing detach code from the
	m68hc11 model since it defaults to "passthru" callback which will in
	turn call the dv-core detach, and they have the same behavior -- call
	the sim core API to detach from the address space.

	Bug: https://sourceware.org/PR25211

2022-12-20  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: PR29646 Various warnings
	gprofng/ChangeLog
	2022-12-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		PR gprofng/29646
		* common/core_pcbe.c: Fix missingReturn warning.
		* libcollector/iolib.c: Fix -Waddress warnings.
		* src/Settings.cc: Likewise.
		* src/checks.cc: Likewise.
		* libcollector/linetrace.c: Likewise.
		* libcollector/iotrace.c: Fix va_end_missing error.
		* libcollector/libcol_util.c: Fix uninitvar warning.
		* src/Command.cc: Fix arrayIndexOutOfBounds error.
		* src/Function.cc: Fix uninitStructMember warning.
		* src/ipc.cc: Fix -Wwrite-strings warnings.

2022-12-20  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-19  Tom Tromey  <tromey@adacore.com>

	Avoid compiler warning in dwarf-do-refresh
	The Emacs 28 compiler warns about dwarf-mode.el:

	Warning (comp): dwarf-mode.el:180:32: Warning: Unused lexical argument `ignore'

	This is easily fixed by prepending "_" to the parameter's name.

	binutils/ChangeLog
	2022-12-19  Tom Tromey  <tromey@adacore.com>

		* dwarf-mode.el (dwarf-do-refresh): Avoid compiler warning.

2022-12-19  Tom Tromey  <tom@tromey.com>

	Use bool in bpstat
	This changes bpstat to use 'bool' rather than 'char', and updates the
	uses.

	Use bool constants for value_print_options
	This changes the uses of value_print_options to use 'true' and 'false'
	rather than integers.

	Remove quick_symbol_functions::relocated
	quick_symbol_functions::relocated is only needed for psymtabs, and
	there it is only needed for Rust.  However, because we've switched the
	DWARF reader away from psymtabs, this means there's no longer a need
	for this method at all.

2022-12-19  Tom Tromey  <tom@tromey.com>

	Remove MI version 1
	MI version 1 is long since obsolete.  Several years ago, I filed
	PR mi/23170 for this.  I think it's finally time to remove this.
	Any users of MI 1 can and should upgrade to a newer version.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=23170

2022-12-19  Tom Tromey  <tom@tromey.com>

	Remove vestiges of MI version 0
	I found a few vestiges of MI version 0 in the test suite.  This patch
	removes them.

2022-12-19  Alan Modra  <amodra@gmail.com>

	Tidy PR29893 and PR29908 fix
		PR 29893
		PR 29908
		* dwarf.c (display_debug_addr): Combine dwarf5 unit_length checks.
		Delete dead code.

2022-12-19  Jan Vrany  <jan.vrany@labware.com>

	gdb: fix command lookup in execute_command ()
	Commit b5661ff2 ("gdb: fix possible use-after-free when
	executing commands") used lookup_cmd_exact () to lookup
	command again after its execution to avoid possible
	use-after-free error.

	However this change broke test gdb.base/define.exp which
	defines a post-hook for subcommand ("target testsuite").
	In this case,  lookup_cmd_exact () returned NULL because
	there's no command 'testsuite' in top-level commands.

	This commit fixes this case by looking up the command again
	using the original command line via lookup_cmd ().

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-12-19  Nick Clifton  <nickc@redhat.com>

	Fix potential illegal memory accesses when parsing corrupt DWARF data.
		PR 29914
		* dwarf.c (fetch_indexed_value): Fail if the section is not big
		enough to contain a header size field.
		(display_debug_addr): Fail if the computed address size is too big
		or too small.

	New Romainian translation for the GOLD subdirectory.

2022-12-19  Jan Beulich  <jbeulich@suse.com>

	gprofng/testsuite: skip Java test without JDK
	There's no point in even trying the Java test when gprofng was built
	without Java support, and when the building of the constituents of the
	testcase also would fail. On such systems this converts the respective
	tests from "unresolved" to "unsupported", making the overall testsuite
	run no longer report failure just because of this.

	gprofng/testsuite: eliminate bogus casts
	Casting pointers to unsigned int is generally problematic and hence
	compilers tend to warn about such. While here they're used only in
	fprintf(), it still seems better to omit such casts, even if only to
	avoid setting bad precedents.

	gprofng/testsuite: correct line continuation in endcases.c
	A backslash used to indicate line continuation (in a macro definition
	here) is not supposed to be followed by blanks or other white space; the
	end-of-line indicator is to follow immediately.

	gprofng/testsuite: correct names for signal handling tests
	The signal handling tests spend most of their time in the signal
	handlers, and hence for profile output to match anything in program
	output, the respective name fields need to hold the handler function
	names. This converts both respective tests from "unresolved" to actually
	succeeding.

	gprofng/testsuite: adjust linking of synprog
	In order for so_syn.so and so_syx.so to be able to access the main
	program's "testtime" variable, that variable needs exposing in the
	dynamic symbol table. Since this is a test program only, do it the brute
	force way and simply expose all global symbols.

	Arm: break gas dependency on libopcodes
	gas doesn't use anything from libopcodes (anymore?) - suppress linking
	in that library.

	x86: omit Cpu prefixes from opcode table
	These enumerators can be used in only one specific field, and hence the
	Cpu prefix isn't needed ther for disambiguation / name space separation.

2022-12-19  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-18  Alan Modra  <amodra@gmail.com>

	Comment bfd_get_section_limit_octets and bfd_get_section_alloc_size
		* bfd.c (bfd_get_section_limit_octets): Add comment.
		(bfd_get_section_alloc_size): Likewise.
		* libbfd.c (_bfd_generic_get_section_contents): Use
		bfd_get_section_limit_octets.
		* section.c (bfd_get_section_contents): Likewise.
		* bfd-in2.h: Regenerate.

2022-12-18  Alan Modra  <amodra@gmail.com>

	ld bootstrap test in build dir with path containing symlinks
	This allows the bootstrap test to run if you have a symlink somewhere
	in the build path directory.  $ld depends on $base_dir which is set
	via tcl [pwd], collapsing the symlink like /usr/bin/pwd, while $objdir
	contains the symlink.

		* testsuite/ld-bootstrap/bootstrap.exp: Normalize paths when
		checking for ld build directory.

2022-12-18  Joel Brobecker  <brobecker@adacore.com>

	Update gdb/NEWS after GDB 13 branch creation.
	This commit a new section for the next release branch, and renames
	the section of the current branch, now that it has been cut.

2022-12-18  Joel Brobecker  <brobecker@adacore.com>

	Bump version to 14.0.50.DATE-git.
	Now that the GDB 13 branch has been created,
	this commit bumps the version number in gdb/version.in to
	14.0.50.DATE-git

	For the record, the GDB 13 branch was created
	from commit 71c90666e601c511a5f495827ca9ba545e4cb463.

	Also, as a result of the version bump, the following changes
	have been made in gdb/testsuite:

		* gdb.base/default.exp: Change $_gdb_major to 14.

2022-12-18  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-17  Alan Modra  <amodra@gmail.com>

	bfd_get_relocated_section_contents allow NULL data buffer
	This patch removes the bfd_malloc in default_indirect_link_order and
	bfd_simple_get_relocated_section_contents, pushing the allocation down
	to bfd_get_relocated_section_contents.  The idea is to make use of the
	allocation done with sanity checking in bfd_get_full_section_contents,
	which is called by bfd_generic_get_relocated_section_contents.

	Doing this exposed a bug in bfd_get_full_section_contents.  With
	relaxation it is possible that an input section rawsize is different
	to the section size.  In that case we want to use the larger of
	rawsize (the on-disk size for input sections) and size.

		* reloc.c (bfd_generic_get_relocated_section_contents),
		* reloc16.c (bfd_coff_reloc16_get_relocated_section_contents),
		* coff-alpha.c (alpha_ecoff_get_relocated_section_contents),
		* coff-sh.c (sh_coff_get_relocated_section_contents),
		* elf-m10200.c (mn10200_elf_get_relocated_section_contents),
		* elf-m10300.c (mn10300_elf_get_relocated_section_contents),
		* elf32-avr.c (elf32_avr_get_relocated_section_contents),
		* elf32-cr16.c (elf32_cr16_get_relocated_section_contents),
		* elf32-crx.c (elf32_crx_get_relocated_section_contents),
		* elf32-h8300.c (elf32_h8_get_relocated_section_contents),
		* elf32-nds32.c (nds32_elf_get_relocated_section_contents),
		* elf32-sh.c (sh_elf_get_relocated_section_contents),
		* elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
		Handle NULL data buffer.
		* bfd.c (bfd_get_section_alloc_size): New function.
		* bfd-in2.h: Regenerate.
		* compress.c (bfd_get_full_section_contents): Correct section
		malloc size.
		* linker.c (default_indirect_link_order): Don't malloc memory
		here before calling bfd_get_relocated_section_contents.
		* simple.c (bfd_simple_get_relocated_section_contents): Likewise.

2022-12-17  Alan Modra  <amodra@gmail.com>

	asan: elf.c:12621:18: applying zero offset to null pointer
	That's this line in elf_parse_notes:
	  while (p < buf + size)

		* elf.c (_bfd_elf_make_section_from_shdr): Don't call
		elf_parse_notes when sh_size is zero.

2022-12-17  Alan Modra  <amodra@gmail.com>

	Re: The problem with warning in elf_object_p
	Commit 5aa0f10c424e added a per_xvec_warn array to provide support for
	warnings from elf_object_p (and a later patch for warnings from
	pe_bfd_object_p) to be cached and then only printed if the target
	matches.  It was quite limited in the style of message supported, only
	one message could be printed, and didn't really meet the stated aim of
	only warning when a target matches:  There are many other errors and
	warnings that can be emitted by functions called from elf_object_p.

	So this patch extends the error handler functions to support printing
	to a string buffer, extends per_xvec_warn to support multiple errors/
	warnings, and hooks this all into bfd_check_format_matches.  If
	bfd_check_format_matches succeeds then any errors/warnings are printed
	for the matching target.  If bfd_check_format_matches fails either due
	to no match or to multiple matches and only one target vector produced
	errors, then those errors are printed.

		* bfd.c (MAX_ARGS): Define, use throughout.
		(print_func): New typedef.
		(_bfd_doprnt): Add new print param.  Replace calls to fprintf
		with print.
		(PRINT_TYPE): Similarly.
		(error_handler_fprintf): Renamed from error_handler_internal.
		Use _bfd_get_error_program_name.  Add fprintf arg.  Move code
		setting up args..
		(_bfd_doprnt_scan): ..to here.  Add ap param.
		(struct buf_stream): New.
		(err_sprintf): New function.
		(error_handler_bfd): New static variable.
		(error_handler_sprintf): New function.
		(_bfd_set_error_handler_caching): New function.
		(_bfd_get_error_program_name): New function.
		* elfcode.h (elf_swap_shdr_in): Use _bfd_error_handler in
		warning messages.
		(elf_object_p): Likewise.
		* format.c (print_warnmsg): New function.
		(clear_warnmsg): Rewrite.
		(null_error_handler): New function.
		(bfd_check_format_matches): Ignore warnings from recursive calls
		checking first element of an archive.  Use caching error handler
		otherwise.  Print warnings on successful match, or when only one
		target has emitted warnings/errors.
		* peicode.h (pe_bfd_object_p): Use _bfd_error_handler in
		warning messages.
		* targets.c (per_xvec_warn): Change type of array elements.
		(struct per_xvec_message): New.
		(_bfd_per_xvec_warn): Rewrite.
		* Makefile.am (LIBBFD_H_FILES): Add bfd.c.
		* Makefile.in: Regenerate.
		* bfd-in2.h: Regenerate.
		* libbfd.h: Regenerate.

2022-12-17  Indu Bhagat  <indu.bhagat@oracle.com>

	sframe: doc: update spec for the mangled-RA bit in FRE
	ChangeLog:

		* libsframe/doc/sframe-spec.texi

2022-12-17  Indu Bhagat  <indu.bhagat@oracle.com>

	gas: sframe: testsuite: add testcase for .cfi_negate_ra_state
	Add a new test to check that .cfi_negate_ra_state on aarch64 is handled
	well (a non-empty SFrame section with valid SFrame FREs is generated).

	ChangeLog:

		* testsuite/gas/cfi-sframe/cfi-sframe-aarch64-2.d: New test.
		* testsuite/gas/cfi-sframe/cfi-sframe-aarch64-2.s: Likewise.
		* testsuite/gas/cfi-sframe/cfi-sframe.exp: Adjust the list
		accordingly.

2022-12-17  Indu Bhagat  <indu.bhagat@oracle.com>

	objdump/readelf: sframe: emit marker for FREs with mangled RA
	In the textual dump of the SFrame section, when an SFrame FRE recovers a
	mangled RA, use string "[s]" in the output to indicate that the return
	address is a signed (mangled) one.

	ChangeLog:

	        * libsframe/sframe-dump.c (dump_sframe_func_with_fres): Postfix
		with "[s]" if RA is signed with authorization code.

2022-12-17  Indu Bhagat  <indu.bhagat@oracle.com>

	libsframe: provide new access API for mangled RA bit
	include/ChangeLog:

		* sframe-api.h (sframe_fre_get_ra_mangled_p): New declaration.

	ChangeLog:

		* libsframe/sframe.c (sframe_get_fre_ra_mangled_p): New
		definition.
		(sframe_fre_get_ra_mangled_p): New static function.

2022-12-17  Indu Bhagat  <indu.bhagat@oracle.com>

	gas: sframe: add support for .cfi_negate_ra_state
	DW_CFA_AARCH64_negate_ra_state in aarch64 is multiplexed with
	DW_CFA_GNU_window_save in the DWARF format.

	Remove the common-empty-4 testcase because the generated SFrame section
	will not be be empty anymore.  A relevant test will be added in a later
	commit.

	ChangeLog:

		* gas/gen-sframe.c (sframe_v1_set_fre_info): Add new argument
		for mangled_ra_p.
		(sframe_set_fre_info): Likewise.
		(output_sframe_row_entry): Handle mangled_ra_p.
		(sframe_row_entry_new): Reset mangled_ra_p.
		(sframe_row_entry_initialize): Initialize mangled_ra_p.
		(sframe_xlate_do_gnu_window_save): New definition.
		(sframe_do_cfi_insn): Handle DW_CFA_GNU_window_save.
		* gas/gen-sframe.h (struct sframe_row_entry): New member.
		(struct sframe_version_ops): Add a new argument for
		mangled_ra_p.
		* gas/testsuite/gas/cfi-sframe/cfi-sframe.exp: Remove test.
		* gas/testsuite/gas/cfi-sframe/common-empty-4.d: Removed.
		* gas/testsuite/gas/cfi-sframe/common-empty-4.s: Removed.

2022-12-17  Indu Bhagat  <indu.bhagat@oracle.com>

	sframe.h: add support for .cfi_negate_ra_state
	Use the last remaining bit in the 'SFrame FRE info' word to store whether
	the RA is signed/unsigned with PAC authorization code: this bit is named
	as the "mangled RA" bit.  This bit is still unused for x86-64.

	The behaviour of the mangled-RA info bit in SFrame format closely
	follows the behaviour of DW_CFA_AARCH64_negate_ra_state in DWARF.  During
	unwinding, whenever an SFrame FRE with non-zero "mangled RA" bit is
	encountered, it means the upper bits of the return address contain Pointer
	Authentication code.  The unwinder, hence, must use appropriate means to
	restore LR correctly in such cases.

	include/ChangeLog:

		* sframe.h (SFRAME_V1_FRE_INFO_UPDATE_MANGLED_RA_P): New macro.
		(SFRAME_V1_FRE_MANGLED_RA_P): Likewise.

2022-12-17  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-16  Pedro Alves  <pedro@palves.net>

	Delay checking whether /proc/pid/mem is writable (PR gdb/29907)
	As of 1bcb0708f229 ("gdb/linux-nat: Check whether /proc/pid/mem is
	writable"), GDB checks if /proc/pid/mem is writable.  This is done
	early at GDB startup, in order to get a consistent warning, instead of
	a warning that depends on whenever GDB writes to inferior memory.

	PR gdb/29907 points out that some build systems (like QEMU's,
	apparently) may call 'gdb --version' to check GDB's presence & its
	version on the system, and that Gentoo's build process has sandboxing
	which blocks the /proc/pid/mem access and thus GDB warns, which
	results in build fails.

	To help with that, this patch delays the /proc/pid/mem check until we
	start or attach to an inferior.  Ends up potentially emiting a warning
	close where we already emit other ptrace- and /proc- related warnings,
	which just Feels Right.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29907
	Change-Id: I5537653ecfbbe76a04ab035e40e59d09b4980763

2022-12-16  Nick Clifton  <nickc@redhat.com>

	Fix previous delta to allow for compilation on 32-bit systems

2022-12-16  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix race in gdb.threads/detach-step-over.exp
	Once in a while I run into:
	...
	FAIL: gdb.threads/detach-step-over.exp: \
	  breakpoint-condition-evaluation=host: target-non-stop=off: non-stop=off: \
	  displaced=off: iter 1: all threads running
	...

	In can easily reproduce this by doing:
	...
	     # Wait a bit, to give time for the threads to hit the
	     # breakpoint.
	-    sleep 1

	     return true
	...

	Fix this by counting the running threads in a loop, effectively allowing 10
	seconds (instead of 1) for the threads to start running, but only sleeping if
	needed.

	Reduces total execution time from 1m27s to 56s.

	Tested on x86_64-linux.

2022-12-16  Andrew Burgess  <aburgess@redhat.com>

	gdb: fix crash when getting the value of a label symbol
	When the source program contains a goto label, it turns out it's
	actually pretty hard for a user to find out more about that label.
	For example:

	  (gdb) p some_label
	  No symbol "some_label" in current context.
	  (gdb) disassemble some_label
	  No symbol "some_label" in current context.
	  (gdb) x/10i some_label
	  No symbol "some_label" in current context.
	  (gdb) break some_label
	  Breakpoint 2 at 0x401135: file /tmp/py-label-symbol-value.c, line 35.

	In all cases, some_label is a goto label within the current frame.
	Only placing a breakpoint on the label worked.

	This all seems a little strange to me, it feels like asking about a
	goto label would not be an unreasonable thing for a user to do.

	This commit doesn't fix any of the above issues, I mention them just
	to provide a little context for why the following issue has probably
	not been seen before.

	It turns out there is one way a user can access the symbol for a goto
	label, through the Python API:

	  python frame = gdb.selected_frame()
	  python frame_pc = frame.pc()
	  python block = gdb.current_progspace().block_for_pc(frame_pc)
	  python symbol,_ = gdb.lookup_symbol('some_label', block, gdb.SYMBOL_LABEL_DOMAIN)
	  python print(str(symbol.value()))
	  ../../src/gdb/findvar.c:204: internal-error: store_typed_address: Assertion `type->is_pointer_or_reference ()' failed.

	The problem is that label symbols are created using the
	builtin_core_addr type, which is a pure integer type.

	When GDB tries to fetch the value of a label symbol then we end up in
	findvar.c, in the function language_defn::read_var_value, in the
	LOC_LABEL case.  From here store_typed_address is called to store the
	address of the label into a value object with builtin_core_addr type.

	The problem is that store_typed_address requires that the destination
	type be a pointer or reference, which the builtin_core_addr type is
	not.

	Now it's not clear what type a goto label address should have, but
	GCC has an extension that allows users to take the address of a goto
	label (using &&), in that case the result is of type 'void *'.

	I propose that when we convert the CORE_ADDR value to a GDB value
	object, we use builtin_func_ptr type instead of builtin_core_addr,
	this means the result will be of type 'void (*) ()'.  The benefit of
	this approach is that when gdbarch_address_to_pointer is called the
	target type will be correctly identified as a pointer to code, which
	should mean any architecture specific adjustments are done correctly.

	We can then cast the new value to 'void *' type with a call to
	value_cast_pointer, this should not change the values bit
	representation, but will just update the type.

	After this asking for the value of a label symbol works just fine:

	  (gdb) python print(str(symbol.value()))
	  0x401135 <main+35>

	And the type is maybe what we'd expect:

	  (gdb) python print(str(symbol.value().type))
	  void *

2022-12-16  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: convert linux-osdata.c from buffer to std::string
	Replace the use of struct buffer in linux-osdata.c with std::string.
	There is no change in the logic, so there should be no user-visible
	change.

	Change-Id: I27f53165d401650bbd0bebe8ed88221e25545b3f
	Approved-By: Pedro Alves <pedro@palves.net>

2022-12-16  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbsupport: add string_xml_appendf
	Add a version of buffer_xml_printf (defined in gdbsupport/buffer.{c,h})
	that appends to an std::string, rather than a struct buffer.  Call it
	"string" rather than "buffer" since it operates on an std::string rather
	than a buffer.  And call it "appendf" rather than "printf", since it
	appends to and does not replace the string's content.  This mirrors
	string_appendf.

	Place the new version in gdbsupport/xml-utils.h.

	The code is a direct copy of buffer_xml_printf.  The old version is
	going to disappear at some point, which is why I didn't do any effort to
	share code.

	Change-Id: I30e030627ab4970fd0b9eba3b7e8cec78fa561ba
	Approved-By: Pedro Alves <pedro@palves.net>

2022-12-16  Andrew Burgess  <aburgess@redhat.com>

	gdb: clean up some inefficient std::string usage
	This commit:

	  commit 53cf95c3389a3ecd97276d322e4a60fe3396a201
	  Date:   Wed Dec 14 14:17:44 2022 +0000

	      gdb: make more use of make_target_connection_string

	Introduced a couple of inefficient uses of std::string, both of which
	are fixed in this commit.

	There should be no user visible changes after this commit.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-12-16  Nick Clifton  <nickc@redhat.com>

	Fix a potential illegal memory access when parsing corrupt DWARF information.
		PR 29908
		* dwarf.c (display_debug_addr): Check for corrupt header lengths.

2022-12-16  Jan Vrany  <jan.vrany@labware.com>

	gdb/testsuite: add test for Python commands redefining itself
	This commit adds a test that creates a Python command that redefines
	itself during its execution. This is to test use-after-free in
	execute_command ().

	This test needs run with ASan enabled in order to fail when it
	should.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-12-16  Luis Machado  <luis.machado@arm.com>

	[aarch64] Fix removal of non-address bits for PAuth
	PR gdb/28947

	The address_significant gdbarch setting was introduced as a way to remove
	non-address bits from pointers, and it is specified by a constant.  This
	constant represents the number of address bits in a pointer.

	Right now AArch64 is the only architecture that uses it, and 56 was a
	correct option so far.

	But if we are using Pointer Authentication (PAuth), we might use up to 2 bytes
	from the address space to store the required information.  We could also have
	cases where we're using both PAuth and MTE.

	We could adjust the constant to 48 to cover those cases, but this doesn't
	cover the case where GDB needs to sign-extend kernel addresses after removal
	of the non-address bits.

	This has worked so far because bit 55 is used to select between kernel-space
	and user-space addresses.  But trying to clear a range of bits crossing the
	bit 55 boundary requires the hook to be smarter.

	The following patch renames the gdbarch hook from significant_addr_bit to
	remove_non_address_bits and passes a pointer as opposed to the number of
	bits.  The hook is now responsible for removing the required non-address bits
	and sign-extending the address if needed.

	While at it, make GDB and GDBServer share some more code for aarch64 and add a
	new arch-specific testcase gdb.arch/aarch64-non-address-bits.exp.

	Bug-url: https://sourceware.org/bugzilla/show_bug.cgi?id=28947

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-12-16  Jan Beulich  <jbeulich@suse.com>

	gas: restore Dwarf info generation after macro diagnostic adjustments
	While 6fdb723799e2 ("gas: re-work line number tracking for macros and
	their expansions") was meant to leave generated Dwarf as is, it really
	didn't (and the testcase intended to catch that wasn't covering the case
	which broke). Its adjustment to buffer_and_nest() didn't go far enough,
	leading to the "linefile" directive inserted at the top to also be
	processed later in the PR gas/16908 workaround (which clearly isn't
	intended - it's being put there for processing during macro expansion
	only). That unnoticed flaw in turn led me to work around it by a
	(suspicious to me already at the time) conditional in as_where().

	x86: change representation of extension opcode
	Having a "None" field in the vast majority of entries is needlessly
	cluttering the overall table. Instead of this being a separate field,
	use a representation matching that of Intel SDM and AMD PM for the main
	use of the field: Append the value after a / as the separator.

2022-12-16  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbsupport: change xml_escape_text_append's parameter from pointer to reference
	The passed in string can't be nullptr, it makes more sense to pass in a
	reference.

	Change-Id: Idc8bd38abe1d6d9b44aa227d7856956848c233b3

2022-12-16  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove static buffer in command_line_input
	[I sent this earlier today, but I don't see it in the archives.
	Resending it through a different computer / SMTP.]

	The use of the static buffer in command_line_input is becoming
	problematic, as explained here [1].  In short, with this patch [2] that
	attempt to fix a post-hook bug, when running gdb.base/commands.exp, we
	hit a case where we read a "define" command line from a script file
	using command_command_line_input.  The command line is stored in
	command_line_input's static buffer.  Inside the define command's
	execution, we read the lines inside the define using command_line_input,
	which overwrites the define command, in command_line_input's static
	buffer.  After the execution of the define command, execute_command does
	a command look up to see if a post-hook is registered.  For that, it
	uses a now stale pointer that used to point to the define command, in
	the static buffer, causing a use-after-free.  Note that the pointer in
	execute_command points to the dynamically-allocated buffer help by the
	static buffer in command_line_input, not to the static object itself,
	hence why we see a use-after-free.

	Fix that by removing the static buffer.  I initially changed
	command_line_input and other related functions to return an std::string,
	which is the obvious but naive solution.  The thing is that some callees
	don't need to return an allocated string, so this this an unnecessary
	pessimization.  I changed it to passing in a reference to an std::string
	buffer, which the callee can use if it needs to return
	dynamically-allocated content.  It fills the buffer and returns a
	pointers to the C string inside.  The callees that don't need to return
	dynamically-allocated content simply don't use it.

	So, it started with modifying command_line_input as described above, all
	the other changes derive directly from that.

	One slightly shady thing is in handle_line_of_input, where we now pass a
	pointer to an std::string's internal buffer to readline's history_value
	function, which takes a `char *`.  I'm pretty sure that this function
	does not modify the input string, because I was able to change it (with
	enough massaging) to take a `const char *`.

	A subtle change is that we now clear a UI's line buffer using a
	SCOPE_EXIT in command_line_handler, after executing the command.
	This was previously done by this line in handle_line_of_input:

	  /* We have a complete command line now.  Prepare for the next
	     command, but leave ownership of memory to the buffer .  */
	  cmd_line_buffer->used_size = 0;

	I think the new way is clearer.

	[1] https://inbox.sourceware.org/gdb-patches/becb8438-81ef-8ad8-cc42-fcbfaea8cddd@simark.ca/
	[2] https://inbox.sourceware.org/gdb-patches/20221213112241.621889-1-jan.vrany@labware.com/

	Change-Id: I8fc89b1c69870c7fc7ad9c1705724bd493596300
	Reviewed-By: Tom Tromey <tom@tromey.com>

2022-12-16  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-15  Indu Bhagat  <indu.bhagat@oracle.com>

	libsframe asan: avoid generating misaligned loads
	There are two places where unaligned loads were seen on aarch64:
	  - #1. access to the SFrame FRE stack offsets in the in-memory
	    representation/abstraction provided by libsframe.
	  - #2. access to the SFrame FRE start address in the on-disk representation
	    of the frame row entry.

	For #1, we can fix this by reordering the struct members of
	sframe_frame_row_entry in libsframe/sframe-api.h.

	For #2, we need to default to using memcpy instead, and copy out the bytes
	to a location for output.

	SFrame format is an unaligned on-disk format. As such, there are other blobs
	of memory in the on-disk SFrame FRE that are on not on their natural
	boundaries.  But that does not pose further problems yet, because the users
	are provided access to the on-disk SFrame FRE data via libsframe's
	sframe_frame_row_entry, the latter has its' struct members aligned on their
	respective natural boundaries (and initialized using memcpy).

	PR 29856 libsframe asan: load misaligned at sframe.c:516

	ChangeLog:

		PR libsframe/29856
		* bfd/elf64-x86-64.c: Adjust as the struct members have been
		reordered.
		* libsframe/sframe.c (sframe_decode_fre_start_address): Use
		memcpy to perform 16-bit/32-bit reads.
		* libsframe/testsuite/libsframe.encode/encode-1.c: Adjust as the
		struct members have been reordered.

	include/ChangeLog:

		PR libsframe/29856
		* sframe-api.h: Reorder fre_offsets for natural alignment.

2022-12-15  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: don't delete command files in gdb.base/commands.exp
	Don't delete the runtime-generated command files.  This makes it easier
	to reproduce tests by hand.

	Change-Id: I4e53484eea216512f1c5d7dfcb5c464b36950946
	Approved-By: Tom Tromey <tom@tromey.com>

2022-12-15  Tom Tromey  <tromey@adacore.com>

	Move streq and compare_cstrings to gdbsupport
	It seems to me that streq and compare_cstrings belong near the other
	string utility functions in common-utils.h; and furthermore that streq
	ought to be inlined.  This patch makes this change.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-12-15  Tom Tromey  <tromey@adacore.com>

	Remove subset_compare
	I stumbled across subset_compare today, and after looking at the
	callers I realized it could be removed and replaced with calls to
	startswith.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-12-15  Andrew Burgess  <aburgess@redhat.com>

	gdb: use gdb_assert not internal_error
	Spotted a couple of places in findvar.c where we use:

	  if ( ! CONDITION )
	    internal_error ("...");

	this commit changes these to be:

	  gdb_assert ( CONDITION );

	which I think is better.

	Unless we happen to hit the internal_error calls (which was bad) there
	should be no user visible changes after this commit.

2022-12-15  Andrew Burgess  <aburgess@redhat.com>

	gdb: some int to bool conversion in remote-sim.c
	Some obvious int to bool conversion in remote-sim.c, there should be
	no user visible changes after this commit.

2022-12-15  Andrew Burgess  <aburgess@redhat.com>

	gdb: make more use of make_target_connection_string
	I noticed that we have a function make_target_connection_string which
	wraps all the logic for creating a string that describes a target
	connection - but in some places we are not calling this function,
	instead we duplicate the function's logic.

	This commit cleans this up, and calls make_target_connection_string
	where possible.

	There should be no user visible changes after this commit.

2022-12-15  Andrew Burgess  <aburgess@redhat.com>

	gdb: int to bool conversion in tracefile.c
	Some obvious int to bool conversion in tracefile.c.

	Should be no user visible changes after this commit.

2022-12-15  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/condbreak-multi-context.exp with gcc 4.8.5
	With gcc 4.8.5, I run into:
	...
	Running gdb.base/condbreak-multi-context.exp ...
	gdb compile failed, condbreak-multi-context.cc:21:11: warning: non-static \
	  data member initializers only available with -std=c++11 or -std=gnu++11 \
	  [enabled by default]
	   int b = 20;
	           ^
	...

	Fix this by making it a static const.

	Tested on x86_64-linux, with gcc 4.8.5, 7.5.0 and clang 13.0.1.

2022-12-15  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-14  Andrew Burgess  <aburgess@redhat.com>

	gdb/maint: add core file name to 'maint info program-spaces' output
	Each program space can have an associated core file.  Include this
	information in the output of 'maint info program-spaces'.

2022-12-14  Andrew Burgess  <aburgess@redhat.com>

	gdb: ensure all targets are popped before an inferior is destructed
	Now that the inferiors target_stack automatically manages target
	reference counts, we might think that we don't need to unpush targets
	when an inferior is deleted...

	...unfortunately that is not the case.  The inferior::unpush function
	can do some work depending on the type of target, so it is important
	that we still pass through this function.

	To ensure that this is the case, in this commit I've added an assert
	to inferior::~inferior that ensures the inferior's target_stack is
	empty (except for the ever present dummy_target).

	I've then added a pop_all_targets call to delete_inferior, otherwise
	the new assert will fire in, e.g. the gdb.python/py-inferior.exp test.

2022-12-14  Andrew Burgess  <aburgess@redhat.com>

	gdb: remove the pop_all_targets (and friends) global functions
	This commit removes the global functions pop_all_targets,
	pop_all_targets_above, and pop_all_targets_at_and_above, and makes
	them methods on the inferior class.

	As the pop_all_targets functions will unpush each target, which
	decrements the targets reference count, it is possible that the target
	might be closed.

	Right now, closing a target, in some cases, depends on the current
	inferior being set correctly, that is, to the inferior from which the
	target was popped.

	To facilitate this I have used switch_to_inferior_no_thread within the
	new methods.  Previously it was the responsibility of the caller to
	ensure that the correct inferior was selected.

	In a couple of places (event-top.c and top.c) I have been able to
	remove a previous switch_to_inferior_no_thread call.

	In remote_unpush_target (remote.c) I have left the
	switch_to_inferior_no_thread call as it is required for the
	generic_mourn_inferior call.

2022-12-14  Andrew Burgess  <aburgess@redhat.com>

	gdb: remove decref_target
	The decref_target function is not really needed.  Calling
	target_ops::decref will just redirect to decref_target anyway, so why
	not just rename decref_target to target_ops::decref?

	That's what this commit does.

	It's not exactly renaming to target_ops::decref, because the decref
	functionality is handled by a policy class, so the new name is now
	target_ops_ref_policy::decref.

	There should be no user visible change after this commit.

2022-12-14  Andrew Burgess  <aburgess@redhat.com>

	gdb: have target_stack automate reference count handling
	This commit changes the target_stack class from using a C style array
	of 'target_ops *' to using a C++ std::array<target_ops_ref, ...>.  The
	benefit of this change is that some of the reference counting of
	target_ops objects is now done automatically.

	This commit fixes a crash in gdb.python/py-inferior.exp where GDB
	crashes at exit, leaving a core file behind.

	The crash occurs in connpy_connection_dealloc, and is actually
	triggered by this assert:

	gdb_assert (conn_obj->target == nullptr);

	Now a little aside...

	    ... the assert is never actually printed, instead GDB crashes due
	    to calling a pure virtual function.  The backtrace at the point of
	    crash looks like this:

	      #7  0x00007fef7e2cf747 in std::terminate() () from /lib64/libstdc++.so.6
	      #8  0x00007fef7e2d0515 in __cxa_pure_virtual () from /lib64/libstdc++.so.6
	      #9  0x0000000000de334d in target_stack::find_beneath (this=0x4934d78, t=0x2bda270 <the_dummy_target>) at ../../s>
	      #10 0x0000000000df4380 in inferior::find_target_beneath (this=0x4934b50, t=0x2bda270 <the_dummy_target>) at ../.>
	      #11 0x0000000000de2381 in target_ops::beneath (this=0x2bda270 <the_dummy_target>) at ../../src/gdb/target.c:3047
	      #12 0x0000000000de68aa in target_ops::supports_terminal_ours (this=0x2bda270 <the_dummy_target>) at ../../src/gd>
	      #13 0x0000000000dde6b9 in target_supports_terminal_ours () at ../../src/gdb/target.c:1112
	      #14 0x0000000000ee55f1 in internal_vproblem(internal_problem *, const char *, int, const char *, typedef __va_li>

	    Notice in frame #12 we called target_ops::supports_terminal_ours,
	    however, this is the_dummy_target, which is of type dummy_target,
	    and so we should have called dummy_target::supports_terminal_ours.
	    I believe the reason we ended up in the wrong implementation of
	    supports_terminal_ours (which is a virtual function) is because we
	    made the call during GDB's shut-down, and, I suspect, the vtables
	    were in a weird state.

	    Anyway, the point of this patch is not to fix GDB's ability to
	    print an assert during exit, but to address the root cause of the
	    assert.  With that aside out of the way, we can return to the main
	    story...

	Connections are represented in Python with gdb.TargetConnection
	objects (or its sub-classes).  The assert in question confirms that
	when a gdb.TargetConnection is deallocated, the underlying GDB
	connection has itself been removed from GDB.  If this is not true then
	we risk creating multiple different gdb.TargetConnection objects for
	the same connection, which would be bad.

	To ensure that we have one gdb.TargetConnection object for each
	connection, the all_connection_objects map exists, this maps the
	process_stratum_target object (the connection) to the
	gdb.TargetConnection object that represents the connection.

	When a connection is removed in GDB the connection_removed observer
	fires, which we catch with connpy_connection_removed, this function
	then sets conn_obj->target to nullptr, and removes the corresponding
	entry from the all_connection_objects map.

	The first issue here is that connpy_connection_dealloc is being called
	as part of GDB's exit code, which is run after the Python interpreter
	has been shut down.  The connpy_connection_dealloc function is used to
	deallocate the gdb.TargetConnection Python object.  Surely it is
	wrong for us to be deallocating Python objects after the interpreter
	has been shut down.

	The reason why connpy_connection_dealloc is called during GDB's exit
	is that the global all_connection_objects map is still holding a
	reference to the gdb.TargetConnection object.  When the map is
	destroyed during GDB's exit, the gdb.TargetConnection objects within
	the map can finally be deallocated.

	The reason why all_connection_objects has contents when GDB exits, and
	the reason the assert fires, is that, when GDB exits, there are still
	some connections that have not yet been removed from GDB, that is,
	they have a non-zero reference count.

	If we take a look at quit_force (top.c) you can see that, for each
	inferior, we call pop_all_targets before we (later in the function)
	call do_final_cleanups.  It is the do_final_cleanups call that is
	responsible for shutting down the Python interpreter.  The
	pop_all_targets calls should, in theory, cause all the connections to
	be removed from GDB.

	That this isn't working indicates that some targets have a non-zero
	reference count even after this final pop_all_targets call, and
	indeed, when I debug GDB, that is what I see.

	I tracked the problem down to delete_inferior where we do some house
	keeping, and then delete the inferior object, which calls
	inferior::~inferior.

	In neither delete_inferior or inferior::~inferior do we call
	pop_all_targets, and it is this missing call that means we leak some
	references to the target_ops objects on the inferior's target_stack.

	In this commit I will provide a partial fix for the problem.  I say
	partial fix, but this will actually be enough to resolve the crash.
	In a later commit I will provide the final part of the fix.

	As mentioned at the start of the commit message, this commit changes
	the m_stack in target_stack to hold target_ops_ref objects.  This
	means that when inferior::~inferior is called, and m_stack is
	released, we automatically decrement the target_ops reference count.
	With this change in place we no longer leak any references, and now,
	in quit_force the final pop_all_targets calls will release the final
	references.  This means that the targets will be correctly closed at
	this point, which means the connections will be removed from GDB and
	the Python objects deallocated before the Python interpreter shuts
	down.

	There's a slight oddity in target_stack::unpush, where we std::move
	the reference out of m_stack like this:

	  auto ref = std::move (m_stack[stratum]);

	the `ref' isn't used explicitly, but it serves to hold the
	target_ops_ref until the end of the scope while allowing the m_stack
	entry to be reset back to nullptr.  The alternative would be to
	directly set the m_stack entry to nullptr, like this:

	  m_stack[stratum] = nullptr;

	The problem here is that when we set the m_stack entry to nullptr we
	first decrement the target_ops reference count, and then set the array
	entry to nullptr.

	If the decrement means that the target_ops object reaches a zero
	reference count then the target_ops object will be closed by calling
	target_close.  In target_close we ensure that the target being closed
	is not in any inferiors target_stack.

	As we decrement before clearing, then this check in target_close will
	fail, and an assert will trigger.

	By using std::move to move the reference out of m_stack, this clears
	the m_stack entry, meaning the inferior no longer contains the
	target_ops in its target_stack.  Now when the REF object goes out of
	scope and the reference count is decremented, target_close can run
	successfully.

	I've made use of the Python connection_removed listener API to add a
	test for this issue.  The test installs a listener and then causes
	delete_inferior to be called, we can then see that the connection is
	then correctly removed (because the listener triggers).

2022-12-14  Andrew Burgess  <aburgess@redhat.com>

	gdb/remote: remove some manual reference count handling
	While working on some other target_ops reference count related code, I
	spotted that in remote.c we do some manual reference count handling,
	i.e. we call target_ops::incref and decref_target (which wraps
	target_ops::decref).

	I think it would be better to make use of gdb::ref_ptr to automate the
	reference count management.

	So, this commit updates scoped_mark_target_starting in two ways,
	first, I use gdb::ref_ptr to handle the reference counts.  Then,
	instead of using the scoped_mark_target_starting constructor and
	destructor to set and reset the starting_up flag, I now use a
	scoped_restore_tmpl object to set and restore the flag.

	The above changes mean that the scoped_mark_target_starting destructor
	can be completely removed, and the constructor body is now empty.

	I've also fixed a typo in the class comment.

	The only change in behaviour after this commit is that previously we
	didn't care what the value of starting_up was, we just set it to true
	in the constructor and false in the destructor.

	Now, I assert that the flag is initially false, then set the flag true
	when the scoped_mark_target_starting is created.

	As the starting_up flag is initialized to false then, for the assert
	to fire, we would need to recursively enter
	remote_target::start_remote_1, which I don't think is something we
	should be doing, so I think the new assert is an improvement.

2022-12-14  Alan Modra  <amodra@gmail.com>

	Re: ld, gold: remove support for -z bndplt (MPX prefix)
	Don't attempt to run gold tests with -z bndplt

		* testsuite/Makefile.am (exception_x86_64_bnd_test, bnd_plt_1.sh),
		(bnd_ifunc_1.sh, bnd_ifunc_2.sh): Delete rules.
		* testsuite/Makefile.in: Regenerate.
		* testsuite/bnd_ifunc_1.s: Delete.
		* testsuite/bnd_ifunc_1.sh: Delete.
		* testsuite/bnd_ifunc_2.s: Delete.
		* testsuite/bnd_ifunc_2.sh: Delete.
		* testsuite/bnd_plt_1.s: Delete.
		* testsuite/bnd_plt_1.sh: Delete.

2022-12-14  Alan Modra  <amodra@gmail.com>

	asan: buffer overflow in sh_reloc
		* coff-sh.c (sh_reloc): Use bfd_reloc_offset_in_range.

2022-12-14  Alan Modra  <amodra@gmail.com>

	Fix haiku ld dependencies
	I noticed after commit 8ad93045ed, "ld, gold: remove support for -z
	bndplt (MPX prefix)", that some of my builds were failing with

	eelf_x86_64_haiku.c:650:9: error: no member named 'bndplt' in 'struct elf_linker_x86_params'
	        params.bndplt = true;
	        ~~~~~~ ^

		* emulparams/aarch64haiku.sh: Use "source_sh" rather than ".".
		* emulparams/armelf_haiku.sh: Likewise.
		* emulparams/elf32ppchaiku.sh: Likewise.
		* emulparams/elf_mipsel_haiku.sh: Likewise.
		* emulparams/elf_x86_64_haiku.sh: Likewise.

2022-12-14  Andrew Burgess  <aburgess@redhat.com>

	gdb: add SYMBOL_LOOKUP_SCOPED_DEBUG_ENTER_EXIT
	After the previous commit converted symbol-lookup debug to use the new
	debug scheme, this commit adds SYMBOL_LOOKUP_SCOPED_DEBUG_ENTER_EXIT.

	The previous commit didn't add SYMBOL_LOOKUP_SCOPED_DEBUG_ENTER_EXIT
	because symbol-lookup debug is controlled by an 'unsigned int' rather
	than a 'bool' control variable, we use the numeric value to offer
	different levels of verbosity for symbol-lookup debug.

	The *_SCOPED_DEBUG_ENTER_EXIT mechanism currently relies on capturing
	a reference to the bool control variable, and evaluating the variable
	both on entry, and at exit, this is done in the scoped_debug_start_end
	class (see gdbsupport/common-debug.h).

	This commit templates scoped_debug_start_end so that the class can
	accept either a 'bool &' or an invokable object, e.g. a lambda
	function, or a function pointer.

	The existing scoped_debug_start_end and scoped_debug_enter_exit macros
	in common-debug.h are updated to support scoped_debug_enter_exit being
	templated, however, nothing outside of common-debug.h needs to change.

	I've then added SYMBOL_LOOKUP_SCOPED_DEBUG_ENTER_EXIT in symtab.h, and
	added a couple of token uses in symtab.c.  I didn't want to add too
	much in this first commit, this is really about updating
	common-debug.h to support this new functionality.

	Within symtab.h I created a couple of global functions that can be
	used to query the status of the symbol_lookup_debug control variable,
	these functions are then used within the two existing macros:

	  symbol_lookup_debug_printf
	  symbol_lookup_debug_printf_v

	and also in the new SYMBOL_LOOKUP_SCOPED_DEBUG_ENTER_EXIT macro.

2022-12-14  Andrew Burgess  <aburgess@redhat.com>

	gdb: convert 'set debug symbol-lookup' to new debug printing scheme
	Convert the implementation of 'set debug symbol-lookup' to the new
	debug printing scheme.

	In a few places I've updated the debug output to remove places where
	the printed debug message included the function name, the new debug
	scheme already adds that, but I haven't done all the possible updates.

2022-12-14  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: new test for recent dwarf reader issue
	This commit provides a test for this commit:

	  commit 55fc1623f942fba10362cb199f9356d75ca5835b
	  Date:   Thu Nov 3 13:49:17 2022 -0600

	      Add name canonicalization for C

	Which resolves PR gdb/29105.  My reason for writing this test was a
	desire to better understand the above commit, my process was to study
	the commit until I thought I understood it, then write a test to
	expose the issue.  As the original commit didn't have a test, I
	thought it wouldn't hurt to commit this upstream.

	The problem tested for here is already described in the above commit,
	but I'll give a brief description here.  This description describes
	GDB prior to the above commit:

	  - Builtin types are added to GDB using their canonical name,
	    e.g. "short", not "signed short",

	  - When the user does something like 'p sizeof(short)', then this is
	    handled in c-exp.y, and results in a call to lookup_signed_type
	    for the name "int".  The "int" here is actually being looked up as
	    the type for the result of the 'sizeof' expression,

	  - In lookup_signed_type GDB first adds a 'signed' and looks for that
	    type, so in this case 'signed int', and, if that lookup fails, GDB
	    then looks up 'int',

	  - The problem is that 'signed int' is not the canonical name for a
	    signed int, so no builtin type with that name will be found, GDB
	    will then go to each object file in turn looking for a matching
	    type,

	  - When checking each object file, GDB will first check the partial
	    symtab to see if the full symtab should be expanded or not.
	    Remember, at this point GDB is looking for 'signed int', there
	    will be no partial symbols with that name, so GDB will not expand
	    anything,

	  - However, GDB checks each partial symbol using multiple languages,
	    not just the current language (C in this case), so, when GDB
	    checks using the C++ language, the symbol name is first
	    canonicalized (the code that does this can be found
	    lookup_name_info::language_lookup_name).  As the canonical form of
	    'signed int' is just 'int', GDB then looks for any symbols with
	    the name 'int', most partial symtabs will contain such a symbol,
	    so GDB ends up expanding pretty much every symtab.

	The above commit fixes this by avoiding the use of non-canonical names
	with C, now the initial builtin type lookup will succeed, and GDB
	never even considers whether to expand any additional symtabs.

	The test case creates a library that includes char, short, int, and
	long types, and a test program that links against the library.

	In the test script we start the inferior, but don't allow it to
	progress far enough that the debug information for the library has
	been fully expanded yet.

	Then we evaluate some 'sizeof(TYPE)' expressions.

	In the buggy version of GDB this would cause the debug information
	for the library to be fully expanded, while in the fixed version of
	GDB this will not be the case.

	We use 'info sources' to determine if the debug information has been
	fully expanded or not.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29105

2022-12-14  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: fix readnow detection
	The following commit broke the readnow detection in the testsuite:

	  commit dfaa040b440084dd73ebd359326752d5f44fc02c
	  Date:   Mon Mar 29 18:31:31 2021 -0600

	      Remove some "OBJF_READNOW" code from dwarf2_debug_names_index

	The testsuite checks if GDB was started with the -readnow flag by
	using the 'maintenance print objfiles' command, and looking for the
	string 'faked for "readnow"' in the output.  This is implemented in
	two helper procs `readnow` (gdb.exp) and `mi_readnow` (mi-support.exp).

	The following tests all currently depend on this detection:

	  gdb.base/maint.exp
	  gdb.cp/nsalias.exp
	  gdb.dwarf2/debug-aranges-duplicate-offset-warning.exp
	  gdb.dwarf2/dw2-stack-boundary.exp
	  gdb.dwarf2/dw2-zero-range.exp
	  gdb.dwarf2/gdb-index-nodebug.exp
	  gdb.mi/mi-info-sources.exp
	  gdb.python/py-symbol.exp
	  gdb.rust/traits.exp

	The following test also includes detection of 'readnow', but does the
	detection itself by checking $::GDBFLAGS for the readnow flag:

	  gdb.opt/break-on-_exit.exp

	The above commit removed from GDB the code that produced the 'faked
	for "readnow"' string, as a consequence the testsuite can no longer
	correctly spot when readnow is in use, and many of the above tests
	will fail (at least partially).

	When looking at the above tests, I noticed that gdb.rust/traits.exp
	does call `readnow`, but doesn't actually use the result, so I've
	removed the readnow call, this simplifies the next part of this patch
	as gdb.rust/traits.exp was the only place an extra regexp was passed
	to the readnow call.

	Next I have rewritten `readnow` to check the $GDBFLAGS for the
	-readnow flag, and removed the `maintenance print objfiles` check.  At
	least for all the tests above, when using the readnow board, this is
	good enough to get everything passing again.

	For the `mi_readnow` proc, I changed this to just call `readnow` from
	gdb.exp, I left the mi_readnow name in place - in the future it might
	be the case that we want to do some different checks here.

	Finally, I updated gdb.opt/break-on-_exit.exp to call the `readnow`
	proc.

	With these changes, all of the tests listed above now pass correctly
	when using the readnow board.

2022-12-14  Li Xu  <xuli1@eswincomputing.com>

	RISC-V: Add string length check for operands in AS
	The current AS accepts invalid operands due to miss of operands length check.
	For example, "e6" is an invalid operand in (vsetvli a0, a1, e6, mf8, tu, ma),
	but it's still accepted by assembler.  In detail, the condition check "strncmp
	(array[i], *s, len) == 0" in arg_lookup function passes with "strncmp ("e64",
	"e6", 2)" in the case above.  So the generated encoding is same as that of
	(vsetvli a0, a1, e64, mf8, tu, ma).

	This patch fixes issue above by prompting an error in such case and also adds
	a new testcase.

	gas/ChangeLog:

	        * config/tc-riscv.c (arg_lookup): Add string length check for operands.
	        * testsuite/gas/riscv/vector-insns-fail-vsew.d: New testcase for an illegal vsew.
	        * testsuite/gas/riscv/vector-insns-fail-vsew.l: Likewise.
	        * testsuite/gas/riscv/vector-insns-fail-vsew.s: Likewise.

2022-12-14  Jan Beulich  <jbeulich@suse.com>

	x86: adjust type checking constructs
	As Alan points out, ASAN takes issue with these constructs, for
	current_templates being NULL. Wrap them in sizeof(), so the expressions
	aren't actually evaluated.

2022-12-14  Martin Liska  <mliska@suse.cz>

	ld, gold: remove support for -z bndplt (MPX prefix)
	bfd/ChangeLog:

		* elf-linker-x86.h (struct elf_linker_x86_params): Remove
		bndplt.
		* elf64-x86-64.c (elf_x86_64_scan_relocs): Ignore
	        R_X86_64_PLT32_BND.
		(elf_x86_64_relocate_section): Similarly here.
		(elf_x86_64_link_setup_gnu_properties): Ignore bndplt.
		* elfxx-x86.c: Likewise.
		* elfxx-x86.h: Likewise.

	gold/ChangeLog:

		* NEWS: Document -z bndplt.
		* options.h (class General_options): Remove bndplt option.
		* x86_64.cc (class Output_data_plt_x86_64_bnd): Remove.
		(Target_x86_64::do_make_data_plt): Do not use
		Output_data_plt_x86_64_bnd.
		(Target_x86_64::Scan::get_reference_flags): Likewise.
		(Target_x86_64::Scan::check_non_pic): Likewise.
		(Target_x86_64::Scan::local): Likewise.
		(Target_x86_64::Scan::global): Likewise.

	ld/ChangeLog:

		* NEWS: Document -z bndplt.
		* emulparams/elf_x86_64.sh: Remove bndplt option.
		* ld.texi: Likewise.
		* testsuite/ld-x86-64/x86-64.exp:
		* testsuite/ld-x86-64/bnd-branch-1-now.d: Removed.
		* testsuite/ld-x86-64/bnd-branch-1.d: Removed.
		* testsuite/ld-x86-64/bnd-branch-1.s: Removed.
		* testsuite/ld-x86-64/bnd-ifunc-1-now.d: Removed.
		* testsuite/ld-x86-64/bnd-ifunc-1.d: Removed.
		* testsuite/ld-x86-64/bnd-ifunc-1.s: Removed.
		* testsuite/ld-x86-64/bnd-ifunc-2-now.d: Removed.
		* testsuite/ld-x86-64/bnd-ifunc-2.d: Removed.
		* testsuite/ld-x86-64/bnd-ifunc-2.s: Removed.
		* testsuite/ld-x86-64/bnd-plt-1-now.d: Removed.
		* testsuite/ld-x86-64/bnd-plt-1.d: Removed.
		* testsuite/ld-x86-64/mpx.exp: Removed.
		* testsuite/ld-x86-64/mpx1.out: Removed.
		* testsuite/ld-x86-64/mpx1a.c: Removed.
		* testsuite/ld-x86-64/mpx1a.rd: Removed.
		* testsuite/ld-x86-64/mpx1b.c: Removed.
		* testsuite/ld-x86-64/mpx1c.c: Removed.
		* testsuite/ld-x86-64/mpx1c.rd: Removed.
		* testsuite/ld-x86-64/mpx2.out: Removed.
		* testsuite/ld-x86-64/mpx2a.c: Removed.
		* testsuite/ld-x86-64/mpx2a.rd: Removed.
		* testsuite/ld-x86-64/mpx2b.c: Removed.
		* testsuite/ld-x86-64/mpx2c.c: Removed.
		* testsuite/ld-x86-64/mpx2c.rd: Removed.
		* testsuite/ld-x86-64/mpx3.dd: Removed.
		* testsuite/ld-x86-64/mpx3a.s: Removed.
		* testsuite/ld-x86-64/mpx3b.s: Removed.
		* testsuite/ld-x86-64/mpx3n.dd: Removed.
		* testsuite/ld-x86-64/mpx4.dd: Removed.
		* testsuite/ld-x86-64/mpx4a.s: Removed.
		* testsuite/ld-x86-64/mpx4b.s: Removed.
		* testsuite/ld-x86-64/mpx4n.dd: Removed.
		* testsuite/ld-x86-64/pr20800a.S: Removed.
		* testsuite/ld-x86-64/pr20800b.S: Removed.
		* testsuite/ld-x86-64/pr21038a-now.d: Removed.
		* testsuite/ld-x86-64/pr21038a.d: Removed.
		* testsuite/ld-x86-64/pr21038a.s: Removed.
		* testsuite/ld-x86-64/pr21038b-now.d: Removed.
		* testsuite/ld-x86-64/pr21038b.d: Removed.
		* testsuite/ld-x86-64/pr21038b.s: Removed.
		* testsuite/ld-x86-64/pr21038c-now.d: Removed.
		* testsuite/ld-x86-64/pr21038c.d: Removed.
		* testsuite/ld-x86-64/pr21038c.s: Removed.

2022-12-14  Alan Modra  <amodra@gmail.com>

	asan: signed integer overflow in display_debug_frames
		* dwarf.c (struct Frame_Chunk): Make col_offset an int64_t.
		Adjust all places allocating col_offset and col_type to use
		the size of the array element rather than the size of a type.
		(frame_display_row): Adjust printing of col_offset.
		(display_debug_frames): Factor out multiplication by
		code_factor and data_factor.  Avoid signed overflow.  Use
		64-bit variables.

2022-12-14  Alan Modra  <amodra@gmail.com>

	Don't access freed memory printing objcopy warning
	abfd->filename will be freed if bfd_close gets far enough to delete
	the bfd.  It's possible to have an error from fclose at this point.

		* objcopy.c (copy_archive): Dup filename before closing bfd for
		potential use in bfd_nonfatal_message.

2022-12-14  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-13  Tom Tromey  <tromey@adacore.com>

	Fix control-c handling on Windows
	As Hannes pointed out, the Windows target-async patches broke C-c
	handling there.  Looking into this, I found a few oddities, fixed
	here.

	First, windows_nat_target::interrupt calls GenerateConsoleCtrlEvent.
	I think this event can be ignored by the inferior, so it's not a great
	way to interrupt.  Instead, using DebugBreakProcess (or a more
	complicated thing for Wow64) seems better.

	Second, windows_nat_target did not implement the pass_ctrlc method.
	Implementing this lets us remove the special code to call
	SetConsoleCtrlHandler and instead integrate into gdb's approach to C-c
	handling.  I believe that this should also fix the race that's
	described in the comment that's being removed.

	Initially, I thought a simpler version of this patch would work.
	However, I think what happens is that some other library (I'm not sure
	what) calls SetConsoleCtrlHandler while gdb is running, and this
	intercepts and handles C-c -- so that the gdb SIGINT handler is not
	called.  C-break continues to work, presumably because whatever
	handler is installed ignores it.

	This patch works around this issue by ensuring that the gdb handler
	always comes first.

2022-12-13  Tom Tromey  <tromey@adacore.com>

	Refactor code to check for terminal sharing
	This refactors the code to check for terminal sharing.
	is_gdb_terminal is exported, and sharing_input_terminal_1 is renamed,
	slightly refactored, and moved to posix-hdep.c.  A new
	Windows-specific implementation of this function is added to
	mingw-hdep.c.

	MSDN has a warning about GetConsoleProcessList

	    This API is not recommended and does not have a virtual terminal
	    equivalent. [...] Applications remoting via cross-platform
	    utilities and transports like SSH may not work as expected if
	    using this API.

	However, we believe this isn't likely to be an issue for gdb.

2022-12-13  Tom Tromey  <tromey@adacore.com>

	Use gdb::optional for sigint_ours
	sigint_ours (and sigquit_ours) can be used without being set.  Avoid
	this problem by changing them to gdb::optional and checking that they
	are in fact set before using the value.

	Rename install_sigint_handler
	A subsequent patch will introduce a global 'install_sigint_handler'
	function, so first rename the static one in extension.c.

2022-12-13  Tom de Vries  <tdevries@suse.de>

	[gdb/tdep] Fix s390_linux_nat_target::stopped_by_watchpoint
	On s390x-linux, I run into:
	...
	(gdb) continue^M
	Continuing.^M
	breakpoint.c:5784: internal-error: bpstat_stop_status_nowatch: \
	  Assertion `!target_stopped_by_watchpoint ()' failed.^M
	A problem internal to GDB has been detected,^M
	further debugging may prove unreliable.^M
	FAIL: gdb.threads/watchpoint-fork.exp: parent: singlethreaded: \
	  breakpoint after the first fork (GDB internal error)
	...

	What happens is the follow:
	- a watchpoint event triggers
	- the event is processed, s390_linux_nat_target::stopped_by_watchpoint is called and
	  it returns true, as expected
	- the watchpoint event is reported by gdb, and gdb stops
	- we issue a continue command
	- a fork event triggers
	- the event is processed, and during processing that event
	  s390_linux_nat_target::stopped_by_watchpoint is called again, and returns
	  true
	- the assertion fails, because the function is expected to return false

	The function s390_linux_nat_target::stopped_by_watchpoint returns true the
	second time, because it looks at the exact same data that was looked at when
	it was called the first time, and that data hasn't changed.

	There's code in the same function that intends to prevent that from happening:
	...
	      /* Do not report this watchpoint again.  */
	      memset (&per_lowcore, 0, sizeof (per_lowcore));
	      if (ptrace (PTRACE_POKEUSR_AREA, s390_inferior_tid (), &parea, 0) < 0)
	       perror_with_name (_("Couldn't clear watchpoint status"));
	...
	and that probably used to work for older kernels, but no longer does since
	linux kernel commit 5e9a26928f55 ("[S390] ptrace cleanup").

	Fix this by copying this:
	...
	  siginfo_t siginfo;
	  if (!linux_nat_get_siginfo (inferior_ptid, &siginfo))
	    return false;
	  if (siginfo.si_signo != SIGTRAP
	      || (siginfo.si_code & 0xffff) != TRAP_HWBKPT)
	    return false;
	...
	from aarch64_linux_nat_target::stopped_data_address and remove the
	obsolete watchpoint status clearing code.

	Tested on s390x-linux.

	Approved-By: Ulrich Weigand <uweigand@de.ibm.com>

2022-12-13  H.J. Lu  <hjl.tools@gmail.com>

	gold: Remove BND from 64-bit x86-64 IBT PLT
	Since MPX support has been removed from x86-64 psABI, remove BND from
	64-bit IBT PLT by using 32-bit IBT PLT.

		PR gold/29851
		* x86_64.cc (Output_data_plt_x86_64_ibt<32>::first_plt_entry):
		Renamed to ...
		(Output_data_plt_x86_64_ibt<size>::first_plt_entry): This.
		(Output_data_plt_x86_64_ibt<64>::first_plt_entry): Removed.
		(Output_data_plt_x86_64_ibt<size>::do_fill_first_plt_entry):
		Drop the size == 32 check.
		(Output_data_plt_x86_64_ibt<32>::plt_entry): Renamed to ...
		(Output_data_plt_x86_64_ibt<size>::plt_entry): This.
		(Output_data_plt_x86_64_ibt<64>::plt_entry): Removed.
		(Output_data_plt_x86_64_ibt<32>::aplt_entry): Renamed to ...
		(Output_data_plt_x86_64_ibt<size>::aplt_entry): This.
		(Output_data_plt_x86_64_ibt<64>::aplt_entry): Removed.
		(Output_data_plt_x86_64_ibt<size>::do_fill_plt_entry): Drop the
		size == 32 check.
		(Output_data_plt_x86_64_ibt<size>::fill_aplt_entry): Likewise.

2022-12-13  Tom Tromey  <tromey@adacore.com>

	Remove two unnecessary casts
	A couple of calls to parse_probe_linespec had an unnecessary cast.  I
	suspect this cast was never needed, but once commands were changed to
	take a 'const' argument, they became completely obsolete.  Tested by
	rebuilding.

2022-12-13  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: avoid creating temp file in gdb/testsuite/ directory
	After this commit:

	  commit 33c1395cf5e9deec7733691ba32c450e5c27f757
	  Date:   Fri Nov 11 15:26:46 2022 +0000

	      gdb/testsuite: fix gdb.trace/unavailable-dwarf-piece.exp with Clang

	The gdb.trace/unavailable-dwarf-piece.exp test script was creating a
	temporary file in the build/gdb/testsuite/ directory, instead of in
	the expected place in the outputs directory.

	Fix this by adding a call to standard_output_file.

2022-12-13  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.python/py-disasm.exp on s390x
	On s390x-linux, I run into:
	...
	(gdb) disassemble test^M
	Dump of assembler code for function test:^M
	   0x0000000001000638 <+0>:     stg     %r11,88(%r15)^M
	   0x000000000100063e <+6>:     lgr     %r11,%r15^M
	   0x0000000001000642 <+10>:    nop     0^M
	=> 0x0000000001000646 <+14>:    nop     0^M
	   0x000000000100064a <+18>:    nop     0^M
	   0x000000000100064e <+22>:    lhi     %r1,0^M
	   0x0000000001000652 <+26>:    lgfr    %r1,%r1^M
	   0x0000000001000656 <+30>:    lgr     %r2,%r1^M
	   0x000000000100065a <+34>:    lg      %r11,88(%r11)^M
	   0x0000000001000660 <+40>:    br      %r14^M
	End of assembler dump.^M
	(gdb) FAIL: gdb.python/py-disasm.exp: global_disassembler=: disassemble test
	...

	The problem is that the test-case expects "nop" but on s390x we have instead
	"nop\t0".

	Fix this by allowing the insn.

	Tested on s390x-linux and x86_64-linux.

2022-12-13  Jan Beulich  <jbeulich@suse.com>

	gas: re-work line number tracking for macros and their expansions
	The PR gas/16908 workaround aimed at uniformly reporting line numbers
	to reference macro invocation sites. As mentioned in a comment this may
	be desirable for small macros, but often isn't for larger ones. As a
	first step improve diagnostics to report both locations, while aiming at
	leaving generated debug info unaltered.

	Note that macro invocation context is lost for any diagnostics issued
	only after all input was processed (or more generally for any use of
	as_*_where(), as the functions can't know whether the passed in location
	is related to [part of] the present stack of locations). To maintain the
	intended workaround behavior for PR gas/16908, a new as_where() is
	introduced to "look through" macro invocations, while the existing
	as_where() is renamed (and used in only very few places for now). Down
	the road as_where() will likely want to return a list of (file,line)
	pairs.

2022-12-13  Jan Beulich  <jbeulich@suse.com>

	Arm: avoid unhelpful uses of .macro in testsuite
	Macros with just a single use site are a little pointless to have, and
	even in further cases .irp is more suitable for the purpose. Expand such
	inline, avoiding the need to touch the testcases when diagnostics are
	changed for code resulting from macro expansion.

	While there also make what was "iter_mla" in sp-usage-thumb2-relax cover
	smlatt as well, rather than testing smlabt twice.

2022-12-13  Tom Tromey  <tom@tromey.com>

	Fix crash in is_nocall_function
	is_nocall_function anticipates only being called for a function or a
	method.  However, PR gdb/29871 points out a situation where an unusual
	expression -- but one that parses to a valid, if extremely weird,
	function call -- breaks this assumption.

	This patch changes is_nocall_function to remove this assert and
	instead simply return 'false' in this case.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29871

2022-12-13  Johnson Sun  <j3.soon777@gmail.com>

	Replace gdbpy_should_stop with gdbpy_breakpoint_cond_says_stop
	In 2014, the function `gdbpy_should_stop' has been replaced with
	`gdbpy_breakpoint_cond_says_stop'

	This replaces `gdbpy_should_stop' with `gdbpy_breakpoint_cond_says_stop' in the
	comments.

	Since `gdbpy_should_stop' has been renamed as noted in `gdb/ChangeLog-2014':

		* python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Renamed
		from gdbpy_should_stop.  Change result type to enum scr_bp_stop.

	Change-Id: I0ef3491ce5e057c5e75ef8b569803b30a5838575
	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-12-13  Alan Modra  <amodra@gmail.com>

	asan: mips_hi16_list segfault in bfd_get_section_limit_octets
	static variables like mips_hi16_list are nasty for applications using
	bfd.  It is possible when opening and closing bfds with mis-matched
	hi/lo relocs to leave a stale section pointer on the list.  That can
	cause a segfault if multiple bfds are being processed.

	Tidying the list when closing is sufficient to stop this happening
	(and fixes small memory leaks).  This patch goes further and moves
	mips_hi16_list to where it belongs in the bfd tdata.

		* elf32-mips.c (bfd_elf32_close_and_cleanup(: Define.
		* elf64-mips.c (bfd_elf64_close_and_cleanup): Define.
		* elfn32-mips.c (bfd_elf32_close_and_cleanup(: Define.
		* elfxx-mips.c (struct mips_hi16): Move earlier.
		(mips_hi16_list): Move to..
		(struct mips_elf_obj_tdata): ..here.
		(_bfd_mips_elf_close_and_cleanup): New function.
		(_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc),
		(_bfd_elf_mips_get_relocated_section_contents): Adjust uses of
		mips_hi16_list.
		* elfxx-mips.h (_bfd_mips_elf_close_and_cleanup): Declare.

2022-12-13  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-12  Indu Bhagat  <indu.bhagat@oracle.com>

	libctf: remove unnecessary zstd constructs
	This patch is essentially a revert of
	commit-id: 8818c80cbd4116ef5af171ec47c61167179e225c
	(libctf: Add ZSTD_LIBS to LIBS so that ac_cv_libctf_bfd_elf can be true)

	As the specific configure check now uses libtool, this explicit mention of the
	dependency $ZSTD_LIBS is not needed anymore.

	ChangeLog:

		* libctf/Makefile.in: Regenerated.
		* libctf/aclocal.m4: Likewise.
		* libctf/config.h.in: Likewise.
		* libctf/configure: Likewise.
		* libctf/configure.ac: Remove ZSTD_LIBS from LIBS.  Cleanup
		unused AC_ZSTD.

2022-12-12  Indu Bhagat  <indu.bhagat@oracle.com>

	libctf: remove AC_CONFIG_MACRO_DIR
	ACLOCAL_AMFLAGS is being set already.  So using AC_CONFIG_MACRO_DIR is
	unnecessary.

	ChangeLog:

		* libctf/configure: Regenerated.
		* libctf/configure.ac: remove AC_CONFIG_MACRO_DIR usage.

2022-12-12  Indu Bhagat  <indu.bhagat@oracle.com>

	libctf: remove unnecessary zlib constructs
	This dependency is managed via libtool.  So explicit addition to LDFLAGS
	and LIBS is not necessary anymore.

	ChangeLog:

		* libctf/configure: Regenerated.
		* libctf/configure.ac: remove zlib from LDFLAGS and LIBS.

2022-12-12  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix PR20630 regression test in gdb.base/printcmds.exp
	On s390x-linux, I run into:
	...
	(gdb) print {unsigned char}{65}^M
	$749 = 0 '\000'^M
	(gdb) FAIL: gdb.base/printcmds.exp: print {unsigned char}{65}
	...

	In contrast, on x86_64-linux, we have:
	...
	(gdb) print {unsigned char}{65}^M
	$749 = 65 'A'^M
	(gdb) PASS: gdb.base/printcmds.exp: print {unsigned char}{65}
	...

	The first problem here is that the test is supposed to be a regression test
	for PR20630, which can be reproduced (for an unfixed gdb) like this:
	...
	(gdb) p {unsigned char[]}{0x17}
	gdbtypes.c:4641: internal-error: copy_type: \
	  Assertion `TYPE_OBJFILE_OWNED (type)' failed.
	...
	but it's not due to insufficient quoting (note the dropped '[]').

	That's easy to fix, but after that we have on s390 (big endian):
	...
	(gdb) print {unsigned char[]}{65}^M
	$749 = ""^M
	...
	and on x86_64 (little endian):
	...
	(gdb) print {unsigned char[]}{65}^M
	$749 = "A"^M
	...

	Fix this by using 0xffffffff, such that in both cases we have:
	...
	(gdb) print {unsigned char[]}{0xffffffff}^M
	$749 = "\377\377\377\377"^M
	...

	Tested on x86_64-linux and s390x-linux.

2022-12-12  Alan Modra  <amodra@gmail.com>

	PR29893, buffer overflow in display_debug_addr
		PR 29893
		* dwarf.c (display_debug_addr): Sanity check dwarf5 unit_length
		field.  Don't read past end.

2022-12-12  Tom Tromey  <tom@tromey.com>

	Another Rust operator precedence bug
	My earlier patch to fix PR rust/29859 introduced a new operator
	precedence bug in the Rust parser.  Assignment operators are
	right-associative in Rust.  And, while this doesn't often matter, as
	Rust assignments always have the value (), still as a matter of
	principle we should get this correct.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29859

2022-12-12  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/write_mem.exp for big endian
	On s390x-linux (big endian), I run into:
	...
	(gdb) x /xh main^M
	0x1000638 <main>:       0x0000^M
	(gdb) FAIL: gdb.base/write_mem.exp: x /xh main
	...

	In contrast, on x86_64-linux (little endian), we have the expected:
	...
	(gdb) x /xh main^M
	0x4004a7 <main>:        0x4242^M
	(gdb) PASS: gdb.base/write_mem.exp: x /xh main
	...

	The problem is that the test-case hard-codes expectations about endiannes by
	writing an int-sized value (4 bytes in this case) and then printing only a
	halfword by using "/h" (so, two bytes).

	If we print 4 bytes, we have for s390x:
	...
	0x1000638 <main>:       0x00004242^M
	...
	and for x86_64:
	...
	0x4004a7 <main>:        0x00004242^M
	...

	Fix this by removing the "/h".

	Tested on x86_64-linux and s390x-linux.

2022-12-12  Jan Vrany  <jan.vrany@labware.com>

	gdb: fix possible use-after-free when executing commands
	In principle, `execute_command()` does following:

	   struct cmd_list_element *c;
	   c = lookup_cmd ( ... );
	   ...
	   /* If this command has been pre-hooked, run the hook first.  */
	   execute_cmd_pre_hook (c);
	   ...
	   /* ...execute the command `c` ...*/
	   ...
	   execute_cmd_post_hook (c);

	This may lead into use-after-free error.  Imagine the command
	being executed is a user-defined Python command that redefines
	itself.  In that case, struct `cmd_list_element` pointed to by
	`c` is deallocated during its execution so it is no longer valid
	when post hook is executed.

	To fix this case, this commit looks up the command once again
	after it is executed to get pointer to (possibly newly allocated)
	`cmd_list_element`.

2022-12-12  Jan Beulich  <jbeulich@suse.com>

	x86: further re-work insn/suffix recognition to also cover MOVSX
	PR gas/29524

	Having templates with a suffix explicitly present has always been
	quirky. After prior adjustment all that's left to also eliminate the
	anomaly from move-with-sign-extend is to consolidate the insn templates
	and to make may_need_pass2() cope (plus extend testsuite coverage).

2022-12-12  Jan Beulich  <jbeulich@suse.com>

	x86: drop (now) stray IsString
	The need for them on the operand-less string insns has gone away with
	the removal of maybe_adjust_templates() and associated logic. Since
	i386_index_check() needs adjustment then anyway, take the opportunity
	and also simplify it, possible again as a result of said removal (plus
	the opcode template adjustments done here).

2022-12-12  Jan Beulich  <jbeulich@suse.com>

	x86: move bad-use-of-TLS-reloc check
	Having it in match_template() is unhelpful. Neither does looking for the
	next template to possibly match make any sense in that case, nor is the
	resulting diagnostic making clear what the problem is.

	While moving the check, also generalize it to include all SIMD and VEX-
	encoded insns. This way an existing conditional can be re-used in
	md_assemble(). Note though that this still leaves a lof of insns which
	are also wrong to use with these relocations.

	Further fold the remaining check (BFD_RELOC_386_GOT32) with the XRELEASE
	related one a few lines down. This again allows re-using an existing
	conditional.

2022-12-12  Jan Beulich  <jbeulich@suse.com>

	x86-64: allow HLE store of accumulator to absolute 32-bit address
	In commit 1212781b35c9 ("ix86: allow HLE store of accumulator to
	absolute address") I was wrong to exclude 64-bit code. Dropping the
	check also leads to better diagnostics in 64-bit code ("MOV", after
	all, isn't invalid with "XRELEASE").

	While there also limit the amount of further checks done: The operand
	type checks that were there were effectively redundant with other ones
	anyway, plus it's quite fine to also have "xrelease mov <disp>, %eax"
	look for the next MOV template (in fact again also improving
	diagnostics).

2022-12-12  Jan Beulich  <jbeulich@suse.com>

	ix86: don't recognize/derive Q suffix in the common case
	Have its use, except where actually legitimate, result in the same "only
	supported in 64-bit mode" diagnostic as emitted for other 64-bit only
	insns. Also suppress deriving of the suffix in Intel mode except in the
	legitimate cases. This in exchange allows dropping the respective code
	from match_template().

	To maintain reasonable diagnostics (in particular to avoid "`mov' is
	only supported in 64-bit mode" on the SIMD forms of MOVQ) we need to
	defer parse_insn()'s emitting of errors unrelated to prefix parsing.
	Utilize i.error just like match_template() does.

	Oddly enough despite gcc's preference towards FILDQ and FIST{,T}Q we
	had no testcase whatsoever for these. Therefore such tests are being
	added. Note that the removed line in the x86-64-lfence-load testcase
	was redundant with the exact same one a few lines up.

2022-12-12  Jan Beulich  <jbeulich@suse.com>

	x86: re-work insn/suffix recognition
	Having templates with a suffix explicitly present has always been
	quirky. Introduce a 2nd matching pass in case the 1st one couldn't find
	a suitable template _and_ didn't itself already need to trim off a
	suffix to find a match at all. This requires error reporting adjustments
	(albeit luckily fewer than I was afraid might be necessary), as errors
	previously reported during matching now need deferring until after the
	2nd pass (because, obviously, we must not emit any error if the 2nd pass
	succeeds). While also related to PR gas/29524, it was requested that
	move-with-sign-extend be left as broken as it always was.

	PR gas/29525
	Note that with the dropped CMPSD and MOVSD Intel Syntax string insn
	templates taking operands, mixed IsString/non-IsString template groups
	(with memory operands) cannot occur anymore. With that
	maybe_adjust_templates() becomes unnecessary (and is hence being
	removed).

	PR gas/29526
	Note further that while the additions to the intel16 testcase aren't
	really proper Intel syntax, we've been permitting all of those except
	for the MOVD variant. The test therefore is to avoid re-introducing such
	an inconsistency.

2022-12-12  Jan Beulich  <jbeulich@suse.com>

	x86: constify parse_insn()'s input
	The function doesn't alter its input buffer: Reflect this in its
	prototype. To avoid using any kind of cast, simply calculate the update
	of "line" from the function's input and output.

	x86: revert disassembler parts of "x86: Allow 16-bit register source for LAR and LSL"
	This reverts the disassembler parts of 859aa2c86dc9 ("x86: Allow 16-bit
	register source for LAR and LSL"), adjusting testcases as necessary.
	That change was itself a partial revert of c9f5b96bdab0 ("x86: correct
	handling of LAR and LSL"), without actually saying so. While the earlier
	commit was properly agreed upon, the partial revert was not, and hence
	should not have been committed. This is even more so that the revert
	part of that change wasn't even necessary to address PR gas/29844.

2022-12-12  Alan Modra  <amodra@gmail.com>

	PR29892, Field file_table of struct module is uninitialized
		PR 29892
		* vms-alphs.c (new_module): Use bfd_zmalloc to alloc file_table.
		(parse_module): Rewrite file_table reallocation code and clear.

	Lack of bounds checking in vms-alpha.c parse_module
		PR 29873
		PR 29874
		PR 29875
		PR 29876
		PR 29877
		PR 29878
		PR 29879
		PR 29880
		PR 29881
		PR 29882
		PR 29883
		PR 29884
		PR 29885
		PR 29886
		PR 29887
		PR 29888
		PR 29889
		PR 29890
		PR 29891
		* vms-alpha.c (parse_module): Make length param bfd_size_type.
		Delete length == -1 checks.  Sanity check record_length.
		Sanity check DST__K_MODBEG, DST__K_RTNBEG, DST__K_RTNEND lengths.
		Sanity check DST__K_SOURCE and DST__K_LINE_NUM elements
		before accessing.
		(build_module_list): Pass dst_section size to parse_module.

2022-12-12  Alan Modra  <amodra@gmail.com>

	PR29872, uninitialised value in display_debug_lines_decoded dwarf.c:5413
	Plus segvs if the C-library doesn't handle printf %s of NULL.

		PR 29872
		* dwarf.c (null_name): New function.
		(process_debug_info): Use it here..
		(display_debug_lines_raw): ..and here..
		(display_debug_lines_decoded): ..and here.  xcalloc directory_table.
		Simplify xcalloc of file_table.

2022-12-12  Jan Beulich  <jbeulich@suse.com>

	gas/codeview: avoid "shadowing" of glibc function name
	While not "index" this time, old enough glibc also has an (unguarded)
	declaration of fileno() in stdio.h, which triggers a "shadows a global
	declaration" warning with our choice of warning level and with at least
	some gcc versions.

	x86: generate template sets data at build time
	Speed up gas startup by avoiding runtime allocation of the instances of
	type "templates". At the same time cut the memory requirement to just
	very little over half (not even accounting for any overhead
	notes_alloc() may incur) by reusing the "end" slot of a preceding entry
	for the "start" slot of the subsequent one.

	x86: drop sentinel from i386_optab[]
	Now that the table is local to gas, ARRAY_SIZE() can be used to
	determine the end of the table. Re-arrange the processing loop in
	md_begin() accordingly, at the same time folding the two calls to
	notes_alloc() into just one.

	x86: add generated tables dependency check to gas
	As requested by H.J., just for the sake of people potentially building
	in gas/ alone, add a check that the generated files in opcodes/ are
	actually up-to-date. Personally I think this should at best be a
	warning, but I can see how this may not be easily noticable among other
	make output (depending in particular on the verbosity level).

	x86: break gas dependency on libopcodes
	gas doesn't use anything from libopcodes anymore - suppress linking in
	that library.

	x86: remove i386-opc.c
	Remove the now empty i386-opc.c. To compensate, tie table generation in
	opcodes/ to the building of i386-dis.o, despite the file not really
	depending on the generated data.

2022-12-12  Jan Beulich  <jbeulich@suse.com>

	x86: instantiate i386_{op,reg}tab[] in gas instead of in libopcodes
	Unlike many other architectures, x86 does not share an opcode table
	between assembly and disassembly. Any consumer of libopcodes would only
	ever access one of the two. Since gas is the only consumer of the
	assembly data, move it there. While doing so mark respective entities
	"static" in i386-gen (we may want to do away with i386_regtab_size
	altogether).

	This also shrinks the number of relocations to be processed for
	libopcodes.so by about 30%.

2022-12-12  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-11  Alan Modra  <amodra@gmail.com>

	PR29870, objdump SEGV in display_debug_lines_decoded dwarf.c:5524
	DWARF5 directory and file table allow more opportunity for fuzzers
	to break things.  There are likely other places in dwarf.c that should
	be fixed too.

		PR 29870
		* dwarf.c (display_debug_lines_decoded): Handle NULL file_table
		name entry.

2022-12-11  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-10  Tom de Vries  <tdevries@suse.de>

	[gdb/tdep] Fix larl handling in s390_displaced_step_fixup
	On s390x-linux with target board unix/-m31, I run into:
	...
	(gdb) PASS: gdb.guile/scm-lazy-string.exp: bad length
	print ptr^M
	$1 = 0x804006b0 <error: Cannot access memory at address 0x804006b0>^M
	(gdb) FAIL: gdb.guile/scm-lazy-string.exp: ptr: print ptr
	...

	A minimal example is:
	...
	$ gdb -q -batch -ex "set trace-commands on" -x gdb.in
	+file scm-lazy-string
	+break main
	Breakpoint 1 at 0x4005d2: file scm-lazy-string.c, line 23.
	+run

	Breakpoint 1, main () at scm-lazy-string.c:23
	23        const char *ptr = "pointer";
	+step
	24        const char array[] = "array";
	+print ptr
	$1 = 0x804006b0 <error: Cannot access memory at address 0x804006b0>
	...

	If we delete the breakpoint after running to it, we have instead the expected:
	...
	+delete
	+step
	24        const char array[] = "array";
	+print ptr
	$1 = 0x4006b0 "pointer"
	...

	The problem is in displaced stepping, forced by the presence of the breakpoint,
	when stepping over this insn:
	...
	  0x4005d2 <main+10>      larl    %r1,0x4006b0
	...

	With normal stepping we have:
	...
	(gdb) p /x $r1
	$2 = 0x3ff004006b0
	...
	but with displaced stepping we have instead (note the 0x80000000 difference):
	...
	(gdb) p /x $r1
	$1 = 0x3ff804006b0
	(gdb)
	...

	The difference comes from this code in s390_displaced_step_fixup:
	...
	  /* Handle LOAD ADDRESS RELATIVE LONG.  */
	  else if (is_ril (insn, op1_larl, op2_larl, &r1, &i2))
	    {
	      /* Update PC.  */
	      regcache_write_pc (regs, from + insnlen);
	      /* Recompute output address in R1.  */
	      regcache_cooked_write_unsigned (regs, S390_R0_REGNUM + r1,
	                                      amode | (from + i2 * 2));
	    }
	...
	where the "amode |" adds the 0x80000000.

	Fix this by removing the "amode |".

	Tested on s390-linux, with native and target board unix/-m31.

	Approved-By: Ulrich Weigand <uweigand@de.ibm.com>

2022-12-10  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-09  Indu Bhagat  <indu.bhagat@oracle.com>

	objdump: sframe: fix memory leaks
	ChangeLog:

		* binutils/objdump.c (dump_section_sframe): free up contents and
		SFrame decoder context on exit.

2022-12-09  Indu Bhagat  <indu.bhagat@oracle.com>

	libsframe: rename API sframe_fde_func_info to sframe_fde_create_func_info
	The new name better reflects the purpose of the function.

	ChangeLog:

		* bfd/elfxx-x86.c (_bfd_x86_elf_create_sframe_plt): Use new
		name.
		* libsframe/sframe.c (sframe_fde_create_func_info): Rename
		sframe_fde_func_info to this.
		* libsframe/testsuite/libsframe.encode/encode-1.c: Use new name.

	include/ChangeLog:

		* sframe-api.h (sframe_fde_create_func_info): Rename
		sframe_fde_func_info to this.

2022-12-09  Indu Bhagat  <indu.bhagat@oracle.com>

	gas: sframe: fine tune the fragment fixup for SFrame func info
	SFrame function info is an unsigned 8-bit field comprising of the following
	(from LSB to MSB):
	  - 4-bits: FRE type
	  - 1-bit: FRE start address encoding
	  - 3-bits: Unused

	At the moment, the most-significat 4-bits are zero (The FRE start
	address encoding of SFRAME_FDE_TYPE_PCINC has a value of zero, and the upper
	3-bits are unused). So the current implementation works without this patch.

	To be precise, however, the fragment fixup logic is meant to fixup only the
	least-significant 4-bits (i.e., only the FRE type needs to be updated
	according to the function size).

	This patch makes the gas implementation a bit more resilient: In the
	future, when the format does evolve to make use of the currently unused
	3-bits in various ways, the values in those 3-bits can be propagated
	unchanged while the fragment fixup continues to update the lowermost
	4-bits to indicate the selected FRE type.

	ChangeLog:

		* gas/gen-sframe.c (create_func_info_exp): New definition.
		(output_sframe_funcdesc): Call create_func_info_exp.
		* gas/sframe-opt.c (sframe_estimate_size_before_relax): The
		associated fragment uses O_modulus now.
		(sframe_convert_frag): Adjust the fragment fixup code according
		to the new composite exp.

2022-12-09  Indu Bhagat  <indu.bhagat@oracle.com>

	sframe: gas: libsframe: define constants and remove magic numbers
	Define constants in sframe.h for the various limits associated with the
	range of offsets that can be encoded in the start address of an SFrame
	FRE. E.g., sframe_frame_row_entry_addr1 is used when start address
	offset can be encoded as 1-byte unsigned value.

	Update the code in gas to use these defined constants as it checks for
	these limits, and remove the usage of magic numbers.

	ChangeLog:

		* gas/sframe-opt.c (sframe_estimate_size_before_relax):
		(sframe_convert_frag): Do not use magic numbers.
		* libsframe/sframe.c (sframe_calc_fre_type): Likewise.

	include/ChangeLog:

		* sframe.h (SFRAME_FRE_TYPE_ADDR1_LIMIT): New constant.
		(SFRAME_FRE_TYPE_ADDR2_LIMIT): Likewise.
		(SFRAME_FRE_TYPE_ADDR4_LIMIT): Likewise.

2022-12-09  Indu Bhagat  <indu.bhagat@oracle.com>

	sframe.h: make some macros more precise
	include/ChangeLog:

		* sframe.h (SFRAME_V1_FUNC_INFO): Use specific bits only.
		(SFRAME_V1_FRE_INFO): Likewise.

2022-12-09  Indu Bhagat  <indu.bhagat@oracle.com>

	libsframe: minor formatting nits
	ChangeLog:

		* libsframe/sframe.c: Fix formatting nits.

2022-12-09  Luis Machado  <luis.machado@arm.com>

	[aarch64] Add TPIDR2 register support for Linux
	With the AArch64 Scalable Matrix Extension we have a new TPIDR2 register, and
	it will be added to the existing NT_ARM_TLS register set. Kernel patches are
	being reviewed here:

	https://lore.kernel.org/linux-arm-kernel/20220818170111.351889-1-broonie@kernel.org/

	From GDB's perspective, we handle it in a similar way to the existing TPIDR
	register. But we need to consider cases of systems that only have TPIDR and
	systems that have both TPIDR and TPIDR2.

	With that in mind, the following patch adds the required code to support
	TPIDR2 and turns the org.gnu.gdb.aarch64.tls feature into a
	dynamically-generated target description as opposed to a static target
	description containing only TPIDR.

	That means we can remove the gdb/features/aarch64-tls.xml file and replace the
	existing gdb/features/aarch64-tls.c auto-generated file with a new file that
	dynamically generates the target description containing either TPIDR alone or
	TPIDR and TPIDR2.

	In the future, when *BSD's start to support this register, they can just
	enable it as is being done for the AArch64 Linux target.

	The core file read/write code has been updated to support TPIDR2 as well.

	On GDBserver's side, there is a small change to the find_regno function to
	expose a non-throwing version of it.

	It always seemed strange to me how find_regno causes the whole operation to
	abort if it doesn't find a particular register name. The patch moves code
	from find_regno into find_regno_no_throw and makes find_regno call
	find_regno_no_throw instead.

	This allows us to do register name lookups to find a particular register
	number without risking erroring out if nothing is found.

	The patch also adjusts the feature detection code for aarch64-fbsd, since
	the infrastructure is shared amongst all aarch64 targets. I haven't added
	code to support TPIDR2 in aarch64-fbsd though, as I'm not sure when/if
	that will happen.

2022-12-09  Alan Modra  <amodra@gmail.com>

	PR28306, segfault in _bfd_mips_elf_reloc_unshuffle
	Access to section data during relocation processing should be bounds
	checked, as it is in bfd_perform_relocation.  bfd_perform_relocation
	does these checks after any special_function is called.  So a reloc
	special_function needs to do its own bounds checking before accessing
	section data.  This patch adds many such checks to the mips backend.

	Checking mips relocs is not without some difficulty.  See the comment
	in _bfd_mips_reloc_offset_in_range.  In a multitple reloc sequence
	applied to the same location, relocs that may appear somewhere other
	than the last one of the sequence need to be treated specially since
	they apply to the addend for the next relocation rather than the
	section contents.  If the addend is in the section then it needs to be
	checked but not when the addend is in the reloc.  check_inplace
	handles this situation.  _bfd_mips_reloc_offset_in_range with
	check_shuffle handles the case where contents are shuffled before
	applying the relocation.

		PR 28306
		* elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Check reloc
		address using _bfd_mips_reloc_offset_in_range.
		(gprel32_with_gp, mips16_gprel_reloc): Likewise.
		* elf64-mips.c (mips_elf64_gprel32_reloc): Likewise.
		(mips16_gprel_reloc): Likewise.
		* elfn32-mips.c (mips16_gprel_reloc): Likewise.
		(gprel32_with_gp): Check reloc address using
		bfd_reloc_offset_in_range.
		* elfxx-mips.h (enum reloc_check): Define.
		(_bfd_mips_reloc_offset_in_range): Declare.
		* elfxx-mips.c (needs_shuffle): New function.
		(_bfd_mips_elf_reloc_unshuffle, _bfd_mips_elf_reloc_shuffle): Use it.
		(_bfd_mips_reloc_offset_in_range): New function.
		(_bfd_mips_elf_gprel16_with_gp): Move reloc address checks to
		partial_inplace handling.  Use bfd_reloc_offset_in_range.
		(_bfd_mips_elf_lo16_reloc): Check reloc address using
		bfd_reloc_offset_in_range.
		(_bfd_mips_elf_generic_reloc): Check reloc address using
		_bfd_mips_reloc_offset_in_range.
		(mips_elf_calculate_relocation): Check reloc address before calling
		mips_elf_nullify_got_load.
		(_bfd_mips_elf_check_relocs): Likewise.
		(mips_elf_read_rel_addend): Add sec param, check reloc address
		before reading.  Adjust callers.
		(mips_elf_add_lo16_rel_addend): Add sec param, adjust callers.

2022-12-09  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.guile/scm-symtab.exp for ppc64le
	On powerpc64le-linux, I run into:
	...
	(gdb) PASS: gdb.guile/scm-symtab.exp: step out of func2
	guile (print (> (sal-line (find-pc-line (frame-pc (selected-frame)))) line))^M
	= #f^M
	(gdb) FAIL: gdb.guile/scm-symtab.exp: test find-pc-line with resume address
	...

	The problem is as follows: the instructions for the call to func2 are:
	...
	    1000070c:   39 00 00 48     bl      10000744 <func1>
	    10000710:   00 00 00 60     nop
	    10000714:   59 00 00 48     bl      1000076c <func2>
	    10000718:   00 00 00 60     nop
	    1000071c:   00 00 20 39     li      r9,0
	...
	and the corresponding line number info is:
	...
	scm-symtab.c:
	File name     Line number    Starting address    View    Stmt
	scm-symtab.c           42          0x1000070c               x
	scm-symtab.c           43          0x10000714               x
	scm-symtab.c           44          0x1000071c               x
	...

	The test-case looks at the line numbers for two insns:
	- the insn of the call to func2 (0x10000714), and
	- the insn after that (0x10000718),
	and expects the line number of the latter to be greater than the line number
	of the former.

	However, both insns have the same line number: 43.

	Fix this by replacing ">" with ">=".

	Tested on x86_64-linux and powerpc64le-linux.

2022-12-09  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-08  H.J. Lu  <hjl.tools@gmail.com>

	x86-64: Remove BND from 64-bit IBT PLT
	Since MPX support has been removed from x86-64 psABI, remove BND from
	64-bit IBT PLT by using x32 IBT PLT.

	bfd/

		PR ld/29851
		* elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Also check
		x32 IBT PLT for 64-bit.
		(elf_x86_64_link_setup_gnu_properties): Always use x32 IBT PLT.

	ld/

		PR ld/29851
		* testsuite/ld-x86-64/ibt-plt-1.d: Updated.
		* testsuite/ld-x86-64/ibt-plt-2a.d: Likewise.
		* testsuite/ld-x86-64/ibt-plt-2b.d: Likewise.
		* testsuite/ld-x86-64/ibt-plt-2c.d: Likewise.
		* testsuite/ld-x86-64/ibt-plt-2d.d: Likewise.
		* testsuite/ld-x86-64/ibt-plt-3a.d: Likewise.
		* testsuite/ld-x86-64/ibt-plt-3b.d: Likewise.
		* testsuite/ld-x86-64/ibt-plt-3c.d: Likewise.
		* testsuite/ld-x86-64/ibt-plt-3d.d: Likewise.
		* testsuite/ld-x86-64/plt-main-ibt-x32.dd: Moved to ...
		* testsuite/ld-x86-64/plt-main-ibt.dd: This.
		* testsuite/ld-x86-64/x86-64.exp: Don't use plt-main-ibt-x32.dd.

2022-12-08  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Require debug info for gdb.tui/tui-layout-asm-short-prog.exp
	When running test-case gdb.tui/tui-layout-asm-short-prog.exp on SLE-12-SP3
	aarch64, I run into:
	...
	FAIL: gdb.tui/tui-layout-asm-short-prog.exp: check asm box contents
	FAIL: gdb.tui/tui-layout-asm-short-prog.exp: check asm box contents again
	...
	due to:
	...
	(gdb) file tui-layout-asm-short-prog^M
	Reading symbols from tui-layout-asm-short-prog...^M
	(No debugging symbols found in tui-layout-asm-short-prog)^M
	...

	I managed to reproduce the same behaviour on openSUSE Leap 15.4 x86_64, by
	removing the debug option.

	Fix this by making the test-case unsupported if no debug info is found.

	Tested on x86_64-linux.

2022-12-08  Enze Li  <enze.li@hotmail.com>

	gdb/testsuite: update a pattern in gdb_file_cmd
	When building GDB with the following CFLAGS and CXXFLAGS as part of
	configure line:

	    CFLAGS=-std=gnu11 CXXFLAGS=-std=gnu++11

	Then run the selftest.exp, I see:

	======
	Running /home/lee/dev/binutils-gdb/gdb/testsuite/gdb.gdb/selftest.exp
	...
	FAIL: gdb.gdb/selftest.exp: run until breakpoint at captured_main
	WARNING: Couldn't test self

	                === gdb Summary ===

	 # of unexpected failures        1
	/home/lee/dev/binutils-gdb/gdb/gdb version  13.0.50.20221206-git -nw -nx
	-iex "set height 0" -iex "set width 0" -data-directory
	/home/lee/dev/binutils-gdb/gdb/testsuite/../data-directory
	======

	It is the fact that when I use the previously mentioned CFLAGS and
	CXXFLAGS as part of the configuration line, the default value (-O2 -g)
	is overridden, then GDB has no debug information.  When there's no debug
	information, GDB should not run the testcase in selftest.exp.

	The root cause of this FAIL is that the $gdb_file_cmd_debug_info didn't
	get the right value ("nodebug") during the gdb_file_cmd procedure.

	That's because in this commit,

	  commit 3453e7e409f44a79ac6695589836edb8a49bfb08
	  Date:   Sat May 19 11:25:20 2018 -0600

	    Clean up "Reading symbols" output

	It changed "no debugging..." to "No debugging..." which causes the above
	problem.  This patch only updates the corresponding pattern to fix this
	issue.

	With this patch applied, I see:

	======
	Running /home/lee/dev/binutils-gdb/gdb/testsuite/gdb.gdb/selftest.exp
	...

	                === gdb Summary ===

	 # of untested testcases         1
	/home/lee/dev/binutils-gdb/gdb/gdb version  13.0.50.20221206-git -nw -nx
	-iex "set height 0" -iex "set width 0" -data-directory
	/home/lee/dev/binutils-gdb/gdb/testsuite/../data-directory
	======

	Tested on x86_64-linux.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-12-08  Nick Clifton  <nickc@redhat.com>

	Update the description of the linker script's TYPE directive.
		PR 29861
		* ld.texi (Output Section Type): Note that setting the output
		section type only works if the section contains untyped data.

2022-12-08  Jan Vrany  <jan.vrany@labware.com>

	gdb: skip objfiles with no BFD in DWARF unwinder
	While playing with JIT reader I experienced GDB to crash on null-pointer
	dereference when stepping through non-jitted code.

	The problem was that dwarf2_frame_find_fde () assumed that all objfiles
	have BFD but that's not always true. To address this problem, this
	commit skips such objfiles.

	To test the fix we put breakpoint in jit_function_add (). The JIT reader
	does not know how unwind this function so unwinding eventually falls
	back to DWARF unwinder which in turn iterates over objfiles. Since the
	the code is jitted, it is guaranteed it would eventually process JIT
	objfile.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-12-08  Alan Modra  <amodra@gmail.com>

	libctf: avoid potential double free
		* ctf-link.c (ctf_link_add_cu_mapping): Set t NULL after free.

2022-12-08  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-07  Peter Bergner  <bergner@linux.ibm.com>

	PowerPC: Add support for RFC02655 - Saturating Subtract Instruction
	opcodes/
		* ppc-opc.c (XOL): New define.
		(XOL_MASK): Likewise.
		(powerpc_opcodes): Add subfus, subfus., subwus, subwus., subdus, subdus.

	gas/
		* testsuite/gas/ppc/rfc02655.s: New test.
		* testsuite/gas/ppc/rfc02655.d: Likewise
		* testsuite/gas/ppc/future-raw.s: Likewise.
		* testsuite/gas/ppc/future-raw.d: Likewise.
		* testsuite/gas/ppc/ppc.exp: Run them.

2022-12-07  Peter Bergner  <bergner@linux.ibm.com>

	PowerPC: Add support for RFC02656 - Enhanced Load Store with Length Instructions
	opcodes/
		* ppc-opc.c (PPCVSXF): New define.
		(powerpc_opcodes): Add lxvrl, lxvrll, lxvprl, lxvprll, stxvrl,
		stxvrll, stxvprl, stxvprl.

	gas/
		* testsuite/gas/ppc/rfc02656.s: New test.
		* testsuite/gas/ppc/rfc02656.d: Likewise.
		* testsuite/gas/ppc/ppc.exp: Run it.

2022-12-07  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: add invalidate_selected_frame function
	Instead of using `select_frame (nullptr)` to invalidate the selected
	frame, introduce a function to do that.  There is no change in behavior,
	but it makes the intent a bit clearer.  It also allows adding an assert
	in select_frame that fi is not nullptr, so it avoids passing nullptr by
	mistake.

	Change-Id: I61643f46bc8eca428334513ebdaadab63997bdd0
	Reviewed-By: Bruno Larsen <blarsen@redhat.com>

2022-12-07  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add KFAILs in gdb.base/longjmp.exp
	Add KFAILs in test-case gdb.base/longjmp.exp for PR gdb/26967, covering
	various ways that gdb is unable to recover the longjmp target if the libc
	probe is not supported.

	Tested on x86_64-linux.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-12-07  Tom Tromey  <tromey@adacore.com>

	Remove unnecessary xstrdup from bppy_init
	I saw that bppy_init used a non-const "char *".  Fixing this revealed
	that the xstrdup here was also unnecessary, so this patch removes it.

2022-12-07  Alan Modra  <amodra@gmail.com>

	coff make_a_section_from_file tidy
	Also support compressing a few more sections.

		* coffgen.c (make_a_section_from_file): Rename return_section
		to newsect.  Don't try to be clever matching section name.
		Compress .gnu.debuglto_.debug_ and .gnu.linkonce.wi. too.
		Only rename debug sections when decompressing for linker.

2022-12-07  Alan Modra  <amodra@gmail.com>

	gas compress_debug tidy
		* write.c (compress_debug): Don't set up "ob" until after
		seginfo NULL check.  Simplify SEC_CONTENTS test.  Localise
		variables.  Use bfd_debug_name_to_zdebug.

	_bfd_elf_slurp_secondary_reloc_section sanity check
		* elf.c (_bfd_elf_slurp_secondary_reloc_section): Sanity check
		section header against file size.  Avoid overflow in
		reloc_count.

	bfd_compress_section_contents access to elf_section_data
		* compress.c (bfd_compress_section_contents): Don't access
		elf_section_data for non-ELF.

2022-12-07  Alan Modra  <amodra@gmail.com>

	Compression tidy and fixes
	Tidies:
	- Move stuff from bfd-in.h and libbfd.c to compress.c
	- Delete COMPRESS_DEBUG from enum compressed_debug_section_type
	- Move compress_debug field out of link_info to ld_config.
	Fixes:
	- Correct test in bfd_convert_section_setup to use obfd flags,
	  not ibfd.
	- Apply bfd_applicable_file_flags to compression bfd flags added
	  by gas and ld to the output bfd.

	bfd/
		* bfd-in.h (enum compressed_debug_section_type),
		(struct compressed_type_tuple),
		(bfd_get_compression_algorithm),
		(bfd_get_compression_algorithm_name),
		* libbfd.c (compressed_debug_section_names),
		(bfd_get_compression_algorithm),
		(bfd_get_compression_algorithm_name): Move..
		* compress.c: ..to here, deleting COMPRESS_DEBUG from
		enum compressed_debug_section_type.
		(bfd_convert_section_setup): Test obfd flags not ibfd for
		compression flags.
		* elf.c (elf_fake_sections): Replace link_info->compress_debug
		test with abfd->flags test.
		* bfd-in2.h: Regenerate.
	binutils/
		* objcopy.c (copy_file): Tidy setting of bfd compress flags.
		Expand comment.
	gas/
		* write.c (compress_debug): Test bfd compress flags rather than
		flag_compress_debug.
		(write_object_file): Apply bfd_applicable_file_flags to compress
		debug flags added to output bfd.
	include/
		* bfdlink.h (struct bfd_link_info): Delete compress_debug.
	ld/
		* ld.h (ld_config_type): Add compress_debug.
		* emultempl/elf.em: Replace references to link_info.compress_debug
		with config.compress_debug.
		* lexsup.c (elf_static_list_options): Likewise.
		* ldmain.c (main): Likewise.  Apply bfd_applicable_file_flags
		to compress debug flags added to output bfd.

2022-12-07  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-06  H.J. Lu  <hjl.tools@gmail.com>

	bfd: Avoid signed overflow for new_size adjustment
	When bfd_size_type is unsigned 64-bit integer and sizeof is unsigned
	32-bit integer, subtraction in

	*new_size += sizeof (Elf32_External_Chdr) - sizeof (Elf64_External_Chdr);

	will overflow.  Use

	*new_size -= sizeof (Elf64_External_Chdr) - sizeof (Elf32_External_Chdr);

	to avoid overflow.

		PR binutils/29860
		* compress.c (bfd_convert_section_setup): Avoid signed overflow
		for new_size adjustment.

2022-12-06  Tom Tromey  <tromey@adacore.com>

	Cosmetic fix in ppc-sysv-tdep.c
	This is just a couple of cosmetic fixes in ppc-sysv-tdep.c: fixing
	some formatting and correcting a typo.

	Fix operator precedence bug in Rust parser
	PR rust/29859 points out an operator precedence bug in the Rust
	parser.  This patch fixes it and adds a regression test.

2022-12-06  Nick Clifton  <nickc@redhat.com>

	Fix a dereference of NULL when scanning the symbol hashes array in the ARM linker.
		PR 29852
		* elf32-arm.c (cmse_scan): Check for NULL entries in the
		sym_hashes array.
		(elf32_arm_gc_mark_extra_sections): Likewise.

2022-12-06  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix test names in gdb.base/longjmp.exp
	When running test-case gdb.base/longjmp.exp, we have:
	...
	PASS: gdb.base/longjmp.exp: next over setjmp (1)
	  ...
	PASS: gdb.base/longjmp.exp: next over setjmp (2)
	...

	The trailing " (1)" and " (2)" are interpreted as comments rather than parts
	of the test name, and therefore this is a duplicate, which is currently not
	detected by our duplicate detection mechanism (PR testsuite/29772).

	Fix the duplicate by using with_test_prefix.

	Tested on x86_64-linux.

2022-12-06  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Make gdb.base/longjmp.exp FAIL more stable across archs
	When running test-case gdb.base/longjmp.exp on x86_64-linux, the master
	longjmp breakpoint is set using probes and the test-case passes:
	...
	(gdb) PASS: gdb.base/longjmp.exp: next to longjmp (1)
	next^M
	0x00000000004005cc      49        if (setjmp (env) == 0) /* patt1 */^M
	(gdb) PASS: gdb.base/longjmp.exp: next over longjmp(1)
	next^M
	56            resumes++;^M
	(gdb) PASS: gdb.base/longjmp.exp: next into else block (1)
	...

	However, if I disable
	create_longjmp_master_breakpoint_probe, we have instead:
	...
	(gdb) PASS: gdb.base/longjmp.exp: next to longjmp (1)
	next^M
	56            resumes++;^M
	(gdb) FAIL: gdb.base/longjmp.exp: next over longjmp(1)
	...

	At first glance, the failure mode doesn't look too bad: we stop
	a few insns later than the passing scenario.

	For contrast, if we do the same on powerpc64le, the failure mode is:
	...
	(gdb) PASS: gdb.base/longjmp.exp: next to longjmp (1)
	next^M
	^M
	Breakpoint 3, main () at longjmp.c:59^M
	59        i = 1; /* miss_step_1 */^M
	(gdb) FAIL: gdb.base/longjmp.exp: next over longjmp(1)
	...
	Here we only stop because of running into the safety net breakpoint at
	miss_step_1.

	So, how does this happen on x86_64?  Let's look at the code:
	...
	4005c7: e8 94 fe ff ff    call 400460 <_setjmp@plt>
	4005cc: 85 c0             test %eax,%eax
	4005ce: 75 1e             jne  4005ee <main+0x3b>
	4005d0: 8b 05 8e 0a 20 00 mov  0x200a8e(%rip),%eax # 601064 <longjmps>
	4005d6: 83 c0 01          add  $0x1,%eax
	4005d9: 89 05 85 0a 20 00 mov  %eax,0x200a85(%rip) # 601064 <longjmps>
	4005df: be 01 00 00 00    mov  $0x1,%esi
	4005e4: bf 80 10 60 00    mov  $0x601080,%edi
	4005e9: e8 82 fe ff ff    call 400470 <longjmp@plt>
	4005ee: 8b 05 74 0a 20 00 mov  0x200a74(%rip),%eax # 601068 <resumes>
	...
	The next over the longjmp call at 4005e9 is supposed to stop at the longjmp
	target at 4005cc, but instead we stop at 4005ee, where we have the step-resume
	breakpoint inserted by the next.  In other words, we accidentally "return"
	from the longjmp call to the insn immediately after it (even though
	a longjmp is a noreturn function).

	Try to avoid this accident and make the failure mode on x86_64 the same as on
	powerpc64le, by switching the then and else branch.

	Tested on x86_64-linux.

2022-12-06  Xiao Zeng  <zengxiao@eswincomputing.com>

	gdb/riscv: correct dwarf to gdb register number mapping
	According to the riscv psabi, the mapping relationship between the
	DWARF registers and the machine registers is as follows:

	  DWARF Number | Register Name | Description
	  0 - 31       | x0 - x31      | Integer Registers
	  32 - 63      | f0 - f31      | Floating-point Registers

	This is not modelled quite right in riscv_dwarf_reg_to_regnum, the
	DWARF register numbers 31 and 63 are not handled correctly due to a
	use of '<' instead of '<='.  This commit fixes this issue.

2022-12-06  Haochen Jiang  <haochen.jiang@intel.com>

	x86: Remove unnecessary vex.w check for xh_mode in disassembler
	For all the xh_mode usage in table, they are all using %XH, which will
	print "{bad}" while EVEX.W=1. This makes this vex.w check unnecessary.

	opcodes/ChangeLog:

		* i386-dis.c (OP_E_memory): Remove vex.w check for xh_mode.

2022-12-06  Alan Modra  <amodra@gmail.com>

	Get rid of SEC_ELF_COMPRESS
	This flag also isn't needed, except for some sanity checks which we
	can omit.

		* elf.c (elf_fake_sections): Don't set SEC_ELF_COMPRESS for
		compressed debug sections, just leave sh_name as -1.
		(assign_file_positions_for_non_load_sections),
		(assign_file_positions_except_relocs): Decide whether a section
		needs compressing and thus should not have its file offset set
		by looking at sh_name.
		(_bfd_elf_assign_file_positions_for_non_load): Similarly decide
		which sections need compressing.
		* elflink.c (bfd_elf_final_link): Don't test SEC_ELF_COMPRESS.
		* merge.c (_bfd_write_merged_section): Likewise.
		* section.c (SEC_ELF_COMPRESS): Don't define.
		(SEC_ELF_PURECODE): Renumber.
		* bfd-in2.h: Regenerate.

2022-12-06  Alan Modra  <amodra@gmail.com>

	Get rid of SEC_ELF_RENAME
	SEC_ELF_RENAME is a flag used to effect section name changes when
	compressing/decompressing zlib-gnu debug sections.  This can be
	accomplished more directly in one of the objcopy specific bfd
	functions.  Renaming for ld input is simplified too.  Ld input object
	files always have BFD_DECOMPRESS set.

	bfd/
		* compress.c (bfd_convert_section_size): Rename to..
		(bfd_convert_section_setup): ..this.  Handle objcopy renaming
		of compressed/decompressed debug sections.
		* elf.c (_bfd_elf_make_section_from_shdr): Only rename zdebug
		input for linker.
		(elf_fake_sections): Don't handle renaming of debug sections for
		objcopy here.
		* section.c (SEC_ELF_RENAME): Delete.
		* bfd-in2.h: Regenerate.
	binutils/
		* objcopy.c (setup_section): Call bfd_convert_section_setup.
		Don't call bfd_convert_section_size.

2022-12-06  Alan Modra  <amodra@gmail.com>

	Compression header enum
	Define an enum instead of using ELFCOMPRESS_ZLIB and ELFCOMPRESS_ZSTD
	in bfd and binutils, and move some functions from bfd.c to compress.c.
	When looking at the COFF/PE debug compression support, I wondered
	about extending it to support zstd.  I likely won't do that, but
	the compression header ch_type field isn't just ELF specific if these
	headers are to be used in COFF/PE too.

	bfd/
		* bfd.c (bfd_update_compression_header),
		(bfd_check_compression_header, bfd_get_compression_header_size),
		(bfd_convert_section_size, bfd_convert_section_contents): Move to..
		* compress.c: ..here.
		(enum compression_type): New.  Use it throughout file.
		* elf.c (_bfd_elf_make_section_from_shdr): Replace uses of
		ELFCOMPRESS_ZLIB and ELFCOMPRESS_ZSTD with ch_compress_zlib and
		ch_compress_zstd.
		* bfd-in2.h: Regenerate.
	binutils/
		* readelf.c (process_section_headers, dump_section_as_strings),
		(dump_section_as_bytes, load_specific_debug_section): Replace
		uses of ELFCOMPRESS_ZLIB and ELFCOMPRESS_ZSTD with
		ch_compress_zlib and ch_compress_zstd.

2022-12-06  mengqinggang  <mengqinggang@loongson.cn>

	LoongArch: Fix dynamic reloc not generated bug in some cases.
	bfd/ChangeLog:

		* elfnn-loongarch.c (loongarch_elf_relocate_section): Likewise.

2022-12-06  Alan Modra  <amodra@gmail.com>

	PR29855, ch_type in bfd_init_section_decompress_status can be uninitialized
		PR 29855
		* compress.c (bfd_init_section_decompress_status): Set ch_type
		to zero for zlib-gnu case.

2022-12-06  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-05  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/linux-nat: add ptid parameter to linux_xfer_siginfo
	Make the inferior_ptid bubble up to linux_nat_target::xfer_partial.

	Change-Id: I62dbc5734c26648bb465f449c2003c73751cd812

2022-12-05  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/linux-nat: use l linux_nat_get_siginfo in linux_xfer_siginfo
	I noticed we could reduce duplication a bit here.

	Change-Id: If24e54d1dac71b46f7c1f68a18a073d4c084b644

2022-12-05  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/linux-nat: check ptrace return value in linux_nat_get_siginfo
	Not a big deal, but it seems strange to check errno instead of the
	ptrace return value to know whether it succeeded.

	Change-Id: If0a6d0280ab0e5ecb077e546af0d6fe489c5b9fd

2022-12-05  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/linux-nat: don't memset siginfo on failure in linux_nat_get_siginfo
	No caller cares about the value of *SIGINFO on failure.  It's also
	documented in the function doc that *SIGINFO is uninitialized (I
	understand "untouched") on failure.

	Change-Id: I5ef38a5f58e3635e109b919ddf6f827f38f1225a

2022-12-05  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/linux-nat: bool-ify linux_nat_get_siginfo
	Change return type to bool.

	Change-Id: I1bf0360bfdd1b5994cd0f96c268d806f96fe51a4

2022-12-05  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/linux-nat: use get_ptrace_pid in two spots
	No behavior change expected.

	Change-Id: Ifaa64ecd619483646b024fd7c62e571e92a8eedb

2022-12-05  Simon Marchi  <simon.marchi@efficios.com>

	gdb/testsuite: remove perror calls when failing to run
	I noticed that when running these two tests in sequence:

	    Running /home/smarchi/src/binutils-gdb/gdb/testsuite/gdb.ada/arrayptr.exp ...
	    ERROR: GDB process no longer exists
	    ERROR: Couldn't run foo-all
	    Running /home/smarchi/src/binutils-gdb/gdb/testsuite/gdb.ada/assign_1.exp ...

	The results in gdb.sum are:

	    Running /home/smarchi/src/binutils-gdb/gdb/testsuite/gdb.ada/arrayptr.exp ...
	    PASS: gdb.ada/arrayptr.exp: scenario=all: compilation foo.adb
	    ERROR: GDB process no longer exists
	    UNRESOLVED: gdb.ada/arrayptr.exp: scenario=all: gdb_breakpoint: set breakpoint at foo.adb:40 (eof)
	    ERROR: Couldn't run foo-all
	    Running /home/smarchi/src/binutils-gdb/gdb/testsuite/gdb.ada/assign_1.exp ...
	    UNRESOLVED: gdb.ada/assign_1.exp: changing the language to ada
	    PASS: gdb.ada/assign_1.exp: set convenience variable $xxx to 1

	The UNRESOLVED for arrayptr.exp is fine, as GDB crashes in that test,
	while trying to run to main.  However, the UNRESOLVED in assign_1.exp
	doesn't make sense, GDB behaves as expected in that test:

	    (gdb) set lang ada^M
	    (gdb) UNRESOLVED: gdb.ada/assign_1.exp: changing the language to ada
	    print $xxx := 1^M
	    $1 = 1^M
	    (gdb) PASS: gdb.ada/assign_1.exp: set convenience variable $xxx to 1

	The problem is that arrayptr.exp calls perror when failing to run to
	main, then returns.  perror makes it so that the next test (as in
	pass/fail) will be recorded as UNRESOLVED.  However, here, the next test
	(as in pass/fail) is in the next test (as in .exp).  Hence the spurious
	UNRESOLVED in assign_1.exp.

	These perror when failing to run to X are not really useful, especially
	since runto records a FAIL on error, by default.  Remove all the
	perrors on runto failure I could find.

	When there wasn't one already, add a return statement when failing to
	run, to avoid running the test of the test unnecessarily.

	I thought of adding a check ran between test (in gdb_finish
	probably) where we would emit a warning if errcnt > 0, meaning a test
	quit and left a perror "active".  However, reading that variable would
	poke into the DejaGNU internals, not sure it's a good idea.

	Change-Id: I2203df6d06e199540b36f56470d1c5f1dc988f7b

2022-12-05  Luis Machado  <luis.machado@arm.com>

	Add missing newline to gdbarch_tdep debugging output
	The missing newline causes testsuite issues because the gdb prompt gets output
	to an unexpected location.

2022-12-05  Nick Clifton  <nickc@redhat.com>

	Prevent an illegal memory access when comparing the prefix of a section name regexp.
		PR 29849
		* ldlang.c (spec_match): Check that there is sufficient length in
		the target name to match the spec's prefix.

2022-12-05  Martin Liska  <mliska@suse.cz>

	testsuite: support mold linker
	Mold linker demotes symbols like main to be local and the patch
	adjusts expected output from nm.

	Moreover, simplify the regex patterns.

2022-12-05  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>

	gdbarch.py: Fix indentation in the generated set_gdbarch_* definitions
	Use as many tabs as possible for indentation and pad with spaces to keep
	the argument aligned to the opening parenthesis in the line above.

	Co-developed-by: Simon Marchi <simon.marchi@efficios.com>
	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-12-05  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>

	gdbarch.py: Fix indentation in the generated gdbarch_dump function
	Use tab for the first eight spaces of indentation, and align the gdb_printf
	arguments to the open parenthesis of the function call.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-12-05  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>

	gdb: Update my email address in MAINTAINERS

2022-12-05  Jan Beulich  <jbeulich@suse.com>

	gas: add Dwarf line number test for .macro expansions
	Before fiddling with the code let's put in place a test covering what
	PR/gas 16908 aimed at.

	gas: squash (some) .linefile from listings
	Not so long ago we started to insert these artificially when expanding
	certain macro-like constructs; zap them as cluttering what actually
	results from user input.

2022-12-05  Jan Beulich  <jbeulich@suse.com>

	gas: avoid inserting extra newline in buffer_and_nest()
	In "-alm" listings I've noticed an odd blank line following the inserted
	.linefile one. This results from the explicit NL inserted being
	redundant with the one left in place from the original input line by all
	respective callers. Note that we need to compensate for the removed line
	by bumping the directive argument (which in turn is decremented again in
	s_linefile() before calling new_logical_line_flags(), and I have to
	confess that when putting together the original change I was a little
	puzzled by the imbalance of increments/decrements, but then I forgot to
	actually go look for the cause).

	While there also switch to sb_add_string() instead of effectively open-
	coding it to some degree.

2022-12-05  Jan Beulich  <jbeulich@suse.com>

	Arm: .noinit and .persistent are not supported for Linux targets
	Respective tests being run means guaranteed failures.

2022-12-05  Nick Clifton  <nickc@redhat.com>

	Fix an illegal memory access when parsing a corrupt VMS Alpha file.
		PR 29848
		* vms-alpha.c (parse_module): Fix potential out of bounds memory
		access.

2022-12-05  Andrew Burgess  <aburgess@redhat.com>

	libopcodes/mips: add support for disassembler styling
	This commit adds disassembler styling support for MIPS.  After this
	commit objdump and GDB will style disassembler output.

	This is a pretty straight forward change, we switch to use the
	disassemble_info::fprintf_styled_func callback, and pass an
	appropriate style through as needed.  No additional tricks were
	needed (compared to say i386, or ARM).

	Tested by running all of the objdump commands used by the gas
	testsuite and manually inspecting the styled output, everything looks
	reasonable, though I'm not a MIPS expert, so it is possible that I've
	missed some corner cases.  Worst case though is that something will be
	styled incorrectly, the actual content should be unchanged.

	All the gas, ld, and binutils tests still pass for me.

2022-12-05  Andrew Burgess  <aburgess@redhat.com>

	opcodes/mips: use .word/.short for undefined instructions
	While working on disassembler styling for MIPS, I noticed that
	undefined instructions are printed by the disassembler as raw number
	with no assembler directive prefix (e.g. without .word or .short).

	I think adding something like .word, or .short, helps to make it
	clearer the size of the value that is being displayed, and is inline
	with what many of the other libopcode disassemblers do.

	In this commit I've added the .word and .short directives, and updated
	all the tests that I spotted that failed as a result.

2022-12-05  Alan Modra  <amodra@gmail.com>

	Re: Renaming .debug to .zdebug and vice versa
		* compress.c (bfd_debug_name_to_zdebug): Fix C++ compile error.
		(bfd_zdebug_name_to_debug): Likewise.
		* bfd-in2.h: Regenerate.

2022-12-05  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-04  Alan Modra  <amodra@gmail.com>

	PR29846, segmentation fault in objdump.c compare_symbols
	Fixes a fuzzed object file problem where plt relocs were manipulated
	in such a way that two synthetic symbols were generated at the same
	plt location.  Won't occur in real object files.

		PR 29846
		PR 20337
		* objdump.c (compare_symbols): Test symbol flags to exclude
		section and synthetic symbols before attempting to check flavour.

2022-12-04  Alan Modra  <amodra@gmail.com>

	COFF compressed debug support
	Since commit 4bea06d73c04 COFF support for compressed debug sections
	has been broken due to the "flags" variable not getting SEC_HAS_CONTENTS.

		* coffgen.c (make_a_section_from_file): Correct section flags
		handling.  Delete extraneous condition.  Update error messages
		to be the same as in elf.c.

2022-12-04  Alan Modra  <amodra@gmail.com>

	Renaming .debug to .zdebug and vice versa
	Move a couple of elf.c functions to compress.c.

		* compress.c (bfd_debug_name_to_zdebug): New inline function.
		(bfd_zdebug_name_to_debug): Likewise.
		* elf.c (convert_debug_to_zdebug, convert_zdebug_to_debug): Delete.
		(_bfd_elf_make_section_from_shdr, elf_fake_sections),
		(_bfd_elf_assign_file_positions_for_non_load): Adjust to suit.
		* coffgen.c (make_a_section_from_file): Use new inlines here.

2022-12-04  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-03  H.J. Lu  <hjl.tools@gmail.com>

	Revert "ld: Add .note.GNU-stack to ld-plugin/dummy.s"
	This reverts commit 44e59b5a7d8a874f6546a1471b8a003911853aa0.

	It works only for ELF targets.

2022-12-03  H.J. Lu  <hjl.tools@gmail.com>

	ld: Add .note.GNU-stack to ld-plugin/dummy.s
		* testsuite/ld-plugin/dummy.s: Add .note.GNU-stack.

2022-12-03  H.J. Lu  <hjl.tools@gmail.com>

	x86: Allow 16-bit register source for LAR and LSL
	Since LAR and LSL only access 16 bits of the source operand, regardless
	of operand size, allow 16-bit register source for LAR and LSL, and always
	disassemble LAR and LSL with 16-bit source operand.

	gas/

		PR gas/29844
		* testsuite/gas/i386/i386.s: Add tests for LAR and LSL.
		* testsuite/gas/i386/x86_64.s: Likewise.
		* testsuite/gas/i386/intelbad.s: Remove "lar/lsl eax, ax".
		* testsuite/gas/i386/i386-intel.d: Updated.
		* testsuite/gas/i386/i386.d: Likewise.
		* testsuite/gas/i386/intel-intel.d: Likewise.
		* testsuite/gas/i386/intel.d: Likewise.
		* testsuite/gas/i386/intelbad.l: Likewise.
		* testsuite/gas/i386/x86_64-intel.d: Likewise.
		* testsuite/gas/i386/x86_64.d: Likewise.

	opcodes/

		PR gas/29844
		* i386-dis.c (MOD_0F02): Removed.
		(MOD_0F03): Likewise.
		(dis386_twobyte): Restore larS and lslS.
		(mod_table): Remove MOD_0F02 and MOD_0F03.
		* i386-opc.tbl: Allow 16-bit register source for LAR and LSL.
		* i386-tbl.h: Regenerated.

2022-12-03  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-02  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/linux-nat: add pid parameter to linux_proc_xfer_memory_partial
	Add a pid parameter to linux_proc_xfer_memory_partial, making the
	inferior_ptid reference bubble up close to the target_ops::xfer_partial
	boundary.  No behavior change expected.

	Change-Id: I58171b00ee1bba1ea22efdbb5dcab8b1ab3aac4c

2022-12-02  Simon Marchi  <simon.marchi@efficios.com>

	gdb: add some debug statements to solib-svr4.c
	Add a few debug statements that were useful to me when debugging why the
	glibc probes interface wasn't getting used.

	Change-Id: Ic20744f9fc80a90f196896b0829949411620c540

2022-12-02  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: merge solib-frv aix-solib debug options into "set/show debug solib"
	solib implementations are typically used one at a time.  So it will be
	rare that you will want to enable debug for one solib kind, and
	absolutely want to keep the others disabled.  To make things simpler,
	instead of adding separate variables / macros / commands for each solib
	implementation, merge the existing ones (frv and aix) into a unified
	"set/show debug solib", with the solib_debug_printf macro.

	Change-Id: I6e18bbc7401724f37ae66681badb079d75ecf7fa

2022-12-02  Nick Clifton  <nickc@redhat.com>

	Add Jan Beulich as an x86_64 maintainer.

2022-12-02  Jan Beulich  <jbeulich@suse.com>

	x86: drop most OPERAND_TYPE_* (and rework the rest)
	With the general use of C99 there's no need anymore to have i386-gen
	produce these. For more frequently used ones introduce local #define-s,
	while others are simply spelled out directly. While doing this move
	some static constants into more narrow scopes.

	Note that as a "side effect" this corrects type_names[]'es imm8s entry.

2022-12-02  Jan Beulich  <jbeulich@suse.com>

	x86: simplify and slightly correct XCHG vs NOP checking
	For one, because of CheckRegSize, there's no need to check the size of
	both (register) operands. And then in process_suffix() check opcode
	space rather than the (potentially ambiguous) extension opcode.

	x86: also use D for XCHG and TEST
	Leverage the C (commutative) attribute to also reduce the number of XCHG
	and TEST templates we have. This way the reg <-> r/m (and reg <-> reg for
	XCHG) forms can also be folded into a single template each, utilizing D.

2022-12-02  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Prevent timeout in gdb.ada/float-bits.exp
	Recent commit 32a5aa26256 ("[gdb/testsuite] Fix gdb.ada/float-bits.exp
	for powerpc64le") started using command "maint print architecture", which
	produces ~275 lines.

	Rewrite the corresponding gdb_test_multiple to read line-by-line, to prevent
	timeouts on slower test setups.

	Note that this doesn't fix a timeout in the test-case on aarch64 due to:
	...
	gdbarch_dump: read_core_file_mappings = <0x817438>
	(gdb) aarch64_dump_tdep: Lowest pc = 0x0x8000
	...

	Tested on x86_64-linux.

2022-12-02  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-12-01  Carl Love  <cel@us.ibm.com>

	PowerPC, fix gdb.reverse/finish-reverse-bkpt.exp and gdb.reverse/next-reverse-bkpt-over-sr.exp
	The tests set a break point with the command break *func.  This sets a
	breakpoint on the first instruction of the function.  PowerPC uses
	Global Entry Points (GEP) and Local Entry Points (LEP).  The first
	instruction in the function is the GEP.  The GEP sets up register
	r2 before reaching the LEP.  When the function is called with func() the
	function is entered via the LEP and the test fails because GDB does not
	see the breakpoint on the GEP.  However, if the function is called via a
	function pointer, execution begins at the GEP as the test expects.

	Currently finish-reverse-bkpt.exp uses source file finish-reverse.c and
	next-reverse-bpkt-over-sr.exp uses source file step-reverse.c  A new
	source file was created for tests finish-reverse-bkpt.exp and
	next-reverse-bkpt-over-sr.exp.  The new files use the new function
	pointer method to call the functions so the tests will work correctly on
	both PowerPC with a GEP and LEP as well as on other systems.  The GEP is
	the same as the LEP on non PowerPC systems.

	The expect files were changed to use the new source files and to set the
	initial break point for the rest of the test on the function pointer call
	for the function.

	This patch fixes two PowerPC test failures in each of the tests
	gdb.reverse/finish-reverse-bkpt.exp and
	gdb.reverse/next-reverse-bkpt-over-sr.exp.

	Patch tested on PowerPC and Intel X86-64 with no regressions.

	Reviewed-By: Bruno Larsen <blarsen@redhat.com>

2022-12-01  Tom Tromey  <tromey@adacore.com>

	Remove call to registers_changed from windows-nat.c
	I noticed that windows_nat_target::interrupt calls registers_changed.
	However, I don't think there's any reason to do this, because this
	will happen automatically when the inferior stop is processed.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-12-01  Tom Tromey  <tromey@adacore.com>

	Remove the_windows_nat_target global
	I belatedly realized that the "the_windows_nat_target" global isn't
	really necessary.  It's only used in one place, where 'this' would be
	simpler and clearer.  This patch removes the global entirely.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-12-01  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: make frame_register static
	It is only used inside frame.c.

	Change-Id: I44eb46a5992412f8f8b4954b2284b0ef3b549504

2022-12-01  Tom Tromey  <tromey@adacore.com>

	Add name canonicalization for C
	PR symtab/29105 shows a number of situations where symbol lookup can
	result in the expansion of too many CUs.

	What happens is that lookup_signed_typename will try to look up a type
	like "signed int".  In cooked_index_functions::expand_symtabs_matching,
	when looping over languages, the C++ case will canonicalize this type
	name to be "int" instead.  Then this method will proceed to expand
	every CU that has an entry for "int" -- i.e., nearly all of them.  A
	crucial component of this is that the caller, objfile::lookup_symbol,
	does not do this canonicalization, so when it tries to find the symbol
	for "signed int", it fails -- causing the loop to continue.

	This patch fixes the problem by introducing name canonicalization for
	C.  The idea here is that, by making C and C++ agree on the canonical
	name when a symbol name can have multiple spellings, we avoid the bad
	behavior in objfile::lookup_symbol (and any other such code -- I don't
	know if there is any).

	Unlike C++, C only has a few situations where canonicalization is
	needed.  And, in particular, due to the lack of overloading (thus
	avoiding any issues in linespec) and due to the way c-exp.y works, I
	think that no canonicalization is needed during symbol lookup -- only
	during symtab construction.  This explains why lookup_name_info is not
	touched.

	The stabs reader is modified on a "best effort" basis.

	The DWARF reader needed one small tweak in dwarf2_name to avoid a
	regression in dw2-unusual-field-names.exp.  I think this is adequately
	explained by the comment, but basically this is a scenario that should
	not occur in real code, only the gdb test suite.

	lookup_signed_typename is simplified.  It used to search for two
	different type names, but now gdb can search just for the canonical
	form.

	gdb.dwarf2/enum-type.exp needed a small tweak, because the
	canonicalizer turns "unsigned integer" into "unsigned int integer".
	It seems better here to use the correct C type name.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29105
	Tested-by: Simon Marchi <simark@simark.ca>
	Reviewed-by: Andrew Burgess <aburgess@redhat.com>

2022-12-01  Tom Tromey  <tromey@adacore.com>

	Refactor cooked_index::do_finalize
	This refactors cooked_index::do_finalize, reordering an 'if' to make
	it a little less redundant.  This change makes a subsequent patch
	easier to read.

	Reviewed-by: Andrew Burgess <aburgess@redhat.com>

2022-12-01  Tom Tromey  <tromey@adacore.com>

	Remove language check from dwarf2_compute_name
	dwarf2_compute_name has a redundant check of the CU's language -- this
	is also checked in dwarf2_canonicalize_name.  Removing this slightly
	simplifies a future patch.

	Reviewed-by: Andrew Burgess <aburgess@redhat.com>

2022-12-01  Simon Marchi  <simon.marchi@efficios.com>

	gdb/dwarf: add some QUIT macros
	While testing the fix for PR 29105, I noticed I couldn't ctrl-C my way
	out of GDB expanding many symtabs.  GDB was busy in a loop in
	cooked_index_functions::expand_symtabs_matching.  Add a QUIT there.  I
	also happened to see a spot in
	cooked_index_functions::expand_matching_symbols where a QUIT would be
	useful too, since we iterate over a potentially big number of index
	entries and expand CUs in the loop.  Add one there too.

	Change-Id: Ie1d650381df7f944c16d841b3e592d2dce7306c3
	Approved-By: Kevin Buettner <kevinb@redhat.com>

2022-12-01  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove prune_threads in thread_db_target::update_thread_list
	Pedro mentioned that this prune_threads call in
	thread_db_target::update_thread_list was not needed, and it was probably
	an oversight to leave it there in the work following commit e8032dde10b
	("Push pruning old threads down to the target").  That commit changed
	the "find new threads" target operation to "update thread list", making
	the target responsible of adding new threads and removing exited
	threads, rather than just adding new threads.  Commit e8032dde10b moved
	the prune_threads calls previously done in common code into each
	target's update_thread_list method, in order to keep the existing
	behavior, which is why this prune_threads call ended up there.

	In the mean time, the linux-nat target was taught to update_thread_list,
	and thread_db_target::update_thread_list defers to that for any live
	inferior, so the prune_threads call is not needed there.  Otherwise, the
	thread_db_target::update_thread_list implementation based on
	td_ta_thr_iter_p only knows how to add new threads, not how to delete
	exited threads, but that is only used for non-live inferiors, where
	threads can't exit anyway.  So the prune_threads call is not needed for
	that case either.

	Change-Id: I127fd4f84c25086f97853dadf34c5cec6816840d
	Approved-By: Pedro Alves <pedro@palves.net>

2022-12-01  H.J. Lu  <hjl.tools@gmail.com>

	opcodes: Remove i386-init.h and i386-tbl.h from HFILES
	i386-init.h and i386-tbl.h are generated files.  There is nothing to
	translate.  Remove them from HFILES (POTFILES).

		* Makefile.am (HFILES): Remove i386-init.h and i386-tbl.h.
		* Makefile.in: Regenerated.
		* po/POTFILES.in: Likewise.

2022-12-01  Tom Tromey  <tromey@adacore.com>

	Avoid timeouts in gdb.compile
	PR compile/29541 points out that some of the C++ tests in gdb.compile
	will time out when the glibc debuginfo is installed.  This was
	interfering with my hacking on gdb by making test runs extremely long,
	so I looked into it.

	Internally the bug seems to be that gdb tries to convert multiple
	symbols named "var" via the compiler interface; one such symbol (I
	didn't track it down too far) causes the C++ compiler plugin to crash.

	Unfortunately, the crash is reported as a timeout, as the gdb side of
	the plugin simply hangs.  This seems like a bug in the plugin RPC
	mechanism and, worse, apparently when I wrote this stuff I didn't
	really consider error reporting very much at all, so gdb can't really
	detect failures in the first place.

	Anyway... this patch works around the timeout by compiling a simple
	test that should provoke this bug, and then using "untested" if it
	notices a GCC crash.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29541

2022-12-01  Tom Tromey  <tromey@adacore.com>

	Remove obsolete check from skip_compile_feature_tests
	skip_compile_feature_tests checks for "Command not supported on this
	host", but this error was removed by commit e8d8cce6 ("Import mkdtemp
	gnulib module, fix mingw build").  This patch removes the obsolete
	test.

	Remove one copy of skip_compile_feature_tests
	I noticed that there are two identical copies of
	skip_compile_feature_tests in the test suite.  This removes one from
	gdb.exp, in favor of the one in compile-support.exp.

2022-12-01  Clément Chigot  <chigot@adacore.com>

	binutils: improve holes detection in .debug_loclists.
	The previous warnings about holes in .debug_loclists sections don't
	take into account the headers of each CU and could include the locviews
	if they precede the loclist.

	The following warning can be triggered between two CU.
	    ... <previous CU views> ...
	    0000001d <End of list>

	    0000002a v000000000000000 v000000000000000 location view pair
	    0000002c v000000000000000 v000000000000000 location view pair

	readelf: Warning: There is a hole [0x1e - 0x2e] in .debug_loclists section.
	    0000002e v000000000000000 v000000000000000 views at 0000002a for:
	    ...

	But [0x1e - 0x2a] corresponds to the CU header and  [0x2a - 0x2e] are
	the locviews.  Thus there is no hole here.

	binutils/ChangeLog:

		* dwarf.c (display_debug_loc): Adjust holes detections for
		headers and locviews.

2022-12-01  Nick Clifton  <nickc@redhat.com>

	Fix verilog output when the width is > 1.
		PR 25202
	bfd	* bfd.c (VerilogDataEndianness): New variable.
		(verilog_write_record): Use VerilogDataEndianness, if set, to
		choose the endianness of the output.
		(verilog_write_section): Adjust the address by the data width.

	binutils* objcopy.c (copy_object): Set VerilogDataEndianness to the
		endianness of the input file.
		(copy_main): Verifiy the value set by the --verilog-data-width
		option.
		* testsuite/binutils-all/objcopy.exp: Add tests of the new behaviour.
		* testsuite/binutils-all/verilog-I4.hex: New file.

2022-12-01  Jan Beulich  <jbeulich@suse.com>

	x86: rework of match_template()'s suffix checking
	(Ab)using i386_opcode_modifier for this has been overkill, as the logic
	doesn't really require the full structure. With the removal of
	LONG_DOUBLE_MNEM_SUFFIX and No_ldSuf there's no good reason at all
	anymore to pull out such a loop invariant: We're dealing a check of a
	bit in the loop for a simple comparison. Do the original compares inside
	the loop, thus also making it easier to understand what is actually
	being checked.

	x86: drop No_ldSuf
	With LONG_DOUBLE_MNEM_SUFFIX gone there'salso no use for No_ldSuf
	anymore.

	x86/Intel: drop LONG_DOUBLE_MNEM_SUFFIX
	With the removal of its use for FPU insns the suffix is now finally
	properly misnamed. Drop its use altogether, replacing it by a separate
	boolean instead.

	x86/Intel: restrict use of LONG_DOUBLE_MNEM_SUFFIX
	As a comment near the top of match_template() already says: We really
	only need this pseudo-suffix for far branch handling. Stop "deriving" it
	for floating point insns. (Don't bother renaming the now properly
	misnamed LONG_DOUBLE_MNEM_SUFFIX, to e.g. FAR_BRANCH_SUFFIX - it's going
	to disappear anyway.)

2022-12-01  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Wait longer for core generation
	When I run the gdb testsuite on a powerpc64le-linux system with (slow) nfs
	file system, I run into timeouts due to core generation, like for instance:
	...
	(gdb) gcore $outputs/gdb.ada/task_switch_in_core/crash.gcore^M
	FAIL: gdb.ada/task_switch_in_core.exp: save a corefile (timeout)
	...

	Fix this by using with_timeout_factor 3 in gdb_gcore_cmd.

	Tested on powerpc64le-linux.
	Approved-By: Tom Tromey <tom@tromey.com>

2022-12-01  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.ada/float-bits.exp for powerpc64le
	On powerpc64le-linux, I run into:
	...
	(gdb) print 16llf#4000921fb54442d18469898cc51701b8#^M
	$9 = <invalid float value>^M
	(gdb) FAIL: gdb.ada/float-bits.exp: print \
	  16llf#4000921fb54442d18469898cc51701b8#
	...

	The problem is that we're using a hex string for the 128-bit IEEE quad long
	double format, but the actual long double float format is:
	...
	gdbarch_dump: long_double_format = floatformat_ibm_long_double_little^M
	...

	Fix this by using the hex string obtained by compiling test.c:
	...
	long double a = 5.0e+25L;
	...
	like so:
	...
	$ gcc -mlittle test.c -c -g
	...
	and running gdb:
	...
	$ gdb -q -batch test.o -ex "p /x a"
	$1 = 0xc1e1c000000000004544adf4b7320335
	...
	and likewise for -mbig:
	...
	$ gdb -q -batch test.o -ex "p /x a"
	$1 = 0x4544adf4b7320335c1e1c00000000000
	...

	Tested on powerpc64le-linux.

	I excercised the case of floatformat_ibm_long_double_big by
	using "set endian big" in the test-case.

	Note that for this patch to work correctly, recent commit aaa79cd62b8 ("[gdb]
	Improve printing of float formats") is required.

	PR testsuite/29816
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29816
	Approved-By: Tom Tromey <tom@tromey.com>

2022-12-01  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-30  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix DUPLICATEs in s390-multiarch.exp
	On s390x-linux, I run into:
	...
	DUPLICATE: gdb.arch/s390-multiarch.exp: Linux v2
	DUPLICATE: gdb.arch/s390-multiarch.exp: Linux v2
	DUPLICATE: gdb.arch/s390-multiarch.exp: Linux v2
	...

	Fix this by using with_test_prefix.

	Tested on s390x-linux.

2022-11-30  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Enable gdb.arch/s390-disassembler-options.exp for --enable-targets=all
	On s390x-linux, I run into:
	...
	DUPLICATE: gdb.arch/s390-disassembler-options.exp: \
	  show disassembler-options esa
	...

	First, reproduce this on x86_64-linux with --enable-targets=all, by replacing
	the test for 'istarget "s390*-*-*"' with a test for 'get_set_option_choices
	"set architecture" "s390"'.

	Fix the DUPLICATE by using with_test_prefix.

	Also modernize the test-case by using clean_restart instead of gdb_exit/gdb_start.

	Tested on x86_64-linux.

2022-11-30  Michael Matz  <matz@suse.de>

	section-select: Fix exclude-file-3
	this testcase wasn't correctly testing everything, it passed, even
	though sections from an excluded file were included.  Fixing this
	reveals a problem in the new section selector.  This fixes that as
	well.

	section-select: Remove unused code
	walk_wild_file, hence walk_wild_section and walk_wild_section_handler
	aren't called with the prefix tree.  Hence initialization of the latter
	and all potential special cases for it aren't used anymore.  That also
	removes the need to handler_data[] and some associated helper functions.
	So, remove all of that.

2022-11-30  Michael Matz  <matz@suse.de>

	section-select: Implement a prefix-tree
	Now that we have a list of potentially matching sections per wild
	statement we can actually pre-fill that one by going once over all input
	sections and match their names against a prefix-tree that points to the
	potentially matching wild statements.

	So instead of looking at all sections names for each glob for each wild
	statement we now look at the sections only once and then only check
	against those globs that have a possibility of a match at all (usually
	only one or two).

	This pushes the whole section selection off the profiles.

2022-11-30  Michael Matz  <matz@suse.de>

	section-select: Completely rebuild matches
	The check_relocs callback (and others) might have created new
	section behind our back and some of them (e.g. on powerpc the
	"linker stubs" .got) need to come in front of all others, despite
	being created late (a symptom would be "TOC opt*" failing on powerpc).

	This resets all section matches before updating for newly created
	sections (i.e. completely rebuilds the matches).

2022-11-30  Michael Matz  <matz@suse.de>

	section-select: Lazily resolve section matches
	and remember the results.  Before this the order of section matching
	is basically:

	  foreach script-wild-stmt S
	    foreach pattern P of S
	      foreach inputfile I
	        foreach section S of I
		  match S against P
		    if match: do action for S

	And this process is done three or four times: for each top-level call to
	walk_wild() or wild(), that is: check_input_sections, lang_gc_sections,
	lang_find_relro_sections and of course map_input_to_output_sections.

	So we iterate over all sections of all files many many times (for each
	glob).  Reality is a bit more complicated (some special glob types don't
	need the full iteration over all sections, only over all files), but
	that's the gist of it.

	For future work this shuffles the whole ordering a bit by lazily doing
	the matching process and memoizing results, trading a little memory for
	a 75% speedup of the overall section selection process.

	This lazy resolution introduces a problem with sections added late
	that's corrected in the next patch.

2022-11-30  Tom Tromey  <tromey@adacore.com>

	Bounds check access to Ada task state names
	While looking into Ada tasking a little, I noticed that no bounds
	checking is done on accesses to the Ada task state names arrays.  This
	isn't a problem currently, but if the runtime ever added numbers -- or
	if there was some kind of runtime corruption -- it could cause a gdb
	crash.

	This patch adds range checking.  It also adds a missing _() call when
	printing from the 'task_states' array.

2022-11-30  Tom Tromey  <tromey@adacore.com>

	Use ui_file_up in mi_interp
	This changes mi_interp to use ui_file_up rather than explicit
	management.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-11-30  Tom Tromey  <tromey@adacore.com>

	Rename fields of cli_interp_base::saved_output_files
	This renames the fields of cli_interp_base::saved_output_files, as
	requested by Simon.  I tried to choose names that more obviously
	reflect what the field is used for.  I also added a couple of
	comments.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-11-30  Tom de Vries  <tdevries@suse.de>

	[gdb] Improve printing of float formats
	Currently, on x86_64, a little endian target, I get:
	...
	$ gdb -q -batch -ex "maint print architecture" | grep " = floatformat"
	gdbarch_dump: bfloat16_format = floatformat_bfloat16_big
	gdbarch_dump: double_format = floatformat_ieee_double_big
	gdbarch_dump: float_format = floatformat_ieee_single_big
	gdbarch_dump: half_format = floatformat_ieee_half_big
	gdbarch_dump: long_double_format = floatformat_i387_ext
	...
	which suggests big endian.

	This is due to this bit of code in pformat:
	...
	    /* Just print out one of them - this is only for diagnostics.  */
	    return format[0]->name;
	...

	Fix this by using gdbarch_byte_order to pick the appropriate index, such that
	we have the more accurate:
	...
	gdbarch_dump: bfloat16_format = floatformat_bfloat16_little
	gdbarch_dump: half_format = floatformat_ieee_half_little
	gdbarch_dump: float_format = floatformat_ieee_single_little
	gdbarch_dump: double_format = floatformat_ieee_double_little
	gdbarch_dump: long_double_format = floatformat_i387_ext
	...

	Tested on x86_64-linux.

2022-11-30  Alan Modra  <amodra@gmail.com>

	Correct ordering problem in comm-data.exp
		* testsuite/ld-elf/comm-data.exp: Build libcomm-data.so before
		attempting to read it to set ELF64.

	regen SRC-POTFILES.in

2022-11-30  Jan Beulich  <jbeulich@suse.com>

	x86/Intel: adjustment to restricted suffix derivation
	In "x86/Intel: restrict suffix derivation" I think I screwed up
	slightly, bringing a piece of code out of sync with its comment, and
	resulting in a suffix potentially being derived when one isn't needed.

2022-11-30  Jan Beulich  <jbeulich@suse.com>

	x86: clean up after removal of support for gcc <= 2.8.1
	At the very least a comment in process_operands() is stale. Beyond that
	there are effectively two options:
	1) It is possible that FADDP and FMULP were mistakenly not marked as
	   being in need of dealing with the compiler anomaly, and hence the
	   respective templates weren't removed at the time when they should
	   have been.
	2) It is also possible that there are indeed uses known beyond compiler
	   generated output for these two commutative opcodes, and hence the
	   templates need to stay.
	To be on the safe side assume 2: Update the comment and fold the
	templates into their "normal" ones (utilizing D), adjusting consuming
	code accordingly.

	For FMULP also add a comment paralleling a similar one FADDP has.

2022-11-30  Jan Beulich  <jbeulich@suse.com>

	x86: drop FloatR
	There are just 4 templates using it, which can be easily identified by
	other means, as D is set only on a very limited number of FPU templates.
	Also move the respective conditional out of the code path taken by all
	"reverse match" insns (it probably should have been this way already
	before, to avoid the one conditional in the common case).

	With this the templates which had FloatR dropped no longer differ from
	their AT&T syntax + mnemonic counterparts - the only difference is now
	which of the two would be recognized. For this, however, we don't need
	two templates - we can simply arrange the condition for setting
	Opcode_FloatR accordingly.

2022-11-30  Jan Beulich  <jbeulich@suse.com>

	x86: extend FPU test coverage for AT&T / Intel mnemonic differences
	Before touching the templates, let's ensure we actually cover things:
	For one FSUB{,R} and FDIV{,R} would better be tested with operands in
	both possible orders. And then -mmnemonic=intel wasn't tested at all.

2022-11-30  Joel Brobecker  <brobecker@adacore.com>

	src-release.sh: Fix gdb source tarball build failure due to libsframe
	This script was recently changed as follow:

	    | commit e619dddb3a45780ae66d762756882a3b896b617d
	    | Date:   Tue Nov 15 15:07:13 2022 -0800
	    | Subject: src-release.sh: Add libsframe
	    |
	    | Add libsframe to the list of top level directories that will be included
	    | in a release.

	Since then, the gdb source tarball has been failing with the error
	below during the "make configure-host configure-target" phase:

	    | make[3]: *** No rule to make target '../libsframe/libsframe.la',
	    |     needed by 'libbfd.la'.  Stop.
	    | make[3]: Leaving directory '/tmp/gdb-public/bfd'

	This patch fixes the issue by adding libsframe to the list of
	GDB_SUPPORT_DIRS, similar to what was done for BINUTILS.

	ChangeLog:

	        * src-release.sh (GDB_SUPPORT_DIRS): Add libsframe.

2022-11-30  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-29  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/vla-optimized-out.exp for ppc64le
	On powerpc64le-linux, I run into:
	...
	(gdb) PASS: gdb.base/vla-optimized-out.exp: o1: printed optimized out vla
	p sizeof (a)^M
	$2 = <optimized out>^M
	(gdb) FAIL: gdb.base/vla-optimized-out.exp: o1: \
	  printed size of optimized out vla
	...

	The problem happens as follows.

	In order to find the size of the optimized out vla, gdb needs to evaluate:
	...
	<155> DW_AT_upper_bound : 13 byte block: f3 1 53 23 1 8 20 24 8 20 26 31 1c \
	  (DW_OP_GNU_entry_value: (DW_OP_reg3 (r3)); DW_OP_plus_uconst: 1;
	   DW_OP_const1u: 32; DW_OP_shl; DW_OP_const1u: 32; DW_OP_shra; DW_OP_lit1;
	   DW_OP_minus)
	...

	When trying to evaluate DW_OP_GNU_entry_value, it looks for a call site
	matching the pc, but doesn't find it:
	...
	$ gdb -q -batch outputs/gdb.base/vla-optimized-out/vla-optimized-out-o1 \
	  -ex "break f1" -ex run -ex "set debug entry-values 1" -ex "print sizeof (a)"
	Breakpoint 1 at 0x1000067c: file vla-optimized-out.c, line 34.

	Breakpoint 1, f1 (i=5) at vla-optimized-out.c:34
	34      }
	DW_OP_entry_value resolving cannot find DW_TAG_call_site 0x100006b0 in main
	$1 = <optimized out>
	....

	The call site lookup fails because the call site label .LVL4:
	...
	        bl f1    # 11   *call_value_nonlocal_aixdi      [length = 8]
	        nop
	.LVL4:
	...
	is not placed directly after the bl insn.  This is gcc PR target/107909.

	However, after manually fixing the .s file we have instead:
	...
	Cannot find matching parameter at DW_TAG_call_site 0x10000690 at main
	$1 = <optimized out>
	...
	due to the fact that the call site has no call site parameters.

	The call site does have a reference to the corresponding function f1, with
	parameter i, for which we find location list entries:
	...
	  0037 1000067c 10000680 (DW_OP_reg3 (r3))
	  004a 10000680 10000690 (DW_OP_GNU_entry_value: (DW_OP_reg3 (r3));
	                          DW_OP_stack_value)
	...
	and we could use the fact that the current pc is in the 1000067c-10000680
	range, and that that the range starts at the start of the function, to deduce
	that DW_OP_GNU_entry_value: (DW_OP_reg3 (r3)) == DW_OP_reg3 (r3).
	But that's a non-trivial enhancement, filed as enhancement PR symtab/29836.

	Fix this by allowing <optimized out> for target powerpc and the gcc compiler.

	Reviewed-By: Carl Love <cel@us.ibm.com>
	Tested-By: Carl Love <cel@us.ibm.com>
	PR testsuite/29813
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29813

2022-11-29  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: make gdb_unload use gdb_test_multiple
	In the failure seen by Philippe here:

	  https://inbox.sourceware.org/gdb-patches/20221120173024.3647464-1-philippe.waroquiers@skynet.be/

	gdb_unload crashed GDB, leaving no trace in the test results.  Change it
	to use gdb_test_multiple, so that it leaves an UNRESOLVED result.  I
	think it is good practice anyway.

	Make it return the result of gdb_test_multiple directly, change
	gdb.python/py-objfile.exp accordingly.

	Change gdb.base/endian.exp as well to avoid duplicate test names.

	Change gdb.base/gnu-debugdata.exp to avoid recording a test result,
	since gdb_unload does it already now.

	Change-Id: I59a1e4947691330797e6ce23277942547c437a48
	Approved-By: Tom de Vries <tdevries@suse.de>

2022-11-29  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: make gdb_test_multiple return immediately if send_gdb fails
	In the failure seen by Philippe here:

	  https://inbox.sourceware.org/gdb-patches/20221120173024.3647464-1-philippe.waroquiers@skynet.be/

	... the testsuite only outputs PASSes, and an ERROR, resulting from an
	uncaught exception.  This is a bit sneaky, because ERRORs are not
	reported in the test summary.  In certain circumstances, it can be easy
	to miss.

	Normally, gdb_test_multiple outputs an UNRESOLVED when GDB crashes.  But
	this is only if it manages to send the command, and it's that command
	that crashes GDB.  Here, the ERROR is due to the fact that GDB had
	already crashed by the time we entered gdb_test_multiple and tried to
	send a command.  GDB was crashed by the previous "file" command, sent by
	gdb_unload.  Because gdb_unload uses bare expect, it didn't record a
	test failure when crashing GDB (this will be addressed separately).

	In this patch, I propose to make gdb_test_multiple call unresolved
	directly and return -1 send_gdb fails.  This way, if GDB is already
	crashed by the time we enter gdb_test_multiple, it will leave a trace in
	the test results in the form of an UNRESOLVED.  It will also spare us
	the not-so-useful-in-my-opinion TCL backtrace.

	Before, it looks like:

	    ERROR: Couldn't send python print(objfile.filename) to GDB.
	    ERROR: : spawn id exp9 not open
	        while executing
	    "expect {
	    -i exp9 -timeout 10
	            -re ".*A problem internal to GDB has been detected" {
	                fail "$message (GDB internal error)"
	                gdb_internal_error..."
	        ("uplevel" body line 1)
	        invoked from within
	    "uplevel $body" NONE : spawn id exp9 not open

	And after:

	    Couldn't send python print(objfile.filename) to GDB.
	    UNRESOLVED: gdb.python/py-objfile.exp: objfile.filename after objfile is unloaded

	Change-Id: I72af8dc0d687826fc3f76911c27a9e5f91b677ba
	Approved-By: Tom de Vries <tdevries@suse.de>

2022-11-29  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: remove unused gprofng/src/DbeSession.cc.1

2022-11-29  Max Filippov  <jcmvbkbc@gmail.com>

	xtensa: allow dynamic configuration
	Import include/xtensa-dynconfig.h that defines XCHAL_* macros as fields
	of a structure returned from the xtensa_get_config_v<x> function call.
	Define that structure and fill it with default parameter values
	specified in the include/xtensa-config.h.
	Define reusable function xtensa_load_config that tries to load
	configuration and return an address of an exported object from it.
	Define functions xtensa_get_config_v{1,2} that use xtensa_load_config
	to get structures xtensa_config_v{1,2}, either dynamically configured
	or the default.

	bfd/
		* Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Append
		xtensa-dynconfig.c.
		* Makefile.in: Regenerate.
		* configure: Regenerate.
		* configure.ac (xtensa_elf32_be_vec, xtensa_elf32_le_vec): Add
		xtensa-dynconfig.lo to the tb.
		* elf32-xtensa.c (xtensa-config.h): Replace #include with
		xtensa-dynconfig.h.
		(XSHAL_ABI, XTHAL_ABI_WINDOWED, XTHAL_ABI_CALL0): Remove
		definitions.
		* xtensa-dynconfig.c: New file.
		* xtensa-isa.c (xtensa-dynconfig.h): New #include.
		(xtensa_get_modules): New function.
		(xtensa_isa_init): Call xtensa_get_modules instead of taking
		address of global xtensa_modules.

	gas/
		* config/tc-xtensa.c (xtensa-config.h): Replace #include with
		xtensa-dynconfig.h.
		(XTHAL_ABI_WINDOWED, XTHAL_ABI_CALL0, XTENSA_MARCH_EARLIEST):
		Remove definitions.
		* config/tc-xtensa.h (xtensa-config.h): Replace #include with
		xtensa-dynconfig.h.
		* config/xtensa-relax.c (xtensa-config.h): Replace #include with
		xtensa-dynconfig.h.
		(XCHAL_HAVE_WIDE_BRANCHES): Remove definition.

	include/
		* xtensa-dynconfig.h: New file.

	ld/
		* emultempl/xtensaelf.em (xtensa-config.h): Replace #include
		with xtensa-dynconfig.h.
		(XTHAL_ABI_WINDOWED, XTHAL_ABI_CALL0): Remove definitions.

2022-11-29  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-28  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: remove use of then keyword from library files
	The canonical form of 'if' in modern TCL is 'if {} {}'.  But there's
	still a bunch of places in the testsuite where we make use of the
	'then' keyword, and sometimes these get copies into new tests, which
	just spreads poor practice.

	This commit removes all use of the 'then' keyword from the testsuite
	library files (in boards/, config/, and lib/).  Previous commits have
	removed all uses of the 'then' keyword from the test script files,
	this commit just cleans up the library files.

	There should be no changes in what is tested after this commit.

2022-11-28  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: remove use of then keyword from gdb.*/*.exp scripts
	The canonical form of 'if' in modern TCL is 'if {} {}'.  But there's
	still a bunch of places in the testsuite where we make use of the
	'then' keyword, and sometimes these get copies into new tests, which
	just spreads poor practice.

	This commit removes all use of the 'then' keyword from the remaining
	gdb.*/*.exp scripts.  Previous commits have done the bulk of this
	removal, this commit just handles the remaining directories that each
	contain a low number of instances.

	There should be no changes in what is tested after this commit.

2022-11-28  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: remove use of then keyword from gdb.multi/*.exp
	The canonical form of 'if' in modern TCL is 'if {} {}'.  But there's
	still a bunch of places in the testsuite where we make use of the
	'then' keyword, and sometimes these get copies into new tests, which
	just spreads poor practice.

	This commit removes all use of the 'then' keyword from the gdb.multi/
	test script directory.

	There should be no changes in what is tested after this commit.

2022-11-28  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: remove use of then keyword from gdb.fortran/*.exp
	The canonical form of 'if' in modern TCL is 'if {} {}'.  But there's
	still a bunch of places in the testsuite where we make use of the
	'then' keyword, and sometimes these get copies into new tests, which
	just spreads poor practice.

	This commit removes all use of the 'then' keyword from the gdb.fortran/
	test script directory.

	There should be no changes in what is tested after this commit.

2022-11-28  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: remove use of then keyword from gdb.disasm/*.exp
	The canonical form of 'if' in modern TCL is 'if {} {}'.  But there's
	still a bunch of places in the testsuite where we make use of the
	'then' keyword, and sometimes these get copies into new tests, which
	just spreads poor practice.

	This commit removes all use of the 'then' keyword from the gdb.disasm/
	test script directory.

	There should be no changes in what is tested after this commit.

2022-11-28  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: remove use of then keyword from gdb.reverse/*.exp
	The canonical form of 'if' in modern TCL is 'if {} {}'.  But there's
	still a bunch of places in the testsuite where we make use of the
	'then' keyword, and sometimes these get copies into new tests, which
	just spreads poor practice.

	This commit removes all use of the 'then' keyword from the gdb.reverse/
	test script directory.

	There should be no changes in what is tested after this commit.

2022-11-28  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: remove use of then keyword from gdb.trace/*.exp
	The canonical form of 'if' in modern TCL is 'if {} {}'.  But there's
	still a bunch of places in the testsuite where we make use of the
	'then' keyword, and sometimes these get copies into new tests, which
	just spreads poor practice.

	This commit removes all use of the 'then' keyword from the gdb.trace/
	test script directory.

	There should be no changes in what is tested after this commit.

2022-11-28  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: remove use of then keyword from gdb.threads/*.exp
	The canonical form of 'if' in modern TCL is 'if {} {}'.  But there's
	still a bunch of places in the testsuite where we make use of the
	'then' keyword, and sometimes these get copies into new tests, which
	just spreads poor practice.

	This commit removes all use of the 'then' keyword from the gdb.threads/
	test script directory.

	There should be no changes in what is tested after this commit.

2022-11-28  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: remove use of then keyword from gdb.python/*.exp
	The canonical form of 'if' in modern TCL is 'if {} {}'.  But there's
	still a bunch of places in the testsuite where we make use of the
	'then' keyword, and sometimes these get copies into new tests, which
	just spreads poor practice.

	This commit removes all use of the 'then' keyword from the gdb.python/
	test script directory.

	There should be no changes in what is tested after this commit.

2022-11-28  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: remove use of then keyword from gdb.cp/*.exp
	The canonical form of 'if' in modern TCL is 'if {} {}'.  But there's
	still a bunch of places in the testsuite where we make use of the
	'then' keyword, and sometimes these get copies into new tests, which
	just spreads poor practice.

	This commit removes all use of the 'then' keyword from the gdb.cp/
	test script directory.

	There should be no changes in what is tested after this commit.

2022-11-28  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: remove use of then keyword from gdb.arch/*.exp
	The canonical form of 'if' in modern TCL is 'if {} {}'.  But there's
	still a bunch of places in the testsuite where we make use of the
	'then' keyword, and sometimes these get copies into new tests, which
	just spreads poor practice.

	This commit removes all use of the 'then' keyword from the gdb.arch/
	test script directory.

	There should be no changes in what is tested after this commit.

2022-11-28  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: remove use of then keyword from gdb.base/*.exp
	The canonical form of 'if' in modern TCL is 'if {} {}'.  But there's
	still a bunch of places in the testsuite where we make use of the
	'then' keyword, and sometimes these get copies into new tests, which
	just spreads poor practice.

	This commit removes all use of the 'then' keyword from the gdb.base/
	test script directory.

	There should be no changes in what is tested after this commit.

2022-11-28  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: remove use of then keyword from gdb.ada/*.exp
	The canonical form of 'if' in modern TCL is 'if {} {}'.  But there's
	still a bunch of places in the testsuite where we make use of the
	'then' keyword, and sometimes these get copies into new tests, which
	just spreads poor practice.

	This commit removes all use of the 'then' keyword from the gdb.ada/
	test script directory.

	There should be no changes in what is tested after this commit.

2022-11-28  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: remove DOS line endings from a test script
	The gdb.fortran/nested-funcs.exp test script has DOS line endings.  I
	can see no reason why this script needs DOS line endings.

	Convert to UNIX line endings.

	There should be no change in what is tested after this commit.

2022-11-28  Tom Tromey  <tromey@adacore.com>

	Don't let gdb_stdlog use pager
	When using the "set logging" commands, cli_interp_base::set_logging
	will send gdb_stdlog output (among others) to the tee it makes for
	gdb_stdout.  However, this has the side effect of also causing logging
	to use the pager.  This is PR gdb/29787.

	This patch fixes the problem by keeping stderr and stdlog separate
	from stdout, preserving the rule that only gdb_stdout should page.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29787

2022-11-28  Tom Tromey  <tromey@adacore.com>

	Don't let tee_file own a stream
	Right now, tee_file owns the second stream it writes to.  This is done
	for the convenience of the users.  In a subsequent patch, this will no
	longer be convenient, so this patch moves the responsibility for
	ownership to the users of tee_file.

	Remove 'saved_output' global
	CLI redirect uses a global variable, 'saved_output'.  However, globals
	are generally bad, and there is no need for this one -- it can be a
	member of cli_interp_base.  This patch makes this change.

2022-11-28  Hannes Domani  <ssbssa@yahoo.de>

	Remove no longer used jump label
	The out label is unused since wait_for_debug_event is in a different thread.

	Actually set m_is_async to current async mode
	Looks like this was missed in the async mode implementation.

2022-11-28  Hannes Domani  <ssbssa@yahoo.de>

	Don't use auto for lambda parameter
	Older gcc versions (here 4.9.2) can't handle auto for a lambda parameter:

	../../gdb/windows-nat.c: In member function 'void windows_nat_target::delete_thread(ptid_t, DWORD, bool)':
	../../gdb/windows-nat.c:629:12: error: use of 'auto' in lambda parameter declaration only available with -std=c++1y or -std=gnu++1y [-Werror]
	        [=] (auto &th)
	            ^

2022-11-28  Hannes Domani  <ssbssa@yahoo.de>

	Fix calling convention of thread entry point
	For i686 the CreateThread entry point function needs the WINAPI (stdcall)
	calling convention:

	../../gdb/windows-nat.c: In constructor 'windows_nat_target::windows_nat_target()':
	../../gdb/windows-nat.c:450:56: error: invalid user-defined conversion from 'windows_nat_target::windows_nat_target()::<lambda(LPVOID)>' to 'LPTHREAD_START_ROUTINE' {aka 'long unsigned int (__attribute__((stdcall)) *)(void*)'} [-fpermissive]
	  450 |   HANDLE bg_thread = CreateThread (nullptr, 64 * 1024, fn, this, 0, nullptr);
	      |                                                        ^~
	../../gdb/windows-nat.c:444:13: note: candidate is: 'constexpr windows_nat_target::windows_nat_target()::<lambda(LPVOID)>::operator DWORD (*)(LPVOID)() const' (near match)
	  444 |   auto fn = [] (LPVOID self) -> DWORD
	      |             ^
	../../gdb/windows-nat.c:444:13: note:   no known conversion from 'DWORD (*)(LPVOID)' {aka 'long unsigned int (*)(void*)'} to 'LPTHREAD_START_ROUTINE' {aka 'long unsigned int (__attribute__((stdcall)) *)(void*)'}

	Since it's not possible to change the calling convention of a lambda, I've
	moved it to a separate function.

2022-11-28  Andrew Burgess  <aburgess@redhat.com>

	gdb: mark disassembler function callback types as noexcept
	In disasm.h we define a set of types that are used by the various
	disassembler classes to hold callback functions before passing the
	callbacks into libopcodes.

	Because libopcodes is C code, and on some (many?) targets, C code is
	compiled without exception support, it is important that GDB not try
	to throw an exception over libopcode code.

	In the previous commit all the existing callbacks were marked as
	noexcept, however, this doesn't protect us from a future change to GDB
	either adding a new callback that is not noexcept, or removing the
	noexcept keyword from an existing callback.

	In this commit I mark all the callback types as noexcept.  This means
	that GDB's disassembler classes will no longer compile if we try to
	pass a callback that is not marked as noexcept.

	At least, that's the idea.  Unfortunately, it's not that easy.

	Before C++17, the noexcept keyword on a function typedef would be
	ignored, thus:

	  using func_type = void (*) (void) noexcept;

	  void
	  a_func ()
	  {
	    throw 123;
	  }

	  void
	  some_func (func_type f)
	  {
	    f ();
	  }

	  int
	  main ()
	  {
	    some_func (a_func);
	    return 0;
	  }

	Will compile just fine for C++11 and C++14 with GCC.  Clang on the
	other hand complains that 'noexcept' should not appear on function
	types, but then does appear to correctly complain that passing a_func
	is a mismatch in the set of exceptions that could be thrown.

	Switching to C++17 and both GCC and Clang correctly point out that
	passing a_func is an invalid conversion relating to the noexcept
	keyword.  Changing a_func to:

	  void
	  a_func () noexcept
	  { /* Nothing.  */ }

	And for C++17 both GCC and Clang compile this just fine.

	My conclusion then is that adding the noexcept keyword to the function
	types is pointless while GDB is not compiled as C++17, and silencing
	the warnings would require us to jump through a bunch of hoops.

	And so, in this commit, I define a macro LIBOPCODE_CALLBACK_NOEXCEPT,
	this macro expands to noexcept when compiling for C++17, but otherwise
	expands to nothing.  I then add this macro to the function types.

	I've compiled GDB as the default C++11 and also forced the compile to
	C++17.  When compiling as C++17 I spotted a few additional places
	where callbacks needed to be marked noexcept (these fixes were merged
	into the previous commit, but this confirmed to be that the macro is
	working as expected).

2022-11-28  Andrew Burgess  <aburgess@redhat.com>

	gdb/disasm: mark functions passed to the disassembler noexcept
	While working on another patch, Simon pointed out that GDB could be
	improved by marking the functions passed to the disassembler as
	noexcept.

	  https://sourceware.org/pipermail/gdb-patches/2022-October/193084.html

	The reason this is important is the on some hosts, libopcodes, being C
	code, will not be compiled with support for handling exceptions.  As
	such, an attempt to throw an exception over libopcodes code will cause
	GDB to terminate.

	See bug gdb/29712 for an example of when this happened.

	In this commit all the functions that are passed to the disassembler,
	and which might be used as callbacks by libopcodes are marked
	noexcept.

	Ideally, I would have liked to change these typedefs:

	  using read_memory_ftype = decltype (disassemble_info::read_memory_func);
	  using memory_error_ftype = decltype (disassemble_info::memory_error_func);
	  using print_address_ftype = decltype (disassemble_info::print_address_func);
	  using fprintf_ftype = decltype (disassemble_info::fprintf_func);
	  using fprintf_styled_ftype = decltype (disassemble_info::fprintf_styled_func);

	which are declared in disasm.h, as including the noexcept keyword.
	However, when I tried this, I ran into this warning/error:

	  In file included from ../../src/gdb/disasm.c:25:
	  ../../src/gdb/disasm.h: In constructor ‘gdb_printing_disassembler::gdb_printing_disassembler(gdbarch*, ui_file*, gdb_disassemble_info::read_memory_ftype, gdb_disassemble_info::memory_error_ftype, gdb_disassemble_info::print_address_ftype)’:
	  ../../src/gdb/disasm.h:116:3: error: mangled name for ‘gdb_printing_disassembler::gdb_printing_disassembler(gdbarch*, ui_file*, gdb_disassemble_info::read_memory_ftype, gdb_disassemble_info::memory_error_ftype, gdb_disassemble_info::print_address_ftype)’ will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
	    116 |   gdb_printing_disassembler (struct gdbarch *gdbarch,
	        |   ^~~~~~~~~~~~~~~~~~~~~~~~~

	So I've left that change out.  This does mean that if somebody adds a
	new use of the disassembler classes in the future, and forgets to mark
	the callbacks as noexcept, this will compile fine.  We'll just have to
	manually check for that during review.

2022-11-28  Andrew Burgess  <aburgess@redhat.com>

	gdb/python: avoid throwing an exception over libopcodes code
	Bug gdb/29712 identifies a problem with the Python disassembler API.
	In some cases GDB will try to throw an exception through the
	libopcodes disassembler code, however, not all targets include
	exception unwind information when compiling C code, for targets that
	don't include this information GDB will terminate when trying to pass
	the exception through libopcodes.

	To explain what GDB is trying to do, consider the following trivial
	use of the Python disassembler API:

	  class ExampleDisassembler(gdb.disassembler.Disassembler):

	      class MyInfo(gdb.disassembler.DisassembleInfo):
	          def __init__(self, info):
	              super().__init__(info)

	          def read_memory(self, length, offset):
	              return super().read_memory(length, offset)

	      def __init__(self):
	          super().__init__("ExampleDisassembler")

	      def __call__(self, info):
	          info = self.MyInfo(info)
	          return gdb.disassembler.builtin_disassemble(info)

	This disassembler doesn't add any value, it defers back to GDB to do
	all the actual work, but it serves to allow us to discuss the problem.

	The problem occurs when a Python exception is raised by the
	MyInfo.read_memory method.  The MyInfo.read_memory method is called
	from the C++ function gdbpy_disassembler::read_memory_func.  The C++
	stack at the point this function is called looks like this:

	  #0  gdbpy_disassembler::read_memory_func (memaddr=4198805, buff=0x7fff9ab9d2a8 "\220ӹ\232\377\177", len=1, info=0x7fff9ab9d558) at ../../src/gdb/python/py-disasm.c:510
	  #1  0x000000000104ba06 in fetch_data (info=0x7fff9ab9d558, addr=0x7fff9ab9d2a9 "ӹ\232\377\177") at ../../src/opcodes/i386-dis.c:305
	  #2  0x000000000104badb in ckprefix (ins=0x7fff9ab9d100) at ../../src/opcodes/i386-dis.c:8571
	  #3  0x000000000104e28e in print_insn (pc=4198805, info=0x7fff9ab9d558, intel_syntax=-1) at ../../src/opcodes/i386-dis.c:9548
	  #4  0x000000000104f4d4 in print_insn_i386 (pc=4198805, info=0x7fff9ab9d558) at ../../src/opcodes/i386-dis.c:9949
	  #5  0x00000000004fa7ea in default_print_insn (memaddr=4198805, info=0x7fff9ab9d558) at ../../src/gdb/arch-utils.c:1033
	  #6  0x000000000094fe5e in i386_print_insn (pc=4198805, info=0x7fff9ab9d558) at ../../src/gdb/i386-tdep.c:4072
	  #7  0x0000000000503d49 in gdbarch_print_insn (gdbarch=0x5335560, vma=4198805, info=0x7fff9ab9d558) at ../../src/gdb/gdbarch.c:3351
	  #8  0x0000000000bcc8c6 in disasmpy_builtin_disassemble (self=0x7f2ab07f54d0, args=0x7f2ab0789790, kw=0x0) at ../../src/gdb/python/py-disasm.c:324

	  ### ... snip lots of frames as we pass through Python itself ...

	  #22 0x0000000000bcd860 in gdbpy_print_insn (gdbarch=0x5335560, memaddr=0x401195, info=0x7fff9ab9e3c8) at ../../src/gdb/python/py-disasm.c:783
	  #23 0x00000000008995a5 in ext_lang_print_insn (gdbarch=0x5335560, address=0x401195, info=0x7fff9ab9e3c8) at ../../src/gdb/extension.c:939
	  #24 0x0000000000741aaa in gdb_print_insn_1 (gdbarch=0x5335560, vma=0x401195, info=0x7fff9ab9e3c8) at ../../src/gdb/disasm.c:1078
	  #25 0x0000000000741bab in gdb_disassembler::print_insn (this=0x7fff9ab9e3c0, memaddr=0x401195, branch_delay_insns=0x0) at ../../src/gdb/disasm.c:1101

	So gdbpy_disassembler::read_memory_func is called from the libopcodes
	disassembler to read memory, this C++ function then calls into user
	supplied Python code to do the work.

	If the user supplied Python code raises an gdb.MemoryError exception
	indicating the memory read failed, this is fine.  The C++ code
	converts this exception back into a return value that libopcodes can
	understand, and returns to libopcodes.

	However, if the user supplied Python code raises some other exception,
	what we want is for this exception to propagate through GDB and appear
	as if raised by the call to gdb.disassembler.builtin_disassemble.  To
	achieve this, when gdbpy_disassembler::read_memory_func spots an
	unknown Python exception, we must pass the information about this
	exception from frame #0 to frame #8 in the above backtrace.  Frame #8
	is the C++ implementation of gdb.disassembler.builtin_disassemble, and
	so it is this function that we want to re-raise the unknown Python
	exception, so the user can, if they want, catch the exception in their
	code.

	The previous mechanism by which the exception was passed was to pack
	the details of the Python exception into a C++ exception, then throw
	the exception from frame #0, and catch the exception in frame #8,
	unpack the details of the Python exception, and re-raise it.

	However, this relies on the exception passing through frames #1 to #7,
	some of which are in libopcodes, which is C code, and so, might not be
	compiled with exception support.

	This commit proposes an alternative solution that does not rely on
	throwing a C++ exception.

	When we spot an unhandled Python exception in frame #0, we will store
	the details of this exception within the gdbpy_disassembler object
	currently in use.  Then we return to libopcodes a value indicating
	that the memory_read failed.

	libopcodes will now continue to disassemble as though that memory read
	failed (with one special case described below), then, when we
	eventually return to disasmpy_builtin_disassemble we check to see if
	there is an exception stored in the gdbpy_disassembler object.  If
	there is then this exception can immediately be installed, and then we
	return back to Python, when the user will be able to catch the
	exception.

	There is one extra change in gdbpy_disassembler::read_memory_func.
	After the first call that results in an exception being stored on the
	gdbpy_disassembler object, any future calls to the ::read_memory_func
	function will immediately return as if the read failed.  This avoids
	any additional calls into user supplied Python code.

	My thinking here is that should the first call fail with some unknown
	error, GDB should not keep trying with any additional calls.  This
	maintains the illusion that the exception raised from
	MyInfo.read_memory is immediately raised by
	gdb.disassembler.builtin_disassemble.  I have no tests for this change
	though - to trigger this issue would rely on a libopcodes disassembler
	that will try to read further memory even after the first failed
	read.  I'm not aware of any such disassembler that currently does
	this, but that doesn't mean such a disassembler couldn't exist in the
	future.

	With this change in place the gdb.python/py-disasm.exp test should now
	pass on AArch64.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29712

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-11-28  Tom Tromey  <tom@tromey.com>

	Remove reset_ecs and execution_control_state::reset
	I noticed that execution_control_state has a 'reset' method, and
	there's also a 'reset_ecs' function that calls it.  This patch cleans
	this area up a little by adding a parameter to the constructor and (a
	change Simon suggested) removing the reset method.  Some extraneous
	variables are also removed, like:

	-      struct execution_control_state ecss;
	-      struct execution_control_state *ecs = &ecss;

	Here 'ecs' is never changed, so this patch removes it entirely in
	favor of just using the object everywhere.

	Regression tested on x86-64 Fedora 34.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-11-28  Andrew Burgess  <aburgess@redhat.com>

	gdb: relax requirement for the map_failed stap probe to be present
	From glibc 2.35 and later, the "map_failed" stap probe is no longer
	included in glibc.  The removal of the probe looks like an accident,
	but it was caused by a glibc commit which meant that the "map_failed"
	probe could no longer be reached; the compiler then helpfully
	optimised out the probe.

	In GDB, in solib-svr4.c, we have a list of probes that we look for
	related to the shared library loading detection.  If any of these
	probes are missing then GDB will fall back to the non-probe based
	mechanism for detecting shared library loading.  The "map_failed"
	probe is include in the list of required probes.

	This means that on glibc 2.35 (or later) systems, GDB is going to
	always fall back to the non-probes based mechanism for detecting
	shared library loading.

	I raised a glibc bug to discuss this issue:

	  https://sourceware.org/bugzilla/show_bug.cgi?id=29818

	But, whatever the ultimate decision from the glibc team, given there
	are version of glibc in the wild without the "map_failed" probe, we
	probably should update GDB to handle this situation.

	The "map_failed" probe is already a little strange, very early
	versions of glibc didn't include this probe, so, in some cases, if
	this probe is missing GDB is happy to ignore it.  This is fine, the
	action associated with this probe inside GDB is DO_NOTHING, this means
	the probe isn't actually required in order for GDB to correctly detect
	the loading of shared libraries.

	In this commit I propose changing the rules so that any probe whose
	action is DO_NOTHING, is optional.

	There is one possible downside to this change, and that concerns 'set
	stop-on-solib-events on'.  If a probe is removed from glibc, but the
	old style breakpoint based mechanism is still in place within glibc
	for that same event, then GDB will stop when using the old style
	non-probe based mechanism, but not when using the probes based
	mechanism.

	For the map_failed case this is not a problem, both the map_failed
	probe, and the call to the old style breakpoint location were
	optimised out, and so neither event (probes based, or breakpoint
	based) will trigger.  This would only become an issue if glibc removed
	a probe, but left the breakpoint in place (this would almost certainly
	be a bug in glibc).

	For now, I'm proposing that we just don't worry about this.  Because
	some probes have actions that are not DO_NOTHING, then we know the
	user will always seem _some_ stops when a shared library is
	loaded/unloaded, and (I'm guessing), in most cases, that's all they
	care about.  I figure when someone complains then we can figure out
	what the right solution is then.

	With this commit in place, then, when using a glibc 2.35 or later
	system, GDB will once again use the stap probes for shared library
	detection.

	Reviewed-By: Lancelot SIX <lancelot.six@amd.com>

2022-11-28  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Require hw watchpoint in gdb.ada/task_watch.exp
	On powerpc64le-linux I run into:
	...
	(gdb) PASS: gdb.ada/task_watch.exp: info tasks before inserting breakpoint
	watch -location value task 3^M
	Watchpoint 2: -location value^M
	(gdb) PASS: gdb.ada/task_watch.exp: watch -location value task 3
	continue^M
	Continuing.^M
	[Thread 0x7ffff7ccf170 (LWP 65550) exited]^M
	[Thread 0x7ffff7abf170 (LWP 65551) exited]^M
	FAIL: gdb.ada/task_watch.exp: continue to watchpoint (timeout)
	...

	On x86_64-linux (where the test-case passes), a hardware watchpoint is used:
	...
	(gdb) PASS: gdb.ada/task_watch.exp: info tasks before inserting breakpoint
	watch -location value task 3^M
	Hardware watchpoint 2: -location value^M
	...
	and after forcing "set can-use-hw-watchpoints 0" we can intermittently
	reproduce the same failure.

	In the gdb documentation related to watchpoints in multi-threaded programs, we
	read:
	...
	Warning: In multi-threaded programs, software watchpoints have only limited
	usefulness.  If GDB creates a software watchpoint, it can only watch the value
	of an expression in a single thread.  If you are confident that the expression
	can only change due to the current thread’s activity (and if you are also
	confident that no other thread can become current), then you can use software
	watchpoints as usual.  However, GDB may not notice when a non-current thread’s
	activity changes the expression.  (Hardware watchpoints, in contrast, watch an
	expression in all threads.)
	...

	Since the ada task construct is mapped onto threads, it seems that the
	same limitation holds for tasks.

	Fix this by using skip_hw_watchpoint_tests.

	Tested on powerpc64-linux.
	Tested-By: Carl Love <cel@us.ibm.com>

2022-11-28  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.ada/out_of_line_in_inlined.exp for ppc64le
	On powerpc64le-linux, with test-case gdb.ada/out_of_line_in_inlined.exp I run
	into:
	...
	(gdb) run ^M
	Starting program: foo_o224_021-all ^M
	^M
	Breakpoint 1, 0x0000000010002f48 in foo_o224_021.child1.child2 (s=...) at \
	  foo_o224_021.adb:24^M
	24              function Child2 (S : String) return Boolean is -- STOP^M
	(gdb) FAIL: gdb.ada/out_of_line_in_inlined.exp: scenario=all: \
	  run to foo_o224_021.child1.child2
	...

	The breakpoint is correctly set at the local entry point, and given that the
	local entry point doesn't correspond to a line number entry, the instruction
	address of the breakpoint is shown.

	The problem is that test-case doesn't expect the breakpoint address.

	Fix this by allowing the breakpoint address to occur.

	Tested on powerpc64le-linux.

2022-11-28  Michael Matz  <matz@suse.de>

	Only use wild_sort_fast
	there's no reason why the tree-based variant can't always be used
	when sorting is required, it merely needs to also support filename
	sorting and have a fast path for insertion at end (aka rightmost tree
	leaf).

	The filename sorting isn't tested anywhere and the only scripttempl
	that uses it is avr (for 'SORT(*)(.ctors)'), and I believe even there it
	was a mistake.  Either way, this adds a testcase for filename sorting as
	well.

	Then the non-BST based sorting can be simplified to only support
	the fast case of no sorting required at all (at the same time renaming
	the two variants to _sort and _nosort).

2022-11-28  Michael Matz  <matz@suse.de>

	Special case more simple patterns
	fnmatch is slow, so avoiding it in more cases is good.  This implements
	a more generic version of match_simple_wild which needs some
	pre-processing of patterns.  In particular it supports patterns of the
	form PREFIX*SUFFIX (where all parts are optional), i.e. a super set of
	what's handled now.  Most section matchers of this form and hence don't
	need any calls to fnmatch anymore.

	We retain the implementation of match_simple_wild for the filename
	matchers (they aren't called often enough to matter).

2022-11-28  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: fail if gdb_start_cmd fails
	I broke gdb.ada/start.exp, and did not notice it, because it outputs an
	UNTESTED if gdb_start_cmd fails.  I don't really see when start would
	fail and it's not a problem that should be looked at.  Change all spots
	that call untested after a gdb_start_cmd failure, use fail instead.

	Doing so caused some failures with the native-gdbserver board.  Some
	tests that use "start" were relying on the fact that start would fail
	with that board to just return with "untested".  Change them to add an
	early return if use_gdb_stub returns true.

	Some gdb.pascal tests also failed with native-gdbserver, because they
	did use gdb_start_cmd to start the inferior, for no good reason.
	Convert them to use runto_main instead, which does the right thing if
	the target is a stub.

	A further refactoring could be to make gdb_start_cmd match the expected
	breakpoint hit and the prompt, which it doesn't do currently (it leaves
	that to the callers, but not all of them do).

	Change-Id: I097370851213e798ff29fb6cf8ba25ef7d2be007
	Reviewed-By: Bruno Larsen <blarsen@redhat.com>
	Approved-By: Andrew Burgess <aburgess@redhat.com>

2022-11-28  Tom Tromey  <tromey@adacore.com>

	Fix range type signed-ness heuristic
	The code to create a range type has a heuristic to decide whether the
	range is unsigned.  However, this heuristic can fail if the upper
	bound of the range has its high bit set, because the test is done
	using LONGEST.

	With this patch, if the underlying type of a range is unsigned, then
	the range will always be unsigned.  A new test is included.

	Regression tested on x86-64 Fedora 34.  We've also been using this
	internally at AdaCore for a while.

2022-11-28  Simon Marchi  <simon.marchi@efficios.com>

	gdb: disable commit resumed in target_kill
	New in this version:

	 - Better comment in target_kill
	 - Uncomment line in test to avoid hanging when exiting, when testing on
	   native-extended-gdbserver

	PR 28275 shows that doing a sequence of:

	 - Run inferior in background (run &)
	 - kill that inferior
	 - Run again

	We get into this assertion:

	    /home/smarchi/src/binutils-gdb/gdb/target.c:2590: internal-error: target_wait: Assertion `!proc_target->commit_resumed_state' failed.

	    #0  internal_error_loc (file=0x5606b344e740 "/home/smarchi/src/binutils-gdb/gdb/target.c", line=2590, fmt=0x5606b344d6a0 "%s: Assertion `%s' failed.") at /home/smarchi/src/binutils-gdb/gdbsupport/errors.cc:54
	    #1  0x00005606b6296475 in target_wait (ptid=..., status=0x7fffb9390630, options=...) at /home/smarchi/src/binutils-gdb/gdb/target.c:2590
	    #2  0x00005606b5767a98 in startup_inferior (proc_target=0x5606bfccb2a0 <the_amd64_linux_nat_target>, pid=3884857, ntraps=1, last_waitstatus=0x0, last_ptid=0x0) at /home/smarchi/src/binutils-gdb/gdb/nat/fork-inferior.c:482
	    #3  0x00005606b4e6c9c5 in gdb_startup_inferior (pid=3884857, num_traps=1) at /home/smarchi/src/binutils-gdb/gdb/fork-child.c:132
	    #4  0x00005606b50f14a5 in inf_ptrace_target::create_inferior (this=0x5606bfccb2a0 <the_amd64_linux_nat_target>, exec_file=0x604000039f50 "/home/smarchi/build/binutils-gdb/gdb/test", allargs="", env=0x61500000a580, from_tty=1)
	        at /home/smarchi/src/binutils-gdb/gdb/inf-ptrace.c:105
	    #5  0x00005606b53b6d23 in linux_nat_target::create_inferior (this=0x5606bfccb2a0 <the_amd64_linux_nat_target>, exec_file=0x604000039f50 "/home/smarchi/build/binutils-gdb/gdb/test", allargs="", env=0x61500000a580, from_tty=1)
	        at /home/smarchi/src/binutils-gdb/gdb/linux-nat.c:978
	    #6  0x00005606b512b79b in run_command_1 (args=0x0, from_tty=1, run_how=RUN_NORMAL) at /home/smarchi/src/binutils-gdb/gdb/infcmd.c:468
	    #7  0x00005606b512c236 in run_command (args=0x0, from_tty=1) at /home/smarchi/src/binutils-gdb/gdb/infcmd.c:526

	When running the kill command, commit_resumed_state for the
	process_stratum_target (linux-nat, here) is true.  After the kill, when
	there are no more threads, commit_resumed_state is still true, as
	nothing touches this flag during the kill operation.  During the
	subsequent run command, run_command_1 does:

	    scoped_disable_commit_resumed disable_commit_resumed ("running");

	We would think that this would clear the commit_resumed_state flag of
	our native target, but that's not the case, because
	scoped_disable_commit_resumed iterates on non-exited inferiors in order
	to find active process targets.  And after the kill, the inferior is
	exited, and the native target was unpushed from it anyway.  So
	scoped_disable_commit_resumed doesn't touch the commit_resumed_state
	flag of the native target, it stays true.  When reaching target_wait, in
	startup_inferior (to consume the initial expect stop events while the
	inferior is starting up and working its way through the shell),
	commit_resumed_state is true, breaking the contract saying that
	commit_resumed_state is always false when calling the targets' wait
	method.

	(note: to be correct, I think that startup_inferior should toggle
	commit_resumed between the target_wait and target_resume calls, but I'll
	ignore that for now)

	I can see multiple ways to fix this.  In the end, we need
	commit_resumed_state to be cleared by the time we get to that
	target_wait.  It could be done at the end of the kill command, or at the
	beginning of the run command.

	To keep things in a coherent state, I'd like to make it so that after
	the kill command, when the target is left with no threads, its
	commit_resumed_state flag is left to false.  This way, we can keep
	working with the assumption that a target with no threads (and therefore
	no running threads) has commit_resumed_state == false.

	Do this by adding a scoped_disable_commit_resumed in target_kill.  It
	clears the target's commit_resumed_state on entry, and leaves it false
	if the target does not have any resumed thread on exit.  That means,
	even if the target has another inferior with stopped threads,
	commit_resumed_state will be left to false, which makes sense.

	Add a test that tries to cover various combinations of actions done
	while an inferior is running (and therefore while commit_resumed_state
	is true on the process target).

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28275
	Change-Id: I8e6fe6dc1f475055921520e58cab68024039a1e9
	Approved-By: Andrew Burgess <aburgess@redhat.com>

2022-11-28  Simon Marchi  <simon.marchi@efficios.com>

	gdbserver: switch to right process in find_one_thread
	New in this version: add a dedicated test.

	When I do this:

	    $ ./gdb -nx --data-directory=data-directory -q \
	        /bin/sleep \
		-ex "maint set target-non-stop on" \
		-ex "tar ext :1234" \
		-ex "set remote exec-file /bin/sleep" \
		-ex "run 1231 &" \
		-ex add-inferior \
		-ex "inferior 2"
	    Reading symbols from /bin/sleep...
	    (No debugging symbols found in /bin/sleep)
	    Remote debugging using :1234
	    Starting program: /bin/sleep 1231
	    Reading /lib64/ld-linux-x86-64.so.2 from remote target...
	    warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.
	    Reading /lib64/ld-linux-x86-64.so.2 from remote target...
	    Reading /usr/lib/debug/.build-id/a6/7a1408f18db3576757eea210d07ba3fc560dff.debug from remote target...
	    [New inferior 2]
	    Added inferior 2 on connection 1 (extended-remote :1234)
	    [Switching to inferior 2 [<null>] (<noexec>)]
	    (gdb) Reading /lib/x86_64-linux-gnu/libc.so.6 from remote target...
	    attach 3659848
	    Attaching to process 3659848
	    /home/smarchi/src/binutils-gdb/gdb/thread.c:85: internal-error: inferior_thread: Assertion `current_thread_ != nullptr' failed.

	Note the "attach" command just above.  When doing it on the command-line
	with a -ex switch, the bug doesn't trigger.

	The internal error of GDB is actually caused by GDBserver crashing, and
	the error recovery of GDB is not on point.  This patch aims to fix just
	the GDBserver crash, not the GDB problem.

	GDBserver crashes with a segfault here:

	    (gdb) bt
	    #0  0x00005555557fb3f4 in find_one_thread (ptid=...) at /home/smarchi/src/binutils-gdb/gdbserver/thread-db.cc:177
	    #1  0x00005555557fd5cf in thread_db_thread_handle (ptid=<error reading variable: Cannot access memory at address 0xffffffffffffffa0>, handle=0x7fffffffc400, handle_len=0x7fffffffc3f0)
	        at /home/smarchi/src/binutils-gdb/gdbserver/thread-db.cc:461
	    #2  0x000055555578a0b6 in linux_process_target::thread_handle (this=0x5555558a64c0 <the_x86_target>, ptid=<error reading variable: Cannot access memory at address 0xffffffffffffffa0>, handle=0x7fffffffc400,
	        handle_len=0x7fffffffc3f0) at /home/smarchi/src/binutils-gdb/gdbserver/linux-low.cc:6905
	    #3  0x00005555556dfcc6 in handle_qxfer_threads_worker (thread=0x60b000000510, buffer=0x7fffffffc8a0) at /home/smarchi/src/binutils-gdb/gdbserver/server.cc:1645
	    #4  0x00005555556e00e6 in operator() (__closure=0x7fffffffc5e0, thread=0x60b000000510) at /home/smarchi/src/binutils-gdb/gdbserver/server.cc:1696
	    #5  0x00005555556f54be in for_each_thread<handle_qxfer_threads_proper(buffer*)::<lambda(thread_info*)> >(struct {...}) (func=...) at /home/smarchi/src/binutils-gdb/gdbserver/gdbthread.h:159
	    #6  0x00005555556e0242 in handle_qxfer_threads_proper (buffer=0x7fffffffc8a0) at /home/smarchi/src/binutils-gdb/gdbserver/server.cc:1694
	    #7  0x00005555556e04ba in handle_qxfer_threads (annex=0x629000000213 "", readbuf=0x621000019100 '\276' <repeats 200 times>..., writebuf=0x0, offset=0, len=4097)
	        at /home/smarchi/src/binutils-gdb/gdbserver/server.cc:1732
	    #8  0x00005555556e1989 in handle_qxfer (own_buf=0x629000000200 "qXfer:threads", packet_len=26, new_packet_len_p=0x7fffffffd630) at /home/smarchi/src/binutils-gdb/gdbserver/server.cc:2045
	    #9  0x00005555556e720a in handle_query (own_buf=0x629000000200 "qXfer:threads", packet_len=26, new_packet_len_p=0x7fffffffd630) at /home/smarchi/src/binutils-gdb/gdbserver/server.cc:2685
	    #10 0x00005555556f1a01 in process_serial_event () at /home/smarchi/src/binutils-gdb/gdbserver/server.cc:4176
	    #11 0x00005555556f4457 in handle_serial_event (err=0, client_data=0x0) at /home/smarchi/src/binutils-gdb/gdbserver/server.cc:4514
	    #12 0x0000555555820f56 in handle_file_event (file_ptr=0x607000000250, ready_mask=1) at /home/smarchi/src/binutils-gdb/gdbsupport/event-loop.cc:573
	    #13 0x0000555555821895 in gdb_wait_for_event (block=1) at /home/smarchi/src/binutils-gdb/gdbsupport/event-loop.cc:694
	    #14 0x000055555581f533 in gdb_do_one_event (mstimeout=-1) at /home/smarchi/src/binutils-gdb/gdbsupport/event-loop.cc:264
	    #15 0x00005555556ec9fb in start_event_loop () at /home/smarchi/src/binutils-gdb/gdbserver/server.cc:3512
	    #16 0x00005555556f0769 in captured_main (argc=4, argv=0x7fffffffe0d8) at /home/smarchi/src/binutils-gdb/gdbserver/server.cc:3992
	    #17 0x00005555556f0e3f in main (argc=4, argv=0x7fffffffe0d8) at /home/smarchi/src/binutils-gdb/gdbserver/server.cc:4078

	The reason is a wrong current process when find_one_thread is called.
	The current process is the 2nd one, which was just attached.  It does
	not yet have thread_db data (proc->priv->thread_db is nullptr).  As we
	iterate on all threads of all process to fulfull the qxfer:threads:read
	request, we get to a thread of process 1 for which we haven't read
	thread_db information yet (lwp_info::thread_known is false), so we get
	into find_one_thread.  find_one_thread uses
	`current_process ()->priv->thread_db`, assuming the current process
	matches the ptid passed as a parameter, which is wrong.  A segfault
	happens when trying to dereference that thread_db pointer.

	Fix this by making find_one_thread not assume what the current process /
	current thread is.  If it needs to call into libthread_db, which we know
	will try to read memory from the current process, then temporarily set
	the current process.

	In the case where the thread is already know and we return early, we
	don't need to switch process.

	Add a test to reproduce this specific situation.

	Change-Id: I09b00883e8b73b7e5f89d0f47cb4e9c0f3d6caaa
	Approved-By: Andrew Burgess <aburgess@redhat.com>

2022-11-28  Tom Tromey  <tromey@adacore.com>

	Fix crash in "document" command
	PR cli/29800 points out that "document" will now crash when the
	argument is an undefined command.  This is a regression due to the
	"document user-defined aliases" patch.

	Approved-By: Joel Brobecker <brobecker@adacore.com>
	Reviewed-By: Philippe Waroquiers <philippe.waroquiers@skynet.be>
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29800

2022-11-28  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.opt/solib-intra-step.exp for powerpc64le
	On powerpc64le-linux, I run into:
	...
	(gdb) PASS: gdb.opt/solib-intra-step.exp: first-hit
	step^M
	28      { /* first-retry */^M
	(gdb) FAIL: gdb.opt/solib-intra-step.exp: second-hit
	...

	It's a bit easier to understand what happens if we do a full stepping session:
	...
	Temporary breakpoint 1, main ()
	    at solib-intra-step-main.c:23
	23        shlib_first ();
	(gdb) step
	shlib_first () at solib-intra-step-lib.c:29
	29        shlib_second (0); /* first-hit */
	(gdb) step
	28      { /* first-retry */
	(gdb) step
	29        shlib_second (0); /* first-hit */
	(gdb) step
	shlib_second (dummy=0)
	    at solib-intra-step-lib.c:23
	23        abort (); /* second-hit */
	...
	and compare that to the line info:
	...
	CU: solib-intra-step-lib.c:
	File name                    Line number    Starting address    View    Stmt
	solib-intra-step-lib.c                22               0x710               x
	solib-intra-step-lib.c                23               0x724               x
	solib-intra-step-lib.c                28               0x740               x
	solib-intra-step-lib.c                29               0x74c               x
	solib-intra-step-lib.c                28               0x750               x
	solib-intra-step-lib.c                29               0x758               x
	solib-intra-step-lib.c                30               0x760               x
	solib-intra-step-lib.c                 -               0x77c
	...

	So we step from line 29 to line 28, and back to line 29, which is behaviour
	that matches the line table.  The peculiar order is due to using optimization.
	The problem is that the test-case doesn't expect this order.

	Fix this by allowing this order in the test-case.

	Tested on powerpc64le-linux.

	PR testsuite/29792
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29792

2022-11-28  Andrew Burgess  <aburgess@redhat.com>

	gdb: fix assert when quitting GDB while a thread is stepping
	This commit addresses one of the issues identified in PR gdb/28275.

	Bug gdb/28275 identifies a number of situations in which this assert:

	  Assertion `!proc_target->commit_resumed_state' failed.

	could be triggered.  There's actually a number of similar places where
	this assert is found in GDB, the two of interest in gdb/28275 are in
	target_wait and target_stop.

	In one of the comments:

	  https://sourceware.org/bugzilla/show_bug.cgi?id=28275#c1

	steps to trigger the assertion within target_stop were identified when
	using a modified version of the gdb.threads/detach-step-over.exp test
	script.

	In the gdb.threads/detach-step-over.exp test, we attach to a
	multi-threaded inferior, and continue the inferior in asynchronous
	(background) mode.  Each thread is continuously hitting a conditional
	breakpoint where the condition is always false.  While the inferior is
	running we detach.  The goal is that we detach while GDB is performing a
	step-over for the conditional breakpoint in at least one thread.

	While detaching, if a step-over is in progress, then GDB has to
	complete the step over before we can detach.  This involves calling
	target_stop and target_wait (see prepare_for_detach).

	As far as gdb/28275 is concerned, the interesting part here, is the
	the process_stratum_target::commit_resumed_state variable must be
	false when target_stop and target_wait are called.

	This is currently ensured because, in detach_command (infrun.c), we
	create an instance of scoped_disable_commit_resumed, this ensures that
	when target_detach is called, ::commit_resumed_state will be false.

	The modification to the test that I propose here, and which exposed
	the bug, is that, instead of using "detach" to detach from the
	inferior, we instead use "quit".  Quitting GDB after attaching to an
	inferior will cause GDB to first detach, and then exit.

	When we quit GDB we end up calling target_detach via a different code
	path, the stack looks like:

	  #0 target_detach
	  #1 kill_or_detach
	  #2 quit_force
	  #3 quit_command

	Along this path there is no scoped_disable_commit_resumed created.
	::commit_resumed_state can be true when we reach prepare_for_detach,
	which calls target_wait and target_stop, so the assertion will trigger.

	In this commit, I propose fixing this by adding the creation of a
	scoped_disable_commit_resumed into target_detach.  This will ensure
	that ::commit_resumed_state is false when calling prepare_for_detach
	from within target_detach.

	I did consider placing the scoped_disable_commit_resumed in
	prepare_for_detach, however, placing it in target_detach ensures that
	the target's commit_resumed_state flag is left to false if the detached
	inferior was the last one for that target.  It's the same rationale as
	for patch "gdb: disable commit resumed in target_kill" that comes later
	in this series, but for detach instead of kill.

	detach_command still includes a scoped_disable_commit_resumed too, but I
	think it is still relevant to cover the resumption at the end of the
	function.

	Co-Authored-By: Simon Marchi <simon.marchi@efficios.com>
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28275
	Change-Id: Ie128f7aba6ef0e018859275eca372e6ea738e96f

2022-11-28  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: refactor gdb.threads/detach-step-over.exp
	Factor out some bits of gdb.threads/detach-step-over.exp to procs in
	preparation to adding some new variations of the test.  Rename the
	existing "test" proc and make it use proc_with_prefix.

	Co-Authored-By: Simon Marchi <simon.marchi@efficios.com>
	Change-Id: Ib4412545c81c8556029e0f7bfa9dd48d7a9f3189

2022-11-28  Simon Marchi  <simon.marchi@efficios.com>

	gdb/testsuite: remove global declarations in gdb.threads/detach-step-over.exp
	Before doing further changes to this file, change to use the :: notation
	instead of declaring global variables with the `global` keyword.

	Change-Id: I72301fd8f4693fea61aac054ba17245a1f4442fb
	Approved-By: Andrew Burgess <aburgess@redhat.com>

2022-11-28  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.arch/altivec-regs.exp with gcc 4.8.5
	On powerpc64le-linux, using gcc 4.8.5, I run into:
	...
	(gdb) PASS: gdb.arch/altivec-regs.exp: next (1)
	next^M
	11        c = vec_add (a, b);^M
	(gdb) PASS: gdb.arch/altivec-regs.exp: next (2)
	print/x a^M
	$67 = {0xfefefefe, 0xfefefefe, 0xfefefefe, 0xfefefefe}^M
	(gdb) FAIL: gdb.arch/altivec-regs.exp: print vector parameter a
	...

	Looking at the disassembly and the debug info, it's clear why there's
	a FAIL.

	The debug info says that the variable can be found at some stack location, but
	the instructions don't seem to be writing there.

	We can work around this by marking variable a volatile.  Likewise for b.

	Note that marking the variables as volatile doesn't change the location
	information.

	Tested on power64le-linux.

2022-11-28  Tom de Vries  <tdevries@suse.de>

	[gdb/tdep] Fix gdb.base/msym-bp-shl.exp for ppc64le
	With test-case gdb.base/msym-bp-shl.exp on powerpc64le-linux, I run into:
	...
	(gdb) PASS: gdb.base/msym-bp-shl.exp: debug=0: before run: break foo
	info breakpoint^M
	Num     Type           Disp Enb Address            What^M
	1       breakpoint     keep y   <MULTIPLE>         ^M
	1.1                         y   0x00000000000008d4 <foo+12>^M
	1.2                         y   0x0000000000000a34 crti.S:88^M
	(gdb) FAIL: gdb.base/msym-bp-shl.exp: debug=0: before run: info breakpoint
	...

	The problem is that the prologue skipper walks from foo@plt at 0xa28 to 0xa34:
	...
	0000000000000a28 <foo@plt>:
	 a28:   c0 ff ff 4b     b       9e8 <__glink_PLTresolve>

	Disassembly of section .fini:

	0000000000000a2c <_fini>:
	 a2c:   02 00 4c 3c     addis   r2,r12,2
	 a30:   d4 74 42 38     addi    r2,r2,29908
	 a34:   a6 02 08 7c     mflr    r0
	...

	This is caused by ppc_elfv2_elf_make_msymbol_special which marks foo@plt as
	having a local entry point, due to incorrectly accessing an asymbol struct
	using a (larger) elf_symbol_type.

	Fix this by simply ignoring artificial symbols in
	ppc_elfv2_elf_make_msymbol_special.

	Tested on powerpc64le.

	Approved-By: Ulrich Weigand <uweigand@de.ibm.com>
	Reviewed-By: Carl Love <cel@us.ibm.com>
	Tested-By: Carl Love <cel@us.ibm.com>
	PR tdep/29814
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29814

2022-11-28  Alan Modra  <amodra@gmail.com>

	PR10368, ISO 8859 mentioned as 7bit encoding in strings documentation
		PR 10368
		* doc/binutils.texi (strings): Delete example of 7-bit encoding.

	Use bfd_rename_section in msp430.em
		* emultempl/msp430.em (add_region_prefix <REGION_EITHER>): Use
		bfd_rename_section.
		* testsuite/ld-msp430-elf/msp430-tiny-rom.ld: Handle varian data
		and bss input sections.

	asan: pef: buffer overflow
		* pef.c (bfd_pef_parse_traceback_table): Correct size moved when
		stripping leading dot.

	regen gas/Makefile.in

2022-11-28  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Allow merging 'H' extension
	Because riscv_merge_std_ext function did not merge the 'H' extension, linked
	executables lacked 'H' extension when multiple objects are merged.

	This issue is found while building OpenSBI with 'H' extension (resulting
	ELF files did not contain "h1p0" in "Tag_RISCV_arch" even if *all* linked
	object files contained it).

	This commit adds 'h' to standard_exts variable to merge 'H' extension.

	bfd/ChangeLog:

		* elfnn-riscv.c (riscv_merge_std_ext): Add 'H' extension merging.

2022-11-28  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Better support for long instructions (tests)
	This commit tests both (assembler and disassembler) fixes of "Better support
	for long instructions".

	gas/ChangeLog:

		* testsuite/gas/riscv/insn.s: Add testcases such that big number
		handling is required and should be disassembled as long ".byte"
		sequence with correct instruction bits.
		* testsuite/gas/riscv/insn.d: Likewise.
		* testsuite/gas/riscv/insn-na.d: Likewise.
		* testsuite/gas/riscv/insn-dwarf.d: Likewise.

2022-11-28  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Better support for long instructions (assembler)
	Commit bb996692bd96 ("RISC-V/gas: allow generating up to 176-bit
	instructions with .insn") tried to start supporting long instructions but
	it was insufficient.

	1.  It heavily depended on the bignum internals (radix of 2^16),
	2.  It generates "value conflicts with instruction length" even if a big
	    number instruction encoding does not exceed its expected length and
	3.  Because long opcode was handled separately (from struct riscv_cl_insn),
	    some information like DWARF line number correspondence was missing.

	To resolve these problems, this commit:

	1.  Handles bignum (and its encodings) precisely and
	2.  Incorporates long opcode handling into regular instruction handling.

	This commit will be tested on the separate commit.

	gas/ChangeLog:

		* config/tc-riscv.c (struct riscv_cl_insn): Add long opcode field.
		(create_insn) Clear long opcode marker.
		(install_insn) Install longer opcode as well.
		(s_riscv_insn) Likewise.
		(riscv_ip_hardcode): Make big number handling stricter. Length and
		the value conflicts only if the bignum size exceeds the expected
		maximum length.

2022-11-28  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Better support for long instructions (disassembler)
	Commit bb996692bd96 ("RISC-V/gas: allow generating up to 176-bit
	instructions with .insn") tried to start supporting long instructions but
	it was insufficient.

	On the disassembler, correct ".byte" output was limited to the first 64-bits
	of an instruction.  After that, zeroes are incorrectly printed.

	Note that, it only happens on ".byte" output (instruction part) and not on
	hexdump (data) part.  For example, before this commit, hexdump and ".byte"
	produces different values:

	Assembly:
	  .insn 22, 0xfedcba98765432100123456789abcdef55aa33cc607f
	objdump output example (before the fix):
	  10:   607f 33cc 55aa cdef     .byte   0x7f, 0x60, 0xcc, 0x33, 0xaa, 0x55, 0xef, 0xcd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
	  18:   89ab 4567 0123 3210
	  20:   7654 ba98 fedc

	Note that, after 0xcd (after first 64-bits of the target instruction), all
	".byte" values are incorrectly printed as zero while hexdump prints correct
	instruction bits.

	To resolve this, this commit adds "packet" argument to support dumping
	instructions longer than 64-bits (to print correct instruction bits on
	".byte").  This commit will be tested on the separate commit.

	Assembly:
	  .insn 22, 0xfedcba98765432100123456789abcdef55aa33cc607f
	objdump output example (after the fix):
	  10:   607f 33cc 55aa cdef     .byte   0x7f, 0x60, 0xcc, 0x33, 0xaa, 0x55, 0xef, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0x01, 0x10, 0x32, 0x54, 0x76, 0x98, 0xba, 0xdc, 0xfe
	  18:   89ab 4567 0123 3210
	  20:   7654 ba98 fedc

	opcodes/ChangeLog:

		* riscv-dis.c (riscv_disassemble_insn): Print unknown instruction
		using the new argument packet.
		(riscv_disassemble_data): Add unused argument packet.
		(print_insn_riscv): Pass packet to the disassemble function.

2022-11-28  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

	Fix leak in the dwarf reader
	Valgrind reports a leak in the dwarf reader (see details below).
	The function dw2_get_file_names_reader is interning in the per_objfile
	all the file names it finds, except the name of 'fnd file name and directory'.
	Instead, it was xstrdup-ing the name.
	Fix the leaks by also interning the name.

	This was validated running the tests natively, and under valgrind.
	Leaks have decreased as mentionned below.
	Valgrind detected no error such as double free or use after free.

	Stack trace of the leak:
	==4113266== 490,735 bytes in 17,500 blocks are definitely lost in loss record 7,061 of 7,074
	==4113266==    at 0x483979B: malloc (vg_replace_malloc.c:393)
	==4113266==    by 0x25A454: xmalloc (alloc.c:57)
	==4113266==    by 0x7D1E1E: xstrdup (xstrdup.c:34)
	==4113266==    by 0x39D141: dw2_get_file_names_reader (read.c:2825)
	==4113266==    by 0x39D141: dw2_get_file_names(dwarf2_per_cu_data*, dwarf2_per_objfile*) (read.c:2851)
	==4113266==    by 0x39DD6C: dw_expand_symtabs_matching_file_matcher(dwarf2_per_objfile*, gdb::function_view<bool (char const*, bool)>) (read.c:4149)
	==4113266==    by 0x3BC8B5: cooked_index_functions::expand_symtabs_matching(objfile*, gdb::function_view<bool (char const*, bool)>, lookup_name_info const*, gdb::function_view<bool (char const*)>, gdb::function_view<bool (compunit_symtab*)>, enum_flags<block_search_flag_values>, domain_enum, search_domain) (read.c:18688)
	==4113266==    by 0x5DD1EA: objfile::map_symtabs_matching_filename(char const*, char const*, gdb::function_view<bool (symtab*)>) (symfile-debug.c:207)
	==4113266==    by 0x5F04CC: iterate_over_symtabs(char const*, gdb::function_view<bool (symtab*)>) (symtab.c:633)
	==4113266==    by 0x477EE3: collect_symtabs_from_filename(char const*, program_space*) (linespec.c:3712)
	==4113266==    by 0x477FC1: symtabs_from_filename(char const*, program_space*) (linespec.c:3726)
	==4113266==    by 0x47A9B8: convert_explicit_location_spec_to_linespec(linespec_state*, linespec*, char const*, char const*, symbol_name_match_type, char const*, line_offset) (linespec.c:2329)
	==4113266==    by 0x47E86E: convert_explicit_location_spec_to_sals (linespec.c:2388)
	==4113266==    by 0x47E86E: location_spec_to_sals(linespec_parser*, location_spec const*) (linespec.c:3104)
	==4113266==    by 0x47EDAC: decode_line_full(location_spec*, int, program_space*, symtab*, int, linespec_result*, char const*, char const*) (linespec.c:3149)
	...

	Without the fix, the top 10 leaks are:
	./gdb/testsuite/outputs/gdb.base/condbreak-bad/gdb.log:345:==3213924==    definitely lost: 130,937 bytes in 5,409 blocks
	./gdb/testsuite/outputs/gdb.base/hbreak2/gdb.log:619:==3758919==    definitely lost: 173,323 bytes in 7,204 blocks
	./gdb/testsuite/outputs/gdb.mi/mi-var-cp/gdb.log:1320:==4152873==    definitely lost: 172,826 bytes in 7,207 blocks
	./gdb/testsuite/outputs/gdb.base/advance-until-multiple-locations/gdb.log:398:==2992643==    definitely lost: 172,965 bytes in 7,211 blocks
	./gdb/testsuite/outputs/gdb.mi/mi-var-cmd/gdb.log:2302:==4159476==    definitely lost: 173,129 bytes in 7,211 blocks
	./gdb/testsuite/outputs/gdb.cp/gdb2384/gdb.log:222:==3811851==    definitely lost: 218,106 bytes in 7,761 blocks
	./gdb/testsuite/outputs/gdb.cp/mb-templates/gdb.log:310:==3787344==    definitely lost: 290,311 bytes in 10,340 blocks
	./gdb/testsuite/outputs/gdb.mi/mi-var-rtti/gdb.log:2568:==4158350==    definitely lost: 435,427 bytes in 15,507 blocks
	./gdb/testsuite/outputs/gdb.mi/mi-catch-cpp-exceptions/gdb.log:1704:==4119722==    definitely lost: 435,405 bytes in 15,510 blocks
	./gdb/testsuite/outputs/gdb.mi/mi-vla-fortran/gdb.log:768:==4113266==    definitely lost: 508,585 bytes in 18,109 blocks

	With the fix:
	./gdb/testsuite/outputs/gdb.base/fork-running-state/gdb.log:1536:==2924193==    indirectly lost: 13,848 bytes in 98 blocks
	./gdb/testsuite/outputs/gdb.base/fork-running-state/gdb.log:1675:==2928777==    indirectly lost: 13,848 bytes in 98 blocks
	./gdb/testsuite/outputs/gdb.python/py-inferior-leak/gdb.log:4729:==3353335==    definitely lost: 3,360 bytes in 140 blocks
	./gdb/testsuite/outputs/gdb.base/kill-detach-inferiors-cmd/gdb.log:210:==2746927==    indirectly lost: 13,246 bytes in 154 blocks
	./gdb/testsuite/outputs/gdb.base/inferior-clone/gdb.log:179:==3034984==    indirectly lost: 12,921 bytes in 161 blocks
	./gdb/testsuite/outputs/gdb.base/interrupt-daemon/gdb.log:209:==3006248==    indirectly lost: 20,683 bytes in 174 blocks
	./gdb/testsuite/outputs/gdb.threads/watchpoint-fork/gdb.log:714:==3512403==    indirectly lost: 20,707 bytes in 175 blocks
	./gdb/testsuite/outputs/gdb.threads/watchpoint-fork/gdb.log:962:==3514498==    indirectly lost: 20,851 bytes in 178 blocks
	./gdb/testsuite/outputs/gdb.base/multi-forks/gdb.log:336:==2585839==    indirectly lost: 53,630 bytes in 386 blocks
	./gdb/testsuite/outputs/gdb.base/multi-forks/gdb.log:1338:==2592417==    indirectly lost: 100,008 bytes in 1,154 blocks

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-11-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

	fix leak in gdb_environ
	valgrind reports a leak when assigning a gdb_environ to another gdb_environ.
	The memory allocated for the target gdb_environ env variables is not released.
	The gdb_environ selftest reproduces the leak (see below).
	Fix the leak by clearing the target gdb_environ before std::move-ing the
	members.

	Tested natively and re-running all tests under valgrind.

	==3261873== 4,842 bytes in 69 blocks are definitely lost in loss record 6,772 of 6,839
	==3261873==    at 0x483979B: malloc (vg_replace_malloc.c:393)
	==3261873==    by 0x25A454: xmalloc (alloc.c:57)
	==3261873==    by 0x7D1E4E: xstrdup (xstrdup.c:34)
	==3261873==    by 0x7E2A51: gdb_environ::from_host_environ() (environ.cc:56)
	==3261873==    by 0x66F1C8: test_reinit_from_host_environ (environ-selftests.c:78)
	==3261873==    by 0x66F1C8: selftests::gdb_environ_tests::run_tests() (environ-selftests.c:285)
	==3261873==    by 0x7EFC43: operator() (std_function.h:622)
	=

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-11-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

	Use false/true for some inferior class members instead of 0/1
	Some class members were changed to bool, but there was
	still some assignments or comparisons using 0/1.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-11-27  Tom de Vries  <tdevries@suse.de>

	[gdb/server] Emit warning for SIGINT failure
	Consider the executable from test-case gdb.base/interrupt-daemon.exp.

	When starting it using gdbserver:
	...
	$ ./build/gdbserver/gdbserver localhost:2345 \
	  ./outputs/gdb.base/interrupt-daemon/interrupt-daemon
	...
	and connecting to it using gdb:
	...
	$ gdb -q -ex "target remote localhost:2345" \
	    -ex "set follow-fork-mode child" \
	    -ex "break daemon_main" -ex cont
	...
	we are setup to do the same as in the test-case: interrupt a running inferior
	using ^C.

	So let's try:
	...
	(gdb) continue
	Continuing.
	^C
	...
	After pressing ^C, nothing happens.  This a known problem, filed as
	PR remote/18772.

	The problem is that in linux_process_target::request_interrupt, a kill is used
	to send a SIGINT, but it fails.  And it fails silently.

	Make the failure verbose by adding a warning, such that the gdbserver output
	becomes more helpful:
	...
	Process interrupt-daemon created; pid = 15068
	Listening on port 2345
	Remote debugging from host ::1, port 35148
	Detaching from process 15068
	Detaching from process 15085
	gdbserver: Sending SIGINT to process group of pid 15068 failed: \
	  No such process
	...

	Note that the failure can easily be reproduced using the test-case and target
	board native-gdbserver:
	...
	(gdb) continue^M
	Continuing.^M
	PASS: gdb.base/interrupt-daemon.exp: fg: continue
	^CFAIL: gdb.base/interrupt-daemon.exp: fg: ctrl-c stops process (timeout)
	...
	as reported in PR server/23382.

	Tested on x86_64-linux.
	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-11-27  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-26  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Don't generate core in gdb.base/bt-on-fatal-signal.exp
	When running test-case gdb.base/bt-on-fatal-signal.exp on powerpc64le-linux I
	noticed:
	...
	FAIL: gdb.base/bt-on-fatal-signal.exp: SEGV: scan for backtrace (timeout)
	...

	The timeout is 10 seconds, but generating the core file takes more than a
	minute, probably due to slow NFS.

	I managed to reproduce this behaviour independently of gdb, by compiling
	"int main (void) { __builtin_abort (); }" and running it, which took 1.5
	seconds for a core file 50 times smaller than the one for gdb.

	Fix this by preventing the core file from being generated, using a wrapper
	around gdb that does "ulimit -c 0".

	Tested on x86_64-linux.

2022-11-26  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Handle failure to open .gnu_debugaltlink file
	If we instrument cc-with-tweaks.sh to remove the .gnu_debugaltlink file after
	dwz has created it, with test-case
	gdb.threads/access-mem-running-thread-exit.exp and target board cc-with-dwz-m
	we run into:
	...
	(gdb) file access-mem-running-thread-exit^M
	Reading symbols from access-mem-running-thread-exit...^M
	could not find '.gnu_debugaltlink' file for access-mem-running-thread-exit^M
	...
	followed a bit later by:
	...
	(gdb) file access-mem-running-thread-exit^M
	Reading symbols from access-mem-running-thread-exit...^M
	gdb/dwarf2/read.c:7284: internal-error: create_all_units: \
	  Assertion `per_objfile->per_bfd->all_units.empty ()' failed.^M
	...

	The problem is that create_units does not catch the error thrown by
	dwarf2_get_dwz_file.

	Fix this by catching the error and performing the necessary cleanup, getting
	the same result for the first and second file command.

	PR symtab/29805
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29805

2022-11-26  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

	Fix jump on uninit producer_is_clang bit of cu.h dwarf2_cu struct.
	Valgrind reports a "jump on unitialised bit error" when running
	    e.g. gdb.base/macro-source-path.exp (see details below).

	    Fix this by initializing producer_is_clang member variable of dwarf2_cu.

	    Tested on amd64/debian11 and re-running gdb.base/macro-source-path.exp
	    under valgrind.

	    ==2140965== Conditional jump or move depends on uninitialised value(s)
	    ==2140965==    at 0x5211F7: dwarf_decode_macro_bytes(dwarf2_per_objfile*, buildsym_compunit*, bfd*, unsigned char const*, unsigned char const*, macro_source_file*, line_header const*, dwarf2_section_info const*, int, int, unsigned int, dwarf2_section_info*, dwarf2_section_info*, gdb::optional<unsigned long>, htab*, dwarf2_cu*) (macro.c:676)
	    ==2140965==    by 0x52158A: dwarf_decode_macros(dwarf2_per_objfile*, buildsym_compunit*, dwarf2_section_info const*, line_header const*, unsigned int, unsigned int, dwarf2_section_info*, dwarf2_section_info*, gdb::optional<unsigned long>, int, dwarf2_cu*) (macro.c:967)
	    ==2140965==    by 0x523BC4: dwarf_decode_macros(dwarf2_cu*, unsigned int, int) (read.c:23379)
	    ==2140965==    by 0x552AB5: read_file_scope(die_info*, dwarf2_cu*) (read.c:9687)
	    ==2140965==    by 0x54F7B2: process_die(die_info*, dwarf2_cu*) (read.c:8660)
	    ==2140965==    by 0x5569C7: process_full_comp_unit (read.c:8429)
	    ==2140965==    by 0x5569C7: process_queue (read.c:7675)
	    ==2140965==    by 0x5569C7: dw2_do_instantiate_symtab (read.c:2063)
	    ==2140965==    by 0x5569C7: dw2_instantiate_symtab(dwarf2_per_cu_data*, dwarf2_per_objfile*, bool) (read.c:2085)
	    ==2140965==    by 0x55700B: dw2_expand_symtabs_matching_one(dwarf2_per_cu_data*, dwarf2_per_objfile*, gdb::function_view<bool (char const*, bool)>, gdb::function_view<bool (compunit_symtab*)>) (read.c:3984)
	    ==2140965==    by 0x557EA3: cooked_index_functions::expand_symtabs_matching(objfile*, gdb::function_view<bool (char const*, bool)>, lookup_name_info const*, gdb::function_view<bool (char const*)>, gdb::function_view<bool (compunit_symtab*)>, enum_flags<block_search_flag_values>, domain_enum, search_domain) (read.c:18781)
	    ==2140965==    by 0x778977: objfile::lookup_symbol(block_enum, char const*, domain_enum) (symfile-debug.c:276)
	    ....
	    ==2140965==  Uninitialised value was created by a heap allocation
	    ==2140965==    at 0x4839F01: operator new(unsigned long) (vg_replace_malloc.c:434)
	    ==2140965==    by 0x533A64: cutu_reader::cutu_reader(dwarf2_per_cu_data*, dwarf2_per_objfile*, abbrev_table*, dwarf2_cu*, bool, abbrev_cache*) (read.c:6264)
	    ==2140965==    by 0x5340C2: load_full_comp_unit(dwarf2_per_cu_data*, dwarf2_per_objfile*, dwarf2_cu*, bool, language) (read.c:7729)
	    ==2140965==    by 0x548338: load_cu(dwarf2_per_cu_data*, dwarf2_per_objfile*, bool) (read.c:2021)
	    ==2140965==    by 0x55634C: dw2_do_instantiate_symtab (read.c:2048)
	    ==2140965==    by 0x55634C: dw2_instantiate_symtab(dwarf2_per_cu_data*, dwarf2_per_objfile*, bool) (read.c:2085)
	    ==2140965==    by 0x55700B: dw2_expand_symtabs_matching_one(dwarf2_per_cu_data*, dwarf2_per_objfile*, gdb::function_view<bool (char const*, bool)>, gdb::function_view<bool (compunit_symtab*)>) (read.c:3984)
	    ==2140965==    by 0x557EA3: cooked_index_functions::expand_symtabs_matching(objfile*, gdb::function_view<bool (char const*, bool)>, lookup_name_info const*, gdb::function_view<bool (char const*)>, gdb::function_view<bool (compunit_symtab*)>, enum_flags<block_search_flag_values>, domain_enum, search_domain) (read.c:18781)
	    ==2140965==    by 0x778977: objfile::lookup_symbol(block_enum, char const*, domain_enum) (symfile-debug.c:276)
	    ....

2022-11-26  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

	remove the declared but undefined/unused method find_partial_die
	The method
	       struct partial_die_info *find_partial_die (sect_offset sect_off);
	in cu.h is defined, but is used nowhere and not implemented.

2022-11-26  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-25  Martin Liska  <mliska@suse.cz>

	Revert "readelf: Do not require EI_OSABI for IFUNC."
	This reverts commit ffbbab0b3a1000f862b6d4ce3d9a76ed14f08801.

2022-11-25  Christoph Müllner  <christoph.muellner@vrull.eu>

	riscv: Add AIA extension support (Smaia, Ssaia)
	This commit adds the AIA extensions (Smaia and Ssaia) CSRs.

	bfd/ChangeLog:

		* elfxx-riscv.c: Add 'smaia' and 'ssaia' to the list
		of known standard extensions.

	gas/ChangeLog:

		* config/tc-riscv.c (enum riscv_csr_class):
		(riscv_csr_address): Add CSR classes for Smaia/Ssaia.
		* testsuite/gas/riscv/csr-dw-regnums.d: Add new CSRs.
		* testsuite/gas/riscv/csr-dw-regnums.s: Likewise.
		* testsuite/gas/riscv/csr-version-1p10.d: Likewise.
		* testsuite/gas/riscv/csr-version-1p10.l: Likewise.
		* testsuite/gas/riscv/csr-version-1p11.d: Likewise.
		* testsuite/gas/riscv/csr-version-1p11.l: Likewise.
		* testsuite/gas/riscv/csr-version-1p12.d: Likewise.
		* testsuite/gas/riscv/csr-version-1p12.l: Likewise.
		* testsuite/gas/riscv/csr-version-1p9p1.d: Likewise.
		* testsuite/gas/riscv/csr-version-1p9p1.l: Likewise.
		* testsuite/gas/riscv/csr.s: Likewise.

	include/ChangeLog:

		* opcode/riscv-opc.h (CSR_MISELECT): New CSR macro.
		(CSR_MIREG): Likewise.
		(CSR_MTOPEI): Likewise.
		(CSR_MTOPI): Likewise.
		(CSR_MVIEN): Likewise.
		(CSR_MVIP): Likewise.
		(CSR_MIDELEGH): Likewise.
		(CSR_MIEH): Likewise.
		(CSR_MVIENH): Likewise.
		(CSR_MVIPH): Likewise.
		(CSR_MIPH): Likewise.
		(CSR_SISELECT): Likewise.
		(CSR_SIREG): Likewise.
		(CSR_STOPEI): Likewise.
		(CSR_STOPI): Likewise.
		(CSR_SIEH): Likewise.
		(CSR_SIPH): Likewise.
		(CSR_HVIEN): Likewise.
		(CSR_HVICTL): Likewise.
		(CSR_HVIPRIO1): Likewise.
		(CSR_HVIPRIO2): Likewise.
		(CSR_VSISELECT): Likewise.
		(CSR_VSIREG): Likewise.
		(CSR_VSTOPEI): Likewise.
		(CSR_VSTOPI): Likewise.
		(CSR_HIDELEGH): Likewise.
		(CSR_HVIENH): Likewise.
		(CSR_HVIPH): Likewise.
		(CSR_HVIPRIO1H): Likewise.
		(CSR_HVIPRIO2H): Likewise.
		(CSR_VSIEH): Likewise.
		(CSR_VSIPH): Likewise.
		(DECLARE_CSR): Add CSRs for Smaia and Ssaia.

	Changes for v3:
	- Imply ssaia for smaia
	- Imply zicsr for ssaia (and transitively smaia)
	- Move hypervisor CSRs to Ssaia+H
	- Rebase on upstream/master

	Changes for v2:
	- Add hypervisor and VS CSRs
	- Fix whitespace issue

2022-11-25  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-24  Indu Bhagat  <indu.bhagat@oracle.com>

	sframe/doc: remove usage of xrefautomaticsectiontitle
	xrefautomaticsectiontitle appears to be available from texinfo 5.0 or
	greater.  As such, it is not worthwhile to add requirement for a minimum
	necessary makeinfo version.  So remove the usage of it.

	Also align node name with section title where possible.

	ChangeLog:

		* libsframe/doc/sframe-spec.texi: Remove usage of
		xrefautomaticsectiontitle.

2022-11-24  Andrew Burgess  <aburgess@redhat.com>

	gdb: fix typo in debug output message
	Spotted a minor type, a missing ')', in a debug message.

2022-11-24  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite/gdb.base/break.exp: split test_break
	Move all the remaining tests to a single test_break proc.  It's a bit
	big, but all of these are kind of tied together.  The procs starts by
	setting breakpoints, checks that we can see them in "info breakpoints",
	and tries stopping on them.

	Move all the "set bp_locationX" calls together at the top.

	Change-Id: Id05f98957e1a3462532d2dbd577cd0a7c7263900
	Approved-By: Kevin Buettner <kevinb@redhat.com>

2022-11-24  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite/gdb.base/break.exp: split test_tbreak
	Leave setting bp_location11 in the global scope, so that it's accessible
	to other procs.

	Change-Id: I8928f01640d3a1e993649b2168b9eda0724ee1d9
	Approved-By: Kevin Buettner <kevinb@redhat.com>

2022-11-24  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite/gdb.base/break.exp: split test_no_break_on_catchpoint
	Change-Id: Ifa7070943f1de22c2839fedf5f346d6591bb5a76
	Approved-By: Kevin Buettner <kevinb@redhat.com>

	gdb/testsuite/gdb.base/break.exp: split test_break_nonexistent_line
	Change-Id: I4390dd5da23bae83ccc513ad0de0169ddff7df12
	Approved-By: Kevin Buettner <kevinb@redhat.com>

2022-11-24  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite/gdb.base/break.exp: split test_break_default
	One special thing here is that the part just above this one, that sets
	catchpoints and verifies they are not hit, requires that we resume
	execution to verify that the catchpoints are indeed not hit.   I guess
	it was previously achieved by the until command, but it doesn't happen
	now that the until is moved into test_break_default.  Add a
	gdb_continue_to_end after setting the catchpoints.  If any catchpoint
	were to be hit, it would catch the problem.

	Change-Id: I5d4b43da91886b1beda9f6e56b05aa04331a9c05
	Approved-By: Kevin Buettner <kevinb@redhat.com>

2022-11-24  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite/gdb.base/break.exp: split test_break_silent_and_more
	This one is a bit tricky.  The clear tests seem to depend on the various
	breakpoints that have been set before, starting with the "silent"
	breakpoints.  So, move all this in a single chunk, it can always be
	split later if needed.

	Change-Id: I7ba61a5b130ade63eda0c4790534840339f8a72f
	Approved-By: Kevin Buettner <kevinb@redhat.com>

2022-11-24  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite/gdb.base/break.exp: split test_break_line_convenience_var
	Change-Id: I593002373da971a0a4d6b5355d3fe321873479ab
	Approved-By: Kevin Buettner <kevinb@redhat.com>

	gdb/testsuite/gdb.base/break.exp: split test_break_user_call
	Change-Id: I9151ce9db9435722b758f41c6606b461bf15f320
	Approved-By: Kevin Buettner <kevinb@redhat.com>

	gdb/testsuite/gdb.base/break.exp: split test_finish_arguments
	Change-Id: Id84babed1eeb3ce7d14b94ff332795964e8ead51
	Approved-By: Kevin Buettner <kevinb@redhat.com>

2022-11-24  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite/gdb.base/break.exp: use proc_with_prefix for test_next_with_recursion
	This one is already in a proc, just make the proc use proc_with_prefix,
	for consistency.

	Change-Id: I313ecf5097ff04526c29396529baeba84e37df5a
	Approved-By: Kevin Buettner <kevinb@redhat.com>

2022-11-24  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite/gdb.base/break.exp: split test_break_optimized_prologue
	Change-Id: Ibf17033c8ce72aa5cfe1b739be2902e84a5e945d
	Approved-By: Kevin Buettner <kevinb@redhat.com>

	gdb/testsuite/gdb.base/break.exp: split test_rbreak_shlib
	Change-Id: I130e8914c2713095aab03e84aba1481b4c7af978
	Approved-By: Kevin Buettner <kevinb@redhat.com>

	gdb/testsuite/gdb.base/break.exp: split test_break_file_line_convenience_var
	Change-Id: I0c31b037669b2917e062bf431372fb6531f8f53c
	Approved-By: Kevin Buettner <kevinb@redhat.com>

	gdb/testsuite/gdb.base/break.exp: split test_break_commands_clear
	Change-Id: Ia58f90117d52fc419fc494836d9b4ed5d902fe9b
	Approved-By: Kevin Buettner <kevinb@redhat.com>

2022-11-24  Nick Clifton  <nickc@redhat.com>

	Impport libiberty commit: 885b6660c17f from gcc mainline.  Fix gas's acinclude.m4 to stop a potwntial configure time warning message.

2022-11-24  Martin Liska  <mliska@suse.cz>

	readelf: Do not require EI_OSABI for IFUNC.
		PR 29718

	binutils/ChangeLog:

		* readelf.c (get_symbol_type): Consider STT_GNU_IFUNC as
		reserved name.

2022-11-24  Jan Beulich  <jbeulich@suse.com>

	x86: widen applicability and use of CheckRegSize
	First of all make operand_type_register_match() apply to all sized
	operands, i.e. in Intel Syntax also to respective memory ones. This
	addresses gas wrongly accepting certain SIMD insns where register and
	memory operand sizes should match but don't. This apparently has
	affected all templates with one memory-only operand and one or more
	register ones, both permitting at least two sizes, due to CheckRegSize
	not taking effect.

	Then also add CheckRegSize to a couple of non-SIMD templates matching
	that same pattern of memory-only vs register operands. This replaces
	bogus (for Intel Syntax) diagnostics referring to a wrong suffix (when
	none was used at all) by "type mismatch" ones, just like already emitted
	for insns where the template allows a register operand alongside a
	memory one at any particular position.

	This also is a prereq to limiting (ideally eliminating in the long run)
	suffix "derivation" in Intel Syntax mode.

	While making the code adjustment also flip order of checks to do the
	cheaper one first in both cases.

2022-11-24  Jan Beulich  <jbeulich@suse.com>

	x86: add missing CheckRegSize
	To properly and predictably determine operand size encoding (operand
	size or REX.W prefixes), consistent operand sizes need to be specified.
	Add CheckRegSize where this was previously missing.

	x86: correct handling of LAR and LSL
	Both uniformly only ever take 16-bit memory operands while at the same
	time requiring matching (in size) register operands, which then also
	should disassemble that way. This in particular requires splitting each
	of the templates for the assembler and separating decode of the
	register and memory forms in the disassembler.

2022-11-24  Alan Modra  <amodra@gmail.com>

	Tidy objdump printing of section size
		* objdump.c (load_specific_debug_section): Use PRIx64 format.

	Constify nm format array
		* nm.c (formats, format): Make const.

2022-11-24  Alan Modra  <amodra@gmail.com>

	PR16995, m68k coldfire emac immediate to macsr incorrect disassembly
	Mode/reg bits for these insns are 000 Dy, 001 Ay, and 111 100 for the
	move immediate.

		* m68k-opc.c (m68k_opcodes): Only accept 000 and 001 as mode
		for move reg to macsr/mask insns.

2022-11-24  Mark Harmstone  <mark@harmstone.com>

	gas: Disable --gcodeview on PE targets with no O_secrel

2022-11-24  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-23  Torbjörn SVENSSON  <torbjorn.svensson@foss.st.com>

	gdb/arm: Include FType bit in EXC_RETURN pattern on v8m
	For v8m, the EXC_RETURN pattern, without security extension, consists of
	FType, Mode and SPSEL.  These are the same bits that are used in v7m.
	This patch extends the list of patterns to include also the FType bit
	and not just Mode and SPSEL bits for v8m targets without security
	extension.

2022-11-23  Alan Modra  <amodra@gmail.com>

	regen POTFILES.in

2022-11-23  Alan Modra  <amodra@gmail.com>

	PR22509 - Null pointer dereference on coff_slurp_reloc_table
	This extends the commit 4581a1c7d304 fix to more targets, which
	hardens BFD a little.  I think the real underlying problem was the
	bfd_canonicalize_reloc call in load_specific_debug_section which
	passed a NULL for "symbols".  Fix that too.

		PR 22509
	bfd/
		* aoutx.h (swap_ext_reloc_out): Gracefully handle NULL symbols.
		* i386lynx.c (swap_ext_reloc_out): Likewise.
		* pdp11.c (pdp11_aout_swap_reloc_out): Likewise.
		* coff-tic30.c (reloc_processing): Likewise.
		* coff-tic4x.c (tic4x_reloc_processing): Likewise.
		* coff-tic54x.c (tic54x_reloc_processing): Likewise.
		* coff-z80.c (reloc_processing): Likewise.
		* coff-z8k.c (reloc_processing): Likewise.
		* ecoff.c (ecoff_slurp_reloc_table): Likewise.
		* som.c (som_set_reloc_info): Likewise.
	binutils/
		* objdump.c (load_specific_debug_section): Pass syms to
		bfd_canonicalize_reloc.

2022-11-23  Alan Modra  <amodra@gmail.com>

	asan: NULL deref in filter_symbols
	If tdata->symbols is NULL, make tdata->symcount zero too.  This makes
	wasm_get_symtab_upper_bound return the proper result and stops
	cascading errors.

		* wasm-module.c (wasm_scan_name_function_section): Clear
		tdata->symcount on error.

2022-11-23  Luis Machado  <luis.machado@arm.com>

	Document the memory_tagged argument for memory region callbacks
	There were no comments in some instances (gdb/defs.h, gdb/core.c and
	gdb/linux-tdep.c), so address that by adding comments where those are missing.

2022-11-23  Tom de Vries  <tdevries@loganberry-1.arch.suse.de>

	Fix gdb.cp/gdb2495.exp on powerpc64le
	On powerpc64le-linux I ran into this FAIL:
	...
	(gdb) p exceptions.throw_function()^M
	terminate called after throwing an instance of 'int'^M
	^M
	Program received signal SIGABRT, Aborted.^M
	0x00007ffff7979838 in raise () from /lib64/libc.so.6^M
	The program being debugged was signaled while in a function called from GDB.^M
	GDB remains in the frame where the signal was received.^M
	To change this behavior use "set unwindonsignal on".^M
	Evaluation of the expression containing the function^M
	(SimpleException::throw_function()) will be abandoned.^M
	When the function is done executing, GDB will silently stop.^M
	(gdb) FAIL: gdb.cp/gdb2495.exp: call a function that raises an exception \
	  without a handler.
	...

	The following happens:
	- we start an inferior call
	- an internal breakpoint is set on the global entry point of std::terminate
	- the inferior call uses the local entry point
	- the breakpoint is not triggered
	- we run into std::terminate

	We can fix this by simply adding the missing gdbarch_skip_entrypoint call in
	create_std_terminate_master_breakpoint, but we try to do this a bit more
	generic, by:
	- adding a variant of function create_internal_breakpoint which takes a
	  minimal symbol instead of an address as argument
	- in the new function:
	  - using both gdbarch_convert_from_func_ptr_addr and gdbarch_skip_entrypoint
	  - documenting why we don't need to use gdbarch_addr_bits_remove
	  - adding a note about possibly
	    needing gdbarch_deprecated_function_start_offset.
	- using the new function in:
	  - create_std_terminate_master_breakpoint
	  - create_exception_master_breakpoint_hook, which currently uses only
	    gdbarch_convert_from_func_ptr_addr.

	Note: we could use the new function in more locations in breakpoint.c, but
	as we're not aware of any related failures, we declare this out of scope for
	this patch.

	Tested on x86_64-linux, powerpc64le-linux.

	Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com>
	Tested-by: Carl Love <cel@us.ibm.com>
	PR tdep/29793
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29793

2022-11-23  Xiao Zeng  <zengxiao@eswincomputing.com>

	RISC-V: Make R_RISCV_SUB6 conforms to riscv ABI standard
	According to the riscv psabi, R_RISCV_SUB6 only allows 6 least significant
	bits are valid, but since binutils implementation, we usually get 8 bits
	field for it.  That means, the high 2 bits could be other field and have
	different purpose.  Therefore, we should filter the 8 bits to 6 bits before
	calculate, and then only encode the valid 6 bits back.  By the way, we also
	need the out-of-range check for R_RISCV_SUB6, and the overflow checks for
	all R_RISCV_ADD/SUB/SET relocations, but we can add them in the future patches.

	Passing riscv-gnu-toolchain regressions.

	bfd/ChangeLog:

	        * elfnn-riscv.c (riscv_elf_relocate_section): Take the R_RISCV_SUB6
		lower 6 bits as the significant bit.
	        * elfxx-riscv.c (riscv_elf_add_sub_reloc): Likewise.

2022-11-23  Mark Harmstone  <mark@harmstone.com>

	gas: Add --gcodeview option

	ld: Add section contributions substream to PDB files

2022-11-23  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-22  John Baldwin  <jhb@FreeBSD.org>

	aarch64-fbsd: Use a static regset for the TLS register set.
	This uses custom collect/supply regset handlers which pass the TLS
	register number from the gdbarch_tdep as the base register number.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-11-22  John Baldwin  <jhb@FreeBSD.org>

	arm-fbsd: Use a static regset for the TLS register set.
	This uses custom collect/supply regset handlers which pass the TLS
	register number from the gdbarch_tdep as the base register number.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-11-22  John Baldwin  <jhb@FreeBSD.org>

	fbsd-nat: Pass an optional register base to the register set helpers.
	This is needed to permit using the helpers for register sets with a
	variable base.  In particular regnum needs to be converted into a
	relative register number before passed to regcache_map_supplies.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-11-22  John Baldwin  <jhb@FreeBSD.org>

	fbsd-nat: Use regset supply/collect methods.
	fbsd-nat includes various helper routines for fetching and storing
	register sets via ptrace where the register set is described by a
	regset.  These helper routines directly invoke the
	supply/collect_regset regcache methods which doesn't permit a regset
	to provide custom logic when fetching or storing a register set.
	Instead, just use the function pointers from the struct regset
	directly.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-11-22  John Baldwin  <jhb@FreeBSD.org>

	regcache: Add collect/supply_regset variants that accept a register base.
	Some register sets described by an array of regcache_map_entry
	structures do not have fixed register numbers in their associated
	architecture but do describe a block of registers whose numbers are at
	fixed offsets relative to some base register value.  An example of
	this are the TLS register sets for the ARM and AArch64 architectures.

	Currently OS-specific architectures create register maps and register
	sets dynamically using the register base number.  However, this
	requires duplicating the code to create the register map and register
	set.  To reduce duplication, add variants of the collect_regset and
	supply_regset regcache methods which accept a base register number.
	For valid register map entries (i.e. not REGCACHE_MAP_SKIP), add this
	base register number to the value from the map entry to determine the
	final register number.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-11-22  H.J. Lu  <hjl.tools@gmail.com>

	x86: Don't define _TLS_MODULE_BASE_ for ld -r
	bfd/

		PR ld/29820
		* elfxx-x86.c (_bfd_x86_elf_always_size_sections): Don't define
		 _TLS_MODULE_BASE_ for ld -r.

	ld/

		PR ld/29820
		* testsuite/ld-x86-64/pr29820.d: New file.
		* testsuite/ld-x86-64/pr29820.s: Likewise.
		* testsuite/ld-x86-64/x86-64.ex: Run pr29820.

2022-11-22  Alan Modra  <amodra@gmail.com>

	Don't use "long" in readelf for file offsets
	The aim here is to improve readelf handling of large 64-bit object
	files on LLP64 hosts (Windows) where long is only 32 bits.  The patch
	changes more than just file offsets.  Addresses and sizes are also
	changed to avoid "long".  Most places get to use uint64_t even where
	size_t may be more appropriate, because that allows some overflow
	checks to be implemented easily (*alloc changes).

		* dwarf.c (cmalloc, xcmalloc, xcrealloc, xcalloc2): Make nmemb
		parameter uint64_t.
		* dwarf.h: Update prototypes.
		(struct dwarf_section): Make num_relocs uint64_t.
		* elfcomm.c (setup_archive): Update error format.
		* elfcomm.h (struct archive_info): Make sym_size, longnames_size,
		nested_member_origin, next_arhdr_offset uint64_t.
		* readelf.c (struct filedata): Make archive_file_offset,
		archive_file_size, string_table_length, dynamic_addr,
		dynamic_nent, dynamic_strings_length, num_dynamic_syms,
		dynamic_syminfo_offset uint64_t.
		(many functions): Replace uses of "unsigned long" with
		"uint64_t" or "size_t".

2022-11-22  Alan Modra  <amodra@gmail.com>

	Re: readelf: use fseeko64 or fseeko if possible
	Replace the macros with a small wrapper function that verifies the fseek
	offset arg isn't overlarge.

		* readelf.c (FSEEK_FUNC): Delete, replace uses with..
		(fseek64): ..this new function.
		(process_program_headers): Don't cast p_offset to long.

2022-11-22  Torbjörn SVENSSON  <torbjorn.svensson@foss.st.com>

	gdb/arm: Fix obvious typo in b0b23e06c3a
	As part of the rebase of the patch, I managed to loose the local
	changes I had for the comments from Tomas in
	https://sourceware.org/pipermail/gdb-patches/2022-November/193413.html
	This patch corrects the obvious two typos.

2022-11-22  Michael Matz  <matz@suse.de>

	binutils/configure.ac: integrate last change
	Integrate back checks for fseeko{,64} into configure.ac, so
	that regeneration works.

	binutils/
		* configure.ac: Add fseeko, fseeko64 checks.
		* configure: Regenerate.

2022-11-22  Shahab Vahedi  <shahab@synopsys.com>

	opcodes: Correct address for ARC's "isa_config" aux reg
	This patch changes the address for "isa_config" auxiliary register
	from 0xC2 to the correct value 0xC1.  Moreover, it only exists in
	arc700+ and not all ARCs.

	opcodes/ChangeLog:

		* arc-regs.h: Change isa_config address to 0xc1.
		isa_config exists for ARC700 and ARCV2 and not ARCALL.

2022-11-22  Bruno Larsen  <blarsen@redhat.com>

	gdb/testsuite: remove gcc restriction from gdb.dwarf2/clang-cli-macro.exp
	With the recent changes to the dwarf assembler, there is no longer a
	need to test for gcc in gdb.dwarf2/clang-cli-macro.exp and mark it as
	untested. This commit removes that logic.

2022-11-22  Jan Beulich  <jbeulich@suse.com>

	gas/sframe: avoid "shadowing" of glibc function name
	Once again: Old enough glibc has an (unguarded) declaration of index()
	in string.h, which triggers a "shadows a global declaration" warning
	with our choice of wanring level and with at least some gcc versions.

2022-11-22  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-21  Brett Werling  <bwerl.dev@gmail.com>

	readelf: use fseeko64 or fseeko if possible
	Changes readelf to make use first of fseeko64 and then fseeko,
	depending on which of those is available. If neither is available,
	reverts to the previous behavior of using fseek.

	This is necessary when building readelf for LLP64 systems, where a
	long will only be 32 bits wide. If the elf file in question is >= 2 GiB,
	that is greater than the max long value and therefore fseek will fail
	indicating that the offset is negative. On such systems, making use of
	fseeko64 or fseeko will result in the ability so seek past the 2 GiB
	max long boundary.

	Note that large archive handling in readelf remains to be fixed.

2022-11-21  Alan Modra  <amodra@gmail.com>

	PR29807, SIGSEGV when linking fuzzed PE object
		PR 29807
		* cofflink.c (_bfd_coff_generic_relocate_section): Skip relocs
		against symbols with a NULL section.

2022-11-21  Alan Modra  <amodra@gmail.com>

	Re: ld: Always output local symbol for relocatable link
	Remove this code dating back to commit 98790d3a95fc entirely, what it
	was trying to do is done elsewhere.

		PR ld/29761
		* elflink.c (elf_link_output_symstrtab): Don't handle symbols
		in SEC_EXCLUDE sections here.

2022-11-21  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

	When getting the locno of a bpstat, handle the case of bp with null locations.
	The test py-objfile.exp unloads the current file while debugging the process.
	This results in bpstat bs->b->loc to become nullptr.
	Handle this case in breakpoint.c:bpstat_locno.

	Note: GDB crashes on this problem with an internal error,
	but the end of gdb summary shows:
	  ...
	                  === gdb Summary ===

	  # of expected passes		36

	The output also does not contain a 'FAIL:'.
	After the fix, the nr of expected passes increased.

	In the gdb.log output, one can see:
	  ...
	  Fatal signal: Segmentation fault
	  ----- Backtrace -----
	  0x55698905c5b9 gdb_internal_backtrace_1
	          ../../binutils-gdb/gdb/bt-utils.c:122
	  0x55698905c5b9 _Z22gdb_internal_backtracev
	  ...

	  ERROR: Couldn't send python print(objfile.filename) to GDB.
	  ERROR: : spawn id exp9 not open
	      while executing
	  "expect {
	  -i exp9 -timeout 10
	          -re ".*A problem internal to GDB has been detected" {
	              fail "$message (GDB internal error)"
	              gdb_internal_error..."
	      ("uplevel" body line 1)
	      invoked from within
	  ....

	Wondering if it might be possible to improve gdb_test to have
	  gdb_test "python print(objfile.filename)" "None" \
	      "objfile.filename after objfile is unloaded"
	reporting a failed result instead of just producing the internal error.

2022-11-21  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

	Fix use after free introduced by $_hit_bpnum/$_hit_locno variables.
	If the commands of the bpstat bs contain commands such as step or next or
	continue, the BS and its commands are freed by execute_control_command.

	So, we cannot remember the BS that was printed. Instead, remember
	the bpnum and locno.

	Regtested on debian/amd64 and re-run a few tests under valgrind.

2022-11-21  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

	Fix step-over-syscall.exp matching regexp for $bpnum.$locno matching
	step-over-syscall.exp has some specific tests for gdbserver.
	The regexp matching breakpoint hit must take the added locno into account.

	Test re-run in 3 modes (normal, native-gdbserver and native-extended-gdbserver).

2022-11-21  Nick Clifton  <nickc@redhat.com>

	Fix ARM and AArch64 assembler tests to work in a multi-arch environment.
		PR 29764
	gas	* testsuite/gas/arm/cpu-cortex-a76ae.d: Add arm prefix to the -m
		option passed to objdump.
		* testsuite/gas/arm/cpu-cortex-a77.d: Likewise.
		* testsuite/gas/aarch64/cpu-cortex-a76ae.d: Add aarch64 prefix to
		the -m option passed to objdump.
		* testsuite/gas/aarch64/cpu-cortex-a77.d: Likewise.

	bfd	* cpu-arm.c (scan): Accept machine names prefixed with "arm:".
		* cpu-aarch64.c (scan): Accept machine names prefixed with "aarch64:".

	bin	* doc/binutils.texi (objdump): Note that the -m option supports
		the <architecture>:<machine> syntax.

2022-11-21  Torbjörn SVENSSON  <torbjorn.svensson@foss.st.com>

	gdb/arm: Ensure that stack pointers are in sync
	For targets with secext, msp and psp can be seen as an alias for one
	of msp_s, msp_ns, psp_s or psp_ns.
	Without this patch, sp might be secure, but msp or psp is non-secure
	(this state can not happen in the hardware).

	gdb/arm: Update active msp/psp when switching stack
	For targets with secext, msp and psp can be seen as an alias for one
	of msp_s, msp_ns, psp_s or psp_ns. When switching active sp, the
	corresponding msp/psp needs to be switched too.

2022-11-21  Jiangshuai Li  <jiangshuai_li@linux.alibaba.com>

	gdb/csky just return type from csky_vector_type() for vector resgisters
	Some gdb stubs may not describe the type for vector registers in the
	tdesc-xml and only send bitsize="128", gdb can't deal with a reg
	with default type int with bitsize==128. So Just return csky_vector_type()
	for vector resgisters.

	gdb/csky return type int32 for float and vector pseudo regs
	When reg_nr is one of the float and vector pseudo registers,
	return builtin_type (gdbarch)->builtin_int32 for it.

2022-11-21  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	[PR build/29791] gnulib: Disable _GL_ATTRIBUTE_DEALLOC on Solaris
	gdbsupport compilation badly fails with GCC 12 on Solaris, with errors
	like

	../gnulib/config.h:1693:72: error: ‘malloc’ attribute argument 1 is ambiguous
	 1693 | # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i)))
	      |                                                                        ^
	../gnulib/config.h:1693:72: note: use a cast to the expected type to disambiguate

	We've not yet been able to determine where the ambiguity actually lies,
	so this patch works around the issue by disabling _GL_ATTRIBUTE_DEALLOC
	on Solaris, at least as a workaround for GDB 13.

	As Tom suggested in the PR, this is done using our infrastructure for
	local gnulib patches.

	Tested on sparcv9-sun-solaris2.11, amd64-pc-solaris2.11, and
	x86_64-pc-linux-gnu.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-11-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	Fix sol-thread.c compilation on 32-bit Solaris
	sol-thread.c fails to compile on 32-bit Solaris: there are several
	instances of

	In file included from /vol/src/gnu/gdb/hg/master/local/gdb/../gdbsupport/common-defs.h:203,
	                 from /vol/src/gnu/gdb/hg/master/local/gdb/defs.h:28,
	                 from /vol/src/gnu/gdb/hg/master/local/gdb/sol-thread.c:51:
	/vol/src/gnu/gdb/hg/master/local/gdb/sol-thread.c: In member function ‘virtual void sol_thread_target::resume(ptid_t, int, gdb_signal)’:
	/vol/src/gnu/gdb/hg/master/local/gdb/sol-thread.c:416:20: error: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘ULONGEST’ {aka ‘long long unsigned int’} [-Werror=format=]
	  416 |         warning (_("Specified thread %ld seems to have terminated"),
	      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	/vol/src/gnu/gdb/hg/master/local/gdb/../gdbsupport/gdb_locale.h:28:29:
	note: in definition of macro ‘_’
	   28 | # define _(String) gettext (String)
	      |                             ^~~~~~
	/vol/src/gnu/gdb/hg/master/local/gdb/sol-thread.c:416:40: note: format
	string is defined here
	  416 |         warning (_("Specified thread %ld seems to have terminated"),
	      |                                      ~~^
	      |                                        |
	      |                                        long int
	      |                                      %lld

	Fixed by using pulongest () instead.

	Tested on i386-pc-solaris2.11, amd64-pc-solaris2.11,
	sparc-sun-solaris2.11, and sparcv9-sun-solaris2.11 (together with
	Simon's patch for PR build/29798).

2022-11-20  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

	Add missing gdb_prompt in ctxobj.exp to avoid random failure, fix typo.
	ctxobj.exp fails randomly when computer is loaded.
	With the addition of $gdb_prompt in the regexp testing for breakpoint hit,
	I could not make it fail anymore.

	Also fixed a typo in a comment.

2022-11-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

	Show locno for 'multi location' breakpoint hit msg+conv var $_hit_bbnum $_hit_locno PR breakpoints/12464
	This implements the request given in PR breakpoints/12464.

	Before this patch, when a breakpoint that has multiple locations is reached,
	GDB printed:
	  Thread 1 "zeoes" hit Breakpoint 1, some_func () at somefunc1.c:5

	This patch changes the message so that bkpt_print_id prints the precise
	encountered breakpoint:
	  Thread 1 "zeoes" hit Breakpoint 1.2, some_func () at somefunc1.c:5

	In mi mode, bkpt_print_id also (optionally) prints a new table field "locno":
	  locno is printed when the breakpoint hit has more than one location.
	Note that according to the GDB user manual node 'GDB/MI Development and Front
	Ends', it is ok to add new fields without changing the MI version.

	Also, when a breakpoint is reached, the convenience variables
	$_hit_bpnum and $_hit_locno are set to the encountered breakpoint number
	and location number.

	$_hit_bpnum and $_hit_locno can a.o. be used in the command list of a
	breakpoint, to disable the specific encountered breakpoint, e.g.
	   disable $_hit_bpnum.$_hit_locno

	In case the breakpoint has only one location, $_hit_locno is set to
	the value 1, so as to allow a command such as:
	  disable $_hit_bpnum.$_hit_locno
	to disable the breakpoint even when the breakpoint has only one location.

	This also fixes a strange behaviour: when a breakpoint X has only
	one location,
	  enable|disable X.1
	is accepted but transforms the breakpoint in a multiple locations
	breakpoint having only one location.

	The changes in RFA v4 handle the comments of Tom Tromey:
	 - Changed convenience var names from $bkptno/$locno to
	   $_hit_bpnum/$_hit_locno.
	 - updated the tests and user manual accordingly.
	   User manual also explictly describes that $_hit_locno is set to 1
	   for a breakpoint with a single location.
	 - The variable values are now set in bpstat_do_actions_1 so that
	   they are set for silent breakpoints, and when several breakpoints
	   are hit at the same time, that the variables are set to the printed
	   breakpoint.

	The changes in RFA v3 handle the additional comments of Eli:
	 GDB/NEW:
	  - Use max 80-column
	  - Use 'code location' instead of 'location'.
	  - Fix typo $bkpno
	  - Ensure that disable $bkptno and disable $bkptno.$locno have
	    each their explanation inthe example
	  - Reworded the 'breakpoint-hit' paragraph.
	 gdb.texinfo:
	  - Use 'code location' instead of 'location'.
	  - Add a note to clarify the distinction between $bkptno and $bpnum.
	  - Use @kbd instead of examples with only one command.

	Compared to RFA v1, the changes in v2 handle the comments given by
	Keith Seitz and Eli Zaretskii:
	  - Use %s for the result of paddress
	  - Use bkptno_numopt_re instead of 2 different -re cases
	  - use C@t{++}
	  - Add index entries for $bkptno and $locno
	  - Added an example for "locno" in the mi interface
	  - Added examples in the Break command manual.

2022-11-19  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Add 'Ssstateen' extension and its CSRs
	This commit adds 'Ssstateen' extension, which is a supervisor-visible view
	of the 'Smstateen' extension.  It means, this extension implements sstateen*
	and hstateen* CSRs of the 'Smstateen' extension.

	Note that 'Smstateen' extension itself is unchanged but due to
	implementation simplicity, it is implemented so that 'Smstateen' implies
	'Ssstateen' (just like 'M' implies 'Zmmul').

	This is based on the latest version of RISC-V Profiles
	(version 0.9-draft, Frozen):
	<https://github.com/riscv/riscv-profiles/commit/226b7f643067b29abc6723fac60d5f6d3f9eb901>

	bfd/ChangeLog:

		* elfxx-riscv.c (riscv_implicit_subsets): Update implication rules.
		(riscv_supported_std_s_ext) Add 'Ssstateen' extension.

	gas/ChangeLog:

		* config/tc-riscv.c (enum riscv_csr_class): Rename
		CSR_CLASS_SMSTATEEN_AND_H{,_32} to CSR_CLASS_SSSTATEEN_...
		Add CSR_CLASS_SSSTATEEN.
		(riscv_csr_address): Support new/renamed CSR classes.
		* testsuite/gas/riscv/csr.s: Add 'Ssstateen' extension to comment.
		* testsuite/gas/riscv/csr-version-1p9p1.l: Reflect changes to
		error messages.
		* testsuite/gas/riscv/csr-version-1p10.l: Likewise.
		* testsuite/gas/riscv/csr-version-1p11.l: Likewise.
		* testsuite/gas/riscv/csr-version-1p12.l: Likewise.
		* testsuite/gas/riscv/ssstateen-csr.s: Test for 'Ssstateen' CSRs.
		* testsuite/gas/riscv/ssstateen-csr.d: Likewise.
		* testsuite/gas/riscv/smstateen-csr-s.d: Test to make sure that
		supervisor/hypervisor part of 'Smstateen' CSRs are accessible from
		'RV32IH_Smstateen', not just from 'RV32IH_Ssstateen' that is tested
		in ssstateen-csr.d.

	include/ChangeLog:

		* opcode/riscv-opc.h: Update DECLARE_CSR declarations with
		new CSR classes.

2022-11-19  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-18  Simon Marchi  <simon.marchi@efficios.com>

	gdbserver/linux-x86: move lwp declaration out of __x86_64__ region
	Commit 4855cbdc3d8f ("gdbserver/linux-x86: make is_64bit_tdesc accept
	thread as a parameter") caused this when building in 32 bits / i386
	mode:

	      CXX    linux-x86-low.o
	    In file included from /home/smarchi/src/binutils-gdb/gdbserver/linux-x86-low.cc:24:
	    /home/smarchi/src/binutils-gdb/gdbserver/linux-x86-low.cc: In member function ‘virtual int x86_target::low_get_thread_area(int, CORE_ADDR*)’:
	    /home/smarchi/src/binutils-gdb/gdbserver/linux-x86-low.cc:357:47: error: ‘lwp’ was not declared in this scope
	      357 |     struct thread_info *thr = get_lwp_thread (lwp);
	          |                                               ^~~
	    /home/smarchi/src/binutils-gdb/gdbserver/linux-low.h:709:31: note: in definition of macro ‘get_lwp_thread’
	      709 | #define get_lwp_thread(lwp) ((lwp)->thread)
	          |                               ^~~

	This is because it moved the lwp variable declaration inside the
	__x86_64__ guard, making it unavailable when building in 32 bits mode.
	Move the lwp variable outside of the __x86_64__ region.

	Change-Id: I7fa3938c6b44b345c27a52c8b8d3ea12aba53e05

2022-11-18  Simon Marchi  <simon.marchi@efficios.com>

	gdbserver: use current_process in ps_getpid
	The following patch ("gdbserver: switch to right process in
	find_one_thread") makes it so find_one_thread calls into libthread_db
	with a current process but no current thread.  This tripped on ps_getpid
	using current_thread in order to get the process' pid.  Get the pid from
	`current_process ()` instead, which removes the need to have a current
	thread.  Eventually, it would be good to get it from the
	gdb_ps_prochandle_t structure, to avoid the need for a current process
	as well.

	Reviewed-By: Andrew Burgess <aburgess@redhat.com>
	Change-Id: I9d2fae266419199a2fbc2fde0a5104c6e0dbd2d5

2022-11-18  Simon Marchi  <simon.marchi@efficios.com>

	gdbserver/linux-x86: make is_64bit_tdesc accept thread as a parameter
	ps_get_thread_area receives as a parameter the lwpid it must work on.
	It then calls is_64bit_tdesc, which uses the current_thread as the
	thread to work on.  However, it is not said that both are the same.

	This became a problem when working in a following patch that makes
	find_one_thread switch to a process but to no thread (current_thread ==
	nullptr).  When libthread_db needed to get the thread area,
	is_64bit_tdesc would try to get the regcache of a nullptr thread.

	Fix that by making is_64bit_tdesc accept the thread to work on as a
	parameter.  Find the right thread from the context, when possible (when
	we know the lwpid to work on).  Otherwise, pass "current_thread", to
	retain the existing behavior.

	Reviewed-By: Andrew Burgess <aburgess@redhat.com>
	Change-Id: I44394d6be92392fa28de71982fd04517ce8a3007

2022-11-18  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbserver/linux: take condition out of callback in find_lwp_pid
	Just a small optimization, it's not necessary to recompute lwp at each
	iteration.

	While at it, change the variable type to long, as ptid_t::lwp returns a
	long.

	Reviewed-By: Andrew Burgess <aburgess@redhat.com>
	Change-Id: I181670ce1f90b59cb09ea4899367750be2ad9105

2022-11-18  Johnson Sun  <j3.soon777@gmail.com>

	Fix deletion of FinishBreakpoints
	Currently, FinishBreakpoints are set at the return address of a frame based on
	the `finish' command, and are meant to be temporary breakpoints. However, they
	are not being cleaned up after use, as reported in PR python/18655. This was
	happening because the disposition of the breakpoint was not being set
	correctly.

	This commit fixes this issue by correctly setting the disposition in the
	post-stop hook of the breakpoint. It also adds a test to ensure this feature
	isn't regressed in the future.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=18655

2022-11-18  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: fix symtab.c build on 32 bit targets
	When building on Ubuntu 22.04, gcc 12, x86-64 with -m32 and -O2, I get:

	      CXX    symtab.o
	    /home/smarchi/src/binutils-gdb/gdb/symtab.c: In member function ‘std::vector<symbol_search> global_symbol_searcher::search() const’:
	    /home/smarchi/src/binutils-gdb/gdb/symtab.c:4961:44: error: ‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Werror=format-overflow=]
	     4961 |               sprintf (tmp, "operator%.*s%s", fix, " ", opname);
	          |                                            ^
	    In file included from /usr/include/stdio.h:894,
	                     from ../gnulib/import/stdio.h:43,
	                     from /home/smarchi/src/binutils-gdb/gdb/../gdbsupport/common-defs.h:86,
	                     from /home/smarchi/src/binutils-gdb/gdb/defs.h:28,
	                     from /home/smarchi/src/binutils-gdb/gdb/symtab.c:20:
	    In function ‘int sprintf(char*, const char*, ...)’,
	        inlined from ‘std::vector<symbol_search> global_symbol_searcher::search() const’ at /home/smarchi/src/binutils-gdb/gdb/symtab.c:4961:16:
	    /usr/include/i386-linux-gnu/bits/stdio2.h:38:34: note: ‘__builtin___sprintf_chk’ output between 9 and 2147483648 bytes into a destination of size 2147483647
	       38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
	          |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	       39 |                                   __glibc_objsize (__s), __fmt,
	          |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	       40 |                                   __va_arg_pack ());
	          |                                   ~~~~~~~~~~~~~~~~~

	PR build/29798 shows a similar error message but on Solaris.

	Work around that by using string_printf.  It is a good thing to get rid
	of the alloca anyway.

	Change-Id: Ifbac11fee3062ad7f134d596b4e2229dc5d166f9
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29798

2022-11-18  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: rewrite gdb.cp/call-method-register.exp with dwarf assembler
	Convert the gdb.cp/call-method-register.exp test to make use of the
	DWARF assembler.

	The existing gdb.cp/call-method-register.exp test relies on a GCC
	extension - forcing a local variable into a particular named register.

	This means that the test will only work with Clang, and, as we have to
	name the register into which the variable will be placed, will only
	work for those targets where we've selected a suitable register,
	currently this is x86-64, i386, and ppc64.

	By switching to the DWARF assembler, the test will work with gcc and
	clang, and should work on most, if not all, architectures.

	The test creates a small structure, something that can fit within a
	register, and then tries to call a method on the structure from within
	GDB.  This should fail because GDB can't take the address of the in
	register structure (for the `this` pointer).

	As the test is for a failure case, then we don't really care _which_
	register the structure is in, and I take advantage of this for the
	DWARF assembler test, I just declare that the variable is in
	DW_OP_reg0, whatever that might be.  I've tested the new test on
	x86-64, ppc, aarch64, and risc-v, and the test runs, and passes on all
	these architectures, which is already more than we used to cover.

	Additionally, on x86-64, I've tested with Clang and gcc, and the test
	runs and passed with both compilers.

	Reviewed-By: Lancelot SIX <lancelot.six@amd.com>

2022-11-18  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: fix gdb.debuginfod/fetch_src_and_symbols.exp with Clang
	The gdb.debuginfod/fetch_src_and_symbols.exp test is showing a single
	failure when run with some older versions of Clang, e.g. 9.0.1.

	The problem appears to be with Clang's generated line table.  The test
	source looks like this:

	  int
	  main()
	  {
	    asm ("main_label: .globl main_label");
	    return 0;
	  }

	In GDB, when we 'start', we expect to stop at the 'return 0;' line.
	This is the behaviour when the compiler is gcc, or later versions of
	Clang.

	However, with Clang 9.0.2, I see GDB stop on the 'asm' line.

	In this commit I'll fix this issue by placing a breakpoint on the
	return line, and then using gdb_continue_to_breakpoint to ensure we
	have stopped in the correct place.

	Of course, using gdb_continue_to_breakpoint will only work if we are
	not already stopped at the breakpoint location, so I've added some
	filler work before the 'return 0;' line.  With this done we can use
	gdb_continue_to_breakpoint in all cases.

	As a result of adding the new filler work, one of the later tests,
	that used the 'list' command, no longer see the correct expected
	output (the top line of the source file is no longer included in the
	output).  I've fixed this by listing a known specific line, the test
	is checking that GDB managed to find the source file, it doesn't
	matter which source line we list, as long as we can list something.

2022-11-18  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: rename source file gdb.debuginfod/main.c
	The test gdb.debuginfod/fetch_src_and_symbols.exp uses a source file
	named main.c.  I can't see any particular reason why the file is named
	as such.

	Usually test source files are named after the test script.

	This commit just renames the source file inline with the test script,
	and updates the call to standard_testfile (removing the reference to
	main.c).

	There's no particular reason for this change other than seeing the
	file named main.c made me thing that the source file must be shared
	with some other test (it isn't).

	There should be no change in what is tested after this commit.

2022-11-18  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: add (and use) a new build-id compile option
	I noticed that the gdb.debuginfod/fetch_src_and_symbols.exp test was
	failing when run with Clang as the compiler.

	This test relies on the compiled binaries having a build-id within
	them.  For GCC, really GNU ld, the default is to always include a
	build-id.

	When compiling with Clang though, the default is for no build-id.

	I did consider *always* turning on the build-id feature when the
	compiler is Clang, but that felt a little weird.

	Instead, I propose that we add a new 'build-id' compiler option to
	gdb_compile, this flag indicates that the test _requires_ a build-id.
	In gcc_compile we can then add the required flags if the compiler is
	Clang so that we do get a build-id.

	With this change the gdb.debuginfod/fetch_src_and_symbols.exp test
	now (mostly) passes with Clang 9.0.1 and 15.0.2, and still passes with
	gcc.  The 'mostly' part is an unrelated issue, and will be addressed
	in a later commit in this series.

	Reviewed-By: Lancelot SIX <lancelot.six@amd.com>

2022-11-18  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: fix gdb.compile/compile-ops.exp with clang
	I noticed that the gdb.compile/compile-ops.exp test was failing when
	run with Clang as the compiler.

	This test makes use of the DWARF assembler, and, it turns out, uses
	a technique which is not portable to Clang.   This problem is
	described in the comment on the function_range proc in lib/dwarf.exp,
	the explanation is:

	  # If the compiler is gcc, we can do the following to get function start
	  # and end address too:
	  #
	  # asm ("func_start: .globl func_start");
	  # static void func (void) {}
	  # asm ("func_end: .globl func_end");
	  #
	  # however, this isn't portable, because other compilers, such as clang,
	  # may not guarantee the order of global asms and function.  The code
	  # becomes:
	  #
	  # asm ("func_start: .globl func_start");
	  # asm ("func_end: .globl func_end");
	  # static void func (void) {}

	These start/end labels are used for computing the function start, end,
	and length.  The portable solution is to place a label within the
	function, like this:

	  #  int main (void)
	  #  {
	  #    asm ("main_label: .globl main_label");
	  #    return 0;
	  #  }

	And make use of 'proc function_range' (from lib/dwarf.exp).

	So, that's what I do in this commit.

	One consequence of this change is that we need to compile the source
	file, and have it loaded into a GDB session, before calling
	function_range, so I've added an early call to prepare_for_testing.

	Additionally, this test script was generating the DWARF assembler into
	a file called gdbjit-ops.S, I suspect a copy and paste issue there, so
	I've switched this to use compile-ops-dbg.S instead, which is more
	inline with what other DWARF assembler tests do.

	The only other change, which might be a problem, is that I also
	deleted these two lines from the source file:

	  asm (".section \".text\"");
	  asm (".balign 8");

	These lines were setting the alignment of the .text section.  What I
	don't know is whether this was significant or not.  If it is
	significant, then I can't see why.

	On x86-64, the test still passes fine without these lines, but that
	doesn't mean the test wont start failing on some other architecture.

	Still, I figure, lets remove them, then, if/when we find a test that
	starts failing, we can add the lines back, along with an explanation
	for why the extra alignment is required.

	But, if people would prefer to be more conservative, then I'm happy to
	just add the lines back.

	Reviewed-By: Lancelot SIX <lancelot.six@amd.com>

2022-11-18  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: fix gdb.trace/unavailable-dwarf-piece.exp with Clang
	I noticed that the test gdb.trace/unavailable-dwarf-piece.exp was
	failing when run with Clang.  Or rather, the test was not running as
	the test executable failed to compile.

	The problem is that Clang was emitting this warning:

	  warning: argument unused during compilation: '-fdiagnostics-color=never' [-Wunused-command-line-argument]

	This warning is emitted when compiling the assembler file generated
	by the DWARF assembler.

	Most DWARF assembler tests generate the assembler file into a file
	with the '.S' extension.  However, this particular test uses a '.s'
	extension.

	Now a .S file will be passed through the preprocessor, while a .s will
	be sent straight to the assembler.  My guess is that Clang doesn't
	support the -fdiagnostics-color=never option for the assembler, but
	does for the preprocessor.

	That's a little annoying, but easily worked around.  We don't care if
	our assembler file is passed through the preprocessor, so, in this
	commit, I just change the file extension from .s to .S, and the
	problem is fixed.

	Currently, the unavailable-dwarf-piece.exp script names the assembler
	file using standard_output_file, in this commit I've switched to make
	use of standard_testfile, as that seems to be the more common way of
	doing this sort of thing.

	With these changes the test now passes with Clang 9.0.1 and 15.0.2,
	and also still passes with gcc.

	Reviewed-By: Lancelot SIX <lancelot.six@amd.com>

2022-11-18  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: don't avoid DWARF assembler tests with Clang
	Two tests make the claim that the DWARF assembler requires gcc,
	however, this isn't true.  I think at one point, when the DWARF
	assembler was first added, we did use some techniques that were not
	portable (see the comments in lib/dwarf.exp on function_range for
	details), however, I think most DWARF assembler tests will now work
	fine with Clang.

	The two tests that I modify in this commit both work fine with Clang,
	at least, I've tested with Clang 9.0.1 and 15.0.2, and don't see any
	problems, so I'm removing the early return logic that stops these
	tests from running with Clang.

	Reviewed-By: Lancelot SIX <lancelot.six@amd.com>

2022-11-18  Zac Walker  <zac.walker@linaro.org>

	GAS fix alignment for aarch64-pe
	Fixes issue where various values of '.align' causes writing of COFF files to fail.
	Specific to the aarch64-pe target.

2022-11-18  Alan Modra  <amodra@gmail.com>

	PR29799 heap buffer overflow in display_gdb_index dwarf.c:10548
		PR 29799
		* dwarf.c (display_gdb_index): Typo fix.

	go32 sanity check
		* coff-stgo32 (go32exe_check_format): Sanity check stubsize against
		filesize before malloc.

	Regen potfiles for sframe

2022-11-18  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-17  Indu Bhagat  <indu.bhagat@oracle.com>

	[gas, aarch64]: fix build breakage for aarch64-pe
	SFrame is supported for ELF only.  Keep the definitions and declarations
	guarded with OBJ_ELF consistently.

	ChangeLog:

		* gas/config/tc-aarch64.h:  Guard SFrame related definitions
		  with OBJ_ELF.

2022-11-17  Tom Tromey  <tromey@adacore.com>

	Fix static initialization order problem in windows-nat.c
	This patch fixes a static initialization order problem in
	windows-nat.c that was pointed out by Jon Turney.  The underlying
	problem is that the windows_nat_target constructor relies on
	serial_logfile already being constructed, but this is not enforced by
	C++ rules.  This patch fixes the problem by initializing the global
	windows_nat_target later.

2022-11-17  H.J. Lu  <hjl.tools@gmail.com>

	opcodes: Define NoSuf in i386-opc.tbl
	Use NoSuf to replace No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf
	and add the explicit NoSuf to AddrPrefixOpReg in templates.

		* i386-opc.tbl (NoSuf): New macro.
		(AddrPrefixOpReg): Remove No_?Suf.
		Replace No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf with
		NoSuf in templates.
		Add NoSuf to AddrPrefixOpReg in templates.

2022-11-17  H.J. Lu  <hjl.tools@gmail.com>

	i386: Move i386_seg_prefixes to gas
	gas/

		* config/tc-i386.c (i386_seg_prefixes): New. Moved from opcodes.

	opcodes/

		* i386-opc.c (i386_seg_prefixes): Removed.
		* i386-opc.h (i386_seg_prefixes): Likewise.

2022-11-17  Carl Love  <cel@us.ibm.com>

	PowerPC, fix gdb.base/retval-large-struct.exp
	Support for printining non-trivial return values was recently added in
	commit:

	  commit a0eda3df5b750ae32576a9be092b361281a41787
	  Author: Carl Love <cel@us.ibm.com>
	  Date:   Mon Nov 14 16:22:37 2022 -0500

	    PowerPC, fix support for printing the function return value for non-trivial values.

	The functionality can now be used to fix gdb.base/retval-large-struct.exp.
	The test just needs to be compiled with -fvar-tracking to enable GDB to
	determine the address off the return buffer when the function is called.

	The current output from the test:

	34        return big_struct;
	(gdb) PASS: gdb.base/retval-large-struct.exp: continue to breakpoint: Break in print_large_struct
	finish
	warning: Cannot determine the function return value.
	Try compiling with -fvar-tracking.
	Run till exit from #0  return_large_struct () at binutils-gdb-current/gdb/testsuite/gdb.base/retval-large-struct.c:34
	main (argc=1, argv=0x7fffffffcd58) at binutils-gdb-current/gdb/testsuite/gdb.base/retval-large-struct.c:44
	44        return 0;
	Value returned has type: struct big_struct_t. Cannot determine contents
	(gdb) FAIL: gdb.base/retval-large-struct.exp: finish from return_large_struct
	testcase binutils-gdb-current/gdb/testsuite/gdb.base/retval-large-struct.exp completed in 1 seconds

	This patch adds the command line argument -fvar-tracking to enable gdb to
	determine the return vaule and thus fixing the test.

	Patch tested on Power 10 with no regressions.

2022-11-17  Tom Tromey  <tromey@adacore.com>

	Use boolean literals for pagination_enabled
	I noticed a couple of spots that used '0' rather than 'false' when
	modifying pagination_enabled.  This patch cleans these up.

2022-11-17  Carl Love  <cel@us.ibm.com>

	Change NULL to nullptr in gdb/infcmd.c and gdb/infrun.c
	The GDB coding standard specifies that nullptr should be used instead of
	NULL.  There are numerous uses of NULL and nullptr in files infcmd.c and
	infrun.c.  This patch replaces the various uses of NULL with nullptr in
	the source files.  The use of NULL in the comments was not changed.

	The patch does not introduce any functional changes.

	The patch has been tested on PowerPC and Intel X86_64 with no new unexpected
	test failures, unresolved tests, new core files etc.

2022-11-17  H.J. Lu  <hjl.tools@gmail.com>

	ld: Always call elf_backend_output_arch_local_syms
	Always call elf_backend_output_arch_local_syms since only the backend
	knows if elf_backend_output_arch_local_syms is needed when all symbols
	are striped.  elf_backend_output_arch_local_syms is defined only for
	x86, ARM and AARCH64.  On x86, elf_backend_output_arch_local_syms must
	be called to handle local IFUNC symbols even if all symbols are striped.
	Update ARM and AARCH64 to skip elf_backend_output_arch_local_syms when
	symbols aren't needed.

	bfd/

		PR ld/29797
		* elf32-arm.c (elf32_arm_output_arch_local_syms): Skip if symbols
		aren't needed.
		* elfnn-aarch64.c (elfNN_aarch64_output_arch_local_syms):
		Likewise.
		* elflink.c (bfd_elf_final_link): Always call
		elf_backend_output_arch_local_syms if available.

	ld/

		PR ld/29797
		* testsuite/ld-elf/linux-x86.exp: Run PR ld/29797 test.
		* testsuite/ld-elf/pr29797.c: New file.

2022-11-17  Andrew Burgess  <aburgess@redhat.com>

	gdb: new $_inferior_thread_count convenience variable
	Add a new convenience variable $_inferior_thread_count that contains
	the number of live (non-exited) threads in the current inferior.  This
	can be used in command scripts, or breakpoint conditions, etc to
	adjust the behaviour for multi-threaded inferiors.

	This value is only stable in all-stop mode.  In non-stop mode, where
	new threads can be started, and existing threads exit, at any time,
	this convenience variable can give a different value each time it is
	evaluated.

2022-11-17  Tom Tromey  <tromey@adacore.com>

	Remove two obsolete declarations
	I happened to find a couple of obsolete declarations in cli-interp.h.
	This patch removes them.  Tested by rebuilding.

2022-11-17  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: fix failure in gdb.python/py-send-packet.exp
	While working on another patch I noticed that, when run on an AArch64
	target, the test gdb.python/py-send-packet.exp was failing:

	  Traceback (most recent call last):
	    File "<string>", line 1, in <module>
	    File "/tmp/build/gdb/testsuite/outputs/gdb.python/py-send-packet/py-send-packet.py",
	  line 106, in run_auxv_send_packet_test
	      assert string == expected_result
	  AssertionError
	  Error while executing Python code.
	  (gdb) FAIL: gdb.python/py-send-packet.exp: call python run_auxv_send_packet_test function

	The test uses 'maint packet ...' to send a packet to gdbserver, and
	then captures the output in TCL.  This output is then passed through
	to a Python function, which performs some actions using the Python
	API, and compares the results from the Python API to the results
	captured in TCL from 'maint packet ...'.

	The problem is that the output captured in TCL contains lots of things
	like '\x000', when this is passed through to Python the '\x' causes
	this to be treated as an escape code, which isn't what we want - we
	want the actual string "\x000".

	So, in the TCL part of the test we were expanding '\x' to '\\x', this
	seemed to work fine for my testing on x86-64.

	However, on AArch64 what I see is that the results from 'maint packet
	...' contain a literal '\' character followed by a literal 'x'
	character.  When GDB prints this in the 'maint packet' output, GDB
	escapes the '\' for us, thus we get '\\x' printed by 'maint packet'.

	However, now our TCL test script kicks in and tries to "fix" the '\x',
	this means we now have '\\\x', which isn't correct.

	The problem is that in the TCL script we are too restrictive, we
	expand '\x' to '\\x', but really, we should be expanding all '\'
	characters, regardless of what follows them.  This is what this patch
	does.

	After this the gdb.python/py-send-packet.exp test passes on AArch64
	for me.

2022-11-17  Aditya Vidyadhar Kamath  <Aditya.Kamath1@ibm.com>

	Fix call functions command bug in 64 bits programs for AIX
	In AIX for 64 bit programs we need to zero extend variables
	of integer or enum or char data type.

	Otherwise a zero will get dumped in the register as we memset
	our word to 0 and we copy non zero extended contents to the cache.

2022-11-17  Andrew Burgess  <aburgess@redhat.com>

	gdb/fortran/testsuite: print values and types of string variables
	While looking through the Fortran tests, I couldn't find a test of GDB
	printing the value and type of a Fortran string defined using the
	'character*SIZE' notation.

	This works fine in GDB right now, but I thought it wouldn't hurt to
	have a test for this, so this commit adds such a test.

	The test also includes printing a string that includes some embedded
	special characters: \n \r \t \000 - that's right, as Fortran strings
	are stored as an address and length, it is fine to include an embedded
	null, so this test includes an example of that.

	Standard Fortran doesn't support backslash escape sequences within
	strings, the special characters must be generated using the `achar`
	function.  However, when GDB prints the strings we currently print
	using the standard C like backslash sequences.

	I'm not currently proposing to change that behaviour, the backslash
	sequences are more compact than the standard Fortran way of doing
	things, and are so widely used that I suspect most Fortran programmers
	will understand them.

2022-11-17  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	Fix various procfs.c compilation errors
	procfs.c has accumulated several compilation errors lately (some of them
	new with GCC 12), which are fixed by this patch:

	* auxv_parse gets:

	/vol/src/gnu/gdb/hg/master/dist/gdb/procfs.c:144:7: error: ‘int
	procfs_target::auxv_parse(gdb_byte**, gdb_byte*, CORE_ADDR*, CORE_ADDR*)’
	marked ‘override’, but does not override
	  144 |   int auxv_parse (gdb_byte **readptr,
	      |       ^~~~~~~~~~

	  Obviouly, procfs.c was missed in the auxv_parse constification.

	* dead_procinfo has:

	/vol/src/gnu/gdb/hg/master/dist/gdb/procfs.c: In function ‘void
	dead_procinfo(procinfo*, const char*, int)’:
	/vol/src/gnu/gdb/hg/master/dist/gdb/procfs.c:563:11: warning: the address
	of ‘procinfo::pathname’ will never be NULL [-Waddress]
	  563 |   if (pi->pathname)
	      |       ~~~~^~~~~~~~
	/vol/src/gnu/gdb/hg/master/dist/gdb/procfs.c:238:8: note:
	‘procinfo::pathname’ declared here
	  238 |   char pathname[MAX_PROC_NAME_SIZE];    /* Pathname to /proc entry */
	      |        ^~~~~~~~

	  The warning is correct, so the code can lose support for the NULL
	  pathname case.

	* create_inferior has this ugly warning:

	/vol/src/gnu/gdb/hg/master/dist/gdb/procfs.c: In member function ‘virtual void procfs_target::create_inferior(const char*, const std::string&, char**, int)’:
	/vol/src/gnu/gdb/hg/master/dist/gdb/procfs.c:2815:19: warning: ‘char* std::strncpy(char*, const char*, size_t)’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
	 2815 |           strncpy (tryname, p, len);
	      |           ~~~~~~~~^~~~~~~~~~~~~~~~~
	/vol/src/gnu/gdb/hg/master/dist/gdb/procfs.c:2814:26: note: length computed here
	 2814 |             len = strlen (p);
	      |                   ~~~~~~~^~~

	  It seems that this is another case of GCC PR middle-end/88059, which
	  Martin Sebor refuses to fix.  So I'm using the hack suggested in the
	  PR to use memcpy instead of strncpy.

	* find_memory_regions_callback fails with

	/vol/src/gnu/gdb/hg/master/dist/gdb/procfs.c: In function ‘int find_memory_regions_callback(prmap*, find_memory_region_ftype, void*)’:
	/vol/src/gnu/gdb/hg/master/dist/gdb/procfs.c:3167:18: error: too few arguments to function
	 3167 |   return (*func) ((CORE_ADDR) map->pr_vaddr,
	      |          ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
	 3168 |                   map->pr_size,
	      |                   ~~~~~~~~~~~~~
	 3169 |                   (map->pr_mflags & MA_READ) != 0,
	      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	 3170 |                   (map->pr_mflags & MA_WRITE) != 0,
	      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	 3171 |                   (map->pr_mflags & MA_EXEC) != 0,
	      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	 3172 |                   1, /* MODIFIED is unknown, pass it as true.  */
	      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	 3173 |                   data);
	      |                   ~~~~~

	  Again, procfs.c was overlooked when adding the new memory_tagged arg.
	  Unfortunately, it wasn't even documented in gdb/defs.h when it was
	  added in

	commit 68cffbbd4406b4efe1aa6e18460b1d7ca02549f1
	Author: Luis Machado <luis.machado@arm.com>
	Date:   Thu Mar 31 11:42:35 2022 +0100

	    [AArch64] MTE corefile support

	With those changes, procfs.c compiles again.  Together with the hack
	from the Solaris gdbsupport breakage reported in PR build/29791, I was
	able to build and test gdb on both amd64-pc-solaris2.11 and
	sparcv9-sun-solaris2.11.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-11-17  Christoph Müllner  <christoph.muellner@vrull.eu>

	RISC-V: Add T-Head Int vendor extension
	This patch adds the XTheadInt extension, which provides interrupt
	stack management instructions.

	The XTheadFmv extension is documented in the RISC-V toolchain
	contentions:
	  https://github.com/riscv-non-isa/riscv-toolchain-conventions

	Co-developed-by: Lifang Xia <lifang_xia@linux.alibaba.com>

2022-11-17  Christoph Müllner  <christoph.muellner@vrull.eu>

	RISC-V: Add T-Head Fmv vendor extension
	This patch adds the XTheadFmv extension, which allows to access the
	upper 32 bits of a double-precision floating-point register in RV32.

	The XTheadFmv extension is documented in the RISC-V toolchain
	contentions:
	  https://github.com/riscv-non-isa/riscv-toolchain-conventions

	Co-developed-by: Lifang Xia <lifang_xia@linux.alibaba.com>

2022-11-17  Tom de Vries  <tdevries@jostaberry-8.arch.suse.de>

	[gdb/testsuite] Fix DUPLICATE in gdb.arch/ppc-fp.exp
	I noticed:
	...
	DUPLICATE: gdb.arch/ppc-fp.exp: next
	...

	Fix this by adding unique test names.

	Tested on powerpc64le-linux.

2022-11-17  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-16  Kévin Le Gouguec  <legouguec@adacore.com>

	Add myself to the gdb/MAINTAINERS write-after-approval list

2022-11-16  Kévin Le Gouguec  <legouguec@adacore.com>

	Guard against frame.c destructors running before frame-info.c's
	On x86_64-windows, since 04e2ac7b2a7, we observe this internal error:

	  [...]/gdbsupport/intrusive_list.h:458: internal-error: erase_element:
	  Assertion `elem_node->prev != INTRUSIVE_LIST_UNLINKED_VALUE' failed.

	Breaking in the destructors for intrusive_list and frame_info_ptr shows that
	in this configuration, the destructors for frame.c's statically-stored
	objects are run before frame-info.c's:

	  Thread 1 hit Breakpoint 7, intrusive_list<frame_info_ptr,
	  intrusive_base_node<frame_info_ptr> >::~intrusive_list (this=0x7ff69c418c90
	  <frame_info_ptr::frame_list>, __in_chrg=<optimized out>)
	  [...]/../gdbsupport/intrusive_list.h:250
	  250	    clear ();
	  (gdb) bt
	  #0  intrusive_list<frame_info_ptr, intrusive_base_node<frame_info_ptr> >
	      ::~intrusive_list (this=0x7ff69c418c90 <frame_info_ptr::frame_list>,
	      __in_chrg=<optimized out>) [...]/../gdbsupport/intrusive_list.h:250
	  #1  0x00007ff69b78edba in __tcf_1 () [...]/frame-info.c:27
	  #2  0x00007ff9c457aa9f in msvcrt!_initterm_e ()
	      from C:\Windows\System32\msvcrt.dll
	  #3  0x00007ff69b8246a6 in captured_main_1 (context=0x5ffe00)
	      [...]/main.c:1111
	  #4  0x00007ff69b825149 in captured_main (data=0x5ffe00) [...]/main.c:1320
	  #5  0x00007ff69b8251b1 in gdb_main (args=0x5ffe00) [...]/main.c:1345
	  #6  0x00007ff69b5d1730 in main (argc=2, argv=0x751730) [...]/gdb.c:32
	  (gdb) c
	  Continuing.

	  Thread 1 hit Breakpoint 8, frame_info_ptr::~frame_info_ptr
	  (this=0x7ff69c418e20 <selected_frame>, __in_chrg=<optimized out>)
	  [...]/frame-info.h:74
	  74	    if (is_linked ())
	  (gdb) bt
	  #0  frame_info_ptr::~frame_info_ptr (this=0x7ff69c418e20 <selected_frame>,
	      __in_chrg=<optimized out>) [...]/frame-info.h:74
	  #1  0x00007ff69b79a643 in __tcf_1 () [...]/frame.c:1675
	  #2  0x00007ff9c457aa9f in msvcrt!_initterm_e () from
	      C:\Windows\System32\msvcrt.dll
	  #3  0x00007ff69b8246a6 in captured_main_1 (context=0x5ffe00)
	      [...]/main.c:1111
	  #4  0x00007ff69b825149 in captured_main (data=0x5ffe00) [...]/main.c:1320
	  #5  0x00007ff69b8251b1 in gdb_main (args=0x5ffe00) [...]/main.c:1345
	  #6  0x00007ff69b5d1730 in main (argc=2, argv=0x751730) [...]/gdb.c:32

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-11-16  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR29788, gprofng cannot display Java's generated assembly code
	gprofng/ChangeLog
	2022-11-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		PR gprofng/29788
		* src/Experiment.h: Declare dyntext_name.
		* src/Experiment.cc: Use dyntext_name to initialize img_fname.

2022-11-16  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Use gdb_gcore_cmd in gdb.threads/gcore-thread.exp
	I noticed a plain gcore command in test-case gdb.threads/gcore-thread.exp:
	...
	    gdb_test "gcore $core0file" "Saved corefile .*" \
	      "save a zeroed-threads corefile"
	...

	Use gdb_gcore_cmd instead.

	Tested on x86_64-linux.

2022-11-16  Carl Love  <cel@us.ibm.com>

	Bug fix in commit for printing the function return value for non-trivial values
	The recent commit:

	  commit a0eda3df5b750ae32576a9be092b361281a41787
	  Author: Carl Love <cel@us.ibm.com>
	  Date:   Mon Nov 14 16:22:37 2022 -0500

	    PowerPC, fix support for printing the function return value for non-trivial values.

	Is generating a segmentation fault on x86_64-linux.

	  segfault:
	  ...
	  PASS: gdb.asm/asm-source.exp: info source asmsrc1.s
	  ERROR: GDB process no longer exists
	  UNRESOLVED: gdb.asm/asm-source.exp: finish from foo3
	  ...

	  Reproduced on command line:
	  ...
	  $ gdb -q -batch -x outputs/gdb.asm/asm-source/gdb.in.1
	  ...

	  The problem seems to be that:
	  ...
	  Thread 1 "gdb" received signal SIGSEGV, Segmentation fault.
	  0x000000000043de7a in symbol::type (this=0x0) at
	  .../gdb_versions/devel/src/gdb/symtab.h:1287
	  1287        return m_type;
	  ...
	  because:
	  ...
	  (gdb) up
	  #1  0x0000000000852d94 in finish_command (arg=0x0, from_tty=0)
	     at .../gdb_versions/devel/src/gdb/infcmd.c:1887
	  1887        = check_typedef (sm->function->type ()->target_type ());
	  (gdb) p sm->function
	  $1 = (symbol *) 0x0

	The code is not checking if sm->function is NULL.  If sm->function is NULL
	the check for the return buffer should be skipped.

2022-11-16  Tom Tromey  <tromey@adacore.com>

	Update Ada tasks documentation
	My co-worker Kévin noticed that the Ada tasks documentation is
	slightly out of date -- it does not document all the states that can
	be reported by ada-tasks.c.

	This patch adds the missing states to the appropriate node, and
	updates one state to reflect a change made some time ago.

2022-11-16  Pedro Alves  <palves@redhat.com>

	gdb: add "set style tui-current-position on|off", default to off
	As discussed at:

	 https://sourceware.org/pipermail/gdb-patches/2020-June/169519.html

	this patch disables source and assembly code highlighting for the
	text highlighted by the TUI's current position indicator, and adds a
	command to enable it back.

2022-11-16  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Modernize gdb.arch/i386-biarch-core.exp
	I noticed in test-case gdb.arch/i386-biarch-core.exp that we run into the
	completion limit for "complete set gnutarget":
	...
	set gnutarget vms-libtxt^M
	set gnutarget  *** List may be truncated, max-completions reached. ***^M
	(gdb) PASS: gdb.arch/i386-biarch-core.exp: complete set gnutarget
	...

	Fix this by using get_set_option_choices.

	Also use get_set_option_choices for "complete set architecture i386", which
	required extending get_set_option_choices to accept a second argument, such
	that we can do:
	...
	set archs [get_set_option_choices "set architecture" "i386"]
	...
	because this returns an empty list:
	...
	set archs [get_set_option_choices "set architecture i386"]
	...
	because it does "complete set architecture i386 ".

	Also clean up the explicit gdb_exit/gdb_start and use clean_restart instead.

	Tested on x86_64-linux.

2022-11-16  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.arch/ppc64-symtab-cordic.exp without bzip2
	After de-installing bzip2, I run into:
	...
	Running ppc64-symtab-cordic.exp ...
	sh: bzip2: command not found
	PATH: gdb.arch/ppc64-symtab-cordic.exp: failed bzip2 for \
	  src/gdb/testsuite/gdb.arch/cordic.ko.bz2
	...

	Fix these by:
	- using remote_exec instead of catch system, and
	- using file tail in the untested message.

	I've tried making output redirection work with remote_exec, but that seems to
	be broken, so we now:
	- copy the file $f.bz2 into the desired location $dir/$f.bz2, and
	- decompress the bz2 file using "bzip2 -df $dir/$f.bz2", resulting in a file
	  $dir/$f.

	Factor out new function decompress_bz2 to make the test-case less verbose, and
	also use it in gdb.arch/i386-biarch-core.exp.

	Tested on x86_64-linux, without and with bzip2 installed.

2022-11-16  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-15  Indu Bhagat  <indu.bhagat@oracle.com>

	doc: add SFrame spec file
	ChangeLog:

		* libsframe/Makefile.am: Add info-in-builddir to
		  AUTOMAKE_OPTIONS. Include doc/local.mk.
		* libsframe/Makefile.in: Regenerated.
		* libsframe/configure: Likewise.
		* libsframe/configure.ac: Check for makeinfo and set BUILD_INFO.
		* libsframe/doc/local.mk: New file.
		* libsframe/doc/sframe-spec.texi: Likewise.

2022-11-15  Indu Bhagat  <indu.bhagat@oracle.com>

	gas/NEWS: add text about new command line option and SFrame support
	ChangeLog:

		* gas/NEWS: Add SFrame related news.

2022-11-15  Indu Bhagat  <indu.bhagat@oracle.com>

	binutils/NEWS: add text for SFrame support
	ChangeLog:

		* binutils/NEWS: Add item for SFrame support.

2022-11-15  Indu Bhagat  <indu.bhagat@oracle.com>

	src-release.sh: Add libsframe
	Add libsframe to the list of top level directories that will be included
	in a release.

	ChangeLog:

		* src-release.sh: Add libsframe

2022-11-15  Indu Bhagat  <indu.bhagat@oracle.com>

	readelf/objdump: support for SFrame section
	This patch adds support for SFrame in readelf and objdump. The arguments
	of --sframe are optional for both readelf and objdump.

	include/ChangeLog:

		* sframe-api.h (dump_sframe): New function declaration.

	ChangeLog:

		* binutils/Makefile.am: Add dependency on libsframe for
		readelf and objdump.
		* binutils/Makefile.in: Regenerate.
		* binutils/doc/binutils.texi: Document --sframe=[section].
		* binutils/doc/sframe.options.texi: New file.
		* binutils/objdump.c: Add support for SFrame format.
		* binutils/readelf.c: Likewise.
		* include/sframe-api.h: Add new API for dumping .sframe
		section.
		* libsframe/Makefile.am: Add sframe-dump.c.
		* libsframe/Makefile.in: Regenerate.
		* libsframe/sframe-dump.c: New file.

2022-11-15  Indu Bhagat  <indu.bhagat@oracle.com>

	bfd: linker: merge .sframe sections
	The linker merges all the input .sframe sections.  When merging, the
	linker verifies that all the input .sframe sections have the same
	abi/arch.

	The linker uses libsframe library to perform key actions on the
	.sframe sections - decode, read, and create output data.  This
	implies buildsystem changes to make and install libsframe before
	libbfd.

	The linker places the output .sframe section in a new segment of its
	own: PT_GNU_SFRAME.  A new segment is not added, however, if the
	generated .sframe section is empty.

	When a section is discarded from the final link, the corresponding
	entries in the .sframe section for those functions are also deleted.

	The linker sorts the SFrame FDEs on start address by default and sets
	the SFRAME_F_FDE_SORTED flag in the .sframe section.

	This patch also adds support for generation of SFrame unwind
	information for the .plt* sections on x86_64.  SFrame unwind info is
	generated for IBT enabled PLT, lazy/non-lazy PLT.

	The existing linker option --no-ld-generated-unwind-info has been
	adapted to include the control of whether .sframe unwind information
	will be generated for the linker generated sections like PLT.

	Changes to the linker script have been made as necessary.

	ChangeLog:

		* Makefile.def: Add install dependency on libsframe for libbfd.
		* Makefile.in: Regenerated.
		* bfd/Makefile.am: Add elf-sframe.c
		* bfd/Makefile.in: Regenerated.
		* bfd/bfd-in2.h (SEC_INFO_TYPE_SFRAME): Regenerated.
		* bfd/configure: Regenerate.
		* bfd/configure.ac: Add elf-sframe.lo.
		* bfd/elf-bfd.h (struct sframe_func_bfdinfo): New struct.
		(struct sframe_dec_info): Likewise.
		(struct sframe_enc_info): Likewise.
		(struct elf_link_hash_table): New member for encoded .sframe
		object.
		(struct output_elf_obj_tdata): New member.
		(elf_sframe): New access macro.
		(_bfd_elf_set_section_sframe): New declaration.
		* bfd/elf.c (get_segment_type): Handle new segment
		PT_GNU_SFRAME.
		(bfd_section_from_phdr): Likewise.
		(get_program_header_size): Likewise.
		(_bfd_elf_map_sections_to_segments): Likewise.
		* bfd/elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Add
		contents to the .sframe sections or .plt* entries.
		* bfd/elflink.c (elf_section_ignore_discarded_relocs): Handle
		SEC_INFO_TYPE_SFRAME.
		(_bfd_elf_default_action_discarded): Handle .sframe section.
		(elf_link_input_bfd): Merge .sframe section.
		(bfd_elf_final_link): Write the output .sframe section.
		(bfd_elf_discard_info): Handle discarding .sframe section.
		* bfd/elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Create
		.sframe section for .plt and .plt.sec.
		(_bfd_x86_elf_finish_dynamic_sections): Handle .sframe from
		.plt* sections.
		* bfd/elfxx-x86.h (PLT_SFRAME_FDE_START_OFFSET): New
		definition.
		(SFRAME_PLT0_MAX_NUM_FRES): Likewise.
		(SFRAME_PLTN_MAX_NUM_FRES): Likewise.
		(struct elf_x86_sframe_plt): New structure.
		(struct elf_x86_link_hash_table): New member.
		(struct elf_x86_init_table): New members for .sframe
		creation.
		* bfd/section.c: Add new definition SEC_INFO_TYPE_SFRAME.
		* binutils/readelf.c (get_segment_type): Handle new segment
		PT_GNU_SFRAME.
		* ld/ld.texi: Update documentation for
		--no-ld-generated-unwind-info.
		* ld/scripttempl/elf.sc: Support .sframe sections.
		* ld/Makefile.am (TESTSFRAMELIB): Use it.
		(check-DEJAGNU): Likewise.
		* ld/Makefile.in: Regenerated.
		* ld/configure.ac (TESTSFRAMELIB): Set to the .so or .a like TESTBFDLIB.
		* ld/configure: Regenerated.
		* bfd/elf-sframe.c: New file.

	include/ChangeLog:

		* elf/common.h (PT_GNU_SFRAME): New definition.
		* elf/internal.h (struct elf_segment_map): Handle new segment
		type PT_GNU_SFRAME.

	ld/testsuite/ChangeLog:

		* ld/testsuite/ld-bootstrap/bootstrap.exp: Add SFRAMELIB.
		* ld/testsuite/ld-aarch64/aarch64-elf.exp: Add new test
		  sframe-simple-1.
		* ld/testsuite/ld-aarch64/sframe-bar.s: New file.
		* ld/testsuite/ld-aarch64/sframe-foo.s: Likewise.
		* ld/testsuite/ld-aarch64/sframe-simple-1.d: Likewise.
		* ld/testsuite/ld-sframe/sframe-empty.d: New test.
		* ld/testsuite/ld-sframe/sframe-empty.s: New file.
		* ld/testsuite/ld-sframe/sframe.exp: New testsuite.
		* ld/testsuite/ld-x86-64/sframe-bar.s: New file.
		* ld/testsuite/ld-x86-64/sframe-foo.s: Likewise.
		* ld/testsuite/ld-x86-64/sframe-simple-1.d: Likewise.
		* ld/testsuite/ld-x86-64/sframe-plt-1.d: Likewise.
		* ld/testsuite/ld-x86-64/sframe-simple-1.d: Likewise.
		* ld/testsuite/ld-x86-64/x86-64.exp: Add new tests -
		  sframe-simple-1, sframe-plt-1.
		* ld/testsuite/lib/ld-lib.exp: Add new proc to check if
		  assembler supports SFrame section.
		* ld/testsuite/ld-sframe/discard.d: New file.
		* ld/testsuite/ld-sframe/discard.ld: Likewise.
		* ld/testsuite/ld-sframe/discard.s: Likewise.

2022-11-15  Weimin Pan  <weimin.pan@oracle.com>

	libsframe: add the SFrame library
	libsframe is a library that allows you to:
	- decode a .sframe section
	- probe and inspect a .sframe section
	- encode (and eventually write) a .sframe section.

	This library is currently being used by the linker, readelf, objdump.
	This library will also be used by the SFrame unwinder which is still
	to be upstream'd.

	The file include/sframe-api.h defines the user-facing APIs for decoding,
	encoding and probing .sframe sections. A set of error codes together
	with their error message strings are also defined.

	Endian flipping is performed automatically at read and write time, if
	cross-endianness is detected.

	ChangeLog:

		* Makefile.def: Add libsframe as new module with its
		dependencies.
		* Makefile.in: Regenerated.
		* binutils/Makefile.am: Add libsframe.
		* binutils/Makefile.in: Regenerated.
		* configure: Regenerated
		* configure.ac: Add libsframe to host_libs.
		* libsframe/Makefile.am: New file.
		* libsframe/Makefile.in: New file.
		* libsframe/aclocal.m4: New file.
		* libsframe/config.h.in: New file.
		* libsframe/configure: New file.
		* libsframe/configure.ac: New file.
		* libsframe/sframe-error.c: New file.
		* libsframe/sframe-impl.h: New file.
		* libsframe/sframe.c: New file.

	include/ChangeLog:

		* sframe-api.h: New file.

	testsuite/ChangeLog:

		* libsframe/testsuite/Makefile.am: New file.
		* libsframe/testsuite/Makefile.in: Regenerated.
		* libsframe/testsuite/libsframe.decode/Makefile.am: New
		  file.
		* libsframe/testsuite/libsframe.decode/Makefile.in:
		  Regenerated.
		* libsframe/testsuite/libsframe.decode/decode.exp: New file.
		* libsframe/testsuite/libsframe.encode/Makefile.am:
		  Likewise.
		* libsframe/testsuite/libsframe.encode/Makefile.in:
		  Regenerated.
		* libsframe/testsuite/libsframe.encode/encode.exp: New file.
		* libsframe/testsuite/libsframe.encode/encode-1.c: Likewise.
		* libsframe/testsuite/libsframe.decode/be-flipping.c: Likewise.
		* libsframe/testsuite/libsframe.decode/frecnt-1.c: Likewise.
		* libsframe/testsuite/libsframe.decode/frecnt-2.c: Likewise.
		* libsframe/testsuite/libsframe.decode/DATA-BE: New file.
		* libsframe/testsuite/libsframe.decode/DATA1: Likewise.
		* libsframe/testsuite/libsframe.decode/DATA2: Likewise.

2022-11-15  Indu Bhagat  <indu.bhagat@oracle.com>

	gas: testsuite: add new tests for SFrame unwind info
	Earlier these tests were in the same commit as previous which adds the
	support in GNU assembler to generate .sframe section from CFI
	directives.  Splitting this out here for ease of applying and testing.

	ChangeLog:

		* gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-1.d: New file.
		* gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-1.s: Likewise.
		* gas/testsuite/gas/cfi-sframe/cfi-sframe-common-1.d: Likewise.
		* gas/testsuite/gas/cfi-sframe/cfi-sframe-common-1.s: Likewise.
		* gas/testsuite/gas/cfi-sframe/cfi-sframe-common-2.d: Likewise.
		* gas/testsuite/gas/cfi-sframe/cfi-sframe-common-2.s: Likewise.
		* gas/testsuite/gas/cfi-sframe/cfi-sframe-common-3.d: Likewise.
		* gas/testsuite/gas/cfi-sframe/cfi-sframe-common-3.s: Likewise.
		* gas/testsuite/gas/cfi-sframe/cfi-sframe-common-4.d: Likewise.
		* gas/testsuite/gas/cfi-sframe/cfi-sframe-common-4.s: Likewise.
		* gas/testsuite/gas/cfi-sframe/cfi-sframe-common-5.d: Likewise.
		* gas/testsuite/gas/cfi-sframe/cfi-sframe-common-5.s: Likewise.
		* gas/testsuite/gas/cfi-sframe/cfi-sframe-common-6.d: Likewise.
		* gas/testsuite/gas/cfi-sframe/cfi-sframe-common-6.s: Likewise.
		* gas/testsuite/gas/cfi-sframe/cfi-sframe-common-7.d: Likewise.
		* gas/testsuite/gas/cfi-sframe/cfi-sframe-common-7.s: Likewise.
		* gas/testsuite/gas/cfi-sframe/cfi-sframe-common-8.d: Likewise.
		* gas/testsuite/gas/cfi-sframe/cfi-sframe-common-8.s: Likewise.
		* gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-1.d: Likewise.
		* gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-1.s: Likewise.
		* gas/testsuite/gas/cfi-sframe/cfi-sframe.exp: Likewise.
		* gas/testsuite/gas/cfi-sframe/common-empty-1.d: Likewise.
		* gas/testsuite/gas/cfi-sframe/common-empty-1.s: Likewise.
		* gas/testsuite/gas/cfi-sframe/common-empty-2.d: Likewise.
		* gas/testsuite/gas/cfi-sframe/common-empty-2.s: Likewise.
		* gas/testsuite/gas/cfi-sframe/common-empty-3.d: Likewise.
		* gas/testsuite/gas/cfi-sframe/common-empty-3.s: Likewise.
		* gas/testsuite/gas/cfi-sframe/common-empty-4.d: Likewise.
		* gas/testsuite/gas/cfi-sframe/common-empty-4.s: Likewise.

2022-11-15  Indu Bhagat  <indu.bhagat@oracle.com>

	gas: generate .sframe from CFI directives
	Currently supported for x86_64 and aarch64 only.

	[PS: Currently, the compiler has not been adapted to generate
	".cfi_sections" with ".sframe" in it.  The newly added command line
	option of --gsframe provides an easy way to try out .sframe support
	in the toolchain.]

	gas interprets the CFI directives to generate DWARF-based .eh_frame
	info.  These internal DWARF structures are now consumed by
	gen-sframe.[ch] sub-system to, in turn, create the SFrame unwind
	information.  These internal DWARF structures are read-only for the
	purpose of SFrame unwind info generation.

	SFrame unwind info generation does not impact .eh_frame unwind info
	generation.  Both .eh_frame and .sframe can co-exist in an ELF file,
	if so desired by the user.

	Recall that SFrame unwind information only contains the minimal
	necessary information to generate backtraces and does not provide
	information to recover all callee-saved registers.  The reason being
	that callee-saved registers other than FP are not needed for stack
	unwinding, and hence are not included in the .sframe section.

	Consequently, gen-sframe.[ch] only needs to interpret a subset of
	DWARF opcodes in gas.  More details follow.

	[Set 1, Interpreted] The following opcodes are interpreted:
	- DW_CFA_advance_loc
	- DW_CFA_def_cfa
	- DW_CFA_def_cfa_register
	- DW_CFA_def_cfa_offset
	- DW_CFA_offset
	- DW_CFA_remember_state
	- DW_CFA_restore_state
	- DW_CFA_restore

	[Set 2, Bypassed] The following opcodes are acknowledged but are not
	necessary for generating SFrame unwind info:
	- DW_CFA_undefined
	- DW_CFA_same_value

	Anything else apart from the two above-mentioned sets is skipped
	altogether.  This means that any function containing a CFI directive not
	in Set 1 or Set 2 above, will not have any SFrame unwind information
	generated for them.  Holes in instructions covered by FREs of a single
	FDE are not representable in the SFrame unwind format.

	As few examples, following opcodes are not processed for .sframe
	generation, and are skipped:
	- .cfi_personality*
	- .cfi_*lsda
	- .cfi_escape
	- .cfi_negate_ra_state
	- ...

	Not processing .cfi_escape, .cfi_negate_ra_state will cause SFrame
	unwind information to be absent for SFrame FDEs that contain these CFI
	directives, hence affecting the asynchronicity.

	x86-64 and aarch64 backends need to have a few new definitions and
	functions for .sframe generation.  These provide gas with architecture
	specific information like the SP/FP/RA register numbers and an
	SFrame-specific ABI marker.

	Lastly, the patch also implements an optimization for size, where
	specific fragments containing SFrame FRE start address and SFrame FDE
	function are fixed up.  This is similar to other similar optimizations
	in gas, where fragments are sized and fixed up when the associated
	symbols can be resolved.  This optimization is controlled by a #define
	SFRAME_FRE_TYPE_SELECTION_OPT and should be easy to turn off if needed.
	The optimization is on by default for both x86_64 and aarch64.

	ChangeLog:

		* gas/Makefile.am: Include gen-sframe.c and sframe-opt.c.
		* gas/Makefile.in: Regenerated.
		* gas/as.h (enum _relax_state): Add new state rs_sframe.
		(sframe_estimate_size_before_relax): New function.
		(sframe_relax_frag): Likewise.
		(sframe_convert_frag): Likewise.
		* gas/config/tc-aarch64.c (aarch64_support_sframe_p): New
		definition.
		(aarch64_sframe_ra_tracking_p): Likewise.
		(aarch64_sframe_cfa_ra_offset): Likewise.
		(aarch64_sframe_get_abi_arch): Likewise.
		(md_begin): Set values of sp/fp/ra registers.
		* gas/config/tc-aarch64.h (aarch64_support_sframe_p): New
		declaration.
		(support_sframe_p): Likewise.
		(SFRAME_CFA_SP_REG): Likewise.
		(SFRAME_CFA_FP_REG): Likewise.
		(SFRAME_CFA_RA_REG): Likewise.
		(aarch64_sframe_ra_tracking_p): Likewise.
		(sframe_ra_tracking_p): Likewise.
		(aarch64_sframe_cfa_ra_offset): Likewise.
		(sframe_cfa_ra_offset): Likewise.
		(aarch64_sframe_get_abi_arch): Likewise.
		(sframe_get_abi_arch): Likewise.
		* gas/config/tc-i386.c (x86_support_sframe_p): New definition.
		(x86_sframe_ra_tracking_p): Likewise.
		(x86_sframe_cfa_ra_offset): Likewise.
		(x86_sframe_get_abi_arch): Likewise.
		* gas/config/tc-i386.h (x86_support_sframe_p): New declaration.
		(support_sframe_p): Likewise.
		(SFRAME_CFA_SP_REG): Likewise.
		(SFRAME_CFA_FP_REG): Likewise.
		(x86_sframe_ra_tracking_p): Likewise.
		(sframe_ra_tracking_p): Likewise.
		(x86_sframe_cfa_ra_offset): Likewise.
		(sframe_cfa_ra_offset): Likewise.
		(x86_sframe_get_abi_arch): Likewise.
		(sframe_get_abi_arch): Likewise.
		* gas/config/tc-xtensa.c (unrelaxed_frag_max_size): Add case for
		rs_sframe.
		* gas/doc/as.texi: Add .sframe to the documentation for
		.cfi_sections.
		* gas/dw2gencfi.c (cfi_finish): Create a .sframe section.
		* gas/dw2gencfi.h (CFI_EMIT_sframe): New definition.
		* gas/write.c (cvt_frag_to_fill): Handle rs_sframe.
		(relax_segment): Likewise.
		* gas/gen-sframe.c: New file.
		* gas/gen-sframe.h: New file.
		* gas/sframe-opt.c: New file.

2022-11-15  Indu Bhagat  <indu.bhagat@oracle.com>

	gas: add new command line option --gsframe
	When --gsframe is specified, the assembler will generate a .sframe
	section from the CFI directives in the assembly.

	ChangeLog:

		* gas/as.c (parse_args): Parse args and set flag_gen_sframe.
		* gas/as.h: Introduce skeleton for --gsframe.
		* gas/doc/as.texi: document --gsframe.

2022-11-15  Indu Bhagat  <indu.bhagat@oracle.com>

	sframe.h: Add SFrame format definition
	The header sframe.h defines the SFrame format.

	The SFrame format is the Simple Frame format.  It can be used to
	represent the minimal necessary unwind information required for
	backtracing.  The current version supports AMD64 and AARCH64.

	More details of the SFrame format are included in the documentation
	of the header file in this patch.

	include/ChangeLog:
		* sframe.h: New file.

2022-11-15  Alan Modra  <amodra@gmail.com>

	Re: [gas] arm: Add support for new unwinder directive ".pacspval".
		* testsuite/gas/arm/ehabi-pacbti-m.d: Limit test to ELF.

2022-11-15  Alan Modra  <amodra@gmail.com>

	aarch64-pe can't fill 16 bytes in section .text
	Without commit b66e671854, this:
	 .p2align 4
	 nop
	 .p2align 3
	 nop
	results in an error when coff_frob_section attempts to pad out the
	section to a 16-byte boundary.  Due to miscalculating the pad pattern
	repeat count, write.c:write_contents attempts to shove 16 bytes of
	padding into the remaining 4 bytes of the .text section.

		* config/obj-coff.c (coff_frob_section): Correct fill count.
		Don't pad after errors.

2022-11-15  Jose E. Marchesi  <jose.marchesi@oracle.com>

	gdb/configure: regenerate
	The commit bbaabc767a4293492817a0840819aef2768cce90 introduced an
	incorrect thunk for the `configure' script.  This patch regenerates
	configure by calling autoreconf.

2022-11-15  Jose E. Marchesi  <jose.marchesi@oracle.com>

	gdb: use libtool in GDB_AC_CHECK_BFD
	The GDB_AC_CHECK_BFD macro defined in gdb/acinclude.m4 uses the
	AC_LINK_IFELSE autoconf macro in order to link a simple program to
	check features of libbfd.

	If libbfd's link dependencies change, it was necessary to reflect them
	either in the definition of the macro, or as a consequence of checking
	for them with an autoconf macro resulting in an addition to LIBS.

	This patch modifies the definition of the GDB_CHECK_BFD macro in order
	to use libtool to perform the test link.  This makes it possible to
	not have to list dependencies of libbfd (which are indirect to GDB) at
	all.

	After this patch:

	  configure:28553: checking for ELF support in BFD
	  configure:28573: ./libtool --quiet --mode=link gcc -o conftest \
	                   -I../../gdb/../include -I../bfd \
	                   -I../../gdb/../bfd -g -O2 \
	                   -L../bfd -L../libiberty conftest.c -lbfd -liberty \
	                   -lncursesw -lm -ldl  >&5
	  configure:28573: $? = 0
	  configure:28583: result: yes

	Tests performed:

	- Configure --with-system-zlib and --without-system-zlib.
	- Check link dependencies of installed GDB with both --enable-shared
	  and --disable-shared.
	- Run installed GDB in both cases.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-11-15  Tom Tromey  <tromey@adacore.com>

	Fix crash in ada_print_type
	The "varstring" paramter to ada_print_type can be null, but one spot
	failed to check this.  This could cause a crash in some situations.

	As this is Ada-specific, and we've been using it internally at AdaCore
	for a while, I am going to push it.

2022-11-15  Tejas Joshi  <TejasSanjay.Joshi@amd.com>

	Add AMD znver4 processor support
	2022-09-28  Tejas Joshi <TejasSanjay.Joshi@amd.com>

	gas/

	        * config/tc-i386.c (cpu_arch): Add znver4 ARCH and rmpquery SUBARCH.
	        (md_assemble): Expand comment before swap_operands() with rmpquery.
	        * doc/c-i386.texi: Add znver4.
	        * testsuite/gas/i386/arch-14-1.d: New.
	        * testsuite/gas/i386/arch-14-1.s: New.
	        * testsuite/gas/i386/arch-14-znver4.d: New.
	        * testsuite/gas/i386/i386.exp: Add new znver4 test cases.
	        * testsuite/gas/i386/rmpquery.d: New.
	        * testsuite/gas/i386/rmpquery.s: New.
	        * testsuite/gas/i386/x86-64-arch-4-1.d: New.
	        * testsuite/gas/i386/x86-64-arch-4-1.s: New.
	        * testsuite/gas/i386/x86-64-arch-4-znver4.d: New.

	opcodes/

	        * i386-dis.c (x86_64_table): Add rmpquery.
	        * i386-gen.c (cpu_flag_init): Add CPU_ZNVER4_FLAGS and
	        CPU_RMPQUERY_FLAGS.
	        (cpu_flags): Add CpuRMPQUERY.
	        * i386-opc.h (enum): Add CpuRMPQUERY.
	        (i386_cpu_flags): Add cpurmpquery.
	        * i386-opc.tbl: Add rmpquery insn.
	        * i386-init.h: Re-generated.
	        * i386-tbl.h: Re-generated.

2022-11-15  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: get_set_option_choices: expect \r\n after each item
	I get some random failures since commit 8d45c3a82a0e ("[gdb/testsuite]
	Set completions to unlimited in get_set_option_choices"), which can be
	reproduced with:

	    $ make check-read1 TESTS="gdb.base/parse_number.exp"

	For instance:

	    set architecture A^M
	    Ambiguous item "A".^M
	    (gdb) FAIL: gdb.base/parse_number.exp: arch=A: set architecture A

	The problem is the regexp in get_set_option_choices, it is possible that
	is only matches part of a completion result.  With check-read1, that is
	always one letter.

	Fix this by expecting the \r\n at the end of the line, so we only match
	entire results.  Use ^ in match patterns to ensure we don't miss any
	output.

	Approved-By: Tom de Vries <tdevries@suse.de>
	Change-Id: Ib1733737feab7dde0f7095866e089081a891054e

2022-11-15  Andre Vieira  <andre.simoesdiasvieira@arm.com>

	aarch64, testsuite: Fixed recently added cssc.d
	Fixed wrong paste in cssc.d.

	gas/ChangeLog:

		* testsuite/gas/aarch64/cssc.d: Removed duplicate head.

2022-11-15  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Normalize gdbserver path name
	Currently for the target board remote-gdbserver-on-localhost we use the
	gdbserver file on build, using a file name which includes "/../".

	Fix this by using a normalized file name instead.

	This allows us to be more restrictive about which files REMOTE_TARGET_USERNAME
	can access:
	...
	-    remote_exec build "chmod go-rx $objdir/outputs"
	+    remote_exec build "chmod go-rx $objdir"
	...

	Tested on x86_64-linux.

2022-11-15  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/jit-elf-so.exp for remote target
	With test-case gdb.base/jit-elf-so.exp and target board
	remote-gdbserver-on-localhost (using REMOTE_TARGET_USERNAME) we run into some
	failures.

	Fix these by:
	- setting jit_libname with the name as returned by gdb_load_shlib
	- allowing the libraries to be prefixed with the remote target directory.

	Tested on x86_64-linux.

	Co-Authored-by: Ivan Tetyushkin <ivan.tetyushkin@syntacore.com>

2022-11-15  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/jit-reader-exec.exp for remote target
	With test-case gdb.base/jit-reader-exec.exp and target board
	remote-gdbserver-on-localhost (using REMOTE_TARGET_USERNAME) we run into some
	failures.

	Fix this by adding the missing gdb_remote_download.

	Tested on x86_64-linux.

	Co-Authored-by: Ivan Tetyushkin <ivan.tetyushkin@syntacore.com>

2022-11-15  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/info-shared.exp for remote target
	With test-case gdb.base/info-shared.exp and target board
	remote-gdbserver-on-localhost (using REMOTE_TARGET_USERNAME) we run into some
	failures.

	Fix these by adding the missing gdb_load_shlib.

	Tested on x86_64-linux.

	Co-Authored-by: Ivan Tetyushkin <ivan.tetyushkin@syntacore.com>

2022-11-15  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/solib-vanish.exp for remote target
	When running test-case gdb.base/solib-vanish.exp with target board
	remote-gdbserver-on-localhost (using REMOTE_TARGET_USERNAME) we run into some
	failures.

	Fix these by adding the missing gdb_load_shlib.

	Tested on x86_64-linux.

	Co-Authored-by: Ivan Tetyushkin <ivan.tetyushkin@syntacore.com>

2022-11-15  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/infcall-exec.exp for remote target
	When running test-case gdb.base/infcall-exec.exp with target board
	remote-gdbserver-on-localhost (using REMOTE_TARGET_USERNAME) we run into:
	...
	(gdb) call (int) execlp ("$outputs/gdb.base/infcall-exec/infcall-exec2", \
	  "$outputs/gdb.base/infcall-exec/infcall-exec2", (char *)0)^M
	$1 = -1^M
	(gdb) FAIL: gdb.base/infcall-exec.exp: call execlp
	...

	Fix this by using just:
	...
	(gdb) call (int) execlp ("infcall-exec2", "infcall-exec2", (char *)0)^M
	...
	and using putenv ("PATH=...") to allow infcall-exec to exec infcall-exec2
	if it's available alongside.

	Also fix the exec name in the test-case, such that we can successfully
	run the test-case:
	...
	$ ./outputs/gdb.base/infcall-exec/infcall-exec
	PATH SETTING: 'PATH=./outputs/gdb.base/infcall-exec'
	$
	...

	Tested on x86_64-linux.

	Co-Authored-by: Ivan Tetyushkin <ivan.tetyushkin@syntacore.com>

2022-11-15  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/print-file-var.exp for remote target
	When running test-case gdb.base/print-file-var.exp with target board
	remote-gdbserver-on-localhost (using REMOTE_TARGET_USERNAME) we run into some
	failures.

	Fix these by using the name of a shared lib as returned by gdb_load_shlib.

	This required splitting up the gdb_load_shlib functionality, which is now
	defined as:
	...
	proc gdb_load_shlib { file } {
	    set dest [gdb_download_shlib $file]
	    gdb_locate_shlib $file
	    return $dest
	}
	...
	such that we can do gdb_download_shlib before gdb is started.

	Tested on x86_64-linux.

	Co-Authored-by: Ivan Tetyushkin <ivan.tetyushkin@syntacore.com>

2022-11-15  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add REMOTE_TARGET_USERNAME in remote-gdbserver-on-localhost.exp
	As reported here
	( https://sourceware.org/pipermail/gdb-patches/2022-October/193147.html ) a
	number of test-cases fails with a remote target setup, for instance test-case
	gdb.base/print-file-var.exp.

	So, why don't we see these fails with our remote target boards in
	gdb/testsuite/boards, say remote-gdbserver-on-localhost.exp?

	The problem is that the target board uses the same machine and user for
	both (by-definition-local) build and remote target, and when using absolute
	pathnames to refer to files on build, we can access those files on target,
	which in a real remote target setup wouldn't be the case: we'd have to
	download them to target first, and then the filename would also be different.

	For aforementioned test-case, this happens when the name of a shared library is
	passed as absolute file name to gcc:
	...
	gcc ...  -DSHLIB_NAME="$outputs/gdb.base/print-file-var/\
	  print-file-var-lib2-hidden0-dlopen1-version_id_main0_c.so"
	...

	Make these problems visible with remote-gdbserver-on-localhost.exp by
	adding an option to specify a test account (still on the same machine)
	using REMOTE_TARGET_USERNAME.

	We make sure by restricting file permissions, that the test account cannot see
	the build files on the $USER account, and that the $USER account cannot see
	the target files on the test account.

	And so we can reproduce the reported fails:
	...
	$ cd build/gdb
	$ tc="gdb.base/print-file-var.exp"
	$ tb="--target_board remote-gdbserver-on-localhost"
	$ tbu="REMOTE_TARGET_USERNAME=remote-target"
	$ make check RUNTESTFLAGS="$tb $tbu $tc"
	   ...
	FAIL: gdb.base/print-file-var.exp: lang=c: hidden=0: dlopen=1: \
	  version_id_main=0: continue to STOP marker
	...

	Tested on x86_64-linux.

	Reported-by: Ivan Tetyushkin <ivan.tetyushkin@syntacore.com>

2022-11-15  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/info_sources_2.exp for remote target
	With test-case gdb.base/info_sources_2.exp and target board
	remote-gdbserver-on-localhost (using REMOTE_TARGET_USERNAME) we run into some
	failures.

	Fix these by adding the missing gdb_load_shlib.

	Tested on x86_64-linux.

2022-11-15  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/foll-exec.exp for remote target
	When running test-case gdb.base/foll-exec.exp with target board
	remote-gdbserver-on-localhost.exp, I run into:
	...
	(gdb) PASS: gdb.base/foll-exec.exp: insert first exec catchpoint
	continue^M
	Continuing.^M
	[Inferior 1 (process 4476) exited normally]^M
	(gdb) FAIL: gdb.base/foll-exec.exp: continue to first exec catchpoint (the program e\
	xited)
	...

	The problem is that the foll-exec executable expects the exec-ed executable
	execd-prog alongside it, but it's missing.

	Fix this by adding the missing gdb_remote_download.

	Likewise in a few other test-cases.

	Tested on x86_64-linux.

2022-11-15  Tom de Vries  <tdevries@suse.de>

	[gdb/testssuite] Skip aarch64 in skip_gdbserver_test if no xml support
	On aarch64-linux, with a gdb build without libexpat, so without xml support, I
	run into:
	...
	(gdb) builtin_spawn attach-no-multi-process^M
	attach 26808^M
	Attaching to Remote target^M
	warning: Can not parse XML target description; XML support was disabled at \
	  compile time^M
	Reading symbols from attach-no-multi-process...^M
	Remote 'g' packet reply is too long (expected 788 bytes, got 796 bytes): ... ^M
	...

	The test-case checks for skip_gdbserver_tests and that one contains a check
	for xml support:
	...
	    # If GDB is lack of XML support, and targets, like arm, have
	    # multiple target descriptions, GDB doesn't know which target
	    # description GDBserver uses, and may fail to parse 'g' packet
	    # after connection.
	    if { [gdb_skip_xml_test]
		 && ([istarget "arm*-*-linux*"]
		      || [istarget "mips*-*-linux*"]
		      || [istarget "powerpc*-*-linux*"]
		      || [istarget "s390*-*-linux*"]
		      || [istarget "x86_64-*-linux*"]
		      || [istarget "i\[34567\]86-*-linux*"]) } {
		return 1
	    }
	...
	but it doesn't trigger because aarch64 is missing.

	Fix this by adding istarget "aarch64*-*-linux*".

	Tested on aarch64-linux.

	Approved-By: Luis Machado <luis.machado@arm.com>

2022-11-15  Aditya Vidyadhar Kamath  <Aditya.Kamath1@ibm.com>

	Enable multi-process debugging for AIX
	This patch adds multi-process debugging feature in AIX.

	Till now AIX supported debugging only one inferior at a time,
	now we can be able to debug multi process.  Users can use set
	follow fork mode in child or parent and set detach on fork on
	or off to enable/disable simultaneous debugging of parent/child.

2022-11-15  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-14  Carl Love  <cel@us.ibm.com>

	PowerPC, fix support for printing the function return value for non-trivial values.
	Currently, a non-trivial return value from a function cannot currently be
	reliably determined on PowerPC.  This is due to the fact that the PowerPC
	ABI uses register r3 to store the address of the buffer containing the
	non-trivial return value when the function is called.  The PowerPC ABI
	does not guarantee the value in register r3 is not modified in the
	function.  Thus the value in r3 cannot be reliably used to obtain the
	return addreses on exit from the function.

	This patch adds a new gdbarch method to allow PowerPC to access the value
	of r3 on entry to a function. On PowerPC, the new gdbarch method attempts
	to use the DW_OP_entry_value for the DWARF entries, when exiting the
	function, to determine the value of r3 on entry to the function.  This
	requires the use of the -fvar-tracking compiler option to compile the
	user application thus generating the DW_OP_entry_value in the binary.  The
	DW_OP_entry_value entries in the binary file allows GDB to resolve the
	DW_TAG_call_site entries.  This new gdbarch method is used to get the
	return buffer address, in the case of a function returning a nontrivial
	data type, on exit from the function.  The GDB function should_stop checks
	to see if RETURN_BUF is non-zero.  By default, RETURN_BUF will be set to
	zero by the new gdbarch method call for all architectures except PowerPC.
	The get_return_value function will be used to obtain the return value on
	all other architectures as is currently being done if RETURN_BUF is zero.
	On PowerPC, the new gdbarch method will return a nonzero address in
	RETURN_BUF if the value can be determined.  The value_at function uses the
	return buffer address to get the return value.

	This patch fixes five testcase failures in gdb.cp/non-trivial-retval.exp.
	The correct function return values are now reported.

	Note this patch is dependent on patch: "PowerPC, function
	ppc64_sysv_abi_return_value add missing return value convention".

	This patch has been tested on Power 10 and x86-64 with no regressions.

2022-11-14  Carl Love  <cel@us.ibm.com>

	PowerPC, function ppc64_sysv_abi_return_value add missing return value convention
	This patch address five testcase failures in gdb.cp/non-trivial-retval.exp.
	The following commit resulted in the five testcases failures on PowerPC.
	The value returned by the function is being reported incorrectly.

	  commit b1718fcdd1d2a5c514f8ee504ba07fb3f42b8608
	  Author: Andrew Burgess <aburgess@redhat.com>
	  Date:   Mon Dec 13 16:56:16 2021 +0000

	      gdb: on x86-64 non-trivial C++ objects are returned in memory

	      Fixes PR gdb/28681.  It was observed that after using the `finish`
	      command an incorrect value was displayed in some cases.  Specifically,
	      this behaviour was observed on an x86-64 target.

	The function:

	  enum return_value_convention
	  ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct value *function,
	                               struct type *valtype, struct regcache *regcache,
	                               gdb_byte *readbuf, const gdb_byte *writebuf)

	should return RETURN_VALUE_STRUCT_CONVENTION if the valtype->code() is
	TYPE_CODE_STRUCT and if the language_pass_by_reference is not
	trivially_copyable.

	This patch adds the needed code to return the value
	RETURN_VALUE_STRUCT_CONVENTION in this case.

	With this patch, the five test cases still fail but with the message "Value
	returned has type: A. Cannot determine contents".  The PowerPC ABI stores
	the address of the buffer containing the function return value in register
	r3 on entry to the function.  However, the PowerPC ABI does not guarentee
	that r3 will not be modified in the function.  So when the function returns,
	the return buffer address cannot be reliably obtained from register r3.
	Thus the message "Cannot determine contents" is appropriate in this case.

2022-11-14  Tom Tromey  <tromey@adacore.com>

	Remove dump_prefix_expression
	Since the expression rewrite, dump_prefix_expression has been
	misnamed.  This patch cleans this up by removing the function, turning
	it into a method on struct expression.

2022-11-14  Andre Vieira  <andre.simoesdiasvieira@arm.com>

	aarch64: Add support for Common Short Sequence Compression extension
	This patch adds support for the CSSC extension and its corresponding
	instructions: ABS, CNT, CTZ, SMAX, UMAX, SMIN, UMIN.

	gas/ChangeLog:

	        * config/tc-aarch64.c (parse_operands): Handle new operand types.
	        * doc/c-aarch64.texi: Document new extension.
	        * testsuite/gas/aarch64/cssc.d: New test.
	        * testsuite/gas/aarch64/cssc.s: New test.

	include/ChangeLog:

	        * opcode/aarch64.h (AARCH64_FEATURE_CSSC): New feature Macro.
	        (enum aarch64_opnd): New operand types.
	        (enum aarch64_insn_class): New instruction class.

	opcodes/ChangeLog:

		* aarch64-asm-2.c: Regenerate.
		* aarch64-dis-2.c: Regenerate.
		* aarch64-opc-2.c: Regenerate.
		* aarch64-opc.c (operand_general_constraint_met_p): Update for new
		operand types.
		(aarch64_print_operand): Likewise.
		* aarch64-opc.h (enum aarch64_field_kind): Declare FLD_CSSC_imm8 field.
		* aarch64-tbl.h (aarch64_feature_cssc): Define new feature set.
		(CSSC): Define new feature set Macro.
		(CSSC_INSN): Define new instruction type.
		(aarch64_opcode_table): Add new instructions.

2022-11-14  Jan Beulich  <jbeulich@suse.com>

	x86: fold special-operand insn attributes into a single enum
	Attributes which aren't used together in any single insn template can be
	converted from individual booleans to a single enum, as was done for a few
	other attributes before. This is more space efficient. Collect together
	all attributes which express special operand constraints (and which fit
	the criteria for folding).

2022-11-14  Dimitar Dimitrov  <dimitar@dinux.eu>

	pru: bfd: Correct default to no execstack
	Data and instruction memories are strictly separated, so it is not
	possible to execute instructions from the stack memory on PRU.

	I don't see any difference in testsuite results with or without this
	change.

	bfd/ChangeLog:

		* elf32-pru.c (elf_backend_default_execstack): Define as 0.

	ld/ChangeLog:

		* testsuite/ld-elf/elf.exp (target_defaults_to_execstack):
		Return 0 for pru.

2022-11-14  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>

	[gas] arm: Add support for new unwinder directive ".pacspval".
	This patch adds the assembler support for the new unwinder
	directive ".pacspval" and encodes this directives with opcode
	"0xb5". This opcode indicates the unwinder to use effective
	vsp as modifier for PAC validation.

	gas/ChangeLog:

	2022-11-07  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>

	        * doc/c-arm.texi: Document directive.
	        * config/tc-arm.c (s_arm_unwind_pacspval): Define function.
	        (md_pseudo_table): Add entry for pacspval directive.
	        * testsuite/gas/arm/ehabi-pacbti-m.d: New test.
	        * testsuite/gas/arm/ehabi-pacbti-m.s: Likewise.

2022-11-14  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>

	[readelf] arm: Support for new pacbti unwind opcode 0xb5.
	This patch adds readelf support for decoding the exception
	table opcode "0xb5", which indicates to use effective vsp
	as modifier for PAC validation as defined by EHABI
	(https://github.com/ARM-software/abi-aa/releases/download/2022Q3/ehabi32.pdf
	Section 10.3).

	binutils/ChangeLog:

	2022-11-07  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>

	        * readelf.c (decode_arm_unwind_bytecode): Add entry to decode opcode 0xb5.

2022-11-14  Tsukasa OI  <research_trasio@irq.a4lg.com>

	gdb/unittests: PR28413, suppress warnings generated by Gnulib
	Gnulib generates a warning if the system version of certain functions
	are used (to redirect the developer to use Gnulib version).  It caused a
	compiler error when...

	-   Compiled with Clang
	-   -Werror is specified (by default)
	-   C++ standard used by Clang is before C++17 (by default as of 15.0.0)
	    when this unit test is activated.

	This issue is raised as PR28413.

	However, previous proposal to fix this issue (a "fix" to Gnulib):
	<https://lists.gnu.org/archive/html/bug-gnulib/2021-10/msg00003.html>
	was rejected because it ruins the intent of Gnulib warnings.

	So, we need a Binutils/GDB-side solution.

	This commit tries to address this issue on the GDB side.  We have
	"include/diagnostics.h" to disable certain warnings only when necessary.

	This commit suppresses the Gnulib warnings by surrounding entire #include
	block with DIAGNOSTIC_IGNORE_USER_DEFINED_WARNINGS to disable Gnulib-
	generated warnings on all standard C++ header files.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28413
	Approved-By: Simon Marchi <simon.marchi@efficios.com>
	Change-Id: Ieeb5a31a6902808d4c7263a2868ae19a35e0ccaa

2022-11-14  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>

	arm: Add support for Cortex-X1C CPU.
	This patch adds support for Cortex-X1C CPU in Arm.

	bfd/ChangeLog:

	2022-11-09  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>

	        * cpu-arm.c (processors): Add Cortex-X1C CPU entry.

	gas/ChangeLog:

	2022-11-09  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>

	        * NEWS: Update docs.
	        * config/tc-arm.c (arm_cpus): Add cortex-x1c to -mcpu.
	        * doc/c-arm.texi: Update docs.
	        * testsuite/gas/arm/cpu-cortex-x1c.d: New test.

2022-11-14  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Run gdb.arch/ppc64-symtab-cordic.exp for --enable-targets=all
	While looking at test-case gdb.arch/ppc64-symtab-cordic.exp I realized that
	the test-case is too restrictive here:
	...
	if {![istarget "powerpc*"] || ![is_lp64_target]} {
	    verbose "Skipping powerpc64 separate debug file symtab test."
	    return
	}
	...
	and can also be run on x86_64-linux, if "set arch powerpc:common64" is
	supported, which is the case if we've build gdb with --enable-targets=all.

	Fix this by instead checking if powerpc:common64 is in the completion list for
	"set arch".

	This allows us to remove the 'untested "powerpc:common64 is not supported"'.

	While we're at it, clean up the test-case by using clean_restart.

	Tested on x86_64-linux.

2022-11-14  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Handle with_set arch
	I realized that the more irregular output of show arch:
	...
	(gdb) show arch^M
	The target architecture is set to "auto" (currently "i386").^M
	...
	would be a problem for something like:
	...
	with_set arch powerpc:common64 {}
	...
	and indeed:
	...
	(gdb) set arch powerpc:common64^M
	The target architecture is set to "powerpc:common64".^M
	(gdb) FAIL: gdb.base/foo.exp: set arch powerpc:common64
	...
	and:
	...
	(gdb) set arch set to "auto" (currently "i386")^M
	Undefined item: "set".^M
	...

	Fix this in with_set by handling this type of output.

	Tested on x86_64-linux.

2022-11-14  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Set completions to unlimited in get_set_option_choices
	In some test-case I tried to use get_set_option_choices "set architecture" and
	ran into max-completions:
	...
	set architecture simple^M
	set architecture tomcat^M
	set architecture xscale^M
	set architecture  *** List may be truncated, max-completions reached. ***^M
	(gdb) PASS: gdb.base/foo.exp: complete set architecture
	...

	There's only one test-case using this currently: gdb.base/parse_number.exp,
	and it locally sets max-completions to unlimited.

	Fix this by:
	- factoring out a new proc with_set out of proc with_complaints, and
	- using it to temporarily set max-completions to unlimited in
	  get_set_option_choice.

	Tested on x86_64-linux, by running test-cases that excercise
	get_set_option_choice and with_complaints.

2022-11-14  Alan Modra  <amodra@gmail.com>

	Re: objcopy renaming section with explicit flags
	For now, xfail the new test.  Some header/aux-header rewriting is
	required at the very least.

		* testsuite/binutils-all/rename-section-01.d: xfail xcoff.

2022-11-14  Alan Modra  <amodra@gmail.com>

	objcopy renaming section with explicit flags
	This tidies SEC_RELOC handling in bfd, in the process fixing a bug
	with objcopy when renaming sections.

	bfd/
		* reloc.c (_bfd_generic_set_reloc): Set/clear SEC_RELOC depending
		on reloc count.
		* elf64-sparc.c (elf64_sparc_set_reloc): Likewise.
	binutils/
		* objcopy.c (copy_relocations_in_section): Remove now unnecessary
		clearing of SEC_RELOC.
		* testsuite/binutils-all/rename-section-01.d: New test.
		* testsuite/binutils-all/objcopy.exp: Run it.
	gas/
		* write.c (size_seg): Remove unneccesary twiddle of SEC_RELOC.
		(write_relocs): Likewise.  Always call bfd_set_reloc.

2022-11-14  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-13  Jon Turney  <jon.turney@dronecode.org.uk>

	Fix Cygwin build after 02d04eac
	Commit 02d04eac "Use strwinerror in gdb/windows-nat.c" also moves
	strwinerror() under the USE_WIN32API conditional, which is not defined
	for Cygwin (and looks like it shouldn't be, as appears to imply
	non-POSIX and MiNGW and WinSock...)

	Also enable the declaration and definition of strwinerror() when
	__CYGWIN__ is defined.

2022-11-13  Jon Turney  <jon.turney@dronecode.org.uk>

	Drop apparently unneeded include of winsock2.h
	Commit d08bae3d ("Implement target async for Windows") unconditionally
	includes winsock2.h.  We don't want to do that on Cygwin, since
	including both winsock2.h and sys/select.h causes incompatible
	redefinition problems.

	Since that include is apparently unneeded, just drop it.

	Fixes: d08bae3d

2022-11-13  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-12  Dimitar Dimitrov  <dimitar@dinux.eu>

	sim: pru: Fix behaviour when loop count is zero
	If the counter for LOOP instruction is provided by a register with
	value zero, then the instruction must cause a PC jump directly to the
	loop end.  But in that particular case simulator must not initialize
	its internal loop variables, because loop body will not be executed.
	Instead, simulator must obtain the loop's end address directly from
	the LOOP instruction.

2022-11-12  Alan Modra  <amodra@gmail.com>

	PowerPC64 paddi -Mraw
	On a testcase like
	 pla 8,foo@pcrel
	disassembled with -Mpower10 results in
	   0:	00 00 10 06 	pla     r8,0	# 0
	   4:	00 00 00 39
				0: R_PPC64_PCREL34	foo
	but with -Mpower10 -Mraw
	   0:	00 00 10 06 	.long 0x6100000
				0: R_PPC64_PCREL34	foo
	   4:	00 00 00 39 	addi    r8,0,0

	The instruction is unrecognised due to the hack we have in
	extract_pcrel0 in order to disassemble paddi with RA0=0 and R=1 as
	pla.  I could have just added "&& !(dialect & PPC_OPCODE_RAW)" to the
	condition in extract_pcrel0 under which *invalid is set, but went for
	this larger patch that reorders the extended insn pla to the more
	usual place before its underlying machine insn.  (la is after addi
	because we never disassemble to la.)

	gas/
		* testsuite/gas/ppc/raw.d,
		* testsuite/gas/ppc/raw.s: Add pla.
	opcodes/
		* ppc-opc.c (extract_pcrel1): Rename from extract_pcrel0 and
		invert *invalid logic.
		(PCREL1): Rename from PCREL0.
		(prefix_opcodes): Sort pla before paddi, adjusting R operand
		for pla, paddi and psubi.

2022-11-12  Indu Bhagat  <indu.bhagat@oracle.com>

	libctf: use libtool for link test in configure
	The configure check for ELF support in BFD uses the AC_TRY_LINK.  If
	libbfd's dependencies change, this macro will need to be updated
	manually with explicit additions to LDFLAGS and LIBS.

	This patch updates the check to use libtool instead.

	ChangeLog:

		* libctf/configure.ac: Use libtool instead.
		* libctf/configure: Regenerated.

2022-11-12  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-11  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: fix start breakpoint expression not working in some languages
	Commit 0be837be9fb4 ("gdb: make "start" breakpoint inferior-specific")
	regresses gdb.ada/start.exp:

	    (gdb) start
	    Error in expression, near `1'.
	    (gdb) UNTESTED: gdb.ada/start.exp: start failed to land inside the right procedure

	This is because in Ada, the equality operator is =, not ==.

	I checked the other languages supported by GDB, these other languages
	use = for equality:

	 - Pascal: tests like gdb.pascal/hello.exp are affected too
	 - Modula-2: I tried building a Modula-2 hello world using gm2, but it
	   seems like the generated DWARF doesn't specify the Modula-2 language
	   in the CUs, it's C++ and C, so the selected language isn't
	   "modula-2".  But if I manually do "set language modula-2" on a dummy
	   program and then "start", I get the same error.

	Other languages all use ==.

	So, a short term fix would be to use = or == in the expression, based on
	the current language.  If this was meant to be permanent, I would
	suggest adding something like an "equality_operator" method to
	language_defn, that returns the right equality operator for the
	language.  But the goal is to replace all this with proper
	inferior-specific breakpoints, so I hope all this is temporary.

	Approved-By: Tom de Vries <tdevries@suse.de>
	Change-Id: Id4d38e14a80e6bbbb1ad2b2277f974dd55192969

2022-11-11  Mike Frysinger  <vapier@gentoo.org>

	sim: igen: cleanup archaic pointer-to-long printf casts
	Use proper %p to printf a pointer instead of casting it to long and
	using 0x%lx.  It's cleaner, more correct, and doesn't break on LLP64.

2022-11-11  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Don't timeout on prompt in gdb_start_cmd
	We're currently running into a timeout at:
	...
	(gdb) start ^M
	Error in expression, near `1'.^M
	(gdb) UNTESTED: gdb.ada/start.exp: start failed to land inside the right \
	  procedure
	...
	due to the fact that gdb_start_cmd doesn't handle a prompt as reaction to
	the start command.

	Fix this by handling the prompt.  Reduces execution time of the test-case from
	1m1s to 1s.

	Tested on x86_64-linux.

2022-11-11  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Better error checking in has_hw_wp_support
	With gdb 12.1, on powerpc64le I ran into ERRORs related to has_hw_wp_support
	usage, which was already fixed on trunk by commits:
	- 13f72372413 ("gdb/testsuite: fix gdb.base/break-idempotent.exp on ppc"), and
	- 01a32ee0b8c ("PowerPC, fix gdb.base/watchpoint.exp on Power 9")

	While looking into these ERRORs and the commits that fix them, it occurred to
	me that while the commits fix the root cause, the failure mode is not great.

	The test-cases expect a running instance of gdb upon return, which is not
	there, so there's an long stream of ERRORs generated as a result.

	Fix this at the start of has_hw_wp_support, by (instead of accomodating a
	running gdb instance by calling gdb_exit), checking whether it's called
	without a running gdb instance, and erroring out otherwise.  This way, there's
	just one error.

	I also noticed that in case we do an early exit due to !runto_main, we don't
	clean up, so copy the missing cleanups (gdb_exit and $obj file deletion) from
	the regular exit.

	Tested on x86_64-linux, using has_hw_wp_support for x86_64 in
	skip_hw_watchpoint_tests.

2022-11-11  Lancelot SIX  <lancelot.six@amd.com>

	gdb/py-inferior: Keep inferior threads in a map
	The python code maintains a list of threads for each inferior.  This
	list is implemented as a linked list.  When the number of threads grows
	high, this implementation can begin to be a performance bottleneck as
	finding a particular thread_object in the list has a complexity of O(N).

	We see this in ROCgdb[1], a downstream port of GDB for AMDGUP.  On
	AMDGPU devices, the number of threads can get significantly higher than
	on usual GDB workloads.

	In some situations, we can reach the end of the inferior process with
	GDB still having a substantial list of known threads.  While running
	target_mourn_inferior, we end up in inferior::clear_thread_list which
	iterates over all remaining threads and marks each thread exited.  This
	fires the gdb::observers::thread_exit observer and eventually
	py-inferior.c:set_thread_exited gets called.  This function searches in
	the linked list with poor performances.

	This patch proposes to change the linked list that keeps the per
	inferior_object list of thread_objects into a std::unordered_map.  This
	allows to have the search operation complexity be O(1) on average
	instead of O(N).

	With this patch, we can complete clear_thread_list in about 2.5 seconds
	compared to 10 minutes without it.

	Except for the performance change, no user visible change is expected.

	Regression tested on Ubuntu-22.04 x86_64.

	[1] https://github.com/ROCm-Developer-Tools/ROCgdb

2022-11-11  Luis Machado  <luis.machado@arm.com>

	Make sure a copy_insn_closure is available when we have a match in copy_insn_closure_by_addr
	PR gdb/29272

	Investigating PR29272, it was mentioned a particular test used to work on
	GDB 10, but it started failing with GDB 11 onwards. I tracked it down to
	some displaced stepping improvements on commit
	187b041e2514827b9d86190ed2471c4c7a352874.

	In particular, one of the corner cases using copy_insn_closure_by_addr got
	silently broken. It is hard to spot because it doesn't have any good tests
	for it, and the situation is quite specific to the Arm target.

	Essentially, the change from the displaced stepping improvements made it so
	we could still invoke copy_insn_closure_by_addr correctly to return the
	pointer to a copy_insn_closure, but it always returned nullptr due to
	the order of the statements in displaced_step_buffer::prepare.

	The way it is now, we first write the address of the displaced step buffer
	to PC and then save the copy_insn_closure pointer.

	The problem is that writing to PC for the Arm target requires figuring
	out if the new PC is thumb mode or not.

	With no copy_insn_closure data, the logic to determine the thumb mode
	during displaced stepping doesn't work, and gives random results that
	are difficult to track (SIGILL, SIGSEGV etc).

	Fix this by reordering the PC write in displaced_step_buffer::prepare
	and, for safety, add an assertion to
	displaced_step_buffer::copy_insn_closure_by_addr so GDB stops right
	when it sees this invalid situation. If this gets broken again in the
	future, it will be easier to spot.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29272

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-11-11  Felix Willgerodt  <felix.willgerodt@intel.com>

	gdb, btrace: Fix rn-dl-bind.exp for new icx remark.
	When running the test with the latest Intel compiler:

	Running gdb/gdb/testsuite/gdb.btrace/rn-dl-bind.exp ...
	gdb compile failed, icpx: warning: treating 'c' input as 'c++' when
	in C++ mode, this behavior is deprecated [-Wdeprecated]

	The test doesn't seem to test something specifically for C++,
	so I removed the C++ compilation option. Alternatively we could rename
	rn-dl-bind.exp.c to rn-dl-bind.exp.cc.

2022-11-11  Bruno Larsen  <blarsen@redhat.com>

	gdb/testsuite: disable gdb.cp/call-method-register.exp when not using gcc
	The test gdb.cp/call-method-register.exp assumes that the class will be
	placed on a register. However, this keyword has been deprecated since
	C++11, and Clang, for instance, does not feel the need to follow it.
	Since this test is not usable without this working, this commit marks
	this test as untested.

	Approved-by: Tom Tromey <tom@tromey.com>

2022-11-11  Bruno Larsen  <blarsen@redhat.com>

	gdb/testsuite: remove XFAIL on gdb.cp/temargs.exp
	gdb.cp/temargs.exp last 2 tests always setup an XFAILs, despite checking
	for old gcc versions.  However, Clang does not fail in this test,
	turning into XPASSes and slighty annoying when comparing between
	compilers.  To change this, make the xfails only happen if we using gcc.

	Approved-by: Tom Tromey <tom@tromey.com>

2022-11-11  Bruno Larsen  <blarsen@redhat.com>

	gdb/testsuite: disable some tests of gdb.cp/typeid.exp when using Clang
	Since Clang chooses to not add any debug information for base types,
	expecting it to be included with libraries' informations, gdb.cp/typeid.exp
	will always fail if the program hasn't started.  This commit fixes that by
	making it so when using Clang, the base type variables aren't tested.

	Approved-by: Tom Tromey <tom@tromey.com>

2022-11-11  Bruno Larsen  <blarsen@redhat.com>

	gdb/testsuite: skip gdb.cp/anon-struct.exp when using Clang
	When Clang compiles anonymous structures, it does not add linkage names in
	their dwarf representations. This is compounded by Clang not adding linkage
	names to subprograms of those anonymous structs (for instance, the
	constructor). With these 2 things together, GDB is unable to refer to
	any of them, so there is no way to pass any of the tests of
	gdb.cp/anon-struct.exp

	Since this isn't a bug on Clang or GDB according to the DWARF
	specifications as DW_AT_name is optional for all DIEs, the test was marked
	as untested.

	Since I was already touching the file, I also added a comment at the top
	of the file explaining what it is testing for.

	Approved-by: Tom Tromey <tom@tromey.com>

2022-11-11  Bruno Larsen  <blarsen@redhat.com>

	gdb/testsuite: allow for Clang style destructors on gdb.cp/m-static.exp
	when running gdb.cp/m-static.exp using Clang, we get the following
	failures:

	    print test1.~gnu_obj_1^M
	    $6 = {void (gnu_obj_1 * const)} 0x555555555470 <gnu_obj_1::~gnu_obj_1()>^M
	    (gdb) FAIL: gdb.cp/m-static.exp: simple object instance, print destructor
	    ptype test1.~gnu_obj_1^M
	    type = void (gnu_obj_1 * const)^M
	    (gdb) FAIL: gdb.cp/m-static.exp: simple object instance, ptype destructor
	    print test1.'~gnu_obj_1'^M
	    $7 = {void (gnu_obj_1 * const)} 0x555555555470 <gnu_obj_1::~gnu_obj_1()>^M
	    (gdb) FAIL: gdb.cp/m-static.exp: simple object instance, print quoted destructor

	This is because the test is expecting an extra integer parameter on the
	destructor. Looking at the debuginfo, it seems that there is nothing
	actually wrong with this output, so these tests were changed to test
	multiple possible regexps.

	Approved-by: Tom Tromey <tom@tromey.com>

2022-11-11  Bruno Larsen  <blarsen@redhat.com>

	gdb/testsuite: add XFAIL to gdb.cp/derivation.exp when using Clang
	When running gdb.cp/derivation.exp using Clang, we get an unexpected
	failure when printing the type of a class with an internal typedef. This
	happens because Clang doesn't add accessibility information for typedefs
	inside classes (see https://github.com/llvm/llvm-project/issues/57608
	for more info). To help with Clang testing, an XFAIL was added to this
	test.

	Approved-by: Tom Tromey <tom@tromey.com>

2022-11-11  Bruno Larsen  <blarsen@redhat.com>

	gdb/testsuite: account for clang's nested destructor calls on gdb.cp/mb-ctor.exp
	When compiling virtual classes's destructors, two versions are compiled,
	one with a single parameter (this) and the other with 2 parameters (this
	and vtt).

	GCC's compilation makes it so either the version with 1
	parameter or the one with 2 parameters is called, depending on whether
	the destructor is being called by the class itself or by an inherited
	class. On the test gdb.cp/mb-ctor.exp, this means that the breakpoint
	set at the destructor will be hit 4 times.

	Clang, on the other hand, makes the single-parameter version call the 2
	parameter version, probably in an attempt to reduce the size of the
	resulting executable. This means that the gdb.cp/mb-ctor.exp will hit 6
	breakpoints before finishing, and is the reason why this test was
	failing. To make this test stop failing, a compiler check is added and
	another "continue" instruction is issued to account for this difference.

	Approved-by: Tom Tromey <tom@tromey.com>

2022-11-11  Bruno Larsen  <blarsen@redhat.com>

	gdb/testsuite: enable running gdb.cp/classes.exp with clang
	When attempting to run the gdb.cp/classes.exp test using Clang++, the
	test fails to prepare with -Wnon-c-typedef-for-linkage like the
	previously fixed gdb.cp/class2.exp. Upon fixing this, the test shows 5
	unexpected failures. One such failures is:

	ptype/r class class_with_public_typedef
	type = class class_with_public_typedef {
	  private:
	    int a;
	  public:
	    class_with_public_typedef::INT b;

	  private:
	    typedef int INT;
	}
	(gdb) FAIL: gdb.cp/classes.exp: ptype class class_with_public_typedef // wrong access specifier for typedef: private

	While g++ provided the following output:

	ptype/r class class_with_public_typedef
	type = class class_with_public_typedef {
	  private:
	    int a;
	  public:
	    class_with_public_typedef::INT b;

	    typedef int INT;
	}
	(gdb) PASS: gdb.cp/classes.exp: ptype class class_with_public_typedef

	This error happens because Clang does not add DW_AT_accessibility to
	typedefs inside classes, and without this information GDB defaults to
	assuming the typedef is private.  Since there is nothing that GDB can do
	about this, these tests have been set as xfails, and Clang bug 57608 has
	been filed.

	Bug: https://github.com/llvm/llvm-project/issues/57608
	Approved-by: Tom Tromey <tom@tromey.com>

2022-11-11  Bruno Larsen  <blarsen@redhat.com>

	gdb/testsuite: ignore Non-C-typedefs for gdb.cp/class2.exp
	When attempting to test gdb.cp/class2.exp using Clang, it fails to
	prepare with the following error:

	Executing on host: clang++    -fdiagnostics-color=never -Wno-unknown-warning-option  -c -g -o /home/blarsen/Documents/fsf_build/gdb/testsuite/outputs/gdb.cp/class2/class20.o /home/blarsen/Documents/fsf_build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.cp/class2.cc    (timeout = 300)
	builtin_spawn -ignore SIGHUP clang++ -fdiagnostics-color=never -Wno-unknown-warning-option -c -g -o /home/blarsen/Documents/fsf_build/gdb/testsuite/outputs/gdb.cp/class2/class20.o /home/blarsen/Documents/fsf_build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.cp/class2.cc
	/home/blarsen/Documents/fsf_build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.cp/class2.cc:53:14: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
	typedef class {
	             ^
	              Dbase
	/home/blarsen/Documents/fsf_build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.cp/class2.cc:54:2: note: type is not C-compatible due to this member declaration
	 public:
	 ^~~~~~~
	/home/blarsen/Documents/fsf_build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.cp/class2.cc:58:3: note: type is given name 'Dbase' for linkage purposes by this typedef declaration
	} Dbase;
	  ^
	1 warning generated.
	gdb compile failed, /home/blarsen/Documents/fsf_build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.cp/class2.cc:53:14: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
	typedef class {
	             ^
	              Dbase
	/home/blarsen/Documents/fsf_build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.cp/class2.cc:54:2: note: type is not C-compatible due to this member declaration
	 public:
	 ^~~~~~~
	/home/blarsen/Documents/fsf_build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.cp/class2.cc:58:3: note: type is given name 'Dbase' for linkage purposes by this typedef declaration
	} Dbase;
	  ^
	1 warning generated.
	UNTESTED: gdb.cp/class2.exp: failed to prepare

	This can be silenced by adding -Wno-non-c-typedef-for-linkage for Clang
	11 or later.  The test shows no failures with this change.

	Approved-by: Tom Tromey <tom@tromey.com>

2022-11-11  Jan Beulich  <jbeulich@suse.com>

	gas: accept custom ".linefile <n> ."
	While .linefile is generally intended for gas internal use only, its use
	in a source file would better not result in an internal error. Give use
	of it outside of any macro(-like) construct the meaning of restoring the
	original (physical) input file name.

	x86: drop stray IsString from PadLock insns
	The need for IsString on the PadLock insns went away with the
	introduction of RepPrefixOk. Drop these leftovers.

	x86: drop duplicate sse4a entry from cpu_arch[]
	Of the two instances the first is correct in using ANY_SSE4A as 3rd
	argument to SUBARCH(), so drop the wrong/redundant/dead 2nd one.

2022-11-11  Alan Modra  <amodra@gmail.com>

	PR28834, PR26946 sanity checking section size
	This patch provides a new function to sanity check section sizes.
	It's mostly extracted from what we had in bfd_get_full_section_contents
	but also handles compressed debug sections.
	Improvements are:
	- section file offset is taken into account,
	- added checks that a compressed section can be read from file.

	The function is then used when handling multiple .debug_* sections
	that need to be read into a single buffer, to sanity check sizes
	before allocating the buffer.

		PR 26946, PR 28834
		* Makefile.am (LIBBFD_H_FILES): Add section.c.
		* compress.c (bfd_get_full_section_contents): Move section size
		sanity checks..
		* section.c (_bfd_section_size_insane): ..to here.  New function.
		* dwarf2.c (read_section): Use _bfd_section_size_insane.
		(_bfd_dwarf2_slurp_debug_info): Likewise.
		* Makefile.in: Regenerate.
		* libbfd.h: Regenerate.

2022-11-11  Alan Modra  <amodra@gmail.com>

	Sanity check SHT_MIPS_OPTIONS size
		* elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Use
		bfd_malloc_and_get_section to read contents of .MIPS.options.

	Re: gold: add --compress-debug-sections=zstd [PR 29641]
	Fix the following:
	compressed_output.cc:86:8: error: assignment of read-only variable ‘size’
	   86 |   size = ZSTD_compress(*compressed_data + header_size, size, uncompressed_data,

2022-11-11  Fangrui Song  <maskray@google.com>

	gold: add --compress-debug-sections=zstd [PR 29641]
	This option compresses output debug sections with zstd and sets ch_type
	to ELFCOMPRESS_ZSTD.  Latest gdb and lldb support ELFCOMPRESS_ZSTD.

	There will be an error if zstd is not enabled at configure time.

	    error: --compress-debug-sections=zstd: gold is not built with zstd support

2022-11-11  Fangrui Song  <maskray@google.com>

	gold, dwp: support zstd compressed input debug sections [PR 29641]
	This feature is enabled if config/zstd.m4 uses zstd.

2022-11-11  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: fix typo in configure.ac
	gprofng/ChangeLog
	2022-11-10  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		* configure.ac: Fix typo in redirect operator.
		* configure: Rebuild.

2022-11-11  Vladislav Khmelevsky  <och95@yandex.ru>

	Fix adrp distance check
	gold/
		* aarch64.cc (aarch64_valid_for_adrp_p): Shift offset
		as a signed number.

2022-11-11  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-10  Mike Frysinger  <vapier@gentoo.org>

	sim: v850: rename v850.dc to align with other ports
	Other arches use the .dc extension for the instruction decode table.

	sim: igen: fix hang when decoding boolean rule constants
	The parser for boolean rules fails to skip over the , separator in
	the options which makes it hang forever.  No dc files in the tree
	use boolean rules atm which is why no one noticed.

	sim: igen: mark error func as noreturn since it exits

	sim: igen: mark output funcs with printf attribute
	... and fix the legitimate bug that it catches.

	sim: igen: constify various func arguments

	sim: ppc: rename ppc-instructions to powerpc.igen
	To make it clear this is an input to the igen tool, rename it with an
	igen extension.  This matches the other files in the ppc dir (altivec
	& e500 igen files), and the other igen ports (mips, mn10300, v850).

2022-11-10  H.J. Lu  <hjl.tools@gmail.com>

	i386: Check invalid (%dx) usage
	(%dx) isn't a valid memory address in any modes.  It is used as a special
	memory operand for input/output port address in AT&T syntax and should
	only be used with input/output instructions.  Update i386_att_operand to
	set i.input_output_operand to true for (%dx) and issue an error if (%dx)
	is used with non-input/output instructions.

		PR gas/29751
		* config/tc-i386.c (_i386_insn): Add input_output_operand.
		(md_assemble): Issue an error if input/output memory operand is
		used with non-input/output instructions.
		(i386_att_operand): Set i.input_output_operand to true for
		(%dx).
		* testsuite/gas/i386/inval.l: Updated.
		* testsuite/gas/i386/x86-64-inval.l: Likewise.
		* testsuite/gas/i386/inval.s: Add tests for invalid (%dx) usage.
		* testsuite/gas/i386/x86-64-inval.s: Likewise.

2022-11-10  Simon Marchi  <simon.marchi@efficios.com>

	gdb: make "start" breakpoint inferior-specific
	I saw this failure on a CI:

	    (gdb) add-inferior
	    [New inferior 2]
	    Added inferior 2
	    (gdb) PASS: gdb.threads/vfork-multi-inferior.exp: method=non-stop: add-inferior
	    inferior 2
	    [Switching to inferior 2 [<null>] (<noexec>)]
	    (gdb) PASS: gdb.threads/vfork-multi-inferior.exp: method=non-stop: inferior 2
	    kill
	    The program is not being run.
	    (gdb) file /home/jenkins/workspace/binutils-gdb_master_linuxbuild/platform/jammy-amd64/target_board/unix/tmp/tmp.GYATAXR8Ku/gdb/testsuite/outputs/gdb.threads/vfork-multi-inferior/vfork-multi-inferior-sleep
	    Reading symbols from /home/jenkins/workspace/binutils-gdb_master_linuxbuild/platform/jammy-amd64/target_board/unix/tmp/tmp.GYATAXR8Ku/gdb/testsuite/outputs/gdb.threads/vfork-multi-inferior/vfork-multi-inferior-sleep...
	    (gdb) run &
	    Starting program: /home/jenkins/workspace/binutils-gdb_master_linuxbuild/platform/jammy-amd64/target_board/unix/tmp/tmp.GYATAXR8Ku/gdb/testsuite/outputs/gdb.threads/vfork-multi-inferior/vfork-multi-inferior-sleep
	    (gdb) PASS: gdb.threads/vfork-multi-inferior.exp: method=non-stop: run inferior 2
	    inferior 1
	    [Switching to inferior 1 [<null>] (<noexec>)]
	    (gdb) PASS: gdb.threads/vfork-multi-inferior.exp: method=non-stop: inferior 1
	    kill
	    The program is not being run.
	    (gdb) file /home/jenkins/workspace/binutils-gdb_master_linuxbuild/platform/jammy-amd64/target_board/unix/tmp/tmp.GYATAXR8Ku/gdb/testsuite/outputs/gdb.threads/vfork-multi-inferior/vfork-multi-inferior
	    Reading symbols from /home/jenkins/workspace/binutils-gdb_master_linuxbuild/platform/jammy-amd64/target_board/unix/tmp/tmp.GYATAXR8Ku/gdb/testsuite/outputs/gdb.threads/vfork-multi-inferior/vfork-multi-inferior...
	    (gdb) break should_break_here
	    Breakpoint 1 at 0x11b1: file /home/jenkins/workspace/binutils-gdb_master_linuxbuild/platform/jammy-amd64/target_board/unix/src/binutils-gdb/gdb/testsuite/gdb.threads/vfork-multi-inferior.c, line 25.
	    (gdb) PASS: gdb.threads/vfork-multi-inferior.exp: method=non-stop: break should_break_here
	    [Thread debugging using libthread_db enabled]
	    Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
	    start
	    Temporary breakpoint 2 at 0x11c0: -qualified main. (2 locations)
	    Starting program: /home/jenkins/workspace/binutils-gdb_master_linuxbuild/platform/jammy-amd64/target_board/unix/tmp/tmp.GYATAXR8Ku/gdb/testsuite/outputs/gdb.threads/vfork-multi-inferior/vfork-multi-inferior
	    [Thread debugging using libthread_db enabled]
	    Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

	    Thread 2.1 "vfork-multi-inf" hit Temporary breakpoint 2, main () at /home/jenkins/workspace/binutils-gdb_master_linuxbuild/platform/jammy-amd64/target_board/unix/src/binutils-gdb/gdb/testsuite/gdb.threads/vfork-multi-inferior-sleep.c:23
	    23	  sleep (30);
	    (gdb) FAIL: gdb.threads/vfork-multi-inferior.exp: method=non-stop: start inferior 1

	What happens is:

	 1. We start inferior 2 with "run&", it runs very slowly, takes time to
	    get to main
	 2. We switch to inferior 1, and run "start"
	 3. The temporary breakpoint inserted by "start" applies to all inferiors
	 4. Inferior 2 hits that breakpoint and GDB reports that hit

	To avoid this, breakpoints inserted by "start" should be
	inferior-specific.  However, we don't have a nice way to make
	inferior-specific breakpoints yet.  It's possible to make
	pspace-specific breakpoints (for example how the internal_breakpoint
	constructor does) by creating a symtab_and_line manually.  However,
	inferiors can share program spaces (usually on particular embedded
	targets), so we could have a situation where two inferiors run the same
	code in the same program space.  In that case, it would just not be
	possible to insert a breakpoint in one inferior but not the other.

	A simple solution that should work all the time is to add a condition to
	the breakpoint inserted by "start", to check the inferior reporting the
	hit is the expected one.  This is what this patch implements.

	Add a test that does:

	 - start in background inferior 1 that sleeps before reaching its main
	   function (using a sleep in a global C++ object's constructor)
	 - start inferior 2 with the "start" command, which also sleeps before
	   reaching its main function
	 - validate that we hit the breakpoint in inferior 2

	Without the fix, we hit the breakpoint in inferior 1 pretty much all the
	time.  There could be some unfortunate scheduling causing the test not
	to catch the bug, for instance if the scheduler decides not to schedule
	inferior 1 for a long time, but it would be really rare.  If the bug is
	re-introduced, the test will catch it much more often than not, so it
	will be noticed.

	Reviewed-By: Bruno Larsen <blarsen@redhat.com>
	Approved-By: Pedro Alves <pedro@palves.net>
	Change-Id: Ib0148498a476bfa634ed62353c95f163623c686a

2022-11-10  Bruno Larsen  <blarsen@redhat.com>

	gdb: Fix regressions caused by 041de3d73aa121f2ff0c077213598963bfb34b79
	Commit 041de3d73aa changed the output format of all error messages when
	GDB couldn't determine a compatible overload for a given function, but
	it was only supposed to change if the failure happened due to incomplete
	types. This commit removes the stray . that was added

2022-11-10  Aaron Merey  <amerey@redhat.com>

	gdb/debuginfod: Improve progress updates
	If the download size is known, a progress bar is displayed along with
	the percentage of completion and the total download size.

	  Downloading separate debug info for /lib/libxyz.so
	  [############                                      ]  25% (10.01 M)

	If the download size is not known, a progress indicator is displayed
	with a ticker ("###") that moves across the screen at a rate of 1 tick
	every 0.5 seconds.

	  Downloading separate debug info for /lib/libxyz.so
	  [         ###                                                      ]

	If the output stream is not a tty, batch mode is enabled, the screen is
	too narrow or width has been set to 'unlimited', then only a static
	description of the download is printed. No bar or ticker is displayed.

	  Downloading separate debug info for /lib/libxyz.so...

	In any case, if the size of the download is known at the time the
	description is printed then it will be included in the description.

	  Downloading 10.01 MB separate debug info for /lib/libxyz.so...

2022-11-10  Simon Marchi  <simon.marchi@efficios.com>

	gdb: add special handling for frame level 0 in frame_info_ptr
	I noticed this problem while preparing the initial submission for the
	ROCm GDB port.  One particularity of this patch set is that it does not
	support unwinding frames, that requires support of some DWARF extensions
	that will come later.  It was still possible to run to a breakpoint and
	print frame #0, though.

	When rebasing on top of the frame_info_ptr work, GDB started tripping on
	a prepare_reinflate call, making it not possible anymore to event print
	the frame when stopping on a breakpoint.  One thing to know about frame
	0 is that its id is lazily computed when something requests it through
	get_frame_id.  See:

	  https://gitlab.com/gnutools/binutils-gdb/-/blob/23912acd402f5af9caf91b257e5209ec4c58a09c/gdb/frame.c#L2070-2080

	So, up to that prepare_reinflate call, frame 0's id was not computed,
	and prepare_reinflate, calling get_frame_id, forces it to be computed.
	Computing the frame id generally requires unwinding the previous frame,
	which with my ROCm GDB patch fails.  An exception is thrown and the
	printing of the frame is simply abandonned.

	Regardless of this ROCm GDB problem (which is admittedly temporary, it
	will be possible to unwind with subsequent patches), we want to avoid
	prepare_reinflate to force the computing of the frame id, for the same
	reasons we lazily compute it in the first place.

	In addition, frame 0's id is subject to change across a frame cache
	reset.  This is why save_selected_frame and restore_selected_frame have
	special handling for frame 0:

	  https://gitlab.com/gnutools/binutils-gdb/-/blob/23912acd402f5af9caf91b257e5209ec4c58a09c/gdb/frame.c#L1841-1863

	For this last reason, we also need to handle frame 0 specially in
	prepare_reinflate / reinflate.  Because the frame id of frame 0 can
	change across a frame cache reset, we must not rely on the frame id from
	that frame to reinflate it.  We should instead just re-fetch the current
	frame at that point.

	This patch adds a frame_info_ptr::m_cached_level field, set in
	frame_info_ptr::prepare_reinflate, so we can tell if a frame is frame 0.
	There are cases where a frame_info_ptr object wraps a sentinel frame,
	for which frame_relative_level returns -1, so I have chosen the value -2
	to represent "invalid frame level", for when the frame_info_ptr object
	is empty.

	In frame_info_ptr::prepare_reinflate, only cache the frame id if the
	frame level is not 0.  It's fine to cache the frame id for the sentinel
	frame, it will be properly handled by frame_find_by_id later.

	In frame_info_ptr::reinflate, if the frame level is 0, call
	get_current_frame to get the target's current frame.  Otherwise, use
	frame_find_by_id just as before.

	This patch should not have user-visible changes with upstream GDB.  But
	it will avoid forcing the computation of frame 0's when calling
	prepare_reinflate.  And, well, it fixes the upcoming ROCm GDB patch
	series.

	Change-Id: I176ed7ee9317ddbb190acee8366e087e08e4d266
	Reviewed-By: Bruno Larsen <blarsen@redhat.com>

2022-11-10  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: add missing prepare_reinflate call in print_frame_info
	print_frame_info calls frame_info_ptr::reinflate, but not
	frame_info_ptr::prepare_reinflate, add the call to prepare_reinflate.
	It works right now, because all callers of print_frame_info that could
	possibly lead to the pretty printers being called, and the frame_info
	objects being invalidated, do call prepare_reinflate themselves.  And
	since the cached frame id is copied when passing a frame_info_ptr by
	value, print_frame_info does have a cached frame id on entry.  So
	technically, this change isn't needed.  But I don't think it's good for
	a function to rely on its callers to have called prepare_reinflate, if
	it intends to call reinflate.

	Change-Id: Ie332b2d5479aef46f83fdc1120c7c83f4e84d1b0
	Reviewed-By: Bruno Larsen <blarsen@redhat.com>

2022-11-10  Simon Marchi  <simon.marchi@efficios.com>

	gdb: use frame_id_p instead of comparing to null_frame_id in frame_info_ptr::reinflate
	The assertion

	    gdb_assert (m_cached_id != null_frame_id);

	is always true, as comparing equal to null_frame_id is always false
	(it's the first case in frame_id::operator==, not sure why it's not this
	way, but that's what it is).

	Replace the comparison with a call to frame_id_p.

	Approved-By: Tom Tromey <tom@tromey.com>
	Change-Id: I93986e6a85ac56353690792552e5b3b4cedec7fb

2022-11-10  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove manual frame_info reinflation code in backtrace_command_1
	With the following patch applied (gdb: use frame_id_p instead of
	comparing to null_frame_id in frame_info_ptr::reinflate), I would get:

	    $ ./gdb -q -nx --data-directory=data-directory testsuite/outputs/gdb.base/bt-selected-frame/bt-selected-frame -ex "b breakpt" -ex r -ex "bt full"
	    Reading symbols from testsuite/outputs/gdb.base/bt-selected-frame/bt-selected-frame...
	    Breakpoint 1 at 0x1131: file /home/smarchi/src/binutils-gdb/gdb/testsuite/gdb.base/bt-selected-frame.c, line 22.
	    Starting program: /home/smarchi/build/binutils-gdb/gdb/testsuite/outputs/gdb.base/bt-selected-frame/bt-selected-frame
	    [Thread debugging using libthread_db enabled]
	    Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

	    Breakpoint 1, breakpt () at /home/smarchi/src/binutils-gdb/gdb/testsuite/gdb.base/bt-selected-frame.c:22
	    22      }
	    #0  breakpt () at /home/smarchi/src/binutils-gdb/gdb/testsuite/gdb.base/bt-selected-frame.c:22
	    No locals.
	    /home/smarchi/src/binutils-gdb/gdb/frame-info.c:42: internal-error: reinflate: Assertion `frame_id_p (m_cached_id)' failed.

	This is because the code in backtrace_command_1 to manually reinflate
	`fi` steps overs frame_info_ptr's toes.

	When calling

	    fi.prepare_reinflate ();

	`fi` gets properly filled with the cached frame id.  But when this
	happens:

	    fi = frame_find_by_id (frame_id);

	`fi` gets replaced by a brand new frame_info_ptr that doesn't have a
	cached frame id.  Then this is called without a cached frame id:

	    fi.reinflate ();

	That doesn't cause any problem currently, since

	 - the gdb_assert in the reinflate method doesn't actually do anything
	   (the following patch fixes that)
	 - `fi.m_ptr` will always be non-nullptr, since we just got it from
	   frame_find_by_id, so reinflate will not do anything, it won't try to
	   use m_cached_id

	Fix that by removing the code to manually re-fetch the frame.  That
	should be taken care of by frame_info_ptr::reinflate.

	Note that the old code checked if we successfully re-inflated the frame
	or not, and if not it did emit a warning.  The equivalent in
	frame_info_ptr::reinflate asserts that the frame has been successfully
	re-inflated.  It's not clear if / when this can happen, but if it can
	happen, we'll need to find a solution to this problem globally
	(everywhere a frame_info_ptr can be re-inflated), not just here.  So I
	propose to leave it like this, until it does become a problem.

	Reviewed-By: Bruno Larsen <blarsen@redhat.com>
	Change-Id: I07b783d94e2853e0a2d058fe7deaf04eddf24835

2022-11-10  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: move frame_info_ptr method implementations to frame-info.c
	I don't see any particular reason why the implementations of the
	frame_info_ptr object are in the header file.  It only seems to add some
	complexity.  Since we can't include frame.h in frame-info.h, we have to
	add declarations of functions defined in frame.c, in frame-info.h.  By
	moving the implementations to a new frame-info.c, we can avoid that.

	Change-Id: I435c828f81b8a3392c43ef018af31effddf6be9c
	Reviewed-By: Bruno Larsen <blarsen@redhat.com>
	Reviewed-By: Tom Tromey <tom@tromey.com>

2022-11-10  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: add prepare_reinflate/reinflate around print_frame_args in info_frame_command_core
	I noticed this crash:

	    $ ./gdb --data-directory=data-directory -nx -q \
	          testsuite/outputs/gdb.python/pretty-print-call-by-hand/pretty-print-call-by-hand \
		  -x testsuite/outputs/gdb.python/pretty-print-call-by-hand/pretty-print-call-by-hand.py \
		  -ex "b g" -ex r
	    (gdb) info frame
	    Stack level 0, frame at 0x7fffffffdd80:
	     rip = 0x555555555160 in g
	        (/home/simark/src/binutils-gdb/gdb/testsuite/gdb.python/pretty-print-call-by-hand.c:41); saved rip = 0x5555555551a3
	     called by frame at 0x7fffffffdda0
	     source language c.
	     Arglist at 0x7fffffffdd70, args: mt=mytype is 0x555555556004 "hello world",
	        depth=10

	    Fatal signal: Segmentation fault

	This is another case of frame_info being invalidated under a function's
	feet.  The stack trace when the frame_info get invalidated looks like:

	    ... many frames to pretty print the arg, that eventually invalidate the frame_infos ...
	    #35 0x00005568d0a8ab24 in print_frame_arg (fp_opts=..., arg=0x7ffc3216bcb0) at /home/simark/src/binutils-gdb/gdb/stack.c:489
	    #36 0x00005568d0a8cc75 in print_frame_args (fp_opts=..., func=0x621000233210, frame=..., num=-1, stream=0x60b000000300)
	        at /home/simark/src/binutils-gdb/gdb/stack.c:898
	    #37 0x00005568d0a9536d in info_frame_command_core (fi=..., selected_frame_p=true) at /home/simark/src/binutils-gdb/gdb/stack.c:1682

	print_frame_args knows that print_frame_arg can invalidate frame_info
	objects, and therefore calls prepare_reinflate/reinflate.  However,
	info_frame_command_core has a separate frame_info_ptr instance (it is
	passed by value / copy).  So info_frame_command_core needs to know that
	print_frame_args can invalidate frame_info objects, and therefore needs
	to prepare_reinflate/reinflate as well.  Add those calls, and enhance
	the gdb.python/pretty-print-call-by-hand.exp test to test that command.

	Reviewed-By: Bruno Larsen <blarsen@redhat.com>
	Change-Id: I9edaae06d62e97ffdb30938d364437737238a960

2022-11-10  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: clear other.m_cached_id in frame_info_ptr's move ctor
	We do it in the move assignment operator, so I think it makes sense to
	do it here too for consistency.  I don't think it's absolutely necessary
	to clear the other object's fields (in other words, copy constructor and
	move constructor could be the same), as there is no exclusive resource
	being transfered.  The important thing is to leave the moved-from object
	in an unknown, but valid state.  But still, I think that clearing the
	fields of the moved-from object is not a bad idea, it helps ensure we
	don't rely on the moved-from object after.

	Change-Id: Iee900ff9d25dad51d62765d694f2e01524351340
	Reviewed-By: Bruno Larsen <blarsen@redhat.com>

2022-11-10  Bruno Larsen  <blarsen@redhat.com>

	gdb/c++: Improve error messages in overload resolution
	When resolving overloaded functions, GDB relies on knowing relationships
	between types, i.e. if a type inherits from another. However, some
	compilers may not add complete information for given types as a way to
	reduce unnecessary debug information. In these cases, GDB would just say
	that it couldn't resolve the method or function, with no extra
	information.

	The problem is that sometimes the user may not know that the type
	information is incomplete, and may just assume that there is a bug in
	GDB. To improve the user experience, we attempt to detect if the
	overload match failed because of an incomplete type, and warn the user
	of this.

	This commit also adds a testcase confirming that the message is only
	triggered in the correct scenario. This test was not developed as an
	expansion of gdb.cp/overload.cc because it needed the dwarf assembler,
	and porting all of overload.cc seemed unnecessary.

	Approved-By: Tom Tromey <tom@tromey.com>

2022-11-10  Bruno Larsen  <blarsen@redhat.com>

	gdb/testsuite: allowed for function_range to deal with mangled functions
	When calling get_func_info inside a test case, it would cause failures
	if the function was printed using a C++ style mangled name. The current
	patch fixes this by allowing for mangled names along with the current
	rules.

	Approved-By: Tom Tromey <tom@tromey.com>

2022-11-10  Clément Chigot  <chigot@adacore.com>

	ld/testsuite: skip ld-size when -shared is not supported
	ld/ChangeLog:

	        * testsuite/ld-size/size.exp: Skip when -shared is not
		supported.

2022-11-10  Alan Modra  <amodra@gmail.com>

	mach-o reloc size overflow
		* mach-o.c (bfd_mach_o_canonicalize_reloc): Set bfd_error on
		multiply overflow.

2022-11-10  Alan Modra  <amodra@gmail.com>

	Sanity check reloc count in get_reloc_upper_bound
	The idea here is the stop tools from allocating up to 32G per section
	for the arelent pointer array, only to find a little later that the
	section reloc count was fuzzed.  This usually doesn't hurt much (on
	systems that allow malloc overcommit) except when compiled with asan.

	We already do this for ELF targets, and while fixing the logic
	recently I decided other targets ought to do the same.

		* elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Sanity check
		section reloc count against file size.
		* mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
		* aoutx.h (get_reloc_upper_bound): Likewise, and don't duplicate
		check done in bfd_get_reloc_upper_bound.
		* pdp11.c (get_reloc_upper_bound): Likewise.
		* coffgen.c (coff_get_reloc_upper_bound): Likewise.

2022-11-10  Lancelot SIX  <lancelot.six@amd.com>

	gdb/testsuite: Fix rtld-step-nodebugsym.exp
	The test case introduced in bafcc335266 (Fix stepping in rtld without
	debug symbol) fails on some systems as reported by PR/29768.  This can
	be seen if the system does not have debug info for the libc:

	  (gdb) step^M
	  Single stepping until exit from function main,^M
	  which has no line number information.^M
	  hello world[Inferior 1 (process 48203) exited normally]^M
	  (gdb) PASS: gdb.base/rtld-step-nodebugsym.exp: step
	  continue^M
	  The program is not being run.^M
	  (gdb) FAIL: gdb.base/rtld-step-nodebugsym.exp: continue until exit (the program is no longer running)

	Without glibc debug info, GDB steps until the program finishes, and
	then "gdb_continue_to_end" fails.

	As this test was designed to check that GDB does not crash in the "step"
	command, the continue does not carry real meaning to the test.

	Replace it by "print 0" so we still check that after the step command
	GDB is still alive, which is what we care about.

	Tested on Ubuntu-22.04 x86_64, with and without libc6-dbg.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29768
	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-11-10  Mike Frysinger  <vapier@gentoo.org>

	sim: ppc: drop old makefile fragment
	Support for these files was dropped almost 30 years ago, but the ppc
	arch was missed.  Clean that up now too.

	sim: ppc: drop support for dgen -L option
	Nothing passes this to dgen, and even if it did, nothing would happen
	because the generated spreg.[ch] files don't include any references
	back to the original data table.  So drop it to simplify.

	sim: ppc: collapse is_readonly & length switch tables heavily
	Since we know we'll return 0 by default, we don't have to output case
	statements for readonly or length fields whose values are also zero.
	This is the most common case by far and thus generates a much smaller
	switch table in the end.

2022-11-10  Mike Frysinger  <vapier@gentoo.org>

	sim: ppc: collapse is_valid switch table more
	Instead of writing:
	  case 1:
	    return 1;
	  case 2:
	    return 1;
	  ...etc...

	Output a single return so we get:
	  case 1:
	  case 2:
	  case ...
	    return 1;

	This saves ~100 lines of code.  Hopefully the compiler was already
	smart enough to optimize to the same code, but if not, this probably
	helps there too :).

2022-11-10  Mike Frysinger  <vapier@gentoo.org>

	sim: ppc: pull default switch return out
	This saves a single line for the same result.  By itself, it's not
	interesting, but we can further optimize the generated output and
	completely omit the switch table in some cases.  Which we'll do in
	follow up commits.

	sim: ppc: constify spreg table
	This internal table is only ever read, so constify it.

2022-11-10  Mark Harmstone  <mark@harmstone.com>

	ld: Add module information substream to PDB files

2022-11-10  Luis Machado  <luis.machado@arm.com>

	[opcodes/arm] Fix potential null pointer dereferences
	  PR tdep/29598

	  As pointed out in the bug ticket, we have a couple potential null pointer
	  dereferencing situations. Harden those.

	  Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29598

2022-11-10  Luis Machado  <luis.machado@arm.com>

	[gdb/aarch64] Use safer memory read routines
	  PR tdep/28796

	  As reported, we are using some memory read routines that don't handle read
	  errors gracefully. Convert those to use the safe_* versions if available.

	  This allows the code to handle those read errors in a more sensible way.

	  Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28796

2022-11-10  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-09  Lancelot SIX  <lancelot.six@amd.com>

	Fix stepping in rtld without debug symbol
	Commit be6276e0aed "Allow debugging of runtime loader / dynamic linker"
	introduced a small regression when stepping into the runtime loader /
	dynamic linker from function we do not have debug information for.  This
	is reported in PR/29747.

	This can be shown by the following example (given by Simon Marchi in
	buzilla bug report):

	    $ cat test.c
	    #include <stdio.h>

	    int main()
	    {
	      printf("Hi\n");
	      return 0;
	    }
	    $ gcc test.c -O0 -o test
	    $ ./gdb -q -nx --data-directory=data-directory test -ex start -ex s
	    Reading symbols from test...
	    (No debugging symbols found in test)
	    Temporary breakpoint 1 at 0x1151
	    Starting program: .../binutils-gdb/gdb/test
	    [Thread debugging using libthread_db enabled]
	    Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

	    Temporary breakpoint 1, 0x0000555555555151 in main ()
	    Single stepping until exit from function main,
	    which has no line number information.
	    /home/smarchi/src/binutils-gdb/gdb/infrun.c:6960:64: runtime error: member call on null pointer of type 'struct symbol'

	    The crash happens here:

	    #0  __sanitizer::Die () at ../../../../src/libsanitizer/sanitizer_common/sanitizer_termination.cpp:50
	    #1  0x00007ffff5dd7128 in __ubsan::__ubsan_handle_type_mismatch_v1_abort (Data=<optimized out>, Pointer=<optimized out>) at ../../../../src/libsanitizer/ubsan/ubsan_handlers.cpp:148
	    #2  0x000055556183e1a7 in process_event_stop_test (ecs=0x7fffffffccd0) at .../binutils-gdb/gdb/infrun.c:6960
	    #3  0x0000555561838ea4 in handle_signal_stop (ecs=0x7fffffffccd0) at .../binutils-gdb/gdb/infrun.c:6615
	    #4  0x000055556182f77b in handle_inferior_event (ecs=0x7fffffffccd0) at .../binutils-gdb/gdb/infrun.c:5866

	When evaluating:

	    6956   if (execution_direction != EXEC_REVERSE
	    6957       && ecs->event_thread->control.step_over_calls == STEP_OVER_UNDEBUGGABLE
	    6958       && in_solib_dynsym_resolve_code (ecs->event_thread->stop_pc ())
	    6959       && !in_solib_dynsym_resolve_code (
	    6961          ecs->event_thread->control.step_start_function->value_block ()
	    6962              ->entry_pc ()))

	we dereference, ecs->event_thread->control.step_start_function which is
	nullptr.

	This patch changes this condition so it evaluates to true if
	ecs->event_thread->control.step_start_function is nullptr since this
	matches the behaviour before be6276e0aed.

	Tested on ubuntu-22.04 x86_64.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29747
	Reviewed-By: Bruno Larsen <blarsen@redhat.com>
	Approved-By: Kevin Buettner <kevinb@redhat.com>

2022-11-09  Mike Frysinger  <vapier@gentoo.org>

	sim: igen: add missing newline to various error messages
	The error() function expects a trailing newline in its message.
	Most callers do this already, so adding it to the few that don't.

	sim: restore lstat & mkdir func checks
	When merging ppc configure checks into the top-level, these 2 funcs
	were accidentally dropped (probably due to incorrect resolution of
	conflicts).  Restore them since the ppc code utilizes them both.

	sim: ppc: drop obsolete USE_WIN32API check
	This controls only one thing: how to call mkdir().  The gnulib code
	already has a mkdir module that provides this exact logic for us, so
	punt the code entirely.

2022-11-09  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

	gdbserver: do not report btrace support if target does not announce it
	Gdbserver unconditionally reports support for btrace packets.  Do not
	report the support, if the underlying target does not say it supports
	it.  Otherwise GDB would query the server with btrace-related packets
	unnecessarily.

2022-11-09  Tom Tromey  <tromey@adacore.com>

	Allow 'ptype/o' for assembly
	PR exp/28359 points out that 'ptype/o' does not work when the current
	language is "asm".

	I tracked this down to a hard-coded list of languages in typeprint.c.
	This patch replaces this list with a method on 'language_defn'
	instead.  If all languages are ever updated to have this feature, the
	method could be removed; but in the meantime this lets each language
	control what happens.

	I looked at having each print_type method simply modify the flags
	itself, but this doesn't work very well with the feature that disables
	method-printing by default (but allows it via a flag).

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28359
	Approved-By: Andrew Burgess <aburgess@redhat.com>
	Approved-By: Keith Seitz <keiths@redhat.com>

2022-11-09  Mike Frysinger  <vapier@gentoo.org>

	sim: ppc: add missing parens with e500 macro
	This macro expansion was missing a set of outer-most parenthesis which
	some compilers would complain about depending on how the macro is used.
	This is just standard good macro hygiene too.

	sim: ppc: drop useless linking of helper tools
	We've never run these helper programs directly.  The igen program
	includes the relevant source files directly and runs the code that
	way.  So stop wasting developer CPU time linking programs that are
	never run.  We leave the rules in place for people who need to test
	and debug the specific bits of code every now & then.

2022-11-09  Jan Beulich  <jbeulich@suse.com>

	x86/Intel: don't accept malformed EXTRQ / INSERTQ
	Operand swapping was mistakenly suppressed when the first two operands
	were immediate ones, not taking into account overall operand count. This
	way EXTRQ / INSERTQ would have been accepted also with kind-of-AT&T
	operand order.

	For the testcase being extended, in order to not move around "GAS
	LISTING" expectations, suppress pagination.

2022-11-09  Alan Modra  <amodra@gmail.com>

	Re: Fuzzed files in archives
	Like commit ffbe89531c2e this avoids more silliness writing output
	that is going to be deleted.  bfd_close and bfd_close_all_done differ
	in that only the former calls _bfd_write_contents.

		* objcopy.c (copy_archive): Don't call bfd_close for elements
		that are going to be deleted, call bfd_close_all_done instead.
		Do the same for the archive itself.

2022-11-09  Christoph Müllner  <christoph.muellner@vrull.eu>

	RISC-V: xtheadfmemidx: Use fp register in mnemonics
	Although the encoding for scalar and fp registers is identical,
	we should follow common pratice and use fp register names
	when referencing fp registers.

	The xtheadmemidx extension consists of indirect load/store instructions
	which all load to or store from fp registers.
	Let's use fp register names in this case and adjust the test cases
	accordingly.

	gas/
	    * testsuite/gas/riscv/x-thead-fmemidx-fail.l: Updated since rd need to
	    be float register.
	    * testsuite/gas/riscv/x-thead-fmemidx-fail.s: Likewise.
	    * testsuite/gas/riscv/x-thead-fmemidx.d: Likewise.
	    * testsuite/gas/riscv/x-thead-fmemidx.s: Likewise.
	opcodes/
	    * riscv-opc.c (riscv_opcodes): Updated since rd need to be float register.

2022-11-09  H.J. Lu  <hjl.tools@gmail.com>

	ld: Always output local symbol for relocatable link
		PR ld/29761
		* elflink.c (elf_link_output_symstrtab): Don't skip local symbol
		in SEC_EXCLUDE section for relocatable link.

2022-11-09  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-08  Simon Marchi  <simon.marchi@efficios.com>

	gdb/linux-nat: get core count using /sys/devices/system/cpu/possible
	I get this test failure on my CI;

	  FAIL: gdb.base/info-os.exp: get process list

	The particularity of this setup is that builds are done in containers
	who are allocated 4 CPUs on a machine that has 40.  The code in
	nat/linux-osdata.c fails to properly fetch the core number for each
	task.

	linux_xfer_osdata_processes uses `sysconf (_SC_NPROCESSORS_ONLN)`, which
	returns 4, so it allocates an array of 4 integers.  However, the core
	numbers read from /proc/pid/task/tid/stat, by function
	linux_common_core_of_thread, returns a value anywhere between 0 and 39.
	The core numbers above 3 are therefore ignored, many processes end up
	with no core value, and the regexp in the test doesn't match (it
	requires an integer as the core field).

	The way this the CPUs are exposed to the container is that the container
	sees 40 CPUs "present" and "possible", but only 4 arbitrary CPUs
	actually online:

	    root@ci-node-jammy-amd64-04-08:~# cat /sys/devices/system/cpu/present
	    0-39
	    root@ci-node-jammy-amd64-04-08:~# cat /sys/devices/system/cpu/online
	    5,11,24,31
	    root@ci-node-jammy-amd64-04-08:~# cat /sys/devices/system/cpu/possible
	    0-39

	The solution proposed in this patch is to find out the number of
	possible CPUs using /sys/devices/system/cpu/possible.  In practice, this
	will probably always contain `0-N`, where N is the number of CPUs, minus
	one.  But the documentation [1] doesn't such guarantee, so I'll assume
	that it can contain a more complex range list such as `2,4-31,32-63`,
	like the other files in that directory can have.  The solution is to
	iterate over these numbers to find the highest possible CPU id, and
	use that that value plus one as the size of the array to allocate.

	[1] https://www.kernel.org/doc/Documentation/admin-guide/cputopology.rst

	Change-Id: I7abce2e43b000c1327fa94cd7b99d46e49d7ccf3

2022-11-08  Simon Marchi  <simon.marchi@efficios.com>

	gdbsupport, gdb: add read_text_file_to_string, use it in linux_common_core_of_thread
	I would like to add more code to nat/linux-osdata.c that reads an entire
	file from /proc or /sys and processes it as a string afterwards.  I
	would like to avoid duplicating the somewhat error-prone code that reads
	an entire file to a buffer.  I think we should have a utility function
	that does that.

	Add read_file_to_string to gdbsupport/filestuff.{c,h}, and make
	linux_common_core_of_thread use it.  I want to make the new function
	return an std::string, and because strtok doesn't play well with
	std::string (it requires a `char *`, std::string::c_str returns a `const
	char *`), change linux_common_core_of_thread to use std::string methods
	instead.

	Approved-By: Tom Tromey <tom@tromey.com>
	Change-Id: I1793fda72a82969c28b944a84acb953f74c9230a

2022-11-08  Peter Bergner  <bergner@linux.ibm.com>

	PowerPC: Add XSP operand define
	opcodes/
		* ppc-opc.c (XSP): New define.
		(powerpc_opcodes) <stxvp, stxvpx, pstxvp>: Use it.

2022-11-08  Tom de Vries  <tdevries@suse.de>

	[gdb/cli] Make quit really quit after remote connection closed
	Consider a hello world a.out, started using gdbserver:
	...
	$ gdbserver --once 127.0.0.1:2345 ./a.out
	Process ./a.out created; pid = 15743
	Listening on port 2345
	...
	that we can connect to using gdb:
	...
	$ gdb -ex "target remote 127.0.0.1:2345"
	Remote debugging using 127.0.0.1:2345
	Reading /home/vries/a.out from remote target...
	  ...
	0x00007ffff7dd4550 in _start () from target:/lib64/ld-linux-x86-64.so.2
	(gdb)
	...

	After that, we can for instance quit with confirmation:
	...
	(gdb) quit
	A debugging session is active.

	        Inferior 1 [process 16691] will be killed.

	Quit anyway? (y or n) y
	$
	...

	Or, kill with confirmation and quit:
	...
	(gdb) kill
	Kill the program being debugged? (y or n) y
	[Inferior 1 (process 16829) killed]
	(gdb) quit
	$
	...

	Or, monitor exit, kill with confirmation, and quit:
	...
	(gdb) monitor exit
	(gdb) kill
	Kill the program being debugged? (y or n) y
	Remote connection closed
	(gdb) quit
	$
	...

	But when doing monitor exit followed by quit with confirmation, we get the gdb
	prompt back, requiring us to do quit once more:
	...
	(gdb) monitor exit
	(gdb) quit
	A debugging session is active.

	        Inferior 1 [process 16944] will be killed.

	Quit anyway? (y or n) y
	Remote connection closed
	(gdb) quit
	$
	...

	So, the first quit didn't quit.  This happens as follows:
	- quit_command calls query_if_trace_running
	- a TARGET_CLOSE_ERROR is thrown
	- it's caught in remote_target::get_trace_status, but then
	  rethrown because it's TARGET_CLOSE_ERROR
	- catch_command_errors catches the error, at which point the quit command
	  has been aborted.

	The TARGET_CLOSE_ERROR is defined as:
	...
	  /* Target throwing an error has been closed.  Current command should be
	     aborted as the inferior state is no longer valid.  */
	  TARGET_CLOSE_ERROR,
	...
	so in a way this is expected behaviour.  But aborting quit because the inferior
	state (which we've already confirmed we're not interested in) is no longer
	valid, and having to type quit again seems pointless.

	Furthermore, the purpose of not catching errors thrown by
	query_if_trace_running as per commit 2f9d54cfcef ("make -gdb-exit call
	disconnect_tracing too, and don't lose history if the target errors on
	"quit""), was to make sure that error (_("Not confirmed.") had effect.

	Fix this in quit_command by catching only the TARGET_CLOSE_ERROR exception
	during query_if_trace_running and reporting it:
	...
	(gdb) monitor exit
	(gdb) quit
	A debugging session is active.

	        Inferior 1 [process 19219] will be killed.

	Quit anyway? (y or n) y
	Remote connection closed
	$
	...

	Tested on x86_64-linux.

	PR server/15746
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=15746
	Approved-By: Tom Tromey <tom@tromey.com>

2022-11-08  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Remove test-case from test name
	Remove test-cases from test-names, such that we don't have the redundant:
	...
	PASS: gdb.base/corefile.exp: backtrace in corefile.exp
	...
	but simply:
	...
	PASS: gdb.base/corefile.exp: backtrace
	...

	Fixed all instances found using:
	...
	$ grep ":.*:.*\.exp" gdb.sum
	...

	Tested on x86_64-linux.

2022-11-08  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix find_core_file for core named core
	With test-case gdb.base/bigcore.exp I run into:
	...
	(gdb) PASS: gdb.base/bigcore.exp: get inferior pid
	signal SIGABRT^M
	Continuing with signal SIGABRT.^M
	^M
	Program terminated with signal SIGABRT, Aborted.^M
	The program no longer exists.^M
	(gdb) PASS: gdb.base/bigcore.exp: signal SIGABRT
	UNTESTED: gdb.base/bigcore.exp: can't generate a core file
	...
	due to find_core_file returning "".

	There is a core file name core:
	...
	$ ls ./outputs/gdb.base/bigcore
	bigcore  bigcore.corefile  core  gdb.cmd.1  gdb.in.1  gdbserver.cmd.1
	...
	but it's not found.

	The problem is this statement:
	...
	    lappend files [list ${::testfile}.core core]
	...
	which adds a single list item "${::testfile}.core core".

	Fix this in the most readable way:
	...
	    lappend files ${::testfile}.core
	    lappend files core
	...

	Tested on x86_64-linux.

2022-11-08  Mike Frysinger  <vapier@gentoo.org>

	sim: mips: call Unpredictable instead of setting bogus values [PR sim/29276]
	The intention of this code seems to be to indicate that this insn
	should not be used and produces undefined behavior, so instead of
	setting registers to bogus values, call Unpredictable.  This fixes
	build warnings due to 32-bit/64-bit type conversions, and outputs
	a log message for users at runtime instead of silent corruption.

	Bug: https://sourceware.org/PR29276

2022-11-08  Mike Frysinger  <vapier@gentoo.org>

	sim: drop unused CORE_ADDR_TYPE
	This hasn't been used by gdb in decades, and doesn't make sense with
	a standalone sim program/library where the ABI is fixed.  So punt it
	to simplify the code.

2022-11-08  Haochen Jiang  <haochen.jiang@intel.com>

	x86: Correct wrong comments in vex_w_table
	Hi all,

	This wrong comment was introduced by previous AVX-VNNI-INT8 commit.

	Committed as obvious fix.

	BRs,
	Haochen

	opcodes/ChangeLog:

		* i386-dis.c (VEX_W_0F3851): Corrected from
		VEX_W_0F3851_P_0.

2022-11-08  Kong Lingling  <lingling.kong@intel.com>

	Support Intel RAO-INT
	gas/ChangeLog:

		* NEWS: Support Intel RAO-INT.
		* config/tc-i386.c: Add raoint.
		* doc/c-i386.texi: Document .raoint.
		* testsuite/gas/i386/i386.exp: Run RAO_INT tests.
		* testsuite/gas/i386/raoint-intel.d: New test.
		* testsuite/gas/i386/raoint.d: Ditto.
		* testsuite/gas/i386/raoint.s: Ditto.
		* testsuite/gas/i386/x86-64-raoint-intel.d: Ditto.
		* testsuite/gas/i386/x86-64-raoint.d: Ditto.
		* testsuite/gas/i386/x86-64-raoint.s: Ditto.

	opcodes/ChangeLog:

		* i386-dis.c (PREFIX_0F38FC): New.
		(prefix_table): Add PREFIX_0F38FC.
		* i386-gen.c: (cpu_flag_init): Add CPU_RAO_INT_FLAGS and
		CPU_ANY_RAO_INT_FLAGS.
		* i386-init.h: Regenerated.
		* i386-opc.h: (CpuRAO_INT): New.
		(i386_cpu_flags): Add cpuraoint.
		* i386-opc.tbl: Add RAO_INT instructions.
		* i386-tbl.h: Regenerated.

2022-11-08  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-07  Tom Tromey  <tromey@adacore.com>

	Silence libtool during link
	The switch to linking with libtool now shows a very long link line
	even when V=0.  This patch arranges to silence libtool in this
	situation.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-11-07  Simon Marchi  <simon.marchi@efficios.com>

	gdb: make lookup_selected_frame static
	Change-Id: Ide2749a34333110c7f0112b25852c78cace0d2b4

2022-11-07  Mike Frysinger  <vapier@gentoo.org>

	sim: riscv: add missing AC_MSG_RESULT call
	Previous commit in here forgot to include this.

	sim: v850: drop subdir configure logic
	We've been using this only to set the default word size to 32.  We
	can easily move this into the makefile via a -D compiler flag and
	clean up the build logic quite a bit.

	sim: mn10300: drop subdir configure logic
	We've been using this only to set the default word size to 32.  We
	can easily move this into the makefile via a -D compiler flag and
	clean up the build logic quite a bit.

	sim: or1k: drop subdir configure logic
	We've been using this only to set the default word size to 32.  We
	can easily move this into the makefile via a -D compiler flag and
	clean up the build logic quite a bit.

	sim: bpf: drop subdir configure logic
	We've been using this only to set the default word size to 64.  We
	can easily move this into the makefile via a -D compiler flag and
	clean up the build logic quite a bit.

	sim: riscv: drop subdir configure logic
	We've been using this only to set the default word size to 32-vs-64
	based on the $target.  We can easily merge this with the top-level
	configure script to clean things up a bit.

2022-11-07  Jose E. Marchesi  <jose.marchesi@oracle.com>

	gdb: link executables with libtool
	This patch changes the GDB build system in order to use libtool to
	link the several built executables.  This makes it possible to refer
	to libtool libraries (.la files) in CLIBS.

	As an application of the above,

	  BFD              now refers to ../libbfd/libbfd.la
	  OPCODES          now refers to ../opcodes/libopcodes.la
	  LIBBACKTRACE_LIB now refers to ../libbacktrace/libbacktrace.la
	  LIBCTF           now refers to ../libctf/libctf.la

	NOTE1: The addition of libtool adds a few new configure-time options
	       to GDB.  Among these, --enable-shared and --disable-shared, which were
	       previously ignored.  Now GDB shall honor these options when linking,
	       picking up the right version of the referred libtool libraries
	       automagically.

	NOTE2: I have not tested the insight build.

	NOTE3: For regenerating configure I used an environment with Autoconf
	       2.69 and Automake 1.15.1.  This should match the previously
	       used version as announced in the configure script.

	NOTE4: Now the installed shared objects libbfd.so, libopcodes.so and
	       libctf.so are used by gdb if binutils is installed with
	       --enable-shared.

	Testing performed:

	- --enable-shared and --disable-shared (the default in binutils) work
	  as expected: the linked executables link with the archive or shared
	  libraries transparently.

	- Makefile.in modified for EXEEXT = .exe.  It installs the binaries
	  just fine.  The installed gdb.exe runs fine.

	- Native build regtested in x86_64. No regressions found.

	- Cross build for aarch64-linux-gnu built to exercise
	  program_transform_name and friends.  The installed
	  aarch64-linux-gnu-gdb runs fine.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29372
	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-11-07  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: use a more unique name in gdb.mi/mi-breakpoint-multiple-locations.exp
	I see failures in this test, due to the function name "add" being too
	generic, and unexpected breakpoint locations being found in my
	libstdc++, such as (wrapped for readability):

	    {
	  	number="2.4",enabled="y",addr="0x00007ffff7d67e68",
	  	func="(anonymous namespace)::fast_float::bigint::add",
		file="/usr/src/debug/gcc/libstdc++-v3/src/c++17/fast_float/fast_float.h",
		fullname="/usr/src/debug/gcc/libstdc++-v3/src/c++17/fast_float/fast_float.h",
		line="1815", thread-groups=["i1"]
	    }

	Change the test to use a more unique name.

	Change-Id: I91de781be62d246eb41c73eaa410ebdd12633d1d

2022-11-07  Pedro Alves  <pedro@palves.net>

	Don't explicitly set clone child ptrace options
	linux_handle_extended_wait calls target_post_attach if we're handling
	a PTRACE_EVENT_CLONE, and libthread_db.so isn't active.
	target_post_attach just calls linux_init_ptrace_procfs to set the
	lwp's ptrace options.  However, this is completely unnecessary,
	because, as man ptrace [1] says, options are inherited:

	  "Flags are inherited by new tracees created and "auto-attached" via
	   active PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK, or PTRACE_O_TRACECLONE
	   options."

	This removes the unnecessary call.

	[1] - https://man7.org/linux/man-pages/man2/ptrace.2.html

	Approved-By: Simon Marchi <simon.marchi@efficios.com>
	Change-Id: I533eaa60b700f7e40760311fc0d344d0b3f19a78

2022-11-07  Mike Frysinger  <vapier@gentoo.org>

	sim: .gdbinit: generate for all arch subdirs
	This was being skipped for ports that had a recursive configure,
	but we want it for them too.

	sim: build: add a proper var for enabled arches
	The install code was using $SUBDIRS to track all enabled arches.  This
	works, but isn't great if we want to add a subdir that isn't an arch
	port, or as we merge the subdirs into the top-level.  Create a new var
	explicitly to track the list of enabled arches instead.

2022-11-07  Christophe Lyon  <christophe.lyon@arm.com>

	configure: require libzstd >= 1.4.0
	gas uses ZSTD_compressStream2 which is only available with libzstd >=
	1.4.0, leading to build errors when an older version is installed.

	This patch updates the check libzstd presence to check its version is
	>= 1.4.0. However, since gas seems to be the only component requiring
	such a recent version this may imply that we disable ZSTD support for
	all components although some would still benefit from an older
	version.

	I ran 'autoreconf -f' in all directories containing a configure.ac
	file, using vanilla autoconf-2.69 and automake-1.15.1. I noticed
	several errors from autoheader in readline, as well as warnings in
	intl, but they are unrelated to this patch.

	This should fix some of the buildbots.

	OK for trunk?

	Thanks,

	Christophe

2022-11-07  Clément Chigot  <chigot@adacore.com>

	ld/testsuite: skip tests related to -shared when disabled
	Call the helper function "check_shared_lib_support" to ensure -shared
	is enabled before launching ld-shared, ld-elfweak and ld-elfvers.
	This allows to catch custom targets explicitly disabling it.

	ld/ChangeLog:

		* testsuite/ld-elfvers/vers.exp: Call check_shared_lib_support.
		* testsuite/ld-elfweak/elfweak.exp: Likewise.
		* testsuite/ld-shared/shared.exp: Likewise.

2022-11-07  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Remove RV32EF conflict
	Despite that the RISC-V ISA Manual version 2.2 prohibited "RV32EF", later
	versions beginning with the version 20190608-Base-Ratified removed this
	restriction.  Because the 'E' extension is still a draft, the author chose
	to *just* remove the conflict (not checking the ISA version).

	Note that, because RV32E is only used with a soft-float calling convention,
	there's no valid official ABI for RV32EF.  It means, even if we can assemble
	a program with -march=rv32ef -mabi=ilp32e, floating-point registers are kept
	in an unmanaged state (outside ABI management).

	The purpose of this commit is to suppress unnecessary errors while parsing
	an ISA string and/or disassembling, not to allow hard-float with RVE.

	bfd/ChangeLog:

		* elfxx-riscv.c (riscv_parse_check_conflicts): Accept RV32EF
		because only older specifications disallowed it.

	gas/ChangeLog:

		* testsuite/gas/riscv/march-fail-rv32ef.d: Remove as not directly
		prohibited.
		* testsuite/gas/riscv/march-fail-rv32ef.l: Likewise.

2022-11-07  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-06  Mike Frysinger  <vapier@gentoo.org>

	sim: build: respect AM_MAKEFLAGS when entering subdirs
	This doesn't matter right now, but it will as we add more flags to
	the recursive make step to pass state down.

	sim: build: stop passing down SIM_PRIMARY_TARGET
	This was needed when the install step was run in subdirs, but now
	that we process that entirely in the top-level, we don't need to
	pass this down, so drop it.

2022-11-06  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-05  Tom Tromey  <tom@tromey.com>

	Deprecate MI version 1
	MI version 1 is long since obsolete.  Rather than remove it
	immediately (though I did send a patch for that), instead let's
	deprecate it in GDB 13 and then remove it for GDB 14.

	This version of the patch incorporates Simon's warning change, and
	Luis' recommendation to mention the gdb versions here.

2022-11-05  Mike Frysinger  <vapier@gentoo.org>

	sim: fix readline linkage
	Now that we link programs in the top dir instead of the arch subdir,
	update the readline library path to be relative to the top dir.

	sim: use libtool to install programs
	Now that we use libtool to link, we have to use it to install instead
	of keeping the manual logic so we don't install wrapper shell scripts.

	sim: bfin: move linux-fixed-code.h to top-level

2022-11-05  Mike Frysinger  <vapier@gentoo.org>

	sim: run: move linking into top-level
	Automake will run each subdir individually before moving on to the next
	one.  This means that the linking phase, a single threaded process, will
	not run in parallel with anything else.  When we have to link ~32 ports,
	that's 32 link steps that don't take advantage of parallel systems.  On
	my really old 4-core system, this cuts a multi-target build from ~60 sec
	to ~30 sec.  We eventually want to move all compile+link steps to this
	common dir anyways, so might as well move linking now for a nice speedup.

	We use noinst_PROGRAMS instead of bin_PROGRAMS because we're taking care
	of the install ourselves rather than letting automake process it.

2022-11-05  Mike Frysinger  <vapier@gentoo.org>

	sim: build: add uninstall support
	This never worked before, but adding it to the common top-level dir
	is pretty easy to do now that we're unified.

	sim: build: move install steps to the top-level
	We still have to maintain custom install rules due to how we rename
	arch-specific files with an arch prefix in their name, but we can at
	least unify the logic in the common dir.

	sim: cris: move rvdummy linking to top-level
	This is only used by `make check`, so we can move it out of the
	default build too.

	sim: build: add SIM_HW_CFLAGS to top-level build too
	This matches what we do with targets already.

	sim: drop unused SIM_HARDWARE variable
	This hasn't been used since the refactor way back in commit
	f872d0d643968c1101bb8c07b252edd54f626da2 ("Only enable H/W
	on some mips targets."), so punt it.

	sim: adjust sim_hw options style
	We use uppercase for other variables, and are already turning it to
	uppercase in the arch-subdir.mk, so convert it in the configure step.

	sim: ppc: drop unused /dev/zero logic
	Nothing in the tree checks this option, or has checked for decades.
	The pre-cvs-import ChangeLog suggests this was added & removed back
	then, but can't be sure as that history doesn't exist in the VCS.

	sim: ppc: delete unused host bitsize settings
	Nothing checks this define anywhere, so drop all the logic.  We don't
	want this to be a configure option in the first place as all such usage
	should be automatic & following proper types.

	sim: ppc: inline the sim-packages option
	This has only ever had a single option that's enabled by default.
	The objects it adds are pretty small and don't add overhead at
	runtime if it isn't used, so just enable it all the time to make
	the build code simpler.

2022-11-05  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-04  H.J. Lu  <hjl.tools@gmail.com>

	binutils: Run PR binutils/26160 test
	Update expected PR binutils/26160 test output for readelf out change
	and run PR binutils/26160 test.

		PR binutils/26160
		* testsuite/binutils-all/pr26160.r: Updated.
		* testsuite/binutils-all/readelf.exp: Run PR binutils/26160 test.

2022-11-04  Lancelot SIX  <lancelot.six@amd.com>

	[testsuite] gdb.base/dlmopen: Fix test name and use gdb_attach
	One test name in gdb.base/dlmopen.exp changes from run to run
	since it includes a process id:

	    PASS: gdb.base/dlmopen.exp: attach 3442682

	This is not convenient do diff gdb.sum files to compare test runs.

	Fix by using gdb_attach helper function to handle attaching to the
	process as it produce a constant test name.

	While at it also check gdb_attach's return value to only run the
	rest of the test if the attach was successful.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-11-04  Carl Love  <cel@us.ibm.com>

	PowerPC update comments for the MMA instruction name changes.
	The mnemonics for the pmxvf16ger*, pmxvf32ger*,pmxvf64ger*, pmxvi4ger8*,
	pmxvi8ger4*, and pmxvi16ger2* instructions were officially changed to
	pmdmxbf16ger*, pmdmxvf32ger*, pmdmxvf64ger*, pmdmxvi4ger8*, pmdmxvi8ger4*,
	pmdmxvi16ger* respectively.  The old mnemonics are still supported by the
	assembler as extended mnemonics.  The disassembler generates the new
	mnemonics.  The name changes occurred in commit:

	  commit bb98553cad4e017f1851153fa5de91f2cee98fb2
	  Author: Peter Bergner <bergner@linux.ibm.com>
	  Date:   Sat Oct 8 16:19:51 2022 -0500

	    PowerPC: Add support for RFC02658 - MMA+ Outer-Product Instructions

	    gas/
	            * config/tc-ppc.c (md_assemble): Only check for prefix opcodes.
	            * testsuite/gas/ppc/rfc02658.s: New test.
	            * testsuite/gas/ppc/rfc02658.d: Likewise.
	            * testsuite/gas/ppc/ppc.exp: Run it.

	    opcodes/
	            * ppc-opc.c (XMSK8, P_GERX4_MASK, P_GERX2_MASK, XX3GERX_MASK): New.
	            (powerpc_opcodes): Add dmxvi8gerx4pp, dmxvi8gerx4, dmxvf16gerx2pp,
	            dmxvf16gerx2, dmxvbf16gerx2pp, dmxvf16gerx2np, dmxvbf16gerx2,
	            dmxvi8gerx4spp, dmxvbf16gerx2np, dmxvf16gerx2pn, dmxvbf16gerx2pn,
	            dmxvf16gerx2nn, dmxvbf16gerx2nn, pmdmxvi8gerx4pp, pmdmxvi8gerx4,
	            pmdmxvf16gerx2pp, pmdmxvf16gerx2, pmdmxvbf16gerx2pp, pmdmxvf16gerx2np,
	            pmdmxvbf16gerx2, pmdmxvi8gerx4spp, pmdmxvbf16gerx2np, pmdmxvf16gerx2pn,
	            pmdmxvbf16gerx2pn, pmdmxvf16gerx2nn, pmdmxvbf16gerx2nn.

	This patch updates the comments in the various gdb files to reflect the
	name changes.  There are no functional changes made by this patch.

	The older instruction names are still used in the test
	gdb.reverse/ppc_record_test_isa_3_1.exp for backwards compatibility.

	Patch has been tested on Power 10 with no regressions.

2022-11-04  Carl Love  <cel@us.ibm.com>

	PowerPC fix for the gdb.arch/powerpc-power10.exp test.
	The mnemonics for the pmxvf16ger*, pmxvf32ger*,pmxvf64ger*, pmxvi4ger8*,
	pmxvi8ger4*, pmxvi16ger2* instructions were officially changed to
	pmdmxvf16ger*, pmdmxvf32ger*, pmdmxvf64ger*, pmdmxvi4ger8*, pmdmxvi8ger4*,
	pmdmxvi16ger* respectively.  The old mnemonics are still supported by the
	assembler as extended mnemonics.  The disassembler generates the new
	mnemonics.  The name changes occurred in commit:

	  commit bb98553cad4e017f1851153fa5de91f2cee98fb2
	  Author: Peter Bergner <bergner@linux.ibm.com>
	  Date:   Sat Oct 8 16:19:51 2022 -0500

	    PowerPC: Add support for RFC02658 - MMA+ Outer-Product Instructions

	    gas/
	            * config/tc-ppc.c (md_assemble): Only check for prefix opcodes.
	            * testsuite/gas/ppc/rfc02658.s: New test.
	            * testsuite/gas/ppc/rfc02658.d: Likewise.
	            * testsuite/gas/ppc/ppc.exp: Run it.

	    opcodes/
	            * ppc-opc.c (XMSK8, P_GERX4_MASK, P_GERX2_MASK, XX3GERX_MASK): New.
	            (powerpc_opcodes): Add dmxvi8gerx4pp, dmxvi8gerx4, dmxvf16gerx2pp,
	            dmxvf16gerx2, dmxvbf16gerx2pp, dmxvf16gerx2np, dmxvbf16gerx2,
	            dmxvi8gerx4spp, dmxvbf16gerx2np, dmxvf16gerx2pn, dmxvbf16gerx2pn,
	            dmxvf16gerx2nn, dmxvbf16gerx2nn, pmdmxvi8gerx4pp, pmdmxvi8gerx4,
	            pmdmxvf16gerx2pp, pmdmxvf16gerx2, pmdmxvbf16gerx2pp, pmdmxvf16gerx2np,
	            pmdmxvbf16gerx2, pmdmxvi8gerx4spp, pmdmxvbf16gerx2np, pmdmxvf16gerx2pn,
	            pmdmxvbf16gerx2pn, pmdmxvf16gerx2nn, pmdmxvbf16gerx2nn.

	The above commit results in about 224 failures on Power 10 since the
	disassembled names do not match the expected names in the test.  This
	patch updates the expected names in the test to match the values produced
	by the disassembler.

	This patch updates file gdb.arch/powerpc-power10.exp with the new expected
	values to the instructions.  The comment giving the name of the instruction
	for each binary value in the file gdb.arch/powerpc-power10.c is updated
	with the new name.   There are no functional changes in file
	gdb.arch/powerpc-power10.c.

2022-11-04  Carl Love  <cel@us.ibm.com>

	Powerpc fix for gdb.base/unwind-on-each-insn.exp
	The test disassembles function foo and searches for the line
	"End of assembler dump" to determing the last address in the function.  The
	assumption is the last instruction will be given right before the line
	"End of assembler dump".  This assumption fails on PowerPC.

	The PowerPC disassembly of the function foo looks like:
	 Dump of assembler code for function foo:
	#  => 0x00000000100006dc <+0>:     std     r31,-8(r1)
	#     0x00000000100006e0 <+4>:     stdu    r1,-48(r1)
	#     0x00000000100006e4 <+8>:     mr      r31,r1
	#     0x00000000100006e8 <+12>:    nop
	#     0x00000000100006ec <+16>:    addi    r1,r31,48
	#     0x00000000100006f0 <+20>:    ld      r31,-8(r1)
	#     0x00000000100006f4 <+24>:    blr
	#     0x00000000100006f8 <+28>:    .long 0x0
	#     0x00000000100006fc <+32>:    .long 0x0
	#     0x0000000010000700 <+36>:    .long 0x1000180
	#     End of assembler dump.

	The blr instruction is the last instruction in function foo.  The lines
	with .long following the blr instruction need to be ignored.

	This patch adds a new condition to the gdb_test_multiple "disassemble foo"
	test to ignore the lines with the .long.

	The patch has been tested on PowerPC and Intel X86-64.

2022-11-04  Jan Beulich  <jbeulich@suse.com>

	x86: adjust recently introduced testcases
	The issue addressed by 2c02c72c62d2 ("re: Support Intel AMX-FP16") has
	been introduced once again in a number of new tests.

2022-11-04  Nick Clifton  <nickc@redhat.com>

	Update release documentation with regard to uploading gprofng docs

2022-11-04  Bruno Larsen  <blarsen@redhat.com>

	gdb/testsuite: add KFAILs to gdb.reverse/step-reverse.exp
	Recent changes to gdb.reverse/step-reverse.exp revealed the latent bug
	PR record/29745, where we can't skip one funcion forward if we're using
	native-gdbserver. This commit just adds kfails to the test.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29745
	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-11-04  Andrew Burgess  <aburgess@redhat.com>

	opcodes/arm: silence compiler warning about uninitialized variable use
	After this commit:

	  commit 6576bffe6cbbb53c5756b2fccd2593ba69b74cdf
	  Date:   Thu Jul 7 13:43:45 2022 +0100

	      opcodes/arm: add disassembler styling for arm

	Some people were seeing their builds failing with complaints about a
	possible uninitialized variable usage.  I previously fixed an instance
	of this issue in this commit:

	  commit 2df82cd4b459fbc32120e0ad1ce19e26349506fe
	  Date:   Tue Nov 1 10:36:59 2022 +0000

	      opcodes/arm: silence compiler warning about uninitialized variable use

	which did fix the build problems that the sourceware buildbot was
	hitting, however, an additional instance of the same problem was
	brought to my attention, and that is fixed in this commit.

	Where commit 2df82cd4b4 fixed the uninitialized variable problem in
	print_mve_unpredictable, this commit fixes the same problem in
	print_mve_undefined.

	As with the previous commit, I don't believe we could really ever get
	an uninitialized variable usage, based on the current usage of the
	function, so I have just initialized the reason variable to "??".

2022-11-04  Mike Frysinger  <vapier@gentoo.org>

	sim: rx: drop unused $arch setting
	This is only needed for CGEN ports which RX isn't, so drop it.

2022-11-04  Mike Frysinger  <vapier@gentoo.org>

	sim: build: remove various obsolete generation dep variables
	These manual settings were necessary when we weren't doing automatic
	header dependency tracking.  That was changed a while ago, and we use
	automake now to do it all for us.  As a result, many of these vars
	aren't even referenced anymore.

	Further, some of the source file generation (e.g. .c files, or igen,
	or cgen outputs) were moved to the common automake build, and it takes
	care of dependency tracking for us with the object files.

2022-11-04  Mike Frysinger  <vapier@gentoo.org>

	sim: don't hardcode -ldl for SDL support
	Since we use AC_SEARCH_LIBS to find dlopen, we don't need to hardcode
	-ldl when using SDL ourselves.

2022-11-04  konglin1  <lingling.kong@intel.com>

	Support Intel AVX-NE-CONVERT
	gas/ChangeLog:

		* NEWS: Support Intel AVX-NE-CONVERT.
		* config/tc-i386.c: Add avx_ne_convert.
		* doc/c-i386.texi: Document .avx_ne_convert.
		* testsuite/gas/i386/i386.exp: Run AVX NE CONVERT tests.
		* testsuite/gas/i386/avx-ne-convert-intel.d: New test.
		* testsuite/gas/i386/avx-ne-convert.d: Ditto.
		* testsuite/gas/i386/avx-ne-convert.s: Ditto.
		* testsuite/gas/i386/x86-64-avx-ne-convert-intel.d: Ditto.
		* testsuite/gas/i386/x86-64-avx-ne-convert.d: Ditto.
		* testsuite/gas/i386/x86-64-avx-ne-convert.s: Ditto.

	opcodes/ChangeLog:

		* i386-dis.c (Mw): New.
		(PREFIX_VEX_0F3872): Ditto.
		(PREFIX_VEX_0F38B0_W_0): Ditto.
		(PREFIX_VEX_0F38B1_W_0): Ditto.
		(VEX_W_0F3872_P_1): Ditto.
		(VEX_W_0F38B0): Ditto.
		(VEX_W_0F38B1): Ditto.
		(prefix_table): Add PREFIX_VEX_0F3872, PREFIX_VEX_0F38B0_W_0,
		PREFIX_VEX_0F38B1_W_0.
		(vex_w_table): Add VEX_W_0F3872_P_1, VEX_W_0F38B0, VEX_W_0F38B1.
		* i386-gen.c (cpu_flag_init): Add CPU_AVX_NE_CONVERT_FLGAS and
		CPU_ANY_AVX_NE_CONVERT_FLAGS.
		(cpu_flags): Add CpuAVX_NE_CONVERT.
		* i386-init.h: Regenerated.
		* i386-opc.h (CpuAVX_NE CONVERT): New.
		(i386_cpu_flags): Add cpuavx_ne_convert.
		* i386-opc.tbl: Add Intel AVX-NE-CONVERT instructions.
		* i386-tbl.h: Regenerated.

2022-11-04  konglin1  <lingling.kong@intel.com>

	i386: Rename <xy> template.
	opcodes/
	            * i386-opc.tbl: Rename <xy> template for VEX insn with x/y suffix to <Vxy>.
		    Rename <xy> for EVEX insn with x/y suffix to <Exy>.

2022-11-04  Jojo R  <rjiejie@linux.alibaba.com>

	Support multiple .eh_frame sections
		This patch is based on MULTIPLE_FRAME_SECTIONS and EH_FRAME_LINKONCE,
		it allows backend to enable this feature and use '--gc-sections' simply.

		* gas/dw2gencfi.h (TARGET_MULTIPLE_EH_FRAME_SECTIONS): New.
		(MULTIPLE_FRAME_SECTIONS): Add TARGET_MULTIPLE_EH_FRAME_SECTIONS.
		* gas/dw2gencfi.c (EH_FRAME_LINKONCE): Add TARGET_MULTIPLE_EH_FRAME_SECTIONS.
		(is_now_linkonce_segment): Likewise.
		(get_cfi_seg): Create relocation info between .eh_frame.* and .text.* section.

		* bfd/elf-bfd.h (elf_backend_can_make_multiple_eh_frame): New.
		* bfd/elfxx-target.h (elf_backend_can_make_multiple_eh_frame): Likewise.
		* bfd/elflink.c (_bfd_elf_default_action_discarded): Add checking for
		elf_backend_can_make_multiple_eh_frame.

2022-11-04  Jojo R  <rjiejie@linux.alibaba.com>

	gas/doc/internals.texi: fix typo
		* gas/doc/internals.texi (md_emit_single_noop_insn):
		fix '@var missing closing brace'
		* gas/doc/internals.texi (Hash tables):
		fix '@menu reference to nonexistent node `Hash tables''

2022-11-04  Mike Frysinger  <vapier@gentoo.org>

	sim: drop -lm from SIM_EXTRA_LIBS
	We have configure tests for this in the top-level configure script
	to link this when necessary, so we don't need to explicitly list it
	for specific ports.

	sim: build: change AC_CHECK_LIB to AC_SEARCH_LIBS
	With more C libraries moving functions entirely into the main -lc,
	change the AC_CHECK_LIB calls to AC_SEARCH_LIBS so we look in there
	first and avoid extra linkage when possible.

	sim: build: drop duplicate $(LIBS) usage
	COMMON_LIBS is set to $(LIBS), and CONFIG_LIBS is set to that plus
	@LIBS@.  This leds to the values being used twice.  Inline the
	CONFIG_LIBS variable without @LIBS@ since it's used only once.

	sim: build: switch to bfd & opcodes libtool linker scripts
	Now that we use libtool to link, we don't need to duplicate all the
	libs that bfd itself uses.  This simplifies the configure & Makefile.

	sim: build: switch to libtool for linking
	The top-level already sets up a libtool script for the host, so use
	that when linking rather than invoking CC directly.  This will also
	happen when we (someday) move the building to pure automake.

2022-11-04  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-03  Mike Frysinger  <vapier@gentoo.org>

	sim: testsuite: fix cris stat3 in diff setups
	This test uses the test itself as an input to stating regular files.
	This gets funky though: when we run check in parallel, the output
	object dir is the subdir that matches the .exp file.  When we run
	with -j1, the output object dir is the sim builddir itself.

	The old test would append argv[0] to find the file, while the new
	test uses basename on it.  Each method works in only one of the
	aforementioned build scenarios.  Rather than complicate this any
	more, switch to a different file that we know will always exist:
	the Makefile.

2022-11-03  Mike Frysinger  <vapier@gentoo.org>

	sim: testsuite: fix cris badarch in multi-target builds
	This test assumes that /bin/sh will never be a CRIS ELF by way of
	assuming that the current bfd cannot load it (since a basic cris
	cross-compiler only understands CRIS ELFs).  In a multi-target
	build though, bfd understands just about every ELF out there, so
	we're able to read the /bin/sh format before failing at a diff
	point in the cris code.

	Let's switch to using / instead since it'll fail for a similar
	reason (at least similar enough for what this test is testing).

2022-11-03  Mike Frysinger  <vapier@gentoo.org>

	sim: cleanup unused SIM_EXTRA_CFLAGS
	We want to eventually delete this, so at least drop the empty ones.

	sim: m32c/rx: drop useless $(ENDLIST)
	This is used to allow for dangling \ in object lists, but these are the
	only ports that do it, and it isn't really necessary.  Punt it to keep
	the various makefiles harmonized.

	sim: mips: simplify fpu configure logic
	The configure code always defaults to HARD_FLOATING_POINT, so inline
	that value and drop redundant target checks as a result.

2022-11-03  Mike Frysinger  <vapier@gentoo.org>

	sim: erc32: link sis to run program
	The erc32 sim does a lot itself, including handling of the CLI.  It
	used to provide a run-compatible interface in the pre-nrun days, but
	it was dropped when the old run interface was punted.  Since the old
	commit 465fb143c87076b6416a8d0d5dd79bb016060fe3 ("sim: make nrun the
	default run program"), the erc32 run & sis programs have been the
	same, and erc32 hasn't provide a real run-compatible interface.

	Simplify this by linking the two programs via ln/cp instead of running
	the linking phase twice to produce the same result.  If/when we fix up
	the erc32 port to have a proper run interface, it should be easy to
	split these back apart into real programs.

	Note: the interf.o reference in here is a bit of a misdirect.  Since
	that object is placed into libsim.a, it's never been linked into the
	programs since the linker ignores objects that aren't referenced, and
	only gdb uses those symbols.

2022-11-03  Nick Clifton  <nickc@redhat.com>

	V850 Linker: do not complain about RWX segments.
		PR 29748
		* configure.tgt (ac_default_ld_warn_rwx_segments): Set to 0 for
		the V850.

2022-11-03  Mike Frysinger  <vapier@gentoo.org>

	sim: v850: switch to standard (high-level) trace defines
	The v850 port uses -DDEBUG to control whether to enable internal tracing.
	We already have such options via the common trace framework, and those
	can be controlled at build time via configure flags (which the v850 code
	currently cannot).  So switch it over to WITH_TRACE_ANY_P to simplify the
	v850 build code even if it doesn't (yet) respect any other trace options.

	sim: ppc: include copyright & license in --version
	This makes it match the other sim run programs and GNU tools.

	sim: update --version copyright year
	Probably should have done this 11 months ago ...

	sim: ppc: drop use of DATE & TIME
	No other tool does this, sim or otherwise, and it makes the ppc build
	non-reproducible.  Drop it to simplify & make reproducible.

2022-11-03  Bruno Larsen  <blarsen@redhat.com>

	gdb: Fix issue with Clang CLI macros
	Clang up to version 15 (current) adds macros that were defined in the
	command line or by "other means", according to the Dwarf specification,
	after the last DW_MACRO_end_file, instead of before the first
	DW_MACRO_start_file, as the specification dictates.  When GDB reads the
	macros after the last file is closed, the macros never end up "in scope"
	and so we can't print them.  This has been submitted as a bug to Clang
	developers (https://github.com/llvm/llvm-project/issues/54506), and PR
	macros/29034 was opened for GDB to keep track of this.

	Seeing as there is no expected date for it to be fixed, add a workaround
	for all current versions of Clang.  The workaround detects when
	the main file would be closed and if the producer is Clang, and turns
	that operation into a noop, so we keep a reference to the current_file
	as those macros are read.

	A test case was added to confirm the functionality, and the KFAIL for
	running gdb.base/macro-source-path when using clang.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29034
	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-11-03  Nick Clifton  <nickc@redhat.com>

	AVR Linker: Allow the start of the data region to be specified on the linker command line.  [Fix PR number in ChangeLog entry]
		PR 29741
		* scripttempl/avr.sc (__DATA_REGION_ORIGIN__): Define.  If a value
		has not been provided on the command line then use DATA_ORIGIN.
		(MEMORY): Use __DATA_REGION_ORIGIN__ as the start of the data region.

	AVR Linker: Allow the start of the data region to specified on the command line.
		PR 29471
		* scripttempl/avr.sc (__DATA_REGION_ORIGIN__): Define.  If a value
		has not been provided on the command line then use DATA_ORIGIN.
		(MEMORY): Use __DATA_REGION_ORIGIN__ as the start of the data region.

2022-11-03  Mike Frysinger  <vapier@gentoo.org>

	sim: move common flags to default AM_CPPFLAGS
	Since all host files we compile use these settings, move them out of
	libcommon.a and into the default AM_CPPFLAGS.  This has the effect of
	dropping the custom per-target automake rules.  Currently it saves us
	~150 lines, but since it's about ~8 lines per object, the overhead
	will increase quite a bit as we merge more files into a single build.

	This also changes the object output names, so we have to tweak the
	rules that were pulling in the common objects when linking.

2022-11-03  Mike Frysinger  <vapier@gentoo.org>

	sim: merge gnulib logic into the top-level
	We aren't using this just yet, but we will, so make it available to
	building of common sim files.

	sim: common: remove unused include paths
	A bunch of these paths don't include any headers, and most likely
	never will, so there's no real need to keep them.  This will let
	us harmonize paths with the top-level Makefile more easily, which
	will in turn make it easier to move more compile steps there.

2022-11-03  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-02  Christophe Lyon  <christophe.lyon@arm.com>

	arm: PR 29739 Fix typo where ';' should not have been replaced with '@'
	';' does not always indicate the start of a comment, and commit
	8cb6e17571f3fb66ccd4fa19f881602542cd06fc incorrectly replaced 3
	instances of ';' with '@' in expected diagnostics, leading to tests
	failures.

	This patch restores the original ';' as needed in these testcases.

	Fixes bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29739

2022-11-02  Mike Frysinger  <vapier@gentoo.org>

	sim: split CPPFLAGS between build & host
	In order to merge more common/ files into the top-level, we need to
	add more host flags to CPPFLAGS, and that conflicts with our current
	use with build-time tools.  So split them apart like we do with all
	other build flags to avoid the issue.

	sim: h8300: switch to cpu for state
	Rather than rely on pulling out the first cpu from the sim state
	for cpu state, pass down the active cpu that's already available.

	sim: common: change sim_{fetch,store}_register helpers to use void* buffers
	When reading/writing arbitrary data to the system's memory, the unsigned
	char pointer type doesn't make that much sense.  Switch it to void so we
	align a bit with standard C library read/write functions, and to avoid
	having to sprinkle casts everywhere.

2022-11-02  Jon Turney  <jon.turney@dronecode.org.uk>

	Fix Cygwin build after 20489cca
	Update code under __CYGWIN__ which accesses inferior process information
	which is now stored in windows_process_info rather than globals.

2022-11-02  Jon Turney  <jon.turney@dronecode.org.uk>

	Fix Cygwin build after bcb9251f
	Absent _UNICODE being defined (which gdb's Makefile doesn't do),
	windows.h will always define STARTUPINFO is as STARTUPINFOA, so this
	cast isn't correct when create_process expects a STARTUPINFOW
	parameter (i.e. in a Cygwin build).

	Instead write this as &info_ex.StartupInfo (which is always of the
	correct type).

2022-11-02  Jan Beulich  <jbeulich@suse.com>

	x86: drop bogus Tbyte
	Prior to commit 1cb0ab18ad24 ("x86/Intel: restrict suffix derivation")
	the Tbyte modifier on the FLDT and FSTPT templates was pointless, as
	No_ldSuf would have prevented it being accepted. Due to the special
	nature of LONG_DOUBLE_MNEM_SUFFIX said commit, however, has led to these
	insns being accepted in Intel syntax mode even when "tbyte ptr" was
	present. Restore original behavior by dropping Tbyte there. (Note that
	these insns in principle should by marked AT&T syntax only, but since
	they haven't been so far we probably shouldn't change that.)

	x86: simplify expressions in update_imm()
	Comparing the sum of the relevant .imm<N> fields against a constant imo
	makes more obvious what is actually meant. It allows dropping of two
	static variables, with a 3rd drop requiring two more minor adjustments
	elsewhere, utilizing that "i" is zeroed first thing in md_assemble().
	This also increases the chances of the compiler doing the calculations
	all in registers.

2022-11-02  Nelson Chu  <nelson@rivosinc.com>

	RISC-V: Fixed the missing $x+arch when adding odd paddings for alignment.
	Consider the case,

	.option arch, rv32i
	.option norelax
	.option arch, +c
	.byte   1
	.align  2
	addi    a0, zero, 1

	Assembler adds $d for the odd .byte, and then adds $x+arch for the
	alignment.  Since norelax, riscv_add_odd_padding_symbol will add the
	$d and $x for the odd alignment, but accidently remove the $x+arch because
	it has the same address as $d.  Therefore, we will get the unexpected result
	before applying this patch,

	.byte   1            # $d
	.align  2            # odd alignment, $xrv32ic replaced by $d + $x

	After this patch, the expected result should be,

	.byte   1            # $d
	.align  2            # odd alignment, $xrv32ic replaced by $d + $xrv32ic

	gas/
	    * config/tc-riscv.c (make_mapping_symbol): If we are adding mapping symbol
	    for odd alignment, then we probably will remove the $x+arch by accidently
	    when it has the same address of $d.  Try to add the removed $x+arch back
	    after the $d rather than just $x.
	    (riscv_mapping_state): Updated since parameters of make_mapping_symbol are
	    changed.
	    (riscv_add_odd_padding_symbol): Likewise.
	    (riscv_remove_mapping_symbol): Removed and moved the code into the
	    riscv_check_mapping_symbols.
	    (riscv_check_mapping_symbols): Updated.
	    * testsuite/gas/riscv/mapping-dis.d: Updated and added new testcase.
	    * testsuite/gas/riscv/mapping-symbols.d: Likewise.
	    * testsuite/gas/riscv/mapping.s: Likewise.

2022-11-02  Hu, Lin1  <lin1.hu@intel.com>

	Support Intel MSRLIST
	gas/ChangeLog:

		* NEWS: Support Intel MSRLIST.
		* config/tc-i386.c: Add msrlist.
		* doc/c-i386.texi: Document .msrlist.
		* testsuite/gas/i386/i386.exp: Add MSRLIST tests.
		* testsuite/gas/i386/msrlist-inval.l: New test.
		* testsuite/gas/i386/msrlist-inval.s: Ditto.
		* testsuite/gas/i386/x86-64-msrlist-intel.d: Ditto.
		* testsuite/gas/i386/x86-64-msrlist.d: Ditto.
		* testsuite/gas/i386/x86-64-msrlist.s: Ditto.

	opcodes/ChangeLog:

		* i386-dis.c (X86_64_0F01_REG_0_MOD_3_RM_6_P_1): New.
		(X86_64_0F01_REG_0_MOD_3_RM_6_P_3): Ditto.
		(prefix_table): New entry for msrlist.
		(x86_64_table): Add X86_64_0F01_REG_0_MOD_3_RM_6_P_1
		and X86_64_0F01_REG_0_MOD_3_RM_6_P_3.
		* i386-gen.c (cpu_flag_init): Add CPU_MSRLIST_FLAGS
		and CPU_ANY_MSRLIST_FLAGS.
		* i386-init.h: Regenerated.
		* i386-opc.h (CpuMSRLIST): New.
		(i386_cpu_flags): Add cpumsrlist.
		* i386-opc.tbl: Add MSRLIST instructions.
		* i386-tbl.h: Regenerated.

2022-11-02  Hu, Lin1  <lin1.hu@intel.com>

	Support Intel WRMSRNS
	gas/ChangeLog:

	        * NEWS: Support Intel WRMSRNS.
	        * config/tc-i386.c: Add wrmsrns.
	        * doc/c-i386.texi: Document .wrmsrns.
	        * testsuite/gas/i386/i386.exp: Add WRMSRNS tests.
	        * testsuite/gas/i386/wrmsrns-intel.d: New test.
	        * testsuite/gas/i386/wrmsrns.d: Ditto.
	        * testsuite/gas/i386/wrmsrns.s: Ditto.
	        * testsuite/gas/i386/x86-64-wrmsrns-intel.d: Ditto.
	        * testsuite/gas/i386/x86-64-wrmsrns.d: Ditto.

	opcodes/ChangeLog:

		* i386-dis.c (PREFIX_0F01_REG_0_MOD_3_RM_6): New.
		(prefix_table): Add PREFIX_0F01_REG_0_MOD_3_RM_6.
		(rm_table): New entry for wrmsrns.
		* i386-gen.c (cpu_flag_init): Add CPU_WRMSRNS_FLAGS
		and CPU_ANY_WRMSRNS_FLAGS.
		(cpu_flags): Add CpuWRMSRNS.
	        * i386-init.h: Regenerated.
	        * i386-opc.h (CpuWRMSRNS): New.
		(i386_cpu_flags): Add cpuwrmsrns.
	        * i386-opc.tbl: Add WRMSRNS instructions.
	        * i386-tbl.h: Regenerated.

2022-11-02  Kong Lingling  <lingling.kong@intel.com>

	Add handler for more i386_cpu_flags
	gas/ChangeLog:

		* config/tc-i386.c (cpu_flags_all_zero): Add new ARRAY_SIZE handle.
		(cpu_flags_equal): Ditto.
		(cpu_flags_and): Ditto.
		(cpu_flags_or): Ditto.
		(cpu_flags_and_not): Ditto.

2022-11-02  Haochen Jiang  <haochen.jiang@intel.com>

	Support Intel CMPccXADD
	gas/ChangeLog:

		* NEWS: Support Intel CMPccXADD.
		* config/tc-i386.c: Add cmpccxadd.
		(build_modrm_byte): Add operations for Vex.VVVV reg
		on operand 0 while have memory operand.
		* doc/c-i386.texi: Document .cmpccxadd.
		* testsuite/gas/i386/i386.exp: Run CMPccXADD tests.
		* testsuite/gas/i386/cmpccxadd-inval.s: New test.
		* testsuite/gas/i386/cmpccxadd-inval.l: Ditto.
		* testsuite/gas/i386/x86-64-cmpccxadd-intel.d: Ditto.
		* testsuite/gas/i386/x86-64-cmpccxadd.s: Ditto.
		* testsuite/gas/i386/x86-64-cmpccxadd.d: Ditto.

	opcodes/ChangeLog:

		* i386-dis.c (Mdq): New.
		(X86_64_VEX_0F38E0): Ditto.
		(X86_64_VEX_0F38E1): Ditto.
		(X86_64_VEX_0F38E2): Ditto.
		(X86_64_VEX_0F38E3): Ditto.
		(X86_64_VEX_0F38E4): Ditto.
		(X86_64_VEX_0F38E5): Ditto.
		(X86_64_VEX_0F38E6): Ditto.
		(X86_64_VEX_0F38E7): Ditto.
		(X86_64_VEX_0F38E8): Ditto.
		(X86_64_VEX_0F38E9): Ditto.
		(X86_64_VEX_0F38EA): Ditto.
		(X86_64_VEX_0F38EB): Ditto.
		(X86_64_VEX_0F38EC): Ditto.
		(X86_64_VEX_0F38ED): Ditto.
		(X86_64_VEX_0F38EE): Ditto.
		(X86_64_VEX_0F38EF): Ditto.
		(x86_64_table): Add X86_64_VEX_0F38E0, X86_64_VEX_0F38E1,
		X86_64_VEX_0F38E2, X86_64_VEX_0F38E3, X86_64_VEX_0F38E4,
		X86_64_VEX_0F38E5, X86_64_VEX_0F38E6, X86_64_VEX_0F38E7,
		X86_64_VEX_0F38E8, X86_64_VEX_0F38E9, X86_64_VEX_0F38EA,
		X86_64_VEX_0F38EB, X86_64_VEX_0F38EC, X86_64_VEX_0F38ED,
		X86_64_VEX_0F38EE, X86_64_VEX_0F38EF.
		* i386-gen.c (cpu_flag_init): Add CPU_CMPCCXADD_FLAGS and
		CPU_ANY_CMPCCXADD_FLAGS.
		(cpu_flags): Add CpuCMPCCXADD.
		* i386-init.h: Regenerated.
		* i386-opc.h (CpuCMPCCXADD): New.
		(i386_cpu_flags): Add cpucmpccxadd. Comment unused for it is actually 0.
		* i386-opc.tbl: Add Intel CMPccXADD instructions.
		* i386-tbl.h: Regenerated.

2022-11-02  Cui,Lili  <lili.cui@intel.com>

	Support Intel AVX-VNNI-INT8
	gas/
	        * NEWS: Support Intel AVX-VNNI-INT8.
		* config/tc-i386.c: Add avx_vnni_int8.
		* doc/c-i386.texi: Document avx_vnni_int8.
		* testsuite/gas/i386/avx-vnni-int8-intel.d: New file.
		* testsuite/gas/i386/avx-vnni-int8.d: Likewise.
		* testsuite/gas/i386/avx-vnni-int8.s: Likewise.
		* testsuite/gas/i386/x86-64-avx-vnni-int8-intel.d: Likewise.
		* testsuite/gas/i386/x86-64-avx-vnni-int8.d: Likewise.
		* testsuite/gas/i386/x86-64-avx-vnni-int8.s: Likewise.
		* testsuite/gas/i386/i386.exp: Run AVX VNNI INT8 tests.

	opcodes/
		* i386-dis.c: (PREFIX_VEX_0F3850) New.
		(PREFIX_VEX_0F3851): Likewise.
		(VEX_W_0F3850_P_0): Likewise.
		(VEX_W_0F3850_P_1): Likewise.
		(VEX_W_0F3850_P_2): Likewise.
		(VEX_W_0F3850_P_3): Likewise.
		(VEX_W_0F3851_P_0): Likewise.
		(VEX_W_0F3851_P_1): Likewise.
		(VEX_W_0F3851_P_2): Likewise.
		(VEX_W_0F3851_P_3): Likewise.
		(VEX_W_0F3850): Delete.
		(VEX_W_0F3851): Likewise.
		(prefix_table): Add PREFIX_VEX_0F3850 and PREFIX_VEX_0F3851.
		(vex_table): Add PREFIX_VEX_0F3850 and PREFIX_VEX_0F3851,
		delete VEX_W_0F3850 and VEX_W_0F3851.
		(vex_w_table): Add VEX_W_0F3850_P_0, VEX_W_0F3850_P_1, VEX_W_0F3850_P_2
		VEX_W_0F3850_P_3, VEX_W_0F3851_P_0, VEX_W_0F3851_P_1, VEX_W_0F3851_P_2
		and VEX_W_0F3851_P_3, delete VEX_W_0F3850 and VEX_W_0F3851.
		* i386-gen.c: (cpu_flag_init): Add CPU_AVX_VNNI_INT8_FLAGS
		and CPU_ANY_AVX_VNNI_INT8_FLAGS.
		(cpu_flags): Add CpuAVX_VNNI_INT8.
		* i386-opc.h (CpuAVX_VNNI_INT8): New.
		* i386-opc.tbl: Add Intel AVX_VNNI_INT8 instructions.
		* i386-init.h: Regenerated.
		* i386-tbl.h: Likewise.

2022-11-02  Hongyu Wang  <hongyu.wang@intel.com>
	    Haochen Jiang  <haochen.jiang@intel.com>

	Support Intel AVX-IFMA
	x86: Support Intel AVX-IFMA

	Intel AVX IFMA instructions are marked with CpuVEX_PREFIX, which is
	cleared by default.  Without {vex} pseudo prefix, Intel IFMA instructions
	are encoded with EVEX prefix.  {vex} pseudo prefix will turn on VEX
	encoding for Intel IFMA instructions.

	gas/

		* NEWS: Support Intel AVX-IFMA.
		* config/tc-i386.c (cpu_arch): Add avx_ifma.
		* doc/c-i386.texi: Document .avx_ifma.
		* testsuite/gas/i386/avx-ifma.d: New file.
		* testsuite/gas/i386/avx-ifma-intel.d: Likewise.
		* testsuite/gas/i386/avx-ifma.s: Likewise.
		* testsuite/gas/i386/x86-64-avx-ifma.d: Likewise.
		* testsuite/gas/i386/x86-64-avx-ifma-intel.d: Likewise.
		* testsuite/gas/i386/x86-64-avx-ifma.s: Likewise.
		* testsuite/gas/i386/i386.exp: Run AVX IFMA tests.

	opcodes/

		* i386-dis.c (PREFIX_VEX_0F38B4): New.
		(PREFIX_VEX_0F38B5): Likewise.
		(VEX_W_0F38B4_P_2): Likewise.
		(VEX_W_0F38B5_P_2): Likewise.
		(prefix_table): Add PREFIX_VEX_0F38B4 and PREFIX_VEX_0F38B5.
		(vex_table): Add VEX_W_0F38B4_P_2 and VEX_W_0F38B5_P_2.
		* i386-dis-evex.h: Fold AVX512IFMA entries to AVX-IFMA.
		* i386-gen.c (cpu_flag_init): Clear the CpuAVX_IFMA bit in
		CPU_UNKNOWN_FLAGS. Add CPU_AVX_IFMA_FLGAS and
		CPU_ANY_AVX_IFMA_FLAGS. Add CpuAVX_IFMA to CPU_AVX2_FLAGS.
		(cpu_flags): Add CpuAVX_IFMA.
		* i386-opc.h (CpuAVX_IFMA): New.
		(i386_cpu_flags): Add cpuavx_ifma.
		* i386-opc.tbl: Add Intel AVX IFMA instructions.
		* i386-init.h: Regenerated.
		* i386-tbl.h: Likewise.

2022-11-02  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-11-01  Andrew Burgess  <aburgess@redhat.com>

	opcodes/arm: don't pass non-string literal to printf like function
	The earlier commit:

	  commit 6576bffe6cbbb53c5756b2fccd2593ba69b74cdf
	  Date:   Thu Jul 7 13:43:45 2022 +0100

	      opcodes/arm: add disassembler styling for arm

	introduced two places where a register name was passed as the format
	string to the disassembler's fprintf_styled_func callback.  This will
	cause a warning from some compilers, like this:

	  ../../binutils-gdb/opcodes/arm-dis.c: In function ‘print_mve_vld_str_addr’:
	  ../../binutils-gdb/opcodes/arm-dis.c:6005:3: error: format not a string literal and no format arguments [-Werror=format-security]
	   6005 |   func (stream, dis_style_register, arm_regnames[gpr]);
	        |   ^~~~

	This commit fixes these by using "%s" as the format string.

2022-11-01  Andrew Burgess  <aburgess@redhat.com>

	opcodes/arm: silence compiler warning about uninitialized variable use
	The earlier commit:

	  commit 6576bffe6cbbb53c5756b2fccd2593ba69b74cdf
	  Date:   Thu Jul 7 13:43:45 2022 +0100

	      opcodes/arm: add disassembler styling for arm

	was causing a compiler warning about a possible uninitialized variable
	usage within opcodes/arm-dis.c.

	The problem is in print_mve_unpredictable, and relates to the reason
	variable, which is set by a switch table.

	Currently the switch table does cover every valid value, though there
	is no default case.  The variable switched on is passed in as an
	argument to the print_mve_unpredictable function.

	Looking at how print_mve_unpredictable is used, there is only one use,
	the second argument is the one that is used for the switch table,
	looking at how this argument is set, I don't believe it is possible
	for this argument to take an invalid value.

	So, I think the compiler warning is a false positive.  As such, my
	proposed solution is to initialize the reason variable to the string
	"??", this will silence the warning, and the "??" string should never
	end up being printed.

2022-11-01  Andrew Burgess  <aburgess@redhat.com>

	opcodes/arm: add disassembler styling for arm
	This commit adds disassembler styling for the ARM architecture.

	The ARM disassembler is driven by several instruction tables,
	e.g. cde_opcodes, coprocessor_opcodes, neon_opcodes, etc

	The type for elements in each table can vary, but they all have one
	thing in common, a 'const char *assembler' field.  This field
	contains a string that describes the assembler syntax of the
	instruction.

	Embedded within that assembler syntax are various escape characters,
	prefixed with a '%'.  Here's an example of a very simple instruction
	from the arm_opcodes table:

	  "pld\t%a"

	The '%a' indicates a particular type of operand, the function
	print_insn_arm processes the arm_opcodes table, and includes a switch
	statement that handles the '%a' operand, and takes care of printing
	the correct value for that instruction operand.

	It is worth noting that there are many print_* functions, each
	function handles a single *_opcodes table, and includes its own switch
	statement for operand handling.  As a result, every *_opcodes table
	uses a different mapping for the operand escape sequences.  This means
	that '%a' might print an address for one *_opcodes table, but in a
	different *_opcodes table '%a' might print a register operand.

	Notice as well that in our example above, the instruction mnemonic
	'pld' is embedded within the assembler string.  Some instructions also
	include comments within the assembler string, for example, also from
	the arm_opcodes table:

	  "nop\t\t\t@ (mov r0, r0)"

	here, everything after the '@' is a comment that is displayed at the
	end of the instruction disassembly.

	The next complexity is that the meaning of some escape sequences is
	not necessarily fixed.  Consider these two examples from arm_opcodes:

	  "ldrex%c\tr%12-15d, [%16-19R]"
	  "setpan\t#%9-9d"

	Here, the '%d' escape is used with a bitfield modifier, '%12-15d' in
	the first instruction, and '%9-9d' in the second instruction, but,
	both of these are the '%d' escape.

	However, in the first instruction, the '%d' is used to print a
	register number, notice the 'r' immediately before the '%d'.  In the
	second instruction the '%d' is used to print an immediate, notice the
	'#' just before the '%d'.

	We have two problems here, first, the '%d' needs to know if it should
	use register style or immediate style, and secondly, the 'r' and '#'
	characters also need to be styled appropriately.

	The final thing we must consider is that some escape codes result in
	more than just a single operand being printed, for example, the '%q'
	operand as used in arm_opcodes ends up calling arm_decode_shift, which
	can print a register name, a shift type, and a shift amount, this
	could end up using register, sub-mnemonic, and immediate styles, as
	well as the text style for things like ',' between the different
	parts.

	I propose a three layer approach to adding styling:

	(1) Basic state machine:

	    When we start printing an instruction we should maintain the idea
	    of a 'base_style'.  Every character from the assembler string will
	    be printed using the base_style.

	   The base_style will start as mnemonic, as each instruction starts
	   with an instruction mnemonic.  When we encounter the first '\t'
	   character, the base_style will change to text.  When we encounter
	   the first '@' the base_style will change to comment_start.

	   This simple state machine ensures that for simple instructions the
	   basic parts, except for the operands themselves, will be printed in
	   the correct style.

	(2) Simple operand styling:

	    For operands that only have a single meaning, or which expand to
	    multiple parts, all of which have a consistent meaning, then I
	    will simply update the operand printing code to print the operand
	    with the correct style.  This will cover a large number of the
	    operands, and is the most consistent with how styling has been
	    added to previous architectures.

	(3) New styling syntax in assembler strings:

	    For cases like the '%d' that I describe above, I propose adding a
	    new extension to the assembler syntax.  This extension will allow
	    me to temporarily change the base_style.  Operands like '%d', will
	    then print using the base_style rather than using a fixed style.

	    Here are the two examples from above that use '%d', updated with
	    the new syntax extension:

	      "ldrex%c\t%{R:r%12-15d%}, [%16-19R]"
	      "setpan\t%{I:#%9-9d%}"

	    The syntax has the general form '%{X:....%}' where the 'X'
	    character changes to indicate a different style.  In the first
	    instruction I use '%{R:...%}' to change base_style to the register
	    style, and in the second '%{I:...%}' changes base_style to
	    immediate style.

	    Notice that the 'r' and '#' characters are included within the new
	    style group, this ensures that these characters are printed with
	    the correct style rather than as text.

	    The function decode_base_style maps from character to style.  I've
	    included a character for each style for completeness, though only
	    a small number of styles are currently used.

	I have updated arm-dis.c to the above scheme, and checked all of the
	tests in gas/testsuite/gas/arm/, and the styling looks reasonable.

	There are no regressions on the ARM gas/binutils/ld tests that I can
	see, so I don't believe I've changed the output layout at all.  There
	were two binutils tests for which I needed to force the disassembler
	styling off.

	I can't guarantee that I've not missed some untested corners of the
	disassembler, or that I might have just missed some incorrectly styled
	output when reviewing the test results, but I don't believe I've
	introduced any changes that could break the disassembler - the worst
	should be some aspect is not styled correctly.

2022-11-01  Andrew Burgess  <aburgess@redhat.com>

	opcodes/arm: use '@' consistently for the comment character
	Looking at the ARM disassembler output, every comment seems to start
	with a ';' character, so I assumed this was the correct character to
	start an assembler comment.

	I then spotted a couple of places where there was no ';', but instead,
	just a '@' character.  I thought that this was a case of a missing
	';', and proposed a patch to add the missing ';' characters.

	Turns out I was wrong, '@' is actually the ARM assembler comment
	character, while ';' is the statement separator.  Thus this:

	    nop    ;@ comment

	is two statements, the first is the 'nop' instruction, while the
	second contains no instructions, just the '@ comment' comment text.

	This:

	    nop    @ comment

	is a single 'nop' instruction followed by a comment.  And finally,
	this:

	    nop    ; comment

	is two statements, the first contains the 'nop' instruction, while the
	second contains the instruction 'comment', which obviously isn't
	actually an instruction at all.

	Why this matters is that, in the next commit, I would like to add
	libopcodes syntax styling support for ARM.

	The question then is how should the disassembler style the three cases
	above?

	As '@' is the actual comment start character then clearly the '@' and
	anything after it can be styled as a comment.  But what about ';' in
	the second example?  Style as text?  Style as a comment?

	And the third example is even harder, what about the 'comment' text?
	Style as an instruction mnemonic?  Style as text?  Style as a comment?

	I think the only sensible answer is to move the disassembler to use
	'@' consistently as its comment character, and remove all the uses of
	';'.

	Then, in the next commit, it's obvious what to do.

	There's obviously a *lot* of tests that get updated by this commit,
	the only actual code changes are in opcodes/arm-dis.c.

2022-11-01  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-31  Tom Tromey  <tromey@adacore.com>

	Add missing TYPE_CODE_* constants to Python
	A user noticed that TYPE_CODE_FIXED_POINT was not exported by the gdb
	Python layer.  This patch fixes the bug, and prevents future
	occurences of this type of bug.

2022-10-31  Carl Love  <cel@us.ibm.com>

	Remove REPARSE condition to force hardware resource checking when updating watchpoints
	Currently the resource checking is done if REPARSE is true.  The hardware
	watchpoint resource checking in update_watchpoint needs to be redone on
	each call to function update_watchpoints as the value chain may have
	changed.  The number of hardware registers needed for a watchpoint can
	change if the variable being watched changes.  This situation occurs in
	this test when watching variable **global_ptr_ptr.  Initially when the
	watch command is issued, only two addresses need to be watched as
	**global_ptr_ptr has not yet been initialized.  Once the value of
	**global_ptr_ptr is initialized the locations to be tracked increase to
	three addresses.  However, update_watchpoints is not called again with
	REPARSE set to 1 to force the resource checking to be redone.  When the
	test is run on Power 10, an internal gdb error occurs when the PowerPC
	routine tries to setup the three hardware watchpoint address since the hw
	only has two hardware watchpoint registers.  The error occurs because the
	resource checking was not redone in update_watchpoints after
	**global_ptr_ptr changed.

	The following descibes the situation in detail that occurs on Power 10 with
	gdb running on the binary for gdb.base/watchpoint.c.

	1 break func4
	2 run
	3 watch *global_ptr
	4 next      execute source code:   buf[0] = 3;
	5 next      execute source code:   global_ptr = buf;
	6 next      execute source code:   buf[0] = 7;
	7 delete 2  (delete watch *global_ptr)
	8 watch **global_ptr_ptr
	9 next       execute source code:   buf[1] = 5;
	10 next      global_ptr_ptr = &global_ptr;
	11 next      buf[0] = 9;

	In step 8, the the watch **global_ptr_prt command calls update_watchpoint
	in breakpoint.c with REPARSE set to 1.  The function update_watchpoint
	calls can_use_hardware_watchpoint to see if there are enough
	resources available to add the watchpoint since REPARSE is set to 1.  At
	this point, **global_ptr_ptr has not been initialized so only two addresses
	are watched.  The val_chain contains the address for **global_ptr_ptr and 0
	since **global_ptr_ptr has not been initialized.  The update_watchpoint
	updates the breakpoint list as follows:

	  breakpoint 0
	   loc 0: b->address = 0x100009c0
	  breakpoint 1
	   loc 1: b->address = 0x7ffff7f838a0
	  breakpoint 2
	   loc 2: b->address = 0x7ffff7b7fc54
	  breakpoint 3
	   loc 3: b->address = 0x7ffff7a5788c
	  breakpoint 4
	   loc 4: b->address = 0x0         <-- location pointed to by global_ptr_ptr
	   loc 5: b->address = 0x100200b8  <-- global_ptr_ptr watchpoint
	  breakpoint 5
	   loc 6: b->address = 0x7ffff7b7fc54

	In step 10, the next command executes the source code
	global_ptr_ptr = &global_ptr.  This changes the set of locations to be
	watched for the watchpoint **global_ptr_prt.  The list of addresses for the
	breakpoint consist of the address for global_ptr_prt, global_ptr and buf.
	The breakpoint list gets updated by update_watchpoint as follows:

	  breakpoint 0
	   loc 0: b->address = 0x100009c0
	  breakpoint 1
	   loc 1: b->address = 0x7ffff7f838a0
	  breakpoint 2
	   loc 2: b->address = 0x7ffff7b7fc54
	  breakpoint 3
	   loc 3: b->address = 0x7ffff7a5788c
	  breakpoint 4
	   loc 4: b->address = 0x10020050           buf
	   loc 5: b->address = 0x100200b0           watch *global_ptr
	   loc 6: b->address = 0x100200b8           watch **global_ptr_ptr
	  breakpoint 5
	   loc 7: b->address = 0x7ffff7b7fc54
	  breakpoint 6

	However, the hardware resource checking was not redone because
	update_breakpoint was called with REPARSE equal to  0.

	Step 11, execute the third next command.  The function
	ppc_linux_nat_target::low_prepare_to_resume() attempts a ptrace
	call to setup each of the three address for breakpoint 4.  The slot
	value returned for the third ptrace call is -1 indicating an error
	because there are only two hardware watchpoint registers available on
	Power 10.

	This patch removes just the statement "if (reparse)" in function
	update_watchpoint to force the resources to be rechecked on every call to
	the function.  This ensures that any changes to the val_chain resulting
	in needing more resources then available will be caught.

	The patch has been tested on Power 8, Power 10 and X86-64.  Note the patch
	has no effect on Power 9 since hardware watchpoint support is disabled on
	that processor.

2022-10-31  Carl Love  <cel@us.ibm.com>

	PowerPC, add support for recording pipe2 system call.
	Test gdb.reverse/pipe-reverse.exp fails on Power 10 running the fedora 36
	distro.  The gdb record error message is:

	  Process record and replay target doesn't support syscall number 317.

	System call 317 on PowerPC maps to the pipe2 system call.

	This patch adds support for the missing pipe2 system call for PowerPC.

	Patch fixes the test failure in gdb.reverse/pipe-reverse.exp.

	The patch has been tested on Power 10 with no regression failures.

2022-10-31  Jan Beulich  <jbeulich@suse.com>

	x86: minor improvements to optimize_imm() (part III)
	Earlier tidying still missed an opportunity: There's no need for the
	"anyimm" static variable. Instead of using it in the loop to mask
	"allowed" (which is necessary to satisfy operand_type_or()'s assertions)
	simply use "mask", requiring it to be calculated first. That way the
	post-loop masking by "mask" ahead of the operand_type_all_zero() can be
	dropped.

2022-10-31  Mike Frysinger  <vapier@gentoo.org>

	sim: reg: constify store helper
	These functions only read from memory, so mark the pointer as const.

	sim: constify various integer readers
	These functions only read from memory, so mark the pointer as const.

	sim: cgen: constify GETT helpers
	These functions only read from memory, so mark the pointer as const.

	sim: common: change sim_read & sim_write to use void* buffers
	When reading/writing arbitrary data to the system's memory, the unsigned
	char pointer type doesn't make that much sense.  Switch it to void so we
	align a bit with standard C library read/write functions, and to avoid
	having to sprinkle casts everywhere.

2022-10-31  H.J. Lu  <hjl.tools@gmail.com>

	x86: Silence GCC 12 warning on tc-i386.c
	Silence GCC 12 warning on tc-i386.c:

	gas/config/tc-i386.c: In function ‘md_assemble’:
	gas/config/tc-i386.c:5039:16: error: too many arguments for format [-Werror=format-extra-args]
	 5039 |     as_warn (_("only support RIP-relative address"), i.tm.name);

		* config/tc-i386.c (md_assemble): Print mnemonic in RIP-relative
		warning.
		* estsuite/gas/i386/x86-64-prefetchi-warn.l: Updated.

2022-10-31  Tom Tromey  <tromey@adacore.com>

	Use enum for gdbarch's call_dummy_location
	This changes gdbarch to use an enum for call_dummy_location, providing
	a little more type safety.

	Inline initialization of gdbarch members
	This changes gdbarch to use the "predefault" to initialize its members
	inline.  This required changing a couple of the Value instantiations
	to avoid a use of "gdbarch" during initialization, but on the whole I
	think this is better -- it removes a hidden ordering dependency.

2022-10-31  Tom Tromey  <tromey@adacore.com>

	Fix regression in pointer-to-member printing
	PR c++/29243 points out that "info func" on a certain C++ executable
	will cause an infinite loop in gdb.

	I tracked this down to a bug introduced by commit 6b5a7bc76 ("Handle
	member pointers directly in generic_value_print").  Before this
	commit, the C++ code to print a member pointer would wind up calling
	value_print_scalar_formatted; but afterward it simply calls
	generic_value_print and gets into a loop.

	This patch restores the previous behavior and adds a regression test.

2022-10-31  Nick Clifton  <nickc@redhat.com>

	Updated Romainain translation for the binutils sub-directory and Swedish translations for the ld and opcodes sub-directories.

2022-10-31  Cui, Lili  <lili.cui@intel.com>

	Support Intel PREFETCHI
	gas/ChangeLog:

		* NEWS: Add support for Intel PREFETCHI instruction.
		* config/tc-i386.c (load_insn_p): Use prefetch* to fold all prefetches.
		(md_assemble): Add warning for illegal input of PREFETCHI.
		* doc/c-i386.texi: Document .prefetchi.
		* testsuite/gas/i386/i386.exp: Run PREFETCHI tests.
		* testsuite/gas/i386/x86-64-lfence-load.d: Add PREFETCHI.
		* testsuite/gas/i386/x86-64-lfence-load.s: Likewise.
		* testsuite/gas/i386/x86-64-prefetch.d: New test.
		* testsuite/gas/i386/x86-64-prefetchi-intel.d: Likewise.
		* testsuite/gas/i386/x86-64-prefetchi-inval-register.d: Likewise..
		* testsuite/gas/i386/x86-64-prefetchi-inval-register.s: Likewise.
		* testsuite/gas/i386/x86-64-prefetchi-warn.l: Likewise.
		* testsuite/gas/i386/x86-64-prefetchi-warn.s: Likewise.
		* testsuite/gas/i386/x86-64-prefetchi.d: Likewise.
		* testsuite/gas/i386/x86-64-prefetchi.s: Likewise.

	opcodes/ChangeLog:

		* i386-dis.c (reg_table): Add MOD_0F18_REG_6 and MOD_0F18_REG_7
		(x86_64_table): Add X86_64_0F18_REG_6_MOD_0 and X86_64_0F18_REG_7_MOD_0.
		(mod_table): Add MOD_0F18_REG_6 and MOD_0F18_REG_7.
		(prefix_table): Add PREFIX_0F18_REG_6_MOD_0_X86_64 and
		PREFIX_0F18_REG_7_MOD_0_X86_64.
		(PREFETCHI_Fixup): New.
		* i386-gen.c (cpu_flag_init): Add CPU_PREFETCHI_FLAGS.
		(cpu_flags): Add CpuPREFETCHI.
		* i386-opc.h (CpuPREFETCHI): New.
		(i386_cpu_flags): Add cpuprefetchi.
		* i386-opc.tbl: Add Intel PREFETCHI instructions.
		* i386-init.h: Regenerated.
		* i386-tbl.h: Likewise.

2022-10-31  Bruno Larsen  <blarsen@redhat.com>

	gdb/testsuite: fix gdb.cp/converts.exp to run with clang
	Clang attempts to minimize the size of the debug-info by not adding
	complete information about types that aren't constructed in a given
	file.  Specifically, this meant that there was minimal information about
	class B in the test gdb.cp/converts.exp.  To fix this, we just need to
	construct any object of type B in that file.

	Approved-By: Andrew Burgess <aburgess@redhat.com>

2022-10-31  Bruno Larsen  <blarsen@redhat.com>

	gdb/testsuite: add XFAIL to gdb.cp/ptype-flags.exp when using clang
	When running gdb.cp/ptype-flags.exp using Clang, we get an unexpected
	failure when printing the type of a class with an internal typedef. This
	happens because Clang doesn't add accessibility information for typedefs
	inside classes (see https://github.com/llvm/llvm-project/issues/57608
	for more info). To help with Clang testing, an XFAIL was added to this
	test.

2022-10-31  Yoshinori Sato  <ysato@users.sourceforge.jp>

	RX assembler: switch arguments of thw MVTACGU insn.

2022-10-31  Nick Clifton  <nickc@redhat.com>

	objdump: Add configure time option to enable colored disassembly output by default.
		PR 29457
		* configure.ac: Add --enable-colored-disassembly.
		* objdump.c: Add --disassembler-color=terminal.
		* doc/binutils.texi (objdump): Document the new option.
		* NEWS: Mention new feature.
		* config.in: Regenerate in.
		* configure: Regenerate.

2022-10-31  Mark Harmstone  <mark@harmstone.com>

	ld: Add publics stream to PDB files

	ld: Add section header stream to PDB files

	ld: Use %E in einfo in pdb.c
	Resubmission, taking into account
	https://sourceware.org/pipermail/binutils/2022-October/123948.html.

2022-10-31  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-30  Alan Modra  <amodra@gmail.com>

	Pool section entries for DWP version 1
	Ref: https://gcc.gnu.org/wiki/DebugFissionDWP?action=recall&rev=3

	Fuzzers have found a weakness in the code stashing pool section
	entries.  With random nonsensical values in the index entries (rather
	than each index pointing to its own set distinct from other sets),
	it's possible to overflow the space allocated, losing the NULL
	terminator.  Without a terminator, find_section_in_set can run off the
	end of the shndx_pool buffer.  Fix this by scanning the pool directly.

	binutils/
		* dwarf.c (add_shndx_to_cu_tu_entry): Delete range check.
		(end_cu_tu_entry): Likewise.
		(process_cu_tu_index): Fill shndx_pool by directly scanning
		pool, rather than indirectly from index entries.

2022-10-30  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-29  Maciej W. Rozycki  <macro@embecosm.com>

	gdb/testsuite: Wrap `param_integer_error' in gdb.guile/scm-parameter.exp
	Wrap an overlong line in the definition of `param_integer_error' in
	gdb.guile/scm-parameter.exp.  No functional change.

2022-10-29  Tsukasa OI  <research_trasio@irq.a4lg.com>

	sim/sh: Remove redundant function declaration
	Clang generates a warning if there is a function declaration/definition
	with zero arguments.  Such declarations/definitions without a prototype (an
	argument list) are deprecated forms of indefinite arguments
	("-Wdeprecated-non-prototype").  On the default configuration, it causes a
	build failure (unless "--disable-werror" is specified).

	But there is another issue.  This function declaration in sim/sh/interp.c
	is completely redundant.  This commit just removes that declaration.

2022-10-29  Tsukasa OI  <research_trasio@irq.a4lg.com>

	sim/m32r: Initialize "list" variable
	The variable "list" is only initialized when arg1 > 0 and when arg1 == 0,
	an uninitialized value is passed to translate_endian_h2t function.

	Although this behavior is harmless, this commit adds initialization to avoid
	a GCC warning ("-Wmaybe-uninitialized").

2022-10-29  Tsukasa OI  <research_trasio@irq.a4lg.com>

	sim/erc32: Use int32_t as IRQ callback argument
	Clang generates a warning if an argument is passed to a function without
	prototype (zero arguments, even without (void)).  Such calls are deprecated
	forms of indefinite arguments passing ("-Wdeprecated-non-prototype").
	On the default configuration, it (somehow) doesn't cause a build failure but
	a warning is generated.

	But because the cause is the same as the issue the author fixed in
	"sim/erc32: Use int32_t as event callback argument", it would be better to
	fix it now to prevent problems in the future.

	To fix the issue, this commit makes struct irqcall to use int32_t as a
	callback (callback) argument of an IRQ.

2022-10-29  Tsukasa OI  <research_trasio@irq.a4lg.com>

	sim/erc32: Use int32_t as event callback argument
	Clang generates a warning if an argument is passed to a function without
	prototype (zero arguments, even without (void)).  Such calls are deprecated
	forms of indefinite arguments passing ("-Wdeprecated-non-prototype").
	On the default configuration, it causes a build failure (unless
	"--disable-werror" is specified).

	To fix that, this commit makes struct evcell to use int32_t as a callback
	(cfunc) argument of an event.  int32_t is chosen because "event" function
	accepts "int32_t arg".

2022-10-29  Tsukasa OI  <research_trasio@irq.a4lg.com>

	sim/erc32: Insert void parameter
	Clang generates a warning if there is a function declaration/definition
	with zero arguments.  Such declarations/definitions without a prototype (an
	argument list) are deprecated forms of indefinite arguments
	("-Wdeprecated-non-prototype").  On the default configuration, it causes a
	build failure (unless "--disable-werror" is specified).

	This commit replaces () with (void) to avoid this warning.

2022-10-29  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Use ssh -t in remote-*.exp
	When running test-case gdb.server/multi-ui-errors.exp on target board
	remote-gdbserver-on-localhost.exp, I run into:
	...
	(gdb) PASS: gdb.server/multi-ui-errors.exp: connect to gdbserver
	continue^M
	Continuing.^M
	PASS: gdb.server/multi-ui-errors.exp: continue - extra UI
	Remote debugging from host ::1, port 35466^M
	FAIL: gdb.server/multi-ui-errors.exp: ensure inferior is running
	...

	The problem is that the target board uses ssh -T, which fails to guarantee
	that output from the inferior will be available.

	Fix this by copying proc ${board}_spawn from local-remote-host.exp, which
	ensures using ssh -t.  [ It would be nice to define an ssh base board to
	get rid of the copies, but I'm not addressing that in this commit. ]

	Likewise for target board remote-stdio-gdbserver.exp.

	Tested on x86_64-linux.

2022-10-29  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.server/multi-ui-errors.exp with local-remote-host-notty
	With test-case gdb.server/multi-ui-errors.exp and host board
	local-remote-host-notty, I run into:
	...
	(gdb) PASS: gdb.server/multi-ui-errors.exp: interact with GDB's main UI
	Executing on target: kill -9 29666    (timeout = 300)
	builtin_spawn -ignore SIGHUP kill -9 29666^M
	echo^M
	Remote connection closed^M
	(gdb) (gdb) FAIL: gdb.server/multi-ui-errors.exp: \
	  main UI, prompt after gdbserver dies (timeout)
	...

	In contrast, with local-remote-host (so, everything the same but editing off):
	...
	(gdb) PASS: gdb.server/multi-ui-errors.exp: interact with GDB's main UI
	Executing on target: kill -9 31245    (timeout = 300)
	builtin_spawn -ignore SIGHUP kill -9 31245^M
	Remote connection closed^M
	(gdb) echo^M
	(gdb) PASS: gdb.server/multi-ui-errors.exp: main UI, prompt after gdbserver dies
	...

	The test-case issues a kill, which results in a "Remote connection closed"
	message and a prompt.

	The problem is that the prompt is not consumed, so the subsequent echo may be
	issued before that prompt, which causes a mismatch when matching the result
	of the echo.

	Fix this by consuming the "Remote connection closed" message and prompt.

	Tested on x86_64-linux.

2022-10-29  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Consume output asap in gdb.server/multi-ui-errors.exp
	With test-case gdb.server/multi-ui-errors.exp we see:
	...
	(gdb) PASS: multi-ui-errors.exp: main UI, prompt after gdbserver dies
	continue^M
	Continuing.^M
	echo^M
	(gdb) PASS: multi-ui-errors.exp: extra UI, prompt after gdbserver dies
	...

	The continue is issued earlier in the test-case, but the output has not been
	consumed, which makes it show up much later.

	Consume the continue output asap, to make it clear when the continue is issued:
	...
	(gdb) PASS: gdb.server/multi-ui-errors.exp: connect to gdbserver
	continue^M
	Continuing.^M
	PASS: gdb.server/multi-ui-errors.exp: continue - extra UI
	...

	Tested on x86_64-linux.

2022-10-29  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Remove REMOTE_PORTNUM in remote-stdio-gdbserver.exp
	The usage for board remote-stdio-gdbserver.exp is advertised as:
	...
	 # bash$ make check RUNTESTFLAGS="--target_board=remote-stdio-gdbserver \
	 #    REMOTE_USERNAME=... REMOTE_HOSTNAME=... REMOTE_PORTNUM=... \
	 #    [REMOTE_TMPDIR=${remote_dir}] [GDBSERVER=${remote_gdbserver}]"
	...
	but when adding REMOTE_PORTNUM=22, I run into:
	...
	Running stop-reply-no-thread-multi.exp ...
	ERROR: tcl error sourcing stop-reply-no-thread-multi.exp.
	ERROR: couldn't execute "/usr/bin/ssh -p22": no such file or directory
	    while executing
	"builtin_spawn {/usr/bin/ssh -p22} -l vries localhost {/usr/bin/gdbserver \
	  --once localhost:2346 \
	  /home/vries/gdb_versions/devel/build/gdb/testsuite/outp..."
	...

	Fix this by simply removing REMOTE_PORTNUM.

	Tested on x86_64-linux.

2022-10-29  Tsukasa OI  <research_trasio@irq.a4lg.com>

	sim, sim/{m32c,ppc,rl78}: Use getopt_long
	Because of a Libiberty hack, getopt on GNU libc (2.25 or earlier) is
	currently unusable on sim, causing a regression on CentOS 7.

	This is caused as follows:

	1.  If HAVE_DECL_GETOPT is defined (getopt declaration with known prototype
	    is detected while configuration), a declaration of getopt in
	    "include/getopt.h" is suppressed.
	    The author started to define HAVE_DECL_GETOPT in sim with the commit
	    340aa4f6872c ("sim: Check known getopt definition existence").
	2.  GNU libc (2.25 or earlier)'s <unistd.h> includes <getopt.h> with a
	    special purpose macro defined to declare only getopt function but due
	    to include path (not tested while configuration), it causes <unistd.h>
	    to include Libiberty's "include/getopt.h".
	3.  If both 1. and 2. are satisfied, despite that <unistd.h> tries to
	    declare getopt by including <getopt.h>, "include/getopt.h" does not do
	    so, causing getopt function undeclared.

	Getting rid of "include/getopt.h" (e.g. renaming this header file) is the
	best solution to avoid hacking but as a short-term solution, this commit
	replaces getopt with getopt_long under sim/.

2022-10-29  Alan Modra  <amodra@gmail.com>

	pef: sanity check before malloc
	And do the sanity check in a way that can't overflow.

		* pef.c (bfd_pef_parse_function_stubs): Sanity check header
		imported_library_count and total_imported_symbol_count before
		allocating memory.

2022-10-29  Alan Modra  <amodra@gmail.com>

	Fix small objcopy memory leak
		* objcopy.c (copy_archive): Free l->name.

2022-10-29  Alan Modra  <amodra@gmail.com>

	NULL dereference read in som_write_object_contents
	objcopy copy_object may omit the call to bfd_copy_private_bfd_data for
	various conditions deemed non-fatal, in which case obj_som_exec_data
	will be NULL for the output file.

		* som.c (som_finish_writing): Don't dereference NULL
		obj_som_exec_data.

2022-10-29  Nelson Chu  <nelson@rivosinc.com>

	RISC-V: Always generate mapping symbols at the start of the sections.
	Before figuring out the suppress rule of mapping symbol with architecture
	(changed back to $x), always generate them at the start of the sections.

	gas/
	    * config/tc-riscv.c (need_arch_map_symbol): Removed.
	    (riscv_mapping_state): Updated.
	    (riscv_check_mapping_symbols): Updated.
	    * testsuite/gas/riscv/mapping-non-arch.d: Removed.
	    * testsuite/gas/riscv/mapping-non-arch.s: Likewise.

2022-10-29  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-28  Palmer Dabbelt  <palmer@rivosinc.com>

	gas: NEWS: Note support for RISC-V Zawrs
	This has been supported since eb668e50036 ("RISC-V: Add Zawrs ISA
	extension support").

	gas: NEWS: Add a missing newline

2022-10-28  Tom Tromey  <tom@tromey.com>

	Convert compunit_language to a method
	This changes compunit_language to be a method on compunit_symtab.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-10-28  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Improve "bits undefined" diagnostics
	This commit improves internal error message
	"internal: bad RISC-V opcode (bits 0x%lx undefined): %s %s"
	to display actual unused bits (excluding non-instruction bits).

	gas/ChangeLog:

		* config/tc-riscv.c (validate_riscv_insn): Exclude non-
		instruction bits from displaying internal diagnostics.
		Change error message slightly.

2022-10-28  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Fallback for instructions longer than 64b
	We don't support instructions longer than 64-bits yet.  Still, we can
	modify validate_riscv_insn function to prevent unexpected behavior by
	limiting the "length" of an instruction to 64-bit (or less).

	gas/ChangeLog:

		* config/tc-riscv.c (validate_riscv_insn): Fix function
		description comment based on current spec.  Limit instruction
		length up to 64-bit for now.  Make sure that required_bits does
		not corrupt even if unsigned long long is longer than 64-bit.

2022-10-28  Jan Beulich  <jbeulich@suse.com>

	RISC-V/gas: fix build with certain gcc versions
	Some versions of gcc warn by default about shadowed outer-scope
	declarations. This affects frag_align_code, which is declared in
	frags.h. Rename the offending function parameter. While there also
	switch to using true/false at the function call sites.

2022-10-28  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Fix build failure for -Werror=maybe-uninitialized
	Commit 40f1a1a4564b ("RISC-V: Output mapping symbols with ISA string.")
	caused a build failure on GCC 12 as follows:

	make[3]: Entering directory '$(builddir)/gas'
	  CC       config/tc-riscv.o
	In file included from $(srcdir)/gas/config/tc-riscv.c:23:
	$(srcdir)/gas/as.h: In function ‘make_mapping_symbol’:
	$(srcdir)/gas/as.h:123:15: error: ‘buff’ may be used uninitialized [-Werror=maybe-uninitialized]
	  123 | #define xfree free
	      |               ^~~~
	$(srcdir)/gas/config/tc-riscv.c:487:9: note: ‘buff’ was declared here
	  487 |   char *buff;
	      |         ^~~~
	cc1: all warnings being treated as errors
	make[3]: *** [Makefile:1425: config/tc-riscv.o] Error 1

	This is caused by a false positive of "maybe uninitialized" variable
	detection (-Wmaybe-uninitialized).  To avoid this error, this commit
	initializes the local variable buff to NULL first in all cases.

	gas/ChangeLog:

		* config/tc-riscv.c (make_mapping_symbol): Initialize variable
		buff with NULL to avoid build failure caused by a GCC's false
		positive of maybe uninitialized variable detection.

2022-10-28  Markus Metzger  <markus.t.metzger@intel.com>

	gdb, btrace: fix family and model computation
	In gdb/nat/linux-btrace.c:btrace_this_cpu() we initialize the cpu
	structure given to the libipt btrace decoder.

	We only consider the extended model field for family 0x6 and forget about
	family 0xf and we don't consider the extended family field.  Fix it.

2022-10-28  Tsukasa OI  <research_trasio@irq.a4lg.com>

	include: Define macro to ignore -Wdeprecated-declarations on GCC
	"-Wdeprecated-declarations" warning option can be helpful to track
	deprecated function delarations but sometimes we need to disable this
	warning for a good reason.

	DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS is an existing macro but only
	defined on Clang.  Since "-Wdeprecated-declarations" is also available on
	GCC (>= 3.4.0), this commit adds equivalent definition as Clang.

	__GNUC__ and __GNUC_MINOR__ are not checked because this header file seems
	to assume GCC >= 4.6 (with "GCC diagnostic push/pop").

	include/ChangeLog:

		* diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS):
		Define also on GCC.

2022-10-28  Nelson Chu  <nelson@rivosinc.com>

	RISC-V: Output mapping symbols with ISA string.
	RISC-V Psabi pr196,
	https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/196

	bfd/
	    * elfxx-riscv.c (riscv_release_subset_list): Free arch_str if needed.
	    (riscv_copy_subset_list): Copy arch_str as well.
	    * elfxx-riscv.h (riscv_subset_list_t): Store arch_str for each subset list.
	gas/
	    * config/tc-riscv.c (riscv_reset_subsets_list_arch_str): Update the
	    architecture string in the subset_list.
	    (riscv_set_arch): Call riscv_reset_subsets_list_arch_str after parsing new
	    architecture string.
	    (s_riscv_option): Likewise.
	    (need_arch_map_symbol): New boolean, used to indicate if .option
	    directives do affect instructions.
	    (make_mapping_symbol): New boolean parameter reset_seg_arch_str.  Need to
	    generate $x+arch for MAP_INSN, and then store it into tc_segment_info_data
	    if reset_seg_arch_str is true.
	    (riscv_mapping_state): Decide if we need to add $x+arch for MAP_INSN.  For
	    now, only add $x+arch if the architecture strings in subset list and segment
	    are different.  Besides, always add $x+arch at the start of section, and do
	    not add $x+arch for code alignment, since rvc for alignment can be judged
	    from addend of R_RISCV_ALIGN.
	    (riscv_remove_mapping_symbol): If current and previous mapping symbol have
	    same value, then remove the current $x only if the previous is $x+arch;
	    Otherwise, always remove previous.
	    (riscv_add_odd_padding_symbol): Updated.
	    (riscv_check_mapping_symbols): Don't need to add any $x+arch if
	    need_arch_map_symbol is false, so changed them to $x.
	    (riscv_frag_align_code): Updated since riscv_mapping_state is changed.
	    (riscv_init_frag): Likewise.
	    (s_riscv_insn): Likewise.
	    (riscv_elf_final_processing): Call riscv_release_subset_list to release
	    subset_list of riscv_rps_as, rather than only release arch_str in the
	    riscv_write_out_attrs.
	    (riscv_write_out_attrs): No need to call riscv_arch_str, just get arch_str
	    from subset_list of riscv_rps_as.
	    * config/tc-riscv.h (riscv_segment_info_type): Record current $x+arch mapping
	    symbol of each segment.
	    * testsuite/gas/riscv/mapping-0*: Merged and replaced by mapping.s.
	    * testsuite/gas/riscv/mapping.s: New testcase, to test most of the cases in
	    one file.
	    * testsuite/gas/riscv/mapping-symbols.d: Likewise.
	    * testsuite/gas/riscv/mapping-dis.d: Likewise.
	    * testsuite/gas/riscv/mapping-non-arch.s: New testcase for the case that
	    does need any $x+arch.
	    * testsuite/gas/riscv/mapping-non-arch.d: Likewise.
	    * testsuite/gas/riscv/option-arch-01a.d: Updated.
	opcodes/
	    * riscv-dis.c (riscv_disassemble_insn): Set riscv_fpr_names back to
	    riscv_fpr_names_abi or riscv_fpr_names_numeric when zfinx is disabled
	    for some specfic code region.
	    (riscv_get_map_state): Recognized mapping symbols $x+arch, and then reset
	    the architecture string once the ISA is different.

2022-10-28  Lifang Xia  <lifang_xia@linux.alibaba.com>

	binutils: Update my e-mail and Yunhai's e-mail
	binutils/
		* MAINTAINERS(C-SKY): update e-mails of Lifang & Yunhai.

2022-10-28  Peter Bergner  <bergner@linux.ibm.com>

	PowerPC: Add support for RFC02658 - MMA+ Outer-Product Instructions
	gas/
		* config/tc-ppc.c (md_assemble): Only check for prefix opcodes.
		* testsuite/gas/ppc/rfc02658.s: New test.
		* testsuite/gas/ppc/rfc02658.d: Likewise.
		* testsuite/gas/ppc/ppc.exp: Run it.

	opcodes/
		* ppc-opc.c (XMSK8, P_GERX4_MASK, P_GERX2_MASK, XX3GERX_MASK): New.
		(powerpc_opcodes): Add dmxvi8gerx4pp, dmxvi8gerx4, dmxvf16gerx2pp,
		dmxvf16gerx2, dmxvbf16gerx2pp, dmxvf16gerx2np, dmxvbf16gerx2,
		dmxvi8gerx4spp, dmxvbf16gerx2np, dmxvf16gerx2pn, dmxvbf16gerx2pn,
		dmxvf16gerx2nn, dmxvbf16gerx2nn, pmdmxvi8gerx4pp, pmdmxvi8gerx4,
		pmdmxvf16gerx2pp, pmdmxvf16gerx2, pmdmxvbf16gerx2pp, pmdmxvf16gerx2np,
		pmdmxvbf16gerx2, pmdmxvi8gerx4spp, pmdmxvbf16gerx2np, pmdmxvf16gerx2pn,
		pmdmxvbf16gerx2pn, pmdmxvf16gerx2nn, pmdmxvbf16gerx2nn.

2022-10-28  Peter Bergner  <bergner@linux.ibm.com>

	PowerPC: Add support for RFC02653 - Dense Math Facility
	gas/
		* config/tc-ppc.c (pre_defined_registers): Add dense math registers.
		(md_assemble): Check dmr specified in correct operand.
		* testsuite/gas/ppc/outerprod.s <dmsetaccz, dmxvbf16ger2,
		dmxvbf16ger2nn, dmxvbf16ger2np, dmxvbf16ger2pn, dmxvbf16ger2pp,
		dmxvf16ger2, dmxvf16ger2nn, dmxvf16ger2np, dmxvf16ger2pn, dmxvf16ger2pp,
		dmxvf32ger, dmxvf32gernn, dmxvf32gernp, dmxvf32gerpn, dmxvf32gerpp,
		dmxvf64ger, dmxvf64gernn, dmxvf64gernp, dmxvf64gerpn, dmxvf64gerpp,
		dmxvi16ger2, dmxvi16ger2pp, dmxvi16ger2s, dmxvi16ger2spp, dmxvi4ger8,
		dmxvi4ger8pp, dmxvi8ger4, dmxvi8ger4pp, dmxvi8ger4spp, dmxxmfacc,
		dmxxmtacc, pmdmxvbf16ger2, pmdmxvbf16ger2nn, pmdmxvbf16ger2np,
		pmdmxvbf16ger2pn, pmdmxvbf16ger2pp, pmdmxvf16ger2, pmdmxvf16ger2nn,
		pmdmxvf16ger2np, pmdmxvf16ger2pn, pmdmxvf16ger2pp, pmdmxvf32ger,
		pmdmxvf32gernn, pmdmxvf32gernp, pmdmxvf32gerpn, pmdmxvf32gerpp,
		pmdmxvf64ger, pmdmxvf64gernn, pmdmxvf64gernp, pmdmxvf64gerpn,
		pmdmxvf64gerpp, pmdmxvi16ger2, pmdmxvi16ger2pp, pmdmxvi16ger2s,
		pmdmxvi16ger2spp, pmdmxvi4ger8, pmdmxvi4ger8pp, pmdmxvi8ger4,
		pmdmxvi8ger4pp, pmdmxvi8ger4spp>: Add new tests.
		* testsuite/gas/ppc/outerprod.d: Likewise.
		* testsuite/gas/ppc/rfc02653.s: New test.
		* testsuite/gas/ppc/rfc02653.d: Likewise.
		* testsuite/gas/ppc/ppc.exp: Run it.

	include/
		* opcode/ppc.h (PPC_OPERAND_DMR): Define.  Renumber following
		PPC_OPERAND defines.

	opcodes/
		* ppc-dis.c (print_insn_powerpc): Prepend 'dm' when printing DMR regs.
		* ppc-opc.c (insert_p2, (extract_p2, (insert_xa5, (extract_xa5,
		insert_xb5, (extract_xb5): New functions.
		(insert_xa6a, extract_xa6a, insert_xb6a, extract_xb6a): Disallow
		operand overlap only on Power10.
		(DMR, DMRAB, P1, P2, XA5p, XB5p, XDMR_MASK, XDMRDMR_MASK, XX2ACC_MASK,
		XX2DMR_MASK, XX3DMR_MASK): New defines.
		(powerpc_opcodes): Add dmmr, dmsetaccz, dmsetdmrz, dmxor, dmxvbf16ger2,
		dmxvbf16ger2nn, dmxvbf16ger2np, dmxvbf16ger2pn, dmxvbf16ger2pp,
		dmxvf16ger2, dmxvf16ger2nn, dmxvf16ger2np, dmxvf16ger2pn, dmxvf16ger2pp,
		dmxvf32ger, dmxvf32gernn, dmxvf32gernp, dmxvf32gerpn, dmxvf32gerpp,
		dmxvf64ger, dmxvf64gernn, dmxvf64gernp, dmxvf64gerpn, dmxvf64gerpp,
		dmxvi16ger2, dmxvi16ger2pp, dmxvi16ger2s, dmxvi16ger2spp, dmxvi4ger8,
		dmxvi4ger8pp, dmxvi8ger4, dmxvi8ger4pp, dmxvi8ger4spp, dmxxextfdmr256,
		dmxxextfdmr512, dmxxinstdmr256, dmxxinstdmr512, dmxxmfacc, dmxxmtacc,
		pmdmxvbf16ger2, pmdmxvbf16ger2nn, pmdmxvbf16ger2np, pmdmxvbf16ger2pn,
		pmdmxvbf16ger2pp, pmdmxvf16ger2, pmdmxvf16ger2nn, pmdmxvf16ger2np,
		pmdmxvf16ger2pn, pmdmxvf16ger2pp, pmdmxvf32ger, pmdmxvf32gernn,
		pmdmxvf32gernp, pmdmxvf32gerpn, pmdmxvf32gerpp, pmdmxvf64ger,
		pmdmxvf64gernn, pmdmxvf64gernp, pmdmxvf64gerpn, pmdmxvf64gerpp,
		pmdmxvi16ger2, pmdmxvi16ger2pp, pmdmxvi16ger2s, pmdmxvi16ger2spp,
		pmdmxvi4ger8, pmdmxvi4ger8pp, pmdmxvi8ger4, pmdmxvi8ger4pp,
		pmdmxvi8ger4spp.

2022-10-28  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-27  Andrew Burgess  <aburgess@redhat.com>

	sim/cgen: initialize variable at creation in engine_run_n
	Zero initialize engine_fns entirely at creation, then override those
	fields we intend to use, rather than zero just initializing the unused
	fields later on.

	There should be no user visible changes after this commit.

2022-10-27  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Remove address from test names
	I noticed an address in a test name:
	...
	PASS: gdb.base/eh_return.exp: gdb_breakpoint: \
	  set breakpoint at *0x000000000040071b
	...

	Stabilize the test name by using "set breakpoint on address" instead.

	Likewise in two other test-cases.

	Tested on x86_64-linux.

2022-10-27  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Disable styling in host board local-remote-host-native.exp
	Propagate fix from commit 17c68d98f74 ("[gdb/testsuite] Disable styling in host
	board local-remote-host.exp") to local-remote-host-native.exp.

	Tested on x86_64-linux.

2022-10-27  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix silent timeouts in gdb.mi/mi-exec-run.exp with remote host
	I noticed that running test-case gdb.mi/mi-exec-run.exp with host board
	local-remote-host.exp takes about 44 seconds.

	I found two silent timeouts responsible for this.

	The first is in mi_gdb_exit, where we have:
	...
	    if { [is_remote host] && [board_info host exists fileid] } {
	        send_gdb "999-gdb-exit\n"
	        gdb_expect 10 {
	            -re "y or n" {
	                send_gdb "y\n"
	                exp_continue
	            }
	            -re "Undefined command.*$gdb_prompt $" {
	                send_gdb "quit\n"
	                exp_continue
	            }
	            -re "DOSEXIT code" { }
	        }
	    }
	...
	so in gdb.log we see:
	...
	999-gdb-exit^M
	999^exit^M
	=thread-exited,id="1",group-id="i1"^M
	=thread-group-exited,id="i1"^M
	...
	after which expect just waits for the timeout.

	Fix this by adding a gdb_expect clause to parse the exit:
	...
	            -re "\r\n999\\^exit\r\n" { }
	...

	Note that we're not parsing the thread-exited/thread-group-exited messages, because
	they may not be present:
	...
	$ gdb -i=mi
	=thread-group-added,id="i1"
	(gdb)
	999-gdb-exit
	999^exit
	$
	...

	After fixing that, we have:
	...
	(gdb) ^M
	saw mi error
	PASS: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=separate: \
	  force-fail=1: run failure detected
	quit^M
	&"quit\n"^M
	...

	What seems to be happening is that default_gdb_exit sends a cli interpreter
	quit command to an mi interpreter, after which again expect just waits for the
	timeout.

	Fix this by adding mi_gdb_exit to the end of the test-case, as in many other
	gdb.mi/*.exp test-cases.

	After these two fixes, the test-case takes about 4 seconds.

	Tested on x86_64-linux.

2022-10-27  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Use remote_exec chmod instead of remote_spawn
	I build gdb using -O2, and ran the testsuite using taskset -c 0, and ran into:
	...
	(gdb) PASS: gdb.server/connect-with-no-symbol-file.exp: sysroot=: \
	  action=delete: setup: adjust sysroot
	builtin_spawn gdbserver --once localhost:2385 /connect-with-no-symbol-file^M
	/bin/bash: connect-with-no-symbol-file: Permission denied^M
	/bin/bash: line 0: exec: connect-with-no-symbol-file: cannot execute: \
	  Permission denied^M
	During startup program exited with code 126.^M
	Exiting^M
	target remote localhost:2385^M
	`connect-with-no-symbol-file' has disappeared; keeping its symbols.^M
	localhost:2385: Connection timed out.^M
	(gdb) FAIL: gdb.server/connect-with-no-symbol-file.exp: sysroot=: \
	  action=delete: connection to GDBserver succeeded
	...

	The expected series of events is (skipping disconnect and detach as I don't
	think they're relevant to the problem):
	- enter scenario "permission"
	- cp $exec.bak $exec
	- gdbserver start with $exec
	- chmod 000 $exec
	- connect to gdbserver
	- enter scenario "delete"
	- cp $exec.bak $exec
	- gdbserver start with $exec
	- delete $exec
	- connect to gdbserver

	The problem is that the chmod is executed using remote_spawn:
	...
	       } elseif { $action == "permission" } {
	         remote_spawn target "chmod 000 $target_exec"
	       }
	...
	without waiting on the resulting spawn id, so we're not sure when the
	chmod will have effect.

	The FAIL we're seeing above is explained by the chmod having effect during the
	delete scenario, after the "cp $exec.bak $exec" and before the "gdbserver
	start with $exec".

	Fix this by using remote_exec instead.

	Likewise, fix a similar case in gdb.mi/mi-exec-run.exp.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29726

2022-10-27  Nelson Chu  <nelson@rivosinc.com>

	RISC-V: Fix build failures for -Werror=sign-compare.
	elfnn-riscv.c: In function ‘riscv_relax_resolve_delete_relocs’:
	elfnn-riscv.c:4256:30: error: operand of ‘?:’ changes signedness from ‘int’ to ‘unsigned int’ due to unsignedness of other operand [-Werror=sign-compare]

	So make the operands unsigned could resolve problem.

	bfd/
	    * elfnn-riscv.c (riscv_relax_resolve_delete_relocs): Fixed build
	    failures for -Werror=sign-compare.

2022-10-27  Alan Modra  <amodra@gmail.com>

	Fuzzed files in archives
	Given a fuzzed object file in an archive with section size exceeding
	file size, objcopy will report an error like "section size (0xfeffffff
	bytes) is larger than file size (0x17a bytes)" but will create a copy
	of the object laid out for the large section.  That means a large
	temporary file on disk that is read back and written to the output
	archive, which can take a while.  The output archive is then deleted
	due to the error.  Avoid some of this silliness.

		* objcopy.c (copy_section): If section contents cannot be read
		set output section size to zero.

2022-10-27  Martin Liska  <mliska@suse.cz>

	tests: use canonical option name
	ld/ChangeLog:

		* testsuite/ld-size/size.exp: Use canonical option name.

2022-10-27  Alan Modra  <amodra@gmail.com>

	re: Support Intel AMX-FP16
	Fix these fails due to the target padding out sections with nops.
	x86_64-w64-mingw32  +FAIL: x86_64 AMX-FP16 insns
	x86_64-w64-mingw32  +FAIL: x86_64 AMX-FP16 insns (Intel disassembly)

		* testsuite/gas/i386/x86-64-amx-fp16-intel.d: Accept trailing nops.
		* testsuite/gas/i386/x86-64-amx-fp16.d: Likewise.

2022-10-27  Alan Modra  <amodra@gmail.com>

	Re: ld/testsuite: adjust ld-arm to run shared tests only when supported
	commit 67527cffcd enabled previously disabled tests unresolved-1-dyn,
	thumb-plt and thumb-plt-got for nacl.  The first fails due to trying
	to link against mixed-lib.so which isn't compiled for nacl.  The last
	two fail with
	objdump: tmpdir/dump(.rel.plt): relocation 0 has invalid symbol index 14885104
	and
	readelf: Error:  bad symbol index: 00e320f0 in reloc

	Relocation section '.rel.plt' at offset 0x128 contains 1 entry:
	 Offset     Info    Type                Sym. Value  Symbol's Name
	e320f000  e320f000 R_ARM_NONE

		* testsuite/ld-arm/arm-elf.exp: Disable unresolved-1-dyn,
		thumb-plt and thumb-plt-got for nacl.

2022-10-27  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-26  Simon Marchi  <simon.marchi@efficios.com>

	gdb/testsuite: fix gdb.guile/scm-parameter.exp "wrong type argument" test pattern for Guile >= 2.2
	Since commit 90319cefe3 ("GDB/Guile: Don't assert that an integer value
	is boolean"), I see:

	    FAIL: gdb.guile/scm-parameter.exp: kind=PARAM_ZINTEGER: test-PARAM_ZINTEGER-param: guile (set-parameter-value! test-PARAM_ZINTEGER-param #:unlimited)
	    FAIL: gdb.guile/scm-parameter.exp: kind=PARAM_ZUINTEGER: test-PARAM_ZUINTEGER-param: guile (set-parameter-value! test-PARAM_ZUINTEGER-param #:unlimited)

	This comes from the fact that GDB outputs this:

	    ERROR: In procedure set-parameter-value!:
	    In procedure gdbscm_set_parameter_value_x: Wrong type argument in position 2 (expecting integer): #:unlimited
	    Error while executing Scheme code.

	while the test expects an additional "ERROR:" on the second line,
	something like this:

	    ERROR: In procedure set-parameter-value!:
	    ERROR: In procedure gdbscm_set_parameter_value_x: Wrong type argument in position 2 (expecting integer): #:unlimited
	    Error while executing Scheme code.

	Guile 2.0 outputs the `ERROR:` on the second line, while later versions
	do not.  Change the pattern to accept both outputs.  This is similar to
	commit 6bbe1a929c6 ("[gdb/testsuite] Fix gdb.guile/scm-breakpoint.exp
	with guile 3.0").

	Change-Id: I9dc45e7492a4f08340cad974610242ed689de959

2022-10-26  Luis Machado  <luis.machado@arm.com>

	gdb/arm: Fix M-profile EXC_RETURN
	Arm v8-M Architecture Reference Manual,
	D1.2.95 EXC_RETURN, Exception Return Payload
	describes ES bit:

	"ES, bit [0]
	     Exception Secure. The security domain the exception was taken to.
	     The possible values of this bit are:
	       0 Non-secure.
	       1 Secure"

	arm-tdep.c:3443, arm_m_exception_cache () function tests this bit:

	  exception_domain_is_secure = (bit (lr, 0) == 0);

	The test is negated!

	Later on line 3553, the condition evaluates if an additional state
	context is stacked:

	  /* With the Security extension, the hardware saves R4..R11 too.  */
	  if (tdep->have_sec_ext && secure_stack_used
	      && (!default_callee_register_stacking || exception_domain_is_secure))

	RM, B3.19 Exception entry, context stacking
	reads:
	RPLHM "In a PE with the Security Extension, on taking an exception,
	the PE hardware:
	  ...
	  2. If exception entry requires a transition from Secure state to
	     Non-secure state, the PE hardware extends the stack frame and also
	     saves additional state context."

	So we should test for !exception_domain_is_secure instead of non-negated
	value!
	These two bugs compensate each other so unstacking works correctly.

	But another test of exception_domain_is_secure (negated due to the
	first bug) prevents arm_unwind_secure_frames to work as expected:

	  /* Unwinding from non-secure to secure can trip security
	     measures.  In order to avoid the debugger being
	     intrusive, rely on the user to configure the requested
	     mode.  */
	  if (secure_stack_used && !exception_domain_is_secure
	      && !arm_unwind_secure_frames)

	Test with GNU gdb (GDB) 13.0.50.20221016-git.
	Stopped in a non-secure handler:

	 (gdb) set arm unwind-secure-frames 0
	 (gdb) bt
	 #0  HAL_SYSTICK_Callback () at C:/dvl/stm32l5trustzone/GPIO_IOToggle_TrustZone/NonSecure/Src/nsmain.c:490
	 #1  0x0804081c in SysTick_Handler ()
	     at C:/dvl/stm32l5trustzone/GPIO_IOToggle_TrustZone/NonSecure/Src/nsstm32l5xx_it.c:134
	 #2  <signal handler called>
	 #3  HAL_GPIO_ReadPin (GPIOx=0x52020800, GPIO_Pin=8192)
	     at C:/dvl/stm32l5trustzone/GPIO_IOToggle_TrustZone/Drivers/STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_gpio.c:386
	 #4  0x0c000338 in SECURE_Mode () at C:/dvl/stm32l5trustzone/GPIO_IOToggle_TrustZone/Secure/Src/main.c:86
	 #5  0x080403f2 in main () at C:/dvl/stm32l5trustzone/GPIO_IOToggle_TrustZone/NonSecure/Src/nsmain.c:278
	 Backtrace stopped: previous frame inner to this frame (corrupt stack?)

	The frames #3 and #4 are secure. backtrace should stop before #3.

	Stopped in a secure handler:

	 (gdb) bt
	 #0  HAL_SYSTICK_Callback () at C:/dvl/stm32l5trustzone/GPIO_IOToggle_TrustZone/Secure/Src/main.c:425
	 #1  0x0c000b6a in SysTick_Handler ()
	     at C:/dvl/stm32l5trustzone/GPIO_IOToggle_TrustZone/Secure/Src/stm32l5xx_it.c:234
	 warning: Non-secure to secure stack unwinding disabled.
	 #2  <signal handler called>

	The exception from secure to secure erroneously stops unwinding. It should
	continue as far as the security unlimited backtrace:

	 (gdb) set arm unwind-secure-frames 1
	 (gdb) si <-- used to rebuild frame cache after change of unwind-secure-frames
	 0x0c0008e6      425       if (SecureTimingDelay != 0U)
	 (gdb) bt
	 #0  0x0c0008e6 in HAL_SYSTICK_Callback () at C:/dvl/stm32l5trustzone/GPIO_IOToggle_TrustZone/Secure/Src/main.c:425
	 #1  0x0c000b6a in SysTick_Handler ()
	     at C:/dvl/stm32l5trustzone/GPIO_IOToggle_TrustZone/Secure/Src/stm32l5xx_it.c:234
	 #2  <signal handler called>
	 #3  0x0c000328 in SECURE_Mode () at C:/dvl/stm32l5trustzone/GPIO_IOToggle_TrustZone/Secure/Src/main.c:88
	 #4  0x080403f2 in main () at C:/dvl/stm32l5trustzone/GPIO_IOToggle_TrustZone/NonSecure/Src/nsmain.c:278

	 Backtrace stopped: previous frame inner to this frame (corrupt stack?)

	Set exception_domain_is_secure to the value expected by its name.
	Fix exception_domain_is_secure usage in the additional state context
	stacking condition.

2022-10-26  Luis Machado  <luis.machado@arm.com>

	gdb/arm: fix IPSR field test in arm_m_exception_cache ()
	Arm v8-M Architecture Reference Manual,
	D1.2.141 IPSR, Interrupt Program Status Register reads
	"Exception, bits [8:0]"

	9 bits, not 8! It is uncommon but true!

2022-10-26  Luis Machado  <luis.machado@arm.com>

	gdb/arm: Terminate frame unwinding in M-profile lockup
	In the lockup state the PC value of the the outer frame is irreversibly
	lost. The other registers are intact so LR likely contains
	PC of some frame next to the outer one, but we cannot analyze
	the nearest outer frame without knowing its PC
	therefore we do not know SP fixup for this frame.

	The frame unwinder possibly gets mad due to the wrong SP value.
	To prevent problems terminate unwinding if PC contains the magic
	value of the lockup state.

	Example session wihtout this change,
	Cortex-M33 CPU in lockup, gdb 13.0.50.20221016-git:
	----------------
	  (gdb) c
	  Continuing.

	  Program received signal SIGINT, Interrupt.
	  0xeffffffe in ?? ()
	  (gdb) bt
	  #0  0xeffffffe in ?? ()
	  #1  0x0c000a9c in HardFault_Handler ()
	      at C:/dvl/stm32l5trustzone/GPIO_IOToggle_TrustZone/Secure/Src/stm32l5xx_it.c:99
	  #2  0x2002ffd8 in ?? ()
	  Backtrace stopped: previous frame identical to this frame (corrupt stack?)
	  (gdb)
	----------------
	The frame #1 is at correct PC taken from LR, #2 is a total nonsense.

	With the change:
	----------------
	  (gdb) c
	  Continuing.

	  Program received signal SIGINT, Interrupt.
	  warning: ARM M in lockup state, stack unwinding terminated.
	  <signal handler called>
	  (gdb) bt
	  #0  <signal handler called>
	  (gdb)
	----------------

	There is a visible drawback of emitting a warning in a cache buildnig routine
	as introduced in Torbjörn SVENSSON's
	[PATCH v4] gdb/arm: Stop unwinding on error, but do not assert
	The warning is printed just once and not repeated on each backtrace command.

2022-10-26  Mike Frysinger  <vapier@gentoo.org>

	gdb: copyright: make file header scan a bit more pythonic
	Should be functionally the same, but uses more pythonic idioms to get
	fewer lines of code, and to make sure to not leak open file handles.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-10-26  Mike Frysinger  <vapier@gentoo.org>

	gdb: make copyright.py interface a bit nicer
	This way people can run `./copyright.py --help` and get some info as
	to what this does without it going and modifying the tree.

	sim: testsuite: improve parallel test processing
	The current logic limits itself to a maxdepth of 4 when looking for
	results.  This wouldn't be a problem if cris didn't have a testsuite
	at a depth of 5 which we end up ignoring when summarizing.  Rather
	than bump the number from 4 to 5, rework the code so that we gather
	the exact set of tests that we tried to run.

2022-10-26  Alan Modra  <amodra@gmail.com>

	buffer overflow in _bfd_XX_print_ce_compressed_pdata
	More fuzzed fun.

		* peXXigen.c (_bfd_XX_print_ce_compressed_pdata): Use smaller of
		virt_size and bfd section size as limit of function table.

2022-10-26  Alan Modra  <amodra@gmail.com>

	Correct ELF reloc size sanity check
	The external reloc size check was wrong.  Here asect is the code/data
	section, not the reloc section.  So using this_hdr gave the size of
	the code/data section.

		* elf.c (_bfd_elf_get_reloc_upper_bound): Properly get
		external size from reloc headers.

2022-10-26  Alan Modra  <amodra@gmail.com>

	segfault in objdump.c reloc_at
	bfd_canonicalize_reloc returns -1L on errors.

		* objdump.c (load_specific_debug_section): Properly handle
		error return from bfd_canonicalize_reloc.

2022-10-26  Alan Modra  <amodra@gmail.com>

	som.c reloc sanity checking
	This patch checks that relocations emitted in som_write_fixups have
	offsets that are monotonic and within a section.  To do that properly
	using bfd_reloc_offset_in_range it is necessary to set the reloc howto
	size field, which isn't used otherwise by the som backend.  Note that
	the sizes used are not exactly those in the old sizing switch
	statement deleted from som_write_fixups, but all relocs handled by the
	main switch statement there get the same size.  Most unhandled relocs
	get a zero size (exceptions being R_RELOCATION, R_SPACE_REF,
	R_MILLI_REL, R_BREAKPOINT which all involve writing one word according
	to my SOM reference).  I figure it doesn't matter since any unhandled
	reloc is converted to 0xff R_RESERVED, and a default of zero is better
	for a "don't know" reloc.

	Besides tidying the code, stringizing name from type in SOM_HOWTO
	fixes R_REPEATED_INIT name.

		* som.c (SOM_HOWTO): Add SIZE arg, delete NAME.  Stringize type
		to name.
		(som_hppa_howto_table): Update with sizes.
		(som_write_fixups): Delete sizing switch statement.  Sanity check
		bfd_reloc address against subsection size.

2022-10-26  Alan Modra  <amodra@gmail.com>

	som.c buffer overflow
	Fuzzed object files can put random values in bfd_reloc->address,
	leading to large som_reloc_skip output.

		* som.c (som_write_fixups): Allow for maximal som_reloc_skip.

2022-10-26  Alan Modra  <amodra@gmail.com>

	PR29720, objdump -S crashes if build-id is missing
		PR 29720
		* objdump.c (slurp_file): Don't call debuginfod_find_source
		when build_id is NULL.

2022-10-26  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-25  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove spurious spaces after frame_info_ptr
	Fix some whitespace issues introduced with the frame_info_ptr patch.

	Change-Id: I158d30d8108c97564276c647fc98283ff7b12163

2022-10-25  Michael Matz  <matz@suse.de>

	x86-64: Use only one default max-page-size
	On x86-64 the default ELF_MAXPAGESIZE depends on a configure
	option (--disable-separate-code).  Since 9833b775
	("PR28824, relro security issues") we use max-page-size for relro
	alignment (with a short interval, from 31b4d3a ("PR28824, relro
	security issues, x86 keep COMMONPAGESIZE relro") to its revert
	a1faa5ea, where x86-64 only used COMMONPAGESIZE as relro alignment
	target).

	But that means that a linker configured with --disable-separate-code
	behaves different from one configured with --enable-separate-code
	(the default), _even if using "-z {no,}separate-code" option to use
	the non-configured behaviour_ .  In particular it means that when
	configuring with --disable-separate-code the linker will produce
	binaries aligned to 2MB pages on disk, and hence generate 2MB
	executables for a hello world (and even 6MB when linked with
	"-z separate-code").

	Generally we can't have constants that ultimately land in static
	variables be depending on configure options if those only influence
	behaviour that is overridable by command line options.

	So, do away with that, make the default MAXPAGESIZE be 4k (as is default
	for most x86-64 configs anyway, as most people won't configure with
	--disable-separate-code).  If people need more they can use the
	"-z max-page-size" (with would have been required right now for a
	default configure binutils).

	bfd/
		* elf64-x86-64.c (ELF_MAXPAGESIZE): Don't depend on
		DEFAULT_LD_Z_SEPARATE_CODE.

2022-10-25  Simon Marchi  <simon.marchi@efficios.com>

	gdb/testsuite: make sure to consume the prompt in gdb.base/unwind-on-each-insn.exp
	This test fails quite reliably for me when ran as:

	    $ taskset -c 1 make check TESTS="gdb.base/unwind-on-each-insn.exp" RUNTESTFLAGS="--target_board=native-gdbserver"

	or more simply:

	    $ make check-read1 TESTS="gdb.base/unwind-on-each-insn.exp"

	The problem is that the gdb_test_multiple call that grabs the frame id
	from "maint print frame-id" does not consume the prompt.  Well, it does
	sometimes due to the trailing .*, but not always.  If the prompt is not
	consumed, the tests that follow get confused:

	    FAIL: gdb.base/unwind-on-each-insn.exp: gdb_breakpoint: set breakpoint at *foo
	    FAIL: gdb.base/unwind-on-each-insn.exp: disassemble foo
	    FAIL: gdb.base/unwind-on-each-insn.exp: get $sp and frame base in foo: get hexadecimal valueof "$sp"
	    ... many more ...

	Use -wrap to make gdb_test_multiple consume the prompt.

	While at it, remove the bit that consumes the command name and do
	exp_continue, it's not really necessary.  And for consistency, do the
	same changes to the gdb_test_multiple that consumes the stack address,
	although that one was fine, it did consume the prompt explicitly.

	Change-Id: I2b7328c8844c7e98921ea494c4c05107162619fc
	Reviewed-By: Bruno Larsen <blarsen@redhat.com>

2022-10-25  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Handle missing .note.GNU-stack
	On openSUSE Tumbleweed I run into this for the dwarf assembly test-cases, and
	some hardcoded assembly test-cases:
	...
	 Running gdb.dwarf2/fission-absolute-dwo.exp ...
	 gdb compile failed, ld: warning: fission-absolute-dwo.o: \
	   missing .note.GNU-stack section implies executable stack
	 ld: NOTE: This behaviour is deprecated and will be removed in a future \
	   version of the linker

	                 === gdb Summary ===

	 # of untested testcases         1
	...

	Fix the dwarf assembly test-cases by adding the missing .note.GNU-stack in
	proc Dwarf::assemble.

	Fix the hard-coded test-cases using this command:
	...
	$ for f in $(find gdb/testsuite/gdb.* -name *.S); do
	    if ! grep -q note.GNU-stack $f; then
	      echo -e "\t.section\t.note.GNU-stack,\"\",@progbits" >> $f;
	    fi;
	  done
	...

	Likewise for .s files, and gdb/testsuite/lib/my-syscalls.S.

	The idiom for arm seems to be to use %progbits instead, see commit 9a5911c08be
	("gdb/testsuite/gdb.dwarf2: Replace @ with % for ARM compatability"), so
	hand-edit gdb/testsuite/gdb.arch/arm-disp-step.S to use %progbits instead.

	Note that dwarf assembly testcases use %progbits as decided by proc _section.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29674

2022-10-25  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add missing skip_gdbserver_tests in gdb.multi/attach-no-multi-process.exp
	I build gdb without gdbserver, and ran into:
	...
	(gdb) PASS: gdb.multi/attach-no-multi-process.exp: target_non_stop=off: \
	  switch to inferior 2
	spawn of  --once --multi localhost:2346 failed
	ERROR: tcl error sourcing attach-no-multi-process.exp.
	ERROR: tcl error code NONE
	ERROR: Timeout waiting for gdbserver response.
	...

	Add the missing skip_gdbserver_tests.

	Tested on x86_64-linux.

2022-10-25  Tom de Vries  <tdevries@suse.de>

	[gdb] Rewrite RETHROW_ON_TARGET_CLOSE_ERROR into function
	Recent commit b2829fcf9b5 ("[gdb] Fix rethrow exception slicing in
	insert_bp_location") introduced macro RETHROW_ON_TARGET_CLOSE_ERROR.

	I wrote this as a macro in order to have the rethrowing throw be part of the
	same function as the catch, but as it turns out that's not necessary.

	Rewrite into a function.

	Tested on x86_64-linux.

2022-10-25  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: internal_error -> internal_error_loc in gdb-gdb.gdb.in
	Commit f34652de0b ("internal_error: remove need to pass
	__FILE__/__LINE__") renamed the internal_error function to
	internal_error_loc.  Change gdb-gdb.gdb.in accordingly.

	Change-Id: I876e1623607b6becf74ade53d102ead53a74ed86

2022-10-25  Nelson Chu  <nelson@rivosinc.com>

	RISC-V: Should reset `again' flag for _bfd_riscv_relax_pc.
	The R_RISCV_DELETE relocations are no longer deleted at another relax pass,
	so we should reset 'again' flag to true for _bfd_riscv_relax_pc, while the
	deleted bytes are marked as R_RISCV_DELETE.

	bfd/
	    * elfnn-riscv.c (_bfd_riscv_relax_pc): Set `again' to true while the
	    deleted bytes are marked as R_RISCV_DELETE.

2022-10-25  Patrick O'Neill  <patrick@rivosinc.com>

	RISC-V: Improve link time complexity.
	The riscv port does deletion and symbol table update for each relocation
	while relaxing, so we are moving section bytes and scanning symbol table once
	for each relocation.  Compared to microblaze port, they record the relaxation
	changes into a table, then do the deletion and symbol table update once per
	section, rather than per relocation.  Therefore, they should have better link
	time complexity than us.

	To improve the link time complexity, this patch try to make the deletion in
	linear time.  Compared to record the relaxation changes into a table, we
	replace the unused relocation with R_RISCV_DELETE for the deleted bytes, and
	then resolve them at the end of the section.  Assuming the number of
	R_RISCV_DELETE is m, and the number of symbols is n, the total link complexity
	should be O(m) for moving section bytes, and O(m*n^2) for symbol table update.
	If we record the relaxation changes into the table, and then sort the symbol
	table by values, then probably can reduce the time complexity to O(m*n*log(n))
	for updating symbol table, but it doesn't seem worth it for now.

	bfd/
	    * elfnn-riscv.c (_riscv_relax_delete_bytes): Renamed from
	    riscv_relax_delete_bytes, updated to reduce the tiem complexity to O(m)
	    for memmove.
	    (typedef relax_delete_t): Function pointer declaration of delete functions.
	    (riscv_relax_delete_bytes): Can choose to use _riscv_relax_delete_piecewise
	    or _riscv_relax_delete_immediate for deletion.
	    (_riscv_relax_delete_piecewise): Just mark the deleted bytes as R_RISCV_DELETE.
	    (_riscv_relax_delete_immediate): Delete some bytes from a section while
	    relaxing.
	    (riscv_relax_resolve_delete_relocs): Delete the bytes for R_RISCV_DELETE
	    relocations from a section, at the end of _bfd_riscv_relax_section.
	    (_bfd_riscv_relax_call): Mark deleted bytes as R_RISCV_DELETE by reusing
	    R_RISCV_RELAX.
	    (_bfd_riscv_relax_lui): Likewise, but reuse R_RISCV_HI20 for lui, and reuse
	    R_RISCV_RELAX for c.lui.
	    (_bfd_riscv_relax_tls_le): Likewise, but resue R_RISCV_TPREL_HI20 and
	    R_RISCV_TPREL_ADD.
	    (_bfd_riscv_relax_pc): Likewise, but resue R_RISCV_PCREL_HI20 for auipc.
	    (_bfd_riscv_relax_align): Updated, don't need to resue relocation since
	    calling _riscv_relax_delete_immediate.
	    (_bfd_riscv_relax_delete): Removed.
	    (_bfd_riscv_relax_section): Set riscv_relax_delete_bytes for each relax_func,
	    to delete bytes immediately or later.  Call riscv_relax_resolve_delete_relocs
	    to delete bytes for DELETE relocations from a section.

2022-10-25  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-24  Andrew Burgess  <aburgess@redhat.com>

	gdb/doc: reword description of DisassembleInfo.read_memory
	While reading the documentation of DisassembleInfo.read_memory I
	spotted the word 'available' in one sentence where it didn't make
	sense.

2022-10-24  Andrew Burgess  <aburgess@redhat.com>

	sim/lm32: fix some missing function declaration warnings
	In the lm32 simulator, I was seeing some warnings about missing
	function declarations.

	The lm32 simulator has a weird header structure, in order to pull in
	the full cpu.h header we need to define WANT_CPU_LM32BF.  This is done
	in some files, but not in others.  Critically, it's not done in some
	files that then use functions declared in cpu.h

	In this commit I added the missing #define so that the full cpu.h can
	be included.

	After doing this there are still a few functions that are used
	undeclared, these functions appear to be missing any declarations at
	all, so I've added some to cpu.h.

	With this done all the warnings when compiling lm32 are resolved for
	both gcc and clang, so I've removed the SIM_WERROR_CFLAGS line from
	Makefile.in, this allows lm32 to build with -Werror.

2022-10-24  Andrew Burgess  <aburgess@redhat.com>

	sim/h8300: avoid self assignment
	There are two places in the h8300 simulator where we assign a variable
	to itself.  Clang gives a warning for this, which is converted into an
	error by -Werror.

	Silence the warning by removing the self assignments.  As these
	assignments were in a complex if/then/else tree, rather than try to
	adjust all the conditions, I've just replaced the self assignments
	with a comment and an empty statement.

2022-10-24  Andrew Burgess  <aburgess@redhat.com>

	sim/aarch64: remove two unused functions
	These functions are not used.  Clang warns about the unused functions,
	which is then converted into an error by -Werror.

	Delete the unused functions.

2022-10-24  Andrew Burgess  <aburgess@redhat.com>

	sim/ppc: fix for operator precedence warning from clang
	In the ppc simulator, clang was warning about some code like this:

	  busy_ptr->nr_writebacks = 1 + (PPC_ONE_BIT_SET_P(out_vmask)) ? 1 : 2;

	The warning was:

	  operator '?:' has lower precedence than '+'; '+' will be evaluated first

	I suspect that this is not the original authors intention.
	PPC_ONE_BIT_SET_P is going to be 0 or 1, so if we evaluate the '+'
	first, the condition will always be non-zero, so true.  The whole
	expression could then be simplified to just '1', which doesn't make
	much sense.

	I suspect the answer the author was expecting was either 2 or 3.  Why
	they didn't just write:

	  busy_ptr->nr_writebacks = (PPC_ONE_BIT_SET_P(out_vmask)) ? 2 : 3;

	I have no clue, however, to keep the structure of the code unchanged,
	I've updated things to:

	  busy_ptr->nr_writebacks = 1 + (PPC_ONE_BIT_SET_P (out_vmask) ? 1 : 2);

	which silences the warning from clang, and is, I am guessing, what the
	original author intended.

2022-10-24  Andrew Burgess  <aburgess@redhat.com>

	sim/ppc: initialize a memory buffer in all cases
	In the ppc simulator's do_fstat function, which provides the fstat
	call for the simulator, if the fstat is going to fail then we
	currently write an uninitialized buffer into the simulated target.

	In theory, I think this is fine, we also write the error status into
	the simulated target, so, given that the fstat has failed, the target
	shouldn't be relying on the buffer contents.

	However, writing an uninitialized buffer means we might leak simulator
	private data into the simulated target, which is probably a bad thing.
	Plus it probably makes life easier if something consistent, like all
	zeros, is written rather than random junk, which might look like a
	successful call (except for the error code).

	So, in this commit, I initialize the stat buffer to zero before
	it is potentially used.  If the stat call is not made then the buffer
	will be left initialized as all zeros.

2022-10-24  Andrew Burgess  <aburgess@redhat.com>

	sim/ppc: don't try to print an uninitialized variable
	The ppc simulator, in sim_create_inferior, tries to print the function
	local entry_point variable before the variable is initialized.

	In this commit, I defer the debug print line until the variable has
	been initialized.

2022-10-24  Andrew Burgess  <aburgess@redhat.com>

	sim/sh: use fabs instead of abs
	The sh simulator incorrectly uses integer abs instead of the floating
	point fabs on some floating point values, fixed in this commit.

2022-10-24  Tom de Vries  <tdevries@suse.de>

	[gdb] Fix rethrow exception slicing in insert_bp_location
	The preferred way of rethrowing an exception is by using throw without
	expression, because it avoids object slicing of the exception [1].

	Fix this in insert_bp_location.

	Tested on x86_64-linux.

	[1] https://en.cppreference.com/w/cpp/language/throw

	Approved-By: Andrew Burgess <aburgess@redhat.com>

2022-10-24  Tom de Vries  <tdevries@suse.de>

	[gdb] Fix rethrow exception slicing in pretty_print_insn
	The preferred way of rethrowing an exception is by using throw without
	expression, because it avoids object slicing of the exception [1].

	Fix this in gdb_pretty_print_disassembler::pretty_print_insn.

	Tested on x86_64-linux.

	[1] https://en.cppreference.com/w/cpp/language/throw

	Approved-By: Andrew Burgess <aburgess@redhat.com>

2022-10-24  Clément Chigot  <chigot@adacore.com>

	ld/testsuite: adjust ld-arm to run shared tests only when supported
	If a custom arm-elf target is disabling the shared support, a lot of
	failures are reported by the testsuite.
	Moreover, some tests try to access libraries which have been explicitly
	skipped earlier (eg mixed-lib.so).

	ld/ChangeLog:

		* testsuite/ld-arm/arm-elf.exp: Separate tests needing shared
		lib support.

2022-10-24  Clément Chigot  <chigot@adacore.com>

	ld/testsuite: skip ld-elf/exclude when -shared is not supported
	ld/ChangeLog:

		* testsuite/ld-elf/exclude.exp: Call check_shared_lib_support.
		to skip for all targets without shared lib support.

2022-10-24  Jan Beulich  <jbeulich@suse.com>

	x86: consolidate VPCLMUL tests
	There's little point in having Intel syntax disassembler tests when the
	purpose of a test is assembler functionality: Drop all
	*avx512*_vpclmulqdq-wig1-intel.

	For *avx512*_vpclmulqdq-wig1 share source with *avx512*_vpclmulqdq.

	Finally put in place similar tests for -mvexwig=1.

2022-10-24  Jan Beulich  <jbeulich@suse.com>

	x86: consolidate VAES tests
	There's little point in having Intel syntax disassembler tests when the
	purpose of a test is assembler functionality: Drop all
	*avx512*_vaes-wig1-intel.

	For *avx512*_vaes-wig1 share source with *avx512*_vaes. This in
	particular makes sure that the 32-bit VL test actually tests any EVEX
	encodings in the first place.

	Finally put in place similar tests for -mvexwig=1.

2022-10-24  Jan Beulich  <jbeulich@suse.com>

	x86: emit {evex} prefix when disassembling ambiguous AVX512VL insns
	When no AVX512-specific functionality is in use, the disassembly of
	AVX512VL insns is indistinguishable from their AVX counterparts (if such
	exist). Emit the {evex} pseudo-prefix in such cases.

	Where applicable drop stray uses of PREFIX_OPCODE from table entries.

2022-10-24  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add skip_python_tests in gdb.python/tui-window-names.exp
	I did a gdb build without python support, and during testing ran into FAILs in
	test-case gdb.python/tui-window-names.exp.

	Fix this by adding the missing skip_python_test.

	Tested on x86_64-linux.

2022-10-24  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-23  Mike Frysinger  <vapier@gentoo.org>

	sim: testsuite: update ignored .exp files [PR sim/29596]
	Now that we run `check/foo.exp` instead of `check/./foo.exp`,
	update the config/ & lib/ exceptions to cover both paths.

	Bug: https://sourceware.org/PR29596

2022-10-23  Mike Frysinger  <vapier@gentoo.org>

	sim: testsuite: tweak parallel find invocation [PR sim/29596]
	Make sure we invoke runtest with the same exp filenames when running in
	parallel as it will find when run single threaded.  When `runtest` finds
	files itself, it will use paths like "aarch64/allinsn.exp".  When we run
	`find .` with the %p option, it produces "./aarch64/allinsn.exp".  Switch
	to %P to get "aarch64/allinsn.exp".

	Bug: https://sourceware.org/PR29596

2022-10-23  Mike Frysinger  <vapier@gentoo.org>

	sim: mips/ppc/riscv: re-add AC_CANONICAL_SYSTEM [PR sim/29439]
	These configure scripts check $target and change behavior.  They
	shouldn't be doing that, but until we can rework the sim to change
	behavior based on the input ELF, restore AC_CANONICAL_SYSTEM to
	these so that $target is correctly populated.

	This was lost in the d3562f83a7b8a1ae6e333cd5561419d3da18fcb4
	("sim: unify toolchain probing logic") refactor as the logic was
	hoisted up to the common code.  But the fact the vars weren't
	passed down to the sub-configure scripts was missed.

	Bug: https://sourceware.org/PR29439

2022-10-23  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-22  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: add max number of instructions check in gdb.base/unwind-on-each-insn.exp
	This test sends my CI in an infinite loop of failures.   We expect to
	have a handful of iterations (5 on my development machine, where the
	test passes fine)but the log shows that it went up to 104340 iterations:

	    FAIL: gdb.base/unwind-on-each-insn.exp - instruction 104340: maint print frame-id
	    DUPLICATE: gdb.base/unwind-on-each-insn.exp - instruction 104340: maint print frame-id
	    FAIL: gdb.base/unwind-on-each-insn.exp - instruction 104340: [string equal $fid $main_fid]
	    FAIL: gdb.base/unwind-on-each-insn.exp - instruction 104340: get hexadecimal valueof "$pc"

	Add a max instruction check, exit the loop if we reach 100 iterations.
	This should allow the test to fail fast if there's a problem, but 100
	iterations should be more than enough for when things are working.

	Change-Id: I77978d593aca046068f9209272d82e1675ba17c2

2022-10-22  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-21  Pedro Alves  <pedro@palves.net>

	Improve Python Unwinders documentation
	- avoid "GDB proper" to refer to global locus, as object files and
	  program spaces are also GDB proper.

	- gdb.register_unwinder does not accept locus=gdb.

	- "a unwinder" -> "an unwinder"

	Approved-by: Eli Zaretskii <eliz@gnu.org>
	Change-Id: I98c1b1000e1063815238e945ca71ec6f37b5702e

2022-10-21  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: make inherit_abstract_dies use vector iterators
	Small cleanup to use std::vector iterators rather than raw pointers.

	Approved-By: Tom Tromey <tom@tromey.com>
	Change-Id: I8d50dbb3f2d8dad7ff94066a578d523f1f31b590

2022-10-21  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: check for empty offsets vector in inherit_abstract_dies
	When building GDB with clang and --enable-ubsan, I get:

	  UNRESOLVED: gdb.dwarf2/frame-inlined-in-outer-frame.exp: starti prompt

	The cause being:

	    $ ./gdb --data-directory=data-directory -nx -q -readnow testsuite/outputs/gdb.dwarf2/frame-inlined-in-outer-frame/frame-inlined-in-outer-frame
	    Reading symbols from testsuite/outputs/gdb.dwarf2/frame-inlined-in-outer-frame/frame-inlined-in-outer-frame...
	    Expanding full symbols from testsuite/outputs/gdb.dwarf2/frame-inlined-in-outer-frame/frame-inlined-in-outer-frame...
	    /home/simark/src/binutils-gdb/gdb/dwarf2/read.c:11954:47: runtime error: applying non-zero offset 8 to null pointer

	I found this to happen with ld-linux on at least Arch Linux and Ubuntu
	22.04:

	    $ ./gdb --data-directory=data-directory -nx -q -readnow -iex "set debuginfod enabled on" /lib64/ld-linux-x86-64.so.2
	    Reading symbols from /lib64/ld-linux-x86-64.so.2...
	    Reading symbols from /home/simark/.cache/debuginfod_client/22bd7a2c03d8cfc05ef7092bfae5932223189bc1/debuginfo...
	    Expanding full symbols from /home/simark/.cache/debuginfod_client/22bd7a2c03d8cfc05ef7092bfae5932223189bc1/debuginfo...
	    /home/simark/src/binutils-gdb/gdb/dwarf2/read.c:11954:47: runtime error: applying non-zero offset 8 to null pointer

	The problem happens when doing this:

	    sect_offset *offsetp = offsets.data () + 1

	When `offsets` is an empty vector, `offsets.data ()` returns nullptr.
	Fix it by wrapping that in a `!offsets.empty ()` check.

	Change-Id: I6d29ba2fe80ba4308f68effd9c57d4ee8d67c29f
	Approved-By: Tom Tromey <tom@tromey.com>

2022-10-21  Fangrui Song  <maskray@google.com>

	readelf: support zstd compressed debug sections [PR 29640]

2022-10-21  Tom Tromey  <tromey@adacore.com>

	Fix incorrect .gdb_index with new DWARF scanner
	PR symtab/29694 points out a regression caused by the new DWARF
	scanner when the cc-with-gdb-index target board is used.

	What happens here is that an older version of gdb will make an index
	describing the "A" type as:

	[737] A: 1 [global, type]

	whereas the new gdb says:

	[1008] A: 0 [global, type]

	Here the old one is correct because the A in CU 0 is just a
	declaration without a size:

	 <1><45>: Abbrev Number: 10 (DW_TAG_structure_type)
	    <46>   DW_AT_name        : A
	    <48>   DW_AT_declaration : 1
	    <48>   DW_AT_sibling     : <0x6d>

	This patch fixes the problem by introducing the idea of a "type
	declaration".  I think gdb still needs to recurse into these types,
	searching for methods, but by marking the type itself as a
	declaration, gdb can skip this type during lookups and when writing
	the index.

	Regression tested on x86-64 using the cc-with-gdb-index board.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29694

2022-10-21  Tom Tromey  <tromey@adacore.com>

	Fix crash in value_print_array_elements
	A user noticed that gdb would crash when printing a packed array after
	doing "set lang c".  Packed arrays don't exist in C, but it's
	occasionally useful to print things in C mode when working in a non-C
	language -- this lets you see under the hood a little bit.

	The bug here is that generic value printing does not handle packed
	arrays at all.  This patch fixes the bug by introducing a new function
	to extract a value from a bit offset and width.

	The new function includes a hack to avoid problems with some existing
	test cases when using -fgnat-encodings=all.  Cleaning up this code
	looked difficult, and since "all" is effectively deprecated, I thought
	it made sense to simply work around the problems.

2022-10-21  Tom Tromey  <tromey@adacore.com>

	Fix bug in Ada packed array handling
	A user found a bug where an array of packed arrays was printed
	incorrectly.  The bug here is that the packed array has a bit stride,
	but the outer array does not -- and should not.  However,
	update_static_array_size does not distinguish between an array of
	packed arrays and a multi-dimensional packed array, and for the
	latter, only the innermost array will end up with a stride.

	This patch fixes the problem by adding a flag to indicate whether a
	given array type is a constituent of a multi-dimensional array.

2022-10-21  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: declare variables on first use in inherit_abstract_dies
	Move variable declarations to where they are first use, plus some random
	style fixes.

	Change-Id: Idf40d60f9034996fa6a234165cd989a721eb4148

2022-10-21  Nick Clifton  <nickc@redhat.com>

	Add a -w option to the linker to suppress warning and error messages.
		PR 29654
		* ld.h (struct ld_config_type): Add no_warnings field.
		* ldlex.h (enum option_values): Add OPTION_NO_WARNINGS.
		* lexsup.c (ld_options): Add --no-warnings.
		(parse_args): Add support for -w and --no-warnings.
		* ldmisc.c (vfinfo): Return early if the message is a warning and
		-w has been enabled.
		* ld.texi (options): Document new command line option.
		* NEWS: Mention the new feature.

	Add a note to the binutils/NEWS file about DCO signed contributions.

2022-10-21  Bruno Larsen  <blarsen@redhat.com>

	gdb/reverse: Fix stepping over recursive functions
	Currently, when using GDB to do reverse debugging, if we try to use the
	command "reverse next" to skip a recursive function, instead of skipping
	all of the recursive calls and stopping in the previous line, we stop at
	the second to last recursive call, and need to manually step backwards
	until we leave the first call.  This is well documented in PR gdb/16678.

	This bug happens because when GDB notices that a reverse step has
	entered into a function, GDB will add a step_resume_breakpoint at the
	start of the function, then single step out of the prologue once that
	breakpoint is hit.  The problem was happening because GDB wouldn't give
	that step_resume_breakpoint a frame-id, so the first time the breakpoint
	was hit, the inferior would be stopped.  This is fixed by giving the
	current frame-id to the breakpoint.

	This commit also changes gdb.reverse/step-reverse.c to contain a
	recursive function and attempt to both, skip it altogether, and to skip
	the second call from inside the first call, as this setup broke a
	previous version of the patch.

2022-10-21  Bruno Larsen  <blarsen@redhat.com>

	Change calculation of frame_id by amd64 epilogue unwinder
	When GDB is stopped at a ret instruction and no debug information is
	available for unwinding, GDB defaults to the amd64 epilogue unwinder, to
	be able to generate a decent backtrace. However, when calculating the
	frame id, the epilogue unwinder generates information as if the return
	instruction was the whole frame.

	This was an issue especially when attempting to reverse debug, as GDB
	would place a step_resume_breakpoint from the epilogue of a function if
	we were to attempt to skip that function, and this breakpoint should
	ideally have the current function's frame_id to avoid other problems
	such as PR record/16678.

	This commit changes the frame_id calculation for the amd64 epilogue,
	so that it is always the same as the dwarf2 unwinder's frame_id.

	It also adds a test to confirm that the frame_id will be the same,
	regardless of using the epilogue unwinder or not, thanks to Andrew
	Burgess.

	Co-Authored-By: Andrew Burgess <aburgess@redhat.com>

2022-10-21  Nick Clifton  <nickc@redhat.com>

	Updated Hungarian translation for the gprof sub-directory.
		* po/hu.po: Updated Hungarian translation.

2022-10-21  Maciej W. Rozycki  <macro@embecosm.com>

	GDB/Python: Make `None' stand for `unlimited' in setting integer parameters
	Similarly to booleans and following the fix for PR python/29217 make
	`gdb.parameter' accept `None' for `unlimited' with parameters of the
	PARAM_UINTEGER, PARAM_INTEGER, and PARAM_ZUINTEGER_UNLIMITED types, as
	`None' is already returned by parameters of the two former types, so
	one might expect to be able to feed it back.  It also makes it possible
	to avoid the need to know what the internal integer representation is
	for the special setting of `unlimited'.

	Expand the testsuite accordingly.

	Approved-By: Simon Marchi <simon.marchi@polymtl.ca>

2022-10-21  Maciej W. Rozycki  <macro@embecosm.com>

	GDB/testsuite: Expand Python integer parameter coverage across all types
	Also verify PARAM_UINTEGER, PARAM_INTEGER, and PARAM_ZINTEGER parameter
	types, in addition to PARAM_ZUINTEGER and PARAM_ZUINTEGER_UNLIMITED
	already covered, and verify a choice of existing GDB parameters.  Add
	verification for reading parameters via `<parameter>.value' in addition
	to `gdb.parameter('<parameter>')' as this covers different code paths.

	Approved-By: Simon Marchi <simon.marchi@polymtl.ca>

2022-10-21  Maciej W. Rozycki  <macro@embecosm.com>

	GDB/Guile: Don't assert that an integer value is boolean
	Do not assert that a value intended for an integer parameter, of either
	the PARAM_UINTEGER or the PARAM_ZUINTEGER_UNLIMITED type, is boolean,
	causing error messages such as:

	ERROR: In procedure make-parameter:
	ERROR: In procedure gdbscm_make_parameter: Wrong type argument in position 15 (expecting integer or #:unlimited): 3
	Error while executing Scheme code.

	when initialization with a number is attempted.  Instead assert that it
	is integer.  Keep matching `#:unlimited' keyword as an alternative.  Add
	suitable test cases.

	Approved-By: Simon Marchi <simon.marchi@polymtl.ca>

2022-10-21  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Silence compilation fail in gdb.base/rtld-step.exp
	With gcc 7.5.0 and test-case gdb.base/rtld-step.exp, I run into:
	...
	gdb compile failed, gcc: error: unrecognized command line option \
	  '-static-pie'; did you mean '-static'?
	...

	Silence this by checking in the test-case that -static-pie is supported, and
	emitting instead:
	...
	UNTESTED: gdb.base/rtld-step.exp: \
	  failed to compile (-static-pie not supported or static libc missing)
	...

	Tested on x86_64-linux, with:
	- gcc 7.5.0: UNTESTED
	- gcc 12.2.1 with static glibc not installed: UNTESTED
	- gcc 12.2.1 with static glibc installed: PASS

2022-10-21  Cui,Lili  <lili.cui@intel.com>

	Support Intel AMX-FP16
	gas/

		* NEWS: Add support for Intel AMX-FP16 instruction.
		* config/tc-i386.c: Add amx_fp16.
		* doc/c-i386.texi: Document .amx_fp16.
		* testsuite/gas/i386/i386.exp: Add AMX-FP16 tests.
		* testsuite/gas/i386/x86-64-amx-fp16-intel.d: New test.
		* testsuite/gas/i386/x86-64-amx-fp16.d: Likewise.
		* testsuite/gas/i386/x86-64-amx-fp16.s: Likewise.
		* testsuite/gas/i386/x86-64-amx-fp16-bad.d: Likewise.
		* testsuite/gas/i386/x86-64-amx-fp16-bad.s: Likewise.

	opcodes/

		* i386-dis.c (MOD_VEX_0F385C_X86_64_P_3_W_0): New.
		(VEX_LEN_0F385C_X86_64_P_3_W_0_M_0): Likewise.
		(VEX_W_0F385C_X86_64_P_3): Likewise.
		(prefix_table): Add VEX_W_0F385C_X86_64_P_3.
		(vex_len_table): Add VEX_LEN_0F385C_X86_64_P_3_W_0_M_0.
		(vex_w_table): Add VEX_W_0F385C_X86_64_P_3.
		(mod_table): Add MOD_VEX_0F385C_X86_64_P_3_W_0.
		* i386-gen.c (cpu_flag_init): Add AMX-FP16_FLAGS.
		(CPU_ANY_AMX_TILE_FLAGS): Add CpuAMX_FP16.
		(cpu_flags): Add CpuAMX-FP16.
		* i386-opc.h (enum): Add CpuAMX-FP16.
		(i386_cpu_flags): Add cpuamx_fp16.
		* i386-opc.tbl: Add Intel AMX-FP16 instruction.
		* i386-init.h: Regenerate.
		* i386-tbl.h: Likewise.

2022-10-21  Tsukasa OI  <research_trasio@irq.a4lg.com>

	sim: Remove unused CXXFLAGS substitution
	Not only that sim/configure.ac does not AC_SUBST CXXFLAGS,
	unless we need C++ compiler like CXX, substitution @CXXFLAGS@ is useless.
	Because of this, this commit removes this substitution.

2022-10-21  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-20  H.J. Lu  <hjl.tools@gmail.com>

	x86: Check VEX/EVEX encoding before checking vector operands
	Since

	commit 837e225ba1992f9745e5bbbd5e8443243a7f475f
	Author: Jan Beulich <jbeulich@suse.com>
	Date:   Thu Oct 20 10:01:12 2022 +0200

	    x86: re-work AVX-VNNI support

	moved AVX-VNNI after AVX512-VNNI, vector Disp8 is applied even when VEX
	encoding is selected.  Check VEX/EVEX encoding before checking vector
	operands to avoid vector Disp8 with VEX encoding.

		PR gas/29708
		* config/tc-i386.c (match_template): Check VEX/EVEX encoding
		before checking vector operands.
		* testsuite/gas/i386/avx-vnni.d: Updated.
		* testsuite/gas/i386/x86-64-avx-vnni.d: Likewise.
		* testsuite/gas/i386/avx-vnni.s: Add a Disp32 test.
		* testsuite/gas/i386/x86-64-avx-vnni.s: Likewise.

2022-10-20  Andrew Burgess  <aburgess@redhat.com>

	gdb/python: break more dependencies between gdbpy_initialize_* functions
	In a later commit in this series I will propose removing all of the
	explicit gdbpy_initialize_* calls from python.c and replace these
	calls with a more generic mechanism.

	One of the side effects of this generic mechanism is that the order in
	which the various Python sub-systems within GDB are initialized is no
	longer guaranteed.

	On the whole I don't think this matters, most of the sub-systems are
	independent of each other, though testing did reveal a few places
	where we did have dependencies, though I don't think those
	dependencies were explicitly documented in comment anywhere.

	This commit is similar to the previous one, and fixes the second
	dependency issue that I found.

	In this case the finish_breakpoint_object_type uses the
	breakpoint_object_type as its tp_base, this means that
	breakpoint_object_type must have been initialized with a call to
	PyType_Ready before finish_breakpoint_object_type can be initialized.

	Previously we depended on the ordering of calls to
	gdbpy_initialize_breakpoints and gdbpy_initialize_finishbreakpoints in
	python.c.

	After this commit a new function gdbpy_breakpoint_init_breakpoint_type
	exists, this function ensures that breakpoint_object_type has been
	initialized, and can be called from any gdbpy_initialize_* function.

	I feel that this change makes the dependency explicit, which I think
	is a good thing.

	There should be no user visible changes after this commit.

2022-10-20  Andrew Burgess  <aburgess@redhat.com>

	gdb/python: break dependencies between gdbpy_initialize_* functions
	In a later commit in this series I will propose removing all of the
	explicit gdbpy_initialize_* calls from python.c and replace these
	calls with a more generic mechanism.

	One of the side effects of this generic mechanism is that the order in
	which the various Python sub-systems within GDB are initialized is no
	longer guaranteed.

	On the whole I don't think this matters, most of the sub-systems are
	independent of each other, though testing did reveal a few places
	where we did have dependencies, though I don't think those
	dependencies were explicitly documented in a comment anywhere.

	This commit removes the first dependency issue, with this and the next
	commit, all of the implicit inter-sub-system dependencies will be
	replaced by explicit dependencies, which will allow me to, I think,
	clean up how the sub-systems are initialized.

	The dependency is around the py_insn_type.  This type is setup in
	gdbpy_initialize_instruction and used in gdbpy_initialize_record.
	Rather than depend on the calls to these two functions being in a
	particular order, in this commit I propose adding a new function
	py_insn_get_insn_type.  This function will take care of setting up the
	py_insn_type type and calling PyType_Ready.  This helper function can
	be called from gdbpy_initialize_record and
	gdbpy_initialize_instruction, and the py_insn_type will be initialized
	just once.

	To me this is better, the dependency is now really obvious, but also,
	we no longer care in which order gdbpy_initialize_record and
	gdbpy_initialize_instruction are called.

	There should be no user visible changes after this commit.

2022-10-20  Andrew Burgess  <aburgess@redhat.com>

	gdb: some int to bool conversion in breakpoint.c
	Some int to bool conversion in breakpoint.c.  I've only updated the
	function signatures of static functions, but I've updated some
	function local variables throughout the file.

	There should be no user visible changes after this commit.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-10-20  Andrew Burgess  <aburgess@redhat.com>

	gdb: make use of scoped_restore in unduplicated_should_be_inserted
	I noticed that we could make use of a scoped_restore in the function
	unduplicated_should_be_inserted.  I've also converted the function
	return type from int to bool.

	This change shouldn't make any difference, as I don't think anything
	within should_be_inserted could throw an exception, but the change
	doesn't hurt, and will help keep us safe if anything ever changes in
	the future.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-10-20  Andrew Burgess  <aburgess@redhat.com>

	gdb: used scoped_restore_frame in update_watchpoint
	I was doing some int to bool cleanup in update_watchpoint, and I
	noticed a manual version of scoped_restore_selected_frame.  As always
	when these things are done manually, there is the chance that, in an
	error case, we might leave the wrong frame selected.

	This commit updates things to use scoped_restore_selected_frame, and
	also converts a local variable from int to bool.

	The only user visible change after this commit is in the case where
	update_watchpoint throws an error - we should now correctly restore
	the previously selected frame.  Otherwise, this commit should be
	invisible to the user.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-10-20  Andrew Burgess  <aburgess@redhat.com>

	gdb: make some bp_location arguments const in breakpoint.c
	I spotted a few places where I could make some 'bp_location *'
	arguments constant in breakpoint.c.

	There should be no user visible changes after this commit.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>

2022-10-20  Дилян Палаузов  <dilyan.palauzov@aegee.org>

	Reapply "Don't build readline/libreadline.a, when --with-system-readline is supplied"
	Commit 228cf97dd3c8 ("Merge configure.ac from gcc project") undid the
	change originally done in commit 69961a84c9b ("Don't build
	readline/libreadline.a, when --with-system-readline is supplied").
	Re-apply it.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=18632

2022-10-20  Jan Beulich  <jbeulich@suse.com>

	x86: re-work AVX-VNNI support
	By putting the templates after their AVX512 counterparts, the AVX512
	flavors will be picked by default. That way the need to always use {vex}
	ceases to exist once respective CPU features (AVX512-VNNI or AVX512VL as
	a whole) have been disabled. This way the need for the PseudoVexPrefix
	attribute also disappears.

2022-10-20  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.debuginfod/fetch_src_and_symbols.exp with check-read1
	With test-case gdb.debuginfod/fetch_src_and_symbols.exp and check-read1, I run
	into:
	...
	(gdb) FAIL: gdb.debuginfod/fetch_src_and_symbols.exp: local_url: \
	  file fetch_src_and_symbols (got interactive prompt)
	...

	The problem is that this output:
	...
	Enable debuginfod for this session? (y or [n]) y^M
	...
	is matched using regexp "Enable debuginfod?.*" with matches only the first two
	words of the output, after which an implicit clause in gdb_test_multiple triggers
	on the second part containing the interactive prompt.

	Fix this by included the interactive prompt in the regexp.

	Tested on x86_64-linux.

2022-10-20  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.mi/mi-disassemble.exp with check-read1
	With test-case gdb.mi/mi-disassemble.exp and check-read1 I run into:
	...
	FAIL: gdb.mi/mi-disassemble.exp: disassemble /b main
	FAIL: gdb.mi/mi-disassemble.exp: get valueof "*((unsigned char *) 0x400549)"
	...

	The problem for both FAILs is that the output is parsed using
	gdb_test_multiple, which has implicit clauses using $gdb_prompt, which can
	match before the explicit clauses using $mi_gdb_prompt.

	Fix this by passing -prompt "$mi_gdb_prompt$" to gdb_test_multiple.

	Tested on x86-64-linux.

2022-10-20  Alan Modra  <amodra@gmail.com>

	Re: aarch64-pe support for LD, GAS and BFD
	Fix dependencies for eaarch64pe.c.  Generated files aren't handled
	fully automatically.

2022-10-20  Mark Harmstone  <mark@harmstone.com>

	ld: Add minimal pdb generation

	ld: Add --pdb option
	Second patch incorporates fixes for endian and UB issues in calc_hash, as per
	https://sourceware.org/pipermail/binutils/2022-October/123514.html.

2022-10-20  Kevin Buettner  <kevinb@redhat.com>

	Test stepping within a runtime loader / dynamic linker
	See the remarks in rtld-step.exp for a description of what this
	test is about.

	This test case has been tested using gcc on the following x86-64 Linux
	distributions/releases:

	    Fedora 28
	    Fedora 32
	    Fedora 33
	    Fedora 34
	    Fedora 35
	    Fedora 36
	    Fedora 37
	    rawhide (f38)
	    RHEL 9.1
	    Ubuntu 22.04.1 LTS

	It's also been tested (and found to be working) with
	RUNTESTFLAGS="CC_FOR_TARGET=clang" on all of the above expect for
	Fedora 28.  The (old) version of clang available on F28 did not
	accept the -static-pie option.

	I also tried to make this test work on FreeBSD 13.1.  While I think I
	made significant progress, I was ultimately stymied by this message
	which occurs when attempting to run the main program which has been
	set to use the fake/pretend RTLD as the ELF interpreter:

	ELF interpreter /path/to/rtld-step-rtld not found, error 22

	I have left one of the flags (-static) in place which I believe
	to be needed for FreeBSD (though since I never got it to work, I
	don't know for sure.)  I've also left some declarations needed
	for FreeBSD in rtld-step-rtld.c.  They're currently disabled via
	a #if 0; you'll need to enable them if you want to try to make
	it work on FreeBSD.

2022-10-20  Kevin Buettner  <kevinb@redhat.com>

	Allow debugging of runtime loader / dynamic linker
	At present, GDB does not allow for the debugging of the runtime loader
	and/or dynamic linker.  Much of the time, this makes sense.  An
	application programmer doesn't normally want to see symbol resolution
	code when stepping into a function that hasn't been resolved yet.

	But someone who wishes to debug the runtime loader / dynamic linker
	might place a breakpoint in that code and then wish to debug it
	as normal.  At the moment, this is not possible.  Attempting to step
	will cause GDB to internally step (and not stop) until code
	unrelated to the dynamic linker is reached.

	This commit makes a minor change to infrun.c which allows the dynamic
	loader / linker to be debugged in the case where a step, next, etc.
	is initiated from within that code.

	While developing this fix, I tried some approaches which weren't quite
	right.  The GDB testusite definitely contains tests which FAIL when
	it's done incorrectly.  (At one point, I saw 17 regressions!) This
	commit has been tested on x86-64 linux with no regressions.

2022-10-20  Tsukasa OI  <research_trasio@irq.a4lg.com>

	binutils: Remove unused substitution PROGRAM
	Unlike other substitution, this substitution of @PROGRAM@ was done in
	binutils/Makefile and it was intended for binutils/cxxfilt.man.  @PROGRAM@
	in binutils/cxxfilt.man is removed in the commit 0285c67df190 ("Automate
	generate on man pages") in 2001 and @PROGRAM@ is ineffective since then.

	Because PROGRAM substitution does nothing, removing this manual
	substitution should be completely safe.

	binutils/ChangeLog:

		* doc/local.mk: Remove unused substitution PROGRAM.
		* Makefile.in: Regenerate.

2022-10-20  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-20  Alan Modra  <amodra@gmail.com>

	Obsolete beos
		* config.bfd: Obsolete *-*-beos*.  Simplify x86 beos match.

	Regen ld/po/BLD-POTFILES.in

2022-10-19  Tom de Vries  <tdevries@suse.de>

	[gdb] Fix assert in handle_jit_event
	With the cc-with-tweaks.sh patch submitted here (
	https://sourceware.org/pipermail/gdb-patches/2022-October/192586.html ) we run
	with:
	...
	$ export STRIP_ARGS_STRIP_DEBUG=--strip-all
	$ make check RUNTESTFLAGS="gdb.base/jit-reader.exp \
	    --target_board cc-with-gnu-debuglink"
	...
	into the following assert:
	...
	(gdb) run ^M
	Starting program: jit-reader ^M
	gdb/jit.c:1247: internal-error: jit_event_handler: \
	  Assertion `jiter->jiter_data != nullptr' failed.^M
	...

	Fix this by handling the
	jit_bp_sym.objfile->separate_debug_objfile_backlink != nullptr case in
	handle_jit_event.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29277

2022-10-19  Pedro Alves  <pedro@palves.net>

	internal_error: remove need to pass __FILE__/__LINE__
	Currently, every internal_error call must be passed __FILE__/__LINE__
	explicitly, like:

	  internal_error (__FILE__, __LINE__, "foo %d", var);

	The need to pass in explicit __FILE__/__LINE__ is there probably
	because the function predates widespread and portable variadic macros
	availability.  We can use variadic macros nowadays, and in fact, we
	already use them in several places, including the related
	gdb_assert_not_reached.

	So this patch renames the internal_error function to something else,
	and then reimplements internal_error as a variadic macro that expands
	__FILE__/__LINE__ itself.

	The result is that we now should call internal_error like so:

	  internal_error ("foo %d", var);

	Likewise for internal_warning.

	The patch adjusts all calls sites.  99% of the adjustments were done
	with a perl/sed script.

	The non-mechanical changes are in gdbsupport/errors.h,
	gdbsupport/gdb_assert.h, and gdb/gdbarch.py.

	Approved-By: Simon Marchi <simon.marchi@efficios.com>
	Change-Id: Ia6f372c11550ca876829e8fd85048f4502bdcf06

2022-10-19  Nick Clifton  <nickc@redhat.com>

	Fix an illegal memory access when parsing an ELF file containing corrupt symbol version information.
		PR 29699
		* elf.c (_bfd_elf_slurp_version_tables): Fail if the sh_info field
		of the section header is zero.

2022-10-19  Andrew Burgess  <aburgess@redhat.com>

	sim/iq2000: silence pointer-sign warnings
	When building the iq2000 simulator I see a few warnings like this:

	  /tmp/build/sim/../../src/sim/iq2000/iq2000.c: In function ‘fetch_str’:
	  /tmp/build/sim/../../src/sim/iq2000/iq2000.c:50:54: error: pointer targets in passing argument 3 of ‘sim_read’ differ in signedness [-Werror=pointer-sign]
	     50 |   sim_read (CPU_STATE (current_cpu), CPU2DATA(addr), buf, nr);
	        |                                                      ^~~
	        |                                                      |
	        |                                                      char *

	I've silenced these warnings by casting buf to 'unsigned char *'.
	With this change I now see no warnings when compiling iq2000.c, so
	I've removed the line from Makefile.in that disables -Werror.

	Makefile.in was also disabling -Werror when compiling mloop.c,
	however, I'm not seeing any warnings when compiling that file, so I've
	removed the -Werror disable in that case too.

2022-10-19  Andrew Burgess  <aburgess@redhat.com>

	sim/erc32: avoid dereferencing type-punned pointer warnings
	When building the erc32 simulator I get a few warnings like this:

	  /tmp/build/sim/../../src/sim/erc32/exec.c:1377:21: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
	   1377 |   sregs->fs[rd] = *((float32 *) & ddata[0]);
	        |                    ~^~~~~~~~~~~~~~~~~~~~~~~

	The type of '& ddata[0]' will be 'uint32_t *', which is what triggers
	the warning.

	This commit makes use of memcpy when performing the type-punning,
	which resolves the above warnings.

	With this change, I now see no warnings when compiling exec.c, which
	means that the line in Makefile.in that disables -Werror can be
	removed.

	There should be no change in behaviour after this commit.

2022-10-19  Andrew Burgess  <aburgess@redhat.com>

	sim/ppc: mark device_error function as ATTRIBUTE_NORETURN
	The device_error function always ends up calling the error function,
	which is itself marked as ATTRIBUTE_NORETURN, so it makes sense that
	device_error should also be marked ATTRIBUTE_NORETURN.

	Doing this resolves a few warnings from hw_ide.c about possibly
	uninitialized variables - the variables are only uninitialized after
	passing through a call to device_error, which obviously means the
	variables are never really used uninitialized, the simulation will
	terminate with the device_error call.

2022-10-19  Andrew Burgess  <aburgess@redhat.com>

	sim/ppc: fix warnings related to printf format strings
	This commit is a follow on to:

	  commit 182421c9d2eea8c4877d983a2124e591f0aca710
	  Date:   Tue Oct 11 15:02:08 2022 +0100

	      sim/ppc: fixes for arguments to printf style functions

	where commit 182421c9d2ee addressed issues with printf format
	arguments that were causing the compiler to give an error, this commit
	addresses issues that caused the compiler to emit a warning.

	This commit is mostly either changing the format string to match the
	argument, or in some cases, excess, unused arguments are removed.

2022-10-19  Andrew Burgess  <aburgess@redhat.com>

	sim/cgen: mask uninitialized variable warning in cgen-run.c
	I see an uninitialized variable warning (with gcc 9.3.1) from
	cgen-run.c, like this:

	  /tmp/build/sim/../../src/sim/cris/../common/cgen-run.c: In function ‘sim_resume’:
	  /tmp/build/sim/../../src/sim/cris/../common/cgen-run.c:259:5: warning: ‘engine_fns$’ may be used uninitialized in this function [-Wmaybe-uninitialized]
	    259 |    (* engine_fns[next_cpu_nr]) (cpu);
	        |    ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	  /tmp/build/sim/../../src/sim/cris/../common/cgen-run.c:232:14: note: ‘engine_fns$’ was declared here
	    232 |   ENGINE_FN *engine_fns[MAX_NR_PROCESSORS];
	        |              ^~~~~~~~~~

	This is a false positive - we over allocate engine_fn, and then only
	initialize the nr_cpus entries which we will later go on to use.

	However, we can easily silence this warning by initializing the unused
	entries in engine_fns to NULL, this might also help if anyone ever
	looks at engine_fns in a debugger, it should now be obvious which
	entries are in use, and which are not.

	With this change the warning is gone.

	There should be no change in behaviour with this commit.

2022-10-19  Alan Modra  <amodra@gmail.com>

	Fix addr2line test for ppc64 elfv1 and mingw
		* testsuite/binutils-all/addr2line.exp: Tidy.  For powerpc64
		arrange to pass --synthetic to nm, and extract .main and .fn
		symbol address for addr2line test.  Handle default executable
		extension on cygwin/mingw compilers.

2022-10-19  Nick Clifton  <nickc@redhat.com>

	Update MAINTAINERS file with details about accepting DCO signed contributions.
		* MAINTAINERS: Add section on patches, copyright and DCO.

2022-10-19  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: avoid temporary file in gdb/testsuite (unittest.exp)
	I spotted that the gdb.gdb/unittest.exp script causes a temporary file
	inserters_extractors-2.txt to be created in build/gdb/testsuite/
	instead of in build/gdb/testsuite/output/gdb.gdb/unittest/.

	This is because some of the 'maint selftest' tests create temporary
	files in GDB's current directory, specifically, the two source files:

	  gdb/unittests/basic_string_view/inserters/wchar_t/2.cc
	  gdb/unittests/basic_string_view/inserters/char/2.cc

	both create a temporary file called inserters_extractors-2.txt, though
	we only run the second of these as part of GDB's selftests.

	I initially proposed just using GDB's 'cd' command in unittest.exp to
	switch to the test output directory before running the selftests,
	however, Pedro pointed out that there was a risk here that, if GDB
	crashed during shutdown, the generated core file would be left in the
	test output directory rather than in the testsuite directory.  As a
	result, our clever core file spotting logic would fail to spot the
	core file and alert the user.

	Instead, I propose this slightly more involved solution.  I've added a
	new with_gdb_cwd directory proc, used like this:

	  with_gdb_cwd $directory {
	    # Tests here...
	  }

	The new proc temporarily switches to $directory and then runs the
	tests within the block.  After running the tests the previous current
	working directory is restored.

	Additionally, after switching back to the previous cwd, we check that
	GDB is still responsive.  This means that if GDB crashed immediately
	prior to restoring the previous directory, and left the core file in
	the wrong place, then the responsiveness check will fail, and a FAIL
	will be emitted, this should be enough to alert the user that
	something has gone wrong.

	With this commit in place the unittest.exp script now leaves its
	temporary file in the test output directory.

2022-10-19  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: avoid creating files in gdb/testsuite directory
	I spotted that the test gdb.dwarf2/dw2-using-debug-str.exp was
	creating an output file called debug_str_section in the root
	build/gdb/testsuite directory instead of using the
	build/gdb/testsuite/output/gdb.dwarf2/dw2-using-debug-str/ directory.

	This appears to be caused by a missing '$' character.  We setup a
	variable debug_str_section which contains a path within the output
	directory, but then when we build the objcopy command we use
	'debug_str_section' without a '$' prefix, as a result, we create the
	debug_str_section file.

	This commit adds the missing '$', the file is now created in the
	output directory.

2022-10-19  Andrew Burgess  <aburgess@redhat.com>

	bfd: fix undefined references to aarch64_pe_le_vec
	After commit:

	  commit c60b3806799abf1d7f6cf5108a1b0e733a950b13
	  Date:   Wed Oct 19 10:57:12 2022 +0200

	      aarch64-pe support for LD, GAS and BFD

	It appears that bfd/Makefile.in and bfd/configure were not regenerated
	correctly.  The differences in the configure file are only whitespace,
	but in Makefile.in a critical reference to pe-aarch64.lo was missing.

2022-10-19  Jedidiah Thompson  <wej22007@outlook.com>
	    Jedidiah Thompson  <wej22007@outlook.com>
	    Zac Walker  <zac.walker@linaro.org>

	aarch64-pe support for LD, GAS and BFD
	Allows aarch64-pe to be targeted natively, not having to use objcopy to convert it from ELF to PE.
	Based on initial work by Jedidiah Thompson

2022-10-19  rupesh potharla  <rupesh.potharla@amd.com>

	Binutils: Adding new testcase for addr2line.
	* binutils/testsuite/config/default.exp: Set ADDR2LINE and ADDR2LINEFLAGS.
	* binutils/testsuite/binutils-all/addr2line.exp: New file.

2022-10-19  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix ERROR in gdb.python/py-breakpoint.exp
	With test-case gdb.python/py-breakpoint.exp I run into:
	...
	(gdb) ERROR: tcl error sourcing gdb.python/py-breakpoint.exp.
	ERROR: can't read "skip_hw_watchpoint_tests_p": no such variable
	    while executing
	"if {$skip_hw_watchpoint_tests_p} {
	        gdb_test_no_output "set can-use-hw-watchpoints 0" ""
	    }"
	...

	Fix this by adding the missing "global skip_hw_watchpoint_tests_p" in two
	procs.

	Tested on x86_64-linux.

2022-10-19  Andreas Krebbel  <krebbel@linux.ibm.com>

	IBM zSystems: Issue error for *DBL relocs on misaligned symbols
	Relocs like PC32DBL require a right shift of the symbol value.  There
	is no situation where dropping symbol value bits with the right shift
	is a good thing.  Hence we now issue an error to detect such problems.

2022-10-19  Simon Marchi  <simon.marchi@efficios.com>

	gdb: check for groups with duplicate names in reggroups:add
	In the downstream ROCm GDB port, we would create multiple register
	groups with duplicate names.  While it did not really hurt, it certainly
	wasn't the intent.  And I don't think it ever makes sense to do so.

	To catch these, change the assert in reggroups::add to check for
	duplicate names.  It's no longer necessary to check for duplicate
	reggroup pointers, because adding the same group twice would be caught
	by the duplicate name check.

	Change-Id: Id216a58acf91f1b314d3cba2d02de73656f8851d
	Approved-By: Tom Tromey <tom@tromey.com>

2022-10-19  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-18  H.J. Lu  <hjl.tools@gmail.com>

	x86: Disable AVX-VNNI when disabling AVX2
	Since AVX-VNNI requires AVX2, disable AVX-VNNI when disabling AVX2.

		* i386-gen.c (cpu_flag_init): Add CpuAVX_VNNI to
		CPU_ANY_AVX2_FLAGS.
		* i386-init.h: Regenerate.

2022-10-18  Tom Tromey  <tom@tromey.com>

	Remove dead code from py-finishbreakpoint.c
	PR python/16324 points out that comparing a frame id to null_frame_id
	can never succeed, and proposes simply removing the dead code.  That
	is what this patch does.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=16324

2022-10-18  Carl Love  <cel@us.ibm.com>

	Update tests to use skip_hw_watchpoint_tests to test for HW watchpoint support.
	The hardware watchpoint check has been updated in a couple of recent
	patches.  This patch updates the hardware watchpoint test in the remaining
	gdb tests.

	The issue is the PowerPC processors support hardware watchpoints with the
	exception of Power 9. The hardware watchpoint support is disabled on
	Power 9.  The test skip_hw_watchpoint_tests must be used to correctly
	determine if the PowerPC processor supports hardware watchpoints.

	This patch fixes 6 test failures in test gdb.threads/watchpoint-fork.exp.

	Test gdb.base/watch-vfork.exp runs with can-use-hw-watchpoints set to
	true and false.  When the test is run with can-use-hw-watchpoints set to
	true, gdb just falls back to using software watchpoints.  The
	patch reduces the number of expected passes by 2 since because it now
	only runs once with can-use-hw-watchpoints set to false.

	Test gdb.mi/mi-watch.exp runs the test with argument hw and sw.  If the
	argument is hw and hardware watchpoints are not supported the test exits.
	The number of expected passes is cut in half with the patch as it now only
	runs the test using software breakpoints.  Previously the pass to use
	hardware watchpoints was not skipped and the test actually ran using
	software watchpoints.

	The following tests run the same with and without the patch.  The tests
	are supposed to execute the gdb command "set can-use-hw-watchpoints 0" if
	the processor does not support hardware bwatchpoints.  However the command
	was not being executed and gdb was falling back to using software
	watchpoints since the Power 9 watchpoint resource check fails.  With the
	patch, the tests now execute the command and the test runs using software
	watchpoints as it did previously.  The tests are:

	gdb.base/commands.exp
	gdb.base/cond-eval-mode.exp
	gdb.base/display.exp
	gdb.base/gdb11531.exp
	gdb.base/recurse.exp
	gdb.base/value-double-free.exp
	gdb.base/watch-bitfields.exp
	gdb.base/watch-cond-infcall.exp
	gdb.base/watch-cond.exp
	gdb.base/watchpoint-solib.exp
	gdb.base/watchpoints.exp

	The following two tests are not supported on the Power 9 system used to
	test the changes.  The patch does not change the tests results for these
	tests:

	gdb.python/py-breakpoint.exp
	gdb.mi/mi-watch-nonstop.exp

2022-10-18  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Handle header files with local-remote-host.exp
	With test-case gdb.base/included.exp and host board local-remote-host.exp with
	tentative fix for PR29697 I run into:
	...
	included.c:18:10: fatal error: included.h: No such file or directory
	 #include "included.h"
	          ^~~~~~~~~~~~
	compilation terminated.
	...

	Fix this by adding the missing gdb_remote_download calls.

	Likewise in a few other test-cases.

	Tested on x86_64-linux.

2022-10-18  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.server/no-thread-db.exp with local-remote-host.exp
	With test-case gdb.server/no-thread-db.exp and host board local-remote-host.exp
	with a tentative fix for PR29697 I run into:
	...
	(gdb) print foo^M
	Cannot find thread-local storage for Thread 29613.29613, executable file \
	  $HOME/no-thread-db:^M
	Remote target failed to process qGetTLSAddr request^M
	(gdb) FAIL: gdb.server/no-thread-db.exp: print foo
	...

	The regexp in the test-case expects the full $binfile pathname, but we have
	instead $HOME/no-thread-db.

	Fix this by making the regexp less strict.

	Tested on x86_64-linux.

2022-10-18  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/return-nodebug.exp with local-remote-host.exp
	With host board local-remote-host.exp and test-case
	gdb.base/return-nodebug.exp, I run into:
	...
	Executing on host: gcc -fno-stack-protector -fdiagnostics-color=never \
	  -DTYPE=signed\ char -c -g  -o return-nodebug-signed-char0.o  \
	  /home/vries/gdb_versions/devel/src/gdb/testsuite/gdb.base/return-nodebug.c \
	  (timeout = 300)
	builtin_spawn [open ...]^M
	gcc: error: char: No such file or directory
	...

	Avoid the quoting problem by not using spaces in the define.

	Tested on x86_64-linux.

2022-10-18  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.server/file-transfer.exp with local-remote-host.exp
	When running test-case gdb.server/file-transfer.exp with host
	board local-remote-host.exp, I get:
	...
	Executing on host: cmp -s $outputs/gdb.server/file-transfer/file-transfer \
	  down-server    (timeout = 300)
	builtin_spawn [open ...]^M
	XYZ2ZYX
	FAIL: gdb.server/file-transfer.exp: compare intermediate binary file
	...

	The remote host and remote target cases are handled here together here in proc
	test_file_transfer:
	...
	    if {![is_remote host] && ![is_remote target]} {
	       set up_server [standard_output_file $up_server]
	       set down_server [standard_output_file $down_server]
	    }
	...

	Fix this by handling them separately.

	Tested on x86_64-linux.

2022-10-18  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Update boards/README
	Update gdb/testsuite/boards/README to reflect recent commit c4c8c27263d
	("[gdb/testsuite] Fix host board local-remote-host-notty.exp timeouts"), which
	means the board now uses a pseudo-tty, but with editing disabled.

2022-10-18  Markus Metzger  <markus.t.metzger@intel.com>

	gdb, solib-svr4: support namespaces in DSO iteration
	When looking up names, GDB needs to stay within one linker namespace to
	find the correct instance in case the same name is provided in more than
	one namespace.

	Modify svr4_iterate_over_objfiles_in_search_order() to stay within the
	namespace of the current_objfile argument.  If no current_objfile is
	provided (i.e. it is nullptr), iterate over objfiles in the initial
	namespace.

	For objfiles that do not have a corresponding so_list to provide the
	namespace, assume that the objfile was loaded into the initial namespace.
	This would cover the main executable objfile (which is indeed loaded into
	the initial namespace) as well as manually added symbol files.

	Expected fails:

	  - gdb.base/non-lazy-array-index.exp: the expression parser may lookup
	    global symbols, which may result in xfers to read auxv for determining
	    the debug base as part of svr4_iterate_over_objfiles_in_search_order().

	  - gdb.server/non-lazy-array-index.exp: symbol lookup may access the
	    target to read AUXV in order to determine the debug base for SVR4
	    linker namespaces.

	Known issues:

	  - get_symbol_address() and get_msymbol_address() search objfiles for a
	    'better' match.  This was introduced by

	        4b610737f02 Handle copy relocations

	    to handle copy relocations but it now causes a wrong address to be
	    read after symbol lookup actually cound the correct symbol.  This can
	    be seen, for example, with gdb.base/dlmopen.exp when compiled with
	    clang.

	  - gnu ifuncs are only looked up in the initial namespace.

	  - lookup_minimal_symbol() and lookup_minimal_symbol_text() directly
	    iterate over objfiles and are not aware of linker namespaces.

2022-10-18  Markus Metzger  <markus.t.metzger@intel.com>

	gdb: update gnu ifunc resolve
	Update elf_gnu_ifunc_resolve_by_cache() and elf_gnu_ifunc_resolve_by_got()
	to use gdbarch_iterate_over_objfiles_in_search_order() in order to
	restrict the objfile traversal to the initial namespace.

	In order to extend this to other namespaces, we'd need to provide context,
	e.g. via an objfile inside that namespace.

2022-10-18  Markus Metzger  <markus.t.metzger@intel.com>

	gdb, symtab: inline find_quick_global_symbol_language
	There is only one use of find_quick_global_symbol_language that calls it
	for the special symbol "main".

	Inline the function as it is probably not correct in the general case
	where we may have multiple instances of global symbols with the same name
	but different languages in different libraries in different linker
	namespaces.

	Further, change the objfiles iteration into a call to
	gdbarch_iterate_over_objfiles_in_search_order, which would only search the
	initial linker namespace, where we expect "main" to be located.

2022-10-18  Markus Metzger  <markus.t.metzger@intel.com>

	gdb, hppa: remove unused hppa_lookup_stub_minimal_symbol
	I stumbled over this while reviewing all objfiles traversals with regards
	to impact of linker namespaces.

	Recursive grep only finds two occurrences of hppa_lookup_stub_minimal_symbol:
	  - the declaration in hppa-tdep.h.
	  - the definition in hppa-tdep.c.

	There appear to be no calls to this function.  Remove it.

2022-10-18  Markus Metzger  <markus.t.metzger@intel.com>

	gdb, cp: update add_symbol_overload_list_qualified
	Iterate over objfiles in search order using the objfile of the selected
	block as current_objfile so the iteration can stay inside the block's
	linker namespace.

	fixup! gdb, ada: update ada_lookup_simple_minsym
	remove get_selected_block()

	gdb, ada: update ada_lookup_simple_minsym
	Iterate over objfile in search order using the objfile of the context
	block as current_objfile so the iteration can stay inside the block's
	linker namespace.

	gdb, ada: collect standard exceptions in all objfiles
	When searching for standard exceptions for Ada, we lookup the minimal
	symbol of each exception.  With linker namespaces there can be multiple
	instances in different namespaces.  Collect them all.

2022-10-18  Markus Metzger  <markus.t.metzger@intel.com>

	gdb, python: use gdbarch_iterate_over_objfiles_in_search_order
	The implementation of gdb.lookup_objfile() iterates over all objfiles and
	compares their name or build id to the user-provided search string.

	This will cause problems when supporting linker namespaces as the first
	objfile in any namespace will be found.  Instead, use
	gdbarch_iterate_over_objfiles_in_search_order to only consider the
	namespace of gdb.current_objfile() for the search, which defaults to the
	initial namespace when gdb.current_objfile() is None.

2022-10-18  Markus Metzger  <markus.t.metzger@intel.com>

	gdb, compile: unlink objfile stored in module
	When cleaning up after a compile command, we iterate over all objfiles and
	unlink the first objfile with the same name as the one we compiled.

	Since we already store a pointer to that objfile in the module and use it
	to get the name we're comparing against, there's no reason to iterate, at
	all.  We can simply use that objfile.

	This further avoids potential issues when an objfile with the same name is
	loaded into a different linker namespace.

2022-10-18  Markus Metzger  <markus.t.metzger@intel.com>

	gdb, gdbserver: extend RSP to support namespaces
	Introduce a new qXfer:libraries-svr4:read annex key/value pair

	    lmid=<namespace identifier>

	to be used together with start and prev to provide the namespace of start
	and prev to gdbserver.

	Unknown key/value pairs are ignored by gdbserver so no new supports check
	is needed.

	Introduce a new library-list-svr4 library attribute

	    lmid

	to provide the namespace of a library entry to GDB.

	This implementation uses the address of a namespace's r_debug object as
	namespace identifier.

	This should have incremented the minor version but since unknown XML
	attributes are ignored, anyway, and since changing the version results in
	a warning from GDB, the version is left at 1.0.

2022-10-18  Markus Metzger  <markus.t.metzger@intel.com>

	gdbserver: move main_lm handling into caller
	When listing SVR4 shared libraries, special care has to be taken about the
	first library in the default namespace as that refers to the main
	executable.  The load map address of this main executable is provided in
	an attribute of the library-list-svr4 element.

	Move that code from where we enumerate libraries inside a single namespace
	to where we generate the rest of the library-list-svr4 element.  This
	allows us to complete the library-list-svr4 element inside one function.

	There should be no functional change.

2022-10-18  Markus Metzger  <markus.t.metzger@intel.com>
	    Lu, Hongjiu  <hongjiu.lu@intel.com>

	gdb, gdbserver: support dlmopen()
	In glibc, the r_debug structure contains (amongst others) the following
	fields:

	  int r_version:
	    Version number for this protocol.  It should be greater than 0.

	If r_version is 2, struct r_debug is extended to struct r_debug_extended
	with one additional field:

	  struct r_debug_extended *r_next;
	    Link to the next r_debug_extended structure.  Each r_debug_extended
	    structure represents a different namespace.  The first r_debug_extended
	    structure is for the default namespace.

	1. Change solib_svr4_r_map argument to take the debug base.
	2. Add solib_svr4_r_next to find the link map in the next namespace from
	the r_next field.
	3. Update svr4_current_sos_direct to get the link map in the next namespace
	from the r_next field.
	4. Don't check shared libraries in other namespaces when updating shared
	libraries in a new namespace.
	5. Update svr4_same to check the load offset in addition to the name
	6. Update svr4_default_sos to also set l_addr_inferior
	7. Change the flat solib_list into a per-namespace list using the
	namespace's r_debug address to identify the namespace.

	Add gdb.base/dlmopen.exp to test this.

	To remain backwards compatible with older gdbserver, we reserve the
	namespace zero for a flat list of solibs from all namespaces.  Subsequent
	patches will extend RSP to allow listing libraries grouped by namespace.

	This fixes PR 11839.

2022-10-18  Markus Metzger  <markus.t.metzger@intel.com>

	gdb, solib-svr4: remove locate_base()
	Whenever we call locate_base(), we clear info->debug_base directly before
	the call.  Thus, we never cache the base location as locate_base() had
	intended.

	Move the svr4_have_link_map_offsets() check into elf_locate_base(), inline
	locate_base() at all call sites, and remove it.

2022-10-18  Markus Metzger  <markus.t.metzger@intel.com>

	gdb, testsuite: extend gdb_test_multiple checks
	Check for

	    warning: Corrupted shared library list

	and for

	    Invalid cast.
	    warning: Probes-based dynamic linker interface failed.
	    Reverting to original interface.

	in gdb_test_multiple.

2022-10-18  Jan Beulich  <jbeulich@suse.com>

	x86: generalize gas documentation for disabling of ISA extensions
	As of commit ae89daecb132 ("x86: generalize disabling of sub-
	architectures") there's no arbitrary subset of ISAs which can also be
	disabled. This should have been reflected in documentation right away.
	Since I failed to do so, correct this now.

	x86: correct CPU_AMX_{BF16,INT8}_FLAGS
	AMX-TILE is a prereq to these, as already correctly expressed by
	CPU_ANY_AMX_TILE_FLAGS. Express the dependency also in the reverse
	("positive") direction.

2022-10-18  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-17  Tom Tromey  <tromey@adacore.com>

	kfail an Ada test for GCC < 12
	I noticed one particular Ada test was failing on Fedora 34, but works
	when I switch to GCC 12.  This patch arranges to kfail the test when
	an older compiler is used.

	I tested this with GCC 11, 12, and 13.  I'm going to check it in.

2022-10-17  Tom Tromey  <tromey@adacore.com>

	Remove a nullptr check in DWARF scanner
	In scan_attributes, The DWARF scanner checks whether maybe_defer is
	nullptr, but this can never happen.  This patch removes the check.

2022-10-17  Pedro Alves  <pedro@palves.net>

	gdbarch-components.py: Remove spurious space from "frame_info_ptr " params
	If you run gdbarch.py today, you'll get local modifications compared
	to what's in the tree, like:

	 --- c/gdb/gdbarch-gen.h
	 +++ w/gdb/gdbarch-gen.h
	 @@ -315,8 +315,8 @@ extern void set_gdbarch_register_type (struct gdbarch *gdbarch, gdbarch_register
	     should match the address at which the breakpoint was set in the dummy
	     frame. */

	 -typedef struct frame_id (gdbarch_dummy_id_ftype) (struct gdbarch *gdbarch, frame_info_ptr this_frame);
	 -extern struct frame_id gdbarch_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame);
	 +typedef struct frame_id (gdbarch_dummy_id_ftype) (struct gdbarch *gdbarch, frame_info_ptr  this_frame);
	 +extern struct frame_id gdbarch_dummy_id (struct gdbarch *gdbarch, frame_info_ptr  this_frame);
	  extern void set_gdbarch_dummy_id (struct gdbarch *gdbarch, gdbarch_dummy_id_ftype *dummy_id);

	etc.

	The extra space comes from the "frame_info_ptr " param that appears in
	a number of gdbarch methods in gdbarch-components.py.  With the extra
	space removed, running ./gdbarch.py generates the exact code that's in
	the tree already.

	Change-Id: If7d20b8c6b2fd9ff466142a01bd2611c9ef9f53e

2022-10-17  Tom Tromey  <tromey@adacore.com>

	Change .gdb_index de-duplication implementation
	While investigating PR symtab/29179, I found that one Ada test failed
	because, although a certain symbol was present in the index, with the
	new DWARF reader it pointed to a different CU than was chosen by
	earlier versions of gdb.

	This patch changes how symbol de-duplication is done, deferring the
	process until the entire symbol table has been constructed.  This way,
	it's possible to always choose the lower-numbered CU among duplicates,
	which is how gdb (implicitly) previously worked.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29179

2022-10-17  Tom Tromey  <tromey@adacore.com>

	Improve Ada support in .gdb_index
	The cooked index work changed how .gdb_index is constructed, and in
	the process broke .gdb_index support.  This is PR symtab/29179.

	This patch partially fixes the problem.  It arranges for Ada names to
	be encoded in the form expected by the index code.  In particular,
	linkage names for Ada are emitted, including the "main" name; names
	are Ada-encoded; and names are no longer case-folded, something that
	prevented operator names from round-tripping correctly.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29179

2022-10-17  Tom Tromey  <tromey@adacore.com>

	Don't add type linkage names to cooked index
	The compiler will sometimes emit a linkage name for a type, like:

	    <1d3>   DW_AT_linkage_name: (indirect string, offset: 0x106f): 11__mbstate_t

	These names aren't very useful, and this patch changes the DWARF
	reader so that they are ignored by the cooked index.

2022-10-17  Tom Tromey  <tromey@adacore.com>

	Fix regression in c-linkage-name.exp with gdb index
	c-linkage-name.exp started failing with the gdb-index target board due
	to an earlier patch.  The problem here is that some linkage names must
	be in the index -- but, based on inspection, not C++ linkage names.
	This patch updates the code to exclude only these.

2022-10-17  TaiseiIto  <taisei1212@outlook.jp>

	Fix null pointer representations
	Since "NULL" and "0" are used to represent invalid address in function
	"gdbarch_find_by_info" in "binutils-gdb/gdb/arch-utils.c", I modified
	them to "nullptr".

2022-10-17  Simon Marchi  <simon.marchi@efficios.com>

	gdb: silence unused-but-set-variable warning about yynerrs in cp-name-parser.y
	When building with clang 15 on Ubuntu 20.04, I get:

	      CXX    cp-name-parser.o
	    cp-name-parser.c.tmp:1777:9: error: variable 'cpnameyynerrs' set but not used [-Werror,-Wunused-but-set-variable]
	        int yynerrs;
	            ^
	    /home/smarchi/src/binutils-gdb/gdb/yy-remap.h:58:18: note: expanded from macro 'yynerrs'
	    #define yynerrs         GDB_YY_REMAP (yynerrs)
	                            ^
	    /home/smarchi/src/binutils-gdb/gdb/yy-remap.h:40:29: note: expanded from macro 'GDB_YY_REMAP'
	    #define GDB_YY_REMAP(YYSYM) GDB_YY_REMAP_1 (GDB_YY_REMAP_PREFIX, YYSYM)
	                                ^
	    /home/smarchi/src/binutils-gdb/gdb/yy-remap.h:39:39: note: expanded from macro 'GDB_YY_REMAP_1'
	    #define GDB_YY_REMAP_1(PREFIX, YYSYM) GDB_YY_REMAP_2 (PREFIX, YYSYM)
	                                          ^
	    /home/smarchi/src/binutils-gdb/gdb/yy-remap.h:38:39: note: expanded from macro 'GDB_YY_REMAP_2'
	    #define GDB_YY_REMAP_2(PREFIX, YYSYM) PREFIX ## YYSYM
	                                          ^
	    <scratch space>:45:1: note: expanded from here
	    cpnameyynerrs
	    ^

	This is because clang 15 warns for something like this:

	    int n;
	    n = 0;
	    ++n;

	whereas previous versions do not.

	yynerrs is defined in yyparse and is there for actions to use.  Since
	the actions in cp-name-parser.y don't use it, we get a warning.  We see
	this problem on this particular .y file because it uses `%pure-parser`
	[1], which makes yynerrs a local rather than a global.

	I initially fixed this by using
	DIAGNOSTIC_IGNORE_UNUSED_BUT_SET_VARIABLE (like in commit f7aa1a5acc5
	("gold: Suppress "unused" variable warning on Clang")), but then I
	realized we could suppress the warning in a more fine-grained way using
	this in a rule:

	    (void) yynerrs;

	[1] https://www.gnu.org/software/bison/manual/html_node/Error-Reporting-Function.html

	Change-Id: I6cae7a4207c19fe1b719e2ac19be69122ebe3af1

2022-10-17  Clément Chigot  <chigot@adacore.com>

	ld/testsuite: consistently add board_ldflags when linking with GCC
	Currently, the functions checking if the compiler is available or if a
	feature is available add both board_cflags and board_ldflags.
	However, functions running the tests only retrieve board_cflags. This
	can lead to unexpected errors when mandaratory flags are defined in
	board_ldflags and not board_cflags.

	ld/ChangeLog:

		* testsuite/ld-unique/unique.exp: Add board_ldflags when
		linking with GCC.
		* testsuite/lib/ld-lib.exp: Likewise.

2022-10-17  CaiJingtao  <caijingtao@huawei.com>

	Allow explicit size specifier for predicate operand of {sq, uq, }{incp, decp}
	Omitting predicate size specifier in vector form of {sq, uq, }{decp, incp} is deprecated and will be prohibited in a future release of the aarch64,
	see https://developer.arm.com/documentation/ddi0602/2021-09/SVE-Instructions/DECP--vector---Decrement-vector-by-count-of-true-predicate-elements-.

	This allows explicit size specifier, e.g. `decp z0.h, p0.h`, for predicate operand of these SVE instructions.
	The existing behaviour of not requiring the specifier is preserved.
	And the disasembly is with the specifier with this patch.

	The GAS tests passed under our local tests.

	opcodes/
		* aarch64-asm.c: Modify `sve_size_hsd` encoding.
		* aarch64-tbl.h (aarch64_opcode_table): Add QUALS's type OP_SVE_Vv_HSD
		for decp, incp, sqdecp, sqincp, uqdecp and uqincp.

	gas/
		* testsuite/gas/aarch64/sve-movprfx_23.s: Update movprfx_23 testcase's
		test_sametwo macro, where take the predicate size specifier.
		* testsuite/gas/aarch64/sve-movprfx_23.d: Update movprfx_23 testcase's
		expected disassembly.
		* testsuite/gas/aarch64/sve-movprfx_23.l: Update movprfx_23 testcase's
		expected assembler messages.
		* testsuite/gas/aarch64/sve.s: Add sve testcase's instructions for
		decp, incp, sqdecp, sqincp, uqdecp and uqincp, which take the
		predicate size specifier.
		* testsuite/gas/aarch64/sve.d: Update sve testcase's expected
		disassembly.

2022-10-17  Richard Sandiford  <richard.sandiford@arm.com>

	aarch64: Tweak handling of F_STRICT
	Current F_STRICT qualifier checking is enforced after the fact
	rather than as part of the match.  This makes it impossible to
	have, e.g.:

	   QLF2(S_D, S_D)
	   QLF2(S_D, NIL)

	in the same list.

	opcodes/
		* aarch64-opc.c (aarch64_find_best_match): Handle F_STRICT here
		rather than...
		(match_operands_qualifier): ...here.

2022-10-17  Jan Beulich  <jbeulich@suse.com>

	x86: properly decode EVEX.W for AVX512_4{FMAPS,VNNIW} insns
	These require EVEX.W=0. Use %XS to facilitate the checking, even if for
	the AVX512_4VNNIW ones this is kind of an abuse (as 's' there stands for
	"signed", not "single").

	While there also correct the 3rd operand for the AVX512_4VNNIW entries:
	Only the memory form is allowed (just like for AVX512_4FMAPS, where the
	correct type is already in use).

2022-10-17  Jan Beulich  <jbeulich@suse.com>

	x86: fold AVX512-VNNI disassembler entries with AVX-VNNI ones
	Make %XV also print the separating blank in the VEX case, while making
	it do nothing for EVEX-encoded insns. This way the AVX-VNNI entries
	can be re-used for AVX512-VNNI, at the same time fixing the lack of
	EVEX.W decoding.

	For the AVX-VNNI ones further make sure only VEX.66 forms are actually
	decoded.

2022-10-17  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-16  Tom Tromey  <tom@tromey.com>

	More uses of checked_static_cast
	This patch changes a few more uses of static_cast to use
	checked_static_cast.  In this patch, cast-to-references are converted
	by moving the dereference outside of the cast, as checked_static_cast
	only handles pointers.

2022-10-16  Tom Tromey  <tom@tromey.com>

	Use checked_static_cast in more places
	I looked through all the uses of static_cast<... *> in gdb and
	converted many of them to checked_static_cast.

	I couldn't test a few of these changes.

2022-10-16  Alan Modra  <amodra@gmail.com>

	PowerPC se_rfmci and VLE, SPE2 and LSP insns with -many
	I noticed recently that se_rfmci, a VLE mode instruction, was being
	accepted by non-VLE cpus, and also that se_rfmci by itself in a
	section did not cause SHF_PPC_VLE to be set.  ie. both testcases added
	by this patch fail without the changes to tc-ppc.c here.

	Also, VLE, SPE2 and LSP insns were not accepted by the assembler with
	-many nor were SPE2 and LSP being disassembled with -Many.

	gas/
		* config/tc-ppc.c (ppc_setup_opcodes): Wrap long lines.  Add
		vle_opcodes when PPC_OPCODE_VLE or PPC_OPCODE_ANY.  Simplify
		disassembler index segment checks.  Add LSP and SPE2 opcodes
		when PPC_OPCODE_ANY too.
		(md_assemble): Correct logic adding PPC_APUINFO_VLE and
		SHF_PPC_VLE.
		* testsuite/gas/ppc/se_rfmci.s
		* testsuite/gas/ppc/se_rfmci.d,
		* testsuite/gas/ppc/se_rfmci_bad.d: New tests.
		* testsuite/gas/ppc/ppc.exp: Run them.
	opcodes/
		* ppc-dis.c (print_insn_powerpc): Disassemble SPE2 and LSP insn
		when -Many.
		* ppc-opc.c (vle_opcodes <se_rfmci>): Comment.

2022-10-16  Alan Modra  <amodra@gmail.com>

	zlib-gabi to zstd woes
	So we had a zlib-gabi .debug_info section that increased in size with
	zstd, so much so that it was better to leave the section
	uncompressed.  Things went horribly wrong when the section was read
	again later.  The section was read again off disk using the
	uncompressed size.  So you get the zlib section again with some
	garbage at the end.  Fix that particular problem by setting the
	section flag SEC_IN_MEMORY.  Any future read will get sec->contents.

	Also, if the section is to be left uncompressed, the input
	SHF_COMPRESSED flag needs to be reset otherwise objcopy will copy it
	to output.

	Finally, bfd_convert_section_contents needed a small update to handle
	zstd compressed sections, and I've deleted bfd_cache_section_contents.

		* bfd.c (bfd_convert_section_contents): Handle zstd.
		* compress.c (bfd_compress_section_contents): When section
		contents are uncompressed set SEC_IN_MEMORY flag,
		compress_status to COMRESS_SECTION_NONE, and clear
		SHF_COMPRESSED.  Set SEC_IN_MEMORY for compressed contents.
		(bfd_get_full_section_contents): Don't check section size
		against file size when SEC_IN_MEMORY.
		(bfd_cache_section_contents): Delete function.
		* elf32-arm.c (elf32_arm_get_synthetic_symtab): Expand
		bfd_cache_section_contents here.
		* bfd-in2.h: Regenerate.

2022-10-16  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-15  Torbjörn SVENSSON  <torbjorn.svensson@foss.st.com>

	gdb/arm: Don't rely on loop detection to stop unwinding
	Setting SP of the next frame to the same address as the current frame
	is an ugly way to stop the unwinding.  A cleaner way is to rely on
	the frame_unwind_stop_reason function to return UNWIND_OUTERMOST.

2022-10-15  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-14  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add boards/README
	Add a file gdb/testsuite/boards/README, to make it easier to get a high-level
	overview of the various boards.

2022-10-14  Tom de Vries  <tdevries@suse.de>

	[gdb/contrib] Handle STRIP_ARGS_{STRIP,KEEP}_DEBUG in cc-with-tweaks.sh
	Handle new environment variable STRIP_ARGS_STRIP_DEBUG, defaulting to
	--strip-debug in gdb/contrib/cc-with-tweaks.sh, such that we can easily
	reproduce the PR29277 assert using:
	...
	$ export STRIP_ARGS_STRIP_DEBUG=--strip-all
	$ make check RUNTESTFLAGS="gdb.base/jit-reader.exp \
	    --target_board cc-with-gnu-debuglink"
	...

	For completeness sake and to avoid confusion about which of the two used strip
	invocations the passed args apply to, likewise add STRIP_ARGS_KEEP_DEBUG,
	defaulting to --only-keep-debug.

	Script checked with shellcheck, no new warnings added.

	Tested on x86_64-linux.

2022-10-14  Tom de Vries  <tdevries@suse.de>

	[gdb] Fix heap-buffer-overflow in find_program_interpreter
	With the test-case included in this patch, we run into:
	...
	(gdb) target remote localhost:2347^M
	`target:twice-connect' has disappeared; keeping its symbols.^M
	Remote debugging using localhost:2347^M
	warning: Unable to find dynamic linker breakpoint function.^M
	GDB will be unable to debug shared library initializers^M
	and track explicitly loaded dynamic code.^M
	Reading /usr/lib/debug/.build-id/$hex/$hex.debug from remote target...^M
	0x00007ffff7dd4550 in ?? ()^M
	(gdb) PASS: gdb.server/twice-connect.exp: session=second: gdbserver started
	FAIL: gdb.server/twice-connect.exp: found interpreter
	...

	The problem originates in find_program_interpreter, where
	bfd_get_section_contents is called to read .interp, but fails.  The function
	returns false but the result is ignored, so find_program_interpreter returns
	some random string.

	Fix this by checking the result of the call to bfd_get_section_contents.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29652

2022-10-14  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.server/unittest.exp with host board local-remote-host.exp
	With test-case gdb.server/unittest.exp and host board local-remote-host.exp I
	run into:
	...
	builtin_spawn build/gdbserver/gdbserver --selftest^M
	ERROR: : spawn id exp7 not open
	    while executing
	"expect {
	-i exp7 -timeout 10
	    -i $server_spawn_id
	    -re "Ran ($decimal) unit tests, 0 failed" {
	        set num_ran $expect_out(1,string)
	        gdb_assert "..."
	    ("uplevel" body line 1)
	    invoked from within
	"uplevel $body" NONE : spawn id exp7 not open
	UNRESOLVED: gdb.server/unittest.exp: unit tests
	...

	The problem is (as fixed for avr in commit df5b8876083 ("gdb/testsuite: better
	handle failures in simavr board, reap simavr process")), that gdb_expect through
	remote_expect adds a "-i <gdb spawn id> -timeout 10", which is the one causing
	the error.

	As in aforementioned commit, fix this by using expect instead.

	Tested on x86_64-linux.

2022-10-14  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix host board local-remote-host-notty.exp timeouts
	With test-case gdb.server/stop-reply-no-thread-multi.exp and host board
	local-remote-host-notty.exp we occasionally run into a silent out, due to
	getting:
	...
	(gdb) kill^M
	(gdb) The program is not being run.^M
	...
	instead of the expected:
	...
	(gdb) kill^M
	The program is not being run.^M
	(gdb)
	...

	Likewise, we occasionally run into a nonsilent timeout:
	...
	(gdb) disconnect^M
	(gdb) You can't do that when your target is `exec'^M
	FAIL: gdb.server/stop-reply-no-thread.exp: to_disable=Tthread: t_nonstop=on: \
	  disconnect (timeout)
	...

	Typically, this results in the test-case taking more than two minutes to run.

	The problem can be reproduced using just:
	...
	$ ssh -l $USER 127.0.0.1 gdb -q -ex kill
	...

	Note that ssh by default uses -T which disables pseudo-tty allocation (as
	opposed to -t which forces pseudo-tty allocation):
	...
	$ ssh -l $USER 127.0.0.1 -T tty
	not a tty
	$ ssh -l $USER 127.0.0.1 -t tty
	/dev/pts/5
	Connection to 127.0.0.1 closed.
	...
	and according to https://stackoverflow.com/a/63241102 the behaviour we're
	seeing is specific to using '-T'.

	The related host board local-remote-host.exp does use '-t', and the only
	difference between the two boards mentioned is whether editing is on or off.

	Fix this by:
	- moving the content of local-remote-host-notty.exp into
	  local-remote-host.exp
	- consequently, extending the copyright years in local-remote-host.exp
	- including local-remote-host.exp in local-remote-host-notty.exp
	  (making local-remote-host-notty.exp use '-t')
	- adding -iex "set editing off" to GDBFLAGS in local-remote-host-notty.exp

	This results in the test-case taking just 6 seconds to run.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29669

2022-10-14  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Disable styling in host board local-remote-host.exp
	With test-case gdb.server/stop-reply-no-thread.exp and host board
	local-remote-host.exp, I run into:
	...
	Breakpoint 1, ^[[33mmain^[[m () at ^[[32mstop-reply-no-thread.c^[[m:21^M
	21        ^[[01;34mreturn^[[m ^[[35m0^[[m^[[31m;^[[m^M
	(gdb) FAIL: gdb.server/stop-reply-no-thread.exp: to_disable=: t_nonstop=off: \
	  continue to main
	...

	The problem is that styling is enabled, and that is causing a regexp mismatch.

	With native, styling is disabled in default_gdb_init by doing
	'setenv TERM "dumb"', but that only has effect because the build (where we
	execute runtest, and consequently the setenv) and the host (where we execute
	gdb) are the same.  For this host board however, gdb executes on a remote
	host, and the setenv has no effect.

	We could try to make some generic way to set TERM on the host, but for the
	purposes of this test-case it seems sufficient to just add:
	...
	set GDBFLAGS "${GDBFLAGS} -iex \"set style enabled off\""
	...
	so let's go with that for now.

	Tested on x86_64-linux.

2022-10-14  Tom Tromey  <tromey@adacore.com>

	Use scoped_value_mark in more places
	I looked at all the spots using value_mark, and converted all the
	straightforward ones to use scoped_value_mark instead.

	Regression tested on x86-64 Fedora 34.

2022-10-14  Torbjörn SVENSSON  <torbjorn.svensson@foss.st.com>

	gdb/arm: Stop unwinding on error, but do not assert
	When it's impossible to read the FPCCR and XPSR, the unwinding is
	unpredictable as the it's not possible to determine the correct
	frame size or padding.
	The only sane thing to do in this condition is to stop the unwinding.

	Example session without this patch:

	  (gdb) bt
	  #0  SVC_Handler () at .../GPIO/GPIO_EXTI/Src/stm32f4xx_it.c:112
	  .../gdb/arm-tdep.c:3594: internal-error: arm_m_exception_cache: Assertion `safe_read_memory_unsigned_integer (FPCCR, ARM_INT_REGISTER_SIZE, byte_order, &fpccr)' failed.
	  A problem internal to GDB has been detected,
	  further debugging may prove unreliable.
	  ----- Backtrace -----
	  0x5583bfb2a157 gdb_internal_backtrace_1
	  ...
	  ---------------------

	  This is a bug, please report it.  For instructions, see:
	  <https://www.gnu.org/software/gdb/bugs/>.

	  Aborted (core dumped)

	Example session with this patch:

	  (gdb) bt
	  #0  SVC_Handler () at .../GPIO/GPIO_EXTI/Src/stm32f4xx_it.c:112
	  warning: Could not fetch required FPCCR content.  Further unwind is impossible.
	  #1  <signal handler called>
	  (gdb)

	Reviewed-by: Pedro Alves <pedro@palves.net>

2022-10-14  Alan Modra  <amodra@gmail.com>

	PowerPC SPE disassembly and tests
	Where sub and subf forms of an instruction exist we generally
	disassemble to the extended insn sub form rather than the underlying
	machine subf instruction.  Do so for SPE evsubw and evsubiw too.

	spe_ambiguous.d always was a bit too optimistic.  There is no sensible
	way to disassemble identical bytes back to different and original
	source.  Instead change the test to check -Mraw results.

	gas/
		* testsuite/gas/ppc/ppc.exp: Run spe_ambiguous test.
		* testsuite/gas/ppc/spe.d: Expect evsubw and evsubiw rather than
		evsubfw and evsubifw.
		* testsuite/gas/ppc/spe_ambiguous.s: Test evnor form equivalent
		to evnot.
		* testsuite/gas/ppc/spe_ambiguous.d: Test Mraw.
	opcodes/
		* ppc-opc.c (powerpc_opcodes): Move evsubw before evsubfw and
		evsubiw before evsubifw and mark EXT.

2022-10-14  Alan Modra  <amodra@gmail.com>

	e200 LSP support
	It has bothered me for a long time that we have disabled LSP (and SPE)
	tests.  Also the LSP test comment indicating there is something wrong
	with get_powerpc_dialect.  I don't think there is.  Decoding of a VLE
	instruction depends on whether the processor is in VLE mode (some
	processors support both VLE and standard PPC) which we flag per
	section with SHF_PPC_VLE for decoding when disassembling.

	Background: Some versions of powerpc e200 have "Lightweight Signal
	Processing" support, examples being e200z215 and e200z425.  As far as
	I can tell, LSP and SPE are mutually exclusive.  This seems to be
	borne out by insn encoding, for example LSP "zvaddih" and SPE "evaddw"
	have the same encoding.  So none of the processor descriptions in
	ppc_opts ought to have both PPC_OPCODE_LSP and PPC_OPCODE_SPE/2, if we
	want disassembly to work.  I also could not find anything to suggest
	that the LSP insns are enabled only in VLE mode, which means the LSP
	insns should not be in vle_opcodes.

	Fix all this by moving the LSP insns to their own table, and add a new
	e200z2 cpu entry with LSP support, removing LSP from -me200z4 and from
	-mvle.  (Yes, I know, as I said above some of the e200z4 processors
	have LSP.  Others have SPE.  It's hard to choose good options.  Think
	of z2 as meaning earlier, z4 as later.)  Also add -mlsp to allow
	adding the LSP insn set.

	include/
		* opcode/ppc.h (lsp_opcodes, lsp_num_opcodes): Declare.
		(LSP_OP_TO_SEG): Define.
	binutils/
		* doc/binutils.texi: Update ppc docs.
	gas/
		* config/tc-ppc.c (ppc_setup_opcodes): Add lsp opcodes to ppc_hash.
		* doc/c-ppc.texi: Document e200 and lsp.
		* testsuite/gas/ppc/lsp-checks.d: Assemble with -me200z2.
		* testsuite/gas/ppc/lsp.d: Likewise, disassembly too.
		* testsuite/gas/ppc/ppc.exp: Don't xfail lsp test.
	opcodes/
		* ppc-dis.c (ppc_opts): Add e200z2 and lsp.  Don't set
		PPC_OPCODE_LSP for e200z4 or vle.
		(ppc_parse_cpu): Mutually exclude LSP and SPE.
		(LSP_OPCD_SEGS): Define.
		(lsp_opcd_indices): New array.
		(disassemble_init_powerpc): Init lsp_opcd_indices.
		(lookup_lsp): New function.
		(print_insn_powerpc): Call it.
		* ppc-opc.c: Include libiberty.h for ARRAY_SIZE and use throughout.
		(vle_opcodes): Move LSP opcodes to..
		(lsp_opcodes): ..here, and sort.
		(lsp_num_opcodes): New.

2022-10-14  Alan Modra  <amodra@gmail.com>

	PR29677, Field `the_bfd` of `asymbol` is uninitialised
	Besides not initialising the_bfd of synthetic symbols, counting
	symbols when sizing didn't match symbols created if there were any
	dynsyms named "".  We don't want synthetic symbols without names
	anyway, so get rid of them.  Also, simplify and correct sanity checks.

		PR 29677
		* mach-o.c (bfd_mach_o_get_synthetic_symtab): Rewrite.

2022-10-14  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Drop unnecessary -Wl,-soname in gdb.base/skip-solib.exp
	I noticed in gdb.base/skip-solib.exp:
	...
	if {[gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} \
	        [list debug -Wl,-soname,${libname}.so]] != ""} {
	    return -1
	}
	...
	that the -Wl,-soname argument is missing an ldflags= prefix, but adding it
	gives us a duplicate:
	...
	Executing on host: gcc -fno-stack-protector \
	  outputs/gdb.base/skip-solib/skip-solib-lib.c.o  -fdiagnostics-color=never \
	  -shared -g  -Wl,-soname,libskip-solib.so -Wl,-soname,libskip-solib.so -lm \
	  -o outputs/gdb.base/skip-solib/libskip-solib.so    (timeout = 300)
	...
	so apparently it's taken care of by gdb_compile_shlib.

	Drop the inactive and also unnecessary -Wl,-soname,${libname}.so from the
	flags list for the gdb_compile_shlib call.

	Tested on x86_64-linux.

2022-10-14  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/infoline-reloc-main-from-zero.exp with PIE
	With test-case gdb.base/infoline-reloc-main-from-zero.exp and target board
	unix/-fPIE/-pie I run into:
	...
	gdb compile failed, ld: infoline-reloc-main-from-zero: error: \
	  PHDR segment not covered by LOAD segment
	collect2: error: ld returned 1 exit status
	...

	When running with native, I find that the executable is static:
	...
	$ file infoline-reloc-main-from-zero
	infoline-reloc-main-from-zero: ELF 64-bit LSB executable, x86-64, \
	  version 1 (SYSV), statically linked, BuildID[sha1]=$hex, with debug_info, \
	  not stripped
	...
	despite not having been compiled with -static.

	Fix the compilation by adding -static to the compilation flags.

	Tested on x86_64-linux.

2022-10-14  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/infoline-reloc-main-from-zero.exp with clang
	With test-case gdb.base/infoline-reloc-main-from-zero.exp and clang I run into:
	...
	gdb compile failed, clang-13.0: warning: -e main: 'linker' input unused \
	  [-Wunused-command-line-argument]
	clang-13.0: warning: -Wl,-Ttext=0x00: 'linker' input unused \
	  [-Wunused-command-line-argument]
	clang-13.0: warning: -Wl,-N: 'linker' input unused \
	  [-Wunused-command-line-argument]
	UNTESTED: gdb.base/infoline-reloc-main-from-zero.exp: \
	  infoline-reloc-main-from-zero.exp
	UNTESTED: gdb.base/infoline-reloc-main-from-zero.exp: failed to compile
	...

	Fix this by using ldflags instead of additional_flags.

	Likewise, fix all occurrences of:
	...
	$ find gdb/testsuite -name *.exp | xargs grep additional_flags.*Wl
	...

	Tested on x86_64-linux.

2022-10-14  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix nopie test-cases with target board unix/-fPIE/-pie
	Compilers default to either PIE or no-PIE executables.

	In order to test PIE executables with a compiler that produces non-PIE by
	default, we can use target board unix/-fPIE/-pie, which set the multilib_flags
	of the target board to "-fPIE -pie".

	Likewise, we can use target board unix/-fno-PIE/-no-pie with a compiler that
	produces PIE by default.

	The target board unix/-fno-PIE/-no-pie has a potential problem when compiling
	shared libs, because the multilib_flags will override the attempts of
	gdb_compile_shlib to compile with -fPIC.  This is taken care of by running the
	body of gdb_compile_shlib wrapped in with_PIE_multilib_flags_filtered.

	The target board unix/-fPIE/-pie has a problem with nopie compilations.  The
	current approach is to do the compilation hoping for the best, and if we find
	out that the resulting executable is PIE despite specifying nopie, we error
	out with the standard error message "nopie failed to prevent PIE executable".

	That however does not work for hard-coded assembly nopie test-cases, which will
	just noisily refuse to compile:
	...
	ld: amd64-disp-step0.o: relocation R_X86_64_32S against `.text' can not be \
	  used when making a PIE object; recompile with -fPIE^M
	...

	Fix this in gdb_compile by filtering out the PIE settings in the target board
	multilib_flags when pie or nopie is specified.

	Tested on x86_64-linux.

2022-10-14  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Factor out with_PIE_multilib_flags_filtered
	Factor out new procs with_PIE_multilib_flags_filtered and
	with_multilib_flags_filtered from proc gdb_compile_shlib.

	Tested on x86_64-linux.

2022-10-14  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add cond_wrap proc
	Add a new proc cond_wrap, that can be used to replace the repetitive:
	...
	    if { $cond } {
		wrap {
		    <body>
		}
	    } else {
		<body>
	    }
	...
	with the shorter:
	...
	    cond_wrap $cond wrap {
		<body>
	    }
	...

	Tested on x86_64-linux.

2022-10-14  Torbjörn SVENSSON  <torbjorn.svensson@foss.st.com>

	gdb: add Torbjörn Svensson to gdb/MAINTAINERS

2022-10-14  Jan Beulich  <jbeulich@suse.com>

	RISC-V: Zicbo{m,p,z} adjustments to riscv_multi_subset_supports_ext()
	The lack thereof did caused gas to issue "internal: unreachable
	INSN_CLASS_*" errors when trying to assemble respective insns without
	the feature(s) enabled via e.g. ".option arch, ...". Of course a proper
	hint towards the missing extension then wasn't given either.

2022-10-14  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Imply 'Zicsr' from privileged extensions with CSRs
	'H', 'Smstateen', 'Sscofpmf' and 'Sstc' are four privileged extensions with
	their CSR definitions and 'Smepmp' is a privileged extension with additional
	CSR bits.

	Volume II: Privileged Architecture of the RISC-V ISA Manual states that the
	privileged architecture requires the 'Zicsr' extension.  However, current
	GNU Binutils has no direct way whether the program has dependency to the
	privileged architecture itself.

	As a workaround, we should add implications from privileged extensions that
	either add new CSRs, extend existing CSRs or depends on using CSRs.

	This commit adds such implications for existing privileged extensions that
	satisfy this condition.

	gas/ChangeLog:

		* testsuite/gas/riscv/march-imply-h.d: New test, at least for 'H'.

	bfd/ChangeLog:

		* elfxx-riscv.c (riscv_implicit_subsets): Add 'Zicsr'
		implicications for privileged extensions 'H', 'Smstateen',
		'Sscofpmf', 'Sstc' and 'Smepmp'.

2022-10-14  Tsukasa OI  <research_trasio@irq.a4lg.com>

	opcodes/riscv-dis.c: Remove last_map_state
	Before changing the core disassembler, we take care of minor code clarity
	issues and improve readability.

	This commit removes unused variable last_map_state (set by the
	print_insn_riscv function but not read anywhere else).

	opcodes/ChangeLog:

		* riscv-dis.c (last_map_state): Remove.
		(print_insn_riscv): Remove setting last_map_state.

2022-10-14  Tsukasa OI  <research_trasio@irq.a4lg.com>

	opcodes/riscv-dis.c: Make XLEN variable static
	Before changing the core disassembler, we take care of minor code clarity
	issues and improve readability.

	Since xlen variable is not (and should not) used outside riscv-dis.c,
	this commit makes this variable static.

	opcodes/ChangeLog:

		* riscv-dis.c (xlen): Make this variable static.

2022-10-14  Tsukasa OI  <research_trasio@irq.a4lg.com>

	opcodes/riscv-dis.c: Use bool type whenever possible
	Before changing the core disassembler, we take care of minor code clarity
	issues and improve readability.

	This commit replaces uses of int with bool whenever possible.

	opcodes/ChangeLog:

		* riscv-dis.c (no_aliases) Change type to bool.
		(set_default_riscv_dis_options): Use boolean.
		(parse_riscv_dis_option_without_args): Likewise.
		(riscv_disassemble_insn): Use boolean keywords.

2022-10-14  Tsukasa OI  <research_trasio@irq.a4lg.com>

	opcodes/riscv-dis.c: Tidying with spacing
	Before changing the core disassembler, we take care of minor code clarity
	issues and improve readability.

	This commit takes care of improper spacing for code clarity.

	opcodes/ChangeLog:

		* riscv-dis.c (riscv_disassemble_insn): Tidying with spacing.

2022-10-14  Tsukasa OI  <research_trasio@irq.a4lg.com>

	opcodes/riscv-dis.c: Tidying with comments/clarity
	Before changing the core disassembler, we take care of minor code clarity
	issues and improve readability.

	First, we need to clarify the roles of variables and code portions.

	opcodes/ChangeLog:

		* riscv-dis.c (xlen): Move before default_isa_spec. Add comment.
		(default_isa_spec, default_priv_spec): Add comment.
		(riscv_gpr_names, riscv_fpr_names): Likewise.
		(parse_riscv_dis_option_without_args): Likewise.
		(parse_riscv_dis_option, parse_riscv_dis_options): Likewise.
		(maybe_print_address): Likewise.
		(riscv_disassemble_insn): Fix comment about the Zfinx "extension".
		Add comment about the riscv_multi_subset_supports call.

2022-10-14  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Test DWARF register number for "fp"
	This commit adds "fp" (x8 or s0) to dw-regnums.{s,d}.

	gas/ChangeLog:

		* testsuite/gas/riscv/dw-regnums.s: Add "fp".
		* testsuite/gas/riscv/dw-regnums.d: Likewise.

2022-10-14  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Move standard hints before all instructions
	Because all standard hints must be placed before corresponding instruction
	for the disassembler, they may taint basic RVI instruction section.

	This commit moves all standard hints before all basic RVI instructions
	to improve maintainability.

	opcodes/ChangeLog:

		* riscv-opc.c (riscv_opcodes): Move all standard hints before all
		standard instructions.

2022-10-14  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Move certain arrays to riscv-opc.c
	This is a part of small tidying (declare tables in riscv-opc.c).

	include/ChangeLog:

		* opcode/riscv.h (riscv_rm, riscv_pred_succ): Move declarations to
		opcodes/riscv-opc.c.  New non-static definitions.

	opcodes/ChangeLog:

		* riscv-opc.c (riscv_rm, riscv_pred_succ): Move from
		include/opcode/riscv.h.  Add description.

2022-10-14  Fangrui Song  <i@maskray.me>

	ld: Add --undefined-version
	This cancels a previous --no-undefined-version.
	gold has had --undefined-version for a long time.

2022-10-14  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-13  Carl Love  <cel@us.ibm.com>

	PowerPC, fix gdb.base/watchpoint.exp on Power 9
	Test gdb.base/watchpoint.exp generates 4 test errors on Power 9.  The
	test uses the test [target_info exists gdb,no_hardware_watchpoints] to
	determine if the processor supports hardware watchpoints.  The check
	only examines the processor type to determine if it supports hardware
	watchpoints.

	The PowerPC processors support hardware watchpoints with the
	exception of Power 9. The hardware watchpoint support is disabled on
	Power 9.  The test skip_hw_watchpoint_tests must be used to correctly
	determine if the PowerPC processor supports hardware watchpoints.

	This patch replaces the [target_info exists gdb,no_hardware_watchpoints]
	with the skip_hw_watchpoint_tests_p check.  With the patch, the test runs
	on Power 9 with hardware watchpoint force-disabled.  The test runs on
	all other PowerPC processors with and without hardware watchpoints
	enabled.

	The patch has been tested on Power 9 to verify the test only runs with
	hardware breakpoints disabled.  The patch has been tested on X86-64 with
	no regression failures.  The test fails on Power 10 due to an internal GDB
	error due to resource management.  The resource management issue will be
	addressed in another patch.

2022-10-13  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.dwarf2/macro-source-path.exp with -m32
	With test-case gdb.dwarf2/macro-source-path.exp and target board unix/-m32, I
	run into:
	...
	as: macro-source-path-gcc11-ld238-dw5-filename-641.o: \
	  unsupported relocation type: 0x1^M
	...

	The problem is that we have 64-bit dwarf so the debug_line offset in the
	.debug_macro section is an 8-byte entity, emitted using ".8byte":
	...
	        .section .debug_macro
	.Lcu_macros4:
	        .2byte        5                 /* version */
	        .byte        3                  /* flags */
	        .8byte        .LLlines3         /* debug_line offset */
	...
	but the linker doesn't support 8-byte relocation types on a 32-bit architecture.

	This is similar to what was fixed in commit a5ac8e7fa3b
	("[gdb/testsuite] Fix 64-bit dwarf test-cases with -m32") for for instance
	.debug_abbrev.

	Fix this in the same way, by using _op_offset to emit the debug_line offset.

	Tested on x86_64-linux with native and target board unix/-m32.

2022-10-13  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.dwarf2/entry-value-typedef.exp with -m32
	With test-case gdb.dwarf2/entry-value-typedef.exp and target board unix/-m32,
	I run into:
	...
	builtin_spawn -ignore SIGHUP g++ -fno-stack-protector \
	  gdb/testsuite/gdb.dwarf2/entry-value-typedef-amd64.S \
	  -fdiagnostics-color=never -Lbuild/libiberty -lm -m32 \
	  -o outputs/gdb.dwarf2/entry-value-typedef/entry-value-typedef^M
	entry-value-typedef.cpp: Assembler messages:^M
	entry-value-typedef.cpp:38: Error: bad register name `%rbp'^M
	...

	The problem is that the test-cases selects an amd64 .S file based on the check:
	...
	if { [istarget "x86_64-*-linux*"] } {
	...
	which is also true for target board unix/-m32 on x86_64-linux.

	Fix this by adding the missing is_lp64_target check.

	Tested on x86_64-linux, using native and target board unix/-m32.

2022-10-13  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.mi/mi-disassemble.exp with -m32
	With target board unix/-m32 and test-case gdb.mi/mi-disassemble.exp we have:
	...
	(gdb) ^M
	print/x *((unsigned char *) 0x8048485)^M
	&"print/x *((unsigned char *) 0x8048485)\n"^M
	~"$9 = 0x83\n"^M
	^done^M
	(gdb) ^M
	PASS: gdb.mi/mi-disassemble.exp: get valueof "*((unsigned char *) 0x8048485)"
	FAIL: gdb.mi/mi-disassemble.exp: byte at 0x8048485 matches
	...
	The test-case passes with native.

	With native we see in gdb.log that variable longest_insn_bytes is:
	...
	Longest instruction at 0x0000000000400549 with bytes '48 8b 05 20 01 00 00'
	...
	and variable split_bytes (added debug puts) ends up as:
	...
	SPLIT_BYTES: 48 8b 05 20 01 00 00
	...

	But with unix/-m32 we have longest_insn_byte:
	...
	Longest instruction at 0x08048481 with bytes '8d 4c 24 04        '
	...
	and split_bytes ends up as:
	...
	SPLIT_BYTES: 8d 4c 24 04 {} {} {} {} {} {} {} {}
	...
	so the trailing whitespace is translated by split to empty bytes, and the
	mismatch FAILs are generated for those.

	Fix this by stripping the whitespace, which makes us end up with a different
	and indeed longer insn:
	...
	Longest instruction at 0x08048492 with bytes 'dd 05 98 85 04 08'
	...

	Tested on x86_64-linux, with native and target board unix/-m32.

2022-10-13  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-12  Carl Love  <cel@us.ibm.com>

	PowerPC, fix test gdb.base/watchpoint-stops-at-right-insn.exp
	Test gdb.base/watchpoint-stops-at-right-insn.exp generates 4 test errors
	on Power 9.  The test uses the test [target_info exists gdb,
	no_hardware_watchpoints] to determine if the processor supports hardware
	watchpoints.  The check only examines the processor type to determine if
	it supports hardware watchpoints.  Note, the test works fine on Power 10.

	The PowerPC processors support hardware watchpoints with the
	exception of Power 9. The hardware watchpoint support is disabled on
	Power 9.  The test skip_hw_watchpoint_tests must be used to correctly
	determine if the PowerPC processor supports hardware watchpoints.

	This patch replaces the [target_info exists gdb,no_hardware_watchpoints]
	with the skip_hw_watchpoint_tests_p check.  With the patch, the test is
	disabled on Power 9 but runs on all other PowerPC processors.

	The patch has been tested on Power 9, Power 10 and X86-64 with no
	regression failures.

2022-10-12  Jan Beulich  <jbeulich@suse.com>

	x86: drop "regmask" static variable
	Replace its two uses by more direct checks, paralleling what's already
	there for SIMD registers.

2022-10-12  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Factor out elf_symfile_read_dwarf2
	Factor out elf_symfile_read_dwarf2 from elf_symfile_read.  NFC.

	Tested on x86_64-linux.

2022-10-12  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix ctf test-cases on openSUSE Tumbleweed
	When running test-case gdb.base/ctf-constvars.exp on openSUSE Tumbleweed (with
	system gcc version 12, providing gcc -gctf support, enabling the ctf test-cases
	in the gdb testsuite), I run into:
	...
	(gdb) print vox^M
	'vox' has unknown type; cast it to its declared type^M
	(gdb) FAIL: gdb.base/ctf-constvars.exp: print vox
	...

	There are two causes for this:
	- the linker flags are missing --ctf-variables, so the information for variable
	  vox is missing (reported in PR29468), and
	- the executable contains some dwarf2 due to some linked-in glibc objects,
	  so the ctf info is ignored (reported in PR29160).

	By using:
	- -Wl,--ctf-variable,
	- -Wl,--strip-debug, and
	we can make the test-case and some similar test-cases pass.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29160
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29468

2022-10-12  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Silence warnings about obsolete -gstabs
	When running test-case gdb.base/gdbindex-stabs.exp on openSUSE Tumbleweed (with
	gcc 12) I get:
	...
	gdb compile failed, gdb/testsuite/gdb.base/gdbindex-stabs.c: warning: \
	  STABS debugging information is obsolete and not supported anymore
	...

	Silence the warning by passing quiet to gdb_compile.  Likewise in two other
	test-cases.

2022-10-12  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Replace remaining -gt with -gctf
	With test-cases gdb.base/cvexpr.exp and gdb.base/whatis.exp I run into:
	...
	gdb compile failed, gcc: error: unrecognized debug output level 't'
	...

	This is due to using additional_flags=-gt.

	Commit ffb3f587933 ("CTF: multi-CU and archive support") replaced
	additional_flags=-gt with additional_flags=-gctf in gdb.ctf/*.exp and
	gdb.base/ctf-*.exp.

	Do the same in these two test-cases.

	Tested on x86_64-linux.

2022-10-12  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/infoline-reloc-main-from-zero.exp with recent ld
	On openSUSE Tumbleweed (with ld 2.39) and test-case
	gdb.base/infoline-reloc-main-from-zero.exp, I get:
	...
	gdb compile failed, ld: warning: infoline-reloc-main-from-zero has a LOAD \
	  segment with RWX permissions
	UNTESTED: gdb.base/infoline-reloc-main-from-zero.exp: \
	  infoline-reloc-main-from-zero.exp
	...

	Fix this by compiling with -Wl,--no-warn-rwx-segments.

	Tested on x86_64-linux.

2022-10-12  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/nested-subp{2,3}.exp with recent ld
	On openSUSE Tumbleweed (with ld 2.39) I get for test-case
	gdb.base/nested-subp2.exp:
	...
	gdb compile failed, ld: warning: tmp.o: requires executable stack \
	  (because the .note.GNU-stack section is executable)
	...

	Fix this by compiling with -Wl,--no-warn-execstack.

	Likewise in gdb.base/nested-subp3.exp

	Tested on x86_64-linux.

2022-10-12  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Remove unnecessary perror in some test-cases
	On openSUSE Tumbleweed I noticed:
	...
	UNTESTED: gdb.dwarf2/fission-absolute-dwo.exp: fission-absolute-dwo.exp
	ERROR: failed to compile fission-absolute-dwo
	...

	The ERROR is unnecessary, given that an UNTESTED is already emitted.

	Furthermore, it could be argued that it is incorrect because it's not a
	testsuite error to not be able to compile something, and UNTESTED or
	UNSUPPORTED is more appropriate.

	Remove the perror call, likewise in fission-relative-dwo.exp.

	Tested on x86_64-linux.

2022-10-12  Nick Clifton  <nickc@redhat.com>

	Fix objcopy's error message when it cannot add a .gnu_debuglink section because the section already exists.
		PR 29665
		* objcopy.c (copy_object): Use the input filename when
		reporting that a .gnu_debuglink section already exists.

2022-10-12  Tsukasa OI  <research_trasio@irq.a4lg.com>

	sim/ppc: Fix core_find_mapping diagnostics
	Because "%p" is the pointer conversion specifier to print a pointer in an
	implementation-defined manner, the result with format string containing
	"0x%p" can be strange.  For instance, core_map_find_mapping prints error
	containing "0x0x...." (processor is not NULL) or "0x(null)" (processor is
	NULL) on glibc.

	This commit replaces "0x%p" with "%p" to prevent unpredictable behavior.

2022-10-12  Andrew Burgess  <aburgess@redhat.com>

	sim/ppc: fixes for arguments to printf style functions
	After the recent series of fixes to mark more functions in the
	simulator with ATTRIBUTE_PRINTF, there were some build failures in the
	ppc sim due, in some cases, to bugs with the arguments being passed,
	and in other cases, the issues were (maybe) less serious, with
	arguments being the wrong size, or type, for the printf format being
	used.

	This commit fixes all of the issues that I ran into.

	In each case I selected the easiest solution to the problem, which is
	usually just casting the argument to the correct type.  If anyone
	later on thinks the print format should change, please feel free to do
	that.  What we have here should keep the simulator basically working
	as it does currently, which is my goal with this commit.

2022-10-12  Tom de Vries  <tdevries@suse.de>

	[gdb/contrib] Use OBJCOPY everywhere in cc-with-tweaks.sh
	I noticed that the $want_gnu_debuglink code in gdb/contrib/cc-with-tweaks.sh
	uses objcopy instead of $OBJCOPY.  Fix this.

	Script checked with shellcheck, no new warnings added.

	Tested on x86_64-linux.

2022-10-12  Simon Marchi  <simon.marchi@efficios.com>

	Re-apply "Pass PKG_CONFIG_PATH down from top-level Makefile"
	Commit 228cf97dd3c8 ("Merge configure.ac from gcc project") undid the
	change originally done in de83289ef32e ("Pass PKG_CONFIG_PATH down from
	top-level Makefile").  Re-apply it.

	Change-Id: I91138dfca41c43b05e53e445f62e4b27882536bf

2022-10-12  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: rename target_read_auxv(target_ops *) to target_read_auxv_raw
	Having two overloads of target_read_auxv that don't have the same goals
	is confusing.  Rename the one that reads from an explicit target_ops to
	target_read_auxv_raw.  Also, it occured to me that the non-raw version
	could use the raw version, that reduces duplication a bit.

	Change-Id: I28e5f7cecbfcacd0174d4686efb3e4a23b4ad491

2022-10-12  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-12  Alan Modra  <amodra@gmail.com>

	Re: Merge configure.ac from gcc project
	Also copy over config.acx.m4, and regenerate.

2022-10-11  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: fix auxv caching
	There's a flaw in the interaction of the auxv caching and the fact that
	target_auxv_search allows reading auxv from an arbitrary target_ops
	(passed in as a parameter).  This has consequences as explained in this
	thread:

	  https://inbox.sourceware.org/gdb-patches/20220719144542.1478037-1-luis.machado@arm.com/

	In summary, when loading an AArch64 core file with MTE support by
	passing the executable and core file names directly to GDB, we see the
	MTE info:

	    $ ./gdb -nx --data-directory=data-directory -q aarch64-mte-gcore aarch64-mte-gcore.core
	    ...
	    Program terminated with signal SIGSEGV, Segmentation fault
	    Memory tag violation while accessing address 0x0000ffff8ef5e000
	    Allocation tag 0x1
	    Logical tag 0x0.
	    #0  0x0000aaaade3d0b4c in ?? ()
	    (gdb)

	But if we do it as two separate commands (file and core) we don't:

	    $ ./gdb -nx --data-directory=data-directory -q -ex "file aarch64-mte-gcore" -ex "core aarch64-mte-gcore.core"
	    ...
	    Program terminated with signal SIGSEGV, Segmentation fault.
	    #0  0x0000aaaade3d0b4c in ?? ()
	    (gdb)

	The problem with the latter is that auxv data gets improperly cached
	between the two commands.  When executing the file command, auxv gets
	first queried here, when loading the executable:

	    #0  target_auxv_search (ops=0x55555b842400 <exec_ops>, match=0x9, valp=0x7fffffffc5d0) at /home/simark/src/binutils-gdb/gdb/auxv.c:383
	    #1  0x0000555557e576f2 in svr4_exec_displacement (displacementp=0x7fffffffc8c0) at /home/simark/src/binutils-gdb/gdb/solib-svr4.c:2482
	    #2  0x0000555557e594d1 in svr4_relocate_main_executable () at /home/simark/src/binutils-gdb/gdb/solib-svr4.c:2878
	    #3  0x0000555557e5989e in svr4_solib_create_inferior_hook (from_tty=1) at /home/simark/src/binutils-gdb/gdb/solib-svr4.c:2933
	    #4  0x0000555557e6e49f in solib_create_inferior_hook (from_tty=1) at /home/simark/src/binutils-gdb/gdb/solib.c:1253
	    #5  0x0000555557f33e29 in symbol_file_command (args=0x7fffffffe01c "aarch64-mte-gcore", from_tty=1) at /home/simark/src/binutils-gdb/gdb/symfile.c:1655
	    #6  0x00005555573319c3 in file_command (arg=0x7fffffffe01c "aarch64-mte-gcore", from_tty=1) at /home/simark/src/binutils-gdb/gdb/exec.c:555
	    #7  0x0000555556e47185 in do_simple_func (args=0x7fffffffe01c "aarch64-mte-gcore", from_tty=1, c=0x612000047740) at /home/simark/src/binutils-gdb/gdb/cli/cli-decode.c:95
	    #8  0x0000555556e551c9 in cmd_func (cmd=0x612000047740, args=0x7fffffffe01c "aarch64-mte-gcore", from_tty=1) at /home/simark/src/binutils-gdb/gdb/cli/cli-decode.c:2543
	    #9  0x00005555580e63fd in execute_command (p=0x7fffffffe02c "e", from_tty=1) at /home/simark/src/binutils-gdb/gdb/top.c:692
	    #10 0x0000555557771913 in catch_command_errors (command=0x5555580e55ad <execute_command(char const*, int)>, arg=0x7fffffffe017 "file aarch64-mte-gcore", from_tty=1, do_bp_actions=true) at /home/simark/src/binutils-gdb/gdb/main.c:513
	    #11 0x0000555557771fba in execute_cmdargs (cmdarg_vec=0x7fffffffd570, file_type=CMDARG_FILE, cmd_type=CMDARG_COMMAND, ret=0x7fffffffd230) at /home/simark/src/binutils-gdb/gdb/main.c:608
	    #12 0x00005555577755ac in captured_main_1 (context=0x7fffffffda10) at /home/simark/src/binutils-gdb/gdb/main.c:1299
	    #13 0x0000555557775c2d in captured_main (data=0x7fffffffda10) at /home/simark/src/binutils-gdb/gdb/main.c:1320
	    #14 0x0000555557775cc2 in gdb_main (args=0x7fffffffda10) at /home/simark/src/binutils-gdb/gdb/main.c:1345
	    #15 0x00005555568bdcbe in main (argc=10, argv=0x7fffffffdba8) at /home/simark/src/binutils-gdb/gdb/gdb.c:32

	Here, target_auxv_search is called on the inferior's target stack.  The
	target stack only contains the exec target, so the query returns empty
	auxv data.  This gets cached for that inferior in `auxv_inferior_data`.

	In its constructor (before it is pushed to the inferior's target stack),
	the core_target needs to identify the right target description from the
	core, and for that asks the gdbarch to read a target description from
	the core file.  Because some implementations of
	gdbarch_core_read_description (such as AArch64's) need to read auxv data
	from the core in order to determine the right target description, the
	core_target passes a pointer to itself, allowing implementations to call
	target_auxv_search it.  However, because we have previously cached
	(empty) auxv data for that inferior, target_auxv_search searched that
	cached (empty) auxv data, not auxv data read from the core.  Remember
	that this data was obtained by reading auxv on the inferior's target
	stack, which only contained an exec target.

	The problem I see is that while target_auxv_search offers the
	flexibility of reading from an arbitrary (passed as an argument) target,
	the caching doesn't do the distinction of which target is being queried,
	and where the cached data came from.  So, you could read auxv from a
	target A, it gets cached, then you try to read auxv from a target B, and
	it returns the cached data from target A.  That sounds wrong.  In our
	case, we expect to read different auxv data from the core target than
	what we have read from the target stack earlier, so it doesn't make
	sense to hit the cache in this case.

	To fix this, I propose splitting the code paths that read auxv data from
	an inferior's target stack and those that read from a passed-in target.
	The code path that reads from the target stack will keep caching,
	whereas the one that reads from a passed-in target won't.  And since,
	searching in auxv data is independent from where this data came from,
	split the "read" part from the "search" part.

	From what I understand, auxv caching was introduced mostly to reduce
	latency on remote connections, when doing many queries.  With the change
	I propose, only the queries done while constructing the core_target
	end up not using cached auxv data.  This is fine, because there are just
	a handful of queries max, done at this point, and reading core files is
	local.

	The changes to auxv functions are:

	 - Introduce 2 target_read_auxv functions.  One reads from an explicit
	   target_ops and doesn't do caching (to be used in
	   gdbarch_core_read_description context).  The other takes no argument,
	   reads from the current inferior's target stack (it looks just like a
	   standard target function wrapper) and does caching.

	   The first target_read_auxv actually replaces get_auxv_inferior_data,
	   since it became a trivial wrapper around it.

	 - Change the existing target_auxv_search to not read auxv data from the
	   target, but to accept it as a parameter (a gdb::byte_vector).  This
	   function doesn't care where the data came from, it just searches in
	   it.  It still needs to take a target_ops and gdbarch to know how to
	   parse auxv entries.

	 - Add a convenience target_auxv_search overload that reads auxv
	   data from the inferior's target stack and searches in it.  This
	   overload is useful to replace the exist target_auxv_search calls that
	   passed the `current_inferior ()->top_target ()` target and keep the
	   call sites short.

	 - Modify parse_auxv to accept a target_ops and gdbarch to use for
	   parsing entries.  Not strictly related to the rest of this change,
	   but it seems like a good change in the context.

	Changes in architecture-specific files (tdep and nat):

	 - In linux-tdep, linux_get_hwcap and linux_get_hwcap2 get split in two,
	   similar to target_auxv_search.  One version receives auxv data,
	   target and arch as parameters.  The other gets everything from the
	   current inferior.  The latter is for convenience, to avoid making
	   call sites too ugly.

	 - Call sites of linux_get_hwcap and linux_get_hwcap2 are adjusted to
	   use either of the new versions.  The call sites in
	   gdbarch_core_read_description context explicitly read auxv data from
	   the passed-in target and call the linux_get_hwcap{,2} function with
	   parameters.  Other call sites use the versions without parameters.

	 - Same idea for arm_fbsd_read_description_auxv.

	 - Call sites of target_auxv_search that passed
	   `current_inferior ()->top_target ()` are changed to use the
	   target_auxv_search overload that works in the current inferior.

	Reviewed-By: John Baldwin <jhb@FreeBSD.org>
	Reviewed-By: Luis Machado <luis.machado@arm.com>
	Change-Id: Ib775a220cf1e76443fb7da2fdff8fc631128fe66

2022-10-11  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.debuginfod/fetch_src_and_symbols.exp with native-gdbserver
	When running test-case gdb.debuginfod/fetch_src_and_symbols.exp with target
	board native-gdbserver, I get:
	...
	Running gdb.debuginfod/fetch_src_and_symbols.exp ...
	ERROR: tcl error sourcing gdb.debuginfod/fetch_src_and_symbols.exp.
	ERROR: gdbserver does not support start without extended-remote
	    while executing
	"error "gdbserver does not support $command without extended-remote""
	    (procedure "gdb_test_multiple" line 51)
	    invoked from within
	"gdb_test_multiple $command $message {*}$opts $user_code"
	    (procedure "gdb_test" line 56)
	    invoked from within
	"gdb_test "start" "Temporary breakpoint.*""
	...

	Fix this by replacing gdb_test "start" with runto_main.

	Tested on x86_64-linux.

2022-10-11  Nick Clifton  <nickc@redhat.com>

	Re: Error: attempt to get value of unresolved symbol `L0'
		* symbols.c (S_GET_VALUE): If the unresolved symbol is the fake
		label provide a more helpful error message to the user.
		(S_GET_VALUE_WHERE): Like S_GET_VALUE, but includes a file/line
		number for error reporting purposes.
		* symbols.h (S_GET_VALUE_WHERE): Prototype.
		* write.c (fixup_segment): Use S_GET_VALUE_WHERE.

2022-10-11  Tsukasa OI  <research_trasio@irq.a4lg.com>

	sim: Initialize pbb_br_* by default
	On the files generated by sim/common/genmloop.sh, variables pbb_br_type and
	pbb_br_npc are declared uninitialized and passed to other functions in some
	cases.  Despite that those are harmless, they will generate GCC warnings
	("-Wmaybe-uninitialized").

	This commit ensures that pbb_br_type and pbb_br_npc variables are
	initialized to a harmless value.

2022-10-11  Tsukasa OI  <research_trasio@irq.a4lg.com>

	sim: Check known getopt definition existence
	Clang generates a warning if there is a function declaration/definition
	with zero arguments.  Such declarations/definitions without a prototype (an
	argument list) are deprecated forms of indefinite arguments
	("-Wdeprecated-non-prototype").  On the default configuration, it causes a
	build failure (unless "--disable-werror" is specified).

	include/getopt.h defines some getopt function definitions but one of them
	has a form "extern int getopt ();".  If this form is selected in
	include/getopt.h, Clang generates a warning and the build fails by default.

	In really old environments, this getopt definition with no arguments is
	necessary (because the definition may change between environments).
	However, this definition is now a cause of problems on modern environments.

	A good news is, this definition is not always selected (e.g. if used by
	binutils/*.c).  This is because configuration scripts of binutils, gas,
	gprof and ld tries to find known definition of getopt function is used and
	defines HAVE_DECL_GETOPT macro.  If this macro is defined when getopt.h is
	included, a good form of getopt is used and Clang won't generate warnings.

	This commit adds a modified portion of ld/configure.ac to find the known
	getopt definition.  If we could find one (and we *will* in most modern
	environments), we don't need to rely on the deprecated definition.

2022-10-11  Tsukasa OI  <research_trasio@irq.a4lg.com>
	    Andrew Burgess  <aburgess@redhat.com>

	sim: Suppress non-literal printf warning
	Clang generates a warning if the format string of a printf-like function is
	not a literal ("-Wformat-nonliteral"). On the default configuration, it
	causes a build failure (unless "--disable-werror" is specified).

	To avoid this warning, this commit now uses vsnprintf to format error
	message and pass the message to sim_engine_abort function with another
	printf-style formatting.

	This patch is mostly authored by Andrew Burgess and slightly modified by
	Tsukasa OI.

2022-10-11  Tsukasa OI  <research_trasio@irq.a4lg.com>

	sim: Make WITH_{TRACE,PROFILE}-based macros bool
	Clang generates a warning if there is an ambiguous expression (possibly a
	bitwise operation (& or |), but a logical operator (&& or ||) is used;
	"-Wconstant-logical-operand").  On the default configuration, it causes a
	build failure (unless "--disable-werror" is specified).

	This is caused by predicate macros that use the form (base_variable & flag).
	Clang considers them as regular integer values (not boolean) and
	generates that warning.

	This commit makes Clang think those predicate macros to be boolean.

2022-10-11  Tsukasa OI  <research_trasio@irq.a4lg.com>

	sim: Remove self-assignments
	Clang generates a warning if there is a redundant self-assignment
	("-Wself-assign").  On the default configuration, it causes a build failure
	(unless "--disable-werror" is specified).

	This commit removes redundant self-assignments from two files.

2022-10-11  Tsukasa OI  <research_trasio@irq.a4lg.com>

	sim/rl78: Add ATTRIBUTE_PRINTF
	Clang generates a warning if the format string of a printf-like function is
	not a literal ("-Wformat-nonliteral").  On the default configuration, it
	causes a build failure (unless "--disable-werror" is specified).

	To avoid warnings on the printf-like wrapper, it requires proper
	__attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.

	This commit adds ATTRIBUTE_PRINTF to the printf-like functions.

2022-10-11  Tsukasa OI  <research_trasio@irq.a4lg.com>

	sim/ppc: Add ATTRIBUTE_PRINTF
	Clang generates a warning if the format string of a printf-like function is
	not a literal ("-Wformat-nonliteral").  On the default configuration, it
	causes a build failure (unless "--disable-werror" is specified).

	To avoid warnings on the printf-like wrapper, it requires proper
	__attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.

	This commit adds ATTRIBUTE_PRINTF to the printf-like functions.

	For the error function defined in sim_calls.c, the ATTRIBUTE_NORETURN
	has been moved to the function declaration.

2022-10-11  Tsukasa OI  <research_trasio@irq.a4lg.com>

	sim/m68hc11: Add ATTRIBUTE_PRINTF
	Clang generates a warning if the format string of a printf-like function is
	not a literal ("-Wformat-nonliteral").  On the default configuration, it
	causes a build failure (unless "--disable-werror" is specified).

	To avoid warnings on the printf-like wrapper, it requires proper
	__attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.

	This commit adds ATTRIBUTE_PRINTF to a printf-like function.

2022-10-11  Tsukasa OI  <research_trasio@irq.a4lg.com>

	sim/m32c: Add ATTRIBUTE_PRINTF
	Clang generates a warning if the format string of a printf-like function is
	not a literal ("-Wformat-nonliteral").  On the default configuration, it
	causes a build failure (unless "--disable-werror" is specified).

	To avoid warnings on the printf-like wrapper, it requires proper
	__attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.

	This commit adds ATTRIBUTE_PRINTF to the printf-like functions.

2022-10-11  Tsukasa OI  <research_trasio@irq.a4lg.com>

	sim/erc32: Add ATTRIBUTE_PRINTF
	Clang generates a warning if the format string of a printf-like function is
	not a literal ("-Wformat-nonliteral").  On the default configuration, it
	causes a build failure (unless "--disable-werror" is specified).

	To avoid warnings on the printf-like wrapper, it requires proper
	__attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.

	This commit adds ATTRIBUTE_PRINTF to the printf-like functions.

2022-10-11  Tsukasa OI  <research_trasio@irq.a4lg.com>

	sim/cris: Add ATTRIBUTE_PRINTF
	Clang generates a warning if the format string of a printf-like function is
	not a literal ("-Wformat-nonliteral").  On the default configuration, it
	causes a build failure (unless "--disable-werror" is specified).

	To avoid warnings on the printf-like wrapper, it requires proper
	__attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.

	This commit adds ATTRIBUTE_PRINTF to a printf-like function.

2022-10-11  Tsukasa OI  <research_trasio@irq.a4lg.com>

	sim/common: Add ATTRIBUTE_PRINTF
	Clang generates a warning if the format string of a printf-like function is
	not a literal ("-Wformat-nonliteral").  On the default configuration, it
	causes a build failure (unless "--disable-werror" is specified).

	To avoid warnings on the printf-like wrapper, it requires proper
	__attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.

	This commit adds ATTRIBUTE_PRINTF to a printf-like function.

2022-10-11  Martin Liska  <mliska@suse.cz>

	fix compressed_debug_section_names definition for "zlib"
	bfd/ChangeLog:

		* libbfd.c: Set COMPRESS_DEBUG_GABI_ZLIB for "zlib" value.

2022-10-11  Martin Liska  <mliska@suse.cz>

	add --enable-default-compressed-debug-sections-algorithm configure option
	ChangeLog:

		* configure.ac: Add --enable-default-compressed-debug-sections-algorithm.
		* configure: Regenerate.

	gas/ChangeLog:

		* NEWS: Document the new option.
		* as.c (flag_compress_debug): Set default algorithm based
		on the configure option.
		* configure.ac: Add --enable-default-compressed-debug-sections-algorithm.
		* configure: Regenerate.
		* config.in: Likewise.

	ld/ChangeLog:

		* NEWS: Document the new option.
		* configure.ac: Add --enable-default-compressed-debug-sections-algorithm.
		* configure: Regenerate.
		* config.in: Likewise.
		* ldmain.c: Set default algorithm based
		on the configure option.

2022-10-11  Martin Liska  <mliska@suse.cz>

	refactor usage of compressed_debug_section_type
	bfd/ChangeLog:

		* bfd-in.h (bfd_hash_set_default_size): Add COMPRESS_UNKNOWN
		  enum value.
		(struct compressed_type_tuple): New.
		* bfd-in2.h (bfd_hash_set_default_size): Regenerate.
		(struct compressed_type_tuple): Likewise.
		* libbfd.c (ARRAY_SIZE): New macro.
		(bfd_get_compression_algorithm): New function.
		(bfd_get_compression_algorithm_name): Likewise.

	gas/ChangeLog:

		* as.c: Do not special-case, use the new functions.

	ld/ChangeLog:

		* emultempl/elf.em: Do not special-case, use the new functions.
		* lexsup.c (elf_static_list_options): Likewise.

2022-10-11  Tsukasa OI  <research_trasio@irq.a4lg.com>

	sim/riscv: fix multiply instructions on simulator
	After this commit:

	  commit 0938b032daa52129b4215d8e0eedb6c9804f5280
	  Date:   Wed Feb 2 10:06:15 2022 +0900

	      RISC-V: Add 'Zmmul' extension in assembler.

	some instructions in the RISC-V simulator stopped working as a new
	instruction class 'INSN_CLASS_ZMMUL' was added, and some existing
	instructions were moved into this class.

	The simulator doesn't currently handle this instruction class, and so
	the instructions will now cause an illegal instruction trap.

	This commit adds support for INSN_CLASS_ZMMUL, and adds a test that
	ensures the affected instructions can be executed by the simulator.

	Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
	Reviewed-by: Andrew Burgess <aburgess@redhat.com>

2022-10-11  Nick Clifton  <nickc@redhat.com>

	Error: attempt to get value of unresolved symbol `L0'
		* symbols.c (S_GET_VALUE): If the unresolved symbol is the fake
		label provide a more helpful error message to the user.

2022-10-11  Tsukasa OI  <research_trasio@irq.a4lg.com>

	sim/moxie: add custom directory stamp rule
	Because sim/moxie/moxie-gdb.dtb is neither a program nor a library, automake
	does not generate dirstamp file ($builddir/sim/moxie/.dirstamp) for it.

	When maintainer mode is enabled, it tries to rebuild sim/moxie/moxie-gdb.dtb
	but fails because there's no rules for automake-generated dirstamp file
	which moxie-gdb.dtb depends.

	This commit adds its own rule for the directory stamp (modified copy of the
	automake output) and adds the directory stamp file to DISTCLEANFILES to
	mimic automake-generated behavior (although "make distclean" does not work
	when maintainer mode is enabled).

2022-10-11  Bruno Larsen  <blarsen@redhat.com>

	gdb/testsuite: Fix formatting of python script
	The python black formatter was complaining about formatting on the
	script gdb.python/pretty-print-call-by-hand.py.  This commit changed
	the offending lines to make the formatter happy.

2022-10-11  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix prompt parsing in capture_command_output
	I noticed in capture_command_output that the output of a single command is
	matched using two gdb_test_multiples:
	- the first one matching the echoed command and skipping an optional prefix,
	- the second one matching the output and the prompt.

	This is error-prone, because the first gdb_test_multiple has implicit
	clauses which may consume the prompt.

	The problem is easy to spot with an example.  First consider:
	...
	set output [capture_command_output "print 1" "\\\$1 = "]
	gdb_assert { [string equal $output "1"] }
	...
	for which we get:
	...
	PASS: [string equal $output "1"]
	...

	If we change the prefix string to a no-match, say "1 = ", and update the
	output string match accordingly, we get instead:
	...
	FAIL: capture_command_output for print 1
	FAIL: [string equal $output "\$1 = 1"]
	...

	The first FAIL is produced by the first gdb_test_multiple, consuming the prompt.

	The second gdb_test_multiple then silently times out waiting for another prompt,
	after which the second FAIL is produced.  Note that the timeout is silent
	because the gdb_test_multiple is called with an empty message argument.

	The second FAIL is because capture_command_output returns "", given that all
	the command output was consumed by the first gdb_test_multiple.

	Fix this by rewriting capture_command_output to use only a single
	gdb_test_multiple.

	Tested on x86_64-linux.

2022-10-11  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: no need to build version.texi
	gprofng/ChangeLog
	2022-10-10  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		PR gprofng/29465
		PR gprofng/29667
		* doc/Makefile.am: No need to build version.texi.
		* doc/Makefile.in: Rebuild.

2022-10-11  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: use the --libdir path to find libraries
	gprofng/ChangeLog
	2022-10-10  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		PR gprofng/29663
		* src/Makefile.am: Add -DLIBDIR to CPPFLAGS.
		* src/Makefile.in: Rebuild.
		* src/envsets.cc (putenv_libcollector_ld_misc): Use LIBDIR to find
		the gprofng libraries.

2022-10-11  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: run tests without installation
	gprofng/ChangeLog
	2022-10-10  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		PR gprofng/29107
		* testsuite/config/default.exp: Set up environment to run gprofng tests
		without installation.
		* testsuite/lib/Makefile.skel: Likewise.
		* testsuite/lib/display-lib.exp: Likewise.

2022-10-11  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: fix race in gdb.base/async-shell.exp
	I see some random failures in this test:

	    FAIL: gdb.base/async-shell.exp: run & (timeout)

	It can be reliably reproduced on a recent enough GNU/Linux with this
	change:

	    diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
	    index 44cc28b30051..2a3c8253ba5a 100644
	    --- a/gdb/testsuite/lib/gdb.exp
	    +++ b/gdb/testsuite/lib/gdb.exp
	    @@ -1301,6 +1301,7 @@ proc gdb_test_multiple { command message args } {
	         }
	         set gdb_test_name "$message"

	    +    sleep 2
	         set result 0
	         set code [catch {gdb_expect $code} string]

	"recent enough" means a system where libpthread.so was merged with
	libc.so, so at least glibc 2.34.

	The problem is that the `run &` command prints some things after the
	prompt:

	    (gdb) [Thread debugging using libthread_db enabled]
	    Using host libthread_db library "/usr/lib/../lib/libthread_db.so.1".

	If expect is quick enough, it will consume only up to the prompt.  But
	if it is slow enough, it will consume those messages at the same time as
	the prompt, in which case the gdb_test used for "run &" won't match.  By
	default, the prompt used by gdb_test uses a `$` to anchor the match at
	the end of the buffer.  If there's anything following the prompt, it
	won't match.

	The diff above adds a delay between sending the command and consuming
	the output, giving GDB more time to output the messages, giving a good
	chance that expect consumes them at the same time as the prompt.

	This is normally handled by using gdb_test_multiple and specifying a
	pattern that ends with "$gdb_prompt", but not a trailing $.  I think
	this is common enough that it deserves its own gdb_test option.
	Therefore, add the -no-anchor-prompt option to gdb_test, and
	gdb_test_no_output for completeness.  Use it in
	gdb.base/async-shell.exp.

	Change-Id: I9051d8800d1c10a2e95db1a575991f7723492f1b
	Approved-By: Tom de Vries <tdevries@suse.de>

2022-10-11  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-10  Tom Tromey  <tom@tromey.com>

	Fix a latent bug in print_wchar
	print_wchar keeps track of when escape sequences are emitted, to force
	an escape sequence if needed by a subsequent character.  For example
	for the string concatenation "\0" "1", gdb will print "\000\061" --
	because printing "\0001" might be confusing.

	However, this code has two errors.  First, this logic is not needed
	for octal escapes, because there is a length limit of 3 for octal
	escapes, and gdb always prints these with "%.3o".  Second, though,
	this *is* needed for hex escapes, because those do not have a length
	limit.

	This patch fixes these problems and adds the appropriate tests.

2022-10-10  Tom Tromey  <tom@tromey.com>

	Don't use wchar_printable in print_wchar
	print_wchar uses wchar_printable, but this isn't needed -- all the
	relevant cases are already handled by the 'switch'.  This changes the
	code to use gdb_iswprint, and removes a somewhat confusing comment
	related to this code.

	Remove c_printstr
	This renames c_printstr, removing a layer of indirection.

	Remove c_emit_char
	This renames c_emit_char, removing a layer of indirection.

	Boolify need_escape in generic_emit_char
	This changes 'need_escape' in generic_emit_char to be of type bool,
	rather than int.

2022-10-10  Tom Tromey  <tom@tromey.com>
	    Andrew Burgess  <aburgess@redhat.com>

	Fix latent quote char bug in generic_printstr
	generic_printstr prints an empty string like:

	      fputs_filtered ("\"\"", stream);

	However, this seems wrong to me if the quote character is something
	other than double quote.  This patch fixes this latent bug.  Thanks to
	Andrew for the test case.

2022-10-10  Tom Tromey  <tromey@adacore.com>

	Fix the guile build
	The frame_info_ptr patches broke the build with Guile.  This patch
	fixes the problem.  In mos cases I chose to preserve the use of
	frame_info_ptr, at least where I could be sure that the object
	lifetime did not interact with Guile's longjmp-based exception scheme.

	Tested on x86-64 Fedora 34.

2022-10-10  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Detect trailing ^C/^D in command
	Detect a trailing ^C/^D in the command argument of gdb_test_multiple, and
	error out.

	Tested on x86_64-linux.

2022-10-10  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix error message for cmd with trailing newline
	I noticed that the error message in gdb_test_multiple about trailing newline
	in a command does not mention the offending command, nor the word command:
	...
	    if [string match "*\[\r\n\]" $command] {
	        error "Invalid trailing newline in \"$message\" test"
	    }
	...

	Fix this by using instead:
	...
	        error "Invalid trailing newline in \"$command\" command"
	...

	Also add a test-case to trigger this: gdb.testsuite/gdb-test.exp.

	Tested on x86_64-linux.

2022-10-10  Andrew Burgess  <aburgess@redhat.com>

	gdb: include the base address in in-memory bfd filenames
	The struct target_buffer (in gdb_bfd.c) is used to hold information
	about an in-memory BFD object created by GDB.  For now this mechanism
	is used by GDB when loading information about JIT symfiles.

	This commit updates target_buffer (in gdb_bfd.c) to be more C++ like,
	and, at the same time, adds the base address of the symfile into the
	BFD filename.

	Right now, every in-memory BFD is given the filename "<in-memory>".
	This filename is visible in things like 'maint info symtabs' and
	'maint info line-table'.  If there are multiple in-memory BFD objects
	then it can be hard to match keep track if which BFD is which.  This
	commit changes the name to be "<in-memory@ADDRESS>" where ADDRESS is
	replaced with the base address for where the in-memory symbol file was
	read from.

	As an example of how this is useful, here's the output of 'maint info
	jit' showing a single loaded JIT symfile:

	  (gdb) maintenance info jit
	  jit_code_entry address symfile address    symfile size
	  0x00000000004056b0     0x0000000007000000 17320

	And here's part of the output from 'maint info symtabs':

	  (gdb) maintenance info symtabs
	  ...snip...
	  { objfile <in-memory@0x7000000> ((struct objfile *) 0x5258250)
	    { ((struct compunit_symtab *) 0x4f0afb0)
	      debugformat DWARF 4
	      producer GNU C17 9.3.1 20200408 (Red Hat 9.3.1-2) -mtune=generic -march=x86-64 -g -fno-stack-protector -fpic
	      name jit-elf-solib.c
	      dirname /tmp/binutils-gdb/build/gdb/testsuite
	      blockvector ((struct blockvector *) 0x5477850)
	      user ((struct compunit_symtab *) (null))
	  	{ symtab /tmp/binutils-gdb/build/gdb/testsuite/../../../src/gdb/testsuite/gdb.base/jit-elf-solib.c ((struct symtab *) 0x4f0b030)
	  	  fullname (null)
	  	  linetable ((struct linetable *) 0x5477880)
	  	}
	    }
	  }

	I've added a new test that checks the new in-memory file names are
	generated correctly, and also checks that the in-memory JIT files can
	be dumped back out using 'dump binary memory'.

2022-10-10  Andrew Burgess  <aburgess@redhat.com>

	gdb: remove filename arg from gdb_bfd_open_from_target_memory
	The filename argument to gdb_bfd_open_from_target_memory was never
	used; this argument had a default value of nullptr, and the only call
	to this function, in jit.c, relied on the default value.

	In the next commit I'm going to make some changes to the
	gdb_bfd_open_from_target_memory function, and, though I could take
	account of a filename parameter, it seems pointless to maintain an
	unused argument.

	This commit removes the filename argument.

	There should be no user visible changes after this commit.

2022-10-10  Andrew Burgess  <aburgess@redhat.com>

	gdb: add infcall specific debugging
	Add two new commands:

	  set debug infcall on|off
	  show debug infcall

	These enable some new debugging related to when GDB makes inferior
	function calls.  I've added some basic debugging for what I think are
	the major steps in the inferior function call process, but I'm sure we
	might want to add more later.

2022-10-10  Andrew Burgess  <aburgess@redhat.com>

	gdb: extra debug output in thread.c
	Add some extra 'threads' debug in a couple of places in thread.c.
	I've also added an additional gdb_assert in one case.

	gdb: improve infrun_debug_show_threads output
	This commit switches to use INFRUN_SCOPED_DEBUG_START_END in the
	infrun_debug_show_threads function, which means the output will get an
	extra level of indentation, this looks a little nicer I think.

2022-10-10  Nick Clifton  <nickc@redhat.com>

	Add ability to create reproducible source tarballs.
		* src-release.sh: Add "-r <date>" option to create reproducible
		tarballs based upon a fixed timestamp of <date>.
		* binutils/README-how-to-make-a-release: Add a line showing how to
		use -r <date> when creating a binutils release.

2022-10-10  Bruno Larsen  <blarsen@redhat.com>

	gdb/frame: Add reinflation method for frame_info_ptr
	Currently, despite having a smart pointer for frame_infos, GDB may
	attempt to use an invalidated frame_info_ptr, which would cause internal
	errors to happen.  One such example has been documented as PR
	python/28856, that happened when printing frame arguments calls an
	inferior function.

	To avoid failures, the smart wrapper was changed to also cache the frame
	id, so the pointer can be reinflated later.  For this to work, the
	frame-id stuff had to be moved to their own .h file, which is included
	by frame-info.h.

	Frame_id caching is done explicitly using the prepare_reinflate method.
	Caching is done manually so that only the pointers that need to be saved
	will be, and reinflating has to be done manually using the reinflate
	method because the get method and the -> operator must not change
	the internals of the class.  Finally, attempting to reinflate when the
	pointer is being invalidated causes the following assertion errors:

	check_ptrace_stopped_lwp_gone: assertion `lp->stopped` failed.
	get_frame_pc: Assertion `frame->next != NULL` failed.

	As for performance concerns, my personal testing with `time make
	chec-perf GDB_PERFTEST_MODE=run` showed an actual reduction of around
	10% of time running.

	This commit also adds a testcase that exercises the python/28856 bug with
	7 different triggers, run, continue, step, backtrace, finish, up and down.
	Some of them can seem to be testing the same thing twice, but since this
	test relies on stale pointers, there is always a chance that GDB got lucky
	when testing, so better to test extra.

	Regression tested on x86_64, using both gcc and clang.

	Approved-by: Tom Tomey <tom@tromey.com>

2022-10-10  Tom Tromey  <tom@tromey.com>

	Change GDB to use frame_info_ptr
	This changes GDB to use frame_info_ptr instead of frame_info *
	The substitution was done with multiple sequential `sed` commands:

	sed 's/^struct frame_info;/class frame_info_ptr;/'
	sed 's/struct frame_info \*/frame_info_ptr /g' - which left some
	    issues in a few files, that were manually fixed.
	sed 's/\<frame_info \*/frame_info_ptr /g'
	sed 's/frame_info_ptr $/frame_info_ptr/g' - used to remove whitespace
	    problems.

	The changed files were then manually checked and some 'sed' changes
	undone, some constructors and some gets were added, according to what
	made sense, and what Tromey originally did

	Co-Authored-By: Bruno Larsen <blarsen@redhat.com>
	Approved-by: Tom Tomey <tom@tromey.com>

2022-10-10  Tom Tromey  <tom@tromey.com>

	Introduce frame_info_ptr smart pointer class
	This adds frame_info_ptr, a smart pointer class.  Every instance of
	the class is kept on an intrusive list.  When reinit_frame_cache is
	called, the list is traversed and all the pointers are invalidated.
	This should help catch the typical GDB bug of keeping a frame_info
	pointer alive where a frame ID was needed instead.

	Co-Authored-By: Bruno Larsen <blarsen@redhat.com>
	Approved-by: Tom Tomey <tom@tromey.com>

2022-10-10  Tom Tromey  <tom@tromey.com>

	Remove frame_id_eq
	This replaces frame_id_eq with operator== and operator!=.  I wrote
	this for a version of this series that I later abandoned; but since it
	simplifies the code, I left this patch in.

	Approved-by: Tom Tomey <tom@tromey.com>

2022-10-10  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: use 'end' at the end of python blocks
	Within the testsuite, use the keyword 'end' to terminate blocks of
	Python code being sent to GDB, rather than sending \004.  I could only
	find three instances of this, all in tests that I originally wrote.  I
	have no memory of there being any special reason why I used \004
	instead of 'end' - I assume I copied this from somewhere else that has
	since changed.

	Non of the tests being changed here are specifically about whether
	\004 can be used to terminate a Python block, so I think switching to
	the more standard 'end' keyword is the right choice.

2022-10-10  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbsupport: re-generate configure
	I get this diff when re-generating configure, probably leftover from
	67d1991b785 ("egrep in binutils").

	Change-Id: I759c88c2bad648736d33ff98089db45c9b686356

2022-10-10  Alan Modra  <amodra@gmail.com>

	Merge configure.ac from gcc project
	To merge with gcc's copy of configure.ac we need to revert changes to
	configure.ac in the following gcc commits:
	dc832fb39fc0 2022-08-25
	fc259b522c0f 2022-06-25
	Then reapply configure.ac changes in binutils from these binutils
	commits:
	50ad1254d503 2021-01-09
	bb368aad297f 2022-03-11
	e5f2f7d901ee 2022-07-26
	2cac01e3ffff 2022-09-26
	Plus copy over gcc's config/ax_cxx_compile_stdcxx.m4, then regenerate
	configure.

2022-10-10  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-09  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-08  Tom Tromey  <tom@tromey.com>

	Merge both implementations of debug_names::insert
	The class debug_names has two 'insert' overloads, but only one of them
	is ever called externally, and it simply forwards to the other
	implementation.  It seems cleaner to me to have a single method, so
	this patch merges the two.

2022-10-08  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix silent fail in gdb.server/connect-with-no-symbol-file.exp
	With native and target boards native-gdbserver, remote-gdbserver-on-localhost and
	remote-stdio-gdbserver I have for gdb.server/connect-with-no-symbol-file.exp:
	...
	 # of expected passes            8
	...
	but with native-extended-gdbserver I have instead:
	...
	 # of expected passes            8
	 # of unexpected failures        4
	...

	The extra FAILs are of the form:
	...
	(gdb) detach^M
	Detaching from pid process 28985^M
	[Inferior 1 (process 28985) detached]^M
	(gdb) FAIL: gdb.server/connect-with-no-symbol-file.exp: sysroot=: \
	  action=permission: connection to GDBserver succeeded
	...
	and are due to the fact that the actual gdb output doesn't match the regexp:
	...
	    gdb_test "detach" \
	       ".*Detaching from program: , process.*Ending remote debugging.*" \
	       "connection to GDBserver succeeded"
	...

	With native, the actual gdb output is:
	...
	(gdb) detach^M
	Detaching from pid process 29657^M
	Ending remote debugging.^M
	[Inferior 1 (process 29657) detached]^M
	(gdb) Remote debugging from host ::1, port 51028^M
	...
	and because the regexp doesn't match, it triggers an implicit clause for
	"Ending remote debugging" in gdb_test_multiple, which has the consequence
	that the FAIL is silent.

	Fix:
	- the regexp by making it less strict
	- the silent fail by rewriting into a gdb_test_multiple, and adding an
	  explicit fail clause.

	Tested on x86_64-linux, using native and aforementioned target boards.

2022-10-08  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-07  Lancelot SIX  <lancelot.six@amd.com>

	gdb/testsuite: fix gdb.threads/linux-dp.exp regex
	On ubuntu 22.04 with the libc6-dbg package installed, I have the
	following failure:

	    where
	    #0  print_philosopher (n=3, left=33 '!', right=33 '!') at .../gdb/testsuite/gdb.threads/linux-dp.c:105
	    #1  0x000055555555576a in philosopher (data=0x55555555937c) at .../gdb/testsuite/gdb.threads/linux-dp.c:148
	    #2  0x00007ffff7e11b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
	    #3  0x00007ffff7ea3a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
	    (gdb) FAIL: gdb.threads/linux-dp.exp: first thread-specific breakpoint hit

	The regex for this test accounts for different situations (with /
	without debug symbol) but assumes that if debug info is present the
	backtrace shows execution under pthread_create.  However, for the
	implementation under test, we are under start_thread.

	Update the regex to accept start_thread.

	Tested on Ubuntu-22.04 x86_64 with and without libc6-dbg debug symbols
	available.

	Change-Id: I1e1536279890bca2cd07f038e026b41e46af44e0

2022-10-07  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Handle host cleanfiles
	When running test-case gdb.server/abspath.exp with host board
	local-remote-host-notty, I get:
	...
	$ git sti
	  ...
	        deleted:    gdb/testsuite/gdb.xml/trivial.xml
	...

	This happens as follows.  The test-case calls skip_gdbserver_test, which calls
	gdb_skip_xml_test, which does:
	...
	    set xml_file [gdb_remote_download host "${srcdir}/gdb.xml/trivial.xml"]
	...

	Then proc gdb_remote_download appends $xml_file (which for this particular
	host board happens to be ${srcdir}/gdb.xml/trivial.xml) to cleanfiles, which
	ends up being handled in gdb_finish by:
	...
	       eval remote_file target delete $cleanfiles
	...

	The problem is that a host file is deleted using target delete.

	Fix this by splitting cleanfiles up in cleanfiles_target and cleanfiles_host.

	Tested on x86_64-linux.

2022-10-07  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Remove unnecessary warning in gdb.base/default.exp
	When running test-case gdb.base/default.exp with target board
	native-gdbserver, we get:
	...
	WARNING: Skipping backtrace and break tests because of GDB stub.
	...

	There's no need for such a warning, so remove it.

	Tested on x86_64-linux with native and target board native-gdbserver.

2022-10-07  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix have_mpx with remote-gdbserver-on-localhost
	With target board remote-gdbserver-on-localhost and gdb.arch/i386-mpx-call.exp
	I run into:
	...
	FAIL: gdb.arch/i386-mpx-call.exp: upper_bnd0: continue to a bnd violation
	...

	This is due to the have_mpx test which should return 0, but instead returns 1
	because the captured output:
	...
	No MPX support
	No MPX support
	...
	does not match the used regexp:
	...
	    set status [expr ($status == 0) \
	                   && ![regexp "^No MPX support\r\n" $output]]
	...
	which does match the captured output with native:
	...
	No MPX support^M
	No MPX support^M
	...

	Fix this by making the \r in the regexp optional.

	Tested on x86_64-linux, with native and target board
	remote-gdbserver-on-localhost.

2022-10-07  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix DUPLICATEs with remote-gdbserver-on-localhost
	Fix some DUPLICATEs that we run into with target board
	remote-gdbserver-on-localhost, by using test_with_prefix.

	Tested on x86_64-linux, with native and target board
	remote-gdbserver-on-localhost.

2022-10-07  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix path in test name in gdb_load_shlib
	When running test-case gdb.server/solib-list.exp with target board
	remote-gdbserver-on-localhost, I run into:
	...
	(gdb) set solib-search-path $outputs/gdb.server/solib-list^M
	(gdb) PASS: gdb.server/solib-list.exp: non-stop 0: \
	  set solib-search-path $outputs/gdb.server/solib-list
	PATH: gdb.server/solib-list.exp: non-stop 0: \
	  set solib-search-path $outputs/gdb.server/solib-list
	...

	This is due to this code in gdb_load_shlib:
	...
	       gdb_test "set solib-search-path [file dirname $file]" "" ""
	...

	Fix this by setting an explicit test name.

	Tested on x86_64-linux, with native and target boards
	remote-gdbserver-on-localhost, native-gdbserver and native-extended-gdbserver.

2022-10-07  Alan Modra  <amodra@gmail.com>

	PR29653, objcopy/strip: fuzzed small input file induces large output file
	_bfd_check_format functions should not print errors or warnings if
	they return NULL.  A NULL return means the particular target under
	test does not match, so there isn't any reason to make a complaint
	about the target.  In fact there isn't a good reason to warn even if
	the target matches, except via the _bfd_per_xvec_warn mechanism; Some
	other target might be a better match.

	This patch tidies pe_bfd_object_p with the above in mind, and
	restricts the PE optional header SectionAlignment and FileAlignment
	fields somewhat.  I chose to warn on nonsense values rather than
	refusing to match.  Refusing to match would be OK too.

		PR 29653
		* peXXigen.c (_bfd_XXi_swap_aouthdr_in): Don't emit error about
		invalid NumberOfRvaAndSizes here.  Limit loop copying data
		directory to IMAGE_NUMBEROF_DIRECTORY_ENTRIES.
		* peicode.h (pe_bfd_object_p): Don't clear and test bfd_error
		around bfd_coff_swap_aouthdr_in.  Warn on invalid SectionAlignment,
		FileAlignment and NumberOfRvaAndSizes.  Don't return NULL on
		invalid NumberOfRvaAndSizes.

2022-10-07  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-06  Tom Tromey  <tromey@adacore.com>

	Fix indentation in riscv-tdep.c
	This just fixes some indentation in riscv-tdep.c.

2022-10-06  Torbjörn SVENSSON  <torbjorn.svensson@foss.st.com>

	gdb/arm: Handle lazy FPU state preservation
	Read LSPEN, ASPEN and LSPACT bits from FPCCR and use them together
	with FPCAR to identify if lazy FPU state preservation is active for
	the current frame.  See "Lazy context save of FP state", in B1.5.7,
	also ARM AN298, supported by Cortex-M4F architecture for details on
	lazy FPU register stacking.  The same conditions are valid for other
	Cortex-M cores with FPU.

	This patch has been verified on a STM32F4-Discovery board by:
	a) writing a non-zero value (lets use 0x1122334455667788 as an
	   example) to all the D-registers in the main function
	b) configured the SysTick to fire
	c) in the SysTick_Handler, write some other value (lets use
	   0x0022446688aaccee as an example) to one of the D-registers (D0 as
	   an example) and then do "SVC #0"
	d) in the SVC_Handler, write some other value (lets use
	   0x0099aabbccddeeff) to one of the D-registers (D0 as an example)

	In GDB, suspend the execution in the SVC_Handler function and compare
	the value of the D-registers for the SVC_handler frame and the
	SysTick_Handler frame.  With the patch, the value of the modified
	D-register (D0) should be the new value (0x009..eff) on the
	SVC_Handler frame, and the intermediate value (0x002..cee) for the
	SysTick_Handler frame.  Now compare the D-register value for the
	SysTick_Handler frame and the main frame.  The main frame should
	have the initial value (0x112..788).

2022-10-06  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Factor out have_complaint
	After committing 8ba677d3560 ("[gdb/symtab] Don't complain about function
	decls") I noticed that quite a bit of code in read_func_scope is used to decide
	whether to issue the "cannot get low and high bounds for subprogram DIE at
	$hex" complaint, which executes unnecessarily if we have the default
	"set complaints 0".

	Fix this by (NFC):
	- factoring out new static function have_complaint from macro complaint, and
	- using it to wrap the relevant code in read_func_scope.

	Tested on x86_64-linux.

2022-10-06  Andrew Burgess  <aburgess@redhat.com>

	gdb: add missing nullptr checks in bpstat_check_breakpoint_conditions
	Add a couple of missing nullptr checks in the function
	bpstat_check_breakpoint_conditions.

	No user visible change after this commit.

2022-10-06  Andrew Burgess  <aburgess@redhat.com>

	gdb: more infrun debug from breakpoint.c
	This commit adds additional infrun debug from the breakpoint.c file.
	The new debug output all relates to breakpoint condition evaluation.

	There is already some infrun debug emitted from the breakpoint.c file,
	so hopefully, adding more will not be contentious.  I think the
	functions being instrumented make sense as part of the infrun process,
	the inferior stops, evaluates the condition, and then either stops or
	continues.  This new debug gives more insight into that process.

	I had to make the bp_location* argument to find_loc_num_by_location
	const, and add a declaration for find_loc_num_by_location.

	There should be no user visible changes unless they turn on debug
	output.

2022-10-06  Andrew Burgess  <aburgess@redhat.com>

	gdb: add some additional debug in mark_async_event_handler
	Extend the existing debug printf call to include the previous state of
	the async_event_handler object.

2022-10-06  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Print XTheadMemPair literal as "immediate"
	The operand type "Xl(...)" denotes that (...) is a literal.  Specifically,
	they are intended to be a constant immediate value.

	This commit prints "Xl(...)" operand with dis_style_immediate style,
	not dis_style_text.

	opcodes/ChangeLog:

		* riscv-dis.c (print_insn_args): Use dis_style_immediate on
		the constant literal of the "Xl..." operand.

2022-10-06  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Fix T-Head immediate types on printing
	This commit fixes two minor typing-related issues for
	T-Head immediate operands.

	1.  A signed type must be specified when printing with %i.
	2.  unsigned/signed int is not portable enough for max 32-bit immediates.
	    Instead, we should use unsigned/signed long.
	    The format string is changed accordingly.

	opcodes/ChangeLog:

		* riscv-dis.c (print_insn_args): Fix T-Head immediate types on
		printing.

2022-10-06  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Print comma and tabs as the "text" style
	On the RISC-V disassembler, some separators have non-text style when
	printed with another word with another style.

	This commit splits those, making sure that those comma and tabs are printed
	with the "text" style.

	opcodes/ChangeLog:

		* riscv-dis.c (print_insn_args): Split and print the comma as
		text.  (riscv_disassemble_insn): Split and print tabs as text.
		(riscv_disassemble_data): Likewise.

2022-10-06  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Optimize riscv_disassemble_data printf
	This commit makes types of printf arguments on riscv_disassemble_data
	as small as possible (as long as we can preserve the portability) to reduce
	the cost of printf (especially on 32-bit host).

	opcodes/ChangeLog:

		* riscv-dis.c (riscv_disassemble_data): Use smallest possible type
		to printing data.

2022-10-06  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Fix printf argument types corresponding %x
	"%x" format specifier requires unsigned type, not int.  This commit
	fixes this issue on the RISC-V disassembler.

	opcodes/ChangeLog:

		* riscv-dis.c (print_insn_args): Fix printf argument types where
		the format specifier is "%x".

2022-10-06  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Fix immediates to have "immediate" style
	This commit fixes certain print calls on immediate operands to have
	dis_style_immediate.

	opcodes/ChangeLog:

		* riscv-dis.c (print_insn_args): Fix immediates to have
		"immediate" style.  (riscv_disassemble_data): Likewise.

2022-10-06  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-06  Alan Modra  <amodra@gmail.com>

	Re: bfd BLD-POTFILES.in dependencies
	Removing $BLD_POTFILES from BFD-POTFILES.in was correct, but left a
	hole in dependencies.
	make[4]: Entering directory '/home/alan/build/gas/all/bfd/po'
	make[4]: *** No rule to make target '../elf32-aarch64.c', needed by '/home/alan/src/binutils-gdb/bfd/po/bfd.pot'.  Stop.

		* Makefile.am (BUILT_SOURCES): Add BUILD_CFILES.
		* Makefile.in: Regenerate.

2022-10-05  Jan Beulich  <jbeulich@suse.com>

	x86/gas: support quoted address scale factor in AT&T syntax
	An earlier attempt (e68c3d59acd0 ["x86: better respect quotes in
	parse_operands()"]) needed undoing (cc0f96357e0b ["x86: permit
	parenthesized expressions again as addressing scale factor"]) as far its
	effect here went. As indicated back then, the issue is the backwards
	scanning of the operand string to find the matching opening parenthesis.
	Switch to forward scanning, finding the last outermost unquoted opening
	parenthesis (which is the one matching the trailing closing one).

	Arm64: support CLEARBHB alias
	While the Arm v8 ARM (rev I-a) still doesn't mention this alias, it is
	(typically via a macro) already in use in kernels and alike.

2022-10-05  Alan Modra  <amodra@gmail.com>

	PR29647, objdump -S looping
	Fuzzed input with this in .debug_line
	  [0x0000003b]  Special opcode 115: advance Address by 8 to 0x401180 and Line by -2 to -1

		PR 29647
		* objdump.c (print_line): Don't decrement line number here..
		(dump_lines): ..do so here instead, ensuring loop terminates.

2022-10-05  Alan Modra  <amodra@gmail.com>

	Re: stab nearest_line bfd_malloc_and_get_section
	It didn't take long for the fuzzers to avoid size checks in
	bfd_malloc_and_get_section.  Plug this hole.

		* syms.c (_bfd_stab_section_find_nearest_line): Ignore fuzzed
		sections with no contents.

2022-10-05  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: fix build with --enable-pgo-build=lto
	gprofng/ChangeLog
	2022-10-04  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		PR gprofng/29579
		* libcollector/dispatcher.c: Fix the symbol version in SYMVER_ATTRIBUTE.
		* libcollector/iotrace.c: Likewise.
		* libcollector/linetrace.c: Likewise.
		* libcollector/mmaptrace.c: Likewise.
		* libcollector/synctrace.c: Likewise.

2022-10-05  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-04  Tom Tromey  <tom@tromey.com>

	Remove decode_location_spec_default
	This removes decode_location_spec_default, inlining it into its sole
	caller.

	Regression tested on x86-64 Fedora 34.

2022-10-04  Palmer Dabbelt  <palmer@rivosinc.com>

	gas: NEWS: Mention the T-Head extensions that were recently added

2022-10-04  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Don't complain about function decls
	[ Requires "[gdb/symtab] Don't complain about inlined functions" as
	submitted here (
	https://sourceware.org/pipermail/gdb-patches/2022-September/191762.html ). ]

	With the test-case included in this patch, we get:
	...
	(gdb) ptype main^M
	During symbol reading: cannot get low and high bounds for subprogram DIE \
	  at 0xc1^M
	type = int (void)^M
	(gdb) FAIL: gdb.dwarf2/anon-ns-fn.exp: ptype main without complaints
	...

	The DIE causing the complaint is a function declaration:
	...
	 <2><c1>: Abbrev Number: 3 (DW_TAG_subprogram)
	    <c2>   DW_AT_name        : foo
	    <c8>   DW_AT_declaration : 1
	...
	which is referred to from the DIE representing the function definition:
	...
	 <1><f4>: Abbrev Number: 7 (DW_TAG_subprogram)
	    <f5>   DW_AT_specification: <0xc1>
	    <f9>   DW_AT_low_pc      : 0x4004c7
	    <101>   DW_AT_high_pc     : 0x7
	...
	which does contain the low and high bounds.

	Fix this by not complaining about function declarations.

	Tested on x86_64-linux.

2022-10-04  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Don't complain about inlined functions
	With the test-case included in this patch, we get:
	...
	(gdb) ptype main^M
	During symbol reading: cannot get low and high bounds for subprogram DIE \
	  at 0x113^M
	During symbol reading: cannot get low and high bounds for subprogram DIE \
	  at 0x11f^M
	type = int (void)^M
	(gdb) FAIL: gdb.dwarf2/inline.exp: ptype main
	...

	The complaints are about foo, with DW_AT_inline == DW_INL_inlined:
	...
	 <1><11f>: Abbrev Number: 6 (DW_TAG_subprogram)
	    <120>   DW_AT_name        : foo
	    <126>   DW_AT_prototyped  : 1
	    <126>   DW_AT_type        : <0x10c>
	    <12a>   DW_AT_inline      : 1       (inlined)
	...
	and foo2, with DW_AT_inline == DW_INL_declared_inlined:
	...
	 <1><113>: Abbrev Number: 5 (DW_TAG_subprogram)
	    <114>   DW_AT_name        : foo2
	    <11a>   DW_AT_prototyped  : 1
	    <11a>   DW_AT_type        : <0x10c>
	    <11e>   DW_AT_inline      : 3       (declared as inline and inlined)
	...

	Fix this by not complaining about inlined functions.

	Tested on x86_64-linux.

2022-10-04  Tsukasa OI  <research_trasio@irq.a4lg.com>

	gdb/riscv: Partial support for instructions up to 176-bit
	Because riscv_insn_length started to support instructions up to 176-bit,
	we need to increase buf size to 176-bit in size.

	Also, that would break an assumption in riscv_insn::decode so this commit
	fixes it, noting that instructions longer than 64-bit are not fully
	supported yet.

2022-10-04  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Fix buffer overflow on print_insn_riscv
	Because riscv_insn_length started to support instructions up to 176-bit,
	we need to increase packet buffer size to 176-bit in size.

	include/ChangeLog:

		* opcode/riscv.h (RISCV_MAX_INSN_LEN): Max instruction length for
		use in buffer size.

	opcodes/ChangeLog:

		* riscv-dis.c (print_insn_riscv): Increase buffer size for max
		176-bit length instructions.

2022-10-04  Nelson Chu  <nelson@rivosinc.com>

	RISC-V: Renamed INSN_CLASS for floating point in integer extensions.
	Just added suffix _INX for those INSN_CLASS should be enough to represent
	their fpr can be replaced by gpr.

2022-10-04  Nick Clifton  <nickc@redhat.com>

	Note that at least dejagnu version 1.5.3 is required in order to be ale to run the testsuites.
		* README-maintainer-mode: Add a minimum version of dejagnu
		requirement.

2022-10-04  Andrew Burgess  <aburgess@redhat.com>

	opcodes/riscv: style csr names as registers
	While reviewing another patch I noticed that RISC-V CSR names are
	given the text style, not the register style.  This patch fixes this
	mistake.

2022-10-04  Luis Machado  <luis.machado@arm.com>

	[AArch64] Update FPSR/FPCR fields for FPU and SVE
	I noticed some missing flags/fields from FPSR and FPCR registers in
	both the FPU and SVE target descriptions.

	This patch adds those and makes the SVE versions of FPSR and FPCR
	use the proper flags/bitfields types.

2022-10-04  Alan Modra  <amodra@gmail.com>

	Support objcopy changing compression to or from zstd
	Commit 2cac01e3ffff lacked support for objcopy changing compression
	style.  Add that support, which meant a rewrite of
	bfd_compress_section_contents.  In the process I've fixed some memory
	leaks.

		* compress.c (bfd_is_section_compressed_info): Rename from
		bfd_is_section_compressed_with_header and add ch_type param
		to return compression header ch_type field.
		Update all callers.
		(decompress_section_contents): Remove buffer and size params.
		Rewrite.  Update callers.
		(bfd_init_section_compress_status): Free contents on failure.
		(bfd_compress_section): Likewise.
		* elf.c (_bfd_elf_make_section_from_shdr): Support objcopy
		changing between any of the three compression schemes.  Report
		"unable to compress/decompress" rather than "unable to
		initialize compress/decompress status" on compress/decompress
		failures.
		* bfd-in2.h: Regenerate.

2022-10-04  Alan Modra  <amodra@gmail.com>

	Re: compress .gnu.debuglto_.debug_* sections if requested
	Enable zlib-gnu compression for .gnu.debuglto_.debug_*.  This differs
	from zlib-gnu for .debug_* where the name is changed to .zdebug_*.
	The name change isn't really needed.

	bfd/
		* elf.c (elf_fake_sections): Replace "." with ".z" in debug
		section names only when name was ".d*", ie. ".debug_*".
		(_bfd_elf_assign_file_positions_for_non_load): Likewise.
	gas/
		* write.c (compress_debug): Compress .gnu.debuglto_.debug_*
		for zlib-gnu too.  Compress .gnu.linkonce.wi.*.

2022-10-04  Martin Liska  <mliska@suse.cz>

	compress .gnu.debuglto_.debug_* sections if requested
	Right now, when using LTO, the intermediate object files do contain
	debug info in sections starting with .gnu.debuglto_ prefix and are
	not compressed when --compress-debug-sections is used.

	It's a mistake and we can save quite some disk space. The following
	example comes from tramp3d when the corresponding LTO sections
	are compressed with zlib:

	$ bloaty tramp3d-v4-v2.o -- tramp3d-v4.o
	    FILE SIZE        VM SIZE
	 --------------  --------------
	   +83%     +10  [ = ]       0    [Unmapped]
	 -68.0%    -441  [ = ]       0    .gnu.debuglto_.debug_line
	 -52.3%    -759  [ = ]       0    .gnu.debuglto_.debug_line_str
	 -62.4% -3.24Ki  [ = ]       0    .gnu.debuglto_.debug_abbrev
	 -64.8% -1.12Mi  [ = ]       0    .gnu.debuglto_.debug_info
	 -88.8% -4.58Mi  [ = ]       0    .gnu.debuglto_.debug_str
	 -27.7% -5.70Mi  [ = ]       0    TOTAL

	bfd/ChangeLog:

		* elf.c (_bfd_elf_make_section_from_shdr): Compress all debug
		  info sections.

	gas/ChangeLog:

		* write.c (compress_debug): Compress also ".gnu.debuglto_.debug_"
		if the compression algorithm is different from zlib-gnu.

2022-10-04  Jan Beulich  <jbeulich@suse.com>

	RISC-V/gas: allow generating up to 176-bit instructions with .insn
	For the time being simply utilize O_big to avoid widening other fields,
	bypassing append_insn() etc.

	RISC-V/gas: don't open-code insn_length()
	Use the helper when it can be used.

	RISC-V/gas: drop stray call to install_insn()
	add_fixed_insn(), by calling move_insn(), already invokes install_insn().

	RISC-V/gas: drop riscv_subsets static variable
	It's fully redundant with the subset_list member of riscv_rps_as.

	RISC-V: don't cast expressions' X_add_number to long in diagnostics
	There's no need for such workarounds anymore now that we use C99
	uniformly. This addresses several testsuite failures encountered when
	(cross-)building on a 32-bit host.

2022-10-04  Potharla, Rupesh  <Rupesh.Potharla@amd.com>

	ignore DWARF debug information for -gsplit-dwarf with dwarf-5
	Skip dwo_id for split dwarf.

	* dwarf2.c (parse_comp_unit): Skip DWO_id for DW_UT_skeleton.

2022-10-04  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-03  Jan-Benedict Glaw  <jbglaw@lug-owl.de>

	Fix self-move warning check for GCC 13+
	GCC 13 got the self-move warning (0abb78dda084a14b3d955757c6431fff71c263f3),
	but that warning is only checked for clang, resulting in:

	/usr/lib/gcc-snapshot/bin/g++ -x c++    -I. -I. -I./config -DLOCALEDIR="\"/tmp/gdb-m68k-linux/share/locale\"" -DHAVE_CONFIG_H -I./../include/opcode -I./../readline/readline/.. -I./../zlib  -I../bfd -I./../bfd -I./../include -I../libdecnumber -I./../libdecnumber  -I./../gnulib/import -I../gnulib/import -I./.. -I.. -I./../libbacktrace/ -I../libbacktrace/  -DTUI=1    -I./.. -pthread  -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-variable -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-error=maybe-uninitialized -Wno-mismatched-tags -Wsuggest-override -Wimplicit-fallthrough=3 -Wduplicated-cond -Wshadow=local -Wdeprecated-copy -Wdeprecated-copy-dtor -Wredundant-move -Wmissing-declarations -Wstrict-null-sentinel -Wformat -Wformat-nonliteral -Werror -g -O2   -c -o unittests/environ-selftests.o -MT unittests/environ-selftests.o -MMD -MP -MF unittests/.deps/environ-selftests.Tpo unittests/environ-selftests.c
	unittests/environ-selftests.c: In function 'void selftests::gdb_environ_tests::test_self_move()':
	unittests/environ-selftests.c:228:7: error: moving 'env' of type 'gdb_environ' to itself [-Werror=self-move]
	  228 |   env = std::move (env);
	      |   ~~~~^~~~~~~~~~~~~~~~~
	unittests/environ-selftests.c:228:7: note: remove 'std::move' call
	cc1plus: all warnings being treated as errors
	make[1]: *** [Makefile:1896: unittests/environ-selftests.o] Error 1
	make[1]: Leaving directory '/var/lib/laminar/run/gdb-m68k-linux/3/binutils-gdb/gdb'
	make: *** [Makefile:13193: all-gdb] Error 2

2022-10-03  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: constify inferior::target_is_pushed
	Change-Id: Ia4143b9c63cb76e2c824ba773c66f5c5cd94b2aa

2022-10-03  Luis Machado  <luis.machado@arm.com>

	[AArch64] Handle W registers as pseudo-registers instead of aliases of X registers
	The aarch64 port handles W registers as aliases of X registers. This is
	incorrect because X registers are 64-bit and W registers are 32-bit.

	This patch teaches GDB how to handle W registers as pseudo-registers of
	32-bit, the bottom half of the X registers.

	Testcase included.

2022-10-03  Luis Machado  <luis.machado@arm.com>

	[AArch64] Fix pseudo-register numbering in the presence of unexpected additional registers
	When using AArch64 GDB with the QEMU debugging stub (in user mode), we get
	additional system registers that GDB doesn't particularly care about, so
	it doesn't number those explicitly.

	But given the pseudo-register numbers are above the number of real registers,
	we need to setup/account for the real registers first before going ahead and
	numbering the pseudo-registers.  This has to happen at the end of
	aarch64_gdbarch_init, after the call to tdesc_use_registers, as that
	updates the total number of real registers.

	This is in preparation to supporting pointer authentication for bare metal
	aarch64 (QEMU).

2022-10-03  Nick Clifton  <nickc@redhat.com>

	readelf: DO not load section headers from file offset zero
		* readelf.c (get_32bit_section_headers): Return false if the
		e_shoff field is zero.
		(get_64bit_section_headers): Likewise.

2022-10-03  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Move supervisor instructions after all unprivileged ones
	This location of supervisor instructions is out of place (because many other
	privileged instructions are located at the tail but after the supervisor
	instructions, we have many unprivileged instructions including bit
	manipulation / crypto / vector instructions).

	Not only that, this is harmful to implement pseudoinstructions in the latest
	'P'-extension proposal (CLROV and RDOV).  This commit moves supervisor
	instructions after all unprivileged instructions.

	opcodes/ChangeLog:

		* riscv-opc.c (riscv_opcodes): Adjust indents.  Move supervisor
		instructions after all unprivileged instructions.

2022-10-03  Bruno Larsen  <blarsen@redhat.com>

	Improve GDB's baseclass detection with typedefs
	When a class inherits from a typedef'd baseclass, GDB may be unable to
	find the baseclass if the user is not using the typedef'd name, as is
	tested on gdb.cp/virtbase2.exp; the reason that test case is working
	under gcc is that the dwarf generated by gcc links the class to the
	original definition of the baseclass, not to the typedef.  If the
	inheritance is linked to the typedef, such as how clang does it,
	gdb.cp/virtbase2.exp starts failing.

	This can also be seen in gdb.cp/impl-this.exp, when attempting to print
	D::Bint::i, and GDB not being able to find the baseclass Bint.

	This happens because searching for baseclasses only uses the macro
	TYPE_BASECLASS_NAME, which returns the typedef'd name. However, we can't
	switch that macro to checking for typedefs, otherwise we wouldn't be
	able to find the typedef'd name anymore. This is fixed by searching for
	members or baseclasses by name, we check both the saved name and the
	name after checking for typedefs.

	This also fixes said long-standing bug in gdb.cp/impl-this.exp when the
	compiler adds information about typedefs in the debuginfo.

2022-10-03  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Assign DWARF numbers to vector registers
	This commit assigns DWARF register numbers to vector registers (v0-v31:
	96..127) to implement RISC-V DWARF Specification version 1.0-rc4
	(now in the frozen state):

	https://github.com/riscv-non-isa/riscv-elf-psabi-doc/releases/tag/v1.0-rc4

	binutils/ChangeLog:

		* dwarf.c (dwarf_regnames_riscv): Assign DWARF register numbers
		96..127 to vector registers v0-v31.

	gas/ChangeLog:

		* config/tc-riscv.c (tc_riscv_regname_to_dw2regnum): Support
		vector registers.
		* testsuite/gas/riscv/dw-regnums.s: Add vector registers to the
		DWARF register number test.
		* testsuite/gas/riscv/dw-regnums.d: Likewise.

2022-10-03  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Add testcase for DWARF register numbers
	Although it had csr-dw-regnums.d (for CSRs), it didn't have DWARF register
	number test for GPRs/FPRs.

	This commit adds dw-regnums.{s,d} to test such registers.

	gas/ChangeLog:

		* testsuite/gas/riscv/dw-regnums.s: New DWARF register number test
		for GPRs/FPRs.
		* testsuite/gas/riscv/dw-regnums.d: Likewise.

2022-10-03  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-02  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix waitpid testing in next-fork-other-thread.c
	In next-fork-other-thread.c, there's this loop:
	...
	      do
	        {
	          ret = waitpid (pid, &stat, 0);
	        } while (ret == EINTR);
	...

	The loop condition tests for "ret == EINTR" but waitpid signals EINTR by
	returning -1 and setting errno to EINTR.

	Fix this by changing the loop condition to "ret == -1 && errno == EINTR".

	Tested on x86_64-linux.

2022-10-02  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: handle invalid .exp names passed in TESTS
	I ran some tests like:

	  $ make check-gdb TESTS="gdb.base/break.exp"

	then, then I went to rerun the tests later, I managed to corrupt the
	command line, like this:

	  $ make check-gdb TESTS="gdb.base/breakff.exp"

	the make command did exit with an error, but DejaGnu appeared to
	report that every test passed!  The tail end of the output looks like
	this:

	  Illegal Argument "no-matching-tests-found"
	  try "runtest --help" for option list
	  		=== gdb Summary ===

	  # of expected passes		115
	  /tmp/build/gdb/gdb version  13.0.50.20220831-git -nw -nx -iex "set height 0" -iex "set width 0" -data-directory /tmp/build/gdb/testsuite/../data-directory

	  make[3]: *** [Makefile:212: check-single] Error 1
	  make[3]: Leaving directory '/tmp/build/gdb/testsuite'
	  make[2]: *** [Makefile:161: check] Error 2
	  make[2]: Leaving directory '/tmp/build/gdb/testsuite'
	  make[1]: *** [Makefile:1916: check] Error 2
	  make[1]: Leaving directory '/tmp/build/gdb'
	  make: *** [Makefile:13565: check-gdb] Error 2

	For a while, I didn't spot that DejaGnu had failed at all, I saw the
	115 passes, and thought everything had run correctly - though I was
	puzzled that make was reporting an error.

	What happens is that in gdb/testsuite/Makefile, in the check-single
	rule, we first run DejaGnu, then run the dg-add-core-file-count.sh
	script, and finally, we use sed to extract the results from the
	gdb.sum file.

	In my case, with the invalid test name, DejaGnu fails, but the
	following steps are still run, the final result, the 115 passes, is
	then extracted from the pre-existing gdb.sum file.

	If I use 'make -jN' then the 'check-parallel' rule, rather than the
	'check-single' rule is used.  In this case the behaviour is slightly
	different, the tail end of the output now looks like this:

	  No matching tests found.

	  make[4]: Leaving directory '/tmp/build/gdb/testsuite'
	  find: ‘outputs’: No such file or directory
	  Usage: ../../../src/gdb/testsuite/../../contrib/dg-extract-results.py [-t tool] [-l variant-list] [-L] log-or-sum-file ...

	      tool           The tool (e.g. g++, libffi) for which to create a
	                     new test summary file.  If not specified then output
	                     is created for all tools.
	      variant-list   One or more test variant names.  If the list is
	                     not specified then one is constructed from all
	                     variants in the files for <tool>.
	      sum-file       A test summary file with the format of those
	                     created by runtest from DejaGnu.
	      If -L is used, merge *.log files instead of *.sum.  In this
	      mode the exact order of lines may not be preserved, just different
	      Running *.exp chunks should be in correct order.
	  find: ‘outputs’: No such file or directory
	  Usage: ../../../src/gdb/testsuite/../../contrib/dg-extract-results.py [-t tool] [-l variant-list] [-L] log-or-sum-file ...

	      tool           The tool (e.g. g++, libffi) for which to create a
	                     new test summary file.  If not specified then output
	                     is created for all tools.
	      variant-list   One or more test variant names.  If the list is
	                     not specified then one is constructed from all
	                     variants in the files for <tool>.
	      sum-file       A test summary file with the format of those
	                     created by runtest from DejaGnu.
	      If -L is used, merge *.log files instead of *.sum.  In this
	      mode the exact order of lines may not be preserved, just different
	      Running *.exp chunks should be in correct order.
	  make[3]: Leaving directory '/tmp/build/gdb/testsuite'
	  make[2]: Leaving directory '/tmp/build/gdb/testsuite'
	  make[1]: Leaving directory '/tmp/build/gdb'

	Rather than DejaGnu failing, we now get a nice 'No matching tests
	found' message, followed by some other noise.  This other noise is
	first `find` failing, followed by the dg-extract-results.py script
	failing.

	What happens here is that, in the check-parallel rule, the outputs
	directory is deleted before DejaGnu is invoked.  Then we try to run
	all the tests, and finally we use find and dg-extract-results.py to
	combine all the separate .sun and .log files together.  However, if
	there are no tests run then the outputs/ directory is never created,
	so the find command and consequently the dg-extract-results.py script,
	fail.

	This commit aims to fix the following issues:

	 (1) For check-single and check-parallel rules, don't run any of the
	 post-processing steps if DejaGnu failed to run.  This will avoid all
	 the noise after the initial failure of DejaGnu,

	 (2) For check-single ensure that we don't accidentally report
	 previous results, this is related to the above, but is worth calling
	 out as a separate point, and

	 (3) For check-single, print the 'No matching tests found' message
	 just like we do for a parallel test run.  This makes the parallel and
	 non-parallel testing behaviour more similar, and I think is clearer
	 than the current 'Illegal Argument' error message.

	Points (1) and (2) will be handled by moving the post processing steps
	inside an if block within the recipe.  For check-single I propose
	deleting the gdb.sum and gdb.log files before running DejaGnu, this is
	similar (I think) to how we delete the outputs/ directory in the
	check-parallel rule.

	For point (3) I plan to split the check-single rule in two, the
	existing check-single will be renamed do-check-single, then a new
	check-single rule will be added.  The new check-single rule can either
	depend on the new do-check-single, or will ensure the 'No matching
	tests found' message is printed when appropriate.

2022-10-02  Andrew Burgess  <aburgess@redhat.com>

	gdb/disasm: better intel flavour disassembly styling with Pygments
	This commit was inspired by this stackoverflow post:

	  https://stackoverflow.com/questions/73491793/why-is-there-a-%C2%B1-in-lea-rax-rip-%C2%B1-0xeb3

	One of the comments helpfully links to this Python test case:

	  from pygments import formatters, lexers, highlight

	  def colorize_disasm(content, gdbarch):
	      try:
	          lexer = lexers.get_lexer_by_name("asm")
	          formatter = formatters.TerminalFormatter()
	          return highlight(content, lexer, formatter).rstrip().encode()
	      except:
	          return None

	  print(colorize_disasm("lea [rip+0x211]  # COMMENT", None).decode())

	Run the test case and you should see that the '+' character is
	underlined, and could be confused with a combined +/- symbol.

	What's happening is that Pygments is failing to parse the input text,
	and the '+' is actually being marked in the error style.  The error
	style is red and underlined.

	It is worth noting that the assembly instruction being disassembled
	here is an x86-64 instruction in the 'intel' disassembly style, rather
	than the default att style.  Clearly the Pygments module expects the
	att syntax by default.

	If we change the test case to this:

	  from pygments import formatters, lexers, highlight

	  def colorize_disasm(content, gdbarch):
	      try:
	          lexer = lexers.get_lexer_by_name("asm")
	          lexer.add_filter('raiseonerror')
	          formatter = formatters.TerminalFormatter()
	          return highlight(content, lexer, formatter).rstrip().encode()
	      except:
	          return None

	  res = colorize_disasm("lea rax,[rip+0xeb3] # COMMENT", None)
	  if res:
	      print(res.decode())
	  else:
	      print("No result!")

	Here I've added the call: lexer.add_filter('raiseonerror'), and I am
	now checking to see if the result is None or not.  Running this and
	the test now print 'No result!' - instead of styling the '+' in the
	error style, we instead give up on the styling attempt.

	There are two things we need to fix relating to this disassembly
	text.  First, Pygments is expecting att style disassembly, not the
	intel style that this example uses.  Fortunately, Pygments also
	supports the intel style, all we need to do is use the 'nasm' lexer
	instead of the 'asm' lexer.

	However, this leads to the second problem; in our disassembler line we
	have '# COMMENT'.  The "official" Intel disassembler style uses ';'
	for its comment character, however, gas and libopcodes use '#' as the
	comment character, as gas uses ';' for an instruction separator.

	Unfortunately, Pygments expects ';' as the comment character, and
	treats '#' as an error, which means, with the addition of the
	'raiseonerror' filter, that any line containing a '#' comment, will
	not get styled correctly.

	However, as the i386 disassembler never produces a '#' character other
	than for comments, we can easily "fix" Pygments parsing of the
	disassembly line.  This is done by creating a filter.  This filter
	looks for an Error token with the value '#', we then change this into
	a comment token.  Every token after this (until the end of the line)
	is also converted into a comment.

	In this commit I do the following:

	  1. Check the 'disassembly-flavor' setting and select between the
	  'asm' and 'nasm' lexers based on the setting.  If the setting is not
	  available then the 'asm' lexer is used by default,

	  2. Use "add_filter('raiseonerror')" to ensure that the formatted
	  output will not include any error text, which would be underlined,
	  and might be confusing,

	  3. If the 'nasm' lexer is selected, then add an additional filter
	  that will format '#' and all other text on the line, as a comment,
	  and

	  4. If Pygments throws an exception, instead of returning None,
	  return the original, unmodified content.  This will mean that this
	  one instruction is printed without styling, but GDB will continue to
	  call into the Python code to style later instructions.

	I haven't included a test specifically for the above error case,
	though I have manually check that the above case now styles
	correctly (with no underline).  The existing style tests check that
	the disassembler styling still works though, so I know I've not
	generally broken things.

	One final thought I have after looking at this issue is that I wonder
	now if using Pygments for styling disassembly from every architecture
	is actually a good idea?

	Clearly, the 'asm' lexer is OK with att style x86-64, but not OK with
	intel style x86-64, so who knows how well it will handle other random
	architectures?

	When I first added this feature I tested it against some random
	RISC-V, ARM, and X86-64 (att style) code, and it seemed fine, but I
	never tried to make an exhaustive check of all instructions, so its
	quite possible that there are corner cases where things are styled
	incorrectly.

	With the above changes I think that things should be a bit better
	now.  If a particular instruction doesn't parse correctly then our
	Pygments based styling code will just not style that one instruction.
	This is combined with the fact that many architectures are now moving
	to libopcodes based styling, which is much more reliable.

	So, I think it is fine to keep using Pygments as a fallback mechanism
	for styling all architectures, even if we know it might not be perfect
	in all cases.

2022-10-02  Andrew Burgess  <aburgess@redhat.com>

	gdb: improve disassembler styling when Pygments raises an exception
	While working on another issue relating to GDB's use of the Python
	Pygments package for disassembly styling I noticed an issue in the
	case where the Pygments package raises an exception.

	The intention of the current code is that, should the Pygments package
	raise an exception, GDB will disable future attempts to call into the
	Pygments code.  This was intended to prevent repeated errors during
	disassembly if, for some reason, the Pygments code isn't working.

	Since the Pygments based styling was added, GDB now supports
	disassembly styling using libopcodes, but this is only available for
	some architectures.  For architectures not covered by libopcodes
	Pygments is still the only option.

	What I observed is that, if I disable the libopcodes styling, then
	setup GDB so that the Pygments based styling code will indicate an
	error (by returning None), GDB does, as expected, stop using the
	Pygments based styling.  However, the libopcodes based styling will
	instead be used, despite this feature having been disabled.

	The problem is that the disassembler output is produced into a
	string_file buffer.  When we are using Pygments, this buffer is
	created without styling support.  However, when Pygments fails, we
	recreate the buffer with styling support.

	The problem is that we should only recreate the buffer with styling
	support only if libopcodes styling is enabled.  This was an oversight
	in commit:

	  commit 4cbe4ca5da5cd7e1e6331ce11f024bf3c07b9744
	  Date:   Mon Feb 14 14:40:52 2022 +0000

	      gdb: add support for disassembler styling using libopcodes

	This commit:

	  1. Factors out some of the condition checking logic into two new
	  helper functions use_ext_lang_for_styling and
	  use_libopcodes_for_styling,

	  2. Reorders gdb_disassembler::m_buffer and gdb_disassembler::m_dest,
	  this allows these fields to be initialised m_dest first, which means
	  that the new condition checking functions can rely on m_dest being
	  set, even when called from the gdb_disassembler constructor,

	  3. Make use of the new condition checking functions each time
	  m_buffer is initialised,

	  4. Add a new test that forces the Python disassembler styling
	  function to return None, this will cause GDB to disable use of
	  Pygments for styling, and

	  5. When we reinitialise m_buffer, and re-disassemble the
	  instruction, call reset the in-comment flag.  If the instruction
	  being disassembler ends in a comment then the first disassembly pass
	  will have set the in-comment flag to true.  This shouldn't be a
	  problem as we will only be using Pygments, and thus performing a
	  re-disassembly pass, if libopcodes is disabled, so the in-comment
	  flag will never be checked, even if it is set incorrectly.  However,
	  I think that having the flag set correctly is a good thing, even if
	  we don't check it (you never know what future uses might come up).

2022-10-02  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: extend styling test for libopcodes styling
	This commit extends the gdb.base/style.exp test to cover disassembler
	styling using libopcodes (where available).

	The test will try to enable libopcode based styling, if this
	works (because such styling is available) then some tests are run to
	check that the output is styled, and that the styling can be disabled
	using 'set style disassembler enabled off'.  If libopcodes styling is
	not available on the current architecture then these new tests will be
	skipped.

	I've moved the Python Pygments module check inside the
	test_disable_disassembler_styling function now, so that the test will
	be run even when Python Pygments is not available, this allows the new
	tests discussed above.

	If the Pygments module is not available then the Pygments based tests
	will be skipped just as they were before.

2022-10-02  Andrew Burgess  <aburgess@redhat.com>

	gdb: update now gdbarch_register_name doesn't return nullptr
	After the previous few commit, gdbarch_register_name no longer returns
	nullptr.  This commit audits all the calls to gdbarch_register_name
	and removes any code that checks the result against nullptr.

	There should be no visible change after this commit.

2022-10-02  Andrew Burgess  <aburgess@redhat.com>

	gdb: final cleanup of various gdbarch_register_name methods
	Building on the previous commits, this commit goes through the various
	gdbarch_register_name methods and removes all the remaining 'return
	NULL' cases, I claim that these either couldn't be hit, or should be
	returning the empty string.

	In all cases the return of NULL was used if the register number being
	passed to gdbarch_register_name was "invalid", i.e. negative, or
	greater than the total number of declared registers.  I don't believe
	either of these cases can occur, and the previous commit asserts that
	this is the case.  As a result we can simplify the code by removing
	these checks.  In many cases, where the register names are held in an
	array, I was able to add a static assert that the array contains the
	correct number of strings, after that, a direct access into the array
	is fine.

	I don't have any means of testing these changes.

2022-10-02  Andrew Burgess  <aburgess@redhat.com>

	gdb/csky: remove nullptr return from csky_pseudo_register_name
	Building on the previous commits, in this commit I remove two
	instances of 'return NULL' from csky_pseudo_register_name, and replace
	them with a return of the empty string.

	These two are particularly interesting, and worth pulling into their
	own commit, because these returns of NULL appear to be depended on
	within other parts of the csky code.

	In csky-linux-tdep.c in the register collect/supply code, GDB checks
	for the register name being nullptr in order to decide if a target
	supports a particular feature or not.  I've updated the code to check
	for the empty string.

	I have no way of testing this change.

2022-10-02  Andrew Burgess  <aburgess@redhat.com>

	gdb: add asserts to gdbarch_register_name
	This commit adds asserts to gdbarch_register_name that validate the
	parameters, and the return value.

	The interesting thing here is that gdbarch_register_name is generated
	by gdbarch.py, and so, to add these asserts, I need to update the
	generation script.

	I've added two new arguments for Functions and Methods (as declared in
	gdbarch-components.py), these arguments are 'param_checks' and
	'result_checks'.  Each of these new arguments can be used to list some
	expressions that are then used within gdb_assert calls in the
	generated code.

	The asserts that validate the API as described in the comment I added
	to gdbarch_register_name a few commits back; the register number
	passed in needs to be a valid cooked register number, and the result
	being returned should not be nullptr.

2022-10-02  Andrew Burgess  <aburgess@redhat.com>

	gdb: check for duplicate register names in selftest
	Building on the previous commit, this commit extends the register_name
	selftest to check for duplicate register names.

	If two registers in the cooked register set (real + pseudo registers)
	have the same name, then this will show up as duplicate registers in
	the 'info all-registers' output, but the user will only be able to
	interact with one copy of the register.

	In this commit I extend the selftest that I added in the previous
	commit to check for duplicate register names, I didn't include this
	functionality in the previous commit because one architecture needed
	fixing, and I wanted to keep those fixes separate from the fixes in
	the previous commit.

	The problematic architecture(s) are powerpc:750 and powerpc:604.  In
	both of these cases the 'dabr' register appears twice, there's a
	definition of dabr in power-oea.xml which is included into both
	powerpc-604.xml and powerpc-750.xml.  Both of these later two xml
	files also define the dabr register.

	I'm hopeful that this change shouldn't break anything, but I don't
	have the ability to actually test this change, however:

	On the gdbserver side, neither powerpc-604.xml nor powerpc-750.xml are
	mentioned in gdbserver/configure.srv, which I think means that
	gdbserver will never use these descriptions, and,

	Within GDB the problematic descriptions are held in the variables
	tdesc_powerpc_604 and tdesc_powerpc_750, which are only mentioned in
	the variants array in rs6000-tdep.c, this is used when looking up a
	description based on the architecture.

	For a native Linux target however, this will not be used as
	ppc_linux_nat_target::read_description exists, which calls
	ppc_linux_match_description, which I don't believe can return either
	of the problematic descriptions.

	This leaves the other native targets, FreeBSD, AIX, etc.  These don't
	appear to override the ::read_description method, so will potentially
	return the problematic descriptions, but, in each case I think the
	::fetch_registers and ::store_registers methods will ignore the dabr
	register, which will leave the register as <unavailable>.

	So, my proposed solution is to just remove the duplicate register from
	each of powerpc-604.xml and powerpc-750.xml, then regenerate the
	corresponding C++ source file.  With this change made, the selftest
	now passes for all architectures.

2022-10-02  Andrew Burgess  <aburgess@redhat.com>

	gdb: add a gdbarch_register_name self test, and fix some architectures
	This commit adds a self-test that checks that gdbarch_register_name
	never returns nullptr for any valid register number.

	Most architectures already met this requirement, there were just 6
	that failed the new selftest, and are updated in this commit.

	Beyond the self-tests I don't have any facilities to test that the
	architectures I've adjusted still work correctly.

	If you review all the various gdbarch_register_name implementations
	then you will see that there are far more architectures that seem like
	they might return nullptr in some situations, e.g. alpha, avr, bpf,
	etc.  This commit doesn't attempt to address these cases as non of
	them are hit during the selftest.  Many of these cases can never be
	hit, for example, in alpha_register_name GDB checks for a register
	number less than zero, this case can't happen and could be changed
	into an assert.

	A later commit in this series will have a general cleanup of all the
	various register_name methods, and remove all references to NULL from
	their code, however, as that commit will be mostly adjusting code that
	is never hit, I want to keep those changes separate.

	The selftest has been tested on x86-64, but I don't have access to
	suitable systems to fully test any of the *-tdep.c code I've changed
	in this commit.

2022-10-02  Andrew Burgess  <aburgess@redhat.com>

	gdb/gdbarch: add a comment to gdbarch_register_name
	After the previous commit, this commit sets out to formalise the API
	for gdbarch_register_name.  Not every architecture is actually in
	compliance with the API I set out here, but I believe that most are.

	I think architectures that don't comply with the API laid out here
	will fail the gdb.base/completion.exp test.

	The claims in the comment are I feel, best demonstrated with the
	asserts in this code:

	  const char *
	  gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
	  {
	    gdb_assert (regnr >= 0);
	    gdb_assert (regnr < gdbarch_num_cooked_regs (gdbarch));

	    const char *name = gdbarch->register_name (gdbarch, regnr);

	    gdb_assert (name != nullptr);

	    return name;
	  }

	Like I said, I don't believe every architecture follows these rules
	right now, which is why I'm not actually adding any asserts.  Instead,
	this commit adds a comment to gdbarch_register_name, this comment is
	where I'd like to get to, rather than where we are right now.

	Subsequent commits will fix all targets to be in compliance with this
	comment, and will even add the asserts shown above to
	gdbarch_register_name.

2022-10-02  Andrew Burgess  <aburgess@redhat.com>

	gdb/riscv: fix failure in gdb.base/completion.exp
	I noticed a test failure in gdb.base/completion.exp for RISC-V on
	a native Linux target, this is the failure:

	  (gdb) FAIL: gdb.base/completion.exp: complete 'info registers '

	The problem is caused by a mismatch in the output of 'maint print
	registers' and the completion list for 'info registers'.  The 'info
	registers' completion list contains less registers than
	expected. Additionally, the list of registers extracted from the
	'maint print registers' list was wrong too, in some cases the test was
	grabbing the register number, rather than a register name,

	Both of these problems have the same root cause, riscv_register_name
	returns nullptr for some registers when it should return an empty
	string.

	The gdbarch_register_name API is not clearly documented anywhere, and
	at first glance it would appear that the function can return either
	nullptr, or an empty string to indicate that a register is not
	available on the current target.  Indeed, there are plenty of places
	in GDB where we compare the output of gdbarch_register_name to both
	nullptr and '\0' in order to see if a register is supported or not,
	and there are plenty of targets that return empty string in some
	cases, and nullptr in others.

	However, the 'info registers' completion code (reg_or_group_completer)
	clearly depends on user_reg_map_regnum_to_name only returning nullptr
	when the passed in regnum is greater than the maximum possible
	register number (i.e. after all physical registers, pseudo-registers,
	and user-registers), this means that gdbarch_register_name should not
	be returning nullptr.

	I did consider "fixing" user_reg_map_regnum_to_name, if
	gdbarch_register_name returns nullptr, I could convert to an empty
	string at this point, but that felt like a real hack, so I discarded
	that plan.

	The next possibility I considered was "fixing" reg_or_group_completer
	to not rely on nullptr to indicate the end marker.  Or rather, I could
	have reg_or_group_completer use gdbarch_num_cooked_regs, we know that
	we should check at least that many register numbers.  Then, once we're
	passed that limit, we keep checking until we hit a nullptr.  This
	would absolutely work, and didn't actually feel that bad, but, it
	still felt a little weird that gdbarch_register_name could return
	nullptr OR the empty string to mean the same thing, so I wondered if
	the "right" solution was to have gdbarch_register_name not return
	nullptr.  With this in mind I tried an experiment:

	I added a self-test that, for each architecture, calls
	gdbarch_register_name for every register number up to the
	gdbarch_num_cooked_regs limit, and checks that the name is not
	nullptr.

	Only a handful of architectures failed this test, RISC-V being one of
	them.

	This seems to suggest that most architectures agree that the correct
	API for gdbarch_register_name is to return an empty string for
	registers that are not supported on the current target, and that
	returning nullptr is really a mistake.

	In this commit I will update the RISC-V target so that GDB no longer
	returns nullptr from riscv_register_name, instead we return the empty
	string.

	In subsequent commits I will add the selftest that I mention above,
	and will fix the targets that fail the selftest.

	With this change the gdb.base/completion.exp test now passes.

2022-10-02  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: rewrite capture_command_output proc
	I noticed a test failure in gdb.base/completion.exp for RISC-V on a
	native Linux target.  Upon investigation I discovered a couple of
	reasons for the failure, this commit addresses one of them.  A later
	commit will address the other issue.

	The completion.exp test makes use of the capture_command_output proc
	to collect the output of the 'maint print registers' command.  For
	RISC-V this command produces a lot of output.

	Currently the capture_command_output proc tries to collect the
	complete command output in a single expect buffer, and what I see is
	an error caused by the expect buffer becoming full.

	This commit rewrites capture_command_output to make use of
	gdb_test_multiple to collect the command output line at a time, in
	this way we avoid overflowing the expect buffer.

	The capture_command_output proc has some logic for skipping a prefix
	pattern, which is passed in to the proc as an argument.  In order to
	handle this correctly (only matching the prefix at the start of the
	command output), I use two gdb_test_multiple calls, the first spots
	and discards the echoed command and the (optional) prefix pattern, the
	second gdb_test_multiple call then collects the rest of the command
	output line at a time until a prompt is seen.

	There is one slight oddity with the current implementation, which I
	have changed in my rewrite, this does, slightly, change the behaviour
	of the proc.

	The current implementation uses this pattern:

	  -re "[string_to_regexp ${command}]\[\r\n\]+${prefix}(.*)\[\r\n\]+$gdb_prompt $"

	Now a typical command output will look like this:

	  output here\r\n
	  (gdb)

	As the TCL regexp matching is greedy, TCL will try to match as much as
	possible in one part of the pattern before moving on to the next.
	Thus, when this matches against (.*)[\r\n]+, the (.*) will end up
	matching against 'output here\r' and the [\r\n]+ will match '\n' only.

	In short the previous implementation would leave the '\r' on the end
	of the returned text, but not the final trailing '\n'.

	Now clearly I could make a new version of capture_command_output that
	maintained this behaviour, but I couldn't see any reason to do this.
	So, my new implementation drops the final '\r\n' completely, in our
	example above we now return 'output here' with no '\r'.

	This change doesn't seem to affect any of the existing tests, but I
	thought it was worth mentioning.

2022-10-02  Andrew Burgess  <aburgess@redhat.com>

	gdb/mi: new options for -data-disassemble command
	Now that the disassembler has two different strategies for laying out
	the opcode bytes of an instruction (see /r vs /b for the disassemble
	command), I wanted to add support for this to the MI disassemble
	command.

	Currently the -data-disassemble command takes a single 'mode' value,
	which currently has 6 different values (0 -> 5), 3 of these modes
	relate to opcode display.

	So, clearly I should just add an additional 3 modes to handle the new
	opcode format, right?

	No, I didn't think that was a great idea either.

	So, I wonder, could I adjust the -data-disassemble command in a
	backward compatible way, that would allow GDB to move away from using
	the mode value altogether?

	I think we can.

	In this commit, I propose adding two new options to -data-disassemble,
	these are:

	  --opcodes none|bytes|display
	  --source

	Additionally, I will make the mode optional, and default to mode 0 if
	no mode value is given.  Mode 0 is the simplest, no source code, no
	opcodes disassembly mode.

	The two new options are only valid for mode 0, if they are used with
	any other mode then an error is thrown.

	The --opcodes option can add opcodes to the result, with 'bytes' being
	equivalent to 'disassemble /b' and 'display' being 'disassemble /r'.

	The --source option will enable the /s style source code display, this
	is equivalent to modes 4 and 5.  There is no way, using the new
	command options to get the now deprecated /m style source code
	display, that is mode 1 and 3.

	My hope is that new users of the MI will not use the mode at all, and
	instead will just use the new options to achieve the output they need.
	Existing MI users can continue to use the mode, and will not need to
	be updated to use the new options.

2022-10-02  Andrew Burgess  <aburgess@redhat.com>

	gdb/mi: some int to bool conversion
	Just some simple int to bool conversion in mi_cmd_disassemble.  There
	should be no user visible changes after this commit.

2022-10-02  Andrew Burgess  <aburgess@redhat.com>

	gdb/doc: update syntax of -data-disassemble command arguments
	The argument documentation for -data-disassemble looks like this:

	   -data-disassemble
	      [ -s @var{start-addr} -e @var{end-addr} ]
	    | [ -a @var{addr} ]
	    | [ -f @var{filename} -l @var{linenum} [ -n @var{lines} ] ]
	    -- @var{mode}

	However, I believe, according to the 'Notation and Terminology'
	section, this means that the there are 3 optional location
	specification argument groups for the command, followed by a
	non-optional '-- mode'.

	However, this is not true, one of the location specifications must be
	given, i.e. we can't choose to give NO location specification, which
	is what the above implies.

	I propose that we change this to instead be:

	   -data-disassemble
	    ( -s @var{start-addr} -e @var{end-addr}
	    | -a @var{addr}
	    | -f @var{filename} -l @var{linenum} [ -n @var{lines} ] )
	    -- @var{mode}

	By placing all the location specifications within '( ... )' we
	indication that these are a group, from which one of the options,
	separated by '|', must be selected.

	However, the 'Notation and Terminology' section only describes two
	uses for parenthesis: '( GROUP )*' and '( GROUP )+', in the first case
	GROUP is repeated zero or more times, and in the second GROUP is
	repeated 1 or more times.

	Neither of those exactly describe what I want, which is GROUP must
	appear exactly once.  I propose to extend 'Notation and Terminology'
	to include '( GROUP )' which means that GROUP should appear exactly
	once.

	This change is important because, in a later commit, I want to add
	additional optional arguments to the -data-disassemble command, and
	things start to get confusing with the original syntax.

2022-10-02  Andrew Burgess  <aburgess@redhat.com>

	gdb: make gdb_disassembly_flag unsigned
	In a later commit I want to use operator~ on a gdb_disassembly_flag
	flag value.  This is currently not possible as gdb_disassembly_flag
	is, by default, signed.

	This commit just makes this enum unsigned.

	There should be no user visible changes after this commit.

2022-10-02  Andrew Burgess  <aburgess@redhat.com>

	gdb: disassembler opcode display formatting
	This commit changes the format of 'disassemble /r' to match GNU
	objdump.  Specifically, GDB will now display the instruction bytes in
	as 'objdump --wide --disassemble' does.

	Here is an example for RISC-V before this patch:

	  (gdb) disassemble /r 0x0001018e,0x0001019e
	  Dump of assembler code from 0x1018e to 0x1019e:
	     0x0001018e <call_me+66>:     03 26 84 fe     lw      a2,-24(s0)
	     0x00010192 <call_me+70>:     83 25 c4 fe     lw      a1,-20(s0)
	     0x00010196 <call_me+74>:     61 65   lui     a0,0x18
	     0x00010198 <call_me+76>:     13 05 85 6a     addi    a0,a0,1704
	     0x0001019c <call_me+80>:     f1 22   jal     0x10368 <printf>
	  End of assembler dump.

	And here's an example after this patch:

	  (gdb) disassemble /r 0x0001018e,0x0001019e
	  Dump of assembler code from 0x1018e to 0x1019e:
	     0x0001018e <call_me+66>:     fe842603                lw      a2,-24(s0)
	     0x00010192 <call_me+70>:     fec42583                lw      a1,-20(s0)
	     0x00010196 <call_me+74>:     6561                    lui     a0,0x18
	     0x00010198 <call_me+76>:     6a850513                addi    a0,a0,1704
	     0x0001019c <call_me+80>:     22f1                    jal     0x10368 <printf>
	  End of assembler dump.

	There are two differences here.  First, the instruction bytes after
	the patch are grouped based on the size of the instruction, and are
	byte-swapped to little-endian order.

	Second, after the patch, GDB now uses the bytes-per-line hint from
	libopcodes to add whitespace padding after the opcode bytes, this
	means that in most cases the instructions are nicely aligned.

	It is still possible for a very long instruction to intrude into the
	disassembled text space.  The next example is x86-64, before the
	patch:

	  (gdb) disassemble /r main
	  Dump of assembler code for function main:
	     0x0000000000401106 <+0>:     55      push   %rbp
	     0x0000000000401107 <+1>:     48 89 e5        mov    %rsp,%rbp
	     0x000000000040110a <+4>:     c7 87 d8 00 00 00 01 00 00 00   movl   $0x1,0xd8(%rdi)
	     0x0000000000401114 <+14>:    b8 00 00 00 00  mov    $0x0,%eax
	     0x0000000000401119 <+19>:    5d      pop    %rbp
	     0x000000000040111a <+20>:    c3      ret
	  End of assembler dump.

	And after the patch:

	  (gdb) disassemble /r main
	  Dump of assembler code for function main:
	     0x0000000000401106 <+0>:     55                      push   %rbp
	     0x0000000000401107 <+1>:     48 89 e5                mov    %rsp,%rbp
	     0x000000000040110a <+4>:     c7 87 d8 00 00 00 01 00 00 00   movl   $0x1,0xd8(%rdi)
	     0x0000000000401114 <+14>:    b8 00 00 00 00          mov    $0x0,%eax
	     0x0000000000401119 <+19>:    5d                      pop    %rbp
	     0x000000000040111a <+20>:    c3                      ret
	  End of assembler dump.

	Most instructions are aligned, except for the very long instruction.
	Notice too that for x86-64 libopcodes doesn't request that GDB group
	the instruction bytes.  This matches the behaviour of objdump.

	In case the user really wants the old behaviour, I have added a new
	modifier 'disassemble /b', this displays the instruction byte at a
	time.  For x86-64, which never groups instruction bytes, /b and /r are
	equivalent, but for RISC-V, using /b gets the old layout back (except
	that the whitespace for alignment is still present).  Consider our
	original RISC-V example, this time using /b:

	  (gdb) disassemble /b 0x0001018e,0x0001019e
	  Dump of assembler code from 0x1018e to 0x1019e:
	     0x0001018e <call_me+66>:     03 26 84 fe             lw      a2,-24(s0)
	     0x00010192 <call_me+70>:     83 25 c4 fe             lw      a1,-20(s0)
	     0x00010196 <call_me+74>:     61 65                   lui     a0,0x18
	     0x00010198 <call_me+76>:     13 05 85 6a             addi    a0,a0,1704
	     0x0001019c <call_me+80>:     f1 22                   jal     0x10368 <printf>
	  End of assembler dump.

	Obviously, this patch is a potentially significant change to the
	behaviour or /r.  I could have added /b with the new behaviour and
	left /r alone.  However, personally, I feel the new behaviour is
	significantly better than the old, hence, I made /r be what I consider
	the "better" behaviour.

	The reason I prefer the new behaviour is that, when I use /r, I almost
	always want to manually decode the instruction for some reason, and
	having the bytes displayed in "instruction order" rather than memory
	order, just makes this easier.

	The 'record instruction-history' command also takes a /r modifier, and
	has been modified in the same way as disassemble; /r gets the new
	behaviour, and /b has been added to retain the old behaviour.

	Finally, the MI command -data-disassemble, is unchanged in behaviour,
	this command now requests the raw bytes of the instruction, which is
	equivalent to the /b modifier.  This means that the MI output will
	remain backward compatible.

2022-10-02  Andrew Burgess  <aburgess@redhat.com>

	gdb/disasm: read opcodes bytes with a single read_code call
	This commit reduces the number of times we call read_code when
	printing the instruction opcode bytes during disassembly.

	I've added a new gdb::byte_vector within the
	gdb_pretty_print_disassembler class, in line with all the other
	buffers that gdb_pretty_print_disassembler needs.  This byte_vector is
	then resized as needed, and filled with a single read_code call for
	each instruction.

	There should be no user visible changes after this commit.

2022-10-02  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: new test for -data-disassemble opcodes format
	Add another test for the output of MI command -data-disassemble.  The
	new check validates the format of the 'opcodes' field, specifically,
	this test checks that the field contains a series of bytes, separated
	by a single space.

	We also check that the bytes are in the correct order, that is, the
	first byte is from the lowest address, and subsequent bytes are from
	increasing addresses.

	The motivation for this test (besides more tests being generally good)
	is that I plan to make changes to how opcode bytes are displayed in
	the disassembler output, and I want to ensure that I don't break any
	existing MI behaviour.

	There should be no user visible changes to GDB after this commit.

2022-10-02  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-10-01  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-30  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Relax "fmv.[sdq]" requirements
	This commit relaxes requirements to "fmv.s" instructions from 'F' to ('F'
	or 'Zfinx').  The same applies to "fmv.d" and "fmv.q".  Note that 'Zhinx'
	extension already contains "fmv.h" instruction (as well as 'Zfh').

	gas/ChangeLog:

		* testsuite/gas/riscv/zfinx.s: Add "fmv.s" instruction.
		* testsuite/gas/riscv/zfinx.d: Likewise.
		* testsuite/gas/riscv/zdinx.s: Add "fmv.d" instruction.
		* testsuite/gas/riscv/zdinx.d: Likewise.
		* testsuite/gas/riscv/zqinx.d: Add "fmv.q" instruction.
		* testsuite/gas/riscv/zqinx.s: Likewise.

	opcodes/ChangeLog:

		* riscv-opc.c (riscv_opcodes): Relax requirements to "fmv.[sdq]"
		instructions to support those in 'Zfinx'/'Zdinx'/'Zqinx'.

2022-09-30  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Reorganize and enhance 'Zfinx' tests
	This commit adds certain test cases for 'Zfinx'/'Zdinx'/'Zqinx' extensions
	and reorganizes them, fixing coding style while improving coverage.
	This is partially based on jiawei's 'Zhinx' testcases.

	gas/ChangeLog:

		* testsuite/gas/riscv/zfinx.s: Use different registers for
		better encode space testing.  Make indentation consistent.
		Add tests for instruction with rounding mode.  Change march
		to minimum required extensions.  Remove source line.
		* testsuite/gas/riscv/zfinx.d: Likewise.
		* testsuite/gas/riscv/zdinx.s: Likewise.
		* testsuite/gas/riscv/zdinx.d: Likewise.
		* testsuite/gas/riscv/zqinx.s: Likewise.
		Also use even-numbered registers to use valid register pairs.
		* testsuite/gas/riscv/zqinx.d: Likewise.

2022-09-30  Christoph Müllner  <christoph.muellner@vrull.eu>

	RISC-V: Eliminate long-casts of X_add_number in diagnostics
	There is no need for casts to (signed/unsigned) long, as we can use
	C99's PRId64/PRIu64 format specifiers.

2022-09-30  Jan Beulich  <jbeulich@suse.com>

	RISC-V: fallout from "re-arrange opcode table for consistent alias handling"
	Several new testcasee have appeared since the submission of said change,
	some of which now also need adjustment.

	RISC-V: fix build after "Add support for arbitrary immediate encoding formats"
	Pre- and post-increment/decrement are side effects, the behavior of
	which is undefined when combined with passing an address of the accessed
	variable in the same function invocation. There's no need for the
	increments here - simply adding 1 achieves the intended effect without
	triggering compiler diagnostics (which are fatal with -Werror).

	objcopy: avoid "shadowing" of remove() function name
	remove() is a standard library function (declared in stdio.h), which
	triggers a "shadows a global declaration" warning with some gcc versions.

	RISC-V: drop stray INSN_ALIAS flags
	FENCE.TSO isn't an alias. ZIP and UNZIP in the long run likely are, but
	presently they aren't. This fixes disassembly of these insns with
	-Mno-aliases.

2022-09-30  Jan Beulich  <jbeulich@suse.com>

	RISC-V: re-arrange opcode table for consistent alias handling
	For disassembly to pick up aliases in favor of underlying insns (helping
	readability in the common case), the aliases need to come ahead of the
	"base" insns. Slightly more code movement is needed because of insns
	with the same name needing to stay next to each other.

	Note that the "rorw" alias entry also has the missing INSN_ALIAS added
	here.

	Clone a few testcases to exercise -Mno-aliases some more, better
	covering the differences between the default and that disassembly mode.

2022-09-30  Jan Beulich  <jbeulich@suse.com>

	x86: correct build dependencies in opcodes/
	With the command in the rule merely being "echo", i386-tbl.h won't be
	rebuilt if missing, when at the same time i386-init.h is present and
	up-to-date. Use a pattern rule instead to express the multiple targets
	correctly (the &: rule separator is supported only by GNU make 4.3 and
	newer). Note that now, for the opposite case to work (i386-tbl.h is
	up-to-date but i386-init.h is missing), i386-init.h also needs
	mentioning as a dependency somewhere: Add a fake dependency for
	i386-opc.lo ("fake" because i386-opc.c doesn't include that header).

	At the same time use $(AM_V_GEN) in the actual rule, replacing the
	earlier (open-coded) "echo". And while there also drop a duplicate
	dependency of i386-gen.o on i386-opc.h.

2022-09-30  Jan Beulich  <jbeulich@suse.com>

	x86: improve match_template()'s diagnostics
	At the example of

		extractps $0, %xmm0, %xmm0
		insertps $0, %xmm0, %eax

	(both having respectively the same mistake of using the wrong kind of
	destination register) it is easy to see that current behavior is far
	from ideal: The former results in "unsupported instruction" for 32-bit
	code simply because the 2nd template we have is a Cpu64 one. Instead we
	should aim at emitting the "best" possible error, which will typically
	be the one where we passed the largest number of checks. Generalize the
	original "specific_error" approach by making it apply to the entire
	matching loop, utilizing that line numbers increase as we pass further
	checks.

2022-09-30  Jan Beulich  <jbeulich@suse.com>

	x86/Intel: restrict suffix derivation
	While in some cases deriving an AT&T-style suffix from an Intel syntax
	memory operand size specifier is necessary, in many cases this is not
	only pointless, but has led to the introduction of various workarounds:
	Excessive use of IgnoreSize and NoRex64 as well as the ToDword and
	ToQword attributes. Suppress suffix derivation when we can clearly tell
	that the memory operand's size isn't going to be needed to infer the
	possible need for the low byte/word opcode bit or an operand size prefix
	(0x66 or REX.W).

	As a result ToDword and ToQword can be dropped entirely, plus a fair
	number of IgnoreSize and NoRex64 can also be got rid of. Note that
	IgnoreSize needs to remain on legacy encoded SIMD insns with GPR
	operand, to avoid emitting an operand size prefix in 16-bit mode. (Since
	16-bit code using SIMD insns isn't well tested, clone an existing
	testcase just enough to cover a few insns which are potentially
	problematic but are being touched here.)

	Note that while folding the VCVT{,T}S{S,D}2SI templates, VCVT{,T}SH2SI
	isn't included there. This is to fulfill the request of not allowing L
	and Q suffixes there, despite the inconsistency with VCVT{,T}S{S,D}2SI.

2022-09-30  liuzhensong  <liuzhensong@loongson.cn>

	LoongArch: Update ELF e_flags handling according to specification.
	  Update handling of e_flags according to the documentation
	  update [1] (discussions [2][3]).

	  Object file bitness is now represented in the EI_CLASS byte.
	  The e_flags field is now interpreted as follows:

	  e_flags[2:0]: Base ABI modifier

	  - 0x1: soft-float
	  - 0x2: single-precision hard-float
	  - 0x3: double-precision hard-float

	  e_flags[7:6]: ELF object ABI version

	  - 0x0: v0
	  - 0x1: v1

	  [1]: https://github.com/loongson/LoongArch-Documentation/blob/main/docs/LoongArch-ELF-ABI-EN.adoc#e_flags-identifies-abi-type-and-version
	  [2]: https://github.com/loongson/LoongArch-Documentation/pull/61
	  [3]: https://github.com/loongson/LoongArch-Documentation/pull/47

2022-09-30  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: fix cppcheck warnings
	gprofng/ChangeLog
	2022-09-29  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		* common/hwcdrv.c: Fix cppcheck warning.
		* src/ABS.h: Likewise.
		* src/CompCom.cc: Likewise.

2022-09-30  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.mi/mi-sym-info.exp on openSUSE Tumbleweed
	On openSUSE Tumbleweed, I run into:
	...
	FAIL: gdb.mi/mi-sym-info.exp: List all functions from debug information only
	...

	The problem is in matching this string:
	...
	{name="_start",type="void (void)",description="void _start(void);"}
	...
	using regexp fun_re, which requires a line field:
	...
	set fun_re \
	    "\{line=\"$decimal\",name=${qstr},type=${qstr},description=${qstr}\}"
	...

	Fix this by making the line field optional in fun_re.

	Tested on x86_64-linux.

2022-09-30  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Add privileged extensions without instructions/CSRs
	Currently, GNU Binutils does not support following privileged extensions:

	-   'Smepmp'
	-   'Svnapot'
	-   'Svpbmt'

	as they do not provide new CSRs or new instructions ('Smepmp' extends the
	privileged architecture CSRs but does not define the CSR itself).  However,
	adding them might be useful as we no longer have to "filter" ISA strings
	just for toolchains (if full ISA string is given by a vendor, we can
	straightly use it).

	And there's a fact that supports this theory: there's already an
	(unprivileged) extension which does not provide CSRs or instructions (but
	only an architectural guarantee): 'Zkt' (constant timing guarantee for
	certain subset of RISC-V instructions).

	This simple commit simply adds three privileged extensions listed above.

	bfd/ChangeLog:

		* elfxx-riscv.c (riscv_supported_std_s_ext): Add 'Smepmp',
		'Svnapot' and 'Svpbmt' extensions.

2022-09-30  Tsukasa OI  <research_trasio@irq.a4lg.com>

	gdb: Remove unused extra_lines variable
	Clang generates a warning if there is a variable that is set but not used
	otherwise ("-Wunused-but-set-variable").  On the default configuration, it
	causes a build failure (unless "--disable-werror" is specified).

	The only extra_lines use in arrange_linetable function is removed on the
	commit 558802e4d1c5dcbd0df7d2c6ef62a6deac247a2f
	("gdb: change subfile::line_vector to an std::vector").  So, this variable
	should be removed to prevent a build failure.

2022-09-30  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add aranges to gdb.dwarf2/dw2-dir-file-name.exp
	Since commit 52b920c5d20 ("[gdb/testsuite] Fix gdb.dwarf2/dw2-dir-file-name.exp
	for ppc64le"), the test-case fails with target board cc-with-debug-names, due
	to missing .debug_aranges info.

	Add the missing .debug_aranges info.

	Also add a file_id option to Dwarf::assemble, to make it possible to contribute
	to an already open file.

	Tested on x86_64-linux.

2022-09-30  Tom de Vries  <tdevries@suse.de>

	[gdb/c++] Print destructor the same for gcc and clang
	Consider the test-case contained in this patch.

	With g++ (7.5.0) we have for "ptype A":
	...
	type = class A {
	  public:
	    int a;

	    A(void);
	    ~A();
	}
	...
	and with clang++ (13.0.1):
	...
	type = class A {
	  public:
	    int a;

	    A(void);
	    ~A(void);
	}
	...
	and we observe that the destructor is printed differently.

	There's a difference in debug info between the two cases: in the clang case,
	there's one artificial parameter, but in the g++ case, there are two, and
	these similar cases are handled differently in cp_type_print_method_args.

	This is due to this slightly convoluted bit of code:
	...
	  i = staticp ? 0 : 1;
	  if (nargs > i)
	    {
	      while (i < nargs)
	        ...
	    }
	  else if (varargs)
	    gdb_printf (stream, "...");
	  else if (language == language_cplus)
	    gdb_printf (stream, "void");
	...

	The purpose of "i = staticp ? 0 : 1" is to skip the printing of the implicit
	this parameter.

	In commit 5f4d1085085 ("c++/8218: Destructors w/arguments"), skipping of other
	artificial parameters was added, but using a different method: rather than
	adjusting the potential loop start, it skips the parameter in the loop.

	The observed difference in printing is explained by whether we enter the loop:
	- in the clang case, the loop is not entered and we print "void".
	- in the gcc case, the loop is entered, and nothing is printed.

	Fix this by rewriting the code to:
	- always enter the loop
	- handle whether arguments need printing in the loop
	- keep track of how many arguments are printed, and
	  use that after the loop to print void etc.
	such that we have the same for both gcc and clang:
	...
	    A(void);
	    ~A(void);
	...

	Note that I consider the discussion of whether we want to print:
	- A(void) / ~A(void), or
	- A() / ~A()
	out-of-scope for this patch.

	Tested on x86_64-linux.

2022-09-30  Alan Modra  <amodra@gmail.com>

	PR29626, Segfault when disassembling ARM code
		PR 29626
		* arm-dis.c (mapping_symbol_for_insn): Return false on zero
		symtab_size.  Delete later symtab_size test.

2022-09-30  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-29  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: make target_auxv_parse static and rename
	It is only used in auxv.c.  Also, given it is not strictly a wrapper
	around target_ops::auxv (since 27a48a9223d0 "Add auxv parsing to the
	architecture vector."), I think that the name prefixed with target is a
	bit misleading.  Rename to just parse_auxv.

	Change-Id: I41cca055b92c8ede37c258ba6583746a07d8f77e

2022-09-29  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: make fprint_target_auxv static
	It's only used in auxv.c.

	Change-Id: I4992d9aae37b6631a074ab99bbab2f619725b642

2022-09-29  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: constify auxv parse functions
	Constify the input parameters of the various auxv parse functions, they
	don't need to modify the raw auxv data.

	Change-Id: I13eacd5ab8e925ec2b5c1f7722cbab39c41516ec

2022-09-29  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: constify target_stack::is_pushed
	The target_ops parameters here can be made const.

	Change-Id: Ibc18b17d6b21d06145251a03e68aca90538117d6

2022-09-29  Keith Seitz  <keiths@redhat.com>

	Constify target_desc declarations
	This patch changes various global target_desc declarations to const, thereby
	correcting a prominent source of ODR violations in PowerPC-related target code.
	The majority of files/changes are mechanical const-ifications accomplished by
	regenerating the C files in features/.

	This also required manually updating mips-linux-tdep.h,  s390-linux-tdep.h,
	nios2-tdep.h, s390-tdep.h, arch/ppc-linux-tdesc.h, arch/ppc-linux-common.c,
	and rs6000-tdep.c.

	Patch tested against the sourceware trybot, and fully regression tested against
	our (Red Hat's) internal  test infrastructure on Rawhide aarch64, s390x, x86_64,
	and powerpcle.

	With this patch, I can finally enable LTO in our GDB package builds. [Tested
	with a rawhide scratch build containing this patch.]

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=24835

2022-09-29  Keith Seitz  <keiths@redhat.com>

	cleanup: Add missing feature/ XML files to Makefile
	This patch adds some missing .xml files to features/Makefile so that when the
	directory's C files are regenerated, all files are appropriately remade.

	This has demonstrated that there have been several "misses" in regenerating
	files in this directory. Namely, arm-secext.c and sparc{32,64}-solaris.c. For
	the former case, there was what essentially amounts to a typo regarding the
	create feature function's name. In the later case, this file has missed at least
	one important update in July, 2020, when allocate_target_description was
	changed to return a unique pointer.

	Those corrections are included.

2022-09-29  Nick Clifton  <nickc@redhat.com>

	Add -B to the help output from gprof, and add suitable documentation.
		PR 29627
		* gprof.c (usage): Add -B.
		* gprof.texi (synopsis): Add -B.
		(Output Options): Add entry for -B.

2022-09-29  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-28  Pedro Alves  <pedro@palves.net>

	Fix GDB build: ELF support check & -lzstd
	GDB fails to build for me, on Ubuntu 20.04.  I get:

	 ...
	   CXXLD  gdb
	 /usr/bin/ld: linux-tdep.o: in function `linux_corefile_thread(thread_info*, linux_corefile_thread_data*)':
	 /home/pedro/gdb/binutils-gdb/src/gdb/linux-tdep.c:1831: undefined reference to `gcore_elf_build_thread_register_notes(gdbarch*, thread_info*, gdb_signal, bfd*, std::unique_ptr<char, gdb::xfree_deleter<char> >*, int*)'
	 /usr/bin/ld: linux-tdep.o: in function `linux_make_corefile_notes(gdbarch*, bfd*, int*)':
	 /home/pedro/gdb/binutils-gdb/src/gdb/linux-tdep.c:2117: undefined reference to `gcore_elf_make_tdesc_note(bfd*, std::unique_ptr<char, gdb::xfree_deleter<char> >*, int*)'
	 collect2: error: ld returned 1 exit status
	 make[2]: *** [Makefile:2149: gdb] Error 1
	 make[2]: Leaving directory '/home/pedro/gdb/binutils-gdb/build/gdb'
	 make[1]: *** [Makefile:11847: all-gdb] Error 2
	 make[1]: Leaving directory '/home/pedro/gdb/binutils-gdb/build'
	 make: *** [Makefile:1004: all] Error 2

	Those undefined functions exist in gdb/gcore-elf.c, which is only
	included in the build if GDB's configure thinks that the target you're
	configuring for is an ELF target.  GDB's configure thinks my system
	isn't ELF, which is incorrect.

	For the ELF support check, gdb/config.log shows:

	 configure:17387: checking for ELF support in BFD
	 configure:17407: gcc -o conftest -I/home/pedro/gdb/binutils-gdb/src/gdb/../include -I../bfd -I/home/pedro/gdb/binutils-gdb/src/gdb/../bfd -g3 -O0      -L../bfd -L../libiberty  -lzstd   conftest.c -lbfd -liberty -lz  -lncursesw -lm -ldl  >&5
	 /usr/bin/ld: ../bfd/libbfd.a(compress.o): in function `decompress_contents':
	 /home/pedro/gdb/binutils-gdb/src/bfd/compress.c:42: undefined reference to `ZSTD_decompress'
	 /usr/bin/ld: /home/pedro/gdb/binutils-gdb/src/bfd/compress.c:44: undefined reference to `ZSTD_isError'
	 /usr/bin/ld: ../bfd/libbfd.a(compress.o): in function `bfd_compress_section_contents':
	 /home/pedro/gdb/binutils-gdb/src/bfd/compress.c:195: undefined reference to `ZSTD_compress'
	 /usr/bin/ld: /home/pedro/gdb/binutils-gdb/src/bfd/compress.c:198: undefined reference to `ZSTD_isError'
	 collect2: error: ld returned 1 exit status
	 configure:17407: $? = 1
	 ...
	 configure:17417: result: no

	Note how above, in the gcc command line, "-lzstd" appears before
	"-lbfd".  That explain the link failure.  It should appear after, like
	-lz does.

	This commit fixes it, by moving ZSTD_LIBS from LDFLAGS to LIBS, next
	to -lz, in GDB_AC_CHECK_BFD, and regenerating gdb/configure.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29630
	Change-Id: I1f4128dde634e8ea04c9002904f1005a8b3a6863

2022-09-28  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove trailing spaces in README
	Change-Id: Ic7f8e415acd1bff6194cf08ed646bff45571f165

2022-09-28  Tom Tromey  <tromey@adacore.com>

	Treat Character as a discrete type in Ada
	A user noticed that gdb would assert when printing a certain array
	with array-indexes enabled.  This turned out to be caused by the array
	having an index type of Character, which is completely valid in Ada.
	This patch changes the Ada support to recognize Character as a
	discrete type, and adds some tests.

	Because this is Ada-specific and was also reviewed internally, I am
	checking it in.

2022-09-28  Nick Clifton  <nickc@redhat.com>

	The help document of size misses an option.
		PR 29628
		* size.c (usage): Add -f.
		* doc/binutils.texi (size): Add -f.

2022-09-28  Clément Chigot  <chigot@adacore.com>

	ld/testsuite: force warnings when dealing with execstack tests
	Binutils can be configured to avoid printing the execstack or RWD
	segment warnings. In this case, the first test of PR ld/29072 will fail.
	Fix that by always manually forcing the warnings for it.

	ld/ChangeLog:

		* testsuite/ld-elf/elf.exp (PR ld/29072): Force execstack and
		RWD segment warnings.

2022-09-28  Alan Modra  <amodra@gmail.com>

	Re: egrep in binutils
	Multi-line patterns for grep are not supported on some old versions
	of grep.

	binutils/
		* embedspu.sh: Replace multi-line grep with sed.
	ld/
		* testsuite/ld-elfvers/vers.exp: Replace multi-line grep with sed.

2022-09-28  Pedro Alves  <pedro@palves.net>

	Renenerate {gdb,gdbserver}/configure
	Pick up config/lib-ld.m4 changes from:

	 commit 67d1991b785bdfef1d70cddfa0202b99b43ccce9
	 Author:     Alan Modra <amodra@gmail.com>
	 AuthorDate: Wed Sep 28 13:37:31 2022 +0930
	 Commit:     Alan Modra <amodra@gmail.com>
	 CommitDate: Wed Sep 28 13:37:31 2022 +0930

	     egrep in binutils

	Change-Id: Ifc84d30f1fca015e80bafa80f9a35616b0077220

2022-09-28  Nick Clifton  <nickc@redhat.com>

	The help document of as misses some many options
		PR 29623
		* as.c (show_usage): Document the --dump-config,
		--gdwarf-cie-version, --hash-size, --multibyte-handling,
		and --reduce-memory-overheads options.
		* config/tc-i386.c (md_show_usage): Document the -O option.
		* doc/as.texi: Document the --dump-config, --emulation,
		--hash-size, and --reduce-memory-overheads options.

2022-09-28  Alan Modra  <amodra@gmail.com>

	egrep in binutils
	Apparently some distros have a nagging egrep that helpfully tells you
	egrep is deprecated and to use "grep -E".  The nag message causes a ld
	testsuite failure.  What's more the advice isn't that good.  The "-E"
	flag may not be available with older versions of grep.

	This patch fixes bare invocation of egrep within binutils, replacing
	it with the autoconf $EGREP or with grep.

	config/
		* lib-ld.m4 (AC_LIB_PROG_LD_GNU): Require AC_PROG_EGREP and
		invoke $EGREP.
		(AC_LIB_PROG_LD): Likewise.
	binutils/
		* configure: Regenerate.
		* embedspu.sh: Replace egrep with grep.
	gold/
		* testsuite/Makefile.am (flagstest_compress_debug_sections.check):
		Replace egrep with grep.
		* testsuite/Makefile.in: Regenerate.
		* testsuite/bnd_ifunc_1.sh: Replace egrep with $EGREP.
		* testsuite/bnd_ifunc_2.sh: Likewise.
		* testsuite/bnd_plt_1.sh: Likewise.
		* testsuite/discard_locals_test.sh: Likewise.
		* testsuite/gnu_property_test.sh: Likewise.
		* testsuite/no_version_test.sh: Likewise.
		* testsuite/pr18689.sh: Likewise.
		* testsuite/pr26936.sh: Likewise.
		* testsuite/retain.sh: Likewise.
		* testsuite/split_i386.sh: Likewise.
		* testsuite/split_s390.sh: Likewise.
		* testsuite/split_x32.sh: Likewise.
		* testsuite/split_x86_64.sh: Likewise.
		* testsuite/ver_test_pr16504.sh: Likewise.
	intl/
		* configure: Regenerate.
	ld/
		* testsuite/ld-elfvers/vers.exp (test_ar): Replace egrep with grep.

2022-09-28  Alan Modra  <amodra@gmail.com>

	regen bfd/configure

2022-09-28  Alan Modra  <amodra@gmail.com>

	asan: _bfd_stab_section_find_nearest_line segv
	The segv was on "info->strs[strsize - 1] = 0;" with strsize zero.  OK,
	if strsize is zero we don't have any filenames in stabs so no useful
	info.

		* syms.c (_bfd_stab_section_find_nearest_line): Exit if either
		stabsize or strsize is zero.

2022-09-28  Alan Modra  <amodra@gmail.com>

	asan: segv in _bfd_archive_close_and_cleanup
	Uninitialised arelt_data->parent_cache led to this segv.

		* pdb.c (pdb_get_elt_at_index): Clear arelt_data.

2022-09-28  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-27  Fangrui Song  <maskray@google.com>

	sim: Link ZSTD_LIBS
	This fixes linker errors in a `../../configure --enable-targets
	--enable-sim; make all-gdb` build.

2022-09-27  Tsukasa OI  <research_trasio@irq.a4lg.com>

	gold: Suppress "unused" variable warning on Clang
	Clang generates a warning if there is a variable that is set but not used
	otherwise ("-Wunused-but-set-variable").  On the default configuration, it
	causes a build failure (unless "--disable-werror" is specified).

	Because the cause of this error is in the Bison-generated code
	($(srcdir)/gold/yyscript.y -> $(builddir)/gold/yyscript.c),
	this commit suppresses this warning ("-Wunused-but-set-variable") by placing
	DIAGNOSTIC_IGNORE_UNUSED_BUT_SET_VARIABLE macro at the end of user
	prologue on yyscript.y.

		* yyscript.y: Suppress -Wunused-but-set-variable warning on
		the Bison-generated code.

2022-09-27  Fangrui Song  <i@maskray.me>

	libctf: Add ZSTD_LIBS to LIBS so that ac_cv_libctf_bfd_elf can be true

2022-09-27  Fangrui Song  <maskray@google.com>

	binutils, gdb: support zstd compressed debug sections
	PR29397 PR29563: Add new configure option --with-zstd which defaults to
	auto.  If pkgconfig/libzstd.pc is found, define HAVE_ZSTD and support
	zstd compressed debug sections for most tools.

	* bfd: for addr2line, objdump --dwarf, gdb, etc
	* gas: support --compress-debug-sections=zstd
	* ld: support ELFCOMPRESS_ZSTD input and --compress-debug-sections=zstd
	* objcopy: support ELFCOMPRESS_ZSTD input for
	  --decompress-debug-sections and --compress-debug-sections=zstd
	* gdb: support ELFCOMPRESS_ZSTD input.  The bfd change references zstd
	  symbols, so gdb has to link against -lzstd in this patch.

	If zstd is not supported, ELFCOMPRESS_ZSTD input triggers an error.  We
	can avoid HAVE_ZSTD if binutils-gdb imports zstd/ like zlib/, but this
	is too heavyweight, so don't do it for now.

	```
	% ld/ld-new a.o
	ld/ld-new: a.o: section .debug_abbrev is compressed with zstd, but BFD is not built with zstd support
	...

	% ld/ld-new a.o --compress-debug-sections=zstd
	ld/ld-new: --compress-debug-sections=zstd: ld is not built with zstd support

	% binutils/objcopy --compress-debug-sections=zstd a.o b.o
	binutils/objcopy: --compress-debug-sections=zstd: binutils is not built with zstd support

	% binutils/objcopy b.o --decompress-debug-sections
	binutils/objcopy: zstd.o: section .debug_abbrev is compressed with zstd, but BFD is not built with zstd support
	...
	```

2022-09-27  Alan Modra  <amodra@gmail.com>

	PR29617, ld segfaults when bfd_close fails
		PR 29617
		* ldmain.c (main): Don't access output_bfd after bfd_close.

2022-09-27  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-26  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: update field names in gdb-gdb.py.in
	Patches that renamed the type::length and type::target_type fields
	didn't update gdb-gdb.py.in accordingly, do that.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29599
	Change-Id: I0f3f37a94d43497789156b0ded4d2f2dd5b89496

2022-09-26  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: use gdb_test in gdb.gdb/python-helper.exp
	If some command in there gives the wrong answer, we currently have to
	wait for a timeout for the test to continue.  For instance, I currently
	see:

	    print *val->type
	    $1 = Python Exception <class 'gdb.error'>: Cannot take address of method length.

	    (outer-gdb) FAIL: gdb.gdb/python-helper.exp: pretty print type (timeout)

	We can avoid this and modernize the test at the same time by using the
	-prompt option of gdb_test.

	gdb_test_no_output currently accepts a -prompt_re option (the variable
	name passed to parse_args defines the option name), but I think
	it's a typo.  It's supposed to be -prompt, like gdb_test.  I can't find
	anything using -prompt_re using grep.  Change it to just "prompt".

	Change-Id: Icc0a9a0ef482e62460c708bccdd544c11d711eca

2022-09-26  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: bump duration for the whole test in do_self_tests
	When running gdb.gdb/python-helper.exp, I get some timeouts:

	    continue
	    Continuing.
	    print 1

	    FAIL: gdb.gdb/python-helper.exp: hit breakpoint in outer gdb (timeout)

	At this time, GDB is actually processing the stop and reading in some
	CUs.  selftest_setup does bump the timeout, but it's not for the whole
	test.

	Since debugging GDB with GDB is (unfortunately) a bit slow, bump the
	timeout for the whole duration of the setup and body.  On my optimized
	build, the command takes just a bit more than the current timeout of 10
	seconds.  But it's much slower if running the test on an unoptimized
	build, so I think it's necessary to bump the timeout for that in any
	case.

	Change-Id: I4d38285870e76c94f9d0bfdb60648a2e7f2cfa5d

2022-09-26  Clément Chigot  <chigot@adacore.com>

	binutils/testsuite: handle the different install names of c++filt
	c++filt is always named cxxfilt in a build directory, but in a install
	directory it would be named either cxxfilt or c++filt (depending on
	the host).  Handle this last case in testsuite.

	binutils/ChangeLog:
	        *  testsuite/config/default.exp (CXXFILE): if cxxfilt not found,
	        try c++filt.

2022-09-26  Clément Chigot  <chigot@adacore.com>

	binutils/testsuite: skip gentestdlls related tests if missing
	When launching the testsuite through runtest outside the build tree,
	gentestdlls might not be available, this binary being created by make
	check.
	Simply untested the related tests instead of crashing.

	binutils/ChangeLog:

		* testsuite/binutils-all/objdump.exp: Skip dotnet tests if
		gentestdlls is not available.

2022-09-26  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.dwarf2/dw2-unspecified-type-foo.c with -m32
	When running test-case gdb.dwarf2/dw2-unspecified-type-foo.c with target board
	unix/-m32, I run into:
	...
	(gdb) PASS: gdb.dwarf2/dw2-unspecified-type.exp: ptype foo
	p ((int (*) ()) foo) ()^M
	$1 = -135698472^M
	...

	Add the missing "return 0" in foo, which fixes this.

	Tested on x86_64-linux.

2022-09-26  Alan Modra  <amodra@gmail.com>

	PR29613, use of uninitialized value in objcopy
		PR 29613
		* elf.c (_bfd_elf_write_secondary_reloc_section): Trim sh_size
		back to relocs written.  Use better types for vars.

2022-09-26  Alan Modra  <amodra@gmail.com>

	PR29542, PowerPC gold internal error in get_output_view,
	We were attempting to set a BSS style section contents.

		PR 29542
		* powerpc.cc (Output_data_plt_powerpc::do_write): Don't set .plt,
		.iplt or .lplt section contents when position independent.

2022-09-26  Alan Modra  <amodra@gmail.com>

	stab nearest_line bfd_malloc_and_get_section
	bfd_malloc_and_get_section performs some sanity checks on the section
	size before allocating memory.  This patch avails the stab
	nearest_line code of that sanity checking, and tidies up memory
	afterward.

		* coffgen.c (_bfd_coff_close_and_cleanup): Call _bfd_stab_cleanup.
		* elf.c (_bfd_elf_close_and_cleanup): Likewise.
		* syms.c (_bfd_stab_section_find_nearest_line): Set *pinfo earlier.
		Use bfd_malloc_and_get_section.  Free malloc'd buffers on failure.
		Malloc indextable.
		(_bfd_stab_cleanup): New function.
		* libbfd-in.h (_bfd_stab_cleanup): Declare.
		* libbfd.h: Regnerate.

2022-09-26  Alan Modra  <amodra@gmail.com>

	PKG_CHECK_MODULES for msgpack and jansson
	Using AS_IF rather than shell "if" is recommended for conditionals
	that contain non-trivial autoconf macros, because autoconf will emit
	any AC_REQUIREd autoconf macro expansions outside of the conditional.
	This makes them available elsewhere in the configure script.

	binutils/
		* configure.ac (msgpack): Use "AS_IF" rather than "if".
		* configure: Regenerate.
	ld/
		* configure.ac (jansson): Use "AS_IF" rather than "if".
		* configure: Regenerate.

2022-09-26  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-25  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-24  Magne Hov  <mhov@undo.io>

	gdb/source.c: Fix undefined behaviour dereferencing empty string
	When a source file's dirname is solely made up of directory separators
	we end up trying to dereference the last character of an empty string
	with std::string::back, which results in undefined behaviour. A typical
	use case where this can happen is when the root directory "/" is used as
	a compilation directory.

	With libstdc++.so.6.0.28 we get no out-of-bounds checks and the byte
	preceding the storage of the empty string is returned. The character
	value of this byte depends on heap implementation and usage, but when
	this byte happens to hold the value of the directory separator character
	we go on to call std::string::pop_back on the empty string which results
	in an out_of_range exception which terminates GDB.

	Fix this by using path_join. prepare_path_for_appending ensures that the
	filename component is relative.

	The testsuite has been run before and after the change and no
	regressions were found.

2022-09-24  Enze Li  <enze.li@hotmail.com>

	gdbserver: remove unused for loop
	In this commit,

	  commit cf6c1e710ee162a5adb0ae47acb731f2bfecc956
	  Date:   Mon Jul 11 20:53:48 2022 +0800

	    gdbserver: remove unused variable

	I removed an unused variable in handle_v_run.  Pedro then pointed out
	that the for loop after it was also unused.  After a period of smoke
	testing, no exceptions were found.

	Tested on x86_64-linux.

2022-09-24  Alan Modra  <amodra@gmail.com>

	The problem with warning in elf_object_p
	elfcode.h can emit three warnings in elf_object_p for various things,
	"section extending past end of file", "corrupt string table index",
	and "program header with invalid alignment".  The problem with doing
	this is that the warning can be emitted for multiple possible targets
	as each one is tried.  I was looking at a fuzzer testcase that had an
	object file with 6144 program headers, 5316 of which had invalid
	alignment.  It would be bad enough to get 5316 messages all the same,
	but this object was contained in an archive and resulted in 4975776
	repeats.

	Some trimming can be done by not warning if the bfd is already marked
	read_only, as is done for the "section extending past end of file"
	warning, but that still results in an unacceptable number of
	warnings for object files in archives.  Besides that, it is just wrong
	to warn about a problem detected by a target elf_object_p other than
	the one that actually matches.  At some point we might have more
	target specific warnings.

	So what to do?  One obvious solution is to remove the warnings.
	Another is to poke any warning strings into the target xvec, emitting
	them if that xvec is the final one chosen.  This also has the benefit
	of solving the archive problem.  A warning when recursing into
	_bfd_check_format for the first element of the archive (to find the
	correct target for the archive) will still be on the xvec at the point
	that target is chosen for the archive.  However, target xvecs are
	read-only.  Thus the need for per_xvec_warn to logically extend
	bfd_target with a writable field.  I've made per_xvec_warn one larger
	than bfd_target_vector to provide one place for user code that makes
	private copies of target xvecs.

		* elfcode.h (elf_swap_shdr_in, elf_object_p): Stash potential
		warnings in _bfd_per_xvec_warn location.
		* format.c (clear_warnmsg): New function.
		(bfd_check_format_matches): Call clear_warnmsg before trying
		a new xvec.  Print warnings for the successful non-archive
		match.
		* targets.c: Include libiberty.h.
		(_bfd_target_vector_entries): Use ARRAY_SIZE.
		(per_xvec_warn): New.
		(_bfd_per_xvec_warn): New function.
		* Makefile.am (LIBBFD_H_FILES): Add targets.c.
		* Makefile.in: Regenerate.
		* libbfd.h: Regenerate.

2022-09-24  Alan Modra  <amodra@gmail.com>

	Re: bfd_cleanup for object_p
	Bits still missing from commit cb001c0d283d.

		* aoutx.h (aout_@var{size}_some_aout_object_p): Correct synopsis.
		* i386lynx.c (lynx_core_file_p): Correct return type.
		* ptrace-core.c (ptrace_unix_core_file_p): Likewise.

2022-09-24  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-23  John Baldwin  <jhb@FreeBSD.org>

	Support AT_USRSTACKBASE and AT_USRSTACKLIM.
	FreeBSD's kernel has recently added two new ELF auxiliary vector
	entries to describe the location of the user stack for the initial
	thread in a process.

	This change displays the proper name and description of these entries
	in 'info auxv'.

2022-09-23  Christoph Müllner  <christoph.muellner@vrull.eu>

	RISC-V: Add Zawrs ISA extension support
	This patch adds support for the Zawrs ISA extension
	("wrs.nto" and "wrs.sto" instructions).

	The specification can be found here:
	https://github.com/riscv/riscv-zawrs/blob/main/zawrs.adoc

2022-09-23  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite/tui: start GDB with "set filename-display basename"
	The test gdb.tui/tui-missing-src.exp fails on my CI machine, and I
	concluded that it is caused by the long source directory name:

	  /home/jenkins/workspace/binutils-gdb_master_linuxbuild/platform/jammy-amd64/target_board/unix/src/binutils-gdb

	The long name causes some particular redrawing that doesn't happen for
	shorter directories, and causes a Term::command call to return too
	early.

	This can be reproduced by cloning the binutils-gdb repo in a directory
	with a name similar to the one shown above.

	    $ pwd
	    /home/simark/workspace/binutils-gdb_master_linuxbuild/platform/jammy-amd64/target_board/unix/src/binutils-gdb/build/gdb
	    $ make check-read1 TESTS="gdb.tui/tui-missing-src.exp"
	    FAIL: gdb.tui/tui-missing-src.exp: checking if inside f2 ()
	    FAIL: gdb.tui/tui-missing-src.exp: f2.c must be displayed in source window
	    FAIL: gdb.tui/tui-missing-src.exp: check source box is empty after return
	    FAIL: gdb.tui/tui-missing-src.exp: Back in main

	Note that using "make check" instead of "make check-read1" only shows
	the last 2 failures for me.

	When running gdb.tui/tui-missing-src.exp in a directory with a shorter
	name, the terminal looks like this by the time the "checking if inside
	f2" test runs:

	    Screen Dump (size 80 columns x 24 rows, cursor at column 6, row 23):
	        0 +-...ld/binutils-gdb-noasan/gdb/testsuite/outputs/gdb.tui/tui-missing-src/f2.c-+
	        1 |        1                                                                     |
	        2 |        2  int                                                                |
	        3 |        3  f2 (int x)                                                         |
	        4 |        4  {                                                                  |
	        5 |  >     5    x <<= 1;                                                         |
	        6 |        6    return x+5;                                                      |
	        7 |        7  }                                                                  |
	        8 |        8                                                                     |
	        9 |        9                                                                     |
	       10 |       10                                                                     |
	       11 |       11                                                                     |
	       12 |       12                                                                     |
	       13 |       13                                                                     |
	       14 +------------------------------------------------------------------------------+
	       15 multi-thre Thread 0x7ffff7cc07 In: f2                  L5    PC: 0x555555555143
	       16     at /home/simark/build/binutils-gdb-noasan/gdb/testsuite/outputs/gdb.tui/tui-
	       17 missing-src/main.c:6
	       18 (gdb) next
	       19 (gdb) step
	       20 f2 (x=4)
	       21     at /home/simark/build/binutils-gdb-noasan/gdb/testsuite/outputs/gdb.tui/tui-
	       22 missing-src/f2.c:5
	       23 (gdb)
	    PASS: gdb.tui/tui-missing-src.exp: checking if inside f2 ()

	When running the `Term::command "step"` just before, GDB writes the
	"step", which makes the `wait_for` proc go in the "looking for the
	prompt" mode, to know when the command's execution is complete.  As some
	new output appears, lines that must disappear are deleted using the
	"Delete Line" operation [1] and some new ones are drawn.  The source
	window gets redrawn with the contents of the f2.c file.  Then, GDB
	writes the prompt (at line 23 above), which satisfies `wait_for`, which
	then returns.  The state of the terminal is therefore correct for the
	"check if inside f2" and "f2.c must be displayed in the source window"
	tests.

	In the non-working case, the terminal looks like this by the time the
	"check if inside f2" test runs:

	     Screen Dump (size 80 columns x 24 rows, cursor at column 6, row 17):
	        0 +------------------------------------------------------------------------------+
	        1 |                                                                              |
	        2 |                                                                              |
	        3 |                                                                              |
	        4 |                                                                              |
	        5 |                                                                              |
	        6 |                                                                              |
	        7 |               [ No Source Available ]                                        |
	        8 |                                                                              |
	        9 |                                                                              |
	       10 |                                                                              |
	       11 |                                                                              |
	       12 |                                                                              |
	       13 |                                                                              |
	       14 +------------------------------------------------------------------------------+
	       15 multi-thre Thread 0x7ffff7cc1b In: main                L7    PC: 0x555555555128
	       16 sing-src/main.c:6
	       17 (gdb) ary breakpoint 1, main ()
	       18     at /home/simark/workspace/binutils-gdb_master_linuxbuild/platform/jammy-amd6
	       19 4/target_board/unix/src/binutils-gdb/build/gdb/testsuite/outputs/gdb.tui/tui-mis
	       20 sing-src/main.c:6
	       21 (gdb) next
	       22 (gdb) step
	       23
	    FAIL: gdb.tui/tui-missing-src.exp: checking if inside f2 ()

	What happened is: GDB wrote the "step" command, which make the
	`wait_for` proc go in its "looking for the prompt" mode.  However,
	curses decided to redraw whatever scrolled up to line 17 using some
	standard character insertion operations:

	    +++ Cursor Down (1), cursor: (16, 0) -> (17, 0)
	    +++ Inserting string '('
	    +++   Inserted char '(', cursor: (17, 0) -> (17, 1)
	    +++ Inserted string '(', cursor: (17, 0) -> (17, 1)
	    +++ Inserting string 'g'
	    +++   Inserted char 'g', cursor: (17, 1) -> (17, 2)
	    +++ Inserted string 'g', cursor: (17, 1) -> (17, 2)
	    +++ Inserting string 'd'
	    +++   Inserted char 'd', cursor: (17, 2) -> (17, 3)
	    +++ Inserted string 'd', cursor: (17, 2) -> (17, 3)
	    +++ Inserting string 'b'
	    +++   Inserted char 'b', cursor: (17, 3) -> (17, 4)
	    +++ Inserted string 'b', cursor: (17, 3) -> (17, 4)
	    +++ Inserting string ')'
	    +++   Inserted char ')', cursor: (17, 4) -> (17, 5)
	    +++ Inserted string ')', cursor: (17, 4) -> (17, 5)
	    +++ Inserting string ' '
	    +++   Inserted char ' ', cursor: (17, 5) -> (17, 6)
	    +++ Inserted string ' ', cursor: (17, 5) -> (17, 6)

	And that causes `wait_for` to think the "step" command is complete.
	This is wrong, as the prompt at line 17 isn't the prompt drawn after the
	completion of the "step" command.  The subsequent tests now run with a
	partially updated screen (what is shown above) and obviously fail.

	The ideal way to fix this would be for `wait_for` to be smarter, to
	avoid it confusing the different prompts drawn.

	However, I would also like to reduce the variations in TUI test results
	due to the directories (source and build) in which tests are ran.  TUI
	tests are more prone to differences in test results due to variations in
	directory names than other tests, as it makes curses take different
	redrawing decisions.  So in this patch, I propose to make TUI tests use
	"set filename-display basename", which makes GDB omit directory names
	when it prints file names.  This way, regardless of where you run the
	tests, you should get the same results (all other things being equal).

	Doing this happens to fix my failures and makes my CI happy (which in
	turns makes me happy).  To be clear, I understand that this does not fix
	the root issue of `proc wait_for` being confused.  However, it makes TUI
	test runs be more similar for everyone, such that there's less chance of
	TUI tests randomly failing for somebody.  If some other change triggers
	the `wait_for` problem again in the future, hopefully everybody will see
	the problem and we can work on getting it fixed more easily than if just
	one unlucky person sees the problem.

	Note that there are other reasons why TUI tests could vary, like
	different curses library versions taking different re-drawing decisions.
	However, I think my change is a good step towards more stable test
	results.

	[1] https://vt100.net/docs/vt510-rm/DL.html

	Change-Id: Ib18da83317e7b78a46f77892af0d2e39bd261bf5

2022-09-23  Jiangshuai Li  <jiangshuai_li@linux.alibaba.com>

	gdb/csky add cskyv2-linux.xml for cskyv2-linux.c
	Add cskyv2-linux.xml for re-generating cskyv2-linux.c if needed.
	Also update cskyv2-linux.c.

2022-09-23  Alan Modra  <amodra@gmail.com>

	pdb: _bfd_generic_close_and_cleanup
	Every format that might appear inside a generic archive needs to call
	_bfd_generic_close_and_cleanup, so that the archive element lookup
	htab can be tidied on closing an element.  Otherwise you get stale
	entries in the htab pointing at freed and perhaps reused memory,
	resulting in segfaults when the archive is closed.

	Calling _bfd_generic_close_and_cleanup on close means tdata needs to
	be set up too, since pdb claims to be of format bfd_archive.

		* pdb.c (pdb_close_and_cleanup): Define as
		_bfd_generic_close_and_cleanup.
		(pdb_archive_p): Set up tdata for bfd_archive format.

2022-09-23  Alan Modra  <amodra@gmail.com>

	Don't attempt to compress bss sections
	It doesn't make sense to try to compress a section without contents
	since those sections take no space on disk.  Compression can only
	increase the disk image size.

		* coffgen.c (make_a_section_from_file): Exclude !SEC_HAS_CONTENTS
		sections from compression and decompression.
		* elf.c (_bfd_elf_make_section_from_shdr): Likewise.

2022-09-23  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-22  Lancelot SIX  <lancelot.six@amd.com>

	gdb/testsuite/lib/future.exp: follow dejagnu default_target_compile
	GDB's testsuite can override dejagnu's default_target_compile if the
	system provided dejagnu installation does not provide support to compile
	languages GDB needs.

	Recent version of dejagnu (1.6.3, installed on RHEL-9) includes ba60272
	"Establish a default C compiler by evaluating [find_gcc] if no other
	compiler is given."[1].  This commit removed calls such as
	`set_board_info compiler  "[find_gcc]"` from the various baseboards
	and has default_target_compile call `find_gcc` itself to find a compiler
	if none was specified by the board description.

	On systems with dejagnu-1.6.3, if GDB's overrides is needed to support
	languages still unknown to dejagnu, we end up in the following
	situation:
	  - The system board files do not set the C compiler anymore,
	  - GDB's replacement for default_target_compile assumes that the
	    compiler should have been set up by the board file.

	In this situation, no one sets the C compiler for the board and as a
	result many test are not compiled and not executed:

	    [...]
	    Running .../gdb/testsuite/gdb.base/bt-on-error-and-warning.exp ...
	    gdb compile failed, default_target_compile: No compiler to compile with
	    Running .../gdb/testsuite/gdb.base/dprintf-non-stop.exp ...
	    gdb compile failed, default_target_compile: No compiler to compile with
	    Running .../gdb/testsuite/gdb.base/structs3.exp ...
	    gdb compile failed, default_target_compile: No compiler to compile with
	    [...]

	We are observing this error with ROCgdb[2], a downstream port of GDB
	supporting AMD GPUs.  This port needs to use GDB's override of
	default_target_compile to compile HIP programs since dejagnu does not
	provide support for this language yet.

	This patch changes gdb_default_target_compile_1 in a similar way
	default_target_compile has been updated so both implementations remain
	compatible.  Even if this is not strictly required by GDB just yet,
	I believe keeping both implementations in sync desirable.

	Using board files provided with dejagnu <=1.6.2 is still supported: if
	the compiler is set by the board file, gdb_default_target_compile_1 uses
	it and does not need `find_gcc`.

	Patch tested on x86_64 RHEL-9 and ubuntu-20.04 on top of GDB and ROCgdb.

	[1] http://git.savannah.gnu.org/gitweb/?p=dejagnu.git;a=commit;h=ba60272a5ac6f6a7012acca03f596a6ed003f044
	[2] https://github.com/ROCm-Developer-Tools/ROCgdb

	Change-Id: Ibff52684d9cab8243a7c6748ecbd29f50c37e669

2022-09-22  Christoph Müllner  <christoph.muellner@vrull.eu>

	RISC-V: Add T-Head MemPair vendor extension
	T-Head has a range of vendor-specific instructions.
	Therefore it makes sense to group them into smaller chunks
	in form of vendor extensions.

	This patch adds the XTheadMemPair extension, a collection of T-Head specific
	two-GP-register memory operations.
	The 'th' prefix and the "XTheadMemPair" extension are documented in a PR
	for the RISC-V toolchain conventions ([1]).

	[1] https://github.com/riscv-non-isa/riscv-toolchain-conventions/pull/19

	Co-developed-by: Lifang Xia <lifang_xia@linux.alibaba.com>

2022-09-22  Christoph Müllner  <christoph.muellner@vrull.eu>

	RISC-V: Add support for literal instruction arguments
	This patch introduces support for arbitrary literal instruction
	arguments, that are not encoded in the opcode.

	A typical use case for this feature would be an instruction that
	applies an implicit shift by a constant value on an immediate
	(that is a real operand). With this patch it is possible to make
	this shift visible in the dissasembly and support such artificial
	parameter as part of the asssembly code.

	Co-developed-by: Lifang Xia <lifang_xia@linux.alibaba.com>

2022-09-22  Christoph Müllner  <christoph.muellner@vrull.eu>

	RISC-V: Add T-Head MemIdx vendor extension
	T-Head has a range of vendor-specific instructions.
	Therefore it makes sense to group them into smaller chunks
	in form of vendor extensions.

	This patch adds the XTheadMemIdx extension, a collection of T-Head specific
	GPR memory access instructions.
	The 'th' prefix and the "XTheadMemIdx" extension are documented in a PR
	for the RISC-V toolchain conventions ([1]).

	In total XTheadCmo introduces the following 44 instructions
	(BU,HU,WU only for loads (zero-extend instead of sign-extend)):

	* {L,S}{D,W,WU,H,HU,B,BU}{IA,IB} rd, rs1, imm5, imm2
	* {L,S}R{D,W,WU,H,HU,B,BU} rd, rs1, rs2, imm2
	* {L,S}UR{D,W,WU,H,HU,B,BU} rd, rs1, rs2, imm2

	[1] https://github.com/riscv-non-isa/riscv-toolchain-conventions/pull/19

	Co-developed-by: Lifang Xia <lifang_xia@linux.alibaba.com>

2022-09-22  Christoph Müllner  <christoph.muellner@vrull.eu>

	RISC-V: Add T-Head FMemIdx vendor extension
	T-Head has a range of vendor-specific instructions.
	Therefore it makes sense to group them into smaller chunks
	in form of vendor extensions.

	This patch adds the XTheadFMemIdx extension, a collection of
	T-Head-specific floating-point memory access instructions.
	The 'th' prefix and the "XTheadFMemIdx" extension are documented
	in a PR for the RISC-V toolchain conventions ([1]).

	[1] https://github.com/riscv-non-isa/riscv-toolchain-conventions/pull/19

	Co-developed-by: Lifang Xia <lifang_xia@linux.alibaba.com>

2022-09-22  Christoph Müllner  <christoph.muellner@vrull.eu>

	RISC-V: Add T-Head MAC vendor extension
	T-Head has a range of vendor-specific instructions.
	Therefore it makes sense to group them into smaller chunks
	in form of vendor extensions.

	This patch adds the XTheadMac extension, a collection of
	T-Head-specific multiply-accumulate instructions.
	The 'th' prefix and the "XTheadMac" extension are documented
	in a PR for the RISC-V toolchain conventions ([1]).

	[1] https://github.com/riscv-non-isa/riscv-toolchain-conventions/pull/19

	Co-developed-by: Lifang Xia <lifang_xia@linux.alibaba.com>

2022-09-22  Christoph Müllner  <christoph.muellner@vrull.eu>

	RISC-V: Add T-Head CondMov vendor extension
	T-Head has a range of vendor-specific instructions.
	Therefore it makes sense to group them into smaller chunks
	in form of vendor extensions.

	This patch adds the XTheadCondMov extension, a collection of
	T-Head-specific conditional move instructions.
	The 'th' prefix and the "XTheadCondMov" extension are documented
	in a PR for the RISC-V toolchain conventions ([1]).

	[1] https://github.com/riscv-non-isa/riscv-toolchain-conventions/pull/19

	Co-developed-by: Lifang Xia <lifang_xia@linux.alibaba.com>

2022-09-22  Christoph Müllner  <christoph.muellner@vrull.eu>

	RISC-V: Add T-Head Bitmanip vendor extension
	T-Head has a range of vendor-specific instructions.
	Therefore it makes sense to group them into smaller chunks
	in form of vendor extensions.

	This patch adds the XThead{Ba,Bb,Bs} extensions, a collection of
	T-Head-specific bitmanipulation instructions.
	The 'th' prefix and the "XThead{Ba,Bb,Bs}" extension are documented
	in a PR for the RISC-V toolchain conventions ([1]).

	[1] https://github.com/riscv-non-isa/riscv-toolchain-conventions/pull/19

	Co-developed-by: Lifang Xia <lifang_xia@linux.alibaba.com>

2022-09-22  Christoph Müllner  <christoph.muellner@vrull.eu>

	RISC-V: Add support for arbitrary immediate encoding formats
	This patch introduces support for arbitrary signed or unsigned immediate
	encoding formats. The formats have the form "XsN@S" and "XuN@S" with N
	being the number of bits and S the LSB position.

	For example an immediate field of 5 bytes that encodes a signed value
	and is stored in the bits 24-20 of the instruction word can use the
	format specifier "Xs5@20".

	Co-developed-by: Lifang Xia <lifang_xia@linux.alibaba.com>

2022-09-22  Christoph Müllner  <christoph.muellner@vrull.eu>

	RISC-V: Add T-Head SYNC vendor extension
	T-Head has a range of vendor-specific instructions.
	Therefore it makes sense to group them into smaller chunks
	in form of vendor extensions.

	This patch adds the XTheadSync extension, a collection of
	T-Head-specific multi-processor synchronization instructions.
	The 'th' prefix and the "XTheadSync" extension are documented in a PR
	for the RISC-V toolchain conventions ([1]).

	[1] https://github.com/riscv-non-isa/riscv-toolchain-conventions/pull/19

	Co-developed-by: Lifang Xia <lifang_xia@linux.alibaba.com>

2022-09-22  Christoph Müllner  <christoph.muellner@vrull.eu>

	RISC-V: Add T-Head CMO vendor extension
	T-Head has a range of vendor-specific instructions.
	Therefore it makes sense to group them into smaller chunks
	in form of vendor extensions.

	This patch adds the XTheadCmo extension, a collection of T-Head specific
	cache management operations.
	The 'th' prefix and the "XTheadCmo" extension are documented in a PR
	for the RISC-V toolchain conventions ([1]).

	In total XTheadCmo introduces the following 21 instructions:

	* DCACHE.{C,CI,I}ALL
	* DCACHE.{C,CI,I}{PA,VA,SW} rs1
	* DCACHE.C{PAL1,VAL1} rs1
	* ICACHE.I{ALL,ALLS}
	* ICACHE.I{PA,VA} rs1
	* L2CACHE.{C,CI,I}ALL

	Contrary to Zicbom, the XTheadCmo instructions don't have a constant
	displacement, therefore we have a different syntax for the arguments.
	To clarify this is intended behaviour, there is a set of negative test
	for Zicbom-style arguments in x-thead-cmo-fail.s.

	[1] https://github.com/riscv-non-isa/riscv-toolchain-conventions/pull/19

	v2:
	- Add missing DECLARE_INSN() list
	- Fix ordering

	Co-developed-by: Lifang Xia <lifang_xia@linux.alibaba.com>

2022-09-22  Christoph Müllner  <christoph.muellner@vrull.eu>

	RISC-V: Add generic support for vendor extensions
	This patch introduces changes that allow the integration of vendor ISA
	extensions:
	* Define a list of vendor extensions (riscv_supported_vendor_x_ext)
	  where vendor extensions can be added
	* Introduce a section with a table in the documentation where vendor
	  extensions can be added

	To add a vendor extension that consists of instructions only,
	the following things need to be done:
	* Add the extension to the riscv_supported_vendor_x_ext list
	* Add lookup entry in riscv_multi_subset_supports
	* Documenting the extension in c-riscv.texti
	* Add test cases for all instructions
	* Add MATCH*/MASK* constants and DECLARE_INSN() for all instructions
	* Add new instruction class to enum riscv_insn_class
	* Define the instructions in riscv_opcodes
	* Additional changes if necessary (depending on the instructions)

	Co-developed-by: Lifang Xia <lifang_xia@linux.alibaba.com>

2022-09-22  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Add all_comp_units/all_type_units views on all_units
	Add all_comp_units/all_type_units views on all_units.

	Having the views allows us to:
	- easily get the number of CUs or TUs in all_units, and
	- easily access the nth CU or TU.

	This minimizes the use of tu_stats.nr_tus.

	Tested on x86_64-linux.

2022-09-22  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Rename all_comp_units to all_units
	Mechanically rename all_comp_units to all_units:
	...
	$ sed -i 's/all_comp_units/all_units/' gdb/dwarf2/*
	...

	Tested on x86_64-linux.

2022-09-22  Yoshinori Sato  <ysato@users.sourceforge.jp>

	opcodes: SH fix bank register disassemble.
		* sh-dis.c (print_insn_sh): Enforce bit7 of LDC Rm,Rn_BANK and STC
		Rm_BANK,Rn is always 1.

2022-09-22  Tsukasa OI  <research_trasio@irq.a4lg.com>

	include: Add macro to ignore -Wunused-but-set-variable
	"-Wunused-but-set-variable" warning option can be helpful to track variables
	that are written but not read thereafter.  But it can be harmful if some of
	the code is auto-generated and we have no ways to deal with it.

	The particular example is Bison-generated code.

	The new DIAGNOSTIC_IGNORE_UNUSED_BUT_SET_VARIABLE macro can be helpful on
	such cases. A typical use of this macro is to place this macro before the
	end of user prologues on Bison (.y) files.

	include/ChangeLog:

	    * diagnostics.h (DIAGNOSTIC_IGNORE_UNUSED_BUT_SET_VARIABLE): New.

2022-09-22  Tsukasa OI  <research_trasio@irq.a4lg.com>

	include: Add macro to ignore -Wuser-defined-warnings
	User-defined warnings (on Clang, "-Wuser-defined-warnings") can be harmful
	if we have specified "-Werror" and we have no control to disable the warning
	ourself.  The particular example is Gnulib.

	Gnulib generates a warning if the system version of certain functions
	are used (to redirect the developer to use Gnulib version).  However,
	it can be harmful if we cannot easily replace them (e.g. the target is in
	the standard C++ library).

	The new DIAGNOSTIC_IGNORE_USER_DEFINED_WARNINGS macro can be helpful on such
	cases.  A typical use of this macro is to place this macro before including
	certain system headers.

	include/ChangeLog:

		* diagnostics.h (DIAGNOSTIC_IGNORE_USER_DEFINED_WARNINGS): New.

2022-09-22  Andrew Burgess  <aburgess@redhat.com>

	gdb/python: restrict the names accepted by gdb.register_window_type
	I noticed that, from Python, I could register a new TUI window that
	had whitespace in its name, like this:

	  gdb.register_window_type('my window', MyWindowType)

	however, it is not possible to then use this window in a new TUI
	layout, e.g.:

	  (gdb) tui new-layout foo my window 1 cmd 1
	  Unknown window "my"
	  (gdb) tui new-layout foo "my window" 1 cmd 1
	  Unknown window ""my"
	  (gdb) tui new-layout foo my\ window 1 cmd 1
	  Unknown window "my\"

	GDB clearly uses the whitespace to split the incoming command line.

	I could fix this by trying to add a mechanism by which we can use
	whitespace within a window name, but it seems like an easier solution
	if we just forbid whitespace within a window name.  Not only is this
	easier, but I think this is probably the better solution, identifier
	names with spaces in would mean we'd need to audit all the places a
	window name could be printed and ensure that the use of a space didn't
	make the output ambiguous.

	So, having decided to disallow whitespace, I then thought about other
	special characters.  We currently accept anything as a window name,
	and I wondered if this was a good idea.

	My concerns were about how special characters used in a window name
	might cause confusion, for example, we allow '$' in window names,
	which is maybe fine now, but what if one day we wanted to allow
	variable expansion when creating new layouts?  Or what about starting
	a window name with '-'?  We already support a '-horizontal' option,
	what if we want to add more in the future?  Or use of the special
	character '{' which has special meaning within a new layout?

	In the end I figured it might make sense to place some restrictive
	rules in place, and then relax the rules later if/when users complain,
	we can consider each relaxation as its requested.

	So, I propose that window names should match this regular expression:

	  [a-zA-Z][-_.a-zA-Z0-9]*

	There is a chance that there is user code in the wild which will break
	with the addition of this change, but hopefully adapting to the new
	restrictions shouldn't be too difficult.

2022-09-22  Bruno Larsen  <blarsen@redhat.com>

	gdb/testsuite: Add test to step through function epilogue
	The testsuite implicitly tests GDB's ability to step through epilogues
	in multiple tests, without doing it explicitly anywhere.  This is
	unfortunate, as clang does not emit epilogue information, so using clang
	on our testsuite makes many tests fail.  This patch adds a central,
	explicit test for walking through the epilogue so we can safely remove
	this from other tests and have them working with clang.

	The test created attempts to step through a simple epilogue, an
	epilogue that ends on another epilogue, and epilogues leading to other
	function calls.

2022-09-22  Bruno Larsen  <blarsen@redhat.com>

	gdb.base/skip.exp: Use finish to exit functions
	gdb.base/skip.exp was making use of a fixed number of step commands to
	exit some functions.  This caused some problems when using clang to test
	GDB, as GDB would need fewer steps to reach the desired spots.  For
	instance, when testing in the section "step after disabling 3", the log
	looks like this:

	    Breakpoint 4, main () at binutils-gdb/gdb/testsuite/gdb.base/skip.c:32
	    32        x = baz ((bar (), foo ()));
	    (gdb) step
	    bar () at binutils-gdb/gdb/testsuite/gdb.base/skip1.c:21
	    21        return 1;
	    (gdb) PASS: gdb.base/skip.exp: step after disabling 3: step 1
	    step
	    foo () at binutils-gdb/gdb/testsuite/gdb.base/skip.c:42
	    42        return 0;
	    (gdb) PASS: gdb.base/skip.exp: step after disabling 3: step 2
	    step
	    main () at binutils-gdb/gdb/testsuite/gdb.base/skip.c:34
	    34        test_skip_file_and_function ();
	    (gdb) step
	    test_skip_file_and_function () at binutils-gdb/gdb/testsuite/gdb.base/skip.c:59
	    59        test_skip ();
	    (gdb) FAIL: gdb.base/skip.exp: step after disabling 3: step 3
	    step
	    test_skip () at binutils-gdb/gdb/testsuite/gdb.base/skip.c:48
	    48      }
	    (gdb) PASS: gdb.base/skip.exp: step after disabling 3: step 4
	    step
	    test_skip_file_and_function () at binutils-gdb/gdb/testsuite/gdb.base/skip.c:60
	    60        skip1_test_skip_file_and_function ();
	    (gdb) FAIL: gdb.base/skip.exp: step after disabling 3: step 5

	This shows that the feature is working but because the inferior lands in
	a different location, it registers as a failure.  Seeing as along with
	this difference, there are also some differences that depend on gcc
	versions (where gdb might stop back at line 32 before entering foo), it
	would not be easy to test for this behavior using steps and analzing
	where the inferior stops at each point. On the other hand, using
	gdb_step_until is not feasible because we'd possibly gloss over stepping
	into baz and rendering the whole test useless.  Instead, skip.exp now
	uses finish to leave functions, synchronizing through compilers and
	compiler versions.  Some test names were also changed to be a bit more
	descriptive.  The new log looks like this, independently of compiler used:

	    Breakpoint 4, main () at binutils-gdb/gdb/testsuite/gdb.base/skip.c:32
	    32        x = baz ((bar (), foo ()));
	    (gdb) step
	    bar () at binutils-gdb/gdb/testsuite/gdb.base/skip1.c:21
	    21        return 1;
	    (gdb) PASS: gdb.base/skip.exp: step after disabling 3: step into bar
	    finish
	    Run till exit from #0  bar () at binutils-gdb/gdb/testsuite/gdb.base/skip1.c:21
	    main () at binutils-gdb/gdb/testsuite/gdb.base/skip.c:32
	    32        x = baz ((bar (), foo ()));
	    Value returned is $2 = 1
	    (gdb) PASS: gdb.base/skip.exp: step after disabling 3: return from bar
	    step
	    foo () at binutils-gdb/gdb/testsuite/gdb.base/skip.c:42
	    42        return 0;
	    (gdb) PASS: gdb.base/skip.exp: step after disabling 3: step into foo
	    finish
	    Run till exit from #0  foo () at binutils-gdb/gdb/testsuite/gdb.base/skip.c:42
	    main () at binutils-gdb/gdb/testsuite/gdb.base/skip.c:32
	    32        x = baz ((bar (), foo ()));
	    Value returned is $3 = 0
	    (gdb) PASS: gdb.base/skip.exp: step after disabling 3: Return from foo
	    step
	    34        test_skip_file_and_function ();
	    (gdb) PASS: gdb.base/skip.exp: step after disabling 3: step and skip baz

2022-09-22  Bruno Larsen  <blarsen@redhat.com>

	fix gdb.base/jit-elf.exp when testing with clang
	When using clang as the compiler for the target, gdb.base/jit-elf.exp
	was failing because the filename displayed when GDB attached to the
	inferior was only showing up as with a relative path, like so:

	       (gdb) attach 3674146
	       Attaching to program: /home/blarsen/Documents/gdb-build/gdb/testsuite/outputs/gdb.base/jit-elf/jit-elf-main, process 3674146
	       Reading symbols from /lib64/libm.so.6...
	       Reading symbols from .gnu_debugdata for /lib64/libm.so.6...
	       (No debugging symbols found in .gnu_debugdata for /lib64/libm.so.6)
	       Reading symbols from /lib64/libc.so.6...
	       (No debugging symbols found in /lib64/libc.so.6)
	       Reading symbols from /lib64/ld-linux-x86-64.so.2...
	       [Thread debugging using libthread_db enabled]
	       Using host libthread_db library "/lib64/libthread_db.so.1".
	       0x00000000004013ff in main (argc=3, argv=0x7fffffffd820) at ../../../common/git-repos/binutils-gdb/gdb/testsuite/gdb.base/jit-elf-main.c:118
	       118|  WAIT_FOR_GDB; i = 0;  /* gdb break here 1 */
	       (gdb) FAIL: gdb.base/jit-elf.exp: attach: one_jit_test-2: break here 1: attach

	While gcc's output is as follows:

	       (gdb) attach 3592961
	       Attaching to program: /home/blarsen/Documents/gdb-build/gdb/testsuite/outputs/gdb.base/jit-elf/jit-elf-main, process 3592961
	       Reading symbols from /lib64/libm.so.6...
	       Reading symbols from .gnu_debugdata for /lib64/libm.so.6...
	       (No debugging symbols found in .gnu_debugdata for /lib64/libm.so.6)
	       Reading symbols from /lib64/libc.so.6...
	       (No debugging symbols found in /lib64/libc.so.6)
	       Reading symbols from /lib64/ld-linux-x86-64.so.2...
	       [Thread debugging using libthread_db enabled]
	       Using host libthread_db library "/lib64/libthread_db.so.1".
	       main (argc=3, argv=0x7fffffffd860) at /home/blarsen/Documents/gdb-build/gdb/testsuite/../../../common/git-repos/binutils-gdb/gdb/testsuite/gdb.base/jit-elf-main.c:118
	       118|  WAIT_FOR_GDB; i = 0;  /* gdb break here 1 */
	       (gdb) PASS: gdb.base/jit-elf.exp: attach: one_jit_test-2: break here 1: attach

	This difference only happens when GDB's configure is ran using a
	relative path, but seeing as testing the full path is not important for
	this specific test, it feels worth fixing anyway.  To fix the false
	positive, the regexp for checking where gdb has stopped was relaxed a
	little to allow the relative path.

2022-09-22  Bruno Larsen  <blarsen@redhat.com>

	gdb/testsuite: fix gdb.base/msym-bp-shl when running with Clang
	When trying to test gdb.base/msym-bp-shl.exp using clang, it would have
	many failures because one of the version of the foo function was being
	optimized away. Adding __attribute__ ((used)) to it fixed this.

2022-09-22  Bruno Larsen  <blarsen@redhat.com>

	gdb/testsuite: fix testing gdb.base/skip-inline.exp with clang
	When testing gdb.base/skip-inline.exp using clang, we get failures
	when trying to step out of functions, since clang requires one fewer
	step when compared to gcc.  The inferior gets increasingly out of sync
	as the test continues because of this difference, which generates those
	failures.

	This commit fixes this by switching those hardcoded steps to
	gdb_step_until, to guarantee that the inferior is always synced to what
	the test expects.  This approach does not work for the parts that use
	step 2 or step 3, so when we identify that clang is being used, those
	tests are skipped.

2022-09-22  Bruno Larsen  <blarsen@redhat.com>

	Change gdb.base/skip-solib.exp deal with lack of epilogue information
	When running gdb.base/skip-solib.exp, the backtrace tests could fail with
	compilers that associated epilogue instructions with the last statement
	line of the function, instead of associating it with the closing brace,
	despite the feature being fully functional.  As an example, when testing
	skipping the function square, the testsuite would show

	Breakpoint 1, main () at (...)/binutils-gdb/gdb/testsuite/gdb.base/skip-solib-main.c:5
	5         return square(0);
	(gdb) step
	0x00007ffff7cef560 in __libc_start_call_main () from /lib64/libc.so.6
	(gdb) PASS: gdb.base/skip-solib.exp: ignoring solib file: step
	bt
	 #0  0x00007ffff7cef560 in __libc_start_call_main () from /lib64/libc.so.6
	 #1  0x00007ffff7cef60c in __libc_start_main_impl () from /lib64/libc.so.6
	 #2  0x0000000000401065 in _start ()
	(gdb) FAIL: gdb.base/skip-solib.exp: ignoring solib file: bt

	Which means that the feature is working, the testsuite is just
	mis-identifying it.  To avoid this problem, the skipped function calls
	have been sent to a line before `return`, so epilogues won't factor in.

2022-09-22  Bruno Larsen  <blarsen@redhat.com>

	gdb/testsuite: Add a proc to test where compiler links the epilogue
	Different compilers link the epilogue of functions to different lines.
	As an example, gcc links it to the closing brace of the function,
	whereas clang links it to the last statement of the function.  This
	difference is important for the testsuite, since the where GDB will land
	after a step can be wildly different.  Where possible, this dependency
	should be side-stepped in the testsuite, but it isn't always possible,
	so this commit adds a gdb_caching_proc that is able to detect where the
	epilogue is linked, so tests can react accordingly.

2022-09-22  Clément Chigot  <chigot@adacore.com>

	ld/testsuite: allow to force another directory for gcc linker
	Add a new variable "ld_testsuite_tmpdir" to enable manual configuration
	of the -B flag added to gcc calls. This flag ensure that gcc is invoking
	the linker and the assembler we want to test.

	When launching the testsuite outside of the build tree, the links made
	by the testsuite in tmpdir/ld will point to nothing. Thus, even with the
	PATH correctly setup towards the linker directory, gcc might end up
	falling back to its default linker. Hence this variable to ensure that
	gcc, whatever happens, is using the linker we want.

	ld/ChangeLog:

		* testsuite/config/default.exp: Allow to change -B flag with
		ld_testsuite_bindir variable.

2022-09-22  Clément Chigot  <chigot@adacore.com>

	ld/testsuite: skip bootstrap.exp when OFILES are missing
	OFILES are normally provided through an environment variable set by
	Makefiles. However, when launching the testsuite directly through
	runtest outside the build tree, it can be hard to retrieve them.
	Thus, they can be missing.
	Instead of letting tcl raise an error when trying to access this
	OFILES variable, skip bootstrap.exp if it doesn't exist.

	ld/ChangeLog:

		* testsuite/ld-bootstrap/bootstrap.exp: Skip if OFILES is
		missing

2022-09-22  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Remove "b" operand type from disassembler
	There are a few operand types not used by any RISC-V instructions.

	-   Cx
	-   Vf
	-   Ve
	-   [
	-   ]
	-   b

	But most of them has a reasoning to keep them:

	-   Cx     : Same as "Ct" except it has a constraint to have rd == rs2
		     (similar to "Cw").  Although it hasn't used, its role is clear
		     enough to implement a new instruction with this operand type.
	-   Vf, Ve : Used by vector AMO instructions (not ratified and real
		     instructions are not upstreamed yet).
	-   [, ]   : Unused tokenization symbols.  Reserving them is not harmful
		     and a vendor may use this symbol for special purposes.

	... except "b".  I could not have found any reference to this operand type
	except it works like the "s" operand type.  Historically, it seems... it's
	just unused from the beginning.  Its role is not clear either.

	On such cases, we should vacate this room for the new operand type with
	much clearer roles.

	opcodes/ChangeLog:

		* riscv-dis.c (print_insn_args): Remove 'b' operand type.

2022-09-22  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Add macro-only operands to validate_riscv_insn
	Although they are not (and should not be) reachable, following macro-only
	operands are parsed in the `validate_riscv_insn' function and ignored.
	That function also notes that they are macro-only.

	-   "A"
	-   "B"
	-   "I"

	Following this convention, this commit adds three remaining macro-only
	operands to this function.  By doing this, we could instead choose to reject
	those operands from appearing in regular instructions later.

	-   "c"   (used by call, tail and jump macros)
	-   "VM"  (used by vmsge.vx and vmsgeu.vx macros)
	-   "VT"  (likewise)

	gas/ChangeLog:

		* config/tc-riscv.c (validate_riscv_insn): Add "c", "VM" and "VT"
		macro-only operand types.

2022-09-22  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: fix -Wduplicated-cond warning
	gprofng/ChangeLog
	2022-09-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		* src/collctrl.cc: Fix -Wduplicated-cond warning.

2022-09-22  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-21  Alan Modra  <amodra@gmail.com>

	bfd BLD-POTFILES.in dependencies
	A file that consists of a list of files doesn't depend on those files
	being built.  This patch came from trying to avoid a maintainer-mode
	make -j bug, where the recipe for targmatch.h was being run twice in
	parallel.  Typical output shown below.

	make[2]: Entering directory '/build/gas/all/bfd'
	  GEN      bfdver.h
	  GEN      elf32-target.h
	  GEN      elf64-target.h
	  GEN      targmatch.h
	Making info in po
	make[3]: Entering directory '/build/gas/all/bfd/po'
	cd .. && make po/SRC-POTFILES.in
	cd .. && make po/BLD-POTFILES.in
	make[4]: Entering directory '/build/gas/all/bfd'
	  GEN      elf32-aarch64.c
	  GEN      elf64-aarch64.c
	  GEN      elf32-ia64.c
	  GEN      elf64-ia64.c
	  GEN      elf32-loongarch.c
	  GEN      elf64-loongarch.c
	  GEN      elf32-riscv.c
	  GEN      elf64-riscv.c
	  GEN      peigen.c
	  GEN      pepigen.c
	  GEN      pex64igen.c
	  GEN      pe-aarch64igen.c
	  GEN      targmatch.h
	make[4]: Entering directory '/build/gas/all/bfd'
	  CCLD     doc/chew.stamp
	mv: cannot stat 'targmatch.new': No such file or directory
	make[4]: *** [Makefile:2325: targmatch.h] Error 1

		* Makefile.am (po/BLD-POTFILES.in): Don't depend on $(BLD_POTFILES).
		(po/SRC-POTFILES.in): Don't depend on $(SRC_POTFILES).

2022-09-21  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbsupport: move fileio_errno_to_host to fileio.{h,cc} and rename
	gdb_bfd.c and remote.c contain identical implementations of a
	fileio_error -> errno function.  Factor that out to
	gdbsupport/fileio.{h,cc}.

	Rename it fileio_error_to_host, for symmetry with host_to_fileio_error.

	Change-Id: Ib9b8807683de2f809c94a5303e708acc2251a0df

2022-09-21  Simon Marchi  <simon.marchi@efficios.com>

	gdbsupport: convert FILEIO_* macros to an enum
	Converting from free-form macros to an enum gives a bit of type-safety.
	This caught places where we would assign host error numbers to what
	should contain a target fileio error number, for instance in
	target_fileio_pread.

	I added the FILEIO_SUCCESS enumerator, because
	remote.c:remote_hostio_parse_result initializes the remote_errno output
	variable to 0.  It seems better to have an explicit enumerator than to
	assign a value for which there is no enumerator.  I considered
	initializing this variable to FILEIO_EUNKNOWN instead, such that if the
	remote side replies with an error and omits the errno value, we'll get
	an errno that represents an error instead of 0 (which reprensents no
	error).  But it's not clear what the consequences of that change would
	be, so I prefer to err on the side of caution and just keep the existing
	behavior (there is no intended change in behavior with this patch).

	Note that remote_hostio_parse_resul still reads blindly what the remote
	side sends as a target errno into this variable, so we can still end up
	with a nonsensical value here.  It's not good, but out of the scope of
	this patch.

	Convert host_to_fileio_error and fileio_errno_to_host to return / accept
	a fileio_error instead of an int, and cascade the change in the whole
	chain that uses that.

	Change-Id: I454b0e3fcf0732447bc872252fa8e57d138b0e03

2022-09-21  Simon Marchi  <simon.marchi@efficios.com>

	gdbsupport: move include/gdb/fileio.h contents to fileio.h
	I don't see why include/gdb/fileio.h is placed there.  It's not
	installed by "make install", and it's not included by anything outside
	of gdb/gdbserver/gdbsupport.

	Move its content back to gdbsupport/fileio.h.  I have omitted the bits
	inside an `#if 0`, since it's obviously not used, as well as the
	"limits" constants, which are also unused.

	Change-Id: I6fbc2ea10fbe4cfcf15f9f76006b31b99c20e5a9

2022-09-21  Simon Marchi  <simon.marchi@efficios.com>

	gdbsupport: change path_join parameter to array_view<const char *>
	When a GDB built with -D_GLIBCXX_DEBUG=1 reads a binary with a single
	character name, we hit this assertion failure:

	    $ ./gdb -q --data-directory=data-directory -nx ./x
	    /usr/include/c++/12.1.0/string_view:239: constexpr const std::basic_string_view<_CharT, _Traits>::value_type& std::basic_string_view<_CharT, _Traits>::operator[](size_type) const [with _CharT = char; _Traits = std::char_traits<char>; const_reference = const char&; size_type = long unsigned int]: Assertion '__pos < this->_M_len' failed.

	The backtrace:

	    #3  0x00007ffff6c0f002 in std::__glibcxx_assert_fail (file=<optimized out>, line=<optimized out>, function=<optimized out>, condition=<optimized out>) at /usr/src/debug/gcc/libstdc++-v3/src/c++11/debug.cc:60
	    #4  0x000055555da8a864 in std::basic_string_view<char, std::char_traits<char> >::operator[] (this=0x7fffffffcc30, __pos=1) at /usr/include/c++/12.1.0/string_view:239
	    #5  0x00005555609dcb88 in path_join[abi:cxx11](gdb::array_view<std::basic_string_view<char, std::char_traits<char> > const>) (paths=...) at /home/simark/src/binutils-gdb/gdbsupport/pathstuff.cc:203
	    #6  0x000055555e0443f4 in path_join<char const*, char const*> () at /home/simark/src/binutils-gdb/gdb/../gdbsupport/pathstuff.h:84
	    #7  0x00005555609dc336 in gdb_realpath_keepfile[abi:cxx11](char const*) (filename=0x6060000a8d40 "/home/simark/build/binutils-gdb-one-target/gdb/./x") at /home/simark/src/binutils-gdb/gdbsupport/pathstuff.cc:122
	    #8  0x000055555ebd2794 in exec_file_attach (filename=0x7fffffffe0f9 "./x", from_tty=1) at /home/simark/src/binutils-gdb/gdb/exec.c:471
	    #9  0x000055555f2b3fb0 in catch_command_errors (command=0x55555ebd1ab6 <exec_file_attach(char const*, int)>, arg=0x7fffffffe0f9 "./x", from_tty=1, do_bp_actions=false) at /home/simark/src/binutils-gdb/gdb/main.c:513
	    #10 0x000055555f2b7e11 in captured_main_1 (context=0x7fffffffdb60) at /home/simark/src/binutils-gdb/gdb/main.c:1209
	    #11 0x000055555f2b9144 in captured_main (data=0x7fffffffdb60) at /home/simark/src/binutils-gdb/gdb/main.c:1319
	    #12 0x000055555f2b9226 in gdb_main (args=0x7fffffffdb60) at /home/simark/src/binutils-gdb/gdb/main.c:1344
	    #13 0x000055555d938c5e in main (argc=5, argv=0x7fffffffdcf8) at /home/simark/src/binutils-gdb/gdb/gdb.c:32

	The problem is this line in path_join:

	    gdb_assert (strlen (path) == 0 || !IS_ABSOLUTE_PATH (path));

	... where `path` is "x".  IS_ABSOLUTE_PATH eventually calls
	HAS_DRIVE_SPEC_1:

	    #define HAS_DRIVE_SPEC_1(dos_based, f)                  \
	      ((f)[0] && ((f)[1] == ':') && (dos_based))

	This macro accesses indices 0 and 1 of the input string.  However, `f`
	is a string_view of length 1, so it's incorrect to try to access index
	1.  We know that the string_view's underlying object is a null-terminated
	string, so in practice there's no harm.  But as far as the string_view
	is concerned, index 1 is considered out of bounds.

	This patch makes the easy fix, that is to change the path_join parameter
	from a vector of to a vector of `const char *`.  Another solution would
	be to introduce a non-standard gdb::cstring_view class, which would be a
	view over a null-terminated string.  With that class, it would be
	correct to access index 1, it would yield the NUL character.  If there
	is interest in having this class (it has been mentioned a few times in
	the past) I can do it and use it here.

	This was found by running tests such as gdb.ada/arrayidx.exp, which
	produce 1-char long filenames, so adding a new test is not necessary.

	Change-Id: Ia41a16c7243614636b18754fd98a41860756f7af

2022-09-21  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove TYPE_LENGTH
	Remove the macro, replace all uses with calls to type::length.

	Change-Id: Ib9bdc954576860b21190886534c99103d6a47afb

2022-09-21  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: add type::length / type::set_length
	Add the `length` and `set_length` methods on `struct type`, in order to remove
	the `TYPE_LENGTH` macro.  In this patch, the macro is changed to use the
	getter, so all the call sites of the macro that are used as a setter are
	changed to use the setter method directly.  The next patch will remove the
	macro completely.

	Change-Id: Id1090244f15c9856969b9be5006aefe8d8897ca4

2022-09-21  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove TYPE_TARGET_TYPE
	Remove the macro, replace all uses by calls to type::target_type.

	Change-Id: Ie51d3e1e22f94130176d6abd723255282bb6d1ed

2022-09-21  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: add type::target_type / type::set_target_type
	Add the `target_type` and `set_target_type` methods on `struct type`, in order
	to remove the `TYPE_TARGET_TYPE` macro.  In this patch, the macro is changed to
	use the getter, so all the call sites of the macro that are used as a setter
	are changed to use the setter method directly.  The next patch will remove the
	macro completely.

	Change-Id: I85ce24d847763badd34fdee3e14b8c8c14cb3161

2022-09-21  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Fix riscv_set_tso declaration
	To avoid -Werror=strict-prototypes, this commit changes () to (void).
	This is because "()" possibly means a function prototype with indeterminate
	arguments on old C standards.

	gas/ChangeLog:

		* config/tc-riscv.c (riscv_set_tso): Fix declaration.

2022-09-21  Alan Modra  <amodra@gmail.com>

	PR29566, objdump -p considers an empty .gnu.version_r invalid
	Allow and ignore an empty section.

		PR 29566
		* elf.c (bfd_section_from_shdr): Don't set elf_dynverdef or
		elf_dynverref for empty sections.
		(_bfd_elf_slurp_version_tables): Remove now redundant tests.

2022-09-21  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Set EF_RISCV_TSO also on .option arch
	This is a minor fix to commit 96462b012988d35ebb1137a2ad9fd0a96547d79a
	("RISC-V: Implement Ztso extension").  Currently, it sets EF_RISCV_TSO ELF
	flag when initial ISA string contains the 'Ztso' extension.  However, GAS
	has a way to update the ISA string: ".option arch".

	When the architecture is updated by ".option arch", EF_RISCV_RVC ELF flag
	is set when the 'C' extension is detected.  Analogously, this commit sets
	the EF_RISCV_TSO when the 'Ztso' extension is detected.

	gas/ChangeLog:

		* config/tc-riscv.c (s_riscv_option): Set TSO ELF flag if the
		'Ztso' extension is specified via ".option arch" directive.

2022-09-21  Alan Modra  <amodra@gmail.com>

	PR29573, addr2line doesn't display file/line for local symbols
	The DWARF standard is clear that DW_AT_linkage_name is optional.
	Compilers may not provide the attribute on functions and variables,
	even though the language mangles names.  g++ does not for local
	variables and functions.  Without DW_AT_linkage_name, mangled object
	file symbols can't be directly matched against the source-level
	DW_AT_name in DWARF info.  One possibility is demangling the object
	file symbols, but that comes with its own set of problems:
	1) A demangler might not be available for the compiler/language.
	2) Demangling doesn't give the source function name as stored in
	   DW_AT_name.  Class and template parameters must be stripped at
	   least.

	So this patch takes a simpler approach.  A symbol matches DWARF info
	if the DWARF address matches the symbol address, and if the symbol
	name contains the DWARF name as a sub-string.  Very likely the name
	matching is entirely superfluous.

		PR 29573
		* dwarf.c (lookup_symbol_in_function_table): Match a symbol
		containing the DWARF source name as a substring.
		(lookup_symbol_in_variable_table): Likewise.
		(_bfd_dwarf2_find_nearest_line_with_alt): If stash_find_line_fast
		returns false, fall back to comp_unit_find_line.

2022-09-21  Alan Modra  <amodra@gmail.com>

	dwarf2.c: simplify best_fit_len tests
		* dwarf2.c (lookup_address_in_function_table): Simplify
		best_fit_len test.
		(info_hash_lookup_funcinfo): Likewise.
		(lookup_symbol_in_function_table): Likewise, also reorder tests
		and check "file" is set.
		(lookup_symbol_in_variable_table): Reorder tests.

2022-09-21  Alan Modra  <amodra@gmail.com>

	dwarf2.c: mangle_style
	non_mangled incorrectly returned "true" for Ada.  Correct that, and
	add a few more non-mangled entries.  Return a value suitable for
	passing to cplus_demangle to control demangling.

		* dwarf2.c: Include demangle.h.
		(mangle_style): Rename from non_mangled.  Return DMGL_* value
		to suit lang.  Adjust all callers.

2022-09-21  Alan Modra  <amodra@gmail.com>

	dwarf2.c remove varinfo and funcinfo sec field
	The "sec" field in these structures is only set and used in lookup
	functions.  It always starts off as NULL.  So the only possible effect
	of the field is to modify the return of the lookup, which was its
	purpose back in 2005 when HJ fixed PR990.  Since then we solved the
	problem of relocatable object files with the fix for PR2338, so this
	field is now redundant.

		* dwarf.c (struct funcinfo, struct varinfo): Remove "sec" field.
		(lookup_symbol_in_function_table): Don't set or test "sec".
		(lookup_symbol_in_variable_table): Likewise.
		(info_hash_lookup_funcinfo, info_hash_lookup_varinfo): Likewise.

2022-09-21  Tsukasa OI  <research_trasio@irq.a4lg.com>

	configure: Pass CPPFLAGS_FOR_BUILD to subdirs
	Because CPPFLAGS_FOR_BUILD is used in some subdirectories (through
	bfd/warning.m4), not AC_SUBSTing the variable causes minor issues.

	Fortunately, it didn't cause severe errors but error messages related to
	@CPPFLAGS_FOR_BUILD@ (not AC_SUBSTed CPPFLAGS_FOR_BUILD variable passed
	to subdirectories through Makefile) remain in config.log.

	To avoid invalid invocation of preprocessor for build environment, we
	need to set proper CPPFLAGS_FOR_BUILD (may be empty) and pass it to
	subdirectories that need it.  This is what this commit does.

	ChangeLog:

		* configure.ac: Pass CPPFLAGS_FOR_BUILD to subdirectories.
		* configure: Regenerate.

2022-09-21  Shihua  <shihua@iscas.ac.cn>

	RISC-V: Implement Ztso extension
	This patch support ZTSO extension. It will turn on the tso flag for elf_flags
	once we have enabled Ztso extension.  This is intended to implement v0.1 of
	the proposed specification which can be found in Chapter 25 of,
	https://github.com/riscv/riscv-isa-manual/releases/download/draft-20220723-10eea63/riscv-spec.pdf.

	bfd\ChangeLog:

	        * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Set TSO flag.
	        * elfxx-riscv.c: Add Ztso's arch.

	binutils\ChangeLog:

	        * readelf.c (get_machine_flags): Set TSO flag.

	gas\ChangeLog:

	        * config/tc-riscv.c (riscv_set_tso): Ditto.
	        (riscv_set_arch): Ditto.
	        * testsuite/gas/riscv/ztso.d: New test.

	include\ChangeLog:

	        * elf/riscv.h (EF_RISCV_TSO): Ditto.

2022-09-21  Nelson Chu  <nelson@rivosinc.com>

	RISC-V: Always generate R_RISCV_CALL_PLT reloc for call in assembler.
	Since we have the same behaviors of CALL and CALL_PLT relocs in linker for now,
	https://github.com/bminor/binutils-gdb/commit/3b1450b38c644f99aa2e211747b428b9f8d15cca

	And the psabi already deprecate the CALL reloc,
	https://github.com/riscv-non-isa/riscv-elf-psabi-doc/commit/a0dced85018d7a0ec17023c9389cbd70b1dbc1b0

	Therefore, we should always generate R_RISCV_CALL_PLT reloc for call, even if
	it has @plt postfix.  I believe LLVM (https://reviews.llvm.org/D132530) already
	support this, so GNU as should do the same thing.

	gas/
		* config/tc-riscv.c (riscv_ip): Always generate CALL_PLT reloc for
		call, even if it has @plt postfix.
		* testsuite/gas/riscv/no-relax-reloc.d: Updated CALL to CALL_PLT.
		* testsuite/gas/riscv/relax-reloc.d: Likewise.
	ld/
		* testsuite/ld-riscv-elf/variant_cc-r.d: Updated CALL to CALL_PLT.

2022-09-21  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-21  Alan Modra  <amodra@gmail.com>

	Re: PowerPC64 pcrel got relocs against local symbols
	The last patch wasn't all that shiny.  There are rather a lot more
	relocations that can hit the assertion in md_apply_fix if the symbol
	is local or absolute.  Fix them all.

		* config/tc-ppc.c (ppc_force_relocation): Add all relocs that
		expect a symbol in md_apply_fix.  Remove tls pcrel relocs
		already covered in general tls match range.

2022-09-21  Alan Modra  <amodra@gmail.com>

	looping in alpha_vms_slurp_relocs
	The direct cause for the looping was failing to test for error return
	from _bfd_vms_get_object_record inside a while(1) loop.  Fix that.
	Also record status of first alpha_vms_slurp_relocs call and return
	that for all subsequent calls.  (The object format has one set of
	relocation records for all sections.)  If the first call fails, all
	others should too.

		* vms-alpha.c (struct vms_private_data_struct): Make reloc_done
		a tri-state int.
		(alpha_vms_slurp_relocs): Set reloc_done to 1 on success, -1 on
		failure.  Return that status on subsequent calls.  Check
		_bfd_vms_get_object_record return status.
		(alpha_vms_get_reloc_upper_bound): Return status from
		alpha_vms_slurp_relocs.
		(alpha_vms_write_exec): Exclude sections with contents NULL due
		to previous errors from layout, and don't try to write them.

2022-09-20  Dmitry Selyutin  <ghostmansd@gmail.com>

	ppc/svp64: test setvl ms operand

2022-09-20  Tom Tromey  <tom@tromey.com>

	Make stdin_event_handler static
	I noticed that stdin_event_handler is only used in event-top.c, so
	this patch changes it to be 'static'.

2022-09-20  Tom Tromey  <tromey@adacore.com>

	Constify some target_so_ops instances
	This changes some target_so_ops instances to be const.  This makes
	their use a little more obvious (they can't be mutated) and also
	allows for the removal of some initialization code.

	Move solib_ops into gdbarch
	This changs solib_ops to be an ordinary gdbarch value and updates all
	the uses.  This removes a longstanding FIXME and makes the code
	somewhat cleaner as well.

	Remove current_target_so_ops
	current_target_so_ops is only set in a single place.  It seems better
	to simply remove it.

2022-09-20  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: add a debuginfod-support.exp helper library
	We currently have a single test for GDB's debuginfod support, this is
	gdb.debuginfod/fetch_src_and_symbols.exp, this script does all the
	setup, starts debuginfod, and then does the testing.

	This commit tries to split the existing script in two, there is a new
	library lib/debuginfod-support.exp, which contains a helper functions
	related to running debuginfod tests.  All the code in the new library
	is basically copied from the existing test case (which is why I
	retained the copyright date range on the new library), with some minor
	adjustments to try and make the code a little more generic.

	One change I made, for example, is the library offers functions to
	shut down debuginfod, previously we just relied on expect shutting
	down debuginfod when dejagnu completed.

	The existing test script is updated to make use of the new library
	code, and this test is still passing for me.  The only change in the
	test results is a single test where I changed the name to remove the
	port number from the test name - the port number can change from run
	to run, so could make it hard to compare test results.

	I have also done a little light house keeping on the original test
	script, updating and adding new comments, and making use of
	proc_with_prefix in a couple of places.

2022-09-20  liuzhensong  <liuzhensong@loongson.cn>

	LoongArch: Set macro SUB_SEGMENT_ALIGN to 0.

2022-09-20  Nick Clifton  <nickc@redhat.com>

	Stop strip from complaining about empty note sections when stripping a binary for a second time.
		* objcopy.c (copy_object): Do not issue a warning message when
		encountering empty .gnu.build.attribute sections.

	New Serbian translations for various binutils sub-directories.

2022-09-20  Zeke Lu  <lvzecai@gmail.com>

	Bug 29580 - typo in warning message: .note.gnu.build-id data size is too bug

2022-09-20  Xi Ruoyao  <xry111@xry111.site>

	LoongArch: Fix R_LARCH_IRELATIVE insertion after elf_link_sort_relocs
	loongarch_elf_finish_dynamic_symbol is called after elf_link_sort_relocs
	if -z combreloc.  elf_link_sort_relocs redistributes the contents of
	.rela.* sections those would be merged into .rela.dyn, so the slot for
	R_LARCH_IRELATIVE may be out of relplt->contents now.

	To make things worse, the boundary check

	    dyn < dyn + relplt->size / sizeof (*dyn)

	is obviously wrong ("x + 10 < x"? :), causing the issue undetected
	during the linking process and the resulted executable suddenly crashes
	at runtime.

	The issue was found during an attempt to add static-pie support to the
	toolchain.

	Fix it by iterating through the inputs of .rela.dyn to find the slot.

2022-09-20  Xi Ruoyao  <xry111@xry111.site>

	LoongArch: Don't write into GOT for local ifunc
	Local ifuncs are always resolved at runtime via R_LARCH_IRELATIVE, so
	there is no need to write anything into GOT.  And when we write the GOT
	we actually trigger a heap-buffer-overflow: If a and b are different
	sections, we cannot access something in b with "a->contents + (offset
	from a)" because "a->contents" and "b->contents" are heap buffers
	allocated separately, not slices of a large buffer.

	So stop writing into GOT for local ifunc now.

2022-09-20  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: build documentation only if BUILD_MAN is true
	gprofng/ChangeLog
	2022-09-16  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		PR gprofng/29476
		* gprofng/Makefile.am: Build documentation only if BUILD_MAN is true
		* gprofng/Makefile.in: Rebuild.
		* gprofng/configure: Rebuild.

2022-09-19  Enze Li  <enze.li@hotmail.com>

	gdb: add ATTRIBUTE_PRINTF to gdb_bfd_error_handler
	I see this error when building with clang,

	  CXX    gdb_bfd.o
	gdb_bfd.c:1180:43: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
	  const std::string str = string_vprintf (fmt, ap_copy);
	                                          ^~~
	1 error generated.

	This patch adds missing ATTRIBUTE_PRINTF to fix the error.

	Tested on x86_64-linux with gcc 12 and clang 14.

2022-09-19  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-18  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-17  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Fix "file index out of range" complaint
	With the test-case included in this commit, we run into this FAIL:
	...
	(gdb) p var^M
	During symbol reading: file index out of range^M
	$1 = 0^M
	(gdb) FAIL: gdb.dwarf2/dw2-no-code-cu.exp: p var with no complaints
	...

	This is a regression since commit 6d263fe46e0 ("Avoid bad breakpoints with
	--gc-sections"), which contains this change in read_file_scope:
	...
	-  handle_DW_AT_stmt_list (die, cu, fnd, lowpc);
	+  if (lowpc != highpc)
	+    handle_DW_AT_stmt_list (die, cu, fnd, lowpc);
	...

	The change intends to avoid a problem with a check in
	lnp_state_machine::check_line_address, but also prevents the file and dir
	tables from being read, which causes the complaint.

	Fix the FAIL by reducing the scope of the "lowpc != highpc" condition to the
	call to dwarf_decode_lines in handle_DW_AT_stmt_list.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29561

2022-09-17  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-17  Kevin Buettner  <kevinb@redhat.com>

	BFD error message suppression test case
	This commit adds a GDB test case which tests GDB's BFD error handler
	hook for suppressing output of all but the first identical messages.

	See the comment at the beginning of bfd-errors.exp for details about
	this new test.

	I've tested this test for both 32- and 64-bit ELF files and also
	on both little endian and big endian machines.  It also works for
	both native and remote targets.  The only major restriction is that
	it only works for ELF targets.

2022-09-17  Kevin Buettner  <kevinb@redhat.com>

	Suppress printing of superfluous BFD error messages
	This commit adds a hook to the BFD error handler for suppressing
	identical messages which have been output once already.

	It's motivated by this Fedora bug...

	https://bugzilla.redhat.com/show_bug.cgi?id=2083315

	...in which over 900,000 BFD error messages are output when attaching
	to firefox.  From the bug report, the messages all say:

	BFD: /usr/lib/debug/usr/lib64/firefox/libxul.so-100.0-2.fc35.x86_64.debug: attempt to load strings from a non-string section (number 38)

	Since there's no (additional) context which might assist the user in
	determining what's wrong, there's really no point in outputting more
	than one message.  Of course, if BFD should output some
	other/different message, it should be output too, but all future
	messages identical to those already output should be suppressed.

	For the firefox problem, it turned out that there were only 37
	sections, but something was referring to section #38.  I haven't
	investigated further to find out how this came to be.

	Despite this problem, useful debugging might still be done, especially
	if the user doesn't care about debugging the problematic library.

	If it turns out that knowing the quantity of messages might be useful,
	I've implemented the suppression mechanism by keeping a count of each
	identical message.  A new GDB command, perhaps a 'maintenance'
	command, could be added to print out each message along with the
	count.  I haven't implemented this though because I'm not convinced of
	its utility.  Also, the BFD message printer has support for BFD-
	specific format specifiers.  The BFD message strings that GDB stores
	in its map are sufficient for distinguishing messages from each
	other, but are not identical to those output by BFD's default error
	handler.  So, that problem would need to be solved too.

2022-09-16  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Handle named DW_TAG_unspecified_type DIE
	With the test-case included in the patch, we run into:
	...
	(gdb) info types -q std::nullptr_t^M
	During symbol reading: unsupported tag: 'DW_TAG_unspecified_type'^M
	^M
	File /usr/include/c++/7/x86_64-suse-linux/bits/c++config.h:^M
	2198:   typedef decltype(nullptr) std::nullptr_t;^M
	(gdb) FAIL: gdb.dwarf2/nullptr_t.exp: info types -q std::nullptr_t \
	  without complaint
	...

	Fix the complaint by handling DW_TAG_unspecified_type in new_symbol, and verify
	in the test-case using "maint print symbols" that the symbol exists.

	Tested on x86_64-linux, with gcc 7.5.0 and clang 13.0.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=17271

2022-09-16  Tom de Vries  <tdevries@suse.de>

	[gdb/tdep] Fix PowerPC IEEE 128-bit format arg passing
	On a powerpc system with gcc 12 built to default to 128-bit IEEE long double,
	I run into:
	...
	(gdb) print find_max_long_double_real(4, ldc1, ldc2, ldc3, ldc4)^M
	$8 = 0 + 0i^M
	(gdb) FAIL: gdb.base/varargs.exp: print \
	  find_max_long_double_real(4, ldc1, ldc2, ldc3, ldc4)
	...

	This is due to incorrect handling of the argument in ppc64_sysv_abi_push_param.

	Fix this and similar cases, and expand the test-case to test handling of
	homogeneous aggregates.

	Tested on ppc64le-linux, power 10.

	Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com>
	Tested-by: Carl Love <cel@us.ibm.com>
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29543

2022-09-16  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.dwarf2/dw2-dir-file-name.exp for aarch64
	[ Another attempt at fixing the problem described in commit cd919f5533c
	("[gdb/testsuite] Fix gdb.dwarf2/dw2-dir-file-name.exp"). ]

	When running the test-case gdb.dwarf2/dw2-dir-file-name.exp with
	aarch64-linux, we run into:
	...
	(gdb) continue^M
	Continuing.^M
	^M
	Breakpoint 2, compdir_missing__ldir_missing__file_basename () at \
	  tmp-dw2-dir-file-name.c:999^M
	(gdb) FAIL: gdb.dwarf2/dw2-dir-file-name.exp: \
	  compdir_missing__ldir_missing__file_basename: continue to breakpoint: \
	  compdir_missing__ldir_missing__file_basename
	...

	The breakpoint set at compdir_missing__ldir_missing__file_basename_label,
	address 0x400608 starts at a line entry:
	...
	CU: tmp-dw2-dir-file-name.c:
	File name                    Line number    Starting address    View    Stmt
	tmp-dw2-dir-file-name.c              999            0x400608               x
	tmp-dw2-dir-file-name.c             1000            0x40062c               x
	tmp-dw2-dir-file-name.c                -            0x40062c
	...
	and therefore the breakpoint is printed without instruction address.

	In contrast, for x86_64-linux, we have the breakpoint printed with instruction
	address:
	...
	(gdb) continue^M
	Continuing.^M
	^M
	Breakpoint 2, 0x004004c1 in compdir_missing__ldir_missing__file_basename () \
	  at tmp-dw2-dir-file-name.c:999^M
	(gdb) PASS: gdb.dwarf2/dw2-dir-file-name.exp: \
	  compdir_missing__ldir_missing__file_basename: continue to breakpoint: \
	  compdir_missing__ldir_missing__file_basename
	...

	The breakpoint set at compdir_missing__ldir_missing__file_basename_label,
	address 0x004004c1 doesn't start at a line entry:
	...
	CU: tmp-dw2-dir-file-name.c:
	File name                    Line number    Starting address    View    Stmt
	tmp-dw2-dir-file-name.c              999            0x4004bd               x
	tmp-dw2-dir-file-name.c             1000            0x4004d3               x
	tmp-dw2-dir-file-name.c                -            0x4004d3
	...

	Fix this by:
	- unifying behaviour between the archs by adding an explicit line number entry
	  for the address compdir_missing__ldir_missing__file_basename_label, making
	  the FAIL reproducible on x86_64-linux.
	- expecting the breakpoint to be printed without instruction address.

	Tested on x86_64-linux and aarch64-linux.

2022-09-16  Tom de Vries  <tdevries@suse.de>

	[gdb] Handle pending ^C after rl_callback_read_char
	In completion tests in various test-cases, we've been running into these
	"clearing input line" timeouts:
	...
	(gdb) $cmd^GPASS: gdb.gdb/unittest.exp: tab complete "$cmd"
	FAIL: gdb.gdb/unittest.exp: tab complete "$cmd" (clearing input line) (timeout)
	...
	where $cmd == "maintenance selftest name_that_does_not_exist".

	AFAIU, the following scenario happens:
	- expect sends "$cmd\t"
	- gdb detects the stdin event, and calls rl_callback_read_char until it
	  comes to handle \t
	- readline interprets the \t as completion, tries to complete, fails to do so,
	  outputs a bell (^G)
	- expect sees the bell, and proceeds to send ^C
	- readline is still in the call to rl_callback_read_char, and stores the
	  signal in _rl_caught_signal
	- readline returns from the call to rl_callback_read_char, without having
	  handled _rl_caught_signal
	- gdb goes to wait for the next event
	- expect times out waiting for "Quit", the expected reaction for ^C

	Fix this by handling pending signals after each call to rl_callback_read_char.

	The fix is only available for readline 8.x, if --with-system-readline provides
	an older version, then the fix is disabled due to missing function
	rl_check_signals.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=27813

2022-09-16  Alan Modra  <amodra@gmail.com>

	PowerPC64 pcrel got relocs against local symbols
	Not that anyone would want to indirect via the GOT when an address can
	be loaded directly with pla, the following:

	 pld 3,x@got@pcrel
	x:

	leads to "Internal error in md_apply_fix", because the generic parts
	of assembler fixup handling convert the fx_pcrel fixup to one without
	a symbol.  Stop that happening.

		* config/tc-ppc.c (ppc_force_relocation): Add PLT_PCREL34 and
		assorted GOT_PCREL34 relocs.

2022-09-16  Alan Modra  <amodra@gmail.com>

	pdb sanity check block_size
		* pdb.c (pdb_get_elt_at_index): Only allow block_size to be
		512, 1024, 2048, or 4096.

2022-09-16  Nelson Chu  <nelson@rivosinc.com>

	RISC-V: Make g imply zmmul extension.
	bfd/
		* elfxx-riscv.c (riscv_implicit_subset): Moved entry of m after g,
		so that g can imply zmmul.
	gas/
		* testsuite/gas/riscv/attribute-01.d: Updated.
		* testsuite/gas/riscv/attribute-02.d: Likewise.
		* testsuite/gas/riscv/attribute-03.d: Likewise.
		* testsuite/gas/riscv/attribute-04.d: Likewise.
		* testsuite/gas/riscv/attribute-05.d: Likewise.
		* testsuite/gas/riscv/attribute-10.d: Likewise.
		* testsuite/gas/riscv/march-imply-g.d: Likewise.
		* testsuite/gas/riscv/march-imply-unsupported.d: Likewise.

2022-09-16  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-15  Tsukasa OI  <research_trasio@irq.a4lg.com>

	bfd, binutils, gas: Remove/mark unused variables
	Clang generates a warning on unused (technically, written but not read
	thereafter) variables.  By the default configuration (with "-Werror"), it
	causes a build failure (unless "--disable-werror" is specified).

	This commit adds ATTRIBUTE_UNUSED attribute to some of them, which means
	they are *possibly* unused (can be used but no warnings occur when
	unused) and removes others.

	bfd/ChangeLog:

		* elf32-lm32.c (lm32_elf_size_dynamic_sections): Mark unused
		rgot_count variable.
		* elf32-nds32.c (elf32_nds32_unify_relax_group): Remove unused
		count variable.
		* mmo.c (mmo_scan): Mark unused lineno variable.

	binutils/ChangeLog:

		* windmc.c (write_rc): Remove unused i variable.

	gas/ChangeLog:

		* config/tc-riscv.c (riscv_ip): Remove unused argnum variable.

	ld/ChangeLog:

		* pe-dll.c (generate_reloc): Remove unused bi and page_count
		variables.

2022-09-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: fix build issues on musl
	gprofng/ChangeLog
	2022-09-14  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		PR gprofng/29477
		* configure.ac: Set __MUSL_LIBC.
		* configure: Rebuild.
		* common/config.h.in: Rebuild.
		* src/collector_module.h: Fix compiler errors because mmap64, open64,
		pwrite64 are macros and getcontext() is absent on musl.
		* libcollector/collector.c: Likewise.
		* libcollector/hwprofile.c: Likewise.
		* libcollector/iolib.c: Likewise.
		* libcollector/libcol_util.c: Likewise.
		* libcollector/linetrace.c: Likewise.
		* libcollector/memmgr.c: Likewise.
		* libcollector/profile.c: Likewise.
		* libcollector/unwind.c: Likewise.
		* libcollector/dispatcher.c: Likewise.
		* src/Experiment.cc: Likewise.
		* libcollector/collector.h: Use dlsym() because dlvsym() is not defined
		on musl.
		* libcollector/iotrace.c: Remove interposition of versioned functions.
		* libcollector/mmaptrace.c: Likewise.
		* libcollector/libcol_util.h: Fix -Wint-to-pointer-cast warnings.
		* libcollector/jprofile.c: Likewise.
		* libcollector/synctrace.c: Include "collector.h".
		* src/Print.cc: Use get_basename() because basename() is not defined
		on musl.
		* common/hwcdrv.c: Fix -Wformat= warnings.

2022-09-15  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-14  Rupesh Potharla  <Rupesh.Potharla@amd.com>

	Binutils: Readelf testcase failing with clang
		* testsuite/binutils-all/readelf.exp (readelf_wi_test): Extend
		regexps to allow for output genreated by the Clang compiler.

2022-09-14  Alan Modra  <amodra@gmail.com>

	looping in bfd_mach_o_fat_openr_next_archived_file
	mach-o.c doesn't sanity check mach-o-fat archives, making it easy for
	fuzzers to create an archive with mach_o_fat_archentry headers that
	point to the same offset.  bfd_mach_o_fat_openr_next_archived_file
	uses the previous element offset to find its header, and thus the next
	element.  If two offsets are the same, any tool reading the archive
	will get stuck.  This patch rejects such archives, and any with
	overlapping elements.

		* mach-o.c (overlap_previous): New function.
		(bfd_mach_o_fat_archive_p): Sanity check that elements do not
		overlap each other or the file and archive headers.

2022-09-14  Alan Modra  <amodra@gmail.com>

	regen pofiles

2022-09-14  Tsukasa OI  <research_trasio@irq.a4lg.com>

	bfd: Stop using -Wstack-usage=262144 when built with Clang
	Some components of GNU Binutils will pass "-Wstack-usage=262144" when
	"GCC >= 5.0" is detected.  However, Clang does not support "-Wstack-usage",
	despite that related configuration part in bfd/warning.m4 handles the latest
	Clang (15.0.0 as of this writing) as "GCC >= 5.0".

	The option "-Wstack-usage" was ignored when the first version of Clang is
	released but even this "ignoring" behavior is removed before Clang 4.0.0.
	So, if we give Clang "-Wstack-usage=262144", it generates a warning, making
	the build failure.

	This commit checks "__clang__" macro to prevent adding the option if the
	compiler is identified as Clang.

	bfd/ChangeLog:

		* warning.m4: Stop appending "-Wstack-usage=262144" option when
		compiled with Clang.
		* configure: Regenerate.

	binutils/ChangeLog:

		* configure: Regenerate.

	gas/ChangeLog:

		* configure: Regenerate.

	gold/ChangeLog:

		* configure: Regenerate.

	gprof/ChangeLog:

		* configure: Regenerate.

	ld/ChangeLog:

		* configure: Regenerate.

	opcodes/ChangeLog:

		* configure: Regenerate.

2022-09-14  Alan Modra  <amodra@gmail.com>

	Modify ld-ctf test files to suit ARM
	The "@" char starts a comment on ARM.

		* testsuite/ld-ctf/diag-ctf-version-0.s: Replace @progbits with
		%progbits.
		* testsuite/ld-ctf/diag-ctf-version-2-unsupported-feature.s: Likewise.
		* testsuite/ld-ctf/diag-ctf-version-f.s: Likewise.
		* testsuite/ld-ctf/diag-cttname-invalid.s: Likewise.
		* testsuite/ld-ctf/diag-cttname-null.s: Likewise.
		* testsuite/ld-ctf/diag-cuname.s: Likewise.
		* testsuite/ld-ctf/diag-decompression-failure.s: Likewise.
		* testsuite/ld-ctf/diag-parlabel.s: Likewise.
		* testsuite/ld-ctf/diag-parname.s: Likewise.
		* testsuite/ld-ctf/diag-strlen-invalid.s: Likewise.
		* testsuite/ld-ctf/diag-unsupported-flag.s: Likewise.
		* testsuite/ld-ctf/diag-wrong-magic-number.s: Likewise.

2022-09-14  Alan Modra  <amodra@gmail.com>

	asan: som_set_reloc_info heap buffer overflow
	Also a bugfix.  The first time the section was read, the contents
	didn't supply an addend.

		* som.c (som_set_reloc_info): Sanity check offset.  Do process
		contents after reading.  Tidy section->contents after freeing.

2022-09-14  Alan Modra  <amodra@gmail.com>

	ubsan: som_is_space null dereference
	On objcopy of fuzzed file.

		* som.c (som_write_fixups): Exit loop if space sections all
		processed.

2022-09-14  Alan Modra  <amodra@gmail.com>

	msan: vms-alpha use-of-uninitialized-value in dst_retrieve_location
		* vms-alpha.c (dst_define_location): Init any unused entries.

2022-09-14  Alan Modra  <amodra@gmail.com>

	ubsan: arm-dis.c index out of bounds
	We are way off in the weeds with this one, and will be printing
	<UNPREDICTABLE> for S > 10.

		* arm-dis.c (print_insn_cde): Wrap 'T' value.

2022-09-14  Alan Modra  <amodra@gmail.com>

	PR29540, R_PPC64_NONE in .rela.dyn when linking Linux vdso
		PR 29540
		* elf64-ppc.c (allocate_dynrelocs): Don't alloc space for relocs
		against discarded sections.
		(ppc64_elf_size_dynamic_sections): Use standard test for discarded
		sections.
		* elf32-ppc.c (allocate_dynrelocs): Don't alloc space for relocs
		against discarded sections.
		(ppc_elf_size_dynamic_sections): Use standard test for discarded
		sections.

2022-09-14  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-13  Aaron Merey  <amerey@redhat.com>

	objdump: '-S' should trigger search for separate debuginfo.
	Add with_source_code to the command line options that trigger
	might_need_separate_debug_info and dump_any_debugging.  This helps
	'objdump -S' download missing files via debuginfod without the need for
	specifying extra command line options like '-L'.

2022-09-13  Bruno Larsen  <blarsen@redhat.com>

	gdb/testsuite: Update gdb.base/so-impl-ld.exp
	gdb.base/so-impl-ld.exp was setup assuming that the compiler would add
	epilogue information and that GDB would stop in the } line.  This would
	make clang tests fail like so:

	 step^M
	 solib_main (arg=10000) at ../../../common/git-repos/binutils-gdb/gdb/testsuite/gdb.base/solib1.c:7^M
	 7|__  return arg*arg;|__|___/* HERE */^M
	 (gdb) PASS: gdb.base/so-impl-ld.exp: step into solib call
	 next^M
	 main () at ../../../common/git-repos/binutils-gdb/gdb/testsuite/gdb.base/so-impl-ld.c:22^M
	 22|_  return 0;^M
	 (gdb) FAIL: gdb.base/so-impl-ld.exp: step in solib call
	 next^M
	 0x00007ffff7cef560 in __libc_start_call_main () from /lib64/libc.so.6^M
	 (gdb) FAIL: gdb.base/so-impl-ld.exp: step out of solib call

	This patch changes it so solib_main has 2 lines where GDB can stop
	regardless of compiler choices, and updates the exp file to
	generically deal with unknown number of steps until leaving that
	function.

2022-09-13  Bruno Larsen  <blarsen@redhat.com>

	gdb/testsuite: introduce gdb_step_until
	Currently, GDB's testsuite uses a set amount of step commands to exit
	functions. This is a problem if a compiler emits different epilogue
	information from gcc, or emits no epilogue information at all. It was
	most noticeable if Clang was used to test GDB.

	To fix this unreliability, this commit introduces a new proc that will
	step the inferior until it is stopped at a line that matches the given
	regexp, or until it steps too many times - defined as an optional
	argument. If the line is found, it shows up as a single PASS in the
	test, and if the line is not found, a single FAIL is emitted.

	This patch only introduces this proc, but does not add it to any
	existing tests, these will be introduced in the following commit.

2022-09-13  Bruno Larsen  <blarsen@redhat.com>

	explicitly test for stderr in gdb.base/dprintf.exp
	Not all compilers add stderr debug information when compiling a
	program. Clang, for instance, prefers to add nothing from standard
	libraries and let an external debug package have this information.
	Because of this, gdb.base/dprintf.exp was failing when GDB attempted to
	use dprintf as a call to fprintf(stderrr, ...), like this:

	 (gdb) PASS: gdb.base/dprintf.exp: call: fprintf: set dprintf style to call
	 continue
	 Continuing.
	 kickoff 1234
	 also to stderr 1234
	 'stderr' has unknown type; cast it to its declared type
	 (gdb) FAIL: gdb.base/dprintf.exp: call: fprintf: 1st dprintf (timeout)

	To avoid this false positive, we explicitly test to see if
	the compiler has added information about stderr at all, and abort
	testing dprintf as an fprintf call if it is unavailable.

2022-09-13  Mark Harmstone  <mark@harmstone.com>

	Add pdb archive format
	Resubmitted with changes in
	https://sourceware.org/pipermail/binutils/2022-September/122791.html
	made.

2022-09-13  Jiangshuai Li  <jiangshuai_li@linux.alibaba.com>

	gdb/csky rm csky_print_registers_info
	The reason for implementing this interface is that we want to print
	GPR, PC, EPC, PSR and EPSR when the "info register" command
	is executed.

	A prev patch has added PC, EPC, PSR and EPSR to reggroup
	general_group, the purpose has been achieved, so this function is
	no longer required.

2022-09-13  Jiangshuai Li  <jiangshuai_li@linux.alibaba.com>

	gdb/csky rm csky_memory_insert/remove_breakpoint
	Software breakpoints are inserted or removed by the gdb stub via
	remote protocol, these two functions are no longer needed.

2022-09-13  Jiangshuai Li  <jiangshuai_li@linux.alibaba.com>

	gdb/csky add unwinder for long branch cases
	There are two sequences of instructions for long branch:
	1. jmpi [pc+4]    //insn code: 0xeac00001
	   .long addr

	2. lrw t1, [pc+8] //insn code: 0xea8d0002
	   jmp t1         //insn code: 0x7834
	   nop            //insn code: 0x6c03
	   .long addr

2022-09-13  Jiangshuai Li  <jiangshuai_li@linux.alibaba.com>

	gdbserver/csky add csky gdbserver support
	Add new files:
	  gdb/arch/csky.c
	  gdb/arch/csky.h
	  gdb/features/cskyv2-linux.c
	  gdbserver/linux-csky-low.cc

	1. In gdb/arch/csky.c file, add function "csky_create_target_description()"
	for csky_target::low_arch_setup(). later, it can be used for csky native gdb.

	2. In gdb/features/cskyv2-linux.c file, create target_tdesc for csky, include
	gprs, pc, hi, lo, float, vector and float control registers.

	3. In gdbserver/linux-csky-low.cc file, using PTRACE_GET/SET_RGESET to
	get/set registers. The main data structures in asm/ptrace.h are:
	struct pt_regs {
	    unsigned long   tls;
	    unsigned long   lr;
	    unsigned long   pc;
	    unsigned long   sr;
	    unsigned long   usp;

	    /*
	     * a0, a1, a2, a3:
	     * r0, r1, r2, r3
	     */
	    unsigned long   orig_a0;
	    unsigned long   a0;
	    unsigned long   a1;
	    unsigned long   a2;
	    unsigned long   a3;

	    /*
	     * r4 ~ r13
	     */
	    unsigned long   regs[10];

	    /* r16 ~ r30 */
	    unsigned long   exregs[15];

	    unsigned long   rhi;
	    unsigned long   rlo;
	    unsigned long   dcsr;
	};

	struct user_fp {
	    unsigned long   vr[96];
	    unsigned long   fcr;
	    unsigned long   fesr;
	    unsigned long   fid;
	    unsigned long   reserved;
	};

2022-09-13  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-12  Tom Tromey  <tromey@adacore.com>

	Use checked_static_cast in more places
	I went through all the uses of dynamic_cast<> in gdb, looking for ones
	that could be replaced with checked_static_cast.  This patch is the
	result.  Regression tested on x86-64 Fedora 34.

2022-09-12  Peter Bergner  <bergner@linux.ibm.com>

	ppc: Document the -mfuture and -Mfuture options and make them usable
	The -mfuture and -Mfuture options which are used for adding potential
	new ISA instructions were not documented.  They also lacked a bitmask
	so new instructions could not be enabled by those options.  Fixed.

	binutils/
		* doc/binutils.texi: Document -Mfuture.

	gas/
		* config/tc-ppc.c: Document -mfuture
		* doc/c-ppc.texi: Likewise.

	include/
		* opcode/ppc.h (PPC_OPCODE_FUTURE): Define.

	opcodes/
		* ppc-dis.c (ppc_opts) <future>: Use it.
		* ppc-opc.c (FUTURE): Define.

2022-09-12  Bruno Larsen  <blarsen@redhat.com>

	add xfails to gdb.base/complex-parts.exp when testing with clang
	clang doesn't add encoding to the name of complex variables, only says
	that the type name is complex, making the relevant tests fail.
	This patch adds the xfails to the tests that expect the variable name to
	include it.

2022-09-12  Bruno Larsen  <blarsen@redhat.com>

	Fix gdb.base/call-ar-st to work with Clang
	When running gdb.base/call-ar-st.exp against Clang, we see one FAIL,
	like so:

	 print_all_arrays (array_i=<main.integer_array>, array_c=<main.char_array> "ZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZa
	 ZaZaZaZaZaZaZaZaZaZaZaZa", array_f=<main.float_array>, array_d=<main.double_array>) at ../../../src/gdb/testsuite/gdb.base/call-ar-st.c:274
	 274       print_int_array(array_i);     /* -step1- */
	 (gdb) FAIL: gdb.base/call-ar-st.exp: step inside print_all_arrays

	With GCC we instead see:

	 print_all_arrays (array_i=<integer_array>, array_c=<char_array> "ZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZa", array_f=<float_array>, array_d=<double_array>) at /home/pedro/gdb/build/gdb/testsuite/../../../src/gdb/testsuite/gdb.base/call-ar-st.c:274
	 274       print_int_array(array_i);     /* -step1- */
	 (gdb) PASS: gdb.base/call-ar-st.exp: step inside print_all_arrays

	The difference is that with Clang we get:

	 array_i=<main.integer_array>, ...

	instead of

	 array_i = <integer_array>, ...

	These symbols are local static variables, and "main" is the name of
	the function they are defined in.  GCC instead appends a sequence
	number to the linkage name:

	 $ nm -A call-ar-st.gcc | grep integer_
	 call-ar-st/call-ar-st:00000000000061a0 b integer_array.3968

	 $ nm -A call-ar-st.clang | grep integer_
	 call-ar-st:00000000004061a0 b main.integer_array

	This commit changes the testcase to accept both outputs, as they are
	functionally identical.

	Co-Authored-By: Pedro Alves <pedro@palves.net>
	Change-Id: Iaf2ccdb9d5996e0268ed12f595a6e04b368bfcb4

2022-09-12  Bruno Larsen  <blarsen@redhat.com>

	fix gdb.base/access-mem-running.exp for clang testing
	Clang was optimizing global_var away because it was not being used
	anywhere. this commit fixes that by adding the attribute used it.

	update gdb.base/info-program.exp to not fail with clang
	The test specifically mentions that it doesn't care where the program
	stops, however it was still testing for a specific location.  The clang
	compiler emits different line information for epilogue, so GDB reports a
	different stopping location, depending on the used compiler.  With this
	patch the test works even with clang.

2022-09-12  Bruno Larsen  <blarsen@redhat.com>

	gdb/testsuite: change gdb.base/nodebug.exp to not fail with clang
	Clang organizes the variables differently to gcc in the original version
	of this code, leading to the following differences when testing
	p (int*) &dataglobal + 1

	gcc:
	$16 = (int *) 0x404034 <datalocal>

	clang:
	$16 = (int *) 0x404034 <dataglobal8>

	However, since the important part of this test doesn't seem to be which
	symbol is linked, but rather if GDB is correctly increasing the
	address. This test was changed to actually measure address changes,
	instead of assuming the ordering and naming of symbols.

	Co-Authored-By: Andrew Burgess <aburgess@redhat.com>

2022-09-12  Martin Storsjö  <martin@martin.st>

	ld: pe: Apply review suggestions on the existing exports/imports arrays
	Use a separate explicit max_exports/imports field, instead of
	deducing it from the number of allocated elements. Use a named
	constant for the incremental growth of the array.

	Use bool instead of int for boolean values.

	Remove an unnecessary if statement/scope in the def_file_free
	function.

	Add more verbose comments about parameters, and about insertion
	into an array of structs.

	Generally use unsigned integers for all array indices and sizes.
	The num_exports/imports fields are kept as is as signed integers,
	since changing them to unsigned would require a disproportionate
	amount of changes ti pe-dll.c to avoid comparisons between signed
	and unsigned.

	Simply use xrealloc instead of a check and xmalloc/xrealloc;
	xrealloc can take NULL as the first parameter (and does a similar
	check internally). (This wasn't requested in review though,
	but noticed while working on the code.)

2022-09-12  Martin Storsjö  <martin@martin.st>

	ld: pe: Improve performance of object file exclude symbol directives
	Store the list of excluded symbols in a sorted list, speeding up
	checking for duplicates when inserting new entries.

	This is done in the same way as is done for exports and imports
	(while the previous implementation was done with a linked list,
	based on the implementation for aligncomm).

	When linking object files with excluded symbols, there can potentially
	be very large numbers of excluded symbols (just like builds with
	exports can have a large number of exported symbols).

	This improves the link performance somewhat, when linking with large
	numbers of excluded symbols.

	The later actual use of the excluded symbols within pe-dll.c
	handles them via an unordered linked list still, though.

2022-09-12  Tom de Vries  <tdevries@suse.de>

	[gdb] Fix abort in selftest run_on_main_thread with ^C
	When running selftest run_on_main_thread and pressing ^C, we can run into:
	...
	Running selftest run_on_main_thread.
	terminate called without an active exception

	Fatal signal: Aborted
	...

	The selftest function looks like this:
	...
	static void
	run_tests ()
	{
	  std::thread thread;

	  done = false;

	  {
	    gdb::block_signals blocker;

	    thread = std::thread (set_done);
	  }

	  while (!done && gdb_do_one_event () >= 0)
	    ;

	  /* Actually the test will just hang, but we want to test
	     something.  */
	  SELF_CHECK (done);

	  thread.join ();
	}
	...

	The error message we see is due to the destructor of thread being called while
	thread is joinable.

	This is supposed to be taken care of by thread.join (), but the ^C prevents
	that one from being called, while the destructor is still called.

	Fix this by ensuring thread.join () is called (if indeed required) before the
	destructor using SCOPE_EXIT.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29549

2022-09-12  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Support .gdb_index section with TUs in .debug_info
	The .gdb_index variant of commit d878bb39e41 ("[gdb/symtab] Support
	.debug_names section with TUs in .debug_info").

	Tested on x86_64-linux.

2022-09-12  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.dwarf2/dw2-dir-file-name.exp for ppc64le
	In commit cd919f5533c ("[gdb/testsuite] Fix
	gdb.dwarf2/dw2-dir-file-name.exp"), I made gdb.dwarf2/dw2-dir-file-name.exp
	independent of prologue analyzers, using this change:
	...
	-       gdb_breakpoint $func
	+       gdb_breakpoint *$func
	...

	That however caused a regression on ppc64le.  For PowerPC, as described in the
	ELFv2 ABI, a function can have a global and local entry point.

	Setting a breakpoint on *$func effectively creates a breakpoint for the global
	entry point, so if the function is entered through the local entry point, the
	breakpoint doesn't trigger.

	Fix this by reverting commit cd919f5533c, and setting the breakpoint on
	${func}_label instead.

	Tested on x86_64-linux and ppc64le-linux.

2022-09-12  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.dwarf2/dw2-dir-file-name.exp with clang
	When running test-case gdb.dwarf2/dw2-dir-file-name.exp with clang, we run
	into:
	...
	(gdb) break *compdir_missing__ldir_missing__file_basename^M
	Breakpoint 2 at 0x400580^M
	(gdb) continue^M
	Continuing.^M
	^M
	Breakpoint 2, 0x0000000000400580 in \
	  compdir_missing.ldir_missing.file_basename ()^M
	(gdb) FAIL: gdb.dwarf2/dw2-dir-file-name.exp: \
	  compdir_missing__ldir_missing__file_basename: continue to breakpoint: \
	  compdir_missing__ldir_missing__file_basename
	...

	The problem is that the test-case uses labels outside functions, which is know
	to cause problem with clang, as documented in the comment for proc
	function_range.

	Fix this by using get_func_info instead.

	Tested on x86_64-linux, with both gcc 7.5.0 and clang 13.0.0.

2022-09-12  Jan Beulich  <jbeulich@suse.com>

	x86: avoid i386_dis_printf()'s staging area for a fair part of output
	While PR binutils/29483 has now been addressed differently, this
	originally proposed change still has its merits: Avoiding vsnprintf()
	for typically far more than half of the overall output results in a 2-3%
	performance gain in my testing (with debug builds of objdump, libbfd,
	and libopcodes).

	With that part of output no longer using staging_area[], the array also
	doesn't need to be quite as large anymore (the largest presently used
	size is 27, from "64-bit address is disabled").

	While limiting the scope of "res" it became apparent that
	- no caller cares about the function's return value,
	- the comment about the return value was wrong,
	- a particular positive return value would have been meaningless to the
	  caller.
	Therefore convert the function to return "void" at the same time.

2022-09-12  Nelson Chu  <nelson@rivosinc.com>

	RISC-V: PR28509, the default visibility symbol cannot be referenced by R_RISCV_JAL.
	When generating the shared object, the default visibility symbols may bind
	externally, which means they will be exported to the dynamic symbol table,
	and are preemptible by default.  These symbols cannot be referenced by the
	non-pic R_RISCV_JAL and R_RISCV_RVC_JUMP.  However, consider that linker
	may relax the R_RISCV_CALL relocations to R_RISCV_JAL or R_RISCV_RVC_JUMP,
	if these relocations are relocated to the plt entries, then we won't report
	error for them.  Perhaps we also need the similar checks for the
	R_RISCV_BRANCH and R_RISCV_RVC_BRANCH relocations.

	After applying this patch, and revert the following glibc patch,
	riscv: Fix incorrect jal with HIDDEN_JUMPTARGET
	https://sourceware.org/git/?p=glibc.git;a=commit;h=68389203832ab39dd0dbaabbc4059e7fff51c29b

	I get the expected errors as follows,
	ld: relocation R_RISCV_RVC_JUMP against `__sigsetjmp' which may bind externally can not be used when making a shared object; recompile with -fPIC
	ld: relocation R_RISCV_JAL against `exit' which may bind externally can not be used when making a shared object; recompile with -fPIC

	Besides, we also have similar changes for libgcc,
	RISC-V: jal cannot refer to a default visibility symbol for shared object
	https://github.com/gcc-mirror/gcc/commit/45116f342057b7facecd3d05c2091ce3a77eda59

	bfd/
		pr 28509
		* elfnn-riscv.c (riscv_elf_relocate_section): Report errors when
		makeing a shard object, and the referenced symbols of R_RISCV_JAL
		relocations are default visibility.  Besides, we should handle most
		of the cases here, so don't need the unresolvable check later for
		R_RISCV_JAL and R_RISCV_RVC_JUMP.
	ld/
		pr 28509
		* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Updated.
		* testsuite/ld-riscv-elf/lib-nopic-01a.s: Removed.
		* testsuite/ld-riscv-elf/lib-nopic-01b.d: Likewise.
		* testsuite/ld-riscv-elf/lib-nopic-01b.s: Likewise.
		* testsuite/ld-riscv-elf/shared-lib-nopic-01.d: New testcase.
		* testsuite/ld-riscv-elf/shared-lib-nopic-01.s: Likewise.
		* testsuite/ld-riscv-elf/shared-lib-nopic-02.d: Likewise.
		* testsuite/ld-riscv-elf/shared-lib-nopic-02.s: Likewise.
		* testsuite/ld-riscv-elf/shared-lib-nopic-03.d: Likewise.
		* testsuite/ld-riscv-elf/shared-lib-nopic-03.s: Likewise.
		* testsuite/ld-riscv-elf/shared-lib-nopic-04.d: Likewise.
		* testsuite/ld-riscv-elf/shared-lib-nopic-04.s: Likewise.

2022-09-12  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-11  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Fix handling of DW_TAG_unspecified_type
	Currently, the test-case contained in this patch fails:
	...
	(gdb) p (int) foo ()^M
	Invalid cast.^M
	(gdb) FAIL: gdb.dwarf2/dw2-unspecified-type.exp: p (int) foo ()
	...
	because DW_TAG_unspecified_type is translated as void.

	There's some code in read_unspecified_type that marks the type as stub, but
	that's only active for ada:
	...
	  if (cu->lang () == language_ada)
	    type->set_is_stub (true);
	...

	Fix this by:
	- marking the type as a stub for all languages, and
	- handling the stub return type case in call_function_by_hand_dummy.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29558

2022-09-11  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-10  Alan Modra  <amodra@gmail.com>

	Re: PR29466, APP/NO_APP with linefile
	It looks like I copied the SIZE init across from
	binutils/testsuite/config/default.exp without some necessary editing.

		* testsuite/config/default.exp (SIZE): Adjust relative path.

2022-09-10  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-09  Nick Clifton  <nickc@redhat.com>

	Support debuginfo files with empty group sections.
		PR 29532
	bfd	* elf.c (setup_group): Do not return false if there is no group
		information available.

	bionutils* objcopy.c (setup_section): Leave group sections intact when
		creating separate debuginfo files.

2022-09-09  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Fix vector CSR requirements
	Vector CSRs are also required on smaller vector subsets.

	Not only that the most of vector CSRs are general purpose (and must be
	accessible for every vector subsets), current minimum vector subset 'Zve32x'
	requires fixed point arithmetic, making remaining non-general purpose
	(fixed point arithmetic only) CSRs mandatory for such subsets.

	So, those CSRs must be accessible from 'Zve32x', not just from 'V'.
	This commit fixes this issue which caused CSR accessibility warnings.

	gas/ChangeLog:

		* config/tc-riscv.c (riscv_csr_address): Change vector CSR
		requirement from 'V' to 'Zve32x'.
		* testsuite/gas/riscv/csr-version-1p9p1.l: Change vector CSR
		requirement from 'V' to 'Zve32x'.
		* testsuite/gas/riscv/csr-version-1p10.l: Likewise.
		* testsuite/gas/riscv/csr-version-1p11.l: Likewise.
		* testsuite/gas/riscv/csr-version-1p12.l: Likewise.

2022-09-09  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-08  Carl Love  <cel@us.ibm.com>

	Fix hardware watchpoint check in test gdb.base/watchpoint-reuse-slot.exp
	This test generates 48 failures on Power 9 when testing with HW watchpoints
	enabled.  Note HW watchpoint support is disabled on Power 9 due to a HW bug.
	The skip_hw_watchpoint_tests proc must be used to correctly determine
	if the processor supports HW watchpoints.

	This patch replaces the [target_info exists gdb,no_hardware_watchpoints]
	with the skip_hw_watchpoint_tests check.

	This patch was tested on Power 9, Power 10 and X86-64 with no regressions.

2022-09-08  Nick Clifton  <nickc@redhat.com>

	Gas generated incorrect debug info (top-level DW_TAG_unspecified_type DIE)
		PR 29559
		* dwarf2dbg.c (out_debug_info): Place DW_TAG_unspecified_type at
		the end of the list of children, not at the start of the CU
		information.
		* testsuite/gas/elf/dwarf-3-func.d: Update expected output.
		* testsuite/gas/elf/dwarf-5-func-global.d: Likewise.
		* testsuite/gas/elf/dwarf-5-func-local.d: Likewise.
		* testsuite/gas/elf/dwarf-5-func.d: Likewise.

2022-09-08  Tsukasa OI  <research_trasio@irq.a4lg.com>

	gdbsupport: Fix config.status dependency
	Commit 171fba11ab27 ("Make GDBserver abort on internal error in development mode")
	created a new substitution CONFIG_STATUS_DEPENDENCIES but this is used by
	Makefile.in (which is not regenerated by that commit).  After regenerating
	it, it is found that CONFIG_STATUS_DEPENDENCIES value is not valid, making
	gdbsupport fail to build.

	Since the CONFIG_STATUS_DEPENDENCIES value is used in the Makefile, macro
	substitution must have a Makefile format but commit 171fba11ab27 used shell
	format "$srcdir/../bfd/development.sh".

	This commit fixes this issue by substituting "$srcdir" (shell format) to
	"$(srcdir)" (Makefile format).  It preserves the dependency as Pedro
	intended and fixes the build problem.

	It also regenerates corresponding files with the maintainer mode.

	gdbsupport/ChangeLog:

		* configure.ac: Fix config.status dependency.
		* Makefile.in: Regenerate.
		* configure: Regenerate.

2022-09-08  Nick Clifton  <nickc@redhat.com>

	Maintainer mode: wrong gettext version?
		* README-maintainer-mode: Update minimum version  of gettext
		required.

	i686-w64-mingw32-objdump -WL returns incorrect file paths
		PR 29523
		* dwarf.c (display_debug_lines_decoded): Correctly handle DWARF-5
		directory and filename tables.

2022-09-08  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-07  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] xfail gdb.ada/O2_float_param.exp for aarch64 and gcc 7.5.0
	On aarch64-linux, with gcc 7.5.0, we run into:
	...
	 (gdb) frame^M
	 #0  callee.increment (val=99.0, val@entry=9.18340949e-41, msg=...) at \
	   callee.adb:21^M
	 21            if Val > 200.0 then^M
	 (gdb) FAIL: gdb.ada/O2_float_param.exp: scenario=all: frame
	...

	The problem is a GCC bug, filed as "PR98148 - [AArch64] Wrong location
	expression for function entry values" (
	https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98148 ).

	Xfail the test for aarch64 and gcc 7.

	Tested on x86_64-linux and aarch64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29418

2022-09-07  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.ada/access_tagged_param.exp for aarch64
	On aarch64-linux, I run into:
	...
	Breakpoint 2, pck.inspect (obj=0x430eb0 \
	  <system.pool_global.global_pool_object>, <objL>=0) at pck.adb:17^M
	17         procedure Inspect (Obj: access Top_T'Class) is^M
	(gdb) FAIL: gdb.ada/access_tagged_param.exp: continue
	...
	while on x86_64-linux, I see:
	...
	Breakpoint 2, pck.inspect (obj=0x62b2a0, <objL>=2) at pck.adb:19^M
	19            null;^M
	(gdb) PASS: gdb.ada/access_tagged_param.exp: continue
	...
	Note the different line numbers, 17 vs 19.

	The difference comes from the gdbarch_skip_prologue implementation.

	The amd64_skip_prologue implementation doesn't use gcc line numbers, and falls
	back to the architecture-specific prologue analyzer, which correctly skips
	past the prologue, to address 0x4022f7:
	...
	00000000004022ec <pck__inspect>:
	  4022ec:       55                      push   %rbp
	  4022ed:       48 89 e5                mov    %rsp,%rbp
	  4022f0:       48 89 7d f8             mov    %rdi,-0x8(%rbp)
	  4022f4:       89 75 f4                mov    %esi,-0xc(%rbp)
	  4022f7:       90                      nop
	  4022f8:       90                      nop
	  4022f9:       5d                      pop    %rbp
	  4022fa:       c3                      ret
	...

	The aarch64_skip_prologue implementation does use gcc line numbers, which are:
	...
	File name                    Line number    Starting address    View    Stmt
	pck.adb                               17            0x402580               x
	pck.adb                               17            0x402580       1       x
	pck.adb                               19            0x40258c               x
	pck.adb                               20            0x402590               x
	...
	and which are represented like this internally in gdb:
	...
	INDEX  LINE   ADDRESS            IS-STMT PROLOGUE-END
	0      17     0x0000000000402580 Y
	1      17     0x0000000000402580 Y
	2      19     0x000000000040258c Y
	3      20     0x0000000000402590 Y
	4      END    0x00000000004025a0 Y
	...

	The second entry is interpreted as end-of-prologue, so 0x402580 is used, while
	the actual end of the prologue is at 0x40258c:
	...
	0000000000402580 <pck__inspect>:
	  402580:       d10043ff        sub     sp, sp, #0x10
	  402584:       f90007e0        str     x0, [sp, #8]
	  402588:       b90007e1        str     w1, [sp, #4]
	  40258c:       d503201f        nop
	  402590:       d503201f        nop
	  402594:       910043ff        add     sp, sp, #0x10
	  402598:       d65f03c0        ret
	  40259c:       d503201f        nop
	...

	Note that the architecture-specific prologue analyzer would have gotten this
	right:
	...
	(gdb) p /x aarch64_analyze_prologue (gdbarch, pc, pc + 128, 0)
	$2 = 0x40258c
	...

	Fix the FAIL by making the test-case more robust against problems in prologue
	skipping, by setting the breakpoint on line 19 instead.

	Likewise in a few similar test-cases.

	Tested on x86_64-linux and aarch64-linux.

2022-09-07  Luis Machado  <luis.machado@arm.com>
	    Tom de Vries  <tdevries@suse.de>

	Fix endianness handling for arm record self tests
	v2:

	- Add 32-bit Arm instruction selftest
	- Refactored abstract memory reader into abstract instruction reader
	- Adjusted code to use templated type and to use host endianness as
	  opposed to target endianness.

	The arm record tests handle 16-bit and 32-bit thumb instructions, but the
	code is laid out in a way that handles the 32-bit thumb instructions as
	two 16-bit parts.

	This is fine, but it is prone to host-endianness issues given how the two
	16-bit parts are stored and how they are accessed later on. Arm is
	little-endian by default, so running this test with a GDB built with
	--enable-targets=all and on a big endian host will run into the following:

	Running selftest arm-record.
	Process record and replay target doesn't support syscall number -2036195
	Process record does not support instruction 0x7f70ee1d at address 0x0.
	Self test failed: self-test failed at ../../binutils-gdb/gdb/arm-tdep.c:14482

	It turns out the abstract memory reader class is more generic than it needs to
	be, and we can simplify the code a bit by assuming we have a simple instruction
	reader that only reads up to 4 bytes, which is the length of a 32-bit
	instruction.

	Instead of returning a bool, we return instead the instruction that has been
	read. This way we avoid having to deal with the endianness conversion, and use
	the host endianness instead. The Arm selftests can be executed on non-Arm
	hosts.

	While at it, Tom suggested adding a 32-bit Arm instruction selftest to increase
	the coverage of the selftests.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29432

2022-09-07  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Use prototype to call libc functions
	On openSUSE Tumbleweed (using glibc 2.36), I run into:
	...
	(gdb) print /d (int) munmap (4198400, 4096)^M
	Invalid cast.^M
	(gdb) FAIL: gdb.base/break-main-file-remove-fail.exp: cmdline: \
	  get integer valueof "(int) munmap (4198400, 4096)"
	...

	The problem is that after starting the executable, the symbol has type
	"void (*) (void)":
	...
	(gdb) p munmap
	$1 = {<text variable, no debug info>} 0x401030 <munmap@plt>
	(gdb) start
	  ...
	(gdb) p munmap
	$2 = {void (void)} 0x7ffff7feb9a0 <__GI_munmap>
	...
	which causes the "Invalid cast" error.

	Looking at the debug info for glibc for symbol __GI_munmap:
	...
	 <0><189683>: Abbrev Number: 1 (DW_TAG_compile_unit)
	    <189691>   DW_AT_name        : ../sysdeps/unix/syscall-template.S
	    <189699>   DW_AT_producer    : GNU AS 2.39.0
	<1><1896ae>: Abbrev Number: 2 (DW_TAG_subprogram)
	    <1896af>   DW_AT_name        : __GI___munmap
	    <1896b3>   DW_AT_external    : 1
	    <1896b4>   DW_AT_low_pc      : 0x10cad0
	    <1896bc>   DW_AT_high_pc     : 37
	...
	that's probably caused by this bit (or similar bits for other munmap aliases).

	This is fixed in gas on trunk by commit 5578fbf672e ("GAS: Add a return type
	tag to DWARF DIEs generated for function symbols").

	Work around this (for say gas 2.39) by explicitly specifying the prototype for
	munmap.

	Likewise for getpid in a couple of other test-cases.

	Tested on x86_64-linux.

2022-09-07  mengqinggang  <mengqinggang@loongson.cn>

	LoongArch: fix gas BFD_RELOC_8/16/24 bug
	If fixP->fx_subsy is NULL, BFD_RELOC_8/16/24 can't convert to
	BFD_RELOC_LARCH_xxx.

	gas/config/tc-loongarch.c

2022-09-07  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-06  Aaron Merey  <amerey@redhat.com>
	    Nick Clifton  <nickc@redhat.com>

	Add debuginfod support for objdump -S
	Currently objdump -S is not able to make use files downloaded from debuginfod.
	This is due to bfd_find_nearest_line_discriminator being unable to locate any
	separate debuginfo files in the debuginfod cache. Additionally objdump lacked
	a call to debuginfod_find_source in order to download missing source files.

	Fix this by using bfd_find_nearest_line_with_alt instead of
	bfd_find_nearest_line_discriminator. Also add a call to
	debuginfod_find_source in order to download missing source files.

2022-09-06  Aaron Merey  <amerey@redhat.com>

	bfd: Add bfd_find_nearest_line_with_alt
	bfd_find_nearest_line_with_alt functions like bfd_find_nearest_line with
	the addition of a parameter for specifying the filename of a supplementary
	debug file such as one referenced by .gnu_debugaltlink or .debug_sup.

	This patch focuses on implementing bfd_find_nearest_line_with_alt
	support for ELF/DWARF2 .gnu_debugaltlink. For other targets this
	function simply sets the invalid_operation bfd_error.

2022-09-06  Tsukasa OI  <research_trasio@irq.a4lg.com>

	gdb: add Tsukasa Oi to gdb/MAINTAINERS

2022-09-06  Andrew Burgess  <aburgess@redhat.com>

	gdb: move a write after approval entry into the correct place
	Noticed in passing that an entry in the MAINTAINERS write after
	approval list was in the wrong place.

2022-09-06  Tsukasa OI  <research_trasio@irq.a4lg.com>

	gdb: Add non-enum disassembler options
	This is paired with "opcodes: Add non-enum disassembler options".

	There is a portable mechanism for disassembler options and used on some
	architectures:

	-   ARC
	-   Arm
	-   MIPS
	-   PowerPC
	-   RISC-V
	-   S/390

	However, it only supports following forms:

	-   [NAME]
	-   [NAME]=[ENUM_VALUE]

	Valid values for [ENUM_VALUE] must be predefined in
	disasm_option_arg_t.values. For instance, for -M cpu=[CPU] in ARC
	architecture, opcodes/arc-dis.c builds valid CPU model list from
	include/elf/arc-cpu.def.

	In this commit, it adds following format:

	-   [NAME]=[ARBITRARY_VALUE] (cannot contain "," though)

	This is identified by NULL value of disasm_option_arg_t.values
	(normally, this is a non-NULL pointer to a NULL-terminated list).

	gdb/ChangeLog:

		* gdb/disasm.c (set_disassembler_options): Add support for
		non-enum disassembler options.
		(show_disassembler_options_sfunc): Likewise.

2022-09-06  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Support .debug_names section with TUs in .debug_info
	When running test-case gdb.cp/cpexprs-debug-types.exp on target board
	cc-with-debug-names/gdb:debug_flags=-gdwarf-5, we get an executable with
	a .debug_names section, but no .debug_types section.  For dwarf-5, the TUs
	are no longer put in a separate unit, but instead they're put in the
	.debug_info section.

	When loading the executable, the .debug_names section is silently ignored
	because of this check in dwarf2_read_debug_names:
	...
	  if (map->tu_count != 0)
	    {
	      /* We can only handle a single .debug_types when we have an
	         index.  */
	      if (per_bfd->types.size () != 1)
	        return false;
	...
	which triggers because per_bfd->types.size () == 0.

	The intention of the check is to make sure we don't have more that one
	.debug_types section, as can happen in a object file (see PR12984):
	...
	$ grep "\.debug_types" 11.s
	        .section        .debug_types,"G",@progbits,wt.75c042c23a9a07ee,comdat
	        .section        .debug_types,"G",@progbits,wt.c59c413bf50a4607,comdat
	...

	Fix this by:
	- changing the check condition to "per_bfd->types.size () > 1", and
	- handling per_bfd->types.size () == 0.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29385

2022-09-06  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add gdb.dwarf2/debug-names-bad-cu-index.exp
	Add test-case gdb.dwarf2/debug-names-bad-cu-index.exp, a regression test for
	commit 2fe9a3c41fa ("[gdb/symtab] Fix bad compile unit index complaint").

	Tested on x86_64-linux.

2022-09-06  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add gdb.dwarf2/debug-names-tu.exp
	Add a test-case gdb.dwarf2/debug-names-tu.exp, that uses the dwarf assembler
	to specify a .debug_names index with the TU list referring to a TU from the
	.debug_types section.

	This is intended to produce something similar to:
	...
	$ gcc -g -fdebug-types-section ~/hello.c -gdwarf-4
	$ gdb-add-index -dwarf-5 a.out
	...

	Tested on x86_64-linux.

2022-09-06  Tsukasa OI  <research_trasio@irq.a4lg.com>

	opcodes: Add non-enum disassembler options
	This is paired with "gdb: Add non-enum disassembler options".

	There is a portable mechanism for disassembler options and used on some
	architectures:

	-   ARC
	-   Arm
	-   MIPS
	-   PowerPC
	-   RISC-V
	-   S/390

	However, it only supports following forms:

	-   [NAME]
	-   [NAME]=[ENUM_VALUE]

	Valid values for [ENUM_VALUE] must be predefined in
	disasm_option_arg_t.values. For instance, for -M cpu=[CPU] in ARC
	architecture, opcodes/arc-dis.c builds valid CPU model list from
	include/elf/arc-cpu.def.

	In this commit, it adds following format:

	-   [NAME]=[ARBITRARY_VALUE] (cannot contain "," though)

	This is identified by NULL value of disasm_option_arg_t.values
	(normally, this is a non-NULL pointer to a NULL-terminated list).

	include/ChangeLog:

		* dis-asm.h (disasm_option_arg_t): Update comment of values
		to allow non-enum disassembler options.

	opcodes/ChangeLog:

		* riscv-dis.c (print_riscv_disassembler_options): Support
		non-enum disassembler options on printing disassembler help.
		* arc-dis.c (print_arc_disassembler_options): Likewise.
		* mips-dis.c (print_mips_disassembler_options): Likewise.

2022-09-06  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-05  Tsukasa OI  <research_trasio@irq.a4lg.com>

	sim/riscv: Complete tidying up with SBREAK
	This commit removes SBREAK-related references on the simulator as it's
	renamed to EBREAK in 2016 (the RISC-V ISA, version 2.1).

	sim/ChangeLog:

		* riscv/sim-main.c (execute_i): Use "ebreak" instead of "sbreak".

2022-09-05  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-04  Andrew Burgess  <aburgess@redhat.com>

	sim/erc32: fix gdb with simulator build
	In commit:

	  commit 7b01c1cc1d111ba0afa51e60fa9842d3b971e2d1
	  Date:   Mon Apr 4 22:38:04 2022 +0100

	      sim: fixes for libopcodes styled disassembler

	changes were made to the simulator source to handle the new libopcodes
	disassembler styling API.

	Unfortunately, these changes broke building GDB with the erc32 (sparc)
	simulator, like this:

	  ../src/configure --target=sparc-linux
	  make all-gdb
	  ....
	  /usr/bin/ld: ../sim/erc32/libsim.a(interf.o): in function `sim_open':
	  /tmp/build/sim/../../src/sim/erc32/interf.c:247: undefined reference to `fprintf_styled'
	  collect2: error: ld returned 1 exit status

	The problem is that in commit 7b01c1cc1d11 the fprintf_styled function
	was added into sis.c.  This file is only used when building the 'run'
	binary, that is, the standalone simulator, and is not included in the
	libsim.a library.

	Now, the obvious fix would be to move fprintf_styled into libsim.a,
	however, that turns out to be tricky.

	The erc32 simulator currently has two copies of the function run_sim,
	one in sis.c, and one in interf.c, both of these copies are global.

	Currently, the 'run' binary links fine, though I suspect this might be
	pure luck.  When I tried moving fprintf_styled into interf.c, I ran
	into multiple-definition (of run_sim) errors.  I suspect that by
	requiring the linker to pull in fprintf_styled from libsim.a I was
	changing the order in which symbols were loaded, and the linker was
	now seeing both copies of run_sim, while currently we only see one
	copy.

	The ideal solution of course, would be to merge the two similar, but
	slightly different copies of run_sim, and just use the one copy.  Then
	we could safely move fprintf_styled into interf.c too, and all would
	be good.

	But I don't have time right now to start debugging the erc32
	simulator, so I wanted a solution that fixes the build without
	introducing multiple definition errors.

	The easiest solution I think is to just have two copies of
	fprintf_styled, one in sis.c, and one in interf.c.  Unlike run_sim,
	these two copies are both static, so we will not run into multiple
	definition issues with this function.  The functions themselves are
	not very big, so it's not a huge amount of duplicate code.

	I am very aware that this is not an ideal solution, and I would
	welcome anyone who wants to take on fixing the run_sim problem
	properly, and then cleanup the fprintf_styled duplication.

2022-09-04  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-03  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-02  Max Filippov  <jcmvbkbc@gmail.com>

	xtensa: bfd: fix TLS relocations generated for PIE
	When generating TLS dynamic relocations the existing xtensa BFD code
	treats linking to a PIE exactly as linking to a shared object, resulting
	in generation of wrong relocations for TLS entries. Fix that and add
	tests.

	bfd/
		* elf32-xtensa.c (elf_xtensa_check_relocs): Use bfd_link_dll
		instead of bfd_link_pic. Add elf_xtensa_dynamic_symbol_p test
		when generating GOT entries.
		(elf_xtensa_relocate_section): Use bfd_link_dll instead of
		bfd_link_pic.
	ld/
		* testsuite/ld-xtensa/tlspie.dd: New file.
		* testsuite/ld-xtensa/tlspie.rd: New file.
		* testsuite/ld-xtensa/tlspie.sd: New file.
		* testsuite/ld-xtensa/tlspie.td: New file.
		* testsuite/ld-xtensa/xtensa-linux.exp (TLS PIE transitions):
		New test.

2022-09-02  Max Filippov  <jcmvbkbc@gmail.com>

	xtensa: adjust expected output in ld TLS tests
	objdump output for l32r opcode was changed in commit b3ea76397a07
	("opcodes: xtensa: display loaded literal value"), but xtensa linker TLS
	relaxation tests weren't adjusted accordingly.
	readelf output was changed in commit 23356397449a ("Adjust readelf's
	output so that section symbols without a name as shown with their
	section name."), but xtensa linker TLS relaxation tests weren't adjusted
	accordingly.
	Fix expected output changes in xtensa ld TLS relaxation tests.

	ld/
		* testsuite/ld-xtensa/tlsbin.dd: Adjust expected output for l32r
		opcodes.
		* testsuite/ld-xtensa/tlsbin.rd: Adjust expected output to allow
		for named section symbols.
		* testsuite/ld-xtensa/tlspic.dd: Adjust expected output for l32r
		opcodes.
		* testsuite/ld-xtensa/tlspic.rd: Adjust expected output to allow
		for named section symbols.

2022-09-02  Frederic Cambus  <fred@statdns.com>

	Add OpenBSD ARM Little Endian BFD support.
		* config.bfd (arm-*-openbsd*): Restore target.

2022-09-02  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Print highest address (-1) on the disassembler
	This patch makes possible to print the highest address (-1) and the addresses
	related to gp which value is -1.  This is particularly useful if the highest
	address space is used for I/O registers and corresponding symbols are defined.
	Besides, despite that it is very rare to have GP the highest address, it would
	be nice because we enabled highest address printing on regular cases.

	gas/ChangeLog:

		* testsuite/gas/riscv/dis-addr-topaddr.s: New test for the top
		address (-1) printing.
		* testsuite/gas/riscv/dis-addr-topaddr-32.d: Likewise.
		* testsuite/gas/riscv/dis-addr-topaddr-64.d: Likewise.
		* testsuite/gas/riscv/dis-addr-topaddr-gp.s: New test for
		GP-relative addressing when GP is the highest address (-1).
		* testsuite/gas/riscv/dis-addr-topaddr-gp-32.d: Likewise.
		* testsuite/gas/riscv/dis-addr-topaddr-gp-64.d: Likewise.

	opcodes/ChangeLog:

		* riscv-dis.c (struct riscv_private_data): Add `to_print_addr' to
		enable printing the highest address.
		(maybe_print_address): Utilize `to_print_addr'.
		(riscv_disassemble_insn): Likewise.

2022-09-02  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: PR29342, Fix RV32 disassembler address computation
	If either the base register is `zero', `tp' or `gp' and XLEN is 32, an
	incorrectly sign-extended address is produced when printing.  This commit
	fixes this by fitting an address into a 32-bit value on RV32.

	Besides, H. Peter Anvin discovered that we have wrong address computation
	for JALR instruction (the initial bug is back in 2018).  This commit also
	fixes that based on the idea of Palmer Dabbelt.

	gas/
		pr29342
		* testsuite/gas/riscv/lla32.d: Reflect RV32 address computation fix.
		* testsuite/gas/riscv/dis-addr-overflow.s: New testcase.
		* testsuite/gas/riscv/dis-addr-overflow-32.d: Likewise.
		* testsuite/gas/riscv/dis-addr-overflow-64.d: Likewise.
	opcodes/
		pr29342
		* riscv-dis.c (maybe_print_address): Fit address into 32-bit on RV32.
		(print_insn_args): Fix JALR address by adding EXTRACT_ITYPE_IMM.

2022-09-02  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Add address printer tests with ADDIW
	Address sequences involving ADDIW/C.ADDIW instructions require special
	handling to sign-extend lower 32-bits of the original result.

	This commit tests whether this sign-extension works.

	gas/ChangeLog:

		* testsuite/gas/riscv/dis-addr-addiw.s: New to test the address
		computation with sign extension as used in ADDIW/C.ADDIW.
		* testsuite/gas/riscv/dis-addr-addiw-a.d: Test PC sign bit 0.
		* testsuite/gas/riscv/dis-addr-addiw-b.d: Test PC sign bit 1.

	gas/ChangeLog:

		* testsuite/gas/riscv/dis-addr-addiw-a.d: New test.
		* testsuite/gas/riscv/dis-addr-addiw-b.d: New test.
		* testsuite/gas/riscv/dis-addr-addiw.s: New test.

2022-09-02  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-09-01  Tsukasa OI  <research_trasio@irq.a4lg.com>

	sim: Update mailing list address
	The commit bf1102165389 "* MAINTAINERS: Perform some obvious fixups."
	back in 2009 changed the mailing list address gdb-patches@sources.redhat.com
	to gdb-patches@sourceware.org.

	This commit does the same to sim/MAINTAINERS.

	sim/ChangeLog:

		* MAINTAINERS: Update mailing list address.

	Change-Id: I56c6bf21a4bddfb35ffc3336ffcba7ff9b39926e

2022-09-01  Nick Clifton  <nickc@redhat.com>

	dllwrap, windres and dlltools use mktemp, which should be avoided
		PR 29534
		* dllwrap.c: Replace uses of choose_temp_base() with
		make_temp_file().
		* dlltool.c: Likewise.
		* resrc.c: Likewise.

2022-09-01  Maciej W. Rozycki  <macro@embecosm.com>

	GDB/doc: Document the Guile `#:unlimited' keyword
	Document the Guile `#:unlimited' keyword and deprecate the internal
	integer representation it corresponds to for integer parameters.

2022-09-01  Lancelot SIX  <lancelot.six@amd.com>

	gdb/python-config: replace deprecated distutils.sysconfig
	When running the gdb/configure script on ubuntu 22.04 with
	python-3.10.4, I see:

	    checking for python... no
	    checking for python3... /usr/bin/python3
	    [...]/gdb/python/python-config.py:7: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
	      from distutils import sysconfig
	    [...]/gdb/python/python-config.py:7: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead
	      from distutils import sysconfig
	    [...]/gdb/python/python-config.py:7: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
	      from distutils import sysconfig
	    [...]/gdb/python/python-config.py:7: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead
	      from distutils import sysconfig
	    [...]/gdb/python/python-config.py:7: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
	      from distutils import sysconfig
	    [...]/gdb/python/python-config.py:7: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead
	      from distutils import sysconfig
	    checking for python... yes

	The distutils module is deprecated as per the PEP 632[1] and will be
	removed in python-3.12.

	This patch migrates gdb/python/python-config.py from distutils.sysconfig
	to the sysconfig module[2].

	The sysconfig module has has been introduced in the standard library in
	python 3.2.  Given that support for python < 3.2 has been removed by
	edae3fd6600f: "gdb/python: remove Python 2 support", this patch does not
	need to support both implementations for backward compatibility.

	Tested on ubuntu-22.04 and ubuntu 20.04.

	[1] https://peps.python.org/pep-0632/
	[2] https://docs.python.org/3/library/sysconfig.html

	Change-Id: Id0df2baf3ee6ce68bd01c236b829ab4c0a4526f6

2022-09-01  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-31  Tom Tromey  <tromey@adacore.com>

	Fix interpreter-exec crash
	PR mi/10347 points out that using interpreter-exec inside of a
	"define" command will crash gdb.  The bug here is that
	gdb_setup_readline doesn't check for the case where instream==nullptr.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=10347

2022-08-31  Tom Tromey  <tromey@adacore.com>

	Fix "source" with interpreter-exec
	PR mi/15811 points out that "source"ing a file that uses
	interpreter-exec will put gdb in a weird state, where the CLI stops
	working.  The bug is that tui_interp::suspend does not unregister the
	event file descriptor.

	The test case is from Andrew Burgess.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=15811

2022-08-31  Tom Tromey  <tromey@adacore.com>

	Remove a call to clear_interpreter_hooks
	mi_interp::resume does not need to call clear_interpreter_hooks,
	because this is already done by interp_set.

	TUI stdout buffering cleanup
	The TUI checks against gdb_stdout to decide when to buffer.  It seems
	much cleaner to me to simply record this as an attribute of the stream
	itself.

	Remove a ui-related memory leak
	gdb_setup_readline makes new streams and assigns to the various stream
	members of struct ui.  However, these assignments cause the previous
	values to leak.  As far as I can, this code is simply unnecessary and
	can be removed -- with the exception of the assignment to gdb_stdtarg,
	which is not initialized anywhere else.

	Remove tui_out_new
	tui_out_new is just a simple wrapper for 'new' and can be removed,
	simplifying gdb a tiny bit.

	Use scoped_restore in safe_parse_type
	This changes safe_parse_type to use scoped_restore rather than
	explicit assignments.

	Use member initialization in 'struct ui'
	This changes 'struct ui' to use member initialization.  This is
	simpler to understand.

	Remove two unused members from mi_interp
	These members of mi_interp aren't used and can be removed.

	Remove obsolete filtering comment
	top.h has an obsolete comment about the use of _unfiltered.

	Remove the "for moment" comments
	A few spots setting some gdb output stream variables have a "for
	moment" comment.  These comments aren't useful and I think the moment
	has passed -- these are permanent now.

	Use ui_out_redirect_pop in more places
	This changes ui_out_redirect_pop to also perform the redirection, and
	then updates several sites to use this, rather than explicit
	redirects.

	Free ui::line_buffer
	A ui initializes its line_buffer, but never calls buffer_free on it.
	This patch fixes the oversight.  I found this by inspection.

	Remove some dead code
	This patch removes some dead code and an old FIXME.  These no longer
	seem useful, even for documentation purposes.

	Let ui::input_fd be -1
	This changes gdb so that, if ui::input_fd is set to -1, then it will
	not be registered with the event loop.  This is useful for the DAP
	support code I wrote, but as it turns out to also be useful to
	Insight, it seems best to check it in separately.

2022-08-31  Andrew Burgess  <aburgess@redhat.com>

	gdb/riscv: better support for fflags and frm registers
	First, some background on the RISC-V registers fflags, frm, and fcsr.

	These three registers all relate to the floating-point status and
	control mechanism on RISC-V.  The fcsr is the floatint-point control
	status register, and consists of two parts, the flags (bits 0 to 4)
	and the rounding-mode (bits 5 to 7).

	The fcsr register is just one of many control/status registers (or
	CSRs) available on RISC-V.  The fflags and frm registers are also
	CSRs.  These CSRs are aliases for the relevant parts of the fcsr
	register.  So fflags is an alias for bits 0 to 4 of fcsr, and frm is
	an alias for bits 5 to 7 of fcsr.

	This means that a user can change the floating-point rounding mode
	either, by writing a complete new value into fcsr, or by writing just
	the rounding mode into frm.

	How this impacts on GDB is like this: a target description could,
	legitimately include all three registers, fcsr, fflags, and frm.  The
	QEMU target currently does this, and this makes sense.  The target is
	emulating the complete system, and has all three CSRs available, so
	why not tell GDB about this.

	In contrast, the RISC-V native Linux target only has access to the
	fcsr.  This is because the ptrace data structure that the kernel uses
	for reading and writing floating point state only contains a copy of
	the fcsr, after all, this one field really contains both the fflags
	and frm fields, so why carry around duplicate data.

	So, we might expect that the target description for the RISC-V native
	Linux GDB would only contain the fcsr register.  Unfortunately, this
	is not the case.  The RISC-V native Linux target uses GDB's builtin
	target descriptions by calling riscv_lookup_target_description, this
	will then add an fpu feature from gdb/features/riscv, either
	32bit-fpu.xml or 64bit-fpu.xml.  The problem, is that these features
	include an entry for fcsr, fflags, and frm.  This means that GDB
	expects the target to handle reading and writing these registers.  And
	the RISC-V native Linux target currently doesn't.

	In riscv_linux_nat_target::store_registers and
	riscv_linux_nat_target::fetch_registers only the fcsr register is
	handled, this means that, for RISC-V native Linux, the fflags and frm
	registers always show up as <unavailable> - they are present in the
	target description, but the target doesn't know how to access the
	registers.

	A final complication relating to these floating pointer CSRs is which
	target description feature the registers appear in.

	These registers are CSRs, so it would seem sensible that these
	registers should appear in the CSR target description feature.

	However, when I first added RISC-V target description support, I was
	using a RISC-V simulator that didn't support any CSRs other than the
	floating point related ones.  This simulator bundled all the float
	related CSRs into the fpu target feature.  This didn't feel completely
	unreasonable to me, and so I had GDB check for these registers in
	either target feature.

	In this commit I make some changes relating to how GDB handles the
	three floating point CSR:

	1. Remove fflags and frm from 32bit-fpu.xml and 64bit-fpu.xml.  This
	means that the default RISC-V target description (which RISC-V native
	FreeBSD), and the target descriptions created for RISC-V native Linux,
	will not include these registers.  There's nothing stopping some other
	target (e.g. QEMU) from continuing to include all three of these CSRs,
	the code in riscv-tdep.c continues to check for all three of these
	registers, and will handle them correctly if they are present.

	2. If a target supplied fcsr, but does not supply fflags and/or frm,
	then RISC-V GDB will now create two pseudo registers in order to
	emulate the two missing CSRs.  These new pseudo-registers do the
	obvious thing of just reading and writing the fcsr register.

	3. With the new pseudo-registers we can no longer make use of the GDB
	register numbers RISCV_CSR_FFLAGS_REGNUM and RISCV_CSR_FRM_REGNUM.
	These will be the numbers used if the target supplies the registers in
	its target description, but, if GDB falls back to using
	pseudo-registers, then new, unique numbers will be used.  To handle
	this I've added riscv_gdbarch_tdep::fflags_regnum and
	riscv_gdbarch_tdep::frm_regnum, I've then updated the RISC-V code to
	compare against these fields.

	When adding the pseudo-register support, it is important that the
	pseudo-register numbers are calculated after the call to
	tdesc_use_registers.  This is because we don't know the total number
	of physical registers until after this call, and the psuedo-register
	numbers must follow on from the real (target supplied) registers.

	I've updated some tests to include more testing of the fflags and frm
	registers, as well as adding a new test.

2022-08-31  Andrew Burgess  <aburgess@redhat.com>

	gdb: Add tdesc_found_register function to tdesc API
	This commit adds a new function to the target description API within
	GDB.  This new function is not used in this commit, but will be used
	in the next commit, I'm splitting it out into a separate patch for
	easier review.

	What I want to do in the next commit is check to see if a target
	description supplied a particular register, however, the register in
	question could appear in one of two possible features.

	The new function allows me to ask the tdesc_arch_data whether a
	register was found and assigned a particular GDB register number once
	all of the features have been checked.  I think this is a much simpler
	solution than adding code such that, while checking each feature, I
	spot if the register I'm processing is the one I care about.

	No tests here as the new code is not used, but this code will be
	exercised in the next commit.

2022-08-31  Andrew Burgess  <aburgess@redhat.com>

	gdb/riscv: improve (and fix) display of frm field in 'info registers'
	On RISC-V the FCSR (float control/status register) is split into two
	parts, FFLAGS (the flags) and FRM (the rounding mode).  Both of these
	two fields are part of the FCSR register, but can also be accessed as
	separate registers in their own right.  And so, we have three separate
	registers, $fflags, $frm, and $fcsr, with the last of these being the
	combination of the first two.

	Here's how the bits of FCSR are split between FRM and FFLAGS:

	         ,--------- FFLAGS
	       |---|
	    76543210 <----- FCSR
	    |-|
	     '--------------FRM

	Here's how GDB currently displays these registers:

	  (gdb) info registers $fflags $frm $fcsr
	  fflags         0x0      RD:0 NV:0 DZ:0 OF:0 UF:0 NX:0
	  frm            0x0      FRM:0 [RNE (round to nearest; ties to even)]
	  fcsr           0x0      RD:0 NV:0 DZ:0 OF:0 UF:0 NX:0 FRM:0 [RNE (round to nearest; ties to even)]

	Notice the 'RD' field which is present in both $fflags and $fcsr.
	This field contains the value of the FRM field, which makes sense when
	displaying the $fcsr, but makes no sense when displaying $fflags, as
	the $fflags doesn't include the FRM field.

	Additionally, the $fcsr already includes an FRM field, so the
	information in 'RD' is duplicated.  Consider this:

	  (gdb) set $frm = 0x3
	  (gdb) info registers $fflags $frm $fcsr                             │
	  fflags         0x0      RD:0 NV:0 DZ:0 OF:0 UF:0 NX:0
	  frm            0x3      FRM:3 [RUP (Round up towards +INF)]
	  fcsr           0x60     RD:3 NV:0 DZ:0 OF:0 UF:0 NX:0 FRM:3 [RUP (Round up towards +INF)]

	See how the 'RD' field in $fflags still displays 0, while the 'RD' and
	'FRM' fields in $fcsr show the same information.

	The first change I propose in this commit is to remove the 'RD'
	field.  After this change the output now looks like this:

	  (gdb) info registers $fflags $frm $fcsr
	  fflags         0x0      NV:0 DZ:0 OF:0 UF:0 NX:0
	  frm            0x0      FRM:0 [RNE (round to nearest; ties to even)]
	  fcsr           0x0      NV:0 DZ:0 OF:0 UF:0 NX:0 FRM:0 [RNE (round to nearest; ties to even)]

	Next, I spotted that the text that goes along with the 'FRM' field was
	not wrapped in the i18n markers for internationalisation, so I added
	those.

	Next, I spotted that:

	  (gdb) set $frm=0x7
	  (gdb) info registers $fflags $frm $fcsr
	  fflags         0x0      RD:0 NV:0 DZ:0 OF:0 UF:0 NX:0
	  frm            0x7      FRM:3 [RUP (Round up towards +INF)]
	  fcsr           0xe0     RD:7 NV:0 DZ:0 OF:0 UF:0 NX:0 FRM:3 [RUP (Round up towards +INF)]

	Notice that despite being a 3-bit field, FRM masks to 2-bits.
	Checking the manual I can see that the FRM field is 3-bits, and is
	defined for all 8 values.  That GDB masks to 2-bits is just a bug I
	think, so I've fixed this.

	Finally, the 'FRM' text for value 0x7 is wrong.  Currently we use the
	text 'dynamic rounding mode' for value 0x7.  However, this is not
	really correct.

	A RISC-V instruction can either encode the rounding mode within the
	instruction, or a RISC-V instruction can choose to use a global,
	dynamic rounding mode.

	So, for the rounding-mode field of an _instruction_ the value 0x7
	indicates "dynamic round mode", the instruction should defer to the
	rounding mode held in the FRM field of the $fcsr.

	But it makes no sense for the FRM of $fcsr to itself be set to
	0x7 (dynamic rounding mode), and indeed, section 11.2, "Floating-Point
	Control and Status Register" of the RISC-V manual, says that a value
	of 0x7 in the $fcsr FRM field is invalid, and if an instruction has
	_its_ round-mode set to dynamic, and the FRM field is also set to 0x7,
	then an illegal instruction exception is raised.

	And so, I propose changing the text for value 0x7 of the FRM field to
	be "INVALID[7] (Dynamic rounding mode)".  We already use the text
	"INVALID[5]" and "INVALID[6]" for the two other invalid fields,
	however, I think adding the extra "Dynamic round mode" hint might be
	helpful.

	I've added a new test that uses 'info registers' to check what GDB
	prints for the three registers related to this patch.  There is one
	slight oddity with this test - for the fflags and frm registers, the
	test accepts both the "normal" output (as described above), but also
	allows these registers to be reported as '<unavailable>'.

	The reason why I accept <unavailable> is that currently, the RISC-V,
	native Linux target advertises these registers in its target
	description, but then doesn't support reading or writing of these
	registers, this results in the registers being reported as
	unavailable.

	A later patch in this series will address this issue, and will remove
	this check for <unavailable>.

2022-08-31  Frederic Cambus  <fred@statdns.com>

	Add OpenBSD AArch64 GAS support.
		* configure.tgt (aarch64*-*-openbsd*): Add target.

2022-08-31  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	gdb, dwarf: create symbols for template tags without names
	The following GDB behavior was also reported as a GDB bug in

	  https://sourceware.org/bugzilla/show_bug.cgi?id=28396

	I will reiterate the problem a bit and give some more information here.
	This patch closes the above mentioned bug.

	The DWARF 5 standard 2.23 'Template Parameters' reads:

	   A template type parameter is represented by a debugging information
	   entry with the tag DW_TAG_template_type_parameter.  A template value
	   parameter is represented by a debugging information entry with the tag
	   DW_TAG_template_value_parameter.  The actual template parameter entries
	   appear in the same order as the corresponding template formal
	   parameter declarations in the source progam.

	   A type or value parameter entry may have a DW_AT_name attribute, whose
	   value is a null-terminated string containing the name of the
	   corresponding formal parameter.

	So the DW_AT_name attribute for DW_TAG_template_type_parameter and
	DW_TAG_template_value_parameter is optional.

	Within GDB, creating a new symbol from some read DIE usually requires the
	presence of a DW_AT_name for the DIE (an exception here is the case of
	unnamed namespaces or the existence of a linkage name).

	This patch makes the presence of the DW_AT_name for template value/type
	tags optional, similar to the unnamed namespaces.

	For unnamed namespaces dwarf2_name simply returns the constant string
	CP_ANONYMOUS_NAMESPACE_STR '(anonymous namespace)'.  For template tags a
	case was added to the switch statement calling the
	unnamed_template_tag_name helper.  Within the scope of parent which
	the template parameter is a child of, the helper counts the position
	of the template tag within the unnamed template tags and returns
	'<unnamedNUMBER>' where NUMBER is its position.  This way we end up with
	unique names within the respective scope of the function/class/struct
	(these are the only currenltly supported template kinds within GDB and
	usually the compilers) where we discovered the template tags in.

	While I do not know of a way to bring GCC to emit template tags without
	names there is one for clang/icpx.  Consider the following example

	  template<typename A, typename B, typename C>
	  class Foo {};

	  template<typename, typename B, typename>
	  class Foo;

	  int main () {
	    Foo<double, int, float> f;
	    return 0;
	  }

	The forward declaration for 'Foo' with the missing template type names
	'A' and 'C' makes clang emit a bunch of template tags without names:

	 ...
	  <2><43>: Abbrev Number: 3 (DW_TAG_variable)
	    <44>   DW_AT_location    : 2 byte block: 91 78      (DW_OP_fbreg: -8)
	    <47>   DW_AT_name        : (indirect string, offset: 0x63): f
	    <4b>   DW_AT_decl_file   : 1
	    <4c>   DW_AT_decl_line   : 8
	    <4d>   DW_AT_type        : <0x59>
	 ...
	 <1><59>: Abbrev Number: 5 (DW_TAG_class_type)
	    <5a>   DW_AT_calling_convention: 5  (pass by value)
	    <5b>   DW_AT_name        : (indirect string, offset: 0x74): Foo<double, int, float>
	    <5f>   DW_AT_byte_size   : 1
	    <60>   DW_AT_decl_file   : 1
	    <61>   DW_AT_decl_line   : 2
	 <2><62>: Abbrev Number: 6 (DW_TAG_template_type_param)
	    <63>   DW_AT_type        : <0x76>
	 <2><67>: Abbrev Number: 7 (DW_TAG_template_type_param)
	    <68>   DW_AT_type        : <0x52>
	    <6c>   DW_AT_name        : (indirect string, offset: 0x6c): B
	 <2><70>: Abbrev Number: 6 (DW_TAG_template_type_param)
	    <71>   DW_AT_type        : <0x7d>
	 ...

	Befor this patch, GDB would not create any symbols for the read template
	tag DIEs and thus lose knowledge about them.  Breaking at the return
	statement and printing f's type would read

	  (gdb) ptype f
	  type = class Foo<double, int, float> [with B = int] {
	      <no data fields>
	  }

	After this patch GDB does generate symbols from the DWARF (with their
	artificial names:

	  (gdb) ptype f
	  type = class Foo<double, int, float> [with <unnamed0> = double, B = int,
	  <unnamed1> = float] {
	      <no data fields>
	  }

	The same principle theoretically applies to template functions.  Also
	here, GDB would not record unnamed template TAGs but I know of no visual
	way to trigger and test this changed behavior.  Template functions do
	not emit a '[with...]' list and their name generation also does not
	suffer from template tags without names.  GDB does not check whether or
	not a template tag has a name in 'dwarf2_compute_name' and thus, the
	names of the template functions are created independently of whether or
	not the template TAGs have a DW_TAT_name attribute.  A testcase has
	been added in the gdb.dwarf2 for template classes and structs.

	Bug:  https://sourceware.org/bugzilla/show_bug.cgi?id=28396

2022-08-31  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	gdb, testsuite: adapt function_range expected name
	When writing a dwarf testcase for some C++ code I wanted to use the
	MACRO_AT_range which in turn uses the function_range proc in dwarf.exp
	to extract the bounds of 'main'.

	However, the macro failed as GDB prints the C++ 'main' with its
	arguments as 'main(int, char**)' or 'main()'.

	The reason for this is that in read.c::dwarf2_compute_name we call
	c_type_print_args on C++ functions and append their arguments to the
	function name.  This happens to all C++ functions, but is only visible
	when the function doesn't have a linkage name.

	An example might make this more clear.  Given the following code

	  >> cat c.cpp
	  int foo (int a, float b)
	  {
	    return 0;
	  }

	  int main (int argc, char **argv)
	  {
	    return 0;
	  }

	which is legal in both languages, C and C++, and compiling it with
	e.g. clang or gcc will make the disassemble command look like:

	  >> clang --version
	  clang version 10.0.0-4ubuntu1
	  ...
	  >> clang -O0 -g ./c.cpp
	  >> gdb -q ./a.out -ex "start"
	  ...
	  (gdb) disassemble main
	  Dump of assembler code for function main(int, char**):
	     0x0000000000401120 <+0>:     push   %rbp
	     0x0000000000401121 <+1>:     mov    %rsp,%rbp
	  ...
	     0x0000000000401135 <+21>:    ret
	  End of assembler dump.
	  (gdb) disassemble foo
	  Dump of assembler code for function _Z3fooif:
	     0x0000000000401110 <+0>:     push   %rbp
	     0x0000000000401111 <+1>:     mov    %rsp,%rbp
	  ...
	     0x000000000040111f <+15>:    ret
	  End of assembler dump.

	Note, that main is emitted with its arguments while for foo the linkage
	name is being printed, as also visible in its DWARF:

	  >> objdump ./a.out --dwarf=info | grep "foo" -A3 -B3
	      <2b>   DW_AT_low_pc      : 0x401110
	      <33>   DW_AT_high_pc     : 0x10
	      <37>   DW_AT_frame_base  : 1 byte block: 56         (DW_OP_reg6 (rbp))
	      <39>   DW_AT_linkage_name: (indirect string, offset: 0x39): _Z3fooif
	      <3d>   DW_AT_name        : (indirect string, offset: 0x42): foo
	      <41>   DW_AT_decl_file   : 1
	      <42>   DW_AT_decl_line   : 1
	      <43>   DW_AT_type        : <0x9a>

	Now, let's rename the C++ file and compile it as C:

	  >> mv c.cpp c.c
	  >> clang -O0 -g ./c.c
	  >> gdb -q ./a.out -ex "start'
	  ...
	  (gdb) disassemble main
	  Dump of assembler code for function main:
	     0x0000000000401120 <+0>:     push   %rbp
	     0x0000000000401121 <+1>:     mov    %rsp,%rbp
	  ...
	     0x0000000000401135 <+21>:    ret
	  End of assembler dump.
	  (gdb) disassemble foo
	  Dump of assembler code for function foo:
	     0x0000000000401110 <+0>:     push   %rbp
	     0x0000000000401111 <+1>:     mov    %rsp,%rbp
	  ...
	     0x000000000040111f <+15>:    ret
	  End of assembler dump.

	Note, for foo we did not get a linkage name emitted in DWARF, so
	it is printed by its name:

	  >> objdump --dwarf=info ./a.out | grep foo -A3 -B3
	      <2b>   DW_AT_low_pc      : 0x401110
	      <33>   DW_AT_high_pc     : 0x10
	      <37>   DW_AT_frame_base  : 1 byte block: 56         (DW_OP_reg6 (rbp))
	      <39>   DW_AT_name        : (indirect string, offset: 0x37): foo
	      <3d>   DW_AT_decl_file   : 1
	      <3e>   DW_AT_decl_line   : 1
	      <3f>   DW_AT_prototyped  : 1

	To make the macro and proc work with C++ as well, an optional argument
	list was added to the regex matching the function name in the
	disassemble command in function_range.  This does not change any used
	behavior as currently, there exists no C++ test using the proc
	function_range.

2022-08-31  Aaron Merey  <amerey@redhat.com>

	gdb/elfread.c: Use bfd filename instead of objfile->original_name
	The call to debuginfod_debuginfo_query in elf_symfile_read is given
	objfile->original_name as the filename to print when downloading the
	objfile's debuginfo.

	In some cases original_name is prefixed with gdb's working directory
	even though the objfile is not located in the working directory. This
	causes debuginfod to display the wrong path of the objfile during a download.

	Fix this by using the objfile's bfd filename instead.

2022-08-31  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-30  Martin Storsjö  <martin@martin.st>

	ld: pe: Fix linking against Microsoft import libraries with multiple DLLs
	Initially, since c6c37250e98f113755e0d787f7070e2ac80ce77e (in 1999),
	in order to fix linking against Microsoft import libraries, ld did
	internally rename members of such libraries. At that point, the
	criteria for being considered a Microsoft import library was that
	every archive member had the same name (no regard for exactly what
	that name was).

	This was later amended in 44dbf3639f127af46d569ad96b6242dfbc4c0a89
	(in 2003) to allow for Microsoft import libraries with intermixed
	static object files. At this point, the criteria were extended, so
	that all members following the first member named *.dll either had
	the exact same member name, or be named *.obj. (Curiously, this would
	allow members with any name if it precedes the first one named *.dll.)

	In practice, Microsoft style import libraries can contain
	members for linking against more than one DLL (built by merging
	multiple regular import libraries into one).

	Instead of trying to do validation of the whole archive before
	considering it a Microsoft style import library, relax the criteria
	for doing the member renaming: If an archive member is named *.dll
	and it contains .idata sections, assume that that member is a
	Microsoft import file, and apply the renaming scheme.

	This works for imports for any number of DLLs in the same library,
	intermixed with other static object files (regardless of their
	names), and vastly simplifies the code.

	LLVM generates Microsoft style import libraries, and Rust builds
	seem to bundle up multiple import libraries together with some
	Rust specific static objects. This fixes linking directly against
	them with ld.bfd.

2022-08-30  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbsupport: add wrapper around result_of and invoke_result
	When building with Clang 14 (using gcc 12 libstdc++ headers), I get:

	      CXX    dwarf2/read.o
	    In file included from /home/simark/src/binutils-gdb/gdb/dwarf2/read.c:94:
	    /home/simark/src/binutils-gdb/gdb/../gdbsupport/parallel-for.h:142:21: error: 'result_of<(lambda at /home/simark/src/binutils-gdb/gdb/dwarf2/read.c:7124:5) (__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::unique_ptr<dwarf2_per_cu_data, dwarf2_per_cu_data_deleter> *, std::__cxx1998::vector<std::unique_ptr<dwarf2_per_cu_data, dwarf2_per_cu_data_deleter>>>, std::vector<std::unique_ptr<dwarf2_per_cu_data, dwarf2_per_cu_data_deleter>>, std::random_access_iterator_tag>, __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::unique_ptr<dwarf2_per_cu_data, dwarf2_per_cu_data_deleter> *, std::__cxx1998::vector<std::unique_ptr<dwarf2_per_cu_data, dwarf2_per_cu_data_deleter>>>, std::vector<std::unique_ptr<dwarf2_per_cu_data, dwarf2_per_cu_data_deleter>>, std::random_access_iterator_tag>)>' is deprecated: use 'std::invoke_result' instead [-Werror,-Wdeprecated-declarations]
	        = typename std::result_of<RangeFunction (RandomIt, RandomIt)>::type;
	                        ^
	    /home/simark/src/binutils-gdb/gdb/dwarf2/read.c:7122:14: note: in instantiation of function template specialization 'gdb::parallel_for_each<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::unique_ptr<dwarf2_per_cu_data, dwarf2_per_cu_data_deleter> *, std::__cxx1998::vector<std::unique_ptr<dwarf2_per_cu_data, dwarf2_per_cu_data_deleter>>>, std::vector<std::unique_ptr<dwarf2_per_cu_data, dwarf2_per_cu_data_deleter>>, std::random_access_iterator_tag>, (lambda at /home/simark/src/binutils-gdb/gdb/dwarf2/read.c:7124:5)>' requested here
	          = gdb::parallel_for_each (1, per_bfd->all_comp_units.begin (),
	                 ^
	    /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../include/c++/12.1.1/type_traits:2597:9: note: 'result_of<(lambda at /home/simark/src/binutils-gdb/gdb/dwarf2/read.c:7124:5) (__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::unique_ptr<dwarf2_per_cu_data, dwarf2_per_cu_data_deleter> *, std::__cxx1998::vector<std::unique_ptr<dwarf2_per_cu_data, dwarf2_per_cu_data_deleter>>>, std::vector<std::unique_ptr<dwarf2_per_cu_data, dwarf2_per_cu_data_deleter>>, std::random_access_iterator_tag>, __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::unique_ptr<dwarf2_per_cu_data, dwarf2_per_cu_data_deleter> *, std::__cxx1998::vector<std::unique_ptr<dwarf2_per_cu_data, dwarf2_per_cu_data_deleter>>>, std::vector<std::unique_ptr<dwarf2_per_cu_data, dwarf2_per_cu_data_deleter>>, std::random_access_iterator_tag>)>' has been explicitly marked deprecated here
	        { } _GLIBCXX17_DEPRECATED_SUGGEST("std::invoke_result");
	            ^
	    /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../include/c++/12.1.1/x86_64-pc-linux-gnu/bits/c++config.h:120:45: note: expanded from macro '_GLIBCXX17_DEPRECATED_SUGGEST'
	    # define _GLIBCXX17_DEPRECATED_SUGGEST(ALT) _GLIBCXX_DEPRECATED_SUGGEST(ALT)
	                                                ^
	    /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../include/c++/12.1.1/x86_64-pc-linux-gnu/bits/c++config.h:96:19: note: expanded from macro '_GLIBCXX_DEPRECATED_SUGGEST'
	      __attribute__ ((__deprecated__ ("use '" ALT "' instead")))
	                      ^

	It complains about the use of std::result_of, which is deprecated in
	C++17 and removed in C++20:

	  https://en.cppreference.com/w/cpp/types/result_of

	Given we'll have to transition to std::invoke_result eventually, make a
	GDB wrapper to mimimc std::invoke_result, which uses std::invoke_result
	for C++ >= 17 and std::result_of otherwise.  This way, it will be easy
	to remove the wrapper in the future, just replace gdb:: with std::.

	Tested by building with gcc 12 in -std=c++11 and -std=c++17 mode, and
	clang in -std=c++17 mode (I did not test fully with clang in -std=c++11
	mode because there are other unrelated issues).

	Change-Id: I50debde0a3307a7bc67fcf8fceefda51860efc1d

2022-08-30  Tom Tromey  <tromey@adacore.com>

	Fix flush for sys.stderr
	GDB overwrites Python's sys.stdout and sys.stderr, but does not
	properly implement the 'flush' method -- it only ever will flush
	stdout.  This patch fixes the bug.  I couldn't find a straightforward
	way to write a test for this.

	Fix gdb.flush documentation
	The gdb.flush documentation does not mention the 'stream' argument in
	the function signature, only in the description.  This patch fixes the
	oversight.

2022-08-30  Nick Clifton  <nickc@redhat.com>

	BFD library: Use entry 0 in directory and filename tables of DWARF-5 debug info.
		PR 29529
		* dwarf2.c (struct line_info_table): Add new field:
		use_dir_and_file_0.
		(concat_filename): Use new field to help select the correct table
		slot.
		(read_formatted_entries): Do not skip entry 0.
		(decode_line_info): Set new field depending upon the version of
		DWARF being parsed.  Initialise filename based upon the setting of
		the new field.

2022-08-30  Enze Li  <enze.li@hotmail.com>

	gdb: update ranged_breakpoint::print_one_detail in comments
	The print_one_detail_ranged_breakpoint has been renamed to
	ranged_breakpoint::print_one_detail in this commit:

	  commit ec45bb676c9c69c30783bcf35ffdac8280f3b8bc
	  Date:   Sat Jan 15 16:34:51 2022 -0700

	    Convert ranged breakpoints to vtable ops

	So their comments should be updated as well.

2022-08-30  Nick Clifton  <nickc@redhat.com>

	Add a testcase for PR 29494.
		PR 29494
		* testsuite/gas/arm/pr29494.s: New test source file.
		* testsuite/gas/arm/pr29494.d: New test driver.

2022-08-30  liuzhensong  <liuzhensong@loongson.cn>

	LoongArch: Fix redefinition of "PACKAGE".
	  Running configure and make in binutils-gdb.

	  $ ./configure
	  $ make
	In file included from ./as.h:37,
	                 from ./config/loongarch-lex.l:21,
	                 from config/loongarch-lex-wrapper.c:20:
	./config.h:206: error: “PACKAGE” redefined [-Werror]
	 #define PACKAGE "gas"
	...

	  gas/config
	  *  loongarch-lex-wrapper.c

2022-08-30  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Add 'Zmmul' extension in assembler.
	Three-part patch set from Tsukasa OI to support zmmul in assembler.

	The 'Zmmul' is a RISC-V extension consisting of only multiply instructions
	(a subset of 'M' which has multiply and divide instructions).

	bfd/
		* elfxx-riscv.c (riscv_implicit_subsets): Add 'Zmmul' implied by 'M'.
		(riscv_supported_std_z_ext): Add 'Zmmul' extension.
		(riscv_multi_subset_supports): Add handling for new instruction class.
	gas/
		* testsuite/gas/riscv/attribute-09.d: Updated implicit 'Zmmul' by 'M'.
		* testsuite/gas/riscv/option-arch-02.d: Likewise.
		* testsuite/gas/riscv/m-ext.s: New test.
		* testsuite/gas/riscv/m-ext-32.d: New test (RV32).
		* testsuite/gas/riscv/m-ext-64.d: New test (RV64).
		* testsuite/gas/riscv/zmmul-32.d: New expected output.
		* testsuite/gas/riscv/zmmul-64.d: Likewise.
		* testsuite/gas/riscv/m-ext-fail-xlen-32.d: New test (failure
		by using RV64-only instructions in RV32).
		* testsuite/gas/riscv/m-ext-fail-xlen-32.l: Likewise.
		* testsuite/gas/riscv/m-ext-fail-zmmul-32.d: New failure test
		(RV32 + Zmmul but with no M).
		* testsuite/gas/riscv/m-ext-fail-zmmul-32.l: Likewise.
		* testsuite/gas/riscv/m-ext-fail-zmmul-64.d: New failure test
		(RV64 + Zmmul but with no M).
		* testsuite/gas/riscv/m-ext-fail-zmmul-64.l: Likewise.
		* testsuite/gas/riscv/m-ext-fail-noarch-64.d: New failure test
		(no Zmmul or M).
		* testsuite/gas/riscv/m-ext-fail-noarch-64.l: Likewise.
	include/
		* opcode/riscv.h (enum riscv_insn_class): Added INSN_CLASS_ZMMUL.
	ld/
		* testsuite/ld-riscv-elf/attr-merge-arch-01.d: We don't care zmmul in
		these testcases, so just replaced m by a.
		* testsuite/ld-riscv-elf/attr-merge-arch-01a.s: Likewise.
		* testsuite/ld-riscv-elf/attr-merge-arch-01b.s: Likewise.
		* testsuite/ld-riscv-elf/attr-merge-arch-02.d: Likewise.
		* testsuite/ld-riscv-elf/attr-merge-arch-02a.s: Likewise.
		* testsuite/ld-riscv-elf/attr-merge-arch-03.d: Likewise.
		* testsuite/ld-riscv-elf/attr-merge-arch-03a.s: Likewise.
		* testsuite/ld-riscv-elf/attr-merge-user-ext-01.d: Likewise.
		* testsuite/ld-riscv-elf/attr-merge-user-ext-rv32i2p1_a2p0.s: Renamed.
		* testsuite/ld-riscv-elf/attr-merge-user-ext-rv32i2p1_a2p1.s: Renamed.
	opcodes/
		* riscv-opc.c (riscv_opcodes): Updated multiply instructions to zmmul.

2022-08-30  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Fix assert in set_length
	When running the included test-case, we run into:
	...
	(gdb) break _start^M
	read.h:309: internal-error: set_length: \
	  Assertion `m_length == length' failed.^M
	...

	The problem is that while there are two CUs:
	...
	$ readelf -wi debug-names-missing-cu | grep @
	  Compilation Unit @ offset 0x0:
	  Compilation Unit @ offset 0x2d:
	...
	the CU table in the .debug_names section only contains the first one:
	...
	CU table:
	[  0] 0x0
	...

	The incomplete CU table makes create_cus_from_debug_names_list set the size of
	the CU at 0x0 to the actual size of both CUs combined.

	This eventually leads to the assert, when we read the actual size from the CU
	header.

	While having an incomplete CU table in a .debug_names section is incorrect,
	we need a better failure mode than asserting.

	The easiest way to fix this is to set the length to 0 (meaning: unkown) in
	create_cus_from_debug_names_list.

	This makes the failure mode to accept the incomplete CU table, but to ignore
	the missing CU.

	It would be nice to instead reject the .debug_names index, and build a
	complete CU list, but the point where we find this out is well after
	dwarf2_initialize_objfile, so it looks rather intrusive to restart at that
	point.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29453

2022-08-30  Tom de Vries  <tdevries@suse.de>

	[gdb/tdep] Declare score-*-* target obsolete
	I tried out the script gdb/gdb_mbuild.sh, and ran into:
	...
	score-elf ...
	... configure --target=score-elf
	... make score-elf
	... run score-elf
	score-elf: gdb dumped core
	Terminated
	...

	Gdb runs into this internal error in initialize_current_architecture:
	...
	  if (! gdbarch_update_p (info))
	    internal_error (__FILE__, __LINE__,
	                    _("initialize_current_architecture: Selection of "
	                      "initial architecture failed"));
	...

	The call to gdbarch_update_p fails because commit 575b4c298a6 ("gdb: Remove
	support for S+core") removed support for the architecture.

	Fix this by adding score-*-* to the list of obsolete targets in
	gdb/configure.tgt, such that we're no longer able to build the configuration:
	...
	*** Configuration score-unknown-elf is obsolete.
	*** Support has been REMOVED.
	make: *** [Makefile:12806: configure-gdb] Error 1
	...

	Also remove the related line from the "Target Instruction Set Architectures"
	list in gdb/MAINTAINERS, such that gdb/gdb_mbuild.sh no longer tries to build
	it.

2022-08-30  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-29  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-28  Alan Modra  <amodra@gmail.com>

	PR29494 Trailing jump table on ARM
	out_inc_line_addr and relax_inc_line_addr are passed INT_MAX as
	line_delta to flag end of section.  This filters its way down to
	size_inc_line_addr and emit_inc_line_addr.  Pass line_delta on to
	scale_addr_delta where it can be used to omit an unaligned opcode
	error.

		PR 29494
		* dwarf2dbg.c (scale_addr_delta): Delete unnecessary forward decl.
		Add line_delta param.  Don't print error at end of section, just
		round the address down.
		(size_inc_line_addr, emit_inc_line_addr): Adjust calls.

2022-08-28  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-27  rupothar  <rupesh.potharla@amd.com>

	bfd: Fix minor bug in read_indexed_address function.
	read_indexed_address function is using offset_size instead of
	addr_size while reading addrx forms.

2022-08-27  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-26  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbsupport: fix gdb::optional compilation with C++11 && _GLIBCXX_DEBUG
	Similar to 911438f9f4 ("gdbsupport: fix array-view compilation with
	c++11 && _GLIBCXX_DEBUG"), but for gdb::optional.

	I get this error when building with Clang 14 and -std=c++11:

	      CXX      agent.o
	    In file included from /home/simark/src/binutils-gdb/gdbsupport/agent.cc:20:
	    In file included from /home/simark/src/binutils-gdb/gdbsupport/common-defs.h:210:
	    In file included from /home/simark/src/binutils-gdb/gdbsupport/common-debug.h:23:
	    /home/simark/src/binutils-gdb/gdbsupport/../gdbsupport/gdb_optional.h:213:5: error: use of this statement in a constexpr function is a C++14 extension [-Werror,-Wc++14-extensions]
	        gdb_assert (this->has_value ());
	        ^
	    /home/simark/src/binutils-gdb/gdbsupport/gdb_assert.h:35:3: note: expanded from macro 'gdb_assert'
	      ((void) ((expr) ? 0 :                                                       \
	      ^

	Change-Id: If0cf55607fc9dbd1925ccb97cd9abbf8993ff264

2022-08-26  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: change bpstat_print's kind parameter to target_waitkind
	Change from int to target_waitkind,  which is really what is is.  While
	at it, remove some outdated doc.  The return value is described by a
	relatively self-describing enum, not a numerical value like the doc
	says.

	Change-Id: Id899c853a857c7891c45e5b1639024067d5b59cd

2022-08-26  Simon Marchi  <simon.marchi@efficios.com>

	gdb, gdbsupport: configure: factor out yes/no/auto value checking
	Factor out the code that checks that a value is yes/no or yes/no/auto.
	Add two macros to gdbsupport/common.m4 and use them in gdb/configure.ac

	I inspected the changes to configure.  Other than whitespace changes, we
	have some benign changes to the error messages (one of them had an error
	actually).  There are changes to the --enable-source-highlight and
	--enable-libbacktrace handling, but setting enable_source_highlight /
	enable_libbacktrace was not really useful anyway, they already had the
	right value.

	Change-Id: I92587aec36874309e1605e2d60244649f09a757a

2022-08-26  Alan Modra  <amodra@gmail.com>

	PR12265, Compiling ld/ fails on Solaris 8
	The fail was due to -Werror and headers included by dlfcn.h and
	elf-bfd.h disagreeing about AT_DCACHEBSIZE and other AT_*.  Not a
	serious problem obviously, since release versions of binutils don't
	enable -Werror and the defines are not used.  Anyway, reduce the
	number of files that might hit this problem by only including dlfcn.h
	where it is needed.

		PR 12265
		* sysdep.h: Don't include dlfcn.h here.
		* plugin.c: Include it here.

2022-08-26  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-25  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

	Allow to document user-defined aliases.
	Compared to the previous version, this version fixes the comments reported by
	Tom Tromey and ensures that the 'help some-user-documented-alias'
	shows the alias definition to ensure the user understands this is an
	alias even if specifically documented.

	When using 'help ALIASNAME', GDB shows the help of the aliased command.
	This is a good default behaviour.

	However, GDB alias command allows to define aliases with arguments
	possibly changing or tuning significantly the behaviour of
	the aliased command.  In such a case, showing the help of the aliased
	command might not be ideal.

	This is particularly true when defining an alias as a set of
	nested 'with' followed by a last command to launch, such as:
	  (gdb) alias pp10 = with print pretty -- with print elements 10 -- print
	Asking 'help pp10' shows the help of the 'with' command, which is
	not particularly useful:
	  (gdb) help pp10
	  with, pp10, w
	    alias pp10 = with print pretty -- with print elements 10 -- print
	  Temporarily set SETTING to VALUE, run COMMAND, and restore SETTING.
	  Usage: with SETTING [VALUE] [-- COMMAND]
	  ....

	Such an alias can now be documented by the user:
	  (gdb) document pp10
	  >Pretty printing an expressiong, printing 10 elements.
	  >Usage: pp10 [PRINT-COMMAND-OPTIONS] EXP
	  >See 'help print' for more information.
	  >end
	  (gdb) help pp10
	    alias pp10 = with print pretty -- with print elements 10 -- print
	  Pretty printing an expressiong, printing 10 elements.
	  Usage: pp10 [PRINT-COMMAND-OPTIONS] EXP
	  See 'help print' for more information.
	  (gdb)

	When a user-defined alias is documented specifically, help and apropos
	use the provided alias documentation instead of the documentation of
	the aliased command.

	Such a documented alias is also not shown anymore in the help of the
	aliased command, and the alias is not listed anymore in the help
	of the aliased command.  In particular for cases such as pp10 example above,
	indicating that pp10 is an alias of the 'with' command is confusing.

2022-08-25  Jan-Benedict Glaw  <jbglaw@lug-owl.de>

	sim/aarch64: Fix aarch64_get_CPSR_bits() declaration
	Noticed while doing mass builds with a very recent GCC:

	/usr/lib/gcc-snapshot/bin/gcc  -DHAVE_CONFIG_H   -DWITH_HW=1 -DHAVE_DV_SOCKSER -DDEFAULT_INLINE=0 -Wall -Wdeclaration-after-statement -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wno-error=maybe-uninitialized -Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement -Wmissing-parameter-type -Wpointer-sign -Wold-style-declaration -Werror  -I. -I/var/lib/laminar/run/gdb-aarch64-elf/1/binutils-gdb/sim/aarch64 -I../common -I/var/lib/laminar/run/gdb-aarch64-elf/1/binutils-gdb/sim/aarch64/../common -I../../include -I/var/lib/laminar/run/gdb-aarch64-elf/1/binutils-gdb/sim/aarch64/../../include -I../../bfd -I/var/lib/laminar/run/gdb-aarch64-elf/1/binutils-gdb/sim/aarch64/../../bfd -I../../opcodes -I/var/lib/laminar/run/gdb-aarch64-elf/1/binutils-gdb/sim/aarch64/../../opcodes -I../..  -I/var/lib/laminar/run/gdb-aarch64-elf/1/binutils-gdb/sim/aarch64/../../gnulib/import -I../../gnulib/import  -g -O2   -c -o cpustate.o -MT cpustate.o -MMD -MP -MF .deps/cpustate.Tpo cpustate.c
	cpustate.c:270:1: error: conflicting types for 'aarch64_get_CPSR_bits' due to enum/integer mismatch; have 'uint32_t(sim_cpu *, FlagMask)' {aka 'unsigned int(struct _sim_cpu *, FlagMask)'} [-Werror=enum-int-mismatch]
	  270 | aarch64_get_CPSR_bits (sim_cpu *cpu, FlagMask mask)
	      | ^~~~~~~~~~~~~~~~~~~~~
	In file included from sim-main.h:30,
	                 from cpustate.c:28:
	cpustate.h:310:20: note: previous declaration of 'aarch64_get_CPSR_bits' with type 'uint32_t(sim_cpu *, uint32_t)' {aka 'unsigned int(struct _sim_cpu *, unsigned int)'}
	  310 | extern uint32_t    aarch64_get_CPSR_bits  (sim_cpu *, uint32_t);
	      |                    ^~~~~~~~~~~~~~~~~~~~~
	cc1: all warnings being treated as errors

2022-08-25  H.J. Lu  <hjl.tools@gmail.com>

	x86: Ignore protected visibility in shared libraries on Solaris
	On x86, the PLT entry in executable may be used as function address for
	functions in shared libraries.  If functions are protected, the function
	address used in executable can be different from the function address
	used in shared library.  This will lead to incorrect run-time behavior
	if function pointer equality is needed.  By default, x86 linker issues
	an error in this case.

	On Solaris, linker issued an error for

	struct tm *tb = (kind == CPP_time_kind::FIXED ? gmtime : localtime) (&tt);

	where gmtime is a protected function in libc.so.  Use gmtime's PLT entry
	in executable as function address is safe since function pointer equality
	isn't needed.  Ignore protected visibility in shared libraries on Solaris
	to disable linker error.  If function pointer equality is needed, linker
	will silently generate executable with incorrect run-time behavior on
	Solaris.

		PR ld/29512
		* elf32-i386.c (elf_i386_scan_relocs): Ignore protected
		visibility in shared libraries on Solaris.
		* elf64-x86-64.c (elf_x86_64_scan_relocs): Likewise.

2022-08-25  Nick Clifton  <nickc@redhat.com>

	GAS: Add a return type tag to DWARF DIEs generated for function symbols.
		PR 29517
		* dwarf2dbg.c (GAS_ABBREV_COMP_UNIT): New defined constant.
		(GAS_ABBREV_SUBPROG): New defined constant.
		(GAS_ABBREV_NO_TYPE): New defined constant.
		(out_debug_abbrev): Use the new defined constants when emitting
		abbreviation numbers.  Generate an abbreviation for an unspecified
		type.
		(out_debug_info): Use the new defined constants when referring to
		abbreviations.  Generate a use of the no_type abbreviation.
		Reference the use when generating DIEs for functions.
		* testsuite/gas/elf/dwarf-3-func.d: Update to allow for newly
		extended output from the assembler.
		* testsuite/gas/elf/dwarf-5-func-global.d: Likewise.
		* testsuite/gas/elf/dwarf-5-func-local.d: Likewise.
		* testsuite/gas/elf/dwarf-5-func.d: Likewise.

	GAS: Allow AArch64 pseudo-ops to accept the command line separator character.
		PR 29519
		* config/tc-aarch64.c (s_unreq): Use find_end_of_line().
		(s_aarch64_cpu): Likewise.
		(s_aarch64_arch): Likewise.
		(s_aarch64_arch_extension): Likewise.
		* testsuite/gas/aarch64/pr29519.d: New test driver file.
		* testsuite/gas/aarch64/pr29519.s: New test source file.

2022-08-25  Palmer Dabbelt  <palmer@rivosinc.com>

	gas: NEWS: Add the RISC-V features for 2.39

	gas: NEWS: Add the RISC-V features for 2.38

	gas: NEWS: Add the RISC-V features for 2.37

	gas: NEWS: Add the RISC-V features for 2.36

	gas: NEWS: Add the RISC-V features for 2.35

	gas: NEWS: Add the RISC-V features for 2.31

2022-08-25  Alan Modra  <amodra@gmail.com>

	PR11290, avr-ld "out of range error" is confusing
	Don't overload bfd_reloc_outofrange with what is really a domain error
	(target at odd address), or an overflow.

		PR 11290
		* reloc.c (bfd_reloc_other): Correct comment.
		* elf32-avr.c (avr_final_link_relocate): Return bfd_reloc_other
		for unaligned reloc target values.  Return bfd_reloc_overflow
		when stubs are too far away and when R_AVR_LDS_STS_16,
		R_AVR_PORT6, or R_AVR_PORT5 overflow.
		(elf32_avr_relocate_section): Report more descriptive relocation
		errors.
		* bfd-in2.h: Regenerate.

2022-08-25  Martin Storsjö  <martin@martin.st>

	ld: pe: Move the return type to a separate line from the function name
	This fixes the coding style of an old, preexisting function.

2022-08-25  Alan Modra  <amodra@gmail.com>

	PR10372, SH: ld test with sim/sh/run fails always
		PR 10372
		* testsuite/ld-sh/start.s: Add _start sym.  Use trapa 34.  Create
		an alloc .stack section.

2022-08-25  Alan Modra  <amodra@gmail.com>

	Re: LoongArch: ld: Fix bug not generate plt when link a dso
	Fixes loongarch32-elf  +FAIL: medium jirl plt

		* testsuite/ld-loongarch-elf/cmodel.exp: Don't run test when
		no shared library support.

2022-08-25  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-24  Martin Storsjö  <martin@martin.st>

	ld: pe: Make archive member file extension comparisons case insensitive when cross compiling too
	On Windows, filename_cmp is case insensitive, but when cross compiling
	with libraries that may contain members with uppercase file names, we
	should keep those comparisons case insensitive when running the build
	tools on other OSes too.

	Also make the check for .def consistent with the other ones, fixing
	out of bounds reads if file names are shorter than 4 characters.

2022-08-24  Richard Earnshaw  <rearnsha@arm.com>

	gas: arm: handle multiple .directives on a single line (PR29519)
	There's been a long-standing bug in the arm backend where
	target-specific directives did not correctly handle lines with
	multiple statements.  This patch fixes the issue for all the cases
	I've been able to find.

	It does result in a slight change in behaviour when errors are
	encountered: where, previously,

	  .cpu arm6 bar

	would result in the error "junk at end of line, first unrecognized
	character is `b'", we now get "unknown cpu `arm6 bar'", which I think
	is slightly more helpful anyway.  Similar errors are generated for
	other directives.

2022-08-24  Andrew Burgess  <aburgess@redhat.com>

	gdb: new 'maint print frame-id' command
	When debugging a certain class of GDB bug, I often end up wanting to
	know what GDB thinks the frame-id is in a particular frame.  It's
	not too hard to pull this from some debug output, but I thought it
	might be nice if there was a maintenance command that could tell us.

	This commit adds 'maint print frame-id' which prints the frame-id of
	the currently selected frame.  You can also pass a frame level number
	to find the frame-id for a specific frame.

	There's a new test too.

2022-08-24  liuzhensong  <liuzhensong@loongson.cn>

	LoongArch: ld: Fix bug not generate plt when link a dso
	  Fix the bug that can not generate func@plt
	  when linking a undefined function with cmodel=medium.
	  Add testcase.

	  bfd/
	    * elfnn-loongarch.c
	  ld/testsuite/ld-loongarch-elf/
	    * cmodel-libjirl.dd
	    * cmodel.exp
	    * libjirl.s

2022-08-24  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-23  Alan Modra  <amodra@gmail.com>

	SHT_RELR sh_link and sh_info
	I don't think it makes any sense for a SHT_RELR section to specify a
	symbol table with sh_link.  SHT_RELR relocations don't use symbols.
	There is no real need to specify sh_info either, SHT_RELR is not for
	relocatable object files.  Anyway, fuzzers of course don't restrict
	themselves to even half-sensible objects.  So they found a hole in
	objcopy using a non-alloc SHT_RELR in an ET_EXEC.  In that case BFD
	set up the SHT_RELR section as if it were a SHT_REL against the
	sh_info target section.  When it came to reading in the target section
	relocs, the count was horribly wrong which caused a buffer overflow.

		* elf.c (bfd_section_from_shdr <SHT_RELR>): Always just make a
		normal section, don't treat it as a reloc section.

2022-08-23  Alan Modra  <amodra@gmail.com>

	Re: bfd_elf_set_group_contents assertion
	Further to commit 7744e3278b9f.

		* elf.c (bfd_elf_set_group_contents): Restrict loc in loop writing
		contents, and add another assertion.

2022-08-23  Nick Clifton  <nickc@redhat.com>

	Add an option to dlltool to allow the creation of deterministic libraries.
		PR 29489
		* dlltool.c (deterministic): New variable.
		(gen_lib_file): If deterministic is true set the
		BFD_DETERMINISTIC_OUTPUT flag.
		(usage): Mention --deterministic-libraries and
		--non-deterministic-libraries.
		(long_options): Add new options.
		(main): Parse new options.
		* doc/binutils.texi: Document the new options.
		* NEWS: Mention the new feature.

2022-08-23  Nelson Chu  <nelson@rivosinc.com>

	binutils: Updated my email address.
	binutils/
	    * MAINTAINERS (RISC-V): Updated my email address.

2022-08-23  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-22  Tom Tromey  <tromey@adacore.com>

	Implement target async for Windows
	This implements target async for Windows.  The basic idea is to have
	the worker thread block in WaitForDebugEvent, then notify the event
	loop when an event is seen.  In a few situations, this blocking
	behavior is undesirable, so the functions passed to do_synchronously
	are changed to return a boolean indicating which behavior is needed.

2022-08-22  Tom Tromey  <tromey@adacore.com>

	Move some Windows operations to worker thread
	On Windows, certain debugging APIs can only be called from the thread
	that started (or attached) to the inferior.  Also, there is no way on
	Windows to wait for a debug event in addition to other events.
	Therefore, in order to implement target async for Windows, gdb will
	have to call some functions in a worker thread.

	This patch implements the worker thread and moves the necessary
	operations there.  Target async isn't yet implemented, so this patch
	does not cause any visible changes.

2022-08-22  Tom Tromey  <tromey@adacore.com>

	Avoid crash with Ravenscar tasks
	When using Ravenscar, gdb can crash if the user sets a breakpoint very
	early in task startup.  This happens because gdb thinks the runtime is
	initialized, but in practice the particular task isn't sufficiently
	initialized.  This patch avoids the issue by turning an assertion into
	an early return.

	I tested this using the AdaCore internal test suite.  I don't know how
	to test Ravenscar using the FSF test suite.

2022-08-22  Nick Clifton  <nickc@redhat.com>

	Fix compile time warning from Clang about error messages not being printed safely.

	Have readelf warn users if it is asked to decode a LLVM bitcode file or a golang object file.
		* readelf.c (check_magic_number): New function.  Checks the magic
		bytes at the start of a file.  If they are not the ELF format
		magic values, then attempts to generate a helpful error message.
		(process_file_header): Call check_magic_number.

2022-08-22  Frederic Cambus  <fred@statdns.com>

	Add OpenBSD AArch64 Little Endian BFD support.
		* config.bfd (aarch64-*-openbsd*): Add target.

2022-08-22  tangxiaolin  <tangxiaolin@loongson.cn>

	LoongArch: gas: add support using constant variable in instructions.
	        Instructions that can load immediate support using constant
	        variable like ".equ var, 123    li.w/d resgister, var".

	gas/
	        * config/loongarch-parse.y
	        * config/tc-loongarch.c

	        Add four testcases.One is a program using constant variable,
	        one test using label is unsupported, and another two test
	        almost instructions that can load immediate.

	gas/
	        * testsuite/gas/loongarch/li.d
	        * testsuite/gas/loongarch/li.s
	        * testsuite/gas/loongarch/imm_ins_label-fail.d
	        * testsuite/gas/loongarch/imm_ins_label-fail.l
	        * testsuite/gas/loongarch/imm_ins_label-fail.s
	        * testsuite/gas/loongarch/imm_ins.d
	        * testsuite/gas/loongarch/imm_ins.s
	        * testsuite/gas/loongarch/imm_ins_32.d
	        * testsuite/gas/loongarch/imm_ins_32.s

2022-08-22  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-21  Tom Tromey  <tom@tromey.com>

	Fix crash in gdbpy_parse_register_id
	I noticed that gdbpy_parse_register_id would assert if passed a Python
	object of a type it was not expecting.  The included test case shows
	this crash.  This patch fixes the problem and also changes
	gdbpy_parse_register_id to be more "Python-like" -- it always ensures
	the Python error is set when it fails, and the callers now simply
	propagate the existing exception.

2022-08-21  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-20  Alan Modra  <amodra@gmail.com>

	symbols for bfd_simple_get_relocated_section_contents
	If symbols are provided by the caller of this function they are
	passed on to bfd_get_relocated_section_contents.  No surprises there.
	It gets a little weird if they are not provided.  In that case they
	are read from the bfd by _bfd_generic_link_add_symbols, and global
	symbols are added to the generic linker hash table.  Global symbols
	are not added to the linker hash table if symbols *are* provided.  Now
	the linker hash table symbols are not used by the generic
	bfd_get_relocated_section_conents, and also not by most target
	versions when called from bfd_simple_get_relocated_section_contents
	except for symbols like "_gp".  So it mostly doesn't matter whether
	symbols are in the linker hash table, but it's odd that there is a
	difference.  We could always add them, but I'm inclined to think that
	is unnecessary work so this patch always leaves them out.

	Also, symbols are canonicalized and written into a malloc'd buffer.
	The buffer isn't freed, see commit 8e16317ca5eb.  I don't know whether
	that matters any more, but in any case I can't see why we need another
	copy of the symbols when _bfd_generic_link_read_symbols has already
	cached symbols.

		* simple.c (bfd_simple_get_relocated_section_contents): If not
		provided, read symbols via bfd_generic_link_read_symbols.  Do
		not create another copy of symbols.  Tidy failure exits.
		Minor tidy of bfd_get_relocated_section_contents and
		bfd_get_full_section_contents arguments.

2022-08-20  Alan Modra  <amodra@gmail.com>

	Re: Missing linking test case for pe dll using a def file
	Fixes this when cross-compiling from x86_64-linux
	x86_64-w64-mingw32  +FAIL: compiling shared lib fastcall/stdcall

		* testsuite/ld-pe/pe-run2-def.exp (test_direct2_link_dll_def):
		Use CC_FOR_TARGET and CFLAGS_FOR_TARGET rather than CC and CFLAGS.

2022-08-20  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-19  Patrick Monnerat  <patrick@monnerat.net>

	gdb_do_one_event: use integer test syntax
	Timeout is an int, not a bool.

2022-08-19  Tom Tromey  <tom@tromey.com>

	Remove two initialization functions
	I noticed a couple of initialization functions that aren't really
	needed, and that currently require explicit calls in gdb_init.  This
	patch removes these functions, simplifying gdb a little.

	Regression tested on x86-64 Fedora 34.

2022-08-19  Simon Marchi  <simon.marchi@efficios.com>

	gdb/testsuite: re-compile entry-value-typedef .S files with -fPIE
	As Luis pointed out here [1], the AArch64 variant of the test doesn't
	work on systems that use PIE by default.  For example, on this Debian
	11:

	    $ make check TESTS="gdb.dwarf2/entry-value-typedef.exp"
	    gdb compile failed, /usr/bin/ld: /tmp/ccJE8ZSr.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZNSsD1Ev@@GLIBCXX_3.4' which may bind externally can not be used when making a shared object; recompile with -fPIC
	    /usr/bin/ld: /tmp/ccJE8ZSr.o(.text+0x38): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `_ZNSsD1Ev@@GLIBCXX_3.4'

	This is because entry-value-typedef-aarch64.S was generated on an old
	system that does not generate position-independent code by default, but
	the system the test runs on tries to link the test executable as
	position-independent.  Fix this by regenerating the same binary on the
	same system as the original one, but with -fPIE this time.  Do the same
	for the amd64 binary, although this one was already position-independent
	so the generated code doesn't change.

	With this patch applied, the test passes on the Debian 11 AArch64
	system.

	[1] https://sourceware.org/pipermail/gdb-patches/2022-August/191462.html

	Change-Id: I68d55adaa56a7a3eddb0c13980b1a98b791f8144

2022-08-19  Felix Willgerodt  <felix.willgerodt@intel.com>

	gdb, testsuite: Adapt gdb.base/callfuncs.exp for new clang warning.
	Clang 15.0.0 enabled the warning for deprecated non-prototype functions
	by default: https://reviews.llvm.org/D122895
	Callfuncs.exp is impacted and won't run due to new warnings:

	callfuncs.c:339:5: warning: a function declaration without a prototype is
	deprecated in all versions of C and is not supported in C2x
	[-Wdeprecated-non-prototype]
	int t_float_values (float_arg1, float_arg2)

	This patch disables those warnings with -Wno-deprecated-non-prototype.
	Removing the test for deprecated syntax would also be an option. But I will
	leave that up for others to decide/implement.

2022-08-19  Felix Willgerodt  <felix.willgerodt@intel.com>

	gdb, testsuite: Enable testcases that suppress specific warnings, for icc/icx.
	To cite gdb.exp:
	Some C/C++ testcases unconditionally pass -Wno-foo as additional
	options to disable some warning.  That is OK with GCC, because
	by design, GCC accepts any -Wno-foo option, even if it doesn't
	support -Wfoo.  Clang however warns about unknown -Wno-foo by
	default, unless you pass -Wno-unknown-warning-option as well.
	We do that here, so that individual testcases don't have to
	worry about it.

	This patch adds the same option that already exists for clang for icx and
	adds the equivalent icc option.

2022-08-19  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: LoongArch: Handle variadic arguments
	According to LoongArch ELF ABI specification [1], variadic arguments
	are passed in GARs in the same manner as named arguments. And after
	a variadic argument has been passed on the stack, all future arguments
	will also be passed on the stack, i.e., the last argument register may
	be left unused due to the aligned register pair rule. long double data
	tpye is passed in an aligned GAR pair, the first register in the pair
	is even-numbered.

	[1] https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html

2022-08-19  Alan Modra  <amodra@gmail.com>

	loongarch64_pei_vec garbage in objcopy'd relocs
	Like commit a9c09a3667cc, but for loongarch64.

		* coff-loongarch64.c (SWAP_IN_RELOC_OFFSET): Define.
		(SWAP_OUT_RELOC_OFFSET): Define.

2022-08-19  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-18  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: fix bug 29479 Collection fails when built without java support
	gprofng/ChangeLog
	2022-08-17  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		PR gprofng/29479
		* libcollector/collector.c: Add #if defined(GPROFNG_JAVA_PROFILING) for
		java specific code.
		* libcollector/unwind.c: Likewise.

2022-08-18  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: call check_typedef at beginning of dwarf_expr_context::fetch_result
	Bug 29374 shows this crash:

	    $ ./gdb -nx --data-directory=data-directory -q -batch -ex "catch throw" -ex r -ex bt a.out
	    ...
	    /home/simark/src/binutils-gdb/gdb/../gdbsupport/array-view.h:217: internal-error: copy: Assertion `dest.size () == src.size ()' failed.

	The backtrace is:

	    #0  internal_error (file=0x5555606504c0 "/home/simark/src/binutils-gdb/gdb/../gdbsupport/array-view.h", line=217, fmt=0x55556064b700 "%s: Assertion `%s' failed.") at /home/simark/src/binutils-gdb/gdbsupport/errors.cc:51
	    #1  0x000055555d41c0bb in gdb::copy<unsigned char const, unsigned char> (src=..., dest=...) at /home/simark/src/binutils-gdb/gdb/../gdbsupport/array-view.h:217
	    #2  0x000055555deef28c in dwarf_expr_context::fetch_result (this=0x7fffffffb830, type=0x621007a86830, subobj_type=0x621007a86830, subobj_offset=0, as_lval=false) at /home/simark/src/binutils-gdb/gdb/dwarf2/expr.c:1040
	    #3  0x000055555def0015 in dwarf_expr_context::evaluate (this=0x7fffffffb830, addr=0x62f00004313e "0", len=1, as_lval=false, per_cu=0x60b000069550, frame=0x621007c9e910, addr_info=0x0, type=0x621007a86830, subobj_type=0x621007a86830, subobj_offset=0) at /home/simark/src/binutils-gdb/gdb/dwarf2/expr.c:1091
	    #4  0x000055555e084327 in dwarf2_evaluate_loc_desc_full (type=0x621007a86830, frame=0x621007c9e910, data=0x62f00004313e "0", size=1, per_cu=0x60b000069550, per_objfile=0x613000006080, subobj_type=0x621007a86830, subobj_byte_offset=0, as_lval=false) at /home/simark/src/binutils-gdb/gdb/dwarf2/loc.c:1485
	    #5  0x000055555e0849e2 in dwarf2_evaluate_loc_desc (type=0x621007a86830, frame=0x621007c9e910, data=0x62f00004313e "0", size=1, per_cu=0x60b000069550, per_objfile=0x613000006080, as_lval=false) at /home/simark/src/binutils-gdb/gdb/dwarf2/loc.c:1529
	    #6  0x000055555e0828c6 in dwarf_entry_parameter_to_value (parameter=0x621007a96e58, deref_size=0x0, type=0x621007a86830, caller_frame=0x621007c9e910, per_cu=0x60b000069550, per_objfile=0x613000006080) at /home/simark/src/binutils-gdb/gdb/dwarf2/loc.c:1235
	    #7  0x000055555e082f55 in value_of_dwarf_reg_entry (type=0x621007a86890, frame=0x621007acc510, kind=CALL_SITE_PARAMETER_DWARF_REG, kind_u=...) at /home/simark/src/binutils-gdb/gdb/dwarf2/loc.c:1332
	    #8  0x000055555e083449 in value_of_dwarf_block_entry (type=0x621007a86890, frame=0x621007acc510, block=0x61e000033568 "T\004\205\001\240\004\004\243\001T\237\004\240\004\261\004\001T\004\261\004\304\005\004\243\001T\237\004\304\005\310\005\001T\004\310\005\311\005\004\243\001T\237", block_len=1) at /home/simark/src/binutils-gdb/gdb/dwarf2/loc.c:1365
	    #9  0x000055555e094d40 in loclist_read_variable_at_entry (symbol=0x621007a99bd0, frame=0x621007acc510) at /home/simark/src/binutils-gdb/gdb/dwarf2/loc.c:3889
	    #10 0x000055555f5192e0 in read_frame_arg (fp_opts=..., sym=0x621007a99bd0, frame=0x621007acc510, argp=0x7fffffffbf20, entryargp=0x7fffffffbf60) at /home/simark/src/binutils-gdb/gdb/stack.c:559
	    #11 0x000055555f51c352 in print_frame_args (fp_opts=..., func=0x621007a99ad0, frame=0x621007acc510, num=-1, stream=0x6030000bad90) at /home/simark/src/binutils-gdb/gdb/stack.c:887
	    #12 0x000055555f521919 in print_frame (fp_opts=..., frame=0x621007acc510, print_level=1, print_what=LOCATION, print_args=1, sal=...) at /home/simark/src/binutils-gdb/gdb/stack.c:1390
	    #13 0x000055555f51f22e in print_frame_info (fp_opts=..., frame=0x621007acc510, print_level=1, print_what=LOCATION, print_args=1, set_current_sal=0) at /home/simark/src/binutils-gdb/gdb/stack.c:1116
	    #14 0x000055555f526c6d in backtrace_command_1 (fp_opts=..., bt_opts=..., count_exp=0x0, from_tty=0) at /home/simark/src/binutils-gdb/gdb/stack.c:2079
	    #15 0x000055555f527ae5 in backtrace_command (arg=0x0, from_tty=0) at /home/simark/src/binutils-gdb/gdb/stack.c:2198

	The problem is that the type that gets passed down to
	dwarf_expr_context::fetch_result (the type of a variable of which we're
	trying to read the entry value) is a typedef whose size has never been
	computed yet (check_typedef has never been called on it).  As we get in
	the DWARF_VALUE_STACK case (line 1028 of dwarf2/expr.c), the `len`
	variable is therefore set to 0, instead of the actual type length.  We
	then call allocate_value on subobj_type, which does call check_typedef,
	so the length of the typedef gets filled in at that point.  We end up
	passing to the copy function a source array view of length 0 and a
	target array view of length 4, and the assertion fails.

	Fix this by calling check_typedef on both type and subobj_type at the
	beginning of fetch_result.

	I tried writing a test for this using the DWARF assembler, but I haven't
	succeeded.  It's possible that we need to get into this specific code
	path (value_of_dwarf_reg_entry and all) to manage to get to
	dwarf_expr_context::fetch_result with a typedef type that has never been
	resolved.  In all my attempts, the typedef would always be resolved
	already, so the bug wouldn't show up.

	As a fallback, I made a gdb.dwarf2 test with compiler-generated .S
	files.  I don't particularly like those, but I think it's better than no
	test.  The .cpp source code is the smallest reproducer I am able to make
	from the reproducer given in the bug (thanks to Pedro for suggestions on
	how to minimize it further than I had).  Since I tested on both amd64
	and aarch64, I added versions of the test for these two architectures.

	Change-Id: I182733ad08e34df40d8bcc47af72c482fabf4900
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29374

2022-08-18  Luis Machado  <luis.machado@arm.com>

	[aarch64] Remove handling of ADR/ADRP from prologue analyzer
	As reported by Tom in https://sourceware.org/pipermail/gdb-patches/2022-August/191357.html,
	the aarch64 prologue analyzer considers the adrp instruction in the
	gdb.dwarf2/dw2-dir-file-name.exp testcase to be part of a prologue.

	The function has no prologue though, and it only loads the volatile variable
	from memory.  GDB should not skip any instructions in this case.

	Doing some archaeology, it seems handling for adr/adrp in prologues was
	included with the original aarch64 port.  It might've been an oversight.

	In the particular case of gdb.dwarf2/dw2-dir-file-name.exp, the analyzer skips
	a couple instructions and leaves us in a nice spot where the address to the
	variable "v" is already in w0. But no prologues exists.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29481

2022-08-18  Tom Tromey  <tom@tromey.com>

	Change bookmark allocation
	This changes how bookmarks are allocated and stored, replacing a
	linked list with a vector and removing some ALL_* iterator macros.
	Regression tested on x86-64 Fedora 34.

2022-08-18  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>

	Add test for AArch64 Scalable Vector Extension
	It exercises a bug that GDB previously had where it would lose track of
	some registers when the inferior changed its vector length.

	It also checks that the vg register and the size of the z0-z31 registers
	correctly reflect the new vector length.

2022-08-18  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>

	Fix thread's gdbarch when SVE vector length changes
	When the inferior program changes the SVE length, GDB can stop tracking
	some registers as it obtains the new gdbarch that corresponds to the
	updated length:

	  Breakpoint 1, do_sve_ioctl_test () at sve-ioctls.c:44
	  44              res = prctl(PR_SVE_SET_VL, i, 0, 0, 0, 0);
	  (gdb) print i
	  $2 = 32
	  (gdb) info registers
	          ⋮
	  [ snip registers x0 to x30 ]
	          ⋮
	  sp             0xffffffffeff0      0xffffffffeff0
	  pc             0xaaaaaaaaa8ac      0xaaaaaaaaa8ac <do_sve_ioctl_test+112>
	  cpsr           0x60000000          [ EL=0 BTYPE=0 C Z ]
	  fpsr           0x0                 0
	  fpcr           0x0                 0
	  vg             0x8                 8
	  tpidr          0xfffff7fcb320      0xfffff7fcb320
	  (gdb) next
	  45              if (res < 0) {
	  (gdb) info registers
	          ⋮
	  [ snip registers x0 to x30 ]
	          ⋮
	  sp             0xffffffffeff0      0xffffffffeff0
	  pc             0xaaaaaaaaa8cc      0xaaaaaaaaa8cc <do_sve_ioctl_test+144>
	  cpsr           0x200000            [ EL=0 BTYPE=0 SS ]
	  fpsr           0x0                 0
	  fpcr           0x0                 0
	  vg             0x4                 4
	  (gdb)

	Notice that register tpidr disappeared when vg (which holds the vector
	length) changed from 8 to 4.  The tpidr register is provided by the
	org.gnu.gdb.aarch64.tls feature.

	This happens because the code that searches for a new gdbarch to match the
	new vector length in aarch64_linux_nat_target::thread_architecture doesn't
	take into account the features present in the target description associated
	with the previous gdbarch.  This patch makes it do that.

	Since the id member of struct gdbarch_info is now unused, it's removed.

2022-08-18  Ralf Habacker  <ralf.habacker@freenet.de>

	Missing linking test case for pe dll using a def file.
		PR 28362
		* testsuite/ld-pe/pe-run2-def.exp: New file.

2022-08-18  Patrick Monnerat  <patrick@monnerat.net>

	gdbsupport/event-loop: add a timeout parameter to gdb_do_one_event
	Since commit b2d8657, having a per-interpreter event/command loop is not
	possible anymore.

	As Insight uses a GUI that has its own event loop, gdb and GUI event
	loops have then to be "merged" (i.e.: work together). But this is
	problematic as gdb_do_one_event is not aware of this alternate event
	loop and thus may wait forever.

	A solution is to delegate GUI events handling to the gdb events handler.
	Insight uses Tck/Tk as GUI and the latter offers a "notifier" feature to
	implement such a delegation. The Tcl notifier spec requires the event wait
	function to support a timeout parameter. Unfortunately gdb_do_one_event
	does not feature such a parameter.
	This timeout cannot be implemented externally with a gdb timer, because
	it would become an event by itself and thus can cause a legitimate event to
	be missed if the timeout is 0.
	Tcl implements "idle events" that are (internally) triggered only when no
	other event is pending. For this reason, it can call the event wait function
	with a 0 timeout quite often.

	This patch implements a wait timeout to gdb_do_one_event. The initial
	pending events monitoring is performed as before without the possibility
	to enter a wait state. If no pending event has been found during this
	phase, a timer is then created for the given timeout in order to re-use
	the implemented timeout logic and the event wait is then performed.
	This "internal" timer only limits the wait time and should never be triggered.
	It is deleted upon gdb_do_one_event exit.

	The new parameter defaults to "no timeout" (-1): as it is used by Insight
	only, there is no need to update calls from the gdb source tree.

2022-08-18  Patrick Monnerat  <patrick@monnerat.net>

	gdb: add Patrick Monnerat to gdb/MAINTAINERS

2022-08-18  Jan Beulich  <jbeulich@suse.com>

	x86: move / quiesce pre-386 non-16-bit warning
	Emitting this warning for every insn, including ones having actual
	errors, is annoying. Introduce a boolean variable to emit the warning
	just once on the first insn after .arch may have changed the things, and
	move the warning to output_insn(). (I didn't want to go as far as
	checking whether the .arch actually turned off the i386 bit, but doing
	so would be an option.)

	x86: insert "no error" enumerator in i386_error enumeration
	The value of zero would better not indicate any error, but rather hit
	the abort() at the top of the consuming switch().

2022-08-18  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-17  Maciej W. Rozycki  <macro@embecosm.com>

	GDB/testsuite: Fix PARAM_ZUINTEGER reported for PARAM_ZUINTEGER_UNLIMITED
	Correctly report PARAM_ZUINTEGER_UNLIMITED rather than PARAM_ZUINTEGER
	in testing a Python parameter of the PARAM_ZUINTEGER_UNLIMITED type.

2022-08-17  Alan Modra  <amodra@gmail.com>

	bfd_elf_set_group_contents assertion
	objcopy of broken SHT_GROUP sections shouldn't write garbage.

		* elf.c (bfd_elf_set_group_contents): If number of entries is
		unexpected, fill out section with zeros.

2022-08-17  Alan Modra  <amodra@gmail.com>

	timeout in mmo_get_symbols
	Fix mmo_get_byte to return a fail-safe value, not just on the first
	call with a read error but on subsequent calls too.

		* mmo.c (mmo_get_byte): Return the fail-safe value on every
		call after a read error.

2022-08-17  Alan Modra  <amodra@gmail.com>

	mmo.c leak in mmo_make_section
		* mmo.c (mmo_make_section): Alloc name using bfd_alloc.  Use
		bfd_error_no_memory.
		(mmo_decide_section): Check for NULL return from mmo_make_section.

2022-08-17  Alan Modra  <amodra@gmail.com>

	asan: heap buffer overflow in mmo_scan
	mmo_get_loc needs to handle arbitrary vma and size chunks.  Fuzzers
	found that it wasn't working so well when the end of chunks were
	getting close to address wrap-around.

		* mmo.c (mmo_get_loc): Make "size" unsigned.  Avoid arithmetic
		overflow when calculating whether range hits an existing chunk.

2022-08-17  Alan Modra  <amodra@gmail.com>

	elf.c tidy
	Swap params of is_note, so they are section, segment like others used
	in rewrite_elf_program_header.  Whitespace fixes, plus wrapping of
	overlong lines.

2022-08-17  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-16  Torbjörn SVENSSON  <torbjorn.svensson@foss.st.com>

	bfd: Define ___lc_codepage_func prototype for older MinGW-w64
	In commit 68e80d96a84282d547f3b3c1234c99009521630c, the usage of
	___lc_codepage_func was introduced to determine the current encoding.

	Prior to version 9.0 of MinGW-w64, the function prototype for
	___lc_codepage_func was missing and trying to build BFD caused the
	following error:

	error: implicit declaration of function ‘___lc_codepage_func’

	This changeset adds a conditonal definition of
	___lc_codepage_func to allow a sucessful build with MinGW-w64.

2022-08-16  H.J. Lu  <hjl.tools@gmail.com>

	i386: Add MAX_OPERAND_BUFFER_SIZE
	When displaying operands, invalid opcodes may overflow operand buffer
	due to additional styling characters.  Each style is encoded with 3
	bytes.  Define MAX_OPERAND_BUFFER_SIZE for operand buffer size and
	increase it from 100 bytes to 128 bytes to accommodate 9 sets of styles
	in an operand.

	gas/

		PR binutils/29483
		* testsuite/gas/i386/i386.exp: Run pr29483.
		* testsuite/gas/i386/pr29483.d: New file.
		* testsuite/gas/i386/pr29483.s: Likewise.

	opcodes/

		PR binutils/29483
		* i386-dis.c (MAX_OPERAND_BUFFER_SIZE): New.
		(obuf): Replace 100 with MAX_OPERAND_BUFFER_SIZE.
		(staging_area): Likewise.
		(op_out): Likewise.

2022-08-16  Andrew Burgess  <aburgess@redhat.com>

	gdb/riscv: fix gdb.arch/riscv-unwind-long-insn.exp on RV64
	I noticed that the gdb.arch/riscv-unwind-long-insn.exp test was
	failing when run on a 64-bit RISC-V target.

	The problem was that GDB was failing to stop after a finish command,
	and was then running to an unexpected location.

	The reason GDB failed to stop at the finish breakpoint was that the
	frame-id of the inferior, when we reached the finish breakpoint,
	didn't match the expected frame-id that was stored on the breakpoint.

	The reason for this mismatch was that the assembler code that is
	included in this test, was written only taking 32-bit RISC-V into
	account, as a result, the $fp register was being corrupted, and this
	was causing the frame-id mismatch.

	Specifically, the $fp register would end up being sign-extended from
	32 to 64 bits.  If the expected $fp value has some significant bits
	above bit 31 then the computed and expected frame-ids would not match.

	To fix this I propose merging the two .s files into a single .S file,
	and making use of preprocessor macros to specialise the file for the
	correct size of $fp.  There are plenty of existing tests that already
	make use of preprocessor macros in assembler files, so I assume this
	approach is fine.

	Once I'd decided to make use of preprocessor macros to solve the 32/64
	bit issue, then I figured I might as well merge the two test assembler
	files, they only differed by a single instruction.

	With this change in place I now see this test fully passing on 32 and
	64 bit RISC-V targets.

2022-08-16  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: fix breakpoint script output in gdb.mi/mi-break.exp
	Commit 9db0d8536dbc ("gdb/mi: fix breakpoint script field output") fixed
	the output of the script key in the MI breakpoint output, from

	  script={"print 10","continue"}

	to

	  script=["print 10","continue"]

	However, it missed updating this test case, which still tests for the
	old (broken) form, causing:

	    FAIL: gdb.mi/mi-break.exp: mi-mode=main: test_breakpoint_commands: breakpoint commands: check that commands are set (unexpected output)
	    FAIL: gdb.mi/mi-break.exp: mi-mode=separate: test_breakpoint_commands: breakpoint commands: check that commands are set (unexpected output)

	Update the test to expect the new form.

	Change-Id: I174919d4eea53e96d914ca9bd1cf6f01c8de30b8

2022-08-16  Tom Tromey  <tromey@adacore.com>

	Use strwinerror in gdb/windows-nat.c
	When working on windows-nat.c, it's useful to see an error message in
	addition to the error number given by GetLastError.  This patch moves
	strwinerror from gdbserver to gdbsupport, and then updates
	windows-nat.c to use it.  A couple of minor changes to strwinerror
	(constify the return type and use the ARRAY_SIZE macro) are also
	included.

2022-08-16  Tom Tromey  <tom@tromey.com>

	Remove register_gdbarch_init
	This removes the deprecated register_gdbarch_init in favor a default
	argument to gdbarch_register.  Regression tested on x86-64 Fedora 34.

2022-08-16  Alan Modra  <amodra@gmail.com>

	PR29495, rewrite_elf_program_header looping
	This patch, in order of significance:
	1) Replaces some macros with inline functions.
	2) Those inline functions catch and avoid arithmetic overflows when
	   comparing addresses.
	3) When assigning sections to segments (IS_SECTION_IN_INPUT_SEGMENT)
	   use bed->want_p_paddr_set_to_zero to decide whether lma vs p_paddr
	   or vma vs p_vaddr should be tested.  When remapping, use the same
	   test, and use is_note rather than the more restrictive
	   IS_COREFILE_NOTE.

	It's important that the later tests not be more restrictive.  If they
	are it can lead to the situation triggered by the testcases, where a
	section seemingly didn't fit and thus needed a new mapping.  It didn't
	fit the new mapping either, and this repeated until memory exhausted.

		PR 29495
		* elf.c (SEGMENT_END, SECTION_SIZE, IS_CONTAINED_BY_VMA): Delete.
		(IS_CONTAINED_BY_LMA, IS_NOTE, IS_COREFILE_NOTE): Delete.
		(segment_size, segment_end, section_size): New inline function.
		(is_contained_by, is_note): Likewise.
		(rewrite_elf_program_header): Use new functions.

2022-08-16  Jan Beulich  <jbeulich@suse.com>

	x86: shorten certain template names
	Now that we can purge templates, let's use this to improve readability a
	little by shortening a few of their names, making functionally similar
	ones also have identical names in their multiple incarnations.

2022-08-16  Jan Beulich  <jbeulich@suse.com>

	x86: template-ize certain vector conversion insns
	Many of the vector conversion insns come with X/Y/Z suffixed forms, for
	disambiguation purposes in AT&T syntax. All of these gorups follow
	certain patterns. Introduce "xy" and "xyz" templates to reduce
	redundancy.

	To facilitate using a uniform name for both AVX and AVX512, further
	introduce a means to purge a previously defined template: A standalone
	<name> will be recognized to have this effect.

	Note that in the course of the conversion VFPCLASSPH is properly split
	to separate AT&T and Intel syntax forms, matching VFPCLASSP{S,D} and
	yielding the intended "ambiguous operand size" diagnostic in Intel mode.

2022-08-16  Jan Beulich  <jbeulich@suse.com>

	x86: template-ize vector packed byte/word integer insns
	Many of the vector integer insns come in byte/word element pairs. Most
	of these pairs follow certain encoding patterns. Introduce a "bw"
	template to reduce redundancy.

	Note that in the course of the conversion
	- the AVX VPEXTRW template which is not being touched needs to remain
	  ahead of the new "combined" ones, as (a) this should be tried first
	  when matching insns against templates and (b) its Load attributes
	  requires it to be first,
	- this add a benign/meaningless IgnoreSize attribute to the memory form
	  of PEXTRB; it didn't seem worth avoiding this.

2022-08-16  Jan Beulich  <jbeulich@suse.com>

	x86: re-order AVX512 S/G templates
	The AVX2 gather ones are nicely grouped - do the same for the various
	AVX512 scatter/gather ones. On the moved lines also convert EVex=<n> to
	EVex<N>.

2022-08-16  Jan Beulich  <jbeulich@suse.com>

	x86: template-ize vector packed dword/qword integer insns
	Many of the vector integer insns come in dword/qword element pairs. Most
	of these pairs follow certain encoding patterns. Introduce a "dq"
	template to reduce redundancy.

	Note that in the course of the conversion
	- a few otherwise untouched templates are moved, so they end up next to
	  their siblings),
	- drop an unhelpful Cpu64 from the GPR form of VPBROADCASTQ, matching
	  what we already have for KMOVQ - the diagnostic is better this way for
	  insns with multiple forms (i.e. the same Cpu64 attributes on {,V}MOVQ,
	  {,V}PEXTRQ, and  {,V}PINSRQ are useful to keep),
	- this adds benign/meaningless IgnoreSize attributes to the GPR forms of
	  KMOVD and VPBROADCASTD; it didn't seem worth avoiding this.

2022-08-16  Jan Beulich  <jbeulich@suse.com>

	x86: template-ize packed/scalar vector floating point insns
	The vast majority of vector FP insns comes in single/double pairs. Many
	pairs follow certain encoding patterns. Introduce an "sd" template to
	reduce redundancy. Similarly, to further cover similarities between
	AVX512F and AVX512-FP16, introduce an "sdh" template.

	For element-size Disp8 shift generalize i386-gen's broadcast size
	determination, allowing Disp8MemShift to be specified without an operand
	in the affected templated templates. While doing the adjustment also
	eliminate an unhelpful (lost information) diagnostic combined with a use
	after free in what is now get_element_size().

	Note that in the course of the conversion
	- the AVX512F form of VMOVUPD has a stray (leftover) Load attribute
	  dropped,
	- VMOVSH has a benign IgnoreSize added (the attribute is still strictly
	  necessary for VMOVSD, and necessary for VMOVSS as long as we permit
	  strange combinations like "-march=i286+avx"),
	- VFPCLASSPH is properly split to separate AT&T and Intel syntax forms,
	  matching VFPCLASSP{S,D}.

2022-08-16  Jan Beulich  <jbeulich@suse.com>

	revert "x86: Also pass -P to $(CPP) when processing i386-opc.tbl"
	This reverts commit 384f368958f2a5bb083660e58e5f8a010e6ad429, which
	broke i386-gen's emitting of diagnostics. As a replacement to address
	the original issue of newer gcc no longer splicing lines when dropping
	the line continuation backslashes, switch to using + as the line
	continuation character, doing the line splicing in i386-gen.

2022-08-16  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-15  Alan Modra  <amodra@gmail.com>

	PR29362, some binutils memory leaks
	2022-08-16  Alan Modra  <amodra@gmail.com>
		    Cunlong Li  <shenxiaogll@163.com>

		PR 29362
		* dwarf.c (free_debug_information): New function, extracted..
		(free_debug_memory): ..from here.
		(process_debug_info): Use it when before clearing out unit
		debug_information.  Clear all fields.
		* objcopy.c (delete_symbol_htabs): New function.
		(main): Call it via xatexit.
		(copy_archive): Free "dir".
		* objdump.c (free_debug_section): Free reloc_info.

2022-08-15  Jiangshuai Li  <jiangshuai_li@linux.alibaba.com>

	gdb/csky add unwinder for sigtramp frame when kernel 4.x and later
	When kernel veriosn >= V4.x, the characteristic values used to
	determine whether it is a signal function call are:
	    movi r7, 139
	    trap 0

	Registers are saved at (sp + CSKY_SIGINFO_OFFSET + CSKY_SIGINFO_SIZE
	+ CSKY_UCONTEXT_SIGCONTEXT + CSKY_SIGCONTEXT_PT_REGS_TLS). The order
	is described in csky_linux_rt_sigreturn_init_pt_regs.

2022-08-15  Alan Modra  <amodra@gmail.com>

	aarch64_pei_vec
	I know this target is just a skeleton, but let's not write out relocs
	with uninitialised garbage.

		* coff-aarch64.c (SWAP_IN_RELOC_OFFSET): Define.
		(SWAP_OUT_RELOC_OFFSET): Define.

2022-08-15  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-14  Andrew Burgess  <aburgess@redhat.com>

	gdb/riscv: improve a comment about fcsr, fflags, and frm registers
	There's a comment in riscv-tdep.c that explains some of the background
	about how we check for the fcsr, fflags, and frm registers within a
	riscv target description.

	This comment (and the functionality it describes) relates to how QEMU
	advertises these registers within its target description.

	Unfortunately, QEMU includes these three registers in both the fpu and
	crs target description features.  To work around this GDB uses one of
	the register declarations, and ignores the other, this means the GDB
	user sees a single copy of each register, and things just work.

	When I originally wrote the comment I thought it didn't matter which
	copy of the register GDB selected, the fpu copy or the csr copy, so
	long as we just used one of them.  The comment reflected this belief.

	Upon further investigation, it turns out I was wrong.  GDB has to use
	the csr copy of the register.  If GDB tries to use the register from
	the fpu feature then QEMU will return an error when GDB tries to read
	or write the register.

	Luckily, the code within GDB (currently) will always select the csr
	copy of the register, so nothing is broken, but the comment is wrong.
	This commit updates the comment to better describe what is actually
	going on.

	Of course, I should probably also send a patch to QEMU to fix up the
	target description that is sent to GDB.

2022-08-14  Andrew Burgess  <aburgess@redhat.com>

	gdb/nds32: update features/nds32.c
	After this commit:

	  commit 7b7c365c5c663ffdfb2b3f696db35c23cdccd921
	  Date:   Wed Sep 15 10:10:46 2021 +0200

	      [bfd] Ensure unique printable names for bfd archs

	The printable name field of the default nds32 bfd_arch_info changed
	from 'n1h' to 'n1'.  As a consequence the generated feature file
	within GDB should have been recreated.  Recreate it now.

2022-08-14  Tom Tromey  <tom@tromey.com>

	Move decode_location_spec to code_breakpoint
	breakpoint::decode_location_spec just asserts if called.  It turned
	out to be relatively easy to remove this method from breakpoint and
	instead move the base implementation to code_breakpoint.

	Change location_spec_to_sals to a method
	location_spec_to_sals is only ever called for code breakpoints, so
	make it a protected method there.

	Change breakpoint_re_set_default to a method
	breakpoint_re_set_default is only ever called from breakpoint re_set
	methods, so make it a protected method on code_breakpoint.

2022-08-14  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-13  Alan Modra  <amodra@gmail.com>

	PR29482 - strip: heap-buffer-overflow
		PR 29482
		* coffcode.h (coff_set_section_contents): Sanity check _LIB.

	asan: NULL dereference in spu_elf_object_p
		* elf32-spu.c (spu_elf_object_p): Don't dereference NULL
		shdr->bfd_section.

	ubsan: undefined shift in sign_extend
		* libhppa.h (sign_extend): Avoid undefined behaviour.

	asan: NULL dereference in som_set_reloc_info
		* som.c (som_set_reloc_info): Ignore non-existent previous
		fixup references.

	readelf: print 0x0 as 0, and remove trailing spaces
	This changes readelf output a little, removing the 0x prefix on hex
	output when the value is 0, except in cases where a fixed field
	width is shown.  %#010x is not a good replacement for 0x%08x.

	Make dwarf_vma uint64_t
	This replaces dwarf_vma, dwarf_size_type and dwarf_signed_vma with
	uint64_t and int64_t everywhere.  The patch also gets rid of
	DWARF_VMA_FMT since we can't use that with uint64_t, and all of the
	configure support for deciding the flavour of HOST_WIDEST_INT.
	dwarf_vmatoa also disappears, replacing most uses with one of
	PRIx64, PRId64 or PRIu64.  Printing of size_t and ptrdiff_t values
	now use %z and %t rather than by casting to unsigned long.  Also,
	most warning messages that used 0x%lx or similar now use %#lx and a
	few that didn't print the 0x hex prefix now also use %#.  The patch
	doesn't change normal readelf output, except in odd cases where values
	previously might have been truncated.

	Don't use bfd_vma in readelf.c
	This replaces bfd_vma with uint64_t in readelf, defines BFD64
	unconditionally, removes tests of BFD64 and sizeof (bfd_vma), and
	removes quite a few now unnecessary casts.

	Don't use bfd_size_type in readelf.c and dwarf.c
	Replacing bfd_size_type with dwarf_size_type or uint64_t is mostly
	cosmetic.  The point of the change is to avoid use of a BFD type
	in readelf, where we'd like to keep as independent of BFD as
	possible.  Also, the patch is a step towards using standard types.

	Replace elf_vma with uint64_t
	This patch replaces all uses of elf_vma with uint64_t, removes
	tests of sizeof (elf_vma), and does a little tidying of
	byte_get_little_endian and byte_get_big_endian.

2022-08-13  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-12  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.dwarf2/dw2-dir-file-name.exp
	When running test-case gdb.dwarf2/dw2-dir-file-name.exp on x86_64-linux, we
	have:
	...
	(gdb) break compdir_missing__ldir_missing__file_basename^M
	Breakpoint 2 at 0x4004c4: file tmp-dw2-dir-file-name.c, line 999.^M
	(gdb) continue^M
	Continuing.^M
	^M
	Breakpoint 2, 0x00000000004004c4 in \
	  compdir_missing__ldir_missing__file_basename () \
	  at tmp-dw2-dir-file-name.c:999^M
	(gdb) PASS: gdb.dwarf2/dw2-dir-file-name.exp: \
	  compdir_missing__ldir_missing__file_basename: continue to breakpoint: \
	  compdir_missing__ldir_missing__file_basename
	...

	When trying to set a breakpoint on
	compdir_missing__ldir_missing__file_basename, the architecture-specific
	prologue skipper starts at 0x4004c0 and skips past two insns, to 0x4004c4:
	...
	00000000004004c0 <compdir_missing__ldir_missing__file_basename>:
	  4004c0: 55                      push   %rbp
	  4004c1: 48 89 e5                mov    %rsp,%rbp
	  4004c4: 8b 05 72 1b 20 00       mov    0x201b72(%rip),%eax        # 60203c <v>
	  4004ca: 83 c0 01                add    $0x1,%eax
	  4004cd: 89 05 69 1b 20 00       mov    %eax,0x201b69(%rip)        # 60203c <v>
	  4004d3: 90                      nop
	  4004d4: 5d                      pop    %rbp
	  4004d5: c3                      ret
	...

	And because the line table info is rudamentary:
	...
	CU: tmp-dw2-dir-file-name.c:
	File name                    Line number    Starting address    View    Stmt
	tmp-dw2-dir-file-name.c              999            0x4004c0               x
	tmp-dw2-dir-file-name.c             1000            0x4004d6               x
	tmp-dw2-dir-file-name.c                -            0x4004d6
	...
	the address does not fall at an actual line, so the breakpoint is shown with
	address, both when setting it and hitting it.

	when running the test-case with aarch64-linux, we have similarly:
	...
	(gdb) break compdir_missing__ldir_missing__file_basename^M
	Breakpoint 2 at 0x400618: file tmp-dw2-dir-file-name.c, line 999.^M
	...
	due to the architecture-specific prologue skipper starting at 0x400610 and
	skipping past two insns, to 0x400618:
	...
	0000000000400610 <compdir_missing__ldir_missing__file_basename>:
	  400610:       90000100        adrp    x0, 420000 <__libc_start_main@GLIBC_2.17>
	  400614:       9100b000        add     x0, x0, #0x2c
	  400618:       b9400000        ldr     w0, [x0]
	  40061c:       11000401        add     w1, w0, #0x1
	  400620:       90000100        adrp    x0, 420000 <__libc_start_main@GLIBC_2.17>
	  400624:       9100b000        add     x0, x0, #0x2c
	  400628:       b9000001        str     w1, [x0]
	  40062c:       d503201f        nop
	  400630:       d65f03c0        ret
	...

	But interestingly, the aarch64 architecture-specific prologue skipper is
	wrong.  There is no prologue, and the breakpoint should be set at 0x400610.

	By using "break *compdir_missing__ldir_missing__file_basename"
	we can get the breakpoint set at 0x400610:
	...
	(gdb) break *compdir_missing__ldir_missing__file_basename^M
	Breakpoint 2 at 0x400610: file tmp-dw2-dir-file-name.c, line 999.^M
	...
	and make the test-case independent of prologue analysis.

	This requires us to update the expected patterns.

	The fix ensures that once the aarch64 architecture-specific prologue skipper
	will be fixed, this test-case won't start failing.

	Tested on x86_64-linux.

2022-08-12  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-11  Lancelot SIX  <lancelot.six@amd.com>

	gdb/varobj: Only re-evaluate invalid globals during re_set
	When doing varobj_re_set, we currently try to recreate floating varobj.
	This was introduced by 4e969b4f0128 "Re-evaluate floating varobj as part
	of varobj_invalidate" to deal with use a after free issue.  However
	since bc20e562ec0 "Fix use after free in varobj" we now ensure that we
	never have dangling pointers so this all recreation is not strictly
	needed anymore for floating varobjs.

	This commit proposes to remove this recreation process for floating
	varobjs.

	Tested on x86_64-linux.

2022-08-11  Tom de Vries  <tdevries@suse.de>
	    Lancelot SIX  <lancelot.six@amd.com>

	gdb/varobj: Reset varobj after relocations have been computed
	[This patch is a followup to the discussion in
	https://sourceware.org/pipermail/gdb-patches/2022-August/191188.html]

	PR/29426 shows failures when running the gdb.mi/mi-var-invalidate-shlib
	test when using a compiler which does not produce a PIE executable by
	default.

	In the testcase, a varobj is created to track a global variable, and
	then the main binary is reloaded in GDB (using the file command).

	During the load of the new binary, GDB tries to recreate the varobj to
	track the global in the new binary (varobj_invalidate_iter).  At this
	point, the old process is still in flight.  So when we try to access to
	the value of the global, in a PIE executable we only have access to the
	unrelocated address (the objfile's text_section_offset () is 0).  As a
	consequence down the line read_value_memory fails to read the unrelated
	address, so cannot evaluate the value of the global.  Note that the
	expression used to access to the global’s value is valid, so the varobj
	can be created.  When using a non PIE executable, the address of the
	global GDB knows about at this point does not need relocation, so
	read_value_memory can access the (old binary’s) value.

	So at this point, in the case of a non-PIE executable the value field is
	set, while it is cleared in the case of PIE executable.  Later when the
	test issues a "-var-update global_var", the command sees no change in
	the case of the non-PIE executable, while in the case of the PIE
	executable install_new_value sees that value changes, leading to a
	different output.

	This patch makes sure that, as we do for breakpoints, we wait until
	relocation has happened before we try to recreate varobjs.  This way we
	have a consistent behavior between PIE and non-PIE binaries.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29426

2022-08-11  Lancelot SIX  <lancelot.six@amd.com>

	gdb/varobj: Do not invalidate locals in varobj_invalidate_iter
	The varobj_invalidate_iter function has logic to invalidate any local
	varobj it can find.  However since bc20e562ec0 "gdb/varobj: Fix use
	after free in varobj" all varobj containing references to an objfile are
	cleared when the objfile goes out of scope.  This means that at this
	point any local varobj seen by varobj_invalidate_iter either has
	already been invalidated by varobj_invalidate_if_uses_objfile or only
	contains valid references and there is no reason to invalidate it.

	This patch proposes to remove this unnecessary invalidation and adds a
	testcase which exercises a scenario where a local varobj can legitimately
	survive a call to varobj_invalidate_iter.

	At this point the varobj_invalidate and varobj_invalidate_iter seem
	misnamed since they deal with re-creating invalid objects and do not do
	invalidation, but this will be fixed in a following patch.

	Tested on x86_64-linux.

2022-08-11  Dmitry Selyutin  <ghostmansd@gmail.com>

	ppc/svp64: support svindex instruction
	https://libre-soc.org/openpower/sv/
	https://libre-soc.org/openpower/sv/remap/#svindex
	https://libre-soc.org/openpower/isa/simplev/

	ppc/svp64: support svremap instruction
	https://libre-soc.org/openpower/sv/
	https://libre-soc.org/openpower/sv/remap/#svremap
	https://libre-soc.org/openpower/isa/simplev/

	ppc/svp64: support svshape instruction
	https://libre-soc.org/openpower/sv/
	https://libre-soc.org/openpower/sv/remap/#svshape
	https://libre-soc.org/openpower/isa/simplev/

	ppc/svp64: support svstep instructions
	https://libre-soc.org/openpower/sv/
	https://libre-soc.org/openpower/sv/svstep/
	https://libre-soc.org/openpower/isa/simplev/

	ppc/svp64: support setvl instructions
	https://libre-soc.org/openpower/sv/
	https://libre-soc.org/openpower/sv/setvl/
	https://libre-soc.org/openpower/isa/simplev/

	ppc/svp64: introduce non-zero operand flag
	svstep and svshape instructions subtract 1 before encoding some of the
	operands. Obviously zero is not supported for these operands. Whilst
	PPC_OPERAND_PLUS1 fits perfectly to mark that maximal value should be
	incremented, there is no flag which marks the fact that zero values are
	not allowed. This patch adds a new flag, PPC_OPERAND_NONZERO, for this
	purpose.

2022-08-11  Dmitry Selyutin  <ghostmansd@gmail.com>

	ppc/svp64: support LibreSOC architecture
	This patch adds support for LibreSOC machine and SVP64 extension flag
	for PowerPC architecture. SV (Simple-V) is a strict RISC-paradigm
	Scalable Vector Extension for the Power ISA. SVP64 is the 64-bit
	Prefixed instruction format implementing SV. Funded by NLnet through EU
	Grants No: 825310 and 825322, SV is in DRAFT form and is to be publicly
	submitted via the OpenPOWER Foundation ISA Working Group via the
	newly-created External RFC Process.

	For more details, visit https://libre-soc.org.

2022-08-11  Torbjörn SVENSSON  <torbjorn.svensson@foss.st.com>

	[Arm] Cleanup arm_m_exception_cache
	With this change, only valid contents of LR are accepted when unwinding
	exception frames for m-profile targets.

	If the contents of LR are anything but EXC_RETURN or FNC_RETURN, it
	will cause GDB to print an error and/or abort unwinding of the frame as
	it's an invalid state for the unwinder.

	The FNC_RETURN pattern requires Security Extensions to be enabled.

2022-08-11  Fangrui Song  <maskray@google.com>

	RISC-V: Remove R_RISCV_GNU_VTINHERIT/R_RISCV_GNU_VTENTRY
	They were legacy relocation types copied from other ports.  The related
	-fvtable-gc was removed from GCC in 2003.

	The associated assembler directives (.vtable_inherit and .vtable_entry)
	have never been supported by the RISC-V port.  Remove related ld code.

	Link: https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/323

2022-08-11  Alan Modra  <amodra@gmail.com>

	PR29466, APP/NO_APP with .linefile
	Commit 53f2b36a54b9 exposed a bug in sb_scrub_and_add_sb that could
	result in losing input.  If scrubbing results in expansion past the
	holding capacity of do_scrub_chars output buffer, then do_scrub_chars
	stashes the extra input for the next call.  That call never came
	because sb_scrub_and_add_sb wrongly decided it was done.  Fix that by
	allowing sb_scrub_and_add_sb to see whether there is pending input.
	Also allow a little extra space so that in most cases we won't need
	to resize the output buffer.

	sb_scrub_and_add_sb also limited output to the size of the input,
	rather than the actual output buffer size.  Fixing that resulted in a
	fail of gas/testsuite/macros/dot with an extra warning: "end of file
	not at end of a line; newline inserted".  OK, so the macro in dot.s
	really does finish without end-of-line.  Apparently the macro
	expansion code relied on do_scrub_chars returning early.  So fix that
	too by adding a newline if needed in macro_expand_body.

		PR 29466
		* app.c (do_scrub_pending): New function.
		* as.h: Declare it.
		* input-scrub.c (input_scrub_include_sb): Add extra space for
		two .linefile directives.
		* sb.c (sb_scrub_and_add_sb): Take into account pending input.
		Allow output to max.
		* macro.c (macro_expand_body): Add terminating newline.
		* testsuite/config/default.exp (SIZE, SIZEFLAGS): Define.
		* testsuite/gas/macros/app5.d,
		* testsuite/gas/macros/app5.s: New test.
		* testsuite/gas/macros/macros.exp: Run it.

2022-08-11  Alan Modra  <amodra@gmail.com>

	regen potfiles

2022-08-11  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-10  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/mi: fix breakpoint script field output
	The "script" field, output whenever information about a breakpoint with
	commands is output, uses wrong MI syntax.

	    $ ./gdb -nx -q --data-directory=data-directory -x script -i mi
	    =thread-group-added,id="i1"
	    =breakpoint-created,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x000000000000111d",func="main",file="test.c",fullname="/home/simark/build/binutils-gdb-one-target/gdb/test.c",line="3",thread-groups=["i1"],times="0",original-location="main"}
	    =breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x000000000000111d",func="main",file="test.c",fullname="/home/simark/build/binutils-gdb-one-target/gdb/test.c",line="3",thread-groups=["i1"],times="0",script={"aaa","bbb","ccc"},original-location="main"}
	    (gdb)
	    -break-info
	    ^done,BreakpointTable={nr_rows="1",nr_cols="6",hdr=[{width="7",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="18",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x000000000000111d",func="main",file="test.c",fullname="/home/simark/build/binutils-gdb-one-target/gdb/test.c",line="3",thread-groups=["i1"],times="0",script={"aaa","bbb","ccc"},original-location="main"}]}
	    (gdb)

	In both the =breakpoint-modified and -break-info output, we have:

	     script={"aaa","bbb","ccc"}

	According to the output syntax [1], curly braces means tuple, and a
	tuple contains key=value pairs.  This looks like it should be a list,
	but uses curly braces by mistake.  This would make more sense:

	    script=["aaa","bbb","ccc"]

	Fix it, keeping the backwards compatibility by introducing a new MI
	version (MI4), in exactly the same way as was done when fixing
	multi-locations breakpoint output in [2].

	 - Add a fix_breakpoint_script_output uiout flag.  MI uiouts will use
	   this flag if the version is >= 4.
	 - Add a fix_breakpoint_script_output_globally variable and the
	   -fix-breakpoint-script-output MI command to set it, if frontends want
	   to use the fixed output for this without using the newer MI version.
	 - When emitting the script field, use list instead of tuple, if we want
	   the fixed output (depending on the two criteria above)
	 -

	[1] https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Output-Syntax.html#GDB_002fMI-Output-Syntax
	[2] https://gitlab.com/gnutools/binutils-gdb/-/commit/b4be1b0648608a2578bbed39841c8ee411773edd

	Change-Id: I7113c6892832c8d6805badb06ce42496677e2242
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=24285

2022-08-10  Andrew Burgess  <aburgess@redhat.com>

	objdump: fix extended (256) disassembler colors
	After commit:

	  commit a88c79b77036e4778e70d62081c3cfd1044bb8e3
	  Date:   Tue Aug 9 14:57:48 2022 +0100

	      Default to enabling colored disassembly if output is to a terminal.

	The 256 extended-color support for --disassembler-color was broken.
	This is fixed in this commit.

		PR 29457
		* objdump (objdump_styled_sprintf): Check disassembler_color
		against an enum value, don't treat it as a bool.

2022-08-10  mga-sc  <mark.goncharov@syntacore.com>

	gdb/riscv: implement cannot_store_register gdbarch method
	The x0 (zero) register is read-only on RISC-V.  Implement the
	cannot_store_register gdbarch method to tell GDB this.

	Without this method GDB will try to write to x0, and relies on the
	target to ignore such writes.  If you are using a target that
	complains (or throws an error) when writing to x0, this change will
	prevent this from happening.

	The gdb.arch/riscv-reg-aliases.exp test exercises writing to x0, and
	will show the errors when using a suitable target.

2022-08-10  Luis Machado  <luis.machado@arm.com>

	Disable year 2038 support on 32-bit hosts by default
	With a recent import of gnulib, code has been pulled that tests and enables
	64-bit time_t by default on 32-bit hosts that support it.

	Although gdb can use the gnulib support, bfd doesn't use gnulib and currently
	doesn't do these checks.

	As a consequence, if we have a 32-bit host that supports 64-bit time_t, we'll
	have a mismatch between gdb's notion of time_t and bfd's notion of time_t.

	This will lead to mismatches in the struct stat size, leading to memory
	corruption and crashes.

	This patch disables the year 2038 check for now, which makes things work
	reliably again.

	I'd consider this a temporary fix until we have proper bfd checks for the year
	2038, if it makes sense.  64-bit hosts seems to be more common these days, so
	I'm not sure how important it is to have this support enabled and how soon
	we want to enable it.

	Thoughts?

2022-08-10  Jan Beulich  <jbeulich@suse.com>

	gas/Dwarf: properly skip zero-size functions
	PR gas/29451

	While out_debug_abbrev() properly skips such functions, out_debug_info()
	mistakenly didn't. It needs to calculate the high_pc expression ahead of
	time, in order to skip emitting any data for the function if the value
	is zero.

	The one case which would still leave a zero-size entry is when
	symbol_get_obj(symp)->size ends up evaluating to zero. I hope we can
	expect that to not be the case, otherwise we'd need to have a way to
	post-process .debug_info contents between resolving expressions and
	actually writing the data out to the file. Even then it wouldn't be
	entirely obvious in which way to alter the data.

2022-08-10  Alan Modra  <amodra@gmail.com>

	PR29462, internal error in relocate, at powerpc.cc:10796
	Prior to the inline plt call support (commit 08be322439), the only
	local syms with plt entries were local ifunc symbols.  There shouldn't
	be stubs for other local symbols so don't look for them.  The patch
	also fixes minor bugs in get_reference_flags; Many relocs are valid
	only for ppc64 and a couple only for ppc32.

		PR 29462
		* powerpc.cc (Target_powerpc::Relocate::relocate): Rename
		use_plt_offset to pltcal_to_direct, invert logic.  For relocs
		not used with inline plt sequences against local symbols, only
		look for stubs when the symbol is an ifunc.
		(Target_powerpc::Scan::get_reference_flags): Correct reloc
		handling for relocs not valid for both 32-bit and 64-bit.

2022-08-10  Youling Tang  <tangyouling@loongson.cn>

	bfd: Add support for LoongArch64 EFI (efi-*-loongarch64).
	This adds support for efi-loongarch64 by virtue of adding a new PEI target
	pei-loongarch64.  This is not a full target and only exists to support EFI at
	this time.

	This means that this target does not support relocation processing and is mostly
	a container format.  This format has been added to elf based loongarch64 targets
	such that efi images can be made natively on Linux.

	However this target is not valid for use with gas but only with objcopy.

	We should't limit addresses to 32-bits for 64-bit vma, otherwise there will be
	"RVA truncated" error when using objcopy on loongarch64.

	With these changes the resulting file is recognized as an efi image.

	Any magic number is based on the Microsoft PE specification [1].

	The test results are as follows:
	$ make check-binutils RUNTESTFLAGS='loongarch64.exp'
	  PASS: Check if efi app format is recognized

	$ objdump -h -f tmpdir/loongarch64copy.o
	  tmpdir/loongarch64copy.o:     file format pei-loongarch64
	  architecture: Loongarch64, flags 0x00000132:
	  EXEC_P, HAS_SYMS, HAS_LOCALS, D_PAGED
	  start address 0x0000000000000000

	  Sections:
	  Idx Name          Size      VMA               LMA               File off  Algn
	    0 .text         0000003c  00000000200000b0  00000000200000b0  00000200  2**2
	                    CONTENTS, ALLOC, LOAD, READONLY, CODE

	[1] https://docs.microsoft.com/en-us/windows/win32/debug/pe-format

	bfd:
	  * .gitignore (pe-loongarch64igen.c): New.
	  * Makefile.am (pei-loongarch64.lo, pe-loongarch64igen.lo, pei-loongarch64.c,
	  pe-loongarch64igen.c): Add support.
	  * Makefile.in: Likewise.
	  * bfd.c (bfd_get_sign_extend_vma): Add pei-loongarch64.
	  * coff-loongarch64.c: New file.
	  * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
	  coff_write_object_contents) Add loongarch64 (loongarch64_pei_vec) support.
	  * config.bfd: Likewise.
	  * configure: Likewise.
	  * configure.ac: Likewise.
	  * libpei.h (GET_OPTHDR_IMAGE_BASE, PUT_OPTHDR_IMAGE_BASE,
	  GET_OPTHDR_SIZE_OF_STACK_RESERVE, PUT_OPTHDR_SIZE_OF_STACK_RESERVE,
	  GET_OPTHDR_SIZE_OF_STACK_COMMIT, PUT_OPTHDR_SIZE_OF_STACK_COMMIT,
	  GET_OPTHDR_SIZE_OF_HEAP_RESERVE, PUT_OPTHDR_SIZE_OF_HEAP_RESERVE,
	  GET_OPTHDR_SIZE_OF_HEAP_COMMIT, PUT_OPTHDR_SIZE_OF_HEAP_COMMIT,
	  GET_PDATA_ENTRY, _bfd_peLoongArch64_bfd_copy_private_bfd_data_common,
	  _bfd_peLoongArch64_bfd_copy_private_section_data,
	  _bfd_peLoongArch64_get_symbol_info, _bfd_peLoongArch64_only_swap_filehdr_out,
	  _bfd_peLoongArch64_print_private_bfd_data_common,
	  _bfd_peLoongArch64i_final_link_postscript,
	  _bfd_peLoongArch64i_only_swap_filehdr_out, _bfd_peLoongArch64i_swap_aouthdr_in,
	  _bfd_peLoongArch64i_swap_aouthdr_out, _bfd_peLoongArch64i_swap_aux_in,
	  _bfd_peLoongArch64i_swap_aux_out, _bfd_peLoongArch64i_swap_lineno_in,
	  _bfd_peLoongArch64i_swap_lineno_out, _bfd_peLoongArch64i_swap_scnhdr_out,
	  _bfd_peLoongArch64i_swap_sym_in, _bfd_peLoongArch64i_swap_sym_out,
	  _bfd_peLoongArch64i_swap_debugdir_in, _bfd_peLoongArch64i_swap_debugdir_out,
	  _bfd_peLoongArch64i_write_codeview_record,
	  _bfd_peLoongArch64i_slurp_codeview_record,
	  _bfd_peLoongArch64_print_ce_compressed_pdata): New.
	  * peXXigen.c (_bfd_XXi_swap_aouthdr_in, _bfd_XXi_swap_aouthdr_out,
	  _bfd_XXi_swap_scnhdr_out, pe_print_pdata, _bfd_XX_print_private_bfd_data_common,
	  _bfd_XX_bfd_copy_private_section_data, _bfd_XXi_final_link_postscript):
	  Support COFF_WITH_peLoongArch64,
	  * pei-loongarch64.c: New file.
	  * peicode.h (coff_swap_scnhdr_in, pe_ILF_build_a_bfd, pe_ILF_object_p):
	  Support COFF_WITH_peLoongArch64.
	  (jtab): Add dummy entry that traps.
	  * targets.c (loongarch64_pei_vec): New.

	binutils
	  * testsuite/binutils-all/loongarch64/loongarch64.exp: New file.
	  * testsuite/binutils-all/loongarch64/pei-loongarch64.d: New test.
	  * testsuite/binutils-all/loongarch64/pei-loongarch64.s: New test.

	include
	  * coff/loongarch64.h: New file.
	  * coff/pe.h (IMAGE_FILE_MACHINE_LOONGARCH64): New.

2022-08-10  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-09  Andrew Burgess  <aburgess@redhat.com>

	gdb/riscv/testsuite: fix failures in gdb.arch/riscv-reg-aliases.exp
	When running on a native RISC-V Linux target I currently see failures
	in the gdb.arch/riscv-reg-aliases.exp test like this:

	  set $ft0.float = 501
	  (gdb) PASS: gdb.arch/riscv-reg-aliases.exp: write non-zero value to ft0
	  p/d $ft0.float
	  $263 = 1140490240
	  (gdb) FAIL: gdb.arch/riscv-reg-aliases.exp: read ft0 after non-zero write to ft0

	This test started failing after this commit:

	  commit 56262a931b7ca8ee3ec9104bc7e9e0b40cf3d64e
	  Date:   Thu Feb 17 13:43:59 2022 -0700

	      Change how "print/x" displays floating-point value

	The problem is that when 501 is written to $ft0.float the value is
	converted to floating point format and stored in the register.  Prior
	to the above commit printing with /x and /d would first extract the
	value as a float, and then convert the value to an integer for
	display.  After the above commit GDB now uses the raw register value
	when displaying /x and /d, and so we see this behaviour:

	  (gdb) info registers $ft0
	  ft0            {float = 501, double = 5.6347704700123827e-315}	(raw 0x0000000043fa8000)
	  (gdb) p/f $ft0.float
	  $1 = 501
	  (gdb) p/d $ft0.float
	  $2 = 1140490240
	  (gdb) p/x $ft0.float
	  $3 = 0x43fa8000

	To fix this test I now print the float registers using the /f format
	rather than /d.  With this change the test now passes.

2022-08-09  Stepan Nemec  <stepnem@gmail.com>

	Another gas manual typo correction.

	Fix typos in assembler documentation.

2022-08-09  Feiyang Chen  <chenfeiyang@loongson.cn>

	gdb/gdbserver: LoongArch: Improve implementation of fcc registers
	The current implementation of the fcc register is referenced to the
	user_fp_state structure of the kernel uapi [1].

	struct user_fp_state {
		uint64_t    fpr[32];
		uint64_t    fcc;
		uint32_t    fcsr;
	};

	But it is mistakenly defined as a 64-bit fputype register, resulting
	in a confusing output of "info register".

	(gdb) info register
	...
	fcc            {f = 0x0, d = 0x0}  {f = 0, d = 0}
	...

	According to "Condition Flag Register" in "LoongArch Reference Manual"
	[2], there are 8 condition flag registers of size 1. Use 8 registers of
	uint8 to make it easier for users to view the fcc register groups.

	(gdb) info register
	...
	fcc0           0x1                 1
	fcc1           0x0                 0
	fcc2           0x0                 0
	fcc3           0x0                 0
	fcc4           0x0                 0
	fcc5           0x0                 0
	fcc6           0x0                 0
	fcc7           0x0                 0
	...

	[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/loongarch/include/uapi/asm/ptrace.h
	[2] https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#_condition_flag_register

2022-08-09  Nick Clifton  <nickc@redhat.com>

	Default to enabling colored disassembly if output is to a terminal.
		PR 29457
		* objdump.c (disassembler_color): Change type to an enum.
		(disassembler_extended_color): Remove.
		(usage): Update.
		(objdump_color_for_assembler_style): Update.
		(main): Update initialisation of disassembler_color.  If not
		initialised via a command line option, set based upon terminal
		output.
		* doc/binutils.texi: Update description of disassmbler-color
		option.
		* testsuite/binutils-all/arc/objdump.exp: Add
		--disassembler-color=off option when disassembling.
		* testsuite/binutils-all/arm/objdump.exp: Likewise.

2022-08-09  Aditya Vidyadhar Kamath  <Aditya.Kamath1@ibm.com>

	Fix-for-multiple-thread-detection-in-AIX.
	In AIX multiple threads were not added. This patch is a fix for the same

	When we create a pthread debug session we have callbacks to read
	symbols and memory.  One of those call backs is pdc_read_data.

	Before we come into aix-thread wait() we switch to no thread and
	therefore the current thread is null.

	When we get into pdc_read_data we have a dependency that we need to
	be in the correct current thread that has caused an event of new
	thread, inorder to read memory.

	Hence we switch to the correct thread.

	This is done by passing the pid in the pthdb_user_t user_current_pid
	parameter in every call back.

2022-08-09  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.dwarf2/debug-names.exp
	When running test-case gdb.dwarf2/debug-names.exp on openSUSE Tumbleweed, I
	run into:
	...
	(gdb) maint info symtabs^M
	  ...
	ERROR: internal buffer is full.
	UNRESOLVED: gdb.dwarf2/debug-names.exp: break _start expanded symtab
	...

	Fix this by simplifying the test-case to print _start rather running to it.

	Tested on x86_64-linux.

2022-08-09  Andrew Burgess  <aburgess@redhat.com>

	gdb/riscv: use register name enum values in riscv-linux-nat.c
	There were a few places where we were using integer values rather than
	the RISCV_*_REGNUM constants defined in riscv-tdep.h.  This commit
	replaces 0 with RISCV_ZERO_REGNUM and 32 with RISCV_PC_REGNUM in a few
	places.

	There should be no user visible changes after this commit.

2022-08-09  Jan Beulich  <jbeulich@suse.com>

	x86-64: adjust MOVQ to/from SReg attributes
	It is unclear to me why the corresponding MOV (no Q suffix) can be
	issued without REX.W, but MOVQ has to have that prefix (bit). Add
	NoRex64 and in exchange drop Size64.

	x86: adjust MOVSD attributes
	The non-SSE2AVX form of the SIMD variant of the instruction needlessly
	has the (still multi-purpose) IgnoreSize attribute. All other similar
	SSE2 insns use NoRex64 instead. Make this consistent, noting that the
	SSE2AVX form can't have the same change made - there the memory operand
	doesn't at the same time permit RegXMM (which logic uses when deciding
	whether a Q suffix is okay outside of 64-bit mode).

	x86: fold AVX VGATHERDPD / VPGATHERDQ
	While the other three variants each differ in attributes and hence can't
	be folded, these two pairs actually can be (and were previously
	overlooked). This effectively matches their AVX512VL counterparts, which
	are also expressed as a single template.

	x86: allow use of broadcast with X/Y/Z-suffixed AVX512-FP16 insns
	While the x/y/z suffix isn't necessary to use in this case, it is still
	odd that these forms don't support broadcast (unlike their AVX512F /
	AVX512DQ counterparts). The lack thereof can e.g. make macro-ized
	programming more difficult.

	x86/Intel: split certain AVX512-FP16 VCVT*2PH templates
	One more place where pre-existing templates should have been taken as a
	basis: In Intel syntax we want to consistently issue an "ambiguous
	operand size" error when a size-less memory operand is specified for an
	insn where register use alone isn't sufficient for disambiguation.

2022-08-09  Jiangshuai Li  <jiangshuai_li@linux.alibaba.com>

	gdb/csky fix build error in ubuntu20_04
	build error in: https://builder.sourceware.org/buildbot/#/builders/170/builds/246
	...
	../../binutils-gdb/gdb/csky-linux-tdep.c: In function ‘void
	csky_supply_fregset(const regset*, regcache*, int, const void*, size_t)’:
	../../binutils-gdb/gdb/csky-linux-tdep.c:194:18: error: format ‘%ld’
	expects argument of type ‘long int’, but argument 2 has type ‘size_t’
	{aka ‘unsigned int’} [-Werror=format=]
	   194 |       warning (_("Unknow size %ld of section .reg2, can not get
	value"
	       |
	^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	   195 |    " of float registers."), len);
	...

	Fix it via using %s vs pulongest suggested by Tom.

2022-08-09  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-08  Tom Tromey  <tromey@adacore.com>

	Fix regression from gdbarch registry change
	The gdbarch registry patch introduced a regression that could cause a
	crash when opening files in gdb.  The bug is that, previously, the
	solib ops would default to current_target_so_ops; but the patch
	changed this code to default to nullptr.  This patch fixes the bug by
	reintroducing the earlier behavior.  This is PR gdb/29449.

	I managed to reproduce the bug with a riscv-elf build and then
	verified that this fixes the problem.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29449

2022-08-08  Martin Liska  <mliska@suse.cz>

	add splay tree for info_ptr -> CU mapping
	While using perf top for MozillaThunderbird I noticed quite some slow
	dissably call with source code involved. E.g.

	time ./objdump --start-address=0x0000000004e0dcd0 --stop-address=0x0000000004e0df8b -l -d --no-show-raw-insn -S -C /usr/lib64/thunderbird/libxul.so

	took 2.071s and I noticed quite some time is spent in
	find_abstract_instance:

	    33.46%  objdump  objdump               [.] find_abstract_instance
	    18.22%  objdump  objdump               [.] arange_add
	    13.77%  objdump  objdump               [.] read_attribute_value
	     4.82%  objdump  objdump               [.] comp_unit_maybe_decode_line_info
	     3.10%  objdump  libc.so.6             [.] __memset_avx2_unaligned_erms

	where linked list of CU is iterated when searing for where info_ptr
	belongs to:

	         : 3452   for (u = unit->prev_unit; u != NULL; u = u->prev_unit)
	    0.00 :   4c61f7: mov    0x10(%rbx),%rax
	    0.00 :   4c61fb: test   %rax,%rax
	    0.00 :   4c61fe: je     4c6215 <find_abstract_instance+0x365>
	         : 3453   if (info_ptr >= u->info_ptr_unit && info_ptr < u->end_ptr)
	    0.00 :   4c6200: cmp    0x60(%rax),%rdx
	   83.20 :   4c6204: jb     4c620c <find_abstract_instance+0x35c>
	    0.00 :   4c6206: cmp    0x78(%rax),%rdx
	    6.89 :   4c620a: jb     4c6270 <find_abstract_instance+0x3c0>
	         : 3452   for (u = unit->prev_unit; u != NULL; u = u->prev_unit)
	    0.00 :   4c620c: mov    0x10(%rax),%rax
	    7.90 :   4c6210: test   %rax,%rax
	    0.00 :   4c6213: jne    4c6200 <find_abstract_instance+0x350>

	The following scan can be replaced with search in a splay tree and with
	that I can get to 1.5s and there are other symbols where the difference
	is even bigger.

	bfd/ChangeLog:

		PR 29081
		* dwarf2.c (struct addr_range): New.
		(addr_range_intersects): Likewise.
		(splay_tree_compare_addr_range): Likewise.
		(splay_tree_free_addr_range): Likewise.
		(struct dwarf2_debug_file): Add comp_unit_tree.
		(find_abstract_instance): Use the splay tree when searching
		for a info_ptr.
		(stash_comp_unit): Insert to the splay tree.
		(_bfd_dwarf2_cleanup_debug_info): Clean up the splay tree.

2022-08-08  Martin Liska  <mliska@suse.cz>

	dwarf: use find_abstract_instance for vars and DW_AT_specification
	The following simple test case fails when dwz is used:

	$ cat demo.C
	namespace std {
	  enum { _S_fixed, _S_floatfield = _S_fixed };
	  struct {
	    struct {};
	  }
	  __ioinit;
	}

	int main() {
	  return 0;
	}

	$ g++ demo.C -g && cp a.out b.out && dwz -m xxx.so a.out b.out && objdump -S a.out >/dev/null
	objdump: DWARF error: could not find variable specification at offset 0x3d3

	As seen the reference is defined in xxx.so shared part:

	$ eu-readelf -w -N a.out | grep -A3 -B3 3d3
	             decl_column          (data1) 11
	             sibling              (ref_udata) [   387]
	 [   387]    variable             abbrev: 30
	             specification        (GNU_ref_alt) [   3d3]
	             location             (exprloc)
	              [ 0] addr 0x404019
	 [   396]    subprogram           abbrev: 32

	$ eu-readelf -w -N a.out | less

	...

	 Compilation unit at offset 920:
	 Version: 5, Abbreviation section offset: 0, Address size: 8, Offset size: 4
	 Unit type: partial (3)
	...
	 [   3d3]      variable             abbrev: 31
	               name                 (strp) "__ioinit"
	               decl_file            (data1) demo.C (10)
	               decl_line            (data1) 6
	               decl_column          (data1) 3
	               type                 (ref_udata) [   3c4]
	               declaration          (flag_present) yes

	With the patch the same output is emitted as before usage of dwz.

	bfd/ChangeLog:

		PR 29442
		* dwarf2.c (struct varinfo): Use const char * type.
		(scan_unit_for_symbols): Call find_abstract_instance for
		DW_AT_specification for variables that can be in a different CU
		(e.g. done by dwz)

2022-08-08  Tsukasa OI  <research_trasio@irq.a4lg.com>

	Mach-O: i18n enablement on some error messages.
		* config/obj-macho.c (obj_mach_o_get_section_names): Wrap two
		string literals within with gettext macro.

2022-08-08  Martin Liska  <mliska@suse.cz>

	ld: fix NEWS typos
	ld/ChangeLog:

		* NEWS: Fix 2 typos.

2022-08-08  Nick Clifton  <nickc@redhat.com>

	Add a link to the NEWS files in the release announcement email.

2022-08-08  Jiangshuai Li  <jiangshuai_li@linux.alibaba.com>

	gdb/csky support .reg2 for kernel 4.x and later
	When kernel's version >= 4.x, the size of .reg2 section will be 400.
	Contents of .reg2 are {
	    unsigned long vr[96];
	    unsigned long fcr;
	    unsigned long fesr;
	    unsigned long fid;
	    unsigned long reserved;
	};

	VR[96] means: (vr0~vr15) + (fr16~fr31), each Vector register is
	128-bits, each Float register is 64 bits, the total size is
	(4*96).

	In addition, for fr0~fr15, each FRx is the lower 64 bits of the
	corresponding VRx. So fr0~fr15 and vr0~vr15 regisetrs use the same
	offset.

2022-08-08  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-07  Tom de Vries  <tdevries@suse.de>

	[gdb/build] Fix build with gcc 4.8.5
	When building with gcc 4.8.5, I run into:
	...
	user-regs.c:85:1: error: could not convert \
	  ‘{0l, (& builtin_user_regs.gdb_user_regs::first)}’ from \
	  ‘<brace-enclosed initializer list>’ to ‘gdb_user_regs’
	 };
	 ^
	...

	Fix this by removing the initialization and handling regs.last == nullptr in
	append_user_reg.

	Tested on x86_64-linux.

2022-08-07  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Fix assert in read_addrmap_from_aranges
	When loading the debug-names-duplicate-cu executable included in this
	test-case, we run into:
	...
	(gdb) file debug-names-duplicate-cu^M
	Reading symbols from debug-names-duplicate-cu...^M
	src/gdb/dwarf2/read.c:2353: internal-error: read_addrmap_from_aranges: \
	  Assertion `insertpair.second' failed.^M
	...

	This assert was added in recent commit 75337cbc147 ("[gdb/symtab] Fix
	.debug_aranges duplicate offset warning").

	The assert triggers because the CU table in the .debug_names section contains
	a duplicate:
	...
	Version 5
	Augmentation string: 47 44 42 00  ("GDB")
	CU table:
	[  0] 0x0
	[  1] 0x0
	...

	Fix this by rejecting the .debug_names index:
	...
	(gdb) file debug-names-duplicate-cu^M
	Reading symbols from debug-names-duplicate-cu...^M
	warning: Section .debug_names has duplicate entry in CU table, \
	  ignoring .debug_names.^M
	...

	Likewise for the case where the CU table is not sorted by increasing offset.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29436

2022-08-07  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add support for .debug_names in dwarf assembler
	Add:
	- support for a per-module .debug_names section in the dwarf assembler, and
	- a test-case excercising this new functionality.

	A per-module .debug_names section needs to have an entry in the CU list for
	each CU in the module, which is made more difficult by two things:
	- linking in other objects, which may contain additional CUs
	  (typically the case on openSUSE), and
	- adding dummy CUs in the dwarf assembler.
	We handle this by:
	- compiling with -nostartfiles (so the test-case contains _start rather than
	  main), and
	- disabling the dummy CU generation for the test-case.

	I've kept things simple by having the test-case specify the hash value, rather
	than adding that functionality in the dwarf assembler.

	Also I've kept the bucket count to 1, which makes it trivial to satisfy the
	requirement that "the symbol is entered into a bucket whose index is the hash
	value modulo bucket_count".

	The readelf dump of the .debug_names section from the test-case looks like:
	...
	Version 5
	Augmentation string: 47 44 42 00  ("GDB")
	CU table:
	[  0] 0x0

	TU table:

	Foreign TU table:

	Used 1 of 1 bucket.
	Out of 2 items there are 1 bucket clashes (longest of 1 entries).

	Symbol table:
	[  0] #eddb6232 _start: <1> DW_TAG_subprogram DW_IDX_compile_unit=0
	[  1] #0b888030 int: <2> DW_TAG_base_type DW_IDX_compile_unit=0
	...

	Tested on x86_64-linux.

2022-08-07  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-06  Alan Modra  <amodra@gmail.com>

	asan: heap buffer overflow in _bfd_error_handler
	On coff_slurp_symbol_table printing "unrecognized storage class"
	for a symbol error.  If the symbol name is the last string in its
	section and not terminated, we run off the end of the buffer.

		* coffgen.c (build_debug_section): Terminate the section with
		an extra 0.

2022-08-06  Alan Modra  <amodra@gmail.com>

	asan: segfault in coff_write_auxent_fname
	More fuzzed input file nonsense.

		* coffgen.c (coff_write_symbol): Don't call coff_write_auxent_fname
		when extrap is NULL.

2022-08-06  Alan Modra  <amodra@gmail.com>

	msan: bfd_mach_o_layout_commands use of uninitialised value
	Catches fuzzed input with unterminated strings that later run off the
	end of their buffers when calling strlen.

		* mach-o.c: Use size_t vars where approprite.
		(bfd_mach_o_alloc_and_read): Add "extra" param.  Allocate that
		much extra and clear.  Update all callers, those that set up
		strings with one extra byte.

2022-08-06  Alan Modra  <amodra@gmail.com>

	objcopy section alignment
	bfd_set_section_alignment currently always returns true.  This patch
	changes it to return false on silly alignment values, avoiding yet
	another way to trigger ubsan errors like coffcode.h:3192:12: runtime
	error: shift exponent 299 is too large for 32-bit type 'int'.  We'll
	catch that one in objcopy.c:setup_sections.  However, setup_sections
	gives up on other setup operations that are necessary even after an
	error of some sort.  Change that to keep going, which might change the
	error message but that shouldn't matter in the least.

	bfd/
		* section.c (bfd_set_section_alignment): Return false and
		don't set alignment_power for stupidly large alignments.
		* bfd-in2.h: Regenerate.
		* coffcode.h (coff_compute_section_file_positions): Don't use
		an int constant when calculating alignment.
	binutils/
		* objcopy.c (setup_section): Keep on going after hitting
		non-fatal errors.

2022-08-06  Alan Modra  <amodra@gmail.com>

	ubsan: som.c undefined shift in som_set_reloc_info
	Do the shift using unsigned variables to avoid UB on << 8.

		* som.c (som_set_reloc_info): Make v unsigned.  Localise some
		variables to their blocks.

2022-08-06  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-05  Alan Modra  <amodra@gmail.com>

	Get rid of BFD_VMA_FMT
	Remove the BFD_VMA_FMT defines in bfd.h and configure support.

		* bfd-in.h (BFD_VMA_FMT): Don't define.
		* configure.ac (BFD_INT64_FMT): Remove configure test.
		* configure.com: Likewise.
		* Makefile.in: Regenerate.
		* bfd-in2.h: Regenerate.
		* configure: Regenerate.

2022-08-05  Alan Modra  <amodra@gmail.com>

	Don't use BFD_VMA_FMT in gdb and sim
	Like commit b82817674f, this replaces BFD_VMA_FMT "x" in sim/ with
	PRIx64 and casts to promote bfd_vma to uint64_t.  The one file using
	BFD_VMA_FMT in gdb/ instead now uses hex_string, and a typo in the
	warning message is fixed.

2022-08-05  Tom de Vries  <tdevries@suse.de>

	[gdb/build] Fix build breaker in language.c with gcc 7.5.0
	When building gdb on openSUSE Leap 15.3, using gcc 7.5.0, I run into:
	...
	gdb/language.c: In constructor ‘constexpr language_gdbarch::language_gdbarch()’:
	gdb/language.c:921:8: error: use of deleted function \
	  ‘language_arch_info::language_arch_info(const language_arch_info&)’
	 struct language_gdbarch
	        ^~~~~~~~~~~~~~~~
	In file included from gdbsupport/common-defs.h:104:0,
	                 from gdb/defs.h:28,
	                 from gdb/language.c:31:
	gdb/language.h:95:28: note: declared here
	   DISABLE_COPY_AND_ASSIGN (language_arch_info);
	                            ^
	include/ansidecl.h:342:3: note: in definition of macro \
	  ‘DISABLE_COPY_AND_ASSIGN’
	   TYPE (const TYPE&) = delete;   \
	   ^~~~
	gdb/language.c: In function ‘language_gdbarch* get_language_gdbarch(gdbarch*)’:
	gdb/language.c:936:22: note: synthesized method ‘constexpr \
	  language_gdbarch::language_gdbarch()’ first required here
	       l = new struct language_gdbarch;
	                      ^~~~~~~~~~~~~~~~
	...

	This seems to be fixed by this change in the struct language_gdbarch
	definition:
	...
	-  struct language_arch_info arch_info[nr_languages] {};
	+  struct language_arch_info arch_info[nr_languages];
	...

	Tested on x86_64-linux.

2022-08-05  Tom de Vries  <tdevries@suse.de>

	[gdb] Add unit test for gdb::sequential_for_each
	With commit 18a5766d09c ("[gdbsupport] Add sequential_for_each") I added a
	drop-in replacement for gdb::parallel_for_each, but there's nothing making
	sure that the two remain in sync.

	Extend the unit test for gdb::parallel_for_each to test both.

	Do this using a slightly unusual file-self-inclusion.  Doing so keep things
	readable and maintainable, and avoids macrofying functions.

	Tested on x86_64-linux.

2022-08-05  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Use task size in parallel_for_each in dwarf2_build_psymtabs_hard
	In dwarf2_build_psymtabs_hard, we use a parallel_for_each to distribute CUs
	over threads.

	Ensuring a fair distribution over the worker threads and main thread in terms
	of number of CUs might not be the most efficient way, given that CUs can vary
	in size.

	Fix this by using per_cu->get_length () as the task size.

	I've used this experiment to verify the performance impact:
	...
	$ for n in $(seq 1 10); do \
	    time gdb -q -batch ~/firefox/libxul.so-93.0-1.1.x86_64.debug \
	    2>&1 \
	    | grep "real:"; \
	  done
	...
	and without the patch got:
	...
	real: 4.71
	real: 4.88
	real: 4.29
	real: 4.30
	real: 4.65
	real: 4.27
	real: 4.27
	real: 4.27
	real: 4.75
	real: 4.41
	...
	and with the patch:
	...
	real: 3.68
	real: 3.81
	real: 3.80
	real: 3.68
	real: 3.75
	real: 3.69
	real: 3.69
	real: 3.74
	real: 3.67
	real: 3.74
	...
	so that seems a reasonable improvement.

	With parallel_for_each_debug set to true, we get some more detail about
	the difference in behaviour.  Without the patch we have:
	...
	Parallel for: n_elements: 2818
	Parallel for: minimum elements per thread: 1
	Parallel for: elts_per_thread: 704
	Parallel for: elements on worker thread 0       : 705
	Parallel for: elements on worker thread 1       : 705
	Parallel for: elements on worker thread 2       : 704
	Parallel for: elements on worker thread 3       : 0
	Parallel for: elements on main thread           : 704
	...
	and with the patch:
	...
	Parallel for: n_elements: 2818
	Parallel for: total_size: 1483674865
	Parallel for: size_per_thread: 370918716
	Parallel for: elements on worker thread 0       : 752   (size: 371811790)
	Parallel for: elements on worker thread 1       : 360   (size: 371509370)
	Parallel for: elements on worker thread 2       : 1130  (size: 372681710)
	Parallel for: elements on worker thread 3       : 0     (size: 0)
	Parallel for: elements on main thread           : 576   (size: 367671995)
	...

	Tested on x86_64-linux.

2022-08-05  Tom de Vries  <tdevries@suse.de>

	[gdbsupport] Add task size parameter in parallel_for_each
	Add a task_size parameter to parallel_for_each, defaulting to nullptr, and use
	the task size to distribute similarly-sized chunks to the threads.

	Tested on x86_64-linux.

2022-08-05  Pedro Alves  <pedro@palves.net>

	Introduce gdb::make_function_view
	This adds gdb::make_function_view, which lets you create a function
	view from a callable without specifying the function_view's template
	parameter.  For example, this:

	    auto lambda = [&] (int) { ... };
	    auto fv = gdb::make_function_view (lambda);

	instead of:

	    auto lambda = [&] (int) { ... };
	    gdb::function_view<void (int)> fv = lambda;

	It is particularly useful if you have a template function with an
	optional function_view parameter, whose type depends on the function's
	template parameters.  Like:

	    template<typename T>
	    void my_function (T v, gdb::function_view<void(T)> callback = nullptr);

	For such a function, the type of the callback argument you pass must
	already be a function_view.  I.e., this wouldn't compile:

	    auto lambda = [&] (int) { ... };
	    my_function (1, lambda);

	With gdb::make_function_view, you can write the call like so:

	    auto lambda = [&] (int) { ... };
	    my_function (1, gdb::make_function_view (lambda));

	Unit tests included.

	Tested by building with GCC 9.4, Clang 10, and GCC 4.8.5, on x86_64
	GNU/Linux, and running the unit tests.

	Change-Id: I5c4b3b4455ed6f0d8878cf1be189bea3ee63f626

2022-08-05  Nick Clifton  <nickc@redhat.com>

	Update following 2.39 release

2022-08-05  Alan Modra  <amodra@gmail.com>

	asan: ppc64_elf_get_synthetic_symtab heap buffer overflow
	Fuzzed input files with sizes of .dynamic not a multiple of dynamic
	tag size can result in reading past the end of the buffer with the
	current simple checks.  Fix that, and use the same check in other
	files that process input object .dynamic section.  (There is no need
	for buffer overflow checks in the linker's generated .dynamic
	section.)

		* elf32-ppc.c (ppc_elf_get_synthetic_symtab): Sanity check
		.dynamic content buffer reads.
		* elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Likewise.
		* elf64-ia64-vms.c (elf64_vms_link_add_object_symbols): Likewise.
		* elf.c (_bfd_elf_print_private_bfd_data): Simplify .dynamic
		buffer sanity checks.
		* elflink.c (elf_link_add_object_symbols): Avoid possible UB
		subtracting sizeof_dyn from pointer.

2022-08-05  Alan Modra  <amodra@gmail.com>

	Sanity check loc_offsets index
	Fixes a segfault found by the fuzzers.

		* dwarf.c (fetch_indexed_value): Return -1 on error.
		(read_and_display_attr_value): Don't display string when
		fetch_indexed_value returns an error.  Sanity check loc_offsets
		index.

2022-08-05  Jan Beulich  <jbeulich@suse.com>

	binutils/Dwarf: avoid "shadowing" of glibc function name
	As before: Old enough glibc has an (unguarded) declaration of index()
	in string.h, which triggers a "shadows a global declaration" warning.

2022-08-05  Tsukasa OI  <research_trasio@irq.a4lg.com>

	gas: fix a testcase broken by new ZSTD support
	The commit 1369522f36eece1b37139a81f7f2139ba3915172 ("Recognize the new ELF
	compression type for ZSTD.") added the new ELF compression type but it
	accidentally broke a GAS testcase.  Since testing for the section type
	"2048" (SHF_COMPRESSED) is not going to be portable in the long term, it
	now tests SHF_LINK_ORDER ("128") instead.

	Using SHF_LINK_ORDER (with possibly sh_link == 0) is an idea by Jan Beulich.

	gas/ChangeLog:

		* testsuite/gas/elf/section10.s: Use SHF_LINK_ORDER to test
		mixed numeric and alpha values.
		* testsuite/gas/elf/section10.d: Reflect the change above.

2022-08-05  Nick Clifton  <nickc@redhat.com>

	When gas/read.c calls mbstowcs with a NULL destination, it should set size to 0
		PR 29447
		* read.c (read_symbol_name): Pass 0 as the length parameter when
		invoking mbstowc in order to check the validity of a wide string.

2022-08-05  Tom de Vries  <tdevries@suse.de>

	[gdb] Add debug_{exp,val}
	When debugging cc1 I heavily rely on simple one-parameter debug functions
	that allow me to inspect a variable of a common type, like:
	- debug_generic_expr
	- debug_gimple_stmt
	- debug_rtx
	and I miss similar functions in gdb.

	Add functions to dump variables of types 'value' and 'expression':
	- debug_exp, and
	- debug_val.

	Tested on x86_64-linux, by breaking on varobj_create, and doing:
	...
	(gdb) call debug_exp (var->root->exp.get ())
	&"Operation: OP_VAR_VALUE\n"
	&" Block symbol:\n"
	&"  Symbol: aaa\n"
	&"  Block: 0x2d064f0\n"
	(gdb)
	...
	and:
	...
	(gdb) call debug_val (value)
	&"5"
	(gdb)
	...

2022-08-05  Luca Boccassi  <bluca@debian.org>

	Add gold support for --package-metadata option.
	Following the same format as the implementation in ld:
	9e2bb0cb5e74aed4158f08495534922d7108f928

	Generate a .note.package FDO package metadata ELF note, following
	the spec: https://systemd.io/ELF_PACKAGE_METADATA/

	If the jansson library is available at build time (and it is explicitly
	enabled), link ld to it, and use it to validate that the input is
	correct JSON, to avoid writing garbage to the file. The
	configure option --enable-jansson has to be used to explicitly enable
	it (error out when not found). This allows bootstrappers (or others who
	are not interested) to seamlessly skip it without issues.

	elfcpp/
		* elfcpp.h: Add FDO_PACKAGING_METADATA note type.

	gold/
		* Makefile.am: Add jansson flags and libraries.
		* configure.ac: Check for jansson library.
		* layout.cc (Layout::create_notes): Call create_package_metadata().
		(Layout::create_package_metadata): New function.
		* layout.h (Layout::create_package_metadata): New function.
		(Layout::package_metadata_note_): New data member.
		* options.h (class General_options): Add --package-metadata option.
		* testsuite/Makefile.am (object_unittest): Add jansson libraries.
		(binary_unittest): Likewise.
		(leb128_unittest): Likewise.
		(overflow_unittest): Likewise.
		(package_metadata_test): New test.
		* testsuite/package_metadata_main.c: New test source.

2022-08-05  Cary Coutant  <ccoutant@gmail.com>

	Recognize the new ELF compression type for ZSTD.
	There is more work to be done to actually support compression and
	decompression using the zstd library, but I will leave that to the
	champions of the new compression option.

	binutils/
		* binutils/readelf.c (process_section_headers): Add support for
		ELFCOMPRESS_ZSTD.

2022-08-05  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-04  Tom Tromey  <tom@tromey.com>

	Use registry in gdbarch
	gdbarch implements its own registry-like approach.  This patch changes
	it to instead use registry.h.  It's a rather large patch but largely
	uninteresting -- it's mostly a straightforward conversion from the old
	approach to the new one.

	The main benefit of this change is that it introduces type safety to
	the gdbarch registry.  It also removes a bunch of code.

	One possible drawback is that, previously, the gdbarch registry
	differentiated between pre- and post-initialization setup.  This
	doesn't seem very important to me, though.

2022-08-04  Tom Tromey  <tom@tromey.com>

	Allow registry to refer to const types
	So far, the registry hasn't been used to refer to a 'const' type, but
	this changes with the gdbarch change.  This patch arranges to let the
	registry store a pointer-to-const, by removing const in the 'set'
	method.

	Use new and delete for gdbarch
	This changes gdbarch to use new and delete.

	Use bool in gdbarch
	This changes gdbarch to use bool for initialized_p.

2022-08-04  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix .debug_aranges in gdb.dwarf2/fission-loclists.S
	When running test-case gdb.dwarf2/fission-loclists.exp, I noticed:
	...
	warning: Section .debug_aranges in fission-loclists has duplicate \
	  debug_info_offset 0x8f, ignoring .debug_aranges.^M
	...

	Fix this by removing the duplicate .debug_aranges entry.

	Tested on x86_64-linux.

2022-08-04  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix ERROR in gdb.base/watchpoint-unaligned.exp
	In PR23888 an error is reported:
	...
	ERROR: tcl error sourcing watchpoint-unaligned.exp.
	ERROR: expected boolean value but got ""
	    while executing
	"if {$wpnum} {
	...

	This presumably happens when:
	- skip_hw_watchpoint_tests returns 0 meaning hw watchpoints are supported
	- gdb fails to set a hw watchpoint and instead sets a sw watchpoint

	That particular situation is handled for arm:
	...
	    -re "Watchpoint (\[0-9\]+): .*\r\n$gdb_prompt $" {
	        if {[istarget "arm*-*-*"]} {
	            untested $test
	            set wpnum 0
	        }
	    }
	...
	but not for any other targets so wpnum remains "", triggering the ERROR.

	Possibly this has been fixed for powerpc by commit 8d4e4d13afb ("gdb Power 9
	add test for HW watchpoint support."), but it's still possible for other
	targets.

	Fix this by:
	- initializing wpnum to 0 instead of ""
	- signalling the failure to set a hw watchpoint by a fail

	Tested on x86_64-linux, also by adding:
	...
	gdb_test_no_output "set can-use-hw-watchpoints 0"
	...
	and verifying that it triggers the fail.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=23888

2022-08-04  Tom de Vries  <tdevries@suse.de>

	[gdb/tdep] Fix gdb.base/large-frame.exp for aarch64
	On aarch64, I run into:
	...
	FAIL: gdb.base/large-frame.exp: optimize=-O0: backtrace
	...

	The problem is that the architecture-specific prologue analyzer fails to
	handle the first two insns in the prologue properly:
	...
	0000000000400610 <func>:
	  400610:       d2880210        mov     x16, #0x4010
	  400614:       cb3063ff        sub     sp, sp, x16
	  400618:       a9007bfd        stp     x29, x30, [sp]
	  40061c:       910003fd        mov     x29, sp
	  400620:       910043a0        add     x0, x29, #0x10
	  400624:       97fffff0        bl      4005e4 <blah>
	...
	so we get:
	...
	$ gdb -q -batch ./outputs/gdb.base/large-frame/large-frame-O0 -ex "b func"
	Breakpoint 1 at 0x400614
	...

	Fix this by:
	- fixing the support for the first insn to extract the immediate operand, and
	- adding support for the second insn,
	such that we have:
	...
	Breakpoint 1 at 0x400624
	...
	Note that we're overshooting by one insn (0x400620 is the first insn after the
	prologue), but that's a pre-existing problem.

	Tested on aarch64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29408

2022-08-04  Alan Modra  <amodra@gmail.com>

	Don't use BFD_VMA_FMT in binutils
	BFD_VMA_FMT can't be used in format strings that need to be
	translated, because the translation won't work when the type of
	bfd_vma differs from the machine used to compile .pot files.  We've
	known about this for a long time, but patches slip through review.

	So just get rid of BFD_VMA_FMT, instead using the appropriate PRId64,
	PRIu64, PRIx64 or PRIo64 and SCN variants for scanf.  The patch is
	mostly mechanical, the only thing requiring any thought is casts
	needed to preserve PRId64 output from bfd_vma values, or to preserve
	one of the unsigned output formats from bfd_signed_vma values.

2022-08-04  Alan Modra  <amodra@gmail.com>

	Re: Get rid of fprintf_vma and sprintf_vma
	Commit f493c2174e messed the formatting in linker map files,
	particularly for 32-bit builds where a number of tests using map files
	regressed.  I should have noticed the BFD64 conditional printing of
	spaces to line up output due to the original %V printing hex vmas with
	16 digits when BFD64 and 8 digits when not.  Besides that, it is nicer
	to print 32-bit vmas for 32-bit targets.  So change %V back to be
	target dependent, now using bfd_sprintf_vma.  Since minfo doesn't
	return the number of chars printed, that means some places that
	currently use %V must instead sprintf to a buffer in order to find the
	length printed.

		* ldmisc.h (print_spaces): Declare.
		(print_space): Change to a macro.
		* ldmisc.c (vfinfo): Use bfd_sprintf_vma for %V.  Tidy %W case.
		(print_space): Delete.
		(print_spaces): New function.
		* emultempl/aix.em (print_symbol): Use print_spaces.
		* ldctor.c (ldctor_build_sets): Likewise.
		* ldmain.c (add_archive_element): Likewise.
		* ldlang.c (print_one_symbol, lang_print_asneeded): Likewise.
		(print_output_section_statement, print_data_statement): Likewise.
		(print_reloc_statement, print_padding_statement): Likewise.
		(print_assignment): Likewise.  Also replace %V printing of vmas
		with printing to a buffer in order to properly format output.
		(print_input_section, lang_one_common): Likewise.

2022-08-04  Alan Modra  <amodra@gmail.com>

	MIPS: Use R_MIPS_REL16 for BFD_RELOC_16
	R_MIPS_REL16 isn't a pc-relative reloc as the name might indicate.

		* elf64-mips.c (mips_reloc_map): Map BFD_RELOC_16 to R_MIPS_REL16.
		* elfn32-mips.c (mips_reloc_map): Likewise.

2022-08-04  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-03  H.J. Lu  <hjl.tools@gmail.com>

	elf: Reset alignment for each PT_LOAD segment
	Reset alignment for each PT_LOAD segment to avoid using alignment from
	the previous PT_LOAD segment.

	bfd/

		PR ld/29435
		* elf.c (assign_file_positions_for_load_sections): Reset
		alignment for each PT_LOAD segment.

	ld/

		PR ld/29435
		* testsuite/ld-elf/pr29435.d: New file.
		* testsuite/ld-elf/pr29435.s: Likewise.

2022-08-03  Tom Tromey  <tom@tromey.com>

	Use unique_ptr to destroy per-bfd object
	In some cases, the objfile owns the per-bfd object.  This is yet
	another object that can sometimes be destroyed before the registry is
	destroyed, possibly reslting in a use-after-free.  Also, I noticed
	that the condition for deleting the object is not the same as the
	condition used to create it -- so it could possibly result in a memory
	leak in some situations.  This patch fixes the problem by introducing
	a new unique_ptr that holds this object when necessary.

	Use auto_obstack in objfile
	This changes objfile to use an auto_obstack.  This helps prevent
	use-after-free bugs, because it ensures that anything allocated on the
	objfile obstack will live past the point at which the registry object
	is destroyed.

	Use gdb_bfd_ref_ptr in objfile
	This changes struct objfile to use a gdb_bfd_ref_ptr.  In addition to
	removing some manual memory management, this fixes a use-after-free
	that was introduced by the registry rewrite series.  The issue there
	was that, in some cases, registry shutdown could refer to memory that
	had already been freed.  This help fix the bug by delaying the
	destruction of the BFD reference (and thus the per-bfd object) until
	after the registry has been shut down.

2022-08-03  Ruud van der Pas  <ruud.vanderpas@oracle.com>

	gprofng: fix bug 29410 - Argument "&nbsp;0." isn't numeric in numeric gt (>)
	gprofng/Changelog:
	2022-08-02  Ruud van der Pas  <ruud.vanderpas@oracle.com>

		PR gprofng/29410
		* gp-display-html/gp-display-html.in: Remove non-breaking spaces.

2022-08-03  Alan Modra  <amodra@gmail.com>

	Fix a conflict between the linker's need to rename some PE format input libraries and the BFD library's file caching mechanism.
		PR 29389
	bfd	* bfd.c (BFD_CLOSED_BY_CACHE): New bfd flag.
		* cache.c (bfd_cache_delete): Set BFD_CLOSED_BY_DELETE on the
		closed bfd.
		(bfd_cache_lookup_worker): Clear BFD_CLOSED_BY_DELETE on the newly
		reopened bfd.
		* opncls.c (bfd_set_filename): Refuse to change the name of a bfd
		that has been closed by bfd_cache_delete.  Mark changed bfds as
		uncacheable.
		* bfd-in2.h: Regenerate.

	ld	* ldlang.h (lang_input_statement_struct): Add sort_key field.
		* emultempl/pe.em (after_open): If multiple import libraries refer
		to the same bfd, store their names in the sort_key field.
		* emultempl/pep.em (after_open): Likewise.
		* ldlang.c (sort_filename): New function.  Returns the filename to
		be used when sorting input files.
		(wild_sort): Use the sort_filename function.

2022-08-03  Enze Li  <enze.li@hotmail.com>

	gdb/amd64: clean up unused variable
	When building with clang 15, I got this,

	  CXX    amd64-tdep.o
	amd64-tdep.c:1410:13: error: variable 'insn' set but not used[-Werror,-Wunused-but-set-variable]
	    gdb_byte *insn = insn_details->raw_insn + modrm_offset;
	                ^
	1 error generated.

	The function that uses this variable has been removed in this commit,

	commit 870f88f7551b0f2d6aaaa36fb684b5ff8f468107
	Date:   Mon Apr 18 13:16:27 2016 -0400

	    remove trivialy unused variables

	Fix this by removing unused variable.

	Tested by rebuilding on x86_64-linux with clang 15 and gcc 12.

2022-08-03  Lancelot SIX  <lancelot.six@amd.com>

	gdb: Fix regression in varobj recreation
	Commit bc20e562ec0 "Fix use after free in varobj" introduced a
	regression.  This commit makes sure that the varobj object does not
	keeps stale references to object being freed when we unload an objfile.
	This includes the "valid_block" field which is reset to nullptr if the
	pointed to block is tied to an objfile being freed.

	However, at some point varobj_invalidate_iter might try to recreate
	varobjs tracking either floating or globals.  Varobj tracking globals
	are identified as having the "valid_block" field set nullptr, but as
	bc20e562ec0 might clear this field, we have lost the ability to
	distinguish between varobj referring to globals and non globals.

	Fix this by introducing a "global" flag which tracks if a given varobj
	was initially created as tracking a global.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29426

2022-08-03  Alan Modra  <amodra@gmail.com>

	Re: PE objdump -x
	All of these buffer overrun tests are better written as a comparison
	against size remaining, due to ISO C 9899 standard 6.5.2 para 8
	regarding adding a constant to a pointer:

	"If both the pointer operand and the result point to elements of the
	same array object, or one past the last element of the array object,
	the evaluation shall not produce an overflow; otherwise, the behavior
	is undefined."

	So "ex_dta + 4" might be undefined behaviour, if you interpret "the
	array object" in this case to be the malloc'd section contents!

		* pei-x86_64.c (pex64_get_unwind_info): Tidy sanity checks.
		(pex64_xdata_print_uwd_codes): Likewise.

2022-08-03  Jan Beulich  <jbeulich@suse.com>

	x86: improve/shorten vector zeroing-idiom optimization conditional
	- Drop the rounding type check: We're past template matching, and none
	  of the involved insns support embedded rounding.
	- Drop the extension opcode check: None of the involved opcodes have
	  variants with it being other than None.
	- Instead check opcode space, even if just to be on the safe side going
	  forward.
	- Reduce the number of comparisons by folding two groups.

	x86: properly mark i386-only insns
	Just like all Size64 insns are marked Cpu64, all Size32 insns ought to
	be marked Cpu386.

	x86: also use D for MOVBE
	First of all rename the meanwhile misleading Opcode_SIMD_FloatD, as it
	has also been used for KMOV* and BNDMOV. Then simplify the condition
	selecting which form if "reversing" to use - except for the MOV to/from
	control/debug/test registers all extended opcode space insns use bit 0
	(rather than bit 1) to indicate the direction (from/to memory) of an
	operation. With that, D can simply be set on the first of the two
	templates, while the other can be dropped.

2022-08-03  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-03  Cary Coutant  <ccoutant@gmail.com>

	Add ELFCOMPRESS_ZSTD.
	include/elf/
		* common.h: Add ELFCOMPRESS_ZSTD.

2022-08-02  John Baldwin  <jhb@FreeBSD.org>

	fbsd-nat: Correct the return type of the have_regset method.
	During the development of 40c23d880386d6e8202567eaa2a6b041feb1a652,
	the return value of fbsd_nat_target::have_regset was changed from a
	simple boolean to returning the size of the register set.  The
	comments and callers were all updated for this change, but the actual
	return type was accidentally left as a bool.  This change fixes the
	return type to be a size_t.

	Current callers of this only checked the value against 0 and thus
	still worked correctly.

2022-08-02  Jan Beulich  <jbeulich@suse.com>

	ELF: emit symbol table when there are relocations
	Even when there are no symbols (e.g. all relocations being against
	absolute values), a symbol table (with just the first placeholder entry)
	needs to be emitted. Otherwise tools like objdump won't properly process
	the relocations. The respective checks in assign_section_numbers() and
	_bfd_elf_compute_section_file_positions() support also this view. Oddly
	enough so far HAS_RELOC was only set when reading in an object file, but
	not when generating one anew; the flag would only have been cleared when
	no relocations were found (anymore).

	While there also amend the affected function's leading comment to also
	mention gas.

2022-08-02  Matthew Malcomson  <hardenedapple@gmail.com>

	ld: aarch64: Adjust TLS relaxation condition
	In aarch64_tls_transition_without_check and elfNN_aarch64_tls_relax we
	choose whether to perform a relaxation to an IE access model or an LE
	access model based on whether the symbol itself is marked as local (i.e.
	`h == NULL`).

	This is problematic in two ways.  The first is that sometimes a global
	dynamic access can be relaxed to an initial exec access when creating a
	shared library, and if that happens on a local symbol then we currently
	relax it to a local exec access instead.  This usually does not happen
	since we only relax an access if aarch64_can_relax_tls returns true and
	aarch64_can_relax_tls does not have the same problem.  However, it can
	happen when we have seen both an IE and GD access on the same symbol.
	This case is exercised in the newly added testcase tls-relax-gd-ie-2.

	The second problem is that deciding based on whether the symbol is local
	misses the case when the symbol is global but is still non-interposable
	and known to be located in the executable.  This happens on all global
	symbols in executables.
	This case is exercised in the newly added testcase tls-relax-ie-le-4.

	Here we adjust the condition we base our relaxation on so that we relax
	to local-exec if we are creating an executable and the relevant symbol
	we're accessing is stored inside that executable.

	-- Updating tests for new relaxation criteria

	Many of the tests added to check our relaxation to IE were implemented
	by taking advantage of the fact that we did not relax a global symbol
	defined in an executable.

	Since a global symbol defined in an executable is still not
	interposable, we know that a TLS version of such a symbol will be in the
	main TLS block.  This means that we can perform a stronger relaxation on
	such symbols and relax their accesses to a local-exec access.

	Hence we have to update all tests that relied on the older suboptimal
	decision making.

	The two cases when we still would want to relax a general dynamic access
	to an initial exec one are:
	1) When in a shared library and accessing a symbol which we have already
	   seen accessed with an initial exec access sequence.
	2) When in an executable and accessing a symbol defined in a shared
	   library.

	Both of these require shared library support, which means that these
	tests are now only available on targets with that.

	I have chosen to switch the existing testcases from a plain executable
	to one dynamically linked to a shared object as that doesn't require
	changing the testcases quite so much (just requires accessing a
	different variable rather than requiring adding another code sequence).

	The tls-relax-all testcase was an outlier to the above approach, since
	it included a general dynamic access to both a local and global symbol
	and inspected for the difference accordingly.

2022-08-02  Matthew Malcomson  <hardenedapple@gmail.com>

	ld: aarch64: Update test linker scripts relocs.ld and relocs-ilp32.ld
	The updates are to ensure that the .data section exists.  This means
	that we always have a data section.  That means that we don't create a
	RWX segment and avoid the corresponding warning.

	We get this warning when testing aarch64-none-elf with -mcmodel=tiny.
	N.b. this changes quite a few testcases from fail to pass.

2022-08-02  Victor Do Nascimento  <Victor.DoNascimento@arm.com>

	arm: Add cfi expression support for ra_auth_code
	This patch extends assembler support for the use of register names to
	allow for pseudo-registers, e.g. ra_auth_code register.
	This is done particularly with CFI directives in mind, allowing for
	expressions of the type:

	    .cfi_register ra_auth_code, 12

	gas/Changelog:

		* config/tc-arm.c (tc_arm_regname_to_dw2regnum): Add
		REG_TYPE_PSEUDO handling.
		* testsuite/gas/arm/cfi-pacbti-m-readelf.d: New.
		* testsuite/gas/arm/cfi-pacbti-m.s: New.

2022-08-02  Victor Do Nascimento  <Victor.DoNascimento@arm.com>

	arm: Use DWARF numbering convention for pseudo-register representation
	This patch modifies the internal `struct reg_entry' numbering of DWARF
	pseudo-registers to match values assigned in DWARF standards (see "4.1
	DWARF register names" in [1])so ra_auth_code goes from 12 to 143 and
	amends the unwinder .save directive-processing code to correctly handle
	mixed register-type save directives.

	The mechanism for splitting the register list is also re-written to
	comply with register ordering on push statements, being that registers
	are stored on the stack in numerical order, with the lowest numbered
	register at the lowest address [2].

	Consequently, the parsing of the hypothetical directive

	        .save{r4-r7, r10, ra_auth_core, lr}

	has been changed such as rather than producing

	        .save{r4-r7, r10}
	        .save{ra_auth_code}
	        .save{lr}

	as was the case with previous implementation, now produces:

	        .save{lr}
	        .save{ra_auth_code}
	        .save{r4-r7, r10}

	[1] <https://github.com/ARM-software/abi-aa/blob/main/aadwarf32/aadwarf32.rst>
	[2] <https://developer.arm.com/documentation/dui0473/j/arm-and-thumb-instructions/push>

	gas/Changelog:

		* config/tc-arm.c (REG_RA_AUTH_CODE): New.
		(parse_dot_save): Likewise.
		(parse_reg_list): Remove obsolete code.
		(reg_names): Set ra_auth_code to 143.
		(s_arm_unwind_save): Handle core and pseudo-register lists via
		parse_dot_save.
		(s_arm_unwind_save_mixed): Deleted.
		(s_arm_unwind_save_pseudo): Handle one register at a time.
		* testsuite/gas/arm/unwind-pacbti-m-readelf.d: Fix test.
		* testsuite/gas/arm/unwind-pacbti-m.d: Likewise.

2022-08-02  Alan Modra  <amodra@gmail.com>

	PE objdump -x
	objdump -x on PE executables produces lots of "xdata section corrupt"
	and "corrupt unwind data" warnings, and refuses to dump that info.  It
	turns out that the sanity checks were bad, not the data.  Fix them.

		* pei-x86_64.c (pex64_get_unwind_info): Correct buffer overrun
		sanity checks.
		(pex64_xdata_print_uwd_codes): Similarly.

2022-08-02  Jan Beulich  <jbeulich@suse.com>

	x86: XOP shift insns don't really allow B suffix
	By mistake it was permitted to be used from the very introduction of XOP
	support.

2022-08-02  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-08-01  Martin Storsjö  <martin@martin.st>

	ld: Support the -exclude-symbols option via COFF def files, with the EXCLUDE_SYMBOLS keyword
	This was requested in review.

	ld: Add support for a new option, -exclude-symbols, in COFF object file directives
	This maps to the same as ld's --exclude-symbols command line option,
	but allowing specifying the option via directives embedded in the
	object files instead of passed manually on the command line.

2022-08-01  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Fix .debug_aranges duplicate offset warning
	The function read_addrmap_from_aranges contains code to issue a warning:
	...
	      if (!insertpair.second)
	       {
	         warning (_("Section .debug_aranges in %s has duplicate "
	                    "debug_info_offset %s, ignoring .debug_aranges."),
	                  objfile_name (objfile), sect_offset_str (per_cu->sect_off));
	         return false;
	       }
	...
	but the warning is in fact activated when all_comp_units has duplicate
	entries, which is very misleading.

	Fix this by:
	- adding a test-case that should trigger the warning,
	- replacing the current implementation of the warning with an
	  assert that all_comp_units should not contain duplicates, and
	- properly re-implementing the warning, such that it is triggered
	  by the test-case.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29381

2022-08-01  Jan Beulich  <jbeulich@suse.com>

	x86: SKINIT with operand needs IgnoreSize
	Without it in 16-bit mode a pointless operand size prefix would be
	emitted.

2022-08-01  WANG Xuerui  <git@xen0n.name>

	opcodes: LoongArch: add "ret" instruction to reduce typing
	This syntactic sugar is present in both classical and emerging
	architectures, like Alpha, SPARC and RISC-V, and assembler macros
	doing the same thing can already be found in the wild e.g. [1], proving
	the feature's popularity. It's better to provide support directly in the
	assembler so downstream users wouldn't have to re-invent this over and
	over again.

	[1]: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/loongarch/sysdep.h;h=c586df819cd90;hb=HEAD#l28

2022-08-01  WANG Xuerui  <git@xen0n.name>

	opcodes: LoongArch: make all non-native jumps desugar to canonical b{lt/ge}[u] forms
	Also re-order the jump/branch opcodes while at it, so that insns are
	sorted in ascending order according to opcodes, and the label form
	preceding the real definition.

2022-08-01  Alan Modra  <amodra@gmail.com>

	Get rid of fprintf_vma and sprintf_vma
	These two macros print either a 16 digit hex number or an 8 digit
	hex number.  Unfortunately they depend on both target and host, which
	means that the output for 32-bit targets may be either 8 or 16 hex
	digits.

	Replace them in most cases with code that prints a bfd_vma using
	PRIx64.  In some cases, deliberately lose the leading zeros.
	This change some output, notably in base/offset fields of m68k
	disassembly which I think looks better that way, and in error
	messages.  I've kept leading zeros in symbol dumps (objdump -t)
	and in PE header dumps.

	bfd/
		* bfd-in.h (fprintf_vma, sprintf_vma, printf_vma): Delete.
		* bfd-in2.h: Regenerate.
		* bfd.c (bfd_sprintf_vma): Don't use sprintf_vma.
		(bfd_fprintf_vma): Don't use fprintf_vma.
		* coff-rs6000.c (xcoff_reloc_type_tls): Don't use sprintf_vma.
		Instead use PRIx64 to print bfd_vma values.
		(xcoff_ppc_relocate_section): Likewise.
		* cofflink.c (_bfd_coff_write_global_sym): Likewise.
		* mmo.c (mmo_write_symbols_and_terminator): Likewise.
		* srec.c (srec_write_symbols): Likewise.
		* elf32-xtensa.c (print_r_reloc): Similarly for fprintf_vma.
		* pei-x86_64.c (pex64_dump_xdata): Likewise.
		(pex64_bfd_print_pdata_section): Likewise.
		* som.c (som_print_symbol): Likewise.
		* ecoff.c (_bfd_ecoff_print_symbol): Use bfd_fprintf_vma.
	opcodes/
		* dis-buf.c (perror_memory, generic_print_address): Don't use
		sprintf_vma.  Instead use PRIx64 to print bfd_vma values.
		* i386-dis.c (print_operand_value, print_displacement): Likewise.
		* m68k-dis.c (print_base, print_indexed): Likewise.
		* ns32k-dis.c (print_insn_arg): Likewise.
		* ia64-gen.c (_opcode_int64_low, _opcode_int64_high): Delete.
		(opcode_fprintf_vma): Delete.
		(print_main_table): Use PRIx64 to print opcode.
	binutils/
		* od-macho.c: Replace all uses of printf_vma with bfd_printf_vma.
		* objcopy.c (copy_object): Don't use sprintf_vma.  Instead use
		PRIx64 to print bfd_vma values.
		(copy_main): Likewise.
		* readelf.c (CHECK_ENTSIZE_VALUES): Likewise.
		(dynamic_section_mips_val): Likewise.
		(print_vma): Don't use printf_vma.  Instead use PRIx64 to print
		bfd_vma values.
		(dump_ia64_vms_dynamic_fixups): Likewise.
		(process_version_sections): Likewise.
		* rddbg.c (stab_context): Likewise.
	gas/
		* config/tc-i386.c (offset_in_range): Don't use sprintf_vma.
		Instead use PRIx64 to print bfd_vma values.
		(md_assemble): Likewise.
		* config/tc-mips.c (load_register, macro): Likewise.
		* messages.c (as_internal_value_out_of_range): Likewise.
		* read.c (emit_expr_with_reloc): Likewise.
		* config/tc-ia64.c (note_register_values): Don't use fprintf_vma.
		Instead use PRIx64 to print bfd_vma values.
		(print_dependency): Likewise.
		* listing.c (list_symbol_table): Use bfd_sprintf_vma.
		* symbols.c (print_symbol_value_1): Use %p to print pointers.
		(print_binary): Likewise.
		(print_expr_1): Use PRIx64 to print bfd_vma values.
		* write.c (print_fixup): Use %p to print pointers.  Don't use
		fprintf_vma.
		* testsuite/gas/all/overflow.l: Update expected output.
		* testsuite/gas/m68k/mcf-mov3q.d: Likewise.
		* testsuite/gas/m68k/operands.d: Likewise.
		* testsuite/gas/s12z/truncated.d: Likewise.
	ld/
		* deffilep.y (def_file_print): Don't use fprintf_vma.  Instead
		use PRIx64 to print bfd_vma values.
		* emultempl/armelf.em (gld${EMULATION_NAME}_finish): Don't use
		sprintf_vma.  Instead use PRIx64 to print bfd_vma values.
		* emultempl/pe.em (gld${EMULATION_NAME}_finish): Likewise.
		* ldlang.c (lang_map): Use %V to print region origin.
		(lang_one_common): Don't use sprintf_vma.
		* ldmisc.c (vfinfo): Don't use fprintf_vma or sprintf_vma.
		* pe-dll.c (pe_dll_generate_def_file): Likewise.
	gdb/
		* remote.c (remote_target::trace_set_readonly_regions): Replace
		uses of sprintf_vma with bfd_sprintf_vma.

2022-08-01  liuzhensong  <liuzhensong@loongson.cn>

	LoongArch: Set defaults to exec stack 0.

2022-08-01  Alan Modra  <amodra@gmail.com>

	libctf: Avoid use of uninitialised variables
		* ctf-link.c (ctf_link_add_ctf_internal): Don't free uninitialised
		pointers.

2022-08-01  Alan Modra  <amodra@gmail.com>

	PR29348, BFD_VMA_FMT wrong
	There is a problem with my commit 0e3c1eebb2, which replaced
	bfd_uint64_t with uint64_t: Some hosts typedef int64_t to long long
	even when long is the same size as long long.  That confuses the code
	choosing one of "l", "ll", or "I64" for BFD_VMA_FMT, and results in
	warnings.

	Write a direct configure test for the printf int64_t style instead.
	This removes the last use of BFD_HOST_64BIT_LONG, so delete that.
	Note that the changes to configure.com are pure guesswork.

		PR 29348
		* bfd-in.h (BFD_HOST_64BIT_LONG): Don't define.
		(BFD_VMA_FMT): Define using BFD_INT64_FMT when 64-bit.
		(bfd_vma, bfd_signed_vma): Move comments to 64-bit typedefs.
		* configure.ac (BFD_HOST_64BIT_LONG): Delete.
		(BFD_INT64_FMT): New config test.
		* configure.com: Update similarly.
		* Makefile.in: Regenerate.
		* bfd-in2.h: Regenerate.
		* configure: Regenerate.

2022-08-01  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-31  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-30  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.ada/literals.exp with aarch64
	On aarch64-linux, I run into:
	...
	(gdb) print 16#ffffffffffffffff#^M
	$7 = 18446744073709551615^M
	(gdb) FAIL: gdb.ada/literals.exp: print 16#ffffffffffffffff#
	...
	while on x86_64-linux instead, I get:
	...
	(gdb) print 16#ffffffffffffffff#^M
	$7 = -1^M
	(gdb) PASS: gdb.ada/literals.exp: print 16#ffffffffffffffff#
	...

	We can easily reproduce this on x86_64-linux using:
	...
	$ gdb -q -batch -ex "set lang ada" -ex "set arch i386" \
	  -ex "print 16#ffffffffffffffff#"
	$1 = -1
	$ gdb -q -batch -ex "set lang ada" -ex "set arch aarch64" \
	  -ex "print 16#ffffffffffffffff#"
	$1 = 18446744073709551615
	...

	With i386, we have:
	...
	(gdb) p int_bits
	$3 = 32
	(gdb) p long_bits
	$4 = 32
	(gdb) p long_long_bits
	$5 = 64
	...
	and so in processInt we hit the fits-in-unsigned-long-long case where we use
	as type long long:
	...
	      /* Note: Interprets ULLONG_MAX as -1.  */
	      yylval.typed_val.type = type_long_long (par_state);
	...

	With aarch64, we have instead:
	...
	(gdb) p int_bits
	$1 = 32
	(gdb) p long_bits
	$2 = 64
	(gdb) p long_long_bits
	$3 = 64
	...
	and so in processInt we hit the fits-in-unsigned-long case where we use
	as type unsigned long:
	...
	      yylval.typed_val.type
	        = builtin_type (par_state->gdbarch ())->builtin_unsigned_long;
	...

	It's not clear why for ada we're using long long for the
	fits-in-unsigned-long-long case.

	Fix this by using unsigned long long for the fits-in-unsigned-long-long case,
	meaning the new reference output is 18446744073709551615 instead of -1.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29416

2022-07-30  Simon Marchi  <simon.marchi@efficios.com>

	gdb/testsuite: add macros test for source files compiled in various ways
	Using different ways of passing source file paths to compilers results n
	different file and directory paths in the line header.  For example:

	  - gcc foo.c
	  - gcc ./foo.c
	  - gcc ../cwd/foo.c
	  - gcc $PWD/foo.c

	Because of this, GDB sometimes failed to look up macros.  The previous
	patch fixed that as much as possible.  This patch adds the corresponding
	tests.

	Add both a DWARF assembler-based test and a regular test.  The DWARF
	assembled-based one tests some hard-coded debug info based on what I
	have observed some specific versions of gcc and clang generate.  We want
	to make sure that GDB keeps handling all these cases correctly, even if
	it's not always clear whether they are really valid DWARF.  Also, they
	will be tested no matter what the current target compiler is for a given
	test run.

	The regular test is compiled using the target compiler, so it may help
	find bugs when testing against some other toolchains than what was used
	to generate the DWARF assembler-based test.

	For the DWARF assembler-based test, add to testsuite/lib/dwarf.exp the
	necessary code to generate a DWARF5 .debug_macro section.  The design of
	the new procs is based on what was done for rnglists and loclists.

	To test against a specific compiler one can use this command, for
	example:

	    $ make check TESTS="gdb.base/macro-source-path.exp" RUNTESTFLAGS="CC_FOR_TARGET=clang --target_board unix/gdb:debug_flags=-gdwarf-5"

	Change-Id: Iab8da498e57d10cc2a3d09ea136685d9278cfcf6

2022-07-30  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove code to prepend comp dir in buildsym_compunit::start_subfile
	The bit of code removed by this patch was introduced to fix the same
	kind of problem that the previous patch fixes.  That is, to try to match
	existing subfiles when different name forms are used to refer to a same
	file.

	The thread for the patch that introduced this code is:

	  https://pi.simark.ca/gdb-patches/45F8CBDF.9090501@hq.tensilica.com/

	The important bits are that the compiler produced a compilation unit
	with:

	    DW_AT_name : test.c
	    DW_AT_comp_dir : /home/maxim/W/BadgerPass/PR_14999

	and DWARF v2 line table with:

	    The Directory Table:
	    /home/maxim/W/BadgerPass/PR_14999

	    The File Name Table:
	    Entry Dir Time Size Name
	    1 1 1173897037 152 test.c

	Because the main symtab was created with only DW_AT_name, it was named
	"test.c".  And because the path built from the line header contained the
	"directory" part, it was "/home/maxim/W/BadgerPass/PR_14999/test.c".
	Because of this mismatch, thing didn't work, so they added this code to
	prepend the compilation directory to the existing subfile names, so that
	this specific case would work.

	With the changes done earlier in this series, where subfiles are
	identified using the "most complete path possible", this case would be
	handled.  The main subfile's would be
	"/home/maxim/W/BadgerPass/PR_14999/test.c" from the start
	(DW_AT_comp_dir + DW_AT_name).  It's not so different from some DWARF 5
	cases actually, which make the compilation directory explicit in the
	line table header.

	I therefore think that this code is no longer needed.  It does feel like
	a quick hack to make one specific case work, and we have a more general
	solution now.  Also, this code was introduced to work around a problem
	in the DWARF debug info or the DWARF debug info reader.  In general, I
	think it's preferable for these hacks to be located in the specific
	debug info reader code, rather than in the common code.

	Even though this code was added to work around a DWARF reader problem,
	it's possible that some other debug info reader has started taking
	advantage of this code in the mean time.  It's very difficult to
	know or verify, but I think the likelyhood is quite small, so I'm
	proposing to get rid of it to simplify things a little bit.

	Change-Id: I710b8ec0d449d1b110d67ddf9fcbdb2b37108306

2022-07-30  Simon Marchi  <simon.marchi@efficios.com>

	gdb: add "id" fields to identify symtabs and subfiles
	Printing macros defined in the main source file doesn't work reliably
	using various toolchains, especially when DWARF 5 is used.  For example,
	using the binaries produced by either of these commands:

	    $ gcc --version
	    gcc (GCC) 11.2.0
	    $ ld --version
	    GNU ld (GNU Binutils) 2.38
	    $ gcc test.c -g3 -gdwarf-5

	    $ clang --version
	    clang version 13.0.1
	    $ clang test.c -gdwarf-5 -fdebug-macro

	I get:

	    $ ./gdb -nx -q --data-directory=data-directory a.out
	    (gdb) start
	    Temporary breakpoint 1 at 0x111d: file test.c, line 6.
	    Starting program: /home/simark/build/binutils-gdb-one-target/gdb/a.out

	    Temporary breakpoint 1, main () at test.c:6
	    6         return ZERO;
	    (gdb) p ZERO
	    No symbol "ZERO" in current context.

	When starting to investigate this (taking the gcc-compiled binary as an
	example), we see that GDB fails to look up the appropriate macro scope
	when evaluating the expression.  While stopped in
	macro_lookup_inclusion:

	    (top-gdb) p name
	    $1 = 0x62100011a980 "test.c"
	    (top-gdb) p source.filename
	    $2 = 0x62100011a9a0 "/home/simark/build/binutils-gdb-one-target/gdb/test.c"

	`source` is the macro_source_file that we would expect GDB to find.
	`name` comes from the symtab::filename field of the symtab we are
	stopped in.  GDB doesn't find the appropriate macro_source_file because
	the name of the macro_source_file doesn't match exactly the name of the
	symtab.

	The name of the main symtab comes from the compilation unit's
	DW_AT_name, passed to the buildsym_compunit's constructor:

	  https://gitlab.com/gnutools/binutils-gdb/-/blob/4815d6125ec580cc02a1094d61b8c9d1cc83c0a1/gdb/dwarf2/read.c#L10627-10630

	The contents of DW_AT_name, in this case, is "test.c".  It is typically
	(what I witnessed all compilers do) the same string that was passed to
	the compiler on the command-line.

	The name of the macro_source_file comes from the line number program
	header's file table, from the call to the line_header::file_file_name
	method:

	  https://gitlab.com/gnutools/binutils-gdb/-/blob/4815d6125ec580cc02a1094d61b8c9d1cc83c0a1/gdb/dwarf2/macro.c#L54-65

	line_header::file_file_name prepends the directory path that the file
	entry refers to, in the file table (if the file name is not already
	absolute).  In this case, the file name is "test.c", appended to the
	directory "/home/simark/build/binutils-gdb-one-target/gdb".

	Because the symtab's name is not created the same way as the
	macro_source_file's name is created, we get this mismatch.  GDB fails to
	find the appropriate macro scope for the symtab, and we can't print
	macros when stopped in that symtab.

	To make this work, we must ensure that paths produced in these two ways
	end up identical.  This can be tricky because of the different ways a
	path can be passed to the compiler by the user.

	Another thing to consider is that while the main symtab's name (or
	subfile, before it becomes a symtab) is created using DW_AT_name, the
	main symtab is also referred to using its entry in the line table
	header's file table, when processing the line table.  We must therefore
	ensure that the same name is produced in both cases, so that a call to
	"start_subfile" for the main subfile will correctly find the
	already-created subfile, created by buildsym_compunit's constructor.  If
	we fail to do that, things still often work, because of a fallback: the
	watch_main_source_file_lossage method.  This method determines that if
	the main subfile has no symbols but there exists another subfile with
	the same basename (e.g. "test.c") that does have symbols, it's probably
	because there was some filename mismatch.  So it replaces the main
	subfile with that other subfile.  I think that heuristic is useful as a
	last effort to work around any bug or bad debug info, but I don't think
	we should design things such as to rely on it.  It's a heuristic, it can
	get things wrong.  So in my search for a fix, it is important that given
	some good debug info, we don't end up relying on that for things to
	work.

	A first attempt at fixing this was to try to prepend the compilation
	directory here or not prepend it there.  In practice, because of all the
	possible combinations of debug info the compilers produce, it was not
	possible to get something that would produce reliable, consistent paths.

	Another attempt at fixing this was to make both macro_source_file
	objects and symtab objects use the most complete form of path possible.
	That means to prepend directories at least until we get an absolute
	path.  In theory, we should end up with the same path in all cases.
	This generally worked, but because it changed the symtab names, it
	resulted in user-visible changes (for example, paths to source files in
	Breakpoint hit messages becoming always absolute).  I didn't find this
	very good, first because there is a "set filename-display" setting that
	lets the user control how they want the paths to be displayed, and that
	would suddenly make this setting completely ineffective (although even
	today, it is a bit dependent on the debug info).  Second, it would
	require a good amount of testsuite tweaks to make tests accept these
	suddenly absolute paths.

	This new patch is a slight variation of that: it adds a new field called
	"filename_for_id" in struct symtab and struct subfile, next to the
	existing filename field. The goal is to separate the internal ids used
	for finding objects from the names used for presentation.  This field is
	used for identifying subfiles, symtabs and macro_source_files
	internally.  For DWARF symtabs, this new field is meant to contain the
	"most complete possible" path, as discussed above.  So for a given file,
	it must always be in the same form, everywhere.  The existing
	symtab::filename field remains the one used for printing to the user, so
	there shouldn't be any change in how paths are printed.

	Changes in the core symtab files are:

	 - Add "name_for_id" and "filename_for_id" fields to "struct subfile"
	   and "struct symtab", next to existing "name" and "filename" fields.
	 - Make buildsym_compunit::buildsym_compunit and
	   buildsym_compunit::start_subfile accept a "name_for_id" parameter
	   next to the existing "name" ones.
	 - Make buildsym_compunit::start_subfile use "name_for_id" for looking
	   up existing subfiles.  This is the key thing for making calls
	   to start_subfile for the main source file look up the existing
	   subfile successfully, and avoid relying on
	   watch_main_source_file_lossage.
	 - Make sal_macro_scope pass "filename_for_id", rather than "filename",
	   to macro_lookup_inclusion.  This is the key thing to making the
	   lookup work and macro printing work.

	Changes in the DWARF files are:

	 - Make line_header::file_file_name return the "most complete possible"
	   name.  The only pre-existing user of this method is the macro code,
	   to give the macro_source_file objects their name.  And we now want
	   them to have this "most complete possible" name, which will match the
	   corresponding symtab's "filename_for_id".
	 - Make dwarf2_cu::start_compunit_symtab pass the "most complete
	   possible" name for the main symtab's "filename_for_id".  In this
	   context, where the info comes from the compilation unit's DW_AT_name
	   / DW_AT_comp_dir, it means prepending DW_AT_comp_dir to DW_AT_name if
	   DW_AT_name is not already absolute.
	 - Change dwarf2_start_subfile to build a name_for_id for the subfile
	   being started.  The simplest way is to re-use
	   line_header::file_file_name, since the callers always have a
	   file_entry handy.  This ensures that it will get the exact same path
	   representation as the macro code does, for the same file (since it
	   also uses line_header::file_file_name).
	 - Update calls to allocate_symtab to pass the "name_for_id" from the
	   subfile.

	Tests exercising all this are added by the following patch.

	Of all the cases I tried, the only one I found that ends up relying on
	watch_main_source_file_lossage is the following one:

	    $ clang --version
	    clang version 13.0.1
	    Target: x86_64-pc-linux-gnu
	    Thread model: posix
	    InstalledDir: /usr/bin
	    $ clang  ./test.c -g3 -O0 -gdwarf-4
	    $ ./gdb -nx --data-directory=data-directory -q -readnow -iex "set debug symtab-create 1"  a.out
	    ...
	    [symtab-create] start_subfile: name = test.c, name_for_id = /home/simark/build/binutils-gdb-one-target/gdb/test.c
	    [symtab-create] start_subfile: name = ./test.c, name_for_id = /home/simark/build/binutils-gdb-one-target/gdb/./test.c
	    [symtab-create] start_subfile: name = ./test.c, name_for_id = /home/simark/build/binutils-gdb-one-target/gdb/./test.c
	    [symtab-create] start_subfile: found existing symtab with name_for_id /home/simark/build/binutils-gdb-one-target/gdb/./test.c (/home/simark/build/binutils-gdb-one-target/gdb/./test.c)
	    [symtab-create] watch_main_source_file_lossage: using subfile ./test.c as the main subfile

	As we can see, there are two forms used for "test.c", one with a "." and
	one without.  This comes from the fact that the compilation unit DIE
	contains:

	    DW_AT_name ("test.c")
	    DW_AT_comp_dir ("/home/simark/build/binutils-gdb-one-target/gdb")

	without a ".", and the line table for that file contains:

	    include_directories[  1] = "."
	    file_names[  1]:
	               name: "test.c"
	          dir_index: 1

	When assembling the filename from that entry, we get a ".".

	It is a bit unexpected that the main filename resulting from the line
	table header does not match exactly the name in the compilation unit.
	For instance, gcc uses "./test.c" for the DW_AT_name, which gives
	identical paths in the compilation unit and in the line table header.

	Similarly, with DWARF 5:

	    $ clang  ./test.c -g3 -O0 -gdwarf-5

	clang create two entries that refer to the same file but are of in a different
	form.

	    include_directories[  0] = "/home/simark/build/binutils-gdb-one-target/gdb"
	    include_directories[  1] = "."
	    file_names[  0]:
	               name: "test.c"
	          dir_index: 0
	    file_names[  1]:
	               name: "test.c"
	          dir_index: 1

	The first file name produces a path without a "." while the second does.
	This is not caught by watch_main_source_file_lossage, because of
	dwarf_decode_lines that creates a symtab for each file entry in the line
	table.  It therefore appears as "non-empty" to
	watch_main_source_file_lossage.  This results in two symtabs:

	    (gdb) maintenance info symtabs
	    { objfile /home/simark/build/binutils-gdb-one-target/gdb/a.out ((struct objfile *) 0x613000005d00)
	      { ((struct compunit_symtab *) 0x62100011aca0)
	        debugformat DWARF 5
	        producer clang version 13.0.1
	        name test.c
	        dirname /home/simark/build/binutils-gdb-one-target/gdb
	        blockvector ((struct blockvector *) 0x621000129ec0)
	        user ((struct compunit_symtab *) (null))
	            { symtab test.c ((struct symtab *) 0x62100011ad20)
	              fullname (null)
	              linetable ((struct linetable *) 0x0)
	            }
	            { symtab ./test.c ((struct symtab *) 0x62100011ad60)
	              fullname (null)
	              linetable ((struct linetable *) 0x621000129ef0)
	            }
	      }
	    }

	I am not sure what is the consequence of this, but this is also what
	happens before my patch, so I think its acceptable to leave it as-is.

	To handle these two cases nicely, I think we will need a function that
	removes the unnecessary "." from path names, something that can be done
	later.

	Finally, I made a change in find_file_and_directory is necessary to
	avoid breaking test

	    gdb.dwarf2/dw2-compdir-oldgcc.exp: info source gcc42

	Without that change, we would get:

	    (gdb) info source
	    Current source file is /dir/d/dw2-compdir-oldgcc42.S
	    Compilation directory is /dir/d

	whereas the expected result is:

	    (gdb) info source
	    Current source file is dw2-compdir-oldgcc42.S
	    Compilation directory is /dir/d

	This test was added here:

	  https://sourceware.org/pipermail/gdb-patches/2012-November/098144.html

	Long story short, GCC <= 4.2 apparently had a bug where it would
	generate a DW_AT_name with a full path ("/dir/d/dw2-compdir-oldgcc42.S")
	and no DW_AT_comp_dir.  The line table has one entry with filename
	"dw2-compdir-oldgcc42.S", which refers to directory 0.  Directory 0
	normally refers to the compilation unit's comp dir, but it is
	non-existent in this case.

	This caused some symtab lookup problems, and to work around them, some
	workaround was added, which today reads as:

	    if (res.get_comp_dir () == nullptr
	        && producer_is_gcc_lt_4_3 (cu)
	        && res.get_name () != nullptr
	        && IS_ABSOLUTE_PATH (res.get_name ()))
	      res.set_comp_dir (ldirname (res.get_name ()));

	Source: https://gitlab.com/gnutools/binutils-gdb/-/blob/6577f365ebdee7dda71cb996efa29d3714cbccd0/gdb/dwarf2/read.c#L9428-9432

	It extracts an artificial DW_AT_comp_dir from DW_AT_name, if there is no
	DW_AT_comp_dir and DW_AT_name is absolute.

	Prior to my patch, a subfile would get created with filename
	"/dir/d/dw2-compdir-oldgcc42.S", from DW_AT_name, and another would get
	created with filename "dw2-compdir-oldgcc42.S" from the line table's
	file table.  Then watch_main_source_file_lossage would kick in and merge
	them, keeping only the "dw2-compdir-oldgcc42.S" one:

	    [symtab-create] start_subfile: name = /dir/d/dw2-compdir-oldgcc42.S
	    [symtab-create] start_subfile: name = dw2-compdir-oldgcc42.S
	    [symtab-create] start_subfile: name = dw2-compdir-oldgcc42.S
	    [symtab-create] start_subfile: found existing symtab with name dw2-compdir-oldgcc42.S (dw2-compdir-oldgcc42.S)
	    [symtab-create] watch_main_source_file_lossage: using subfile dw2-compdir-oldgcc42.S as the main subfile

	And so "info source" would show "dw2-compdir-oldgcc42.S" as the
	filename.

	With my patch applied, but without the change in
	find_file_and_directory, both DW_AT_name and the line table would try to
	start a subfile with the same filename_for_id, and there was no need for
	watch_main_source_file_lossage - which is what we want:

	[symtab-create] start_subfile: name = /dir/d/dw2-compdir-oldgcc42.S, name_for_id = /dir/d/dw2-compdir-oldgcc42.S
	[symtab-create] start_subfile: name = dw2-compdir-oldgcc42.S, name_for_id = /dir/d/dw2-compdir-oldgcc42.S
	[symtab-create] start_subfile: found existing symtab with name_for_id /dir/d/dw2-compdir-oldgcc42.S (/dir/d/dw2-compdir-oldgcc42.S)
	[symtab-create] start_subfile: name = dw2-compdir-oldgcc42.S, name_for_id = /dir/d/dw2-compdir-oldgcc42.S
	[symtab-create] start_subfile: found existing symtab with name_for_id /dir/d/dw2-compdir-oldgcc42.S (/dir/d/dw2-compdir-oldgcc42.S)

	But since the one with name == "/dir/d/dw2-compdir-oldgcc42.S", coming
	from DW_AT_name, gets created first, it wins, and the symtab ends up
	with "/dir/d/dw2-compdir-oldgcc42.S" as the name, "info source" shows
	"/dir/d/dw2-compdir-oldgcc42.S" and the test breaks.

	This is not wrong per-se, after all DW_AT_name is
	"/dir/d/dw2-compdir-oldgcc42.S", so it wouldn't be wrong to report the
	current source file as "/dir/d/dw2-compdir-oldgcc42.S".  If you compile
	a file passing "/an/absolute/path.c", DW_AT_name typically contains (at
	least with GCC) "/an/absolute/path.c" and GDB tells you that the source
	file is "/an/absolute/path.c".  But we can also keep the existing
	behavior fairly easily with a little change in find_file_and_directory.
	When extracting an artificial DW_AT_comp_dir from DW_AT_name, we now
	modify the name to just keep the file part.  The result is coherent with
	what compilers do when you compile a file by just passing its filename
	("gcc path.c -g"):

	      DW_AT_name        ("path.c")
	      DW_AT_comp_dir    ("/home/simark/build/binutils-gdb-one-target/gdb")

	With this change, filename_for_id is still the full name,
	"/dir/d/dw2-compdir-oldgcc42.S", but the filename of the subfile /
	symtab (what ends up shown by "info source") is just
	"dw2-compdir-oldgcc42.S", and that makes the test happy.

	Change-Id: I8b5cc4bb3052afdb172ee815c051187290566307

2022-07-30  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/dwarf: pass a file_entry to line_header::file_file_name
	In the following patch, there will be some callers of file_file_name
	that will already have access to the file_entry object for which they
	want the file name.  It would be inefficient to have them pass an index,
	only for line_header::file_file_name to re-lookup the same file_entry
	object.  Change line_header::file_file_name to accept a file_entry
	object reference, instead of an index to look up.

	I think this change makes sense in any case.  Callers that have an index
	can first obtain a file_entry using line_header::file_name_at or
	line_header::file_names.

	When passing a file_entry object, we can assume that the file_entry's
	index is valid, unlike when passing an index.  So, push the special case
	about an invalid index to the sole current caller of file_file_name,
	macro_start_file.  I think that error belongs there anyway, since it
	specifically talks about "bad file number in macro information".

	This requires recording the file index in the file_entry structure, so
	add that.

	Change-Id: Ic6e44c407539d92b7863d7ba82405ade17f384ad

2022-07-30  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/dwarf: pass compilation directory to line header
	The following patch changes line_header::file_file_name to prepend the
	compilation directory to the file name, if needed.  For that, the line
	header needs to know about the compilation directory.  Prepare for that
	by adding a constructor that takes it as a parameter, and passing the
	value down everywhere needed.  Add a second constructor for the special
	case of building a line_header for doing a hash table lookup, since that
	case doesn't require a compilation directory value.

	Change-Id: Iba3ba0293e4e2d13a64b257cf9a3094684d54330

2022-07-30  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: add debug prints in buildsym.c
	Add a few debug prints in buildsym.c that were helpful to me in writing
	this series.

	Change-Id: If10a818feaee3ce1b78a2a254013b62dd578002b

2022-07-30  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: introduce symtab_create_debug_printf
	Introduce symtab_create_debug_printf and symtab_create_debug_printf_v,
	to print the debug messages enabled by "set debug symtab-create".

	Change-Id: I442500903f72d4635c2dd9eaef770111f317dc04

2022-07-30  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-29  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.ada/convvar_comp.exp with broken debug info
	On aarch64-linux I run into this failure with gcc 7.5.0:
	...
	(gdb) print $item.started^M
	$1 = (-5312, 65535, 4202476)^M
	(gdb) FAIL: gdb.ada/convvar_comp.exp: print $item.started
	...

	The test-case expects (0, 0, 0), but we're getting another value due to
	incorrect location information.

	Work around this by:
	- first printing the value, and then
	- verifying that the convenience variable matches the printed value.

	I've verified that the test-case still checks what it should by disabling
	the fix from commit cc0e770c0d0 ("memory error printing component of record
	from convenience variable") and observing the test-case fail.

	Tested on x86_64-linux and aarch64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29420

2022-07-29  Alan Modra  <amodra@gmail.com>

	Re: PR16005, avr linker crash on a particular instruction sequence with --relax
	The last patch wasn't so clever.  The contents in fact have already
	been read, just not cached where relax_delete_bytes expects them.
	relax_delete_bytes also modifies relocs and syms, so they should be
	cached too.

		PR 16005
		* elf32-avr.c (elf32_avr_relax_delete_bytes): Revert last change.
		(elf32_avr_relax_section): Cache contents, relocs and syms
		before calling relax_delete_bytes.

2022-07-29  Andrew Burgess  <aburgess@redhat.com>

	libopcodes/aarch64: add support for disassembler styling
	This commit enables disassembler styling for AArch64.  After this
	commit it is possible to have objdump style AArch64 disassembler
	output (using --disassembler-color option).  Once the required GDB
	patches are merged, GDB will also style the disassembler output.

	The changes to support styling are mostly split between two files
	opcodes/aarch64-dis.c and opcodes/aarch64-opc.c.

	The entry point for the AArch64 disassembler can be found in
	aarch64-dis.c, this file handles printing the instruction mnemonics,
	and assembler directives (e.g. '.byte', '.word', etc).  Some operands,
	mostly relating to assembler directives are also printed from this
	file.  This commit changes all of this to pass through suitable
	styling information.

	However, for most "normal" instructions, the instruction operands are
	printed using a two step process.  From aarch64-dis.c, in the
	print_operands function, the function aarch64_print_operand is called,
	this function is in aarch64-opc.c, and converts an instruction operand
	into a string.  Then, back in print_operands (aarch64-dis.c), the
	operand string is printed.

	Unfortunately, the string returned by aarch64_print_operand can be
	quite complex, it will include syntax elements, like '[' and ']', in
	addition to register names and immediate values.  In some cases, a
	single operand will expand into what will appear (to the user) as
	multiple operands separated with a ','.

	This makes the task of styling more complex, all these different
	components need to by styled differently, so we need to get the
	styling information out of aarch64_print_operand in some way.

	The solution that I propose here is similar to the solution that I
	used for the i386 disassembler.

	Currently, aarch64_print_operand uses snprintf to write the operand
	text into a buffer provided by the caller.

	What I propose is that we pass an extra argument to the
	aarch64_print_operand function, this argument will be a structure, the
	structure contains a callback function and some state.

	When aarch64_print_operand needs to format part of its output this can
	be done by using the callback function within the new structure, this
	callback returns a string with special embedded markers that indicate
	which mode should be used for each piece of text.  Back in
	aarch64-dis.c we can spot these special style markers and use this to
	split the disassembler output up and apply the correct style to each
	piece.

	To make aarch64-opc.c clearer a series of new static functions have
	been added, e.g. 'style_reg', 'style_imm', etc.  Each of these
	functions formats a piece of text in a different style, 'register' and
	'immediate' in this case.

	Here's an example taken from aarch64-opc.c of the new functions in
	use:

	    snprintf (buf, size, "[%s, %s]!",
	              style_reg (styler, base),
	              style_imm (styler, "#%d", opnd->addr.offset.imm));

	The aarch64_print_operand function is also called from the assembler
	to aid in printing diagnostic messages.  Right now I have no plans to
	add styling to the assembler output, and so, the callback function
	used in the assembler ignores the styling information and just returns
	an plain string.

	I've used the source files in gas/testsuite/gas/aarch64/ for testing,
	and have manually gone through and checked that the styling looks
	reasonable, however, I'm not an AArch64 expert, so it is possible that
	the odd piece is styled incorrectly.  Please point out any mistakes
	I've made.

	With objdump disassembler color turned off, there should be no change
	in the output after this commit.

2022-07-29  Nick Clifton  <nickc@redhat.com>

	Stop the linker from complaining about unrecognised DW_FORM-rnglistx and DW_FORM_loclistx format attributes.
		PR 29424
		* dwarf2.c (read_attribute_value): Handle DW_FORM_rnglistx and
		DW_FORM_loclistx.

2022-07-29  Alan Modra  <amodra@gmail.com>

	PR16005, avr linker crash on a particular instruction sequence with --relax
	It's possible for relax_delete_bytes to be called with section
	contents NULL, as demonstrated by the testcase in this PR.

		PR 16005
		* elf32-avr.c (elf32_avr_relax_delete_bytes): Get section contents
		if not already available.

2022-07-29  Jan Beulich  <jbeulich@suse.com>

	x86: drop stray NoRex64 from KeyLocker insns
	It's entirely unclear why some of the KeyLocker insns had NoRex64 on
	them - there's nothing here which could cause emission of REX.W (except
	of course a user-specified "rex.w", which we ought to honor anyway).

2022-07-29  Jan Beulich  <jbeulich@suse.com>

	Arm64: re-work PR gas/27217 fix
	The original approach has resulted in anomalies when . is involved in an
	operand of one of the affected insns. We cannot leave . unresolved, or
	else it'll be resolved at the end of assembly, then pointing to the
	address of a section rather than at the insn of interest. Undo part of
	the original change and instead check whether a relocation cannot be
	omitted in md_apply_fix().

	By resolving the expressions again, equates (see the adjustment of the
	respective testcase) will now be evaluated, and hence relocations
	against absolute addresses be emitted. This ought to be okay as long as
	the equates aren't global (and hence can't be overridden). If a need
	for such arises, quite likely the only way to address this would be to
	invent yet another expression evaluation mode, leaving everything
	_except_ . un-evaluated.

	There's a further anomaly in how transitive equates are handled. In

		.set x, 0x12345678
		.eqv bar, x
	foo:
		adrp	x0, x
		add	x0, x0, :lo12:x

		adrp	x0, bar
		add	x0, x0, :lo12:bar

	the first two relocations are now against *ABS*:0x12345678 (as said
	above), whereas the latter two relocations would be against x. (Before
	the change here, the first two relocations are against x and the latter
	two against bar.) But this is an issue seen elsewhere as well, and would
	likely require adjustments in the target-independent parts of the
	assembler instead of trying to hack around this for every target.

2022-07-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	ld: Extend ac_default_ld_warn_rwx_segments to all SPARC targets [PR29411]
	As discussed in PR ld/29411, the ld warning

		[...] has a LOAD segment with RWX permissions

	needs to be disabled on all SPARC targets, not just Solaris/SPARC: the
	.plt section is required to be RWX by the 32-bit SPARC ELF psABI and the
	64-bit SPARC Compliance Definition 2.4.1.  Given that ld only supports
	SPARC ELF targets, this patch implements this.

	Tested on sparc64-unknown-linux-gnu and sparc-sun-solaris2.11.

	2022-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

		ld:
		PR ld/29411
		* configure.tgt (ac_default_ld_warn_rwx_segments): Extend to all
		sparc targets.  Expand comment.

2022-07-29  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.threads/killed-outside.exp on aarch64
	On aarch64 (and likewise on arm), I run into:
	...
	(gdb) PASS: gdb.threads/killed-outside.exp: get pid of inferior
	Executing on target: kill -9 11516    (timeout = 300)
	builtin_spawn -ignore SIGHUP kill -9 11516^M
	continue^M
	Continuing.^M
	Unable to fetch general registers: No such process.^M
	(gdb) [Thread 0xfffff7d511e0 (LWP 11518) exited]^M
	^M
	Program terminated with signal SIGKILL, Killed.^M
	The program no longer exists.^M
	FAIL: gdb.threads/killed-outside.exp: prompt after first continue (timeout)
	...
	due to a mismatch between the actual "No such process" line and the expected
	one:
	...
	set no_such_process_msg "Couldn't get registers: No such process\."
	...

	Fix this by updating the regexp.

	Tested on aarch64-linux, and x86_64-linux.

2022-07-29  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Add `OP_V' to .insn named opcodes
	This commit adds `OP_V' (OP-V: vector instruction opcode for now
	ratified `V' extension) to .insn opcode name list.  Although vector
	instruction encoding is not implemented in `.insn' directive, it will
	help future implementation of custom vector `.insn'.

	gas/ChangeLog:

		* config/tc-riscv.c (opcode_name_list): Add `OP_V'.
		* testsuite/gas/riscv/insn.s: Add testcase.
		* testsuite/gas/riscv/insn.d: Likewise.
		* testsuite/gas/riscv/insn-dwarf.d: Reflect insn.s update.

2022-07-29  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-28  Tom Tromey  <tom@tromey.com>

	Remove some unneeded checks in Guile code
	The Guile code generally checks to see if an htab is non-null before
	destroying it.  However, the registry code already ensures this, so we
	can change these checks to asserts and simplify the code a little.

	Change registry to use less memory
	The registry code creates "registry_data" objects that hold the free
	function and the index; then the registry keys refer to this object.
	However, only the index is really useful, and now that registries have
	a private implementation, just the index can be stored and we can
	reduce the memory use of registries a little bit.  This also
	simplifies the code somewhat.

2022-07-28  Tom Tromey  <tom@tromey.com>

	Rewrite registry.h
	This rewrites registry.h, removing all the macros and replacing it
	with relatively ordinary template classes.  The result is less code
	than the previous setup.  It replaces large macros with a relatively
	straightforward C++ class, and now manages its own cleanup.

	The existing type-safe "key" class is replaced with the equivalent
	template class.  This approach ended up requiring relatively few
	changes to the users of the registry code in gdb -- code using the key
	system just required a small change to the key's declaration.

	All existing users of the old C-like API are now converted to use the
	type-safe API.  This mostly involved changing explicit deletion
	functions to be an operator() in a deleter class.

	The old "save/free" two-phase process is removed, and replaced with a
	single "free" phase.  No existing code used both phases.

	The old "free" callbacks took a parameter for the enclosing container
	object.  However, this wasn't truly needed and is removed here as
	well.

2022-07-28  Tom Tromey  <tom@tromey.com>

	Remove some unused functions from guile code
	The guile code has a couple of unused functions that touch on the
	registry API.  This patch removes them.

2022-07-28  Tom Tromey  <tom@tromey.com>

	Change allocation of type-copying hash table
	When an objfile is destroyed, types that are still in use and
	allocated on that objfile are copied.  A temporary hash map is created
	during this process, and it is allocated on the destroyed objfile's
	obstack -- which normally is fine, as that is going to be destroyed
	shortly anyway.

	However, this approach requires that the objfile be passed to registry
	destruction, and this won't be possible in the rewritten registry.
	This patch changes the copied type hash table to simply use the heap
	instead.  It also removes the 'objfile' parameter from
	copy_type_recursive, to make this all more clear.

	This patch also fixes an apparent bug in copy_type_recursive.
	Previously it was copying the dynamic property list to the dying
	objfile's obstack:

	-      = copy_dynamic_prop_list (&objfile->objfile_obstack,

	However I think this is incorrect -- that obstack is about to be
	destroyed.

2022-07-28  Tom Tromey  <tom@tromey.com>

	Change address_space to use new and delete
	This changes address_space to use new and delete, and makes some other
	small C++-ification changes as well, like changing address_space_num
	to be a method.

	This patch was needed for the subsequent patch to rewrite the registry
	system.

2022-07-28  Simon Farre  <simon.farre.cx@gmail.com>

	gdb/python: Add BreakpointLocation type
	PR python/18385

	v7:
	This version addresses the issues pointed out by Tom.

	Added nullchecks for Python object creations.

	Changed from using PyLong_FromLong to the gdb_py-versions.

	Re-factored some code to make it look more cohesive.

	Also added the more safe Python reference count decrement PY_XDECREF,
	even though the BreakpointLocation type is never instantiated by the
	user (explicitly documented in the docs) decrementing < 0 is made
	impossible with the safe call.

	Tom pointed out that using the policy class explicitly to decrement a
	reference counted object was not the way to go, so this has instead been
	wrapped in a ref_ptr that handles that for us in blocpy_dealloc.

	Moved macro from py-internal to py-breakpoint.c.

	Renamed section at the bottom of commit message "Patch Description".

	v6:
	This version addresses the points Pedro gave in review to this patch.

	Added the attributes `function`, `fullname` and `thread_groups`
	as per request by Pedro with the argument that it more resembles the
	output of the MI-command "-break-list".  Added documentation for these attributes.

	Cleaned up left overs from copy+paste in test suite, removed hard coding
	of line numbers where possible.

	Refactored some code to use more c++-y style range for loops
	wrt to breakpoint locations.

	Changed terminology, naming was very inconsistent. Used a variety of "parent",
	"owner". Now "owner" is the only term used, and the field in the
	gdb_breakpoint_location_object now also called "owner".

	v5:

	Changes in response to review by Tom Tromey:
	- Replaced manual INCREF/DECREF calls with
	  gdbpy_ref ptrs in places where possible.
	- Fixed non-gdb style conforming formatting
	- Get parent of bploc increases ref count of parent.
	- moved bploc Python definition to py-breakpoint.c

	The INCREF of self in bppy_get_locations is due
	to the individual locations holding a reference to
	it's owner. This is decremented at de-alloc time.

	The reason why this needs to be here is, if the user writes
	for instance;

	py loc = gdb.breakpoints()[X].locations[Y]

	The breakpoint owner object is immediately going
	out of scope (GC'd/dealloced), and the location
	object requires it to be alive for as long as it is alive.

	Thanks for your review, Tom!

	v4:
	Fixed remaining doc issues as per request
	by Eli.

	v3:
	Rewritten commit message, shortened + reworded,
	added tests.

	Patch Description

	Currently, the Python API lacks the ability to
	query breakpoints for their installed locations,
	and subsequently, can't query any information about them, or
	enable/disable individual locations.

	This patch solves this by adding Python type gdb.BreakpointLocation.
	The type is never instantiated by the user of the Python API directly,
	but is produced by the gdb.Breakpoint.locations attribute returning
	a list of gdb.BreakpointLocation.

	gdb.Breakpoint.locations:
	The attribute for retrieving the currently installed breakpoint
	locations for gdb.Breakpoint. Matches behavior of
	the "info breakpoints" command in that it only
	returns the last known or currently inserted breakpoint locations.

	BreakpointLocation contains 7 attributes

	6 read-only attributes:
	owner: location owner's Python companion object
	source: file path and line number tuple: (string, long) / None
	address: installed address of the location
	function: function name where location was set
	fullname: fullname where location was set
	thread_groups: thread groups (inferiors) where location was set.

	1 writeable attribute:
	enabled: get/set enable/disable this location (bool)

	Access/calls to these, can all throw Python exceptions (documented in
	the online documentation), and that's due to the nature
	of how breakpoint locations can be invalidated
	"behind the scenes", either by them being removed
	from the original breakpoint or changed,
	like for instance when a new symbol file is loaded, at
	which point all breakpoint locations are re-created by GDB.
	Therefore this patch has chosen to be non-intrusive:
	it's up to the Python user to re-request the locations if
	they become invalid.

	Also there's event handlers that handle new object files etc, if a Python
	user is storing breakpoint locations in some larger state they've
	built up, refreshing the locations is easy and it only comes
	with runtime overhead when the Python user wants to use them.

	gdb.BreakpointLocation Python type
	struct "gdbpy_breakpoint_location_object" is found in python-internal.h

	Its definition, layout, methods and functions
	are found in the same file as gdb.Breakpoint (py-breakpoint.c)

	1 change was also made to breakpoint.h/c to make it possible
	to enable and disable a bp_location* specifically,
	without having its LOC_NUM, as this number
	also can change arbitrarily behind the scenes.

	Updated docs & news file as per request.

	Testsuite: tests the .source attribute and the disabling of
	individual locations.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=18385


	Change-Id: I302c1c50a557ad59d5d18c88ca19014731d736b0

2022-07-28  yaowenbin  <yaowenbin1@huawei.com>

	gdb/gdb_mbuild.sh: use return instead of continue to avoid shellcheck error
	Fix:

	    In gdb_mbuild.sh line 174:
	                continue
	                ^------^ SC2104 (error): In functions, use return instead of continue.

	Change-Id: I5ce95b01359c5cfbb1612f2f48b80bfeea66c96c

2022-07-28  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-27  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-27  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: check for the makeinfo version
	gprofng/ChangeLog
	2022-07-25  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		PR gprofng/29368
		* configure.ac: Check for the makeinfo version.
		* configure: Rebuild.

2022-07-26  Keith Seitz  <keiths@redhat.com>

	gdb/linux_nat: Write memory using ptrace if /proc/pid/mem is not writable
	Commit 05c06f318fd9a112529dfc313e6512b399a645e4 enabled GDB to access
	memory while threads are running.  It did this by accessing
	/proc/PID/task/LWP/mem.

	Unfortunately, this interface is not implemented for writing in older
	kernels (such as RHEL6).  This means that GDB is unable to insert
	breakpoints on these hosts:

	 $ ./gdb -q gdb -ex start
	 Reading symbols from gdb...
	 Temporary breakpoint 1 at 0x40fdd5: file ../../src/gdb/gdb.c, line 28.
	 Starting program: /home/rhel6/fsf/linux/gdb/gdb
	 Warning:
	 Cannot insert breakpoint 1.
	 Cannot access memory at address 0x40fdd5

	 (gdb)

	Before this patch, linux_proc_xfer_memory_partial (previously called
	linux_proc_xfer_partial) would return TARGET_XFER_EOF if the write to
	/proc/PID/mem failed. [More specifically, linux_proc_xfer_partial
	would not "bother for one word," but the effect is the essentially
	same.]

	This status was checked by linux_nat_target::xfer_partial, which would
	then fallback to using ptrace to perform the operation.

	This is the specific hunk that removed the fallback:

	-  xfer = linux_proc_xfer_partial (object, annex, readbuf, writebuf,
	-                                 offset, len, xfered_len);
	-  if (xfer != TARGET_XFER_EOF)
	-    return xfer;
	+      return linux_proc_xfer_memory_partial (readbuf, writebuf,
	+                                            offset, len, xfered_len);
	+    }

	   return inf_ptrace_target::xfer_partial (object, annex, readbuf, writebuf,
	                                          offset, len, xfered_len);

	This patch makes linux_nat_target::xfer_partial go straight to writing
	memory via ptrace if writing via /proc/pid/mem is not possible in the
	running kernel, enabling GDB to insert breakpoints on these older
	kernels.  Note that a recent patch changed the return status from
	TARGET_XFER_EOF to TARGET_XFER_E_IO.

	Tested on {unix,native-gdbserver,native-extended-gdbserver}/-m{32,64}
	on x86_64, s390x, aarch64, and ppc64le.

	Change-Id: If1d884278e8c4ea71d8836bedd56e6a6c242a415

2022-07-26  Pedro Alves  <pedro@palves.net>

	gdb/linux-nat: Check whether /proc/pid/mem is writable
	Probe whether /proc/pid/mem is writable, by using it to write to a GDB
	variable.  This will be used in the following patch to avoid falling
	back to writing to inferior memory with ptrace if /proc/pid/mem _is_
	writable.

	Change-Id: If87eff0b46cbe5e32a583e2977a9e17d29d0ed3e

2022-07-26  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: LoongArch: Handle the function return value
	According to LoongArch ELF ABI specification [1], handle the function
	return value of various types.

	[1] https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html#_return_values

2022-07-26  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: LoongArch: Fix code style issues
	Fix some code style issues suggested by Tom Tromey and Andrew Burgess,
	thank you.

	(1) Put an introductory comment to explain the purpose for some functions.

	(2) Modify the the attribute code to make it portable.

	(3) Remove globals and pass pointers to locals.

	(4) Remove "*" in the subsequent comment lines.

	(5) Put two spaces before "{" and "}".

2022-07-26  Nick Clifton  <nickc@redhat.com>

	Stop the linker from complaining about RWX segments in sparc-solaris targets.
		PR 29411
		* configure.tgt (ac_default_ld_warn_rwx_segments): Disable for
		sparc-solaris configurations.

2022-07-26  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.opt/inline-small-func.exp with clang
	When running test-case gdb.opt/inline-small-func.exp with clang 12.0.1, I run
	into:
	...
	gdb compile failed, /usr/bin/ld: inline-small-func0.o: in function `main':
	inline-small-func.c:21: undefined reference to `callee'
	clang-12.0: error: linker command failed with exit code 1 \
	  (use -v to see invocation)
	UNTESTED: gdb.opt/inline-small-func.exp: failed to prepare
	...

	Fix this by using __attribute__((always_inline)).

	Tested on x86_64-linux.

2022-07-26  Alan Modra  <amodra@gmail.com>

	PowerPC32 ld test fails with --enable-targets=all
	Three pppc32 ld tests fail when spe support is included in the linker
	due to this snippet in ld/emulparams/elf32ppc.sh.

	if grep -q 'ld_elf32_spu_emulation' ldemul-list.h; then
	  DATA_START_SYMBOLS="${RELOCATING+*crt1.o(.data .data.* .gnu.linkonce.d.*)
	    PROVIDE (__spe_handle = .);
	    *(.data.spehandle)
	    . += 4 * (DEFINED (__spe_handle) || . != 0);}"
	fi

		* testsuite/ld-powerpc/tlsexe32.r: Pass with .data section present.
		* testsuite/ld-powerpc/tlsexe32no.r: Likewise.
		* testsuite/ld-powerpc/tlsso32.r: Likewise.

2022-07-26  Enze Li  <enze.li@hotmail.com>

	gdb/hurd: pass memory_tagged as false to find_memory_region_ftype
	I tried building GDB on GNU/Hurd, and ran into this error:

	  CXX    gnu-nat.o
	gnu-nat.c: In member function ‘virtual int gnu_nat_target::find_memory_regions(find_memory_region_ftype, void*)’:
	gnu-nat.c:2620:21: error: too few arguments to function
	 2620 |             (*func) (last_region_address,
	      |             ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
	 2621 |                      last_region_end - last_region_address,
	      |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	 2622 |                      last_protection & VM_PROT_READ,
	      |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	 2623 |                      last_protection & VM_PROT_WRITE,
	      |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	 2624 |                      last_protection & VM_PROT_EXECUTE,
	      |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	 2625 |                      1, /* MODIFIED is unknown, pass it as true.  */
	      |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	 2626 |                      data);
	      |                      ~~~~~
	gnu-nat.c:2635:13: error: too few arguments to function
	 2635 |     (*func) (last_region_address, last_region_end - last_region_address,
	      |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	 2636 |              last_protection & VM_PROT_READ,
	      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	 2637 |              last_protection & VM_PROT_WRITE,
	      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	 2638 |              last_protection & VM_PROT_EXECUTE,
	      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	 2639 |              1, /* MODIFIED is unknown, pass it as true.  */
	      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	 2640 |              data);
	      |              ~~~~~
	make[2]: *** [Makefile:1926: gnu-nat.o] Error 1

	This is because in this commit:

	  commit 68cffbbd4406b4efe1aa6e18460b1d7ca02549f1
	  Date:   Thu Mar 31 11:42:35 2022 +0100

	      [AArch64] MTE corefile support

	Added a new argument to find_memory_region_ftype, but did not pass it to
	the function in gnu-nat.c.  Fix this by passing memory_tagged as false.

	As Luis pointed out, similar bugs may also appear on FreeBSD and NetBSD,
	and I have reproduced them on both systems.  This patch fixes them
	incidentally.

	Tested by rebuilding on GNU/Hurd, FreeBSD/amd64 and NetBSD/amd64.

2022-07-26  Enze Li  <enze.li@hotmail.com>

	gdb/netbsd: add missing header file
	I ran into this error when building GDB on NetBSD:

	  CXX    netbsd-nat.o
	netbsd-nat.c: In member function 'virtual bool nbsd_nat_target::info_proc(const char*, info_proc_what)':
	netbsd-nat.c:314:3: error: 'gdb_argv' was not declared in this scope
	   gdb_argv built_argv (args);
	   ^~~~~~~~
	netbsd-nat.c:314:3: note: suggested alternative: 'gdbarch'
	   gdb_argv built_argv (args);
	   ^~~~~~~~
	   gdbarch
	netbsd-nat.c:315:7: error: 'built_argv' was not declared in this scope
	   if (built_argv.count () == 0)
	       ^~~~~~~~~~
	netbsd-nat.c:315:7: note: suggested alternative: 'buildargv'
	   if (built_argv.count () == 0)
	       ^~~~~~~~~~
	       buildargv
	gmake[2]: *** [Makefile:1893: netbsd-nat.o] Error 1

	Fix this by adding the missing header file, as it is obvious.

	Tested by rebuilding on NetBSD/amd64.

2022-07-26  Nick Clifton  <nickc@redhat.com>

	Updated translations for various sub-directories

2022-07-26  Andrew Burgess  <aburgess@redhat.com>

	gdb: rename gdbarch_tdep struct to fix g++ 4.8 build
	After the commit:

	  commit 08106042d9f5fdff60c129bf33190639f1a98b2a
	  Date:   Thu May 19 13:20:17 2022 +0100

	      gdb: move the type cast into gdbarch_tdep

	GDB would no longer build using g++ 4.8.  The issue appears to be some
	confusion caused by GDB having 'struct gdbarch_tdep', but also a
	templated function called 'gdbarch_tdep'.  Prior to the above commit
	the gdbarch_tdep function was not templated, and this compiled just
	fine.  Note that the above commit compiles just fine with later
	versions of g++, so this issue was clearly fixed at some point, though
	I've not tried to track down exactly when.

	In this commit I propose to fix the g++ 4.8 build problem by renaming
	'struct gdbarch_tdep' to 'struct gdbarch_tdep_base'.  This rename
	better represents that the struct is only ever used as a base class,
	and removes the overloading of the name, which allows GDB to build
	with g++ 4.8.

	I've also updated the comment on 'struct gdbarch_tdep_base' to fix a
	typo, and the comment on the 'gdbarch_tdep' function, to mention that
	in maintainer mode a run-time type check is performed.

2022-07-26  Nick Clifton  <nickc@redhat.com>

	Fix indentation in loongarch code, preventing a compile time warning.

2022-07-26  Lancelot SIX  <lancelot.six@amd.com>

	gdb/varobj: Fix varobj_invalidate_iter
	The varobj_invalidate function is meant to be called when restarting a
	process, and check at this point if some of the previously existing
	varobj can be recreated in the context of the new process.

	Two kind of varobj are subject to re-creation:  global varobj (i.e.
	varobj which reference a global variable), and floating varobj (i.e.
	varobj which are always re-evaluated in the context of whatever is
	the currently selected frame at the time of evaluation).

	However, in the re-creation process, the varobj_invalidate_iter
	recreates floating varobj as non-floating, due to an invalid parameter.
	This patches fixes this and adds an assertion to check that if a varobj
	is indeed recreated, it matches the original varobj "floating" property.

	Another issue is that if at this recreation time the expression watched
	by the floating varobj is not in scope, then the varobj is marked as
	invalid.  If later the user selects a frame where the expression becomes
	valid, the varobj remains invalid and this is wrong.  This patch also
	make sure that floating varobj are not invalidated if they cannot be
	evaluated.

	The last important thing to note is that due to the previous patch, when
	varobj_invalidate is executed (in the context of a new process), any
	global var have already been invalidated (this has been done when the
	objfile it referred to got invalidated).  As a consequence,
	varobj_invalidate tries to recreate vars which are already marked as
	invalid.  This does not entirely feels right, but I keep this behavior
	for backward compatibility.

	Tested on x86_64-linux

2022-07-26  Lancelot SIX  <lancelot.six@amd.com>

	gdb/varobj: Fix use after free in varobj
	Varobj object contains references to types, variables (i.e. struct
	variable) and expression.  All of those can reference data on an
	objfile's obstack.  It is possible for this objfile to be deleted (and
	the obstack to be feed), while the varobj remains valid.  Later, if the
	user uses the varobj, this will result in a use-after-free error.  With
	address sanitizer build, this leads to a plain error.  For non address
	sanitizer build we might see undefined behaviour, which manifest
	themself as assertion failures when accessing data backed by feed
	memory.

	This can be observed if we create a varobj that refers to ta symbol in a
	shared library, after either the objfile gets reloaded (using the `file`
	command) or after the shared library is unloaded (with a call to dlclose
	for example).

	This patch fixes those issues by:

	- Adding cleanup procedure to the free_objfile observable.  When
	  activated this observer clears expressions referencing the objfile
	  being freed, and removes references to blocks belonging to this
	  objfile.
	- Adding varobj support in the `preserve_values` (gdb.value.c).  This
	  ensures that before the objfile is unloaded, any type owned by the
	  objfile referenced by the varobj is replaced by an equivalent type
	  not owned by the objfile.  This process is done here instead of in the
	  free_objfile observer in order to reuse the type hash table already
	  used for similar purpose when replacing types of values kept in the
	  value history.

	This patch also makes sure to keep a reference to the expression's
	gdbarch and language_defn members when the varobj->root->exp is
	initialized.  Those structures outlive the objfile, so this is safe.
	This is done because those references might be used initialize a python
	context even after exp is invalidated.  Another approach could have been
	to initialize the python context with default gdbarch and language_defn
	(i.e. nullptr) if expr is NULL, but since we might still try to display
	the value which was obtained by evaluating exp when it was still valid,
	keeping track of the context which was used at this time seems
	reasonable.

	Tested on x86_64-Linux.

	Co-Authored-By: Pedro Alves <pedro@palves.net>

2022-07-26  Pedro Alves  <pedro@palves.net>

	MI: mi_runto -pending
	With the CLI testsuite's runto proc, we can pass "allow-pending" as an
	option, like:

	  runto func allow-pending

	That is currently not possible with MI's mi_runto, however.  This
	patch makes it possible, by adding a new "-pending" option to
	mi_runto.

	A pending breakpoint shows different MI attributes compared to a
	breakpoint with a location, so the regexp returned by
	mi_make_breakpoint isn't suitable.  Thus, add a new
	mi_make_breakpoint_pending proc for pending breakpoints.

	Tweak mi_runto to let it take and pass down arguments.

	Change-Id: I185fef00ab545a1df2ce12b4dbc3da908783a37c

2022-07-26  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-25  Ruud van der Pas  <ruud.vanderpas@oracle.com>

	gprofng: fix bug 29356 - Execution fails if gprofng is not included in PATH
	gprofng/Changelog:
	2022-07-22  Ruud van der Pas  <ruud.vanderpas@oracle.com>

		PR gprofng/29356
		* gp-display-html/gp-display-html.in: fixed a problem to execute
		gp-display-text in case gprofng is not included in the search
		path.

2022-07-25  Ruud van der Pas  <ruud.vanderpas@oracle.com>

	gprofng: fix bug 29392 - Unexpected line format in summary file
	gprofng/Changelog:
	2022-07-22  Ruud van der Pas  <ruud.vanderpas@oracle.com>

		PR gprofng/29392
		* gp-display-html/gp-display-html.in: modified a regex, plus the
		code to handle the results; renamed a variable to improve the
		consistency in naming.

2022-07-25  Ruud van der Pas  <ruud.vanderpas@oracle.com>

	gprofng: fix bug 29353 - Fix a lay-out issue in the html disassembly files
	gprofng/Changelog:
	2022-07-22  Ruud van der Pas  <ruud.vanderpas@oracle.com>

		PR gprofng/29353
		* gp-display-html/gp-display-html.in: fixed a problem in the
		generation of html for the disassembly where instructions
		without arguments were not handled correctly.

2022-07-25  Ruud van der Pas  <ruud.vanderpas@oracle.com>

	gprofng: fix bug 29352 - Fix the message Hexadecimal number > 0xffffffff non-portable
	gprofng/Changelog:
	2022-07-22  Ruud van der Pas  <ruud.vanderpas@oracle.com>

		PR gprofng/29352
		* gp-display-html/gp-display-html.in: the hex subroutine from
		the bigint module is now used.

2022-07-25  Ruud van der Pas  <ruud.vanderpas@oracle.com>

	gprofng: fix bug 29351 - Move dynamic loading of modules to a later stage
	gprofng/Changelog:
	2022-07-22  Ruud van der Pas  <ruud.vanderpas@oracle.com>

		PR gprofng/29351
		* gp-display-html/gp-display-html.in: the dynamic loading of
		modules occurred too early, resulting in the generation of the
		man page to fail in case a module is missing; the loading part is
		now done somewhat later in the execution to avoid this problem.

2022-07-25  Kevin Buettner  <kevinb@redhat.com>

	set/show python dont-write-bytecode fixes
	GDB uses the environment variable PYTHONDONTWRITEBYTECODE to
	determine whether or not to write the result of byte-compiling
	python modules when the "python dont-write-bytecode" setting
	is "auto".  Simon noticed that GDB's implementation doesn't
	follow the Python documentation.

	At present, GDB only checks for the existence of this environment
	variable.  That is not sufficient though.  Regarding
	PYTHONDONTWRITEBYTECODE, this document...

	    https://docs.python.org/3/using/cmdline.html

	...says:

	    If this is set to a non-empty string, Python won't try to write
	    .pyc files on the import of source modules.

	This commit fixes GDB's handling of PYTHONDONTWRITEBYTECODE by adding
	an empty string check.

	This commit also corrects the set/show command documentation for
	"python dont-write-bytecode".  The current doc was just a copy
	of that for set/show python ignore-environment.

	During his review of an earlier version of this patch, Eli Zaretskii
	asked that the help text that I proposed for "set/show python
	dont-write-bytecode" be expanded.  I've done that in addition to
	clarifying the documentation of this option in the GDB manual.

2022-07-25  Andrew Burgess  <aburgess@redhat.com>

	gdb/python: fix invalid use disassemble_info::stream
	After this commit:

	  commit 81384924cdcc9eb2676dd9084b76845d7d0e0759
	  Date:   Tue Apr 5 11:06:16 2022 +0100

	      gdb: have gdb_disassemble_info carry 'this' in its stream pointer

	The disassemble_info::stream field will no longer be a ui_file*.  That
	commit failed to update one location in py-disasm.c though.

	While running some tests using the Python disassembler API, I
	triggered a call to gdbpy_disassembler::print_address_func, and, as I
	had compiled GDB with the undefined behaviour sanitizer, GDB crashed
	as the code currently (incorrectly) casts the stream field to be a
	ui_file*.

	In this commit I fix this error.

	In order to test this case I had to tweak the existing test case a
	little.  I also spotted some debug printf statements in py-disasm.py,
	which I have removed.

2022-07-25  Andrew Burgess  <aburgess@redhat.com>

	gdb: fix use of uninitialised gdb_printing_disassembler::m_in_comment
	Simon pointed out that gdb_printing_disassembler::m_in_comment can be
	used uninitialised by the Python disassembler API code.  This issue
	was spotted when GDB was built with the undefined behaviour sanitizer,
	and causes the gdb.python/py-disasm.exp test to fail like this:

	  (gdb) PASS: gdb.python/py-disasm.exp: global_disassembler=GlobalPreInfoDisassembler: python add_global_disassembler(GlobalPreInfoDisassembler)
	  disassemble main
	  Dump of assembler code for function main:
	     0x0000555555555119 <+0>:     push   %rbp
	     0x000055555555511a <+1>:     mov    %rsp,%rbp
	     0x000055555555511d <+4>:     nop
	  /home/user/src/binutils-gdb/gdb/disasm.h:144:12: runtime error: load of value 118, which is not a valid value for type 'bool'

	The problem is that in disasmpy_builtin_disassemble we create a new
	instance of gdbpy_disassembler, which is a sub-class of
	gdb_printing_disassembler, however, the m_in_comment field is never
	initialised.

	This commit fixes the issue by providing a default initialisation
	value for m_in_comment in disasm.h.  As we only ever disassemble a
	single instruction in disasmpy_builtin_disassemble then we don't need
	to worry about reseting m_in_comment back to false after the single
	instruction has been disassembled.

	With this commit the above issue is resolved and
	gdb.python/py-disasm.exp now passes.

2022-07-25  H.J. Lu  <hjl.tools@gmail.com>

	ld: Compile 2 CTF tests with -O2
	When GCC 12 is used to build binutils with -O0, the following 2 tests
	failed:

	FAIL: Conflicted data syms, partially indexed, stripped, with variables
	FAIL: Conflicted data syms, partially indexed, stripped

	Compile 2 tests with -O2 to avoid test failures.

		PR ld/29378
		* testsuite/ld-ctf/data-func-conflicted-vars.d: Compile with -O2.
		* testsuite/ld-ctf/data-func-conflicted.d: Likewise.

2022-07-25  Pedro Alves  <pedro@palves.net>

	struct packed: Add fallback byte array implementation
	Attribute gcc_struct is not implemented in Clang targeting Windows, so
	add a fallback standard-conforming implementation based on arrays.

	I ran the testsuite on x86_64 GNU/Linux with this implementation
	forced, and saw no regressions.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29373

	Change-Id: I023315ee03622c59c397bf4affc0b68179c32374

2022-07-25  Pedro Alves  <pedro@palves.net>

	struct packed: Unit tests and more operators
	For PR gdb/29373, I wrote an alternative implementation of struct
	packed that uses a gdb_byte array for internal representation, needed
	for mingw+clang.  While adding that, I wrote some unit tests to make
	sure both implementations behave the same.  While at it, I implemented
	all relational operators.  This commit adds said unit tests and
	relational operators.  The alternative gdb_byte array implementation
	will come next.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29373

	Change-Id: I023315ee03622c59c397bf4affc0b68179c32374

2022-07-25  Pedro Alves  <pedro@palves.net>

	struct packed: Use gcc_struct on Windows
	Building GDB on mingw/gcc hosts is currently broken, due to a static
	assertion failure in gdbsupport/packed.h:

	  In file included from ../../../../../binutils-gdb/gdb/../gdbsupport/common-defs.h:201,
			   from ../../../../../binutils-gdb/gdb/defs.h:28,
			   from ../../../../../binutils-gdb/gdb/dwarf2/read.c:31:
	  ../../../../../binutils-gdb/gdb/../gdbsupport/packed.h: In instantiation of 'packed<T, Bytes>::packed(T) [with T = dwarf_unit_type; long long unsigned int Bytes = 1]':
	  ../../../../../binutils-gdb/gdb/dwarf2/read.h:181:74:   required from here
	  ../../../../../binutils-gdb/gdb/../gdbsupport/packed.h:41:40: error: static assertion failed
	     41 |     gdb_static_assert (sizeof (packed) == Bytes);
		|                        ~~~~~~~~~~~~~~~~^~~~~~~~
	  ../../../../../binutils-gdb/gdb/../gdbsupport/gdb_assert.h:27:48: note: in definition of macro 'gdb_static_assert'
	     27 | #define gdb_static_assert(expr) static_assert (expr, "")
		|                                                ^~~~
	  ../../../../../binutils-gdb/gdb/../gdbsupport/packed.h:41:40: note: the comparison reduces to '(4 == 1)'
	     41 |     gdb_static_assert (sizeof (packed) == Bytes);
		|                        ~~~~~~~~~~~~~~~~^~~~~~~~


	The issue is that mingw gcc defaults to "-mms-bitfields", which
	affects how bitfields are laid out.  We can however tell GCC that we
	want the regular GCC layout instead using attribute gcc_struct.

	Attribute gcc_struct is not implemented in "clang -target
	x86_64-pc-windows-gnu", so that will need a different fix.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29373

	Change-Id: I023315ee03622c59c397bf4affc0b68179c32374

2022-07-25  Andrew Burgess  <aburgess@redhat.com>

	binutils-gdb/git: highlight whitespace errors in source files
	For a long time I've had this in my ~/.gitconfig:

	  [core]
	          whitespace = space-before-tab,indent-with-non-tab,trailing-space

	which causes git to show me if I muck up and use spaces instead of
	tabs, or leave in trailing whitespace.  I find this really useful.

	I recently proposed adding something like this to the .gitattributes
	files for the GDB sub-directories (gdb, gdbsupport, and gdbserver)[1],
	however, the question was asked - couldn't this be done at the top
	level?

	So, in this commit, I propose to update the top-level .gitattributes
	file, after this commit, any git diff on a C, C++, Expect, or TCL
	source file, will highlight the following whitespace errors:

	  (a) Use a space before a tab at the start of a line,

	  (b) Use of spaces where a tab could be used at the start of a line,
	  and

	  (c) Any trailing whitespace.

	Errors are only highlighted in the diff on new or modified lines, so
	you don't get spammed for errors on context lines that you haven't
	modified.

	The only downside I see to adding this at the top level is if there
	are any sub-directories that don't follow the tabs/spaces indentation
	rules very well already, in those directories you'll end up hitting
	issues any time you edit a line.  For GDB we're usually pretty good,
	so having this highlighting isn't an issue.

	[1] https://sourceware.org/pipermail/gdb-patches/2022-July/190843.html

2022-07-25  Yvan Roux  <yvan.roux@foss.st.com>

	gdb/arm: Sync sp with other *sp registers
	For Arm Cortex-M33 with security extensions, there are 4 different
	stack pointers (msp_s, msp_ns, psp_s, psp_ns), without security
	extensions and for other Cortex-M targets, there are 2 different
	stack pointers (msp and psp).

	With this patch, sp will always be in sync with one of the real stack
	pointers on Arm targets that contain more than one stack pointer.

2022-07-25  Torbjörn SVENSSON  <torbjorn.svensson@foss.st.com>

	gdb/arm: Use if-else if instead of switch
	As the register numbers for the alternative Arm SP registers are not
	constant, it's not possible to use switch statement to define the
	rules.  In order to not have a mix, replace the few existing
	switch statements with regular if-else if statements

2022-07-25  Tom Tromey  <tromey@adacore.com>

	Remove dead code from windows_nat_target::detach
	windows_nat_target::detach has a variable 'detached' that is only set
	after a call to 'error'.  However, this can't happen because 'error'
	throws an exception.

	This patch removes the dead code.

2022-07-25  Andrew Burgess  <aburgess@redhat.com>

	gdb: handle dis_style_sub_mnemonic disassembler style
	In commit:

	  commit 4f46c0bc36471b725de0253bfec1a42a36e2c5c5
	  Date:   Mon Jul 4 17:45:25 2022 +0100

	      opcodes: add new sub-mnemonic disassembler style

	I added a new disassembler style dis_style_sub_mnemonic, but forgot to
	add GDB support for this style.  Fix this oversight in this commit.

2022-07-25  Andrew Burgess  <aburgess@redhat.com>

	libopcodes/ppc: add support for disassembler styling
	This commit adds disassembler styling to the libopcodes ppc
	disassembler.  This conversion was pretty straight forward, I just
	converted the fprintf_func calls to fprintf_styled_func calls and
	added an appropriate style.

	For testing the new styling I just assembled then disassembled the
	source files in gas/testsuite/gas/ppc and manually checked that the
	styling looked reasonable.

	I think the only slightly weird case was how things like '4*cr1+eq'
	are styled.  As best I can tell, this construct, used for example in
	this instruction:

	  crand   4*cr1+lt,4*cr1+gt,4*cr1+eq

	is used to access a field of a control register.  I initially tried
	styling this whole construct as a register[1], but during review it
	was suggested that instead different parts of the text should have
	different styles.  In this commit I propose styling '4*cr1+lt' like
	this:

	  4    - immediate,
	  *    - text,
	  cr1  - register
	  +    - text
	  lt   - sub-mnemonic

	If the user does not request styled output from objdump, then there
	should be no change in the disassembler output after this commit.

	[1] https://sourceware.org/pipermail/binutils/2022-July/121771.html

2022-07-25  Andrew Burgess  <aburgess@redhat.com>

	opcodes: add new sub-mnemonic disassembler style
	When adding libopcodes disassembler styling support for AArch64, it
	feels like the results would be improved by having a new sub-mnemonic
	style.  This will be used in cases like:

	  add    w16, w7, w1, uxtb #2
	                      ^^^^----- Here

	And:

	  cinc   w0, w1, ne
	                 ^^----- Here

	This commit just adds the new style, and prepares objdump to handle
	the style.  A later commit will add AArch64 styling, and will actually
	make use of the style.

	As this style is currently unused, there should be no user visible
	changes after this commit.

2022-07-25  liuzhensong  <liuzhensong@loongson.cn>

	LoongArch: Add testcases for new relocate types.
	  gas/testsuite/gas/all/
	    gas.exp
	  gas/testsuite/gas/loongarch/
	    jmp_op.d
	    jmp_op.s
	    macro_op.d
	    macro_op.s
	    macro_op_32.d
	    macro_op_32.s
	    macro_op_large_abs.d
	    macro_op_large_abs.s
	    macro_op_large_pc.d
	    macro_op_large_pc.s
	    reloc.d
	    reloc.s

	  ld/testsuite/ld-elf/
	    pr26936.d
	    shared.exp
	  ld/testsuite/ld-loongarch-elf/
	    attr-ifunc-4.c
	    attr-ifunc-4.out
	    disas-jirl.d
	    ifunc.exp
	    jmp_op.d
	    jmp_op.s
	    libnopic-global.s
	    macro_op.d
	    macro_op.s
	    macro_op_32.d
	    macro_op_32.s
	    nopic-global-so.rd
	    nopic-global-so.sd
	    nopic-global.out
	    nopic-global.s
	    nopic-global.sd
	    nopic-global.xd
	    nopic-local.out
	    nopic-local.rd
	    nopic-local.s
	    nopic-local.sd
	    nopic-local.xd
	    nopic-weak-global-so.rd
	    nopic-weak-global-so.sd
	    nopic-weak-global.out
	    nopic-weak-global.s
	    nopic-weak-global.sd
	    nopic-weak-global.xd
	    nopic-weak-local.out
	    nopic-weak-local.rd
	    nopic-weak-local.s
	    nopic-weak-local.sd
	    nopic-weak-local.xd
	    pic.exp
	    pic.ld

2022-07-25  liuzhensong  <liuzhensong@loongson.cn>

	bfd: Delete R_LARCH_NONE from dyn info of LoongArch.
	  Some R_LARCH_64 in section .eh_frame will to generate
	  R_LARCH_NONE, we change relocation to R_LARCH_32_PCREL
	  from R_LARCH_64 in setction .eh_frame and not generate
	  dynamic relocation for R_LARCH_32_PCREL.

	  Add New relocate type R_LARCH_32_PCREL for .eh_frame.

	  include/elf/
	    loongarch.h

	  bfd/
	    bfd/bfd-in2.h
	    libbfd.h
	    reloc.c
	    elfxx-loongarch.c
	    elfnn-loongarch.c

	  gas/config/
	    tc-loongarch.c

	  binutils/
	    readelf.c

	  ld/testsuite/ld-elf/
	    eh5.d

2022-07-25  liuzhensong  <liuzhensong@loongson.cn>

	LoongArch: Move ifunc info to rela.dyn from rela.plt.
	  Delete R_LARCH_IRELATIVE from dynamic loader (glibc ld.so) when
	  loading lazy function (rela.plt section).

	  In dynamic programes, move ifunc dynamic relocate info to section
	  srelgot from srelplt.

	  bfd/
	    elfnn-loongarch.c

2022-07-25  liuzhensong  <liuzhensong@loongson.cn>

	LoongArch: gas: Add new reloc types.
	  Generate new relocate types while use new macro insns.

	  gas/config/
	    loongarch-lex.h
	    loongarch-parse.y
	    tc-loongarch.c
	    tc-loongarch.h

2022-07-25  liuzhensong  <liuzhensong@loongson.cn>

	LoongArch:opcodes: Add new reloc types.
	  opcodes: Replace old insns with news and generate new relocate types
	  while macro insns expanding.

	  opcodes/
	    loongarch-opc.c

2022-07-25  liuzhensong  <liuzhensong@loongson.cn>

	bfd: Add supported for LoongArch new relocations.
	  Define new reloc types according to linker needs.

	  include/elf/
	    loongarch.h

	  bfd/
	    bfd-in2.h
	    libbfd.h
	    reloc.c
	    elfnn-loongarch.c
	    elfxx-loongarch.c
	    elfxx-loongarch.h

2022-07-25  Alan Modra  <amodra@gmail.com>

	Re: PowerPC64 .branch_lt address
	On seeing PR29369 my suspicion was naturally on a recent powerpc64
	change, commit 0ab80031430e.  Without a reproducer, I spent time
	wondering what could have gone wrong, and while I doubt this patch
	would have fixed the PR, there are some improvements that can be made
	to cater for user silliness.

	I also noticed that when -z relro -z now sections are created out of
	order, with .got before .plt in the section headers but .got is laid
	out at a higher address.  That's due to the address expression for
	.branch_lt referencing SIZEOF(.got) and so calling init_os (which
	creates a bfd section) for .got before the .plt section is created.
	Fix that by ignoring SIZEOF in exp_init_os.  Unlike ADDR and LOADADDR
	which need to reference section vma and lma respectively, SIZEOF can
	and does cope with a missing bfd section by returning zero for its
	size, which of course is correct.

		PR 29369
		* ldlang.c (exp_init_os): Don't create a bfd section for SIZEOF.
		* emulparams/elf64ppc.sh (OTHER_RELRO_SECTIONS_2): Revise
		.branch_lt address to take into account possible user sections
		with alignment larger than 8 bytes.

2022-07-25  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-24  Enze Li  <enze.li@hotmail.com>

	gdb/testsuite: add a clear test to py-breakpoint.exp
	This patch adds a test case to try to clear an internal python
	breakpoint using the clear command.

	This was suggested by Pedro during a code review of the following
	commit.

	  commit a5c69b1e49bae4d0dcb20f324cebb310c63495c6
	  Date:   Sun Apr 17 15:09:46 2022 +0800

	    gdb: fix using clear command to delete non-user breakpoints(PR cli/7161)

	Tested on x86_64 openSUSE Tumbleweed.

2022-07-24  Enze Li  <enze.li@hotmail.com>

	gdb/testsuite: rename get_maint_bp_addr and move it to gdb-utils.exp
	The get_maint_bp_addr procedure will be shared by other test suite, so
	move it to gdb-utils.exp.

	Following Andrew's suggestion, I renamed get_maint_bp_addr to
	gdb_get_bp_addr, since it would have handled normal breakpoints in
	addition to the internal ones.  Note that there is still room for
	improvement in this procedure, which I indicated in comments nearby.

2022-07-24  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-23  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-22  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Fix duplicate CUs in all_comp_units
	When running test-case gdb.cp/cpexprs-debug-types.exp with target board
	cc-with-debug-names on a system with gcc 12.1.1 (defaulting to dwarf 5), I
	run into:
	...
	(gdb) file cpexprs-debug-types^M
	Reading symbols from cpexprs-debug-types...^M
	warning: Section .debug_aranges in cpexprs-debug-types has duplicate \
	  debug_info_offset 0x0, ignoring .debug_aranges.^M
	gdb/dwarf2/read.h:309: internal-error: set_length: \
	  Assertion `m_length == length' failed.^M
	...

	The exec contains a .debug_names section, which gdb rejects due to
	.debug_names containing a list of TUs, while the exec doesn't contain a
	.debug_types section (which is what you'd expect for dwarf 4).

	Gdb then falls back onto the cooked index, which calls create_all_comp_units
	to create all_comp_units.  However, the failed index reading left some
	elements in all_comp_units, so we end up with duplicates in all_comp_units,
	which causes the misleading complaint and the assert.

	Fix this by:
	- asserting at the start of create_all_comp_units that all_comp_units is empty,
	  as we do in create_cus_from_index and create_cus_from_debug_names, and
	- cleaning up all_comp_units when failing in dwarf2_read_debug_names.

	Add a similar cleanup in dwarf2_read_gdb_index.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29381

2022-07-22  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: give binaries distinct names in Ada tests
	Some Ada tests repeat their test sequence with different gnat-encodings,
	typically "all" and "minimal".  However, they give the same name to both
	binaries, meaning the second run overwrites the binary of the first run.
	This makes it difficult and confusing when trying to reproduce problems
	manually with the test artifacts.  Change those tests to use unique
	names for each pass.

	Change-Id: Iaa3c9f041241249a7d67392e785c31aa189dcc88

2022-07-22  Tom Tromey  <tromey@adacore.com>

	Change target_ops::async to accept bool
	This changes the parameter of target_ops::async from int to bool.
	Regression tested on x86-64 Fedora 34.

	Fix typo in windows-nat.c
	I noticed a typo in a printf in windows-nat.c.  This fixes it.

2022-07-22  Tom de Vries  <tdevries@suse.de>

	[gdb] Add empty range unit test for gdb::parallel_for_each
	Add a unit test that verifies that we can call gdb::parallel_for_each with an
	empty range.

	Tested on x86_64-linux.

2022-07-22  Alan Modra  <amodra@gmail.com>

	PR17122, OSX 10.9 build failure
	sbrk hasn't been used in binutils/ or ld/ for quite some time (so the
	PR was fixed a while ago).  Tidy up configury.

		PR 17122
	binutils/
		* configure.ac: Don't check for sbrk.
		* sysdep.h (sbrk): Don't supply fallback declaration.
		* config.in: Regenerate.
		* configure: Regenerate.
	ld/
		* configure.ac: Don't check for sbrk.
		* config.in: Regenerate.
		* configure: Regenerate.

2022-07-22  Jiangshuai Li  <jiangshuai_li@linux.alibaba-inc.com>

	gdb/csky modify registers list for general_reggroup
	There are two modification points here:
	1. For the debugging of csky architecture, after executing "info register",
	   we hope to print out GPRs, PC and the registers related to exceptions.
	2. With tdesc-xml, users can view the register groups described in XML.

2022-07-22  Alan Modra  <amodra@gmail.com>

	PR15951, binutils testsuite builds status wrapper unconditionally
		PR 15951
		* testsuite/binutils-all/objcopy.exp: Build testglue.o when
		needs_status_wrapper.

2022-07-22  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-21  Peter Bergner  <bergner@linux.ibm.com>

	Add ChangeLog entry from previous commit

2022-07-21  Peter Bergner  <bergner@linux.ibm.com>

	PowerPC: Create new MMA instruction masks and use them
	The MMA instructions use XX3_MASK|3<<21 as an instruction mask, but that
	misses the RC bit/bit 31, so if we disassemble a .long that represents an
	MMA instruction except that it also has bit 31 set, we will erroneously
	disassemble it to that MMA instruction.  We create new masks defines that
	contain bit 31 so that doesn't happen anymore.

	opcodes/
		* ppc-opc.c (XACC_MASK, XX3ACC_MASK): New defines.
		(P_GER_MASK, xxmfacc, xxmtacc, xxsetaccz, xvi8ger4pp, xvi8ger4,
		xvf16ger2pp, xvf16ger2, xvf32gerpp, xvf32ger, xvi4ger8pp, xvi4ger8,
		xvi16ger2spp, xvi16ger2s, xvbf16ger2pp, xvbf16ger2, xvf64gerpp,
		xvf64ger, xvi16ger2, xvf16ger2np, xvf32gernp, xvi8ger4spp, xvi16ger2pp,
		xvbf16ger2np, xvf64gernp, xvf16ger2pn, xvf32gerpn, xvbf16ger2pn,
		xvf64gerpn, xvf16ger2nn, xvf32gernn, xvbf16ger2nn, xvf64gernn: Use them.

2022-07-21  H.J. Lu  <hjl.tools@gmail.com>

	i386: Don't allow GOTOFF relocation against IFUNC symbol for PIC
	We can't use the PLT entry as the function address for PIC since the PIC
	register may not be set up properly for indirect call.

	bfd/

		PR ld/27998
		* elf32-i386.c (elf_i386_relocate_section): Don't allow GOTOFF
		relocation against IFUNC symbol for PIC.

	ld/

		PR ld/27998
		* testsuite/ld-i386/pr27998a.d: Replace -shared with -e bar.
		* testsuite/ld-i386/pr27998b.d: Expect a linker error.
		* testsuite/ld-ifunc/ifunc-2-i386-now.d: Updated.
		* testsuite/ld-ifunc/ifunc-2-local-i386-now.d: Likewise.
		* testsuite/ld-ifunc/ifunc-2-i386.s: Replace @GOTOFF with @GOT.
		* testsuite/ld-ifunc/ifunc-2-local-i386.s: Likewise.

2022-07-21  Andrew Burgess  <aburgess@redhat.com>

	gdb: ensure the cast in gdbarch_tdep is valid
	This commit makes use of gdb::checked_static_cast when casting the
	generic gdbarch_tdep pointer to a specific sub-class type.  This means
	that, when compiled in developer mode, GDB will validate that the cast
	is correct.

	In order to use gdb::checked_static_cast the types involved must have
	RTTI, which is why the gdbarch_tdep base class now has a virtual
	destructor.

	Assuming there are no bugs in GDB where we cast a gdbarch_tdep pointer
	to the wrong type, then there should be no changes after this commit.

	If any bugs do exist, then GDB will now assert (in a developer build).

2022-07-21  Andrew Burgess  <aburgess@redhat.com>

	gdbsupport: add checked_static_cast
	This commit was inspired by these mailing list posts:

	  https://sourceware.org/pipermail/gdb-patches/2022-June/190323.html
	  https://sourceware.org/pipermail/gdb-patches/2022-April/188098.html

	The idea is to add a new function gdb::checked_static_cast, which can,
	in some cases, be used as a drop-in replacement for static_cast.  And
	so, if I previously wrote this:

	  BaseClass *base = get_base_class_pointer ();
	  DerivedClass *derived = static_cast<DerivedClass *> (base);

	I can now write:

	  BaseClass *base = get_base_class_pointer ();
	  DerivedClass *derived = gdb::checked_static_cast<DerivedClass *> (base);

	The requirement is that BaseClass and DerivedClass must be
	polymorphic.

	The benefit of making this change is that, when GDB is built in
	developer mode, a run-time check will be made to ensure that `base`
	really is of type DerivedClass before the cast is performed.  If
	`base` is not of type DerivedClass then GDB will assert.

	In a non-developer build gdb::checked_static_cast is equivalent to a
	static_cast, and there should be no performance difference.

	This commit adds the support function, but does not make use of this
	function, a use will be added in the next commit.

	Co-Authored-By: Pedro Alves <pedro@palves.net>
	Co-Authored-By: Tom Tromey <tom@tromey.com>

2022-07-21  Andrew Burgess  <aburgess@redhat.com>

	gdb: move the type cast into gdbarch_tdep
	I built GDB for all targets on a x86-64/GNU-Linux system, and
	then (accidentally) passed GDB a RISC-V binary, and asked GDB to "run"
	the binary on the native target.  I got this error:

	  (gdb) show architecture
	  The target architecture is set to "auto" (currently "i386").
	  (gdb) file /tmp/hello.rv32.exe
	  Reading symbols from /tmp/hello.rv32.exe...
	  (gdb) show architecture
	  The target architecture is set to "auto" (currently "riscv:rv32").
	  (gdb) run
	  Starting program: /tmp/hello.rv32.exe
	  ../../src/gdb/i387-tdep.c:596: internal-error: i387_supply_fxsave: Assertion `tdep->st0_regnum >= I386_ST0_REGNUM' failed.

	What's going on here is this; initially the architecture is i386, this
	is based on the default architecture, which is set based on the native
	target.  After loading the RISC-V executable the architecture of the
	current inferior is updated based on the architecture of the
	executable.

	When we "run", GDB does a fork & exec, with the inferior being
	controlled through ptrace.  GDB sees an initial stop from the inferior
	as soon as the inferior comes to life.  In response to this stop GDB
	ends up calling save_stop_reason (linux-nat.c), which ends up trying
	to read register from the inferior, to do this we end up calling
	target_ops::fetch_registers, which, for the x86-64 native target,
	calls amd64_linux_nat_target::fetch_registers.

	After this I eventually end up in i387_supply_fxsave, different x86
	based targets will end in different functions to fetch registers, but
	it doesn't really matter which function we end up in, the problem is
	this line, which is repeated in many places:

	  i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (arch);

	The problem here is that the ARCH in this line comes from the current
	inferior, which, as we discussed above, will be a RISC-V gdbarch, the
	tdep field will actually be of type riscv_gdbarch_tdep, not
	i386_gdbarch_tdep.  After this cast we are relying on undefined
	behaviour, in my case I happen to trigger an assert, but this might
	not always be the case.

	The thing I tried that exposed this problem was of course, trying to
	start an executable of the wrong architecture on a native target.  I
	don't think that the correct solution for this problem is to detect,
	at the point of cast, that the gdbarch_tdep object is of the wrong
	type, but, I did wonder, is there a way that we could protect
	ourselves from incorrectly casting the gdbarch_tdep object?

	I think that there is something we can do here, and this commit is the
	first step in that direction, though no actual check is added by this
	commit.

	This commit can be split into two parts:

	 (1) In gdbarch.h and arch-utils.c.  In these files I have modified
	 gdbarch_tdep (the function) so that it now takes a template argument,
	 like this:

	    template<typename TDepType>
	    static inline TDepType *
	    gdbarch_tdep (struct gdbarch *gdbarch)
	    {
	      struct gdbarch_tdep *tdep = gdbarch_tdep_1 (gdbarch);
	      return static_cast<TDepType *> (tdep);
	    }

	  After this change we are no better protected, but the cast is now
	  done within the gdbarch_tdep function rather than at the call sites,
	  this leads to the second, much larger change in this commit,

	  (2) Everywhere gdbarch_tdep is called, we make changes like this:

	    -  i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (arch);
	    +  i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (arch);

	There should be no functional change after this commit.

	In the next commit I will build on this change to add an assertion in
	gdbarch_tdep that checks we are casting to the correct type.

2022-07-21  Andrew Burgess  <aburgess@redhat.com>

	gdb: select suitable thread for gdbarch_adjust_breakpoint_address
	The three targets that implement gdbarch_adjust_breakpoint_address are
	arm, frv, and mips.  In each of these targets the adjust breakpoint
	address function does some combination of reading the symbol table, or
	reading memory at the location the breakpoint could be placed.

	The problem is that performing these actions requires that the current
	inferior and program space be the one in which the breakpoint will be
	placed, and this is not currently always the case.

	Consider a GDB session with multiple inferiors.  One inferior might be
	a native target while another could be a remote target of a completely
	different architecture.  Alternatively, if we consider ARM and
	AArch64, one native inferior might be AArch64, while a second native
	inferior could be ARM.

	In these cases it is possible, and valid, for a user to have one
	inferior selected, and place a breakpoint in the other inferior by
	placing a breakpoint on a particular symbol.

	If this happens, then currently, when
	gdbarch_adjust_breakpoint_address is called, the wrong inferior (and
	program space) will be selected, and memory reads, and symbol look
	ups, will not return the expected results, this could lead to
	breakpoints being placed in the wrong location.

	There are currently two places where gdbarch_adjust_breakpoint_address
	is called:

	  1. In infrun.c, in the function handle_step_into_function.  In this
	  case, I believe that the correct inferior and program space will
	  already be selected as this is called as part of the stop event
	  handling, so I don't think we need to worry about this case, and

	  2. In breakpoint.c, in the function adjust_breakpoint_address, which
	  is itself called from code_breakpoint::add_location and
	  watch_command_1.

	  The watch_command_1 case I don't think we need to worry about, this
	  is for when a local watch expression is created, which can only be
	  in the currently selected inferior, so this case should be fine.

	  The code_breakpoint::add_location case is the one that needs fixing,
	  this is what allows a breakpoint to be created between inferiors.

	To fix the code_breakpoint::add_location case, I propose that we pass
	the "correct" program_space (i.e. the program space in which the
	breakpoint will be created) to the adjust_breakpoint_address function.
	Then in adjust_breakpoint_address we can make use of
	switch_to_program_space_and_thread to switch program_space and
	inferior before calling gdbarch_adjust_breakpoint_address.

	I discovered this issue while working on a later patch in this
	series.  This later patch will detect when we cast the result of
	gdbarch_tdep to the wrong type.

	With this later patch in place I ran gdb.multi/multi-arch.exp on an
	AArch64 target.  In this situation, two inferiors are created, an
	AArch64 inferior, and an ARM inferior.  The test selected the AArch64
	inferior and tries to create a breakpoint in the ARM inferior.

	As a result of this we end up in arm_adjust_breakpoint_address, which
	calls arm_pc_is_thumb.  Before this commit the AArch64 inferior would
	be current.  As a result, all of the checks in arm_pc_is_thumb would
	fail (they rely on reading symbols from the current program space),
	and so, at the end of arm_pc_is_thumb we would call
	arm_frame_is_thumb.  However, remember, at this point the current
	inferior is the AArch64 inferior, so the current frame is an AArch64
	frame.

	In arm_frame_is_thumb we call arm_psr_thumb_bit, which calls
	gdbarch_tdep and casts the result to arm_gdbarch_tdep.  This is wrong,
	the tdep field is of type aarch64_gdbarch_tdep.  After this we have
	undefined behaviour.

	With this patch in place, we will have switched to a thread in the ARM
	program space before calling arm_adjust_breakpoint_address.  As a
	result, we now succeed in looking up the required symbols in
	arm_pc_is_thumb, and so we never call arm_frame_is_thumb.

	However, in the worst case scenario, if we did end up calling
	arm_frame_is_thumb, as the current inferior should now be the ARM
	inferior, the current frame should be an ARM frame, so we still should
	not hit undefined behaviour.

	I have added an assert to arm_frame_is_thumb.

2022-07-21  Andrew Burgess  <aburgess@redhat.com>

	gdb/mips: rewrite show_mask_address
	This commit is similar to the previous commit, but in this case GDB is
	actually relying on undefined behaviour.

	Consider building GDB for all targets on x86-64/GNU-Linux, then doing
	this:

	  (gdb) show mips mask-address
	  Zeroing of upper 32 bits of 64-bit addresses is auto.
	  The 32 bit address mask is set automatically.  Currently disabled
	  (gdb)

	The 'show mips mask-address' command ends up in show_mask_address in
	mips-tdep.c, and this function does this:

	  mips_gdbarch_tdep *tdep
	    = (mips_gdbarch_tdep *) gdbarch_tdep (target_gdbarch ());

	Later we might pass TDEP to mips_mask_address_p.  However, in my
	example above, on an x86-64 native target, the current target
	architecture will be an x86-64 gdbarch, and the tdep field within the
	gdbarch will be of type i386_gdbarch_tdep, not of type
	mips_gdbarch_tdep, as a result the cast above was incorrect, and TDEP
	is not pointing at what it thinks it is.

	I also think the current output is a little confusing, we appear to
	have two lines that show the same information, but using different
	words.

	The first line comes from calling deprecated_show_value_hack, while
	the second line is printed directly from show_mask_address.  However,
	both of these lines are printing the same mask_address_var value.  I
	don't think the two lines actually adds any value here.

	Finally, none of the text in this function is passed through the
	internationalisation mechanism.

	It would be nice to remove another use of deprecated_show_value_hack
	if possible, so this commit does a complete rewrite of
	show_mask_address.

	After this commit the output of the above example command, still on my
	x86-64 native target is:

	    (gdb) show mips mask-address
	    Zeroing of upper 32 bits of 64-bit addresses is "auto" (current architecture is not MIPS).

	The 'current architecture is not MIPS' text is only displayed when the
	current architecture is not MIPS.  If the architecture is mips then we
	get the more commonly seen 'currently "on"' or 'currently "off"', like
	this:

	  (gdb) set architecture mips
	  The target architecture is set to "mips".
	  (gdb) show mips mask-address
	  Zeroing of upper 32 bits of 64-bit addresses is "auto" (currently "off").
	  (gdb)

	All the text is passed through the internationalisation mechanism, and
	we only call gdbarch_tdep when we know the gdbarch architecture is
	bfd_arch_mips.

2022-07-21  Andrew Burgess  <aburgess@redhat.com>

	gdb/arm: move fetch of arm_gdbarch_tdep to a more inner scope
	This is a small refactor to resolve an issue before it becomes a
	problem in a later commit.

	Move the fetching of an arm_gdbarch_tdep into a more inner scope
	within two functions in arm-tdep.c.

	The problem with the current code is that the functions in question
	are used as the callbacks for two set/show parameters.  These set/show
	parameters are available no matter the current architecture, but are
	really about controlling an ARM architecture specific setting.  And
	so, if I build GDB for all targets on an x86-64/GNU-Linux system, I
	can still do this:

	  (gdb) show arm fpu
	  (gdb) show arm abi

	After these calls we end up in show_fp_model and arm_show_abi
	respectively, where we unconditionally do this:

	  arm_gdbarch_tdep *tdep
	    = (arm_gdbarch_tdep *) gdbarch_tdep (target_gdbarch ());

	However, the gdbarch_tdep() result will only be a arm_gdbarch_tdep if
	the current architecture is ARM, otherwise the result will actually be
	of some other type.

	This isn't actually a problem, as in both cases the use of tdep is
	guarded by a later check that the gdbarch architecture is
	bfd_arch_arm.

	This commit just moves the call to gdbarch_tdep() after the
	architecture check.

	In a later commit gdbarch_tdep() will be able to spot when we are
	casting the result to the wrong type, and this function will trigger
	assertion failures if things are not fixed.

	There should be not user visible changes after this commit.

2022-07-21  Torbjörn SVENSSON  <torbjorn.svensson@foss.st.com>

	[arm] Rename arm_cache_is_sp_register to arm_is_alternative_sp_register
	All usages of this helper are really made to check if the register is
	one of the alternative SP registers (MSP/MSP_S/MSP_NS/PSP/PSP_S/PSP_NS)
	with the ARM_SP_REGNUM case being handled separately.

2022-07-21  Tom de Vries  <tdevries@suse.de>

	[gdb/python] Fix typo in test_python
	Fix typo in ref_output_0 variable in test_python.

	Tested by running the selftest on x86_64-linux with python 3.11.

2022-07-21  Tom de Vries  <tdevries@suse.de>

	[gdb/python] Fix python selftest with python 3.11
	With python 3.11 I noticed:
	...
	$ gdb -q -batch -ex "maint selftest python"
	Running selftest python.
	Self test failed: self-test failed at gdb/python/python.c:2246
	Ran 1 unit tests, 1 failed
	...

	In more detail:
	...
	(gdb) p output
	$5 = "Traceback (most recent call last):\n  File \"<string>\", line 0, \
	  in <module>\nKeyboardInterrupt\n"
	(gdb) p ref_output
	$6 = "Traceback (most recent call last):\n  File \"<string>\", line 1, \
	  in <module>\nKeyboardInterrupt\n"
	...

	Fix this by also allowing line number 0.

	Tested on x86_64-linux.

	This should hopefully fix buildbot builder gdb-rawhide-x86_64.

2022-07-21  Tom de Vries  <tdevries@suse.de>

	[gdbsupport] Fix type of parallel_for_each_debug
	When I changed the initialization of parallel_for_each_debug from 0 to false,
	I forgot to change the type from int to bool.  Fix this.

	Tested by rebuilding on x86_64-linux.

2022-07-21  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Fix bad compile unit index complaint
	I noticed this code in dw2_debug_names_iterator::next:
	...
	        case DW_IDX_compile_unit:
	          /* Don't crash on bad data.  */
	          if (ull >= per_bfd->all_comp_units.size ())
	            {
	              complaint (_(".debug_names entry has bad CU index %s"
	                           " [in module %s]"),
	                         pulongest (ull),
	                         objfile_name (objfile));
	              continue;
	            }
	          per_cu = per_bfd->get_cu (ull);
	          break;
	...

	This code used to DTRT, before we started keeping both CUs and TUs in
	all_comp_units.

	Fix by using "per_bfd->all_comp_units.size () - per_bfd->tu_stats.nr_tus"
	instead.

	It's hard to produce a test-case for this, but let's try at least to trigger
	the complaint somehow.  We start out by creating an exec with .debug_types and
	.debug_names:
	...
	$ gcc -g ~/hello.c -fdebug-types-section
	$ gdb-add-index -dwarf-5 a.out
	...
	and verify that we don't see any complaints:
	...
	$ gdb -q -batch -iex "set complaints 100" ./a.out
	...

	We look at the CU and TU table using readelf -w and conclude that we have
	nr_cus == 6 and nr_tus == 1.

	Now override ull in dw2_debug_names_iterator::next for the DW_IDX_compile_unit
	case to 6, and we have:
	...
	$ gdb -q -batch -iex "set complaints 100" ./a.out
	During symbol reading: .debug_names entry has bad CU index 6 [in module a.out]
	...

	After this, it still crashes because this code in
	dw2_debug_names_iterator::next:
	...
	  /* Skip if already read in.  */
	  if (m_per_objfile->symtab_set_p (per_cu))
	    goto again;
	...
	is called with per_cu == nullptr.

	Fix this by skipping the entry if per_cu == nullptr.

	Now revert the fix and observe that the complaint disappears, so we've
	confirmed that the fix is required.

	A somewhat similar issue for .gdb_index in dw2_symtab_iter_next has been filed
	as PR29367.

	Tested on x86_64-linux, with native and target board cc-with-debug-names.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29336

2022-07-21  Jan Beulich  <jbeulich@suse.com>

	x86: replace wrong attributes on VCVTDQ2PH{X,Y}
	A standalone (without SAE) StaticRounding attribute is meaningless, and
	indeed all other similar insns have ATTSyntax there instead. I can only
	assume this was some strange copy-and-paste mistake.

	x86/Intel: correct AVX512F scatter insn element sizes
	I clearly screwed up in 6ff00b5e12e7 ("x86/Intel: correct permitted
	operand sizes for AVX512 scatter/gather") giving all AVX512F scatter
	insns Dword element size. Update testcases (also their gather parts),
	utilizing that there previously were two identical lines each (for no
	apparent reason).

2022-07-21  Alan Modra  <amodra@gmail.com>

	PR29390, DW_CFA_AARCH64_negate_ra_state vs. DW_CFA_GNU_window_save
		PR 29390
	binutils/
		* dwarf.c (is_aarch64, DW_CFA_GNU_window_save_name): New.
		(display_debug_frames): Use them.
		(init_dwarf_regnames_aarch64): Set is_aarch64.
		(init_dwarf_regnames_by_elf_machine_code): Clear is_aarch64.
		(init_dwarf_regnames_by_bfd_arch_and_mach): Likewise.
	gas/
		* testsuite/gas/aarch64/pac_ab_key.d: Adjust expected output.
		* testsuite/gas/aarch64/pac_negate_ra_state.d: Likewise.

2022-07-21  Alan Modra  <amodra@gmail.com>

	PR29337, readelf CU/TU mixup in .gdb_index
	Commit 244e19c79111 changed a number of variables in display_gdb_index
	to count entries rather than words.

		PR 29337
		* dwarf.c (display_gdb_index): Correct use of cu_list_elements.

2022-07-21  Alan Modra  <amodra@gmail.com>

	PR29370, infinite loop in display_debug_abbrev
	The PR29370 testcase is a fuzzed object file with multiple
	.trace_abbrev sections.  Multiple .trace_abbrev or .debug_abbrev
	sections are not a violation of the DWARF standard.  The DWARF5
	standard even gives an example of multiple .debug_abbrev sections
	contained in groups.  Caching and lookup of processed abbrevs thus
	needs to be done by section and offset rather than base and offset.
	(Why base anyway?)  Or, since section contents are kept, by a pointer
	into the contents.

		PR 29370
		* dwarf.c (struct abbrev_list): Replace abbrev_base and
		abbrev_offset with raw field.
		(find_abbrev_list_by_abbrev_offset): Delete.
		(find_abbrev_list_by_raw_abbrev): New function.
		(process_abbrev_set): Set list->raw and list->next.
		(find_and_process_abbrev_set): Replace abbrev list lookup with
		new function.  Don't set list abbrev_base, abbrev_offset or next.

2022-07-21  Alan Modra  <amodra@gmail.com>

	binutils/dwarf.c: abbrev caching
	I'm inclined to think that abbrev caching is counter-productive.  The
	time taken to search the list of abbrevs converted to internal form is
	non-zero, and it's easy to decode the raw abbrevs.  It's especially
	silly to cache empty lists of decoded abbrevs (happens with zero
	padding in .debug_abbrev), or abbrevs as they are displayed when there
	is no further use of those abbrevs.  This patch stops caching in those
	cases.

		* dwarf.c (record_abbrev_list_for_cu): Add free_list param.
		Put abbrevs on abbrev_lists here.
		(new_abbrev_list): Delete function.
		(process_abbrev_set): Return newly allocated list.  Move
		abbrev base, offset and size checking to..
		(find_and_process_abbrev_set): ..here, new function.  Handle
		lookup of cached abbrevs here, and calculate start and end
		for process_abbrev_set.  Return free_list if newly alloc'd.
		(process_debug_info): Consolidate cached list lookup, new list
		alloc and processing into find_and_process_abbrev_set call.
		Free list when not cached.
		(display_debug_abbrev): Similarly.

2022-07-21  Alan Modra  <amodra@gmail.com>

	miscellaneous dwarf.c tidies
		* dwarf.c: Leading and trailing whitespace fixes.
		(free_abbrev_list): New function.
		(free_all_abbrevs): Use the above.  Free cu_abbrev_map here too.
		(process_abbrev_set): Print actual section name on error.
		(get_type_abbrev_from_form): Add overflow check.
		(free_debug_memory): Don't free cu_abbrev_map here..
		(process_debug_info): ..or here.  Warn on another case of not
		finding a neeeded abbrev.

2022-07-21  Alan Modra  <amodra@gmail.com>

	PowerPC64: fix build error on 32-bit hosts
	elf64-ppc.c:11673:33: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘bfd_vma’ {aka ‘long long unsigned int’} [-Werror=format=]
	11673 |   fprintf (stderr, "offset = %#lx:", stub_entry->stub_offset);
	      |                              ~~~^    ~~~~~~~~~~~~~~~~~~~~~~~
	      |                                 |              |
	      |                                 |              bfd_vma {aka long long unsigned int}
	      |                                 long unsigned int
	      |                              %#llx

		* elf64-ppc.c (dump_stub): Use BFD_VMA_FMT.

2022-07-21  Kevin Buettner  <kevinb@redhat.com>

	Wrap python_write_bytecode with HAVE_PYTHON ifdef
	This commit fixes a build error on machines lacking python headers
	and/or libraries.

2022-07-21  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-20  Kevin Buettner  <kevinb@redhat.com>

	Handle Python 3.11 deprecation of PySys_SetPath and Py_SetProgramName
	Python 3.11 deprecates PySys_SetPath and Py_SetProgramName.  The
	PyConfig API replaces these and other functions.  This commit uses the
	PyConfig API to provide equivalent functionality while also preserving
	support for older versions of Python, i.e. those before Python 3.8.

	A beta version of Python 3.11 is available in Fedora Rawhide.  Both
	Fedora 35 and Fedora 36 use Python 3.10, while Fedora 34 still used
	Python 3.9.  I've tested these changes on Fedora 34, Fedora 36, and
	rawhide, though complete testing was not possible on rawhide due to
	a kernel bug.  That being the case, I decided to enable the newer
	PyConfig API by testing PY_VERSION_HEX against 0x030a0000.  This
	corresponds to Python 3.10.

	We could try to use the PyConfig API for Python versions as early as 3.8,
	but I'm reluctant to do this as there may have been PyConfig related
	bugs in earlier versions which have since been fixed.  Recent linux
	distributions should have support for Python 3.10.  This should be
	more than adequate for testing the new Python initialization code in
	GDB.

	Information about the PyConfig API as well as the motivation behind
	deprecating the old interface can be found at these links:

	https://github.com/python/cpython/issues/88279
	https://peps.python.org/pep-0587/
	https://docs.python.org/3.11/c-api/init_config.html

	The v2 commit also addresses several problems that Simon found in
	the v1 version.

	In v1, I had used Py_DontWriteBytecodeFlag in the new initialization
	code, but Simon pointed out that this global configuration variable
	will be deprecated in Python 3.12.  This version of the patch no longer
	uses Py_DontWriteBytecodeFlag in the new initialization code.
	Additionally, both Py_DontWriteBytecodeFlag and Py_IgnoreEnvironmentFlag
	will no longer be used when building GDB against Python 3.10 or higher.
	While it's true that both of these global configuration variables are
	deprecated in Python 3.12, it makes sense to disable their use for
	gdb builds against 3.10 and higher since those are the versions for
	which the PyConfig API is now being used by GDB.  (The PyConfig API
	includes different mechanisms for making the same settings afforded
	by use of the soon-to-be deprecated global configuration variables.)

	Simon also noted that PyConfig_Clear() would not have be called for
	one of the failure paths.  I've fixed that problem and also made the
	rest of the "bail out" code more direct.  In particular,
	PyConfig_Clear() will always be called, both for success and failure.

	The v3 patch addresses some rebase conflicts related to module
	initialization .  Commit 3acd9a692dd ("Make 'import gdb.events' work")
	uses PyImport_ExtendInittab instead of PyImport_AppendInittab.  That
	commit also initializes a struct for each module to import.  Both the
	initialization and the call to were moved ahead of the ifdefs to avoid
	having to replicate (at least some of) the code three times in various
	portions of the ifdefs.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28668
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29287

2022-07-20  Christopher Di Bella  <cjdb@google.com>

	gdb/value.c: add several headers to the include list
	Building GDB currently fails to build with libc++, because libc++ is
	stricter about which headers "leak" entities they're not guaranteed
	to support. The following headers have been added:

	* `<iterator>`, to support `std::back_inserter`
	* `<utility>`, to support `std::move` and `std::swap`
	* `<vector>`, to support `std::vector`

	Change-Id: Iaeb15057c5fbb43217df77ce34d4e54446dbcf3d

2022-07-20  Pedro Alves  <pedro@palves.net>

	Don't stop all threads prematurely after first step of "step N"
	In all-stop mode, when the target is itself in non-stop mode (like
	GNU/Linux), if you use the "step N" (or "stepi/next/nexti N") to step
	a thread a number of times:

	 (gdb) help step
	 step, s
	 Step program until it reaches a different source line.
	 Usage: step [N]
	 Argument N means step N times (or till program stops for another reason).

	... GDB prematurely stops all threads after the first step, and
	doesn't re-resume them for the subsequent N-1 steps.  It's as if for
	the 2nd and subsequent steps, the command was running with
	scheduler-locking enabled.

	This can be observed with the testcase added by this commit, which
	looks like this:

	 static pthread_barrier_t barrier;

	 static void *
	 thread_func (void *arg)
	 {
	   pthread_barrier_wait (&barrier);
	   return NULL;
	 }

	 int
	 main ()
	 {
	   pthread_t thread;
	   int ret;

	   pthread_barrier_init (&barrier, NULL, 2);

	   /* We run to this line below, and then issue "next 3".  That should
	      step over the 3 lines below and land on the return statement.  If
	      GDB prematurely stops the thread_func thread after the first of
	      the 3 nexts (and never resumes it again), then the join won't
	      ever return.  */
	   pthread_create (&thread, NULL, thread_func, NULL); /* set break here */
	   pthread_barrier_wait (&barrier);
	   pthread_join (thread, NULL);

	   return 0;
	 }

	The test hangs and times out without the GDB fix:

	 (gdb) next 3
	 [New Thread 0x7ffff7d89700 (LWP 525772)]
	 FAIL: gdb.threads/step-N-all-progress.exp: non-stop=off: target-non-stop=on: next 3 (timeout)

	The problem is a core gdb bug.

	When you do "step/stepi/next/nexti N", GDB internally creates a
	thread_fsm object and associates it with the stepping thread.  For the
	stepping commands, the FSM's class is step_command_fsm.  That object
	is what keeps track of how many steps are left to make.  When one step
	finishes, handle_inferior_event calls stop_waiting and returns, and
	then fetch_inferior_event calls the "should_stop" method of the event
	thread's FSM.  The implementation of that method decrements the
	steps-left counter.  If the counter is 0, it returns true and we
	proceed to presenting the stop to the user.  If it isn't 0 yet, then
	the method returns false, indicating to fetch_inferior_event to "keep
	going".

	Focusing now on when the first step finishes -- we're in "all-stop"
	mode, with the target in non-stop mode.  When a step finishes,
	handle_inferior_event calls stop_waiting, which itself calls
	stop_all_threads to stop everything.  I.e., after the first step
	completes, all threads are stopped, before handle_inferior_event
	returns.  And after that, now in fetch_inferior_event, we consult the
	thread's thread_fsm::should_stop, which as we've seen, for the first
	step returns false -- i.e., we need to keep_going for another step.
	However, since the target is in non-stop mode, keep_going resumes
	_only_ the current thread.  All the other threads remain stopped,
	inadvertently.

	If the target is in non-stop mode, we don't actually need to stop all
	threads right after each step finishes, and then re-resume them again.
	We can instead defer stopping all threads until all the steps are
	completed.

	So fix this by delaying the stopping of all threads until after we
	called the FSM's "should_stop" method.  I.e., move it from
	stop_waiting, to handle_inferior_events's callers,
	fetch_inferior_event and wait_for_inferior.

	New test included.  Tested on x86-64 GNU/Linux native and gdbserver.

	Change-Id: Iaad50dcfea4464c84bdbac853a89df92ade6ae01

2022-07-20  Alan Modra  <amodra@gmail.com>

	Re: opcodes/arc: Implement style support in the disassembler
		* arc-dis.c (print_insn_arc): Fix thinko.

2022-07-20  Dmitry Selyutin  <ghostmansd@gmail.com>

	gas/symbols: introduce md_resolve_symbol
	Assuming GMSD is a special operand, marked as O_md1, the code:

	    .set VREG, GMSD
	    .set REG, VREG
	    extsw REG, 2

	...fails upon attempts to resolve the value of the symbol. This happens
	since machine-dependent values are not handled in the giant op switch.
	We introduce a custom md_resolve_symbol macro; the ports can use this
	macro to customize the behavior when resolve_symbol_value hits O_md
	operand.

2022-07-20  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-19  H.J. Lu  <hjl.tools@gmail.com>

	x86: Disallow invalid relocations against protected symbols
	Since glibc 2.36 will issue warnings for copy relocation against
	protected symbols and non-canonical reference to canonical protected
	functions, change the linker to always disallow such relocations.

	bfd/

		* elf32-i386.c (elf_i386_scan_relocs): Remove check for
		elf_has_indirect_extern_access.
		* elf64-x86-64.c (elf_x86_64_scan_relocs): Likewise.
		(elf_x86_64_relocate_section): Remove check for
		elf_has_no_copy_on_protected.
		* elfxx-x86.c (elf_x86_allocate_dynrelocs): Check for building
		executable instead of elf_has_no_copy_on_protected.
		(_bfd_x86_elf_adjust_dynamic_symbol): Disallow copy relocation
		against non-copyable protected symbol.
		* elfxx-x86.h (SYMBOL_NO_COPYRELOC): Remove check for
		elf_has_no_copy_on_protected.

	ld/

		* testsuite/ld-i386/i386.exp: Expect linker error for PR ld/17709
		test.
		* testsuite/ld-i386/pr17709.rd: Removed.
		* testsuite/ld-i386/pr17709.err: New file.
		* testsuite/ld-x86-64/pr17709.rd: Removed.
		* testsuite/ld-x86-64/pr17709.err: New file.
		* testsuite/ld-x86-64/pr28875-func.err: Updated.
		* testsuite/ld-x86-64/x86-64.exp: Expect linker error for PR
		ld/17709 test.  Add tests for function pointer against protected
		function.

2022-07-19  Fangrui Song  <i@maskray.me>

	x86: Make protected symbols local for -shared
	Call _bfd_elf_symbol_refs_local_p with local_protected==true.  This has
	2 noticeable effects for -shared:

	* GOT-generating relocations referencing a protected data symbol no
	  longer lead to a GLOB_DAT (similar to a hidden symbol).
	* Direct access relocations (e.g. R_X86_64_PC32) no longer has the
	  confusing diagnostic below.

	    __attribute__((visibility("protected"))) void *foo() {
	      return (void *)foo;
	    }

	    // gcc -fpic -shared -fuse-ld=bfd
	    relocation R_X86_64_PC32 against protected symbol `foo' can not be used when making a shared object

	The new behavior matches arm, aarch64 (commit
	83c325007c5599fa9b60b8d5f7b84842160e1d1b), and powerpc ports, and other
	linkers: gold and ld.lld.

	Note: if some code tries to use direct access relocations to take the
	address of foo, the pointer equality will break, but the error should be
	reported on the executable link, not on the innocent shared object link.
	glibc 2.36 will give a warning at relocation resolving time.

	With this change, `#define elf_backend_extern_protected_data 1` is no
	longer effective.  Just remove it.

	Remove the test "Run protected-func-1 without PIE" since -fno-pic
	address taken operation in the executable doesn't work with protected
	symbol in a shared object by default.  Similarly, remove
	protected-data-1a and protected-data-1b.  protected-data-1b can be made
	working by removing HAVE_LD_PIE_COPYRELOC from GCC
	(https://sourceware.org/pipermail/gcc-patches/2022-June/596678.html).

2022-07-19  Luis Machado  <luis.machado@arm.com>

	Reformat gdbarch-components.py to fix deviations
	Reformat to make sure we have a clean file with no deviations
	from the expected python code format.

2022-07-19  Luis Machado  <luis.machado@arm.com>

	[AArch64] MTE corefile support
	Teach GDB how to dump memory tags for AArch64 when using the gcore command
	and how to read memory tag data back from a core file generated by GDB
	(via gcore) or by the Linux kernel.

	The format is documented in the Linux Kernel documentation [1].

	Each tagged memory range (listed in /proc/<pid>/smaps) gets dumped to its
	own PT_AARCH64_MEMTAG_MTE segment. A section named ".memtag" is created for each
	of those segments when reading the core file back.

	To save a little bit of space, given MTE tags only take 4 bits, the memory tags
	are stored packed as 2 tags per byte.

	When reading the data back, the tags are unpacked.

	I've added a new testcase to exercise the feature.

	Build-tested with --enable-targets=all and regression tested on aarch64-linux
	Ubuntu 20.04.

	[1] Documentation/arm64/memory-tagging-extension.rst (Core Dump Support)

2022-07-19  Luis Machado  <luis.machado@arm.com>

	[AArch64] Support AArch64 MTE memory tag dumps in core files
	The Linux kernel can dump memory tag segments to a core file, one segment
	per mapped range. The format and documentation can be found in the Linux
	kernel tree [1].

	The following patch adjusts bfd and binutils so they can handle this new
	segment type and display it accordingly. It also adds code required so GDB
	can properly read/dump core file data containing memory tags.

	Upon reading, each segment that contains memory tags gets mapped to a
	section named "memtag". These sections will be used by GDB to lookup the tag
	data. There can be multiple such sections with the same name, and they are not
	numbered to simplify GDB's handling and lookup.

	There is another patch for GDB that enables both reading
	and dumping of memory tag segments.

	Tested on aarch64-linux Ubuntu 20.04.

	[1] Documentation/arm64/memory-tagging-extension.rst (Core Dump Support)

2022-07-19  Luis Machado  <luis.machado@arm.com>

	[AArch64] Fix testcase compilation failure
	Newer distros carry newer headers that contains MTE definitions.  Account
	for that fact in the MTE testcases (gdb.arch/aarch64-mte.exp) and define
	constants conditionally to prevent compilation failures.

2022-07-19  H.J. Lu  <hjl.tools@gmail.com>

	ld: Pass -nostdlib to compiler with -r
	Pass -nostdlib to compiler with -r to avoid unnecessary .o file and
	libraries.

		PR ld/29377
		* testsuite/ld-elf/linux-x86.exp: Pass -nostdlib with -r.

2022-07-19  H.J. Lu  <hjl.tools@gmail.com>

	x86: Properly check invalid relocation against protected symbol
	Only check invalid relocation against protected symbol defined in shared
	object.

	bfd/

		PR ld/29377
		* elf32-i386.c (elf_i386_scan_relocs): Only check invalid
		relocation against protected symbol defined in shared object.
		* elf64-x86-64.c (elf_x86_64_scan_relocs): Likewise.

	ld/

		PR ld/29377
		* testsuite/ld-elf/linux-x86.exp: Run PR ld/29377 tests.
		* testsuite/ld-elf/pr29377a.c: New file.
		* testsuite/ld-elf/pr29377b.c: Likewise.

2022-07-19  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-18  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: link libgprofng.so against -lpthread
	gprofng/ChangeLog
	2022-07-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		PR gprofng/29364
		* src/Makefile.am (libgprofng_la_LIBADD): Add -lpthread.
		* src/Makefile.in: Rebuild.

2022-07-18  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: fix regression in build and a race condition in autoreconf
	gprofng/ChangeLog
	2022-07-14  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		PR gprofng/29338
		* libcollector/configure.ac (AC_CONFIG_HEADERS): Fix a race condition.
		* libcollector/configure: Rebuild.
		* libcollector/Makefile.in: Rebuild.
		* common/config.h.in: Rebuild.
		* common/lib-config.h.in: Created by autoreconf.

2022-07-18  Tom Tromey  <tromey@adacore.com>

	Add gdb.free_objfile event registry
	Currently, Python code can use event registries to detect when gdb
	loads a new objfile, and when gdb clears the objfile list.  However,
	there's no way to detect the removal of an objfile, say when the
	inferior calls dlclose.

	This patch adds a gdb.free_objfile event registry and arranges for an
	event to be emitted in this case.

2022-07-18  Pedro Alves  <pedro@palves.net>

	Put gdb.base/bt-on-fatal-signal.exp GDB cores in output dir
	I noticed that gdb.base/bt-on-fatal-signal.exp was contributing four
	core files to the count of unexpected core files:

	 $ make check TESTS="gdb.base/bt-on-fatal-signal.exp"

			 === gdb Summary ===

	 # of unexpected core files      4
	 # of expected passes            21

	These are GDB core dumps.  They are expected, however, because the
	whole point of the testcase is to crash GDB with a signal.

	Make GDB change its current directory to the output dir just before
	crashing, so that the core files end up there.  The result is now:

			 === gdb Summary ===

	 # of expected passes            25

	and:

	 $ find . -name "core.*"
	 ./testsuite/outputs/gdb.base/bt-on-fatal-signal/core.gdb.1676506.nelson.1657727692
	 ./testsuite/outputs/gdb.base/bt-on-fatal-signal/core.gdb.1672585.nelson.1657727671
	 ./testsuite/outputs/gdb.base/bt-on-fatal-signal/core.gdb.1674833.nelson.1657727683
	 ./testsuite/outputs/gdb.base/bt-on-fatal-signal/core.gdb.1673709.nelson.1657727676

	(Note the test is skipped at the top if on a remote host.)

	Change-Id: I79e4fb2e91330279c7a509930b1952194a72e85a

2022-07-18  Tom Tromey  <tromey@adacore.com>

	Remove array typedef assumption for Ada
	Currently the Ada code assumes that it can distinguish between a
	multi-dimensional array and an array of arrays by looking for an
	intervening typedef -- that is, for an array of arrays, there will be
	a typedef wrapping the innermost array type.

	A recent compiler change removes this typedef, which causes a gdb
	failure in the internal AdaCore test suite.

	This patch handles this case by checking whether the array type in
	question has a name.

2022-07-18  Tom Tromey  <tromey@adacore.com>

	Remove manual lifetime management from cli_interp
	cli_interp manually manages its cli_out object.  This patch changes it
	to use a unique_ptr, and also changes cli_uiout to be a private
	member.

	Remove cli_out_new
	cli_out_new is just a small wrapper around 'new'.  This patch removes
	it, replacing it with uses of 'new' instead.

	Replace input_interactive_p with a method
	This replaces the global input_interactive_p function with a new
	method ui::input_interactive_p.

	Remove ui_register_input_event_handler
	This patch removes ui_register_input_event_handler and
	ui_unregister_input_event_handler, replacing them with methods on
	'ui'.  It also changes gdb to use these methods everywhere, rather
	than sometimes reaching in to the ui to manage the file descriptor
	directly.

2022-07-18  Claudiu Zissulescu  <claziss@gmail.com>

	opcodes/arc: Implement style support in the disassembler
	Update the ARC disassembler to supply style information to the
	disassembler output. The output formatting remains unchanged.

	opcodes/ChangeLog:
		* disassemble.c (disassemble_init_for_target): Set
		created_styled_output for ARC based targets.
		* arc-dis.c (find_format_from_table): Use fprintf_styled_ftype
		instead of fprintf_ftype throughout.
		(find_format): Likewise.
		(print_flags): Likewise.
		(print_insn_arc): Likewise.

2022-07-18  Claudiu Zissulescu  <claziss@synopsys.com>

	arc: Update missing cipher.
	The ciphers 5,7, and 9 are missing when parsing an assembly
	instruction leading to errors when those ciphers are
	used.

	gas/config
		* tc-arc.c (md_assembly): Update strspn string with the
	          missing ciphers.

2022-07-18  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Remove duplicate of supports_gnuc
	In commit 9d9dd861e98 ("[gdb/testsuite] Fix regression in
	step-indirect-call-thunk.exp with gcc 7") I accidentally committed a duplicate
	of supports_gnuc, which caused:
	...
	DUPLICATE: gdb.base/gdb-caching-proc.exp: supports_gnuc: consistency
	...

	Fix this by removing the duplicate.

	Tested on x86_64-linux.

2022-07-18  Andrew Burgess  <aburgess@redhat.com>

	gdb/python: look for python, then python 3 at configure time
	It is possible that a system might have a python3 executable, but no
	python executable.  For example, on my Fedora system the python2
	package provides /usr/bin/python2, the python3 package provides
	/usr/bin/python3, and the python-unversioned-command package provides
	/usr/bin/python, which picks between python2 and python3.

	It is quite possible to only have python3 available on a system.

	Currently, when GDB configures, it looks for a 'python' executable.
	If non is found then GDB will be built without python support.  Or the
	user needs to configure using --with-python=/usr/bin/python3.

	This commit updates GDB's configure.ac script to first look for
	'python', and then 'python3'.  Now, on a system that only has a
	python3 executable, GDB will automatically find, and use that in order
	to provide python support, no user supplied configure arguments are
	needed.

	I've tested this on my local machine by removing the
	python-unversioned-command package, confirming that there is no longer
	a 'python' executable in my $PATH, and then rebuilding GDB from
	scratch.  GDB with this patch has python support.

2022-07-18  Jan Beulich  <jbeulich@suse.com>

	x86: correct VMOVSH attributes
	Both forms were missing VexW0 (thus allowing Evex.W=1 to be encoded by
	suitable means, which would cause #UD). The memory operand form further
	was using the wrong Masking value, thus allowing zeroing-masking to be
	encoded for the store form (which would again cause #UD).

	x86: re-order insn template fields
	This saves quite a number of shift instructions: The "operands" field
	can now be retrieved by just masking (no shift), and extracting the
	"extension_opcode" field now only requires a (signed) right shift, with
	no prereq left one. (Of course there may be architectures where, in a
	cross build, there might be no difference at all, e.g. when there are
	suitable bitfield extraction insns.)

2022-07-18  Tom de Vries  <tdevries@suse.de>

	[gdbsupport] Improve thread scheduling in parallel_for_each
	When running a task using parallel_for_each, we get the following
	distribution:
	...
	Parallel for: n_elements: 7271
	Parallel for: minimum elements per thread: 10
	Parallel for: elts_per_thread: 1817
	Parallel for: elements on worker thread 0       : 1817
	Parallel for: elements on worker thread 1       : 1817
	Parallel for: elements on worker thread 2       : 1817
	Parallel for: elements on worker thread 3       : 0
	Parallel for: elements on main thread           : 1820
	...

	Note that there are 4 active threads, and scheduling elts_per_thread on each
	of those handles 4 * 1817 == 7268, leaving 3 "left over" elements.

	These leftovers are currently handled in the main thread.

	That doesn't seem to matter much for this example, but for say 10 threads and
	99 elements, you'd have 9 threads handling 9 elements and 1 thread handling 18
	elements.

	Instead, distribute the left over elements over the worker threads, such that
	we have:
	...
	Parallel for: elements on worker thread 0       : 1818
	Parallel for: elements on worker thread 1       : 1818
	Parallel for: elements on worker thread 2       : 1818
	Parallel for: elements on worker thread 3       : 0
	Parallel for: elements on main thread           : 1817
	...

	Tested on x86_64-linux.

2022-07-18  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Allow override of ASAN_OPTIONS in lib/gdb.exp
	Use set_sanitizer_default for ASAN_OPTIONS in lib/gdb.exp.

	This allows us to override the default detect_leaks=0 setting, by manually
	doing:
	...
	$ export ASAN_OPTIONS=detect_leaks=1
	$ make check
	...

	Tested on x86_64-linux, by building with -fsanitize=address and running
	test-case gdb.dwarf2/gdb-add-index.exp with and without
	"export ASAN_OPTIONS=detect_leaks=1".

2022-07-18  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix regression in step-indirect-call-thunk.exp with gcc 7
	Since commit 43127ae5714 ("Fix gdb.base/step-indirect-call-thunk.exp") I run
	into:
	...
	gdb compile failed, gcc: error: unrecognized command line option \
	  '-fcf-protection=none'; did you mean '-flto-partition=none'?
	UNTESTED: gdb.base/step-indirect-call-thunk.exp: failed to prepare
	...

	The problem is that -fcf-protection is supported starting gcc 8, but I'm using
	system gcc 7.5.0.

	Fix this by only adding -fcf-protection=none for gcc 8 and later.

	Tested on x86_64-linux, with gcc 7.5.0, 8.2.1 and 12.1.1.

2022-07-18  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.arch/i386-mpx.exp
	Since commit c4a3dbaf113 ("Expose current 'print' settings to Python") we
	have:
	...
	(gdb) print /x $bnd0 = {0x10, 0x20}^M
	$22 = {lbound = 0x10, ubound = 0x20} : size 0x11^M
	(gdb) FAIL: gdb.arch/i386-mpx.exp: verify size for bnd0
	...

	The regexp in the test-case expects "size 17".

	Fix this by updating the regexp.

	Tested on x86_64-linux.

2022-07-18  Tom de Vries  <tdevries@suse.de>

	[gdbsupport] Add parallel_for_each_debug
	Add a parallel_for_each_debug variable, set to false by default.

	With an a.out compiled from hello world, we get with
	parallel_for_each_debug == true:
	...
	$ gdb -q -batch a.out -ex start
	  ...
	Parallel for: n_elements: 7271
	Parallel for: minimum elements per thread: 10
	Parallel for: elts_per_thread: 1817
	Parallel for: elements on worker thread 0       : 1817
	Parallel for: elements on worker thread 1       : 1817
	Parallel for: elements on worker thread 2       : 1817
	Parallel for: elements on worker thread 3       : 0
	Parallel for: elements on main thread           : 1820

	Temporary breakpoint 1, main () at /home/vries/hello.c:6
	6         printf ("hello\n");
	...

	Tested on x86_64-linux.

2022-07-18  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-17  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-16  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-15  Aaron Merey  <amerey@redhat.com>

	gdb-add-index always generates an error when libdebuginfod wasn't compiled in
	gdb-add-index runs gdb with -iex 'set debuginfod enabled off'.  If gdb
	is not compiled against libdebuginfod this causes an unnecessary error
	message to be printed to stderr indicating that gdb was not built with
	debuginfod support.

	Fix this by changing the 'set debuginfod enabled off' command to a
	no-op when gdb isn't built with libdebuginfod.

2022-07-15  Bruno Larsen  <blarsen@redhat.com>

	gdb/testsuite: modernize gdb.base/maint.exp
	gdb.base/maint.exp was using several gdb_expect statements, probably
	because this test case predates the existance of gdb_test_multiple. This
	commit updates the test case to use gdb_test_multiple, making it more
	resilient to internal errors and such.

	The only gdb_expect left in the testcase is one that specifically looks
	for an internal error being triggered as a PASS.

2022-07-15  Tom Tromey  <tromey@adacore.com>

	Add 'nibbles' to gdb.print_options
	When I rebased and updated the print_options patch, I forgot to update
	print_options to add the new 'nibbles' feature to the result.  This
	patch fixes the oversight.  I'm checking this in.

2022-07-15  Carl Love  <cel@us.ibm.com>

	PowerPC: Add support for IEEE 128-bit format.
	The test gdb.base/infcall-nested-structs-c.exp fails on a gdb assert
	in function ppc64_sysv_abi_return_value in file gdb/ppc-sysv-tdep.c.  The
	assert is due to the missing IEEE 128-bit support in file
	gdb/ppc-sysv-tdep.c.

	The IBM long double was the initial float 128-bit support added by IBM
	The IEEE 128-bit support, which is similar IBM long double support, was
	made the default starting with GCC 12.  The floating point format
	differences include the number of bits used to encode the exponent
	and significand.  Also, IBM long double values are passed in a pair of
	floating point registers.  The  IEEE 128-bit value is passed in a single
	vector register.

	This patch fixes the gdb_assert (ok); in function
	ppc64_sysv_abi_return_value in gdb/ppc-sysv-tdep.c by adding IEEE FLOAT
	128-bit type support for PowerPC.

	The patch has been tested on Power 10, ELFv2.  It fixes the following list
	of regression failures on Power 10:

	gdb.base/infcall-nested-structs-c.exp      192
	gdb.base/infcall-nested-structs-c++.exp     76
	gdb.base/structs.exp                         9

	The patch has been tested on Power 8 BE which is ELFv1.

2022-07-15  Tom Tromey  <tromey@adacore.com>

	Add 'summary' mode to Value.format_string
	This adds a 'summary' mode to Value.format_string and to
	gdb.print_options.  For the former, it lets Python code format values
	using this mode.  For the latter, it lets a printer potentially detect
	if it is being called in a backtrace with 'set print frame-arguments'
	set to 'scalars'.

	I considered adding a new mode here to let a pretty-printer see
	whether it was being called in a 'backtrace' context at all, but I'm
	not sure if this is really desirable.

2022-07-15  Tom Tromey  <tromey@adacore.com>

	Expose current 'print' settings to Python
	PR python/17291 asks for access to the current print options.  While I
	think this need is largely satisfied by the existence of
	Value.format_string, it seemed to me that a bit more could be done.

	First, while Value.format_string uses the user's settings, it does not
	react to temporary settings such as "print/x".  This patch changes
	this.

	Second, there is no good way to examine the current settings (in
	particular the temporary ones in effect for just a single "print").
	This patch adds this as well.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=17291

2022-07-15  Carl Love  <cel@us.ibm.com>

	PowerPC: fix for gdb.base/eh_return.exp
	Disable the Traceback Table generation on PowerPC for this test.  The
	Traceback Table consists of a series of bit fields to indicate things like
	the Traceback Table version, language, and specific information about the
	function.  The Traceback Table is generated following the end of the code
	for every function by default.  The Traceback Table is defined in the
	PowerPC ELF ABI and is intended to support debuggers and exception
	handlers.  The Traceback Table is displayed in the disassembly of functions
	by default and is part of the function length.  The table is typically
	interpreted by the disassembler as data represented by .long xxx entries.

	Generation of the Traceback Table is disabled in this test using the
	PowerPC specific gcc compiler option -mtraceback=no, the xlc option
	additional_flags-qtable=none and the clang optons
	 -mllvm -xcoff-traceback-table=false.  Disabling the Traceback Table
	generation in this test results in the gdb_test_multiple statement
	correctly locating the address of the bclr instruction before the statement
	"End of assembler dump." in the disassembly output.

2022-07-15  Tom Tromey  <tromey@adacore.com>

	Run 'black' on gdb
	Running 'black' on gdb fixed a couple of small issues.  This patch is
	the result.

2022-07-15  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-14  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Fix data race in cooked_index_functions::expand_symtabs_matching
	When building gdb with -fsanitize-threads and running test-case
	gdb.ada/char_enum_unicode.exp, I run into:
	...
	WARNING: ThreadSanitizer: data race (pid=21301)^M
	  Write of size 8 at 0x7b2000008080 by main thread:^M
	    #0 free <null> (libtsan.so.2+0x4c5e2)^M
	    #1 _dl_close_worker <null> (ld-linux-x86-64.so.2+0x4b7b)^M
	    #2 convert_between_encodings() charset.c:584^M
	  ...
	    #21 cooked_index_functions::expand_symtabs_matching() read.c:18606
	...

	This is fixed by making cooked_index_functions::expand_symtabs_matching wait
	for the cooked index finalization to be done.

	Tested on x86_64-linux.

	https://sourceware.org/bugzilla/show_bug.cgi?id=29311
	https://sourceware.org/bugzilla/show_bug.cgi?id=29286

2022-07-14  Tom de Vries  <tdevries@suse.de>

	[gdbsupport] Add sequential_for_each
	Add a sequential_for_each alongside the parallel_for_each, which can be used
	as a drop-in replacement.

	This can be useful when debugging multi-threading behaviour, and you want to
	limit multi-threading in a fine-grained way.

	Tested on x86_64-linux, by using it instead of the parallel_for_each in
	dwarf2_build_psymtabs_hard.

2022-07-14  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: Document floating-point support for LoongArch
	Update NEWS and gdb.texinfo to document floating-point support
	for LoongArch.

2022-07-14  Tom de Vries  <tdevries@suse.de>

	[gdb/build] Fix gdb build with gcc 4.8.5
	When building gdb with gcc 4.8.5, we run into:
	...
	In file included from /usr/include/c++/4.8/future:43:0,
	                 from gdbsupport/thread-pool.h:30,
	                 from gdb/dwarf2/cooked-index.h:33,
	                 from gdb/dwarf2/read.h:26,
	                 from gdb/dwarf2/abbrev-cache.c:21:
	/usr/include/c++/4.8/atomic: In instantiation of \
	  ‘_Tp std::atomic<_Tp>::load(std::memory_order) const [with _Tp = \
	  packed<dwarf_unit_type, 1ul>; std::memory_order = std::memory_order]’:
	gdb/dwarf2/read.h:332:44:   required from here
	/usr/include/c++/4.8/atomic:208:13: error: no matching function for call to \
	  ‘packed<dwarf_unit_type, 1ul>::packed()’
	         _Tp tmp;
	             ^
	...

	Fix this by adding the default constructor for packed.

	Tested on x86_64-linux, with gdb build with gcc 4.8.5.

2022-07-14  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Make per_cu->m_lang atomic
	When building gdb with -fsanitize=thread and running test-case
	gdb.dwarf2/inlined_subroutine-inheritance.exp, we run into a data race
	between:
	...
	  Read of size 1 at 0x7b2000003010 by thread T4:
	    #0 packed<language, 1ul>::operator language() const packed.h:54
	    #1 dwarf2_per_cu_data::set_lang(language) read.h:363
	...
	and:
	...
	  Previous write of size 1 at 0x7b2000003010 by main thread:
	    #0 dwarf2_per_cu_data::set_lang(language) read.h:365
	...

	Fix this by making per_cu->m_lang atomic.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29286

2022-07-14  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Make per_cu->unit_type atomic
	With gdb with -fsanitize=thread and test-case gdb.ada/array_bounds.exp, I run
	into a data race between:
	...
	  Read of size 1 at 0x7b2000025f0f by main thread:
	    #0 packed<dwarf_unit_type, 1ul>::operator dwarf_unit_type() const packed.h:54
	    #1 dwarf2_per_cu_data::set_unit_type(dwarf_unit_type) read.h:339
	...
	and:
	...
	  Previous write of size 1 at 0x7b2000025f0f by thread T3:
	    #0 dwarf2_per_cu_data::set_unit_type(dwarf_unit_type) read.h:341
	...

	Fix this by making per_cu->unit_type atomic.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29286

2022-07-14  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Fix data race in ~charset_vector
	When doing:
	...
	$ gdb ./outputs/gdb.ada/char_enum_unicode/foo -batch -ex "break foo.adb:26"
	...
	with a gdb build with -fsanitize=thread I run into a data race:
	...
	WARNING: ThreadSanitizer: data race (pid=30917)
	  Write of size 8 at 0x7b0400004070 by main thread:
	    #0 free <null> (libtsan.so.2+0x4c5e2)
	    #1 xfree<char> gdbsupport/gdb-xfree.h:37 (gdb+0x650f17)
	    #2 charset_vector::clear() gdb/charset.c:703 (gdb+0x651354)
	    #3 charset_vector::~charset_vector() gdb/charset.c:697 (gdb+0x6512d3)
	    #4 <null> <null> (libtsan.so.2+0x32643)
	    #5 captured_main_1 gdb/main.c:1310 (gdb+0xa3975a)
	...

	The problem is that we're freeing the charset_vector elements in the destructor,
	which may still be used by a worker thread.

	Fix this by not freeing the charset_vector elements in the destructor.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29311

2022-07-14  Alan Modra  <amodra@gmail.com>

	Re: PowerPC: implement md_operand to parse register names
	I meant to make this change before committing, to let compilers know
	the code on the false branch of md_parse_name is dead.

		* config/tc-ppc.c (ppc_parse_name): Return void.
		* config/tc-ppc.h (md_parse_name): Always true.
		(ppc_parse_name): Update prototype.

2022-07-14  Alan Modra  <amodra@gmail.com>

	PowerPC: implement md_operand to parse register names
	Allows register names to appear in symbol assignments, so for example
	 tocp = %r2
	 mr %r3,tocp
	now assembles.

		* gas/config/tc-ppc.c (REG_NAME_CNT): Delete, replace uses with
		ARRAY_SIZE.
		(register_name): Rename to..
		(md_operand): ..this.  Only handle %reg.
		(cr_names): Rename to..
		(cr_cond): ..this.  Just keep conditions.
		(ppc_parse_name): Add mode param.  Search both cr_cond and
		pre_defined_registers.  Handle absolute and register symbol
		values here rather than in expr.c:operand().
		(md_assemble): Don't special case register name matching in
		operands, except to set cr_operand as appropriate.
		* gas/config/tc-ppc.h (md_operand): Don't define.
		(md_parse_name, ppc_parse_name): Update.
		* read.c (pseudo_set): Copy over entire O_register value.
		* testsuite/gas/ppc/regsyms.d.
		* testsuite/gas/ppc/regsyms.s: New test.
		* testsuite/gas/ppc/ppc.exp: Run it.

2022-07-14  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-13  Pedro Alves  <pedro@palves.net>

	Tighten gdb.threads/no-unwaited-for-left.exp regexps
	A WIP version of a patch
	(https://sourceware.org/pipermail/gdb-patches/2022-June/190202.html)
	resulted in a bug that went unnoticed by the testuite, like so:

	 (gdb) PASS: gdb.threads/no-unwaited-for-left.exp: enable scheduler-locking, for main thread
	 continue
	 Continuing.
	 [New Thread 1251861.1251861]
	 No unwaited-for children left.
	 (gdb) PASS: gdb.threads/no-unwaited-for-left.exp: continue stops when the main thread exits
	 info threads
	   Id   Target Id                                Frame
	   3    Thread 1251861.1251863 "no-unwaited-for" __pthread_clockjoin_ex (threadid=140737351558976, thread_return=0x0, clockid=<optimized out>, abstime=<optimized out>, block=<optimized out>) at pthread_join_common.c:145
	   4    Thread 1251861.1251861 "no-unwaited-for" <unavailable> in ?? ()

	 The current thread <Thread ID 1> has terminated.  See `help thread'.
	 (gdb) PASS: gdb.threads/no-unwaited-for-left.exp: only thread 3 left, main thread terminated

	Somehow, above, GDB re-added the zombie leader back before printing
	"No unwaited-for children left.".  The "only thread 3 left, main
	thread terminated" test should have caught this, but didn't.  That is
	because the test's regexp has a ".*" after the part that matches
	thread 3.  This commit tightens that regexp to catch such a bug.  It
	also tightens the "only main thread left, thread 2 terminated" test's
	regexp in the same way.

	Change-Id: I8744f327a0aa0e2669d1ddda88247e99b91cefff

2022-07-13  Carl Love  <cel@us.ibm.com>

	Fix for gdb.base/stap-probe.c
	On PowePC, the test fails on a compile error:

	  /../binutils-gdb-current/gdb/testsuite/gdb.base/stap-probe.c:107:1: error: expected '=', ',', ';', 'asm' or 'attribute' before 'use_xmm_reg'
	  107 | use_xmm_reg (int val)
	  | ^~~~~~~~~~~

	Where the source code for stap-probe.c is:

	  static const char * __attribute__((noinline)) ATTRIBUTE_NOCLONE
	  use_xmm_reg (int val)                         <-- line 107
	  {
	  ...

	The issue is the ATTRIBUTE_NOCLONE is not defined as an attribute as
	expected.  The #define for ATTRIBUTE_NOCLONE can be found in
	../lib/attributes.h.

	This patch adds the missing include statement for the definition of
	ATTRIBUTE_NOCLONE.

	The patch has been tested and verified on a Power10 system.

2022-07-13  Carl Love  <cel@us.ibm.com>

	Add PowerPC support to gdb.cp/call-method-register.cc
	This patch adds the needed define ASM_REG for PowerPC.

	The patch was run on a Power 10 system.  The gdb Summary for the run lists
	2 expected passes, no unexpected failures or untested testcases.

	Please let me know if this patch is acceptable for mainline.

	                         Carl Love

2022-07-13  Carl Love  <cel@us.ibm.com>

	Fix gdb.base/step-indirect-call-thunk.exp
	Due to recent changes in the default value of -fcf-protection for gcc, the
	test gdb.base/step-indirect-call-thunk.exp fails on Intel X86-64 with the
	error:

	Executing on host: gcc  -fno-stack-protector  -fdiagnostics-color=never
	-mindirect-branch=thunk -mfunction-return=thunk -c -g
	-o /.../gdb/testsuite/outputs/gdb.base/step-indirect-call-thunk/step-indirect-call-thunk0.o
	/.../gdb/testsuite/gdb.base/step-indirect-call-thunk.c
	(timeout = 300) builtin_spawn -ignore SIGHUP gcc -fno-stack-protector
	-fdiagnostics-color=never -mindirect-branch=thunk -mfunction-return=thunk -c
	-g -o /.../gdb/testsuite/outputs/gdb.base/step-indirect-call-thunk/step-indirect-call-thunk0.o
	/.../binutils-gdb-current/gdb/testsuite/gdb.base/step-indirect-call-thunk.c
	/.../gdb/testsuite/gdb.base/step-indirect-call-thunk.c:
	 In function 'inc': /.../gdb/testsuite/gdb.base/step-indirect-call-thunk.c:
	22:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
	   22 | {                /* inc.1 */

	As stated in the error message the default "-fcf-protection" and
	"-mindirect-branch' are in compatible.  The fcf-protection argument needs
	to be "-fcf-protection=none" for the test to compile on Intel.

	The gcc command line "-mindirect-branch' is an Intel specific and will give
	an error on other platforms.  A check for X86 is added so the test will
	only run on X86 platforms.

	The patch has been tested and verified on Power 10 and Intel X86-64 systems
	with no regressions.

2022-07-13  Pedro Alves  <pedro@palves.net>

	Fix "until LINE" in main, when "until" runs into longjmp
	With a test like this:

	1       #include <dlfcn.h>
	2       int
	3       main ()
	4       {
	5          dlsym (RTLD_DEFAULT, "FOO");
	6          return 0;
	7       }

	and then "start" followed by "until 6", GDB currently incorrectly
	stops inside the runtime loader, instead of line 6.  Vis:

	  ...
	  Temporary breakpoint 1, main () at until.c:5
	  4       {
	  (gdb) until 6
	  0x00007ffff7f0a90d in __GI__dl_catch_exception (exception=exception@entry=0x7fffffffdb00, operate=<optimized out>, args=0x7ffff7f0a90d <__GI__dl_catch_exception+109>) at dl-error-skeleton.c:206
	  206     dl-error-skeleton.c: No such file or directory.
	  (gdb)

	The problem is related to longjmp handling -- dlsym internally
	longjmps on error.  The testcase can be reduced to this:

	1       #include <setjmp.h>
	2       void func () {
	3         jmp_buf buf;
	4         if (setjmp (buf) == 0)
	5           longjmp (buf, 1);
	6       }
	7
	8       int main () {
	9         func ();
	10        return 0; /* until to here */
	11      }

	and then with "start" followed by "until 10", GDB currently
	incorrectly stops at line 4 (returning from setjmp), instead of line
	10.

	The problem is that the BPSTAT_WHAT_CLEAR_LONGJMP_RESUME code in
	infrun.c fails to find the initiating frame, and so infrun thinks that
	the longjmp jumped somewhere outer to "until"'s originating frame.

	Here:

	    case BPSTAT_WHAT_CLEAR_LONGJMP_RESUME:
	      {
		struct frame_info *init_frame;

		/* There are several cases to consider.

		   1. The initiating frame no longer exists.  In this case we
		   must stop, because the exception or longjmp has gone too
		   far.

	        ...

		init_frame = frame_find_by_id (ecs->event_thread->initiating_frame);

		if (init_frame)   // this is NULL!
		  {
		     ...
		  }

		/* For Cases 1 and 2, remove the step-resume breakpoint, if it
		   exists.  */
		delete_step_resume_breakpoint (ecs->event_thread);

		end_stepping_range (ecs);   // case 1., so we stop.
	      }

	The initiating frame is set by until_break_command ->
	set_longjmp_breakpoint.  The initiating frame is supposed to be the
	frame that is selected when the command was issued, but
	until_break_command instead passes the frame id of the _caller_ frame
	by mistake.  When the "until LINE" command is issued from main, the
	caller frame is the caller of main.  When later infrun tries to find
	that frame by id, it fails to find it, because frame_find_by_id
	doesn't unwind past main.

	The bug is that we passed the caller frame's id to
	set_longjmp_breakpoint.  We should have passed the selected frame's id
	instead.

	Change-Id: Iaae1af7cdddf296b7c5af82c3b5b7d9b66755b1c

2022-07-13  Enze Li  <enze.li@hotmail.com>

	gdbserver: remove unused variable
	When building with clang 15, I got this error:

	  CXX    server.o
	server.cc:2985:10: error: variable 'new_argc' set but not used [-Werror,-Wunused-but-set-variable]
	  int i, new_argc;
	             ^
	Remove the unused variable to eliminate the error.

	Tested by rebuilding on x86_64-linux with clang 15.

2022-07-13  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Make per_cu->set_lang more strict
	We have in per_cu->set_lang this comment:
	...
	  void set_lang (enum language lang)
	  {
	    /* We'd like to be more strict here, similar to what is done in
	       set_unit_type,  but currently a partial unit can go from unknown to
	       minimal to ada to c.  */
	...

	Fix this by not setting m_lang for partial units.

	This requires us to move the m_unit_type initialization to ensure that
	m_unit_type is initialized before per_cu->m_lang.

	Tested on x86_64-linux, with native and target board cc-with-dwz-m.

2022-07-13  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-12  Pedro Alves  <pedro@palves.net>

	Improve "set scheduler-locking" documentation
	This improves the "set scheduler-locking" documentation in the GDB
	manual:

	 - Use a table to describe the four available modes.

	 - Describe "step" in terms of "on" and "off".

	 - Tweak the "replay" mode's description to describe replay first
	   instead of recording, and also mention how the mode behaves during
	   normal execution.

	 - Say what is the default mode.

	Change-Id: Ie12140138b37534b7fc1d904da34f0f174aa11ce

2022-07-12  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Add dwarf2_cu::lang ()
	The cu->per_cu->lang field was added to carry information from the initial
	partial symtabs phase to the symtab expansion phase, for the benefit of a
	particular optimization in process_imported_unit_die.

	Other uses have been added, but since the first phase now has been
	parallelized, those have become problematic and sources of race conditions.

	Fix this by adding dwarf2_cu::lang () and using it where we can to replace
	cu->per_cu->lang () with cu->lang ().

	Also assert in dwarf2_cu::lang () that we're not returning language_unknown.

	Tested on x86_64-linux.

2022-07-12  Martin Liska  <mliska@suse.cz>

	LTO plugin: sync header file with GCC
	include/ChangeLog:

		* plugin-api.h (enum ld_plugin_tag): Sync with GCC.

2022-07-12  Tom de Vries  <tdevries@suse.de>

	[gdb/record] Support recording of getrandom
	Add missing support for recording of linux syscall getrandom.

	Tested on x86_64-linux with native and target board unix/-m32.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22081

2022-07-12  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdbserver: LoongArch: Add floating-point support
	This commit adds floating-point support for LoongArch gdbserver.

	gdb: LoongArch: Add floating-point support
	This commit adds floating-point support for LoongArch gdb.

2022-07-12  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Run two test-cases with ASAN_OPTIONS=verify_asan_link_order=0
	When building gdb with -fsanitize=address we run into:
	...
	builtin_spawn gdb -nw -nx -iex set height 0 -iex set width 0 -data-directory \
	  build/gdb/data-directory^M
	==10637==ASan runtime does not come first in initial library list; you \
	  should either link runtime to your application or manually preload it with \
	  LD_PRELOAD.^M
	ERROR: GDB process no longer exists
	...

	Prevent the ASan runtime error by using
	ASAN_OPTIONS=verify_asan_link_order=0.  This makes both test-cases pass.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29358

2022-07-12  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add tsan-suppressions.txt
	Add a new file tsan-suppressions.txt, to suppress the "unlock unlocked mutex"
	problem in ncurses, filed in PR29328.

	The file is added to the TSAN_OPTIONS in lib/gdb.exp.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29328

2022-07-12  Tom de Vries  <tdevries@suse.de>

	[gdb/build] Fix build with gcc 4.8.5
	When building gdb with gcc 4.8.5, we run into problems due to unconditionally
	using:
	...
	     gdb_static_assert (std::is_trivially_copyable<packed>::value);
	...
	in gdbsupport/packed.h.

	Fix this by guarding the usage with HAVE_IS_TRIVIALLY_COPYABLE.

	Tested by doing a full gdb build with gcc 4.8.5.

2022-07-12  Tom de Vries  <tdevries@suse.de>

	Fix -fsanitize=thread for per_cu fields
	When building gdb with -fsanitize=thread and gcc 12, and running test-case
	gdb.dwarf2/dwz.exp, we run into a data race between:
	...
	  Read of size 1 at 0x7b200000300d by thread T2:^M
	    #0 cutu_reader::cutu_reader(dwarf2_per_cu_data*, dwarf2_per_objfile*, \
	    abbrev_table*, dwarf2_cu*, bool, abbrev_cache*) gdb/dwarf2/read.c:6164 \
	    (gdb+0x82ec95)^M
	...
	and:
	...
	  Previous write of size 1 at 0x7b200000300d by main thread:^M
	    #0 prepare_one_comp_unit gdb/dwarf2/read.c:23588 (gdb+0x86f973)^M
	...

	In other words, between:
	...
	  if (this_cu->reading_dwo_directly)
	...
	and:
	...
	    cu->per_cu->lang = pretend_language;
	...

	Likewise, we run into a data race between:
	...
	  Write of size 1 at 0x7b200000300e by thread T4:
	    #0 process_psymtab_comp_unit gdb/dwarf2/read.c:6789 (gdb+0x830720)
	...
	and:
	...
	  Previous read of size 1 at 0x7b200000300e by main thread:
	    #0 cutu_reader::cutu_reader(dwarf2_per_cu_data*, dwarf2_per_objfile*, \
	    abbrev_table*, dwarf2_cu*, bool, abbrev_cache*) gdb/dwarf2/read.c:6164 \
	    (gdb+0x82edab)
	...

	In other words, between:
	...
	      this_cu->unit_type = DW_UT_partial;
	...
	and:
	...
	  if (this_cu->reading_dwo_directly)
	...

	Likewise for the write to addresses_seen in cooked_indexer::check_bounds and a
	read from is_dwz in dwarf2_find_containing_comp_unit for test-case
	gdb.dwarf2/dw2-dir-file-name.exp and target board cc-with-dwz-m.

	The problem is that the written fields are part of the same memory location as
	the read fields, so executing a read and write in different threads is
	undefined behavour.

	Making the written fields separate memory locations, using the new
	struct packed template fixes this.

	The set of fields has been established experimentally to be the
	minimal set to get rid of this type of -fsanitize=thread errors, but
	more fields might require the same treatment.

	Looking at the properties of the lang field, unlike dwarf_version it's
	not available in the unit header, so it will be set the first time
	during the parallel cooked index reading.  The same holds for
	unit_type, and likewise for addresses_seen.

	dwarf2_per_cu_data::addresses_seen is moved so that the bitfields that
	currently follow it can be merged in the same memory location as the
	bitfields that currently precede it, for better packing.

	Tested on x86_64-linux.

	Co-Authored-By: Pedro Alves <pedro@palves.net>

	Change-Id: Ifa94f0a2cebfae5e8f6ddc73265f05e7fd9e1532

2022-07-12  Pedro Alves  <pedro@palves.net>

	Introduce struct packed template
	When building gdb with -fsanitize=thread and gcc 12, and running test-case
	gdb.dwarf2/dwz.exp, we run into a few data races.  For example, between:

	 ...
	   Write of size 1 at 0x7b200000300e by thread T4:
	     #0 process_psymtab_comp_unit gdb/dwarf2/read.c:6789 (gdb+0x830720)
	 ...

	and:

	 ...
	   Previous read of size 1 at 0x7b200000300e by main thread:
	     #0 cutu_reader::cutu_reader(dwarf2_per_cu_data*, dwarf2_per_objfile*, \
	     abbrev_table*, dwarf2_cu*, bool, abbrev_cache*) gdb/dwarf2/read.c:6164 \
	     (gdb+0x82edab)
	 ...

	In other words, between:

	 ...
	       this_cu->unit_type = DW_UT_partial;
	 ...

	and:

	 ...
	   if (this_cu->reading_dwo_directly)
	 ...

	The problem is that the written fields are part of the same memory
	location as the read fields, so executing a read and write in
	different threads is undefined behavour.

	Making the written fields separate memory locations, like this:

	...
	  struct {
	    ENUM_BITFIELD (dwarf_unit_type) unit_type : 8;
	  };
	...

	fixes it, however that also increases the size of struct
	dwarf2_per_cu_data, because it introduces padding due to alignment of
	these new structs, which align on the natural alignment of the
	specified type of their fields.  We can fix that with
	__attribute__((packed)), like so:

	  struct {
	    ENUM_BITFIELD (dwarf_unit_type) unit_type : 8 __attribute__((packed));
	  };

	but to avoid having to write that in several places and add suitable
	comments explaining how that concoction works, introduce a new struct
	packed template that wraps/hides this.  Instead of the above, we'll be
	able to write:

	    packed<dwarf_unit_type, 1> unit_type;

	Note that we can't change the type of dwarf_unit_type, as that is
	defined in include/, and shared with other projects, some of those
	written in C.

	This patch just adds the struct packed type.  Following patches will
	make use of it.  One of those patches will want to wrap a struct
	packed in an std::atomic, like:

	  std::atomic<std::packed<language, 1>> m_lang;

	so the new gdbsupport/packed.h header adds some operators to make
	comparisions between that std::atomic and the type that the wrapped
	struct packed wraps work, like in:

	   if (m_lang == language_c)

	It would be possible to implement struct packed without using
	__attribute__((packed)), by having it store an array of bytes of the
	appropriate size instead, however that would make it less convenient
	to debug GDB.  The way it's implemented, printing a struct packed
	variable just prints its field using its natural type, which is
	particularly useful if the type is an enum.  I believe that
	__attribute__((packed)) is supported by all compilers that are able to
	build GDB.  Even a few BFD headers use on ATTRIBUTE_PACKED on external
	types:

	 include/coff/external.h:  } ATTRIBUTE_PACKED
	 include/coff/external.h:} ATTRIBUTE_PACKED ;
	 include/coff/external.h:} ATTRIBUTE_PACKED ;
	 include/coff/pe.h:} ATTRIBUTE_PACKED ;
	 include/coff/pe.h:} ATTRIBUTE_PACKED;
	 include/elf/external.h:} ATTRIBUTE_PACKED  Elf_External_Versym;

	It is not possible to build GDB with MSVC today, but if it could, that
	would be one compiler that doesn't support this attribute.  However,
	it supports packing via pragmas, so there's a way to cross that bridge
	if we ever get to it.  I believe any compiler worth its salt supports
	some way of packing.

	In any case, the worse that happens without the attribute is that some
	types become larger than ideal.  Regardless, I've added a couple
	static assertions to catch such compilers in action:

	    /* Ensure size and aligment are what we expect.  */
	    gdb_static_assert (sizeof (packed) == Bytes);
	    gdb_static_assert (alignof (packed) == 1);

	Change-Id: Ifa94f0a2cebfae5e8f6ddc73265f05e7fd9e1532

2022-07-12  Alan Modra  <amodra@gmail.com>

	PowerPC md_end: Don't htab_delete(NULL)
	It might be possible to hit md_end before md_begin is called, don't
	segfault if so.  Also, remove a useless check.

		* gas/config/tc-ppc.c (insn_calloc): Remove needless overflow
		check.
		(ppc_md_end): Check ppc_hash before deleting.  Clear ppc_hash.

2022-07-12  Alan Modra  <amodra@gmail.com>

	PR29355, ld segfaults with -r/-q and custom-named section .rela*
	The bug testcase uses an output section named .rel or .rela which has
	input .data sections mapped to it.  The input .data section has
	relocations.  When counting output relocations SHT_REL and SHT_RELA
	section reloc_count is ignored, with the justification that reloc
	sections themselves can't have relocations and some backends use
	reloc_count in reloc sections.  However, the test wrongly used the
	output section type (which normally would match input section type).
	Fix that.  Note that it is arguably wrong for ld to leave the output
	.rel/.rela section type as SHT_REL/SHT_RELA when non-empty non-reloc
	sections are written to it, but I'm not going to change that since it
	might be useful to hand-craft relocs in a data section that is then
	written to a SHT_REL/SHT_RELA output section.

		PR 29355
		* elflink.c (bfd_elf_final_link): Use input section type rather
		than output section type to determine whether to exclude using
		reloc_count from that section.

2022-07-12  Jiangshuai Li  <jiangshuai_li@c-sky.com>

	gdb/csky complete csky_dwarf_reg_to_regnum
	For csky arch, the correspondence between Dwarf registers and GDB
	registers are as follows:
	dwarf regnos 0~31 ==> gdb regs r0~r31
	dwarf regno  CSKY_HI_REGNUM(36) ==> gdb reg hi
	dwarf regno  CSKY_LO_REGNUM(37) ==> gdb reg hi
	dwarf regno  CSKY_PC_REGNUM(72) ==> gdb reg pc
	dwarf regnos FV_PSEUDO_REGNO_FIRST(74)~FV_PSEUDO_REGNO_LAST(201)
	==>
	gdb regs s0~s127 (pseudo regs for float and vector regs)

	other dwarf regnos have no corresponding gdb regs to them.

2022-07-12  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-11  Pedro Alves  <pedro@palves.net>

	Always emit =thread-exited notifications, even if silent
	[Note: the testcased added by this commit depends on
	https://sourceware.org/pipermail/gdb-patches/2022-June/190259.html,
	otherwise GDB just crashes when detaching the core]

	Currently, in MI, =thread-created are always emitted, like:

	 =thread-group-started,id="i1",pid="195680"
	 =thread-created,id="1",group-id="i1"
	 ...

	but on teardown, if the target uses exit_inferior_silent, then you'll
	only see the inferior exit notification (thread-group-exited), no
	notification for threads.

	The core target is one of the few targets that use
	exit_inferior_silent.  Here's an example session:

	 -target-select core $corefile
	 =thread-group-started,id="i1",pid="195680"
	 =thread-created,id="1",group-id="i1"
	 ...
	 ^connected,frame=....
	 (gdb)
	 -target-detach
	 =thread-group-exited,id="i1"
	 ^done
	 (gdb)

	This imbalance of emitting =thread-created but then not =thread-exited
	seems off to me.  (And, it complicates changes I want to do to
	centralize emitting thread exit notifications for the CLI, which is
	why I'm looking at this.)

	And then, since most other targets use exit_inferior instead of
	exit_inferior_silent, MI is already emitting =thread-exited
	notifications when tearing down an inferior, for most targets.

	This commit makes MI always emit the =thread-exited notifications,
	even for exit_inferior_silent.

	Afterwards, when debugging a core, MI outputs:

	 (gdb)
	 -target-detach
	 =thread-exited,id="1",group-id="i1"    << new line
	 =thread-group-exited,id="i1"
	 ^done
	 (gdb)

	Surprisingly, there's no MI testcase debugging a core file.  This
	commit adds the first.

	Change-Id: I5100501a46f07b6bbad3e04d120c2562a51c93a4

2022-07-11  Pedro Alves  <pedro@palves.net>

	Fix core-file -> detach -> crash (corefiles/29275)
	After loading a core file, you're supposed to be able to use "detach"
	to unload the core file.  That unfortunately regressed starting with
	GDB 11, with these commits:

	 1192f124a308 - gdb: generalize commit_resume, avoid commit-resuming when threads have pending statuses
	 408f66864a1a - detach in all-stop with threads running

	resulting in a GDB crash:

	 ...
	 Thread 1 "gdb" received signal SIGSEGV, Segmentation fault.
	 0x0000555555e842bf in maybe_set_commit_resumed_all_targets () at ../../src/gdb/infrun.c:2899
	 2899          if (proc_target->commit_resumed_state)
	 (top-gdb) bt
	 #0  0x0000555555e842bf in maybe_set_commit_resumed_all_targets () at ../../src/gdb/infrun.c:2899
	 #1  0x0000555555e848bf in scoped_disable_commit_resumed::reset (this=0x7fffffffd440) at ../../src/gdb/infrun.c:3023
	 #2  0x0000555555e84a0c in scoped_disable_commit_resumed::reset_and_commit (this=0x7fffffffd440) at ../../src/gdb/infrun.c:3049
	 #3  0x0000555555e739cd in detach_command (args=0x0, from_tty=1) at ../../src/gdb/infcmd.c:2791
	 #4  0x0000555555c0ba46 in do_simple_func (args=0x0, from_tty=1, c=0x55555662a600) at ../../src/gdb/cli/cli-decode.c:95
	 #5  0x0000555555c112b0 in cmd_func (cmd=0x55555662a600, args=0x0, from_tty=1) at ../../src/gdb/cli/cli-decode.c:2514
	 #6  0x0000555556173b1f in execute_command (p=0x5555565c5916 "", from_tty=1) at ../../src/gdb/top.c:699

	The code that crashes looks like:

	 static void
	 maybe_set_commit_resumed_all_targets ()
	 {
	   scoped_restore_current_thread restore_thread;

	   for (inferior *inf : all_non_exited_inferiors ())
	     {
	       process_stratum_target *proc_target = inf->process_target ();

	       if (proc_target->commit_resumed_state)
	           ^^^^^^^^^^^

	With 'proc_target' above being null.  all_non_exited_inferiors filters
	out inferiors that have pid==0.  We get here at the end of
	detach_command, after core_target::detach has already run, at which
	point the inferior _should_ have pid==0 and no process target.  It is
	clear it no longer has a process target, but, it still has a pid!=0
	somehow.

	The reason the inferior still has pid!=0, is that core_target::detach
	just unpushes, and relies on core_target::close to actually do the
	getting rid of the core and exiting the inferior.  The problem with
	that is that detach_command grabs an extra strong reference to the
	process stratum target, so the unpush_target inside
	core_target::detach doesn't actually result in a call to
	core_target::close.

	Fix this my moving the cleaning up the core inferior to a shared
	routine called by both core_target::close and core_target::detach.  We
	still need to cleanup the inferior from within core_file::close
	because there are paths to it that want to get rid of the core without
	going through detach.  E.g., "core-file" -> "run".

	This commit includes a new test added to gdb.base/corefile.exp to
	cover the "core-file core" -> "detach" scenario.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29275

	Change-Id: Ic42bdd03182166b19f598428b0dbc2ce6f67c893

2022-07-11  Pedro Alves  <pedro@palves.net>

	Fix non-existent "@var{thread-id}" in stop reply descriptions
	In the description of stop replies, where the "thread" register is
	explained, and where the fork and vfork stop reasons are detailed,
	there are references to "@var{thread-id}", but such variable does not
	actually exist.  This commit fixes it.

	Change-Id: If679944aaf15f6f64aabe506339a9e7667864cab

2022-07-11  Luis Machado  <luis.machado@arm.com>

	Try a couple PAuth compilation flags for gdb.arch/aarch64-pauth.exp
	The -msign-return-address switch has been dropped from GCC, but some
	older compiler may still support it.  Make sure we try both
	-msign-return-address and -mbranch-protection before bailing out when
	running gdb.arch/aarch64-pauth.exp.

2022-07-11  Andrew Burgess  <aburgess@redhat.com>

	gdb: add support for disassembler styling using libopcodes
	This commit extends GDB to make use of libopcodes styling support
	where available, currently this is just i386 based architectures, and
	RISC-V.

	For architectures that don't support styling using libopcodes GDB will
	fall back to using the Python Pygments package, when the package is
	available.

	The new libopcodes based styling has the disassembler identify parts
	of the disassembled instruction, e.g. registers, immediates,
	mnemonics, etc, and can style these components differently.
	Additionally, as the styling is now done in GDB we can add settings to
	allow the user to configure which colours are used right from the GDB
	CLI.

	There's some new maintenance commands:

	  maintenance set libopcodes-styling enabled on|off
	  maintenance show libopcodes-styling

	These can be used to manually disable use of libopcodes styling.  This
	is a maintenance command as it's not anticipated that a user should
	need to do this.  But, this could be useful for testing, or, in some
	rare cases, a user might want to override the Python hook used for
	disassembler styling, and then disable libopcode styling so that GDB
	falls back to using Python.  Right now I would consider this second
	use case a rare situation, which is why I think a maintenance command
	is appropriate.

	When libopcodes is being used for styling then the user can make use
	of the following new styles:

	  set/show style disassembler comment
	  set/show style disassembler immediate
	  set/show style disassembler mnemonic
	  set/show style disassembler register

	The disassembler also makes use of the 'address' and 'function'
	styles to style some parts of the disassembler output.  I have also
	added the following aliases though:

	  set/show style disassembler address
	  set/show style disassembler symbol

	these are aliases for:

	  set/show style address
	  set/show style function

	respectively, and exist to make it easier for users to discover
	disassembler related style settings.  The 'address' style is used to
	style numeric addresses in the disassembler output, while the 'symbol'
	or 'function' style is used to style the names of symbols in
	disassembler output.

	As not every architecture supports libopcodes styling, the maintenance
	setting 'libopcodes-styling enabled' has an "auto-off" type behaviour.
	Consider this GDB session:

	  (gdb) show architecture
	  The target architecture is set to "auto" (currently "i386:x86-64").
	  (gdb) maintenance show libopcodes-styling enabled
	  Use of libopcodes styling support is "on".

	the setting defaults to "on" for architectures that support libopcodes
	based styling.

	  (gdb) set architecture sparc
	  The target architecture is set to "sparc".
	  (gdb) maintenance show libopcodes-styling enabled
	  Use of libopcodes styling support is "off" (not supported on architecture "sparc")

	the setting will show as "off" if the user switches to an architecture
	that doesn't support libopcodes styling.  The underlying setting is
	still "on" at this point though, if the user switches back to
	i386:x86-64 then the setting would go back to being "on".

	  (gdb) maintenance set libopcodes-styling enabled off
	  (gdb) maintenance show libopcodes-styling enabled
	  Use of libopcodes styling support is "off".

	now the setting is "off" for everyone, even if the user switches back
	to i386:x86-64 the setting will still show as "off".

	  (gdb) maintenance set libopcodes-styling enabled on
	  Use of libopcodes styling not supported on architecture "sparc".
	  (gdb) maintenance show libopcodes-styling enabled
	  Use of libopcodes styling support is "off".

	attempting to switch the setting "on" for an unsupported architecture
	will give an error, and the setting will remain "off".

	  (gdb) set architecture auto
	  The target architecture is set to "auto" (currently "i386:x86-64").
	  (gdb) maintenance show libopcodes-styling enabled
	  Use of libopcodes styling support is "off".
	  (gdb) maintenance set libopcodes-styling enabled on
	  (gdb) maintenance show libopcodes-styling enabled
	  Use of libopcodes styling support is "on".

	the user will need to switch back to a supported architecture before
	they can one again turn this setting "on".

2022-07-11  Andrew Burgess  <aburgess@redhat.com>

	gdb: have gdb_disassemble_info carry 'this' in its stream pointer
	The gdb_disassemble_info class is a wrapper around the libopcodes
	disassemble_info struct.  The 'stream' field of disassemble_info is
	passed as an argument to the fprintf_func and fprintf_styled_func
	callbacks when the disassembler wants to print anything.

	Previously, GDB would store a pointer to a ui_file object in the
	'stream' field, then, when the disassembler wanted to print anything,
	the content would be written to the ui_file object.  An example of an
	fprintf_func callback, from gdb/disasm.c is:

	  int
	  gdb_disassembler::dis_asm_fprintf (void *stream, const char *format, ...)
	  {
	    /* Write output to STREAM here.  */
	  }

	This is fine, but has one limitation, within the print callbacks we
	only have access to STREAM, we can't access any additional state
	stored within the gdb_disassemble_info object.

	Right now this isn't a problem, but in a future commit this will
	become an issue, how we style the output being written to STREAM will
	depend on the state of the gdb_disassemble_info object, and this state
	might need to be updated, depending on what is being printed.

	In this commit I propose changing the 'stream' field of the
	disassemble_info to carry a pointer to the gdb_disassemble_info
	sub-class, rather than the stream itself.

	We then have the two sub-classes of gdb_disassemble_info to consider,
	the gdb_non_printing_disassembler class never cared about the stream,
	previously, for this class, the stream was nullptr.  With the change
	to make stream be a gdb_disassemble_info pointer, no further updates
	are needed for gdb_non_printing_disassembler.

	The other sub-class is gdb_printing_disassembler.  In this case the
	sub-class now carries around a pointer to the stream object.  The
	print callbacks are updated to cast the incoming stream object back to
	a gdb_printing_disassembler, and then extract the stream.

	This is purely a refactoring commit.  A later commit will add
	additional state to the gdb_printing_disassembler, and update the
	print callbacks to access this state.

	There should be no user visible changes after this commit.

2022-07-11  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Fix data race in per_cu->length
	With gdb build with -fsanitize=thread and test-case
	gdb.dwarf2/dw4-sig-types.exp and target board cc-with-dwz-m we run into a data
	race between:
	...
	  Write of size 4 at 0x7b2800002268 by thread T4:^M
	    #0 cutu_reader::cutu_reader(dwarf2_per_cu_data*, dwarf2_per_objfile*, \
	    abbrev_table*, dwarf2_cu*, bool, abbrev_cache*) gdb/dwarf2/read.c:6236 \
	    (gdb+0x82f525)^M
	...
	and this read:
	...
	  Previous read of size 4 at 0x7b2800002268 by thread T1:^M
	    #0 dwarf2_find_containing_comp_unit gdb/dwarf2/read.c:23444 \
	    (gdb+0x86e22e)^M
	...

	In other words, between this write:
	...
		    this_cu->length = cu->header.get_length ();
	...
	and this read:
	...
		      && mid_cu->sect_off + mid_cu->length > sect_off))
	...
	of per_cu->length.

	Fix this similar to the per_cu->dwarf_version case, by only setting it if
	needed, and otherwise verifying that the same value is used.  [ Note that the
	same code is already present in the other cutu_reader constructor. ]

	Move this logic into into a member function set_length to make sure it's used
	consistenly, and make the field private in order to enforce access through the
	member functions, and rename it to m_length.

	This exposes (running test-case gdb.dwarf2/fission-reread.exp) that in
	fill_in_sig_entry_from_dwo_entry, the m_length field is overwritten.
	For now, allow for that exception.

	While we're at it, make sure that the length is set before read.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29344

2022-07-11  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Use comp_unit_head::get_length
	There's a spot in read_comp_units_from_section where we explictly use
	initial_length_size to get the total length:
	...
	      this_cu->length = cu_header.length + cu_header.initial_length_size;
	...

	Instead, just use cu_header.get_length ().

	Tested on x86_64-linux.

2022-07-11  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-10  Luis Machado  <luis.machado@arm.com>

	Fix include guard naming for arch/aarch64-mte-linux.h
	It should be ARCH_AARCH64_MTE_LINUX_H as opposed to ARCH_AARCH64_LINUX_H.

2022-07-10  Youling Tang  <tangyouling@loongson.cn>

	gdbserver: LoongArch: Add orig_a0 processing
	Commit 736918239b16 ("gdb: LoongArch: add orig_a0 into register set")
	introduced orig_a0, similar processing needs to be done in gdbserver.

	At the same time, add orig_a0 related comments.

2022-07-10  Youling Tang  <tangyouling@loongson.cn>

	gdbserver: LoongArch: Simplify code with register number macros
	Move "enum loongarch_regnum" to gdb/arch/loongarch.h so that the
	macro definitions can be used in gdbserver/linux-loongarch-low.cc
	to simplify the code.

2022-07-10  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-09  Alan Modra  <amodra@gmail.com>

	gas: tc-tic54x.c hash tables
	Cleaning up the subsym_hash memory is a real pain.  Keys and values
	entered into the table are quite diverse.  In some cases the key is
	allocated and thus needs to be freed, in others the key is a const
	string.  Values are similar, and in some cases not even a string.
	Tidy this by inserting a new subsym_ent_t that describes key/value
	type.  This meant the math_hash table was no longer needed.  The patch
	also tidies how math functions are called, those that are supposed to
	return int now no longer return their value in a float.

		* config/tc-tic54x.c (math_hash): Delete.
		(subsym_proc_entry): Move earlier, make proc a union, merge with..
		(math_proc_entry): ..this.  Delete type.
		(math_procs): Merge into subsym_procs.
		(subsym_ent_t): New.  Use this type in subsym_hash..
		(stag_add_field_symbols, tic54x_var, tic54x_macro_info): ..here..
		(md_begin, subsym_create_or_replace, subsym_lookup): ..and here..
		(subsym_substitute): ..and here.  Adjust subsym_proc_entry
		function calls.  Free replacement when not returned.
		(subsym_get_arg): Adjust subsym_lookup.
		(free_subsym_ent, subsym_htab_create ): New functions, use when
		creating subsym_hash.
		(free_local_label_ent, local_label_htab_create): Similarly.
		(tic54x_remove_local_label): Delete.
		(tic54x_clear_local_labels): Simplify.
		(tic54x_asg): Use notes obstack to dup strings.
		(tic54x_eval): Likewise.
		(subsym_ismember): Likewise.
		(math_cvi, math_int, math_sgn): Return int.
		(tic54x_macro_start): Decrement macro_level before calling as_fatal.
		(tic54x_md_end): New function.
		* config/tc-tic54h.c (tic54x_md_end): Declare.
		(md_end): Define.

2022-07-09  Alan Modra  <amodra@gmail.com>

	gas: use notes_calloc in string hash
	Using notes_calloc means all of the string hash table memory should
	now be freed before gas exits, even though htab_delete isn't called.
	This also means that the hash table free_f and del_f must be NULL,
	because freeing notes obstack memory results in all more recently
	allocated notes memory being freed too.  So hash table resizing won't
	free any memory, and will be a little faster.  Also, htab_delete won't
	do anything (and be quick about it).

	Since htab_traverse can also resize hash tables (to make another
	traversal faster if the table is largely empty), stop that happening
	when only one traversal is done.

		* as.h: Reorder hash.h after symbols.h for notes_calloc decl.
		* hash.h (str_htab_create): Use notes_calloc.  Do not free.
		* symbols.c (resolve_local_symbol_values): Don't resize
		during hash table traversal.
		* config/obj-elf.c (elf_frob_file_after_relocs): Likewise.
		* config/tc-ia64.c (ia64_adjust_symtab, ia64_frob_file): Likewise.
		* config/tc-nds32.c (nds32_elf_analysis_relax_hint): Likewise.

2022-07-09  Alan Modra  <amodra@gmail.com>

	gas: target string hash tables
	This allocates entries added to the string hash tables on the notes
	obstack, so that at least those do not leak.  A followup patch will
	switch over the str_hash allocation to notes_calloc, which is why I
	haven't implemented deleting all the target string hash tables.

		* config/obj-coff-seh.c (get_pxdata_name, alloc_pxdata_item): Use
		notes obstack for string hash table entries.
		* config/tc-alpha.c (get_alpha_reloc_tag, md_begin): Likewise.
		* config/tc-h8300.c (md_begin): Likewise.
		* config/tc-ia64.c (dot_rot, dot_pred_rel, dot_alias): Likewise.
		* config/tc-nds32.c (nds32_relax_hint): Likewise.
		* config/tc-riscv.c (riscv_init_csr_hash): Likewise.
		* config/tc-score.c (s3_insert_reg): Likewise.
		(s3_build_score_ops_hsh, s3_build_dependency_insn_hsh): Likewise.
		* config/tc-score7.c (s7_build_score_ops_hsh): Likewise.
		(s7_build_dependency_insn_hsh): Likewise.
		* config/tc-tic4x.c (tic4x_asg): Likewise.

2022-07-09  Alan Modra  <amodra@gmail.com>

	arc gas: don't leak arc_opcode_hash memory
	The arc opcode hash table has entries that have a realloc'd field.
	This doesn't lend itself to obstack allocation, so freeing must be
	done with a purpose built hashtab del_f.

		* config/tc-arc.c (arc_opcode_free): New function.
		(md_begin): Pass the above as del_f to htab_create_alloc.
		(arc_md_end): New function.
		* config/tc-arc.h (arc_md_end): Declare.
		(md_end): Define.

2022-07-09  Alan Modra  <amodra@gmail.com>

	i386 gas: don't leak op_hash or reg_hash memory
	This tidies memory used by the two x86 gas string hash tables before
	exiting.  I'm using a two-pronged approach, firstly the obvious call
	to htab_delete plus telling the libiberty/hashtab.c infrastructure to
	free tuples generated by str_hash_insert, and secondly putting the x86
	core_optab memory on the notes obstack.  It would be possible to free
	core_optab memory by using a custom hash table del_f on x86, as I do
	for arc, but a later patch will move all the string hash memory to the
	notes obstack.

		* config/tc-i386.c (md_begin): Use notes_alloc for core_optab.
		(386_md_end): New function.
		* config/tc-i386.h (386_md_end): Declare.
		(md_end): Define.
		* hash.h (str_htab_create): Pass free as del_f.

2022-07-09  Alan Modra  <amodra@gmail.com>

	ppc gas: don't leak ppc_hash memory
		* config/tc-ppc.c (insn_obstack): New.
		(insn_calloc): New function.
		(ppc_setup_opcodes): Use insn_obstack for ppc_hash.
		(ppc_md_end): New function.
		* config/tc-ppc.h (ppc_md_end): Declare
		(md_end): Define.

2022-07-09  Alan Modra  <amodra@gmail.com>

	gas hash.h tidy
	Only inline functions should be defined in hash.h, there's no benefit
	in having multiple copies of hash_string_tuple and eq_string_tuple.
	Also, use the table alloc_f when allocating tuples to be stored, so
	that these functions are usable with different memory allocation
	strategies.

		* hash.h (struct string_tuple, string_tuple_t): Move earlier.
		(string_tuple_alloc): Add table param, allocate using table alloc_f.
		(str_hash_insert): Adjust to suit.  Call table->free_f when
		entry is not used.
		(hash_string_tuple, eq_string_tuple): Move to..
		* hash.c: ..here.

2022-07-09  Alan Modra  <amodra@gmail.com>

	gas: rename md_end to md_finish
	Currently md_end is typically used for some final actions rather than
	freeing memory like other *_end functions.  Rename it to md_finish,
	and rename target implementation.  The renaming of target functions
	makes it possible to find them all with "grep md_finish",
	eg. md_mips_end is renamed to mips_md_finish, not md_mips_finish.
	This patch leaves a number of md_end functions unchanged, those that
	either do nothing or deallocate memory, and calls them late.

	The idea here is that target maintainers implement md_end functions to
	tidy memory, if anyone cares.  Freeing persistent memory in gas is
	not at all important, except that it can hide more important memory
	leaks, those that happen once per some frequent gas operation, amongst
	these unimportant memory leaks.

		* as.c (main): Rename md_end to md_finish.
		* config/tc-alpha.c, * config/tc-alpha.h,
		* config/tc-arc.c, * config/tc-arc.h,
		* config/tc-arm.c, * config/tc-arm.h,
		* config/tc-csky.c, * config/tc-csky.h,
		* config/tc-ia64.c, * config/tc-ia64.h,
		* config/tc-mcore.c, * config/tc-mcore.h,
		* config/tc-mips.c, * config/tc-mips.h,
		* config/tc-mmix.c, * config/tc-mmix.h,
		* config/tc-msp430.c, * config/tc-msp430.h,
		* config/tc-nds32.c, * config/tc-nds32.h,
		* config/tc-ppc.c, * config/tc-ppc.h,
		* config/tc-pru.c, * config/tc-pru.h,
		* config/tc-riscv.c, * config/tc-riscv.h,
		* config/tc-s390.c, * config/tc-s390.h,
		* config/tc-sparc.c, * config/tc-sparc.h,
		* config/tc-tic4x.c, * config/tc-tic4x.h,
		* config/tc-tic6x.c, * config/tc-tic6x.h,
		* config/tc-v850.c, * config/tc-v850.h,
		* config/tc-xtensa.c, * config/tc-xtensa.h,
		* config/tc-z80.c, * config/tc-z80.h: Similarly.
		* output-file.c (output_file_close): Call md_end.

2022-07-09  Alan Modra  <amodra@gmail.com>

	gas: set up notes obstack earlier
	So that the notes obstack can be used for persistent storage in
	parse_args.

		* as.c (parse_args): Use notes_alloc and notes_strdup.
		(free_notes): New function.
		(main): Init notes obstack, and arrange to be freed on exit.
		* read.c (read_begin): Don't init notes obstack.
		(read_end): Free cond_obstack.
		* subsegs.c (subsegs_end): Don't free cond_obstack or notes.

2022-07-09  Alan Modra  <amodra@gmail.com>

	gas: itbl_files
	itbl_files seems to be debug code.  Get rid of it.

		* as.c (struct itbl_file_list): Delete.
		(itbl_files): Delete.
		(parse_args): Don't keep itbl_files list.

2022-07-09  Alan Modra  <amodra@gmail.com>

	gas: free sy_hash, macro_hash and po_hash
		* macro.c (macro_end): New function.
		* macro.h (macro_end): Declare.
		* read.c (read_end, poend): New functions.
		* read.h (read_end): Declare.
		* symbols.c (symbol_end): New function.
		* symbols.h (symbol_end): Declare.
		* output-file.c (output_file_close): Call new *_end functions.

2022-07-09  Alan Modra  <amodra@gmail.com>

	dw2gencfi.c: use notes obstack
	Use notes obstack for dwcfi_hash entries, and free table.  Freeing the
	table makes memory checkers complain more about "definitely lost"
	memory as we've moved some from the "still reachable" category.
	That will be fixed with a later patch.

		* dw2gencfi.c (get_debugseg_name): Allocate on notes obstack.
		(alloc_debugseg_item): Likewise.
		(dwcfi_hash_find_or_make): Adjust failure path free.
		(cfi_finish): Delete dwfci_hash.

2022-07-09  Alan Modra  <amodra@gmail.com>

	expr.c make_expr_symbol: use notes obstack
		* expr.c (make_expr_symbol): Use notes_alloc.

	read.c assign_symbol: use notes obstack for dummy listing frag
		* read.c (assign_symbol): Use notes_calloc for dummy_frag.

	read.c s_include: use notes obstack for path
		* read.c (s_include): Use notes obstack for path mem.

2022-07-09  Alan Modra  <amodra@gmail.com>

	macro.c: use string hash from hash.h for macro_hash
	Another case of duplicated hash.h code, the only minor difference
	being that macro->format_hash was created with 7 entries vs. str_hash
	with 16 entries.

		* macro.c (macro_init, define_macro): Use str_htab_create.
		(do_formals, define_macro, macro_expand_body): Use str_hash_insert
		(macro_expand_body): Use str_hash_find and str_hash_delete.
		(delete_macro): Likewise.
		(sub_actual, macro_expand, check_macro): Use str_hash_find.
		(expand_irp): Use str_htab_create and str_hash_insert.
		* macro.h (struct macro_struct): Tidy.
		(struct macro_hash_entry, macro_hash_entry_t, hash_macro_entry),
		(eq_macro_entry, macro_entry_alloc, macro_entry_find),
		(struct formal_hash_entry, formal_hash_entry_t),
		(hash_formal_entry, eq_formal_entry, formal_entry_alloc),
		(formal_entry_find): Delete.
		* config/tc-iq2000.c (iq2000_add_macro): Use str_htab_create
		and str_hash_insert.

2022-07-09  Alan Modra  <amodra@gmail.com>

	read.c: use string hash from hash.h for po_hash
	po_hash code duplicates the str_hash code in hash.h for no good reason.

		* read.c (struct po_entry, po_entry_t): Delete.
		(hash_po_entry, eq_po_entry, po_entry_alloc, po_entry_find): Delete.
		(pop_insert): Use str_hash_insert.
		(pobegin): Use str_htab_create.
		(read_a_source_file, s_macro): Use str_hash_find.

2022-07-09  Alan Modra  <amodra@gmail.com>

	free read_symbol_name string
	read_symbol_name mallocs the string it returns.  Free it when done.

		* read.c (read_symbol_name): Free name on error path.
		* config/tc-ppc.c (ppc_GNU_visibility): Free name returned from
		read_symbol_name.
		(ppc_extern, ppc_globl, ppc_weak): Likewise.

2022-07-09  Alan Modra  <amodra@gmail.com>

	gas: output_file_close
	This is mostly a tidy with the aim of being able to free
	out_file_name, but it does fix a possible attempt to unlink the output
	file twice (not that that matters).

		* as.h (keep_it): New global.
		* as.c (keep_it): Delete.
		(close_output_file): Delete, merged into..
		* output-file.c (output_file_close): ..here.  Delete parameter.
		* output-file.h (output_file_close): Update prototype.

2022-07-09  Alan Modra  <amodra@gmail.com>

	gas: utility notes memory alloc functions
	Makes it a little easier to use the notes obstack for persistent
	storage.

		* as.h (gas_mul_overflow): Define.
		* symbols.h (notes_alloc, notes_calloc, notes_memdup),
		(notes_strdup, notes_concat, notes_free): Declare.
		* symbols.c (notes_alloc, notes_calloc, notes_memdup),
		(notes_strdup, notes_concat, notes_free): New functions.
		(save_symbol_name): Use notes_strdup.
		(symbol_create, local_symbol_make, local_symbol_convert),
		(symbol_clone, decode_local_label_name): Use notes_alloc.

2022-07-09  Alan Modra  <amodra@gmail.com>

	gas: arm -mwarn-syms duplicates
	arm gas is only supposed to warn once per symbol for -mwarn-syms, but
	doesn't because the str_hash_find added with commit 629310abec88
	always returns NULL.  That's so because the str_hash_insert inserts a
	NULL value for the key,value pair.  Let str_hash_insert do the job
	instead.

		* config/tc-arm.c (arm_tc_equal_in_insn): Correct already_warned
		logic.
		* testsuite/gas/arm/pr18347.s: Modify to generate duplicate
		warning without this patch.

2022-07-09  Alan Modra  <amodra@gmail.com>

	Regenerate with automake-1.15.1
	Until we update the recommended versions of autoconf/automake, files
	should be regenerated with automake-1.15.1 and autoconf-2.69.  That's
	not because we think those versions are golden, and newer versions are
	bad.  It's simply because maintainers want to be able to update
	configury files without trouble, and if someone regenerates files with
	automake-1.16.5 then --enable-maintainer-mode builds will hit errors:

	checking that generated files are newer than configure... configure.ac:26: error: version mismatch.  This is Automake 1.15.1,
	configure.ac:26: but the definition used by this AM_INIT_AUTOMAKE
	configure.ac:26: comes from Automake 1.16.5.  You should recreate
	configure.ac:26: aclocal.m4 with aclocal and run automake again.
	WARNING: 'automake-1.15' is probably too old.

	Correcting this requires regenerating the files by hand.

2022-07-09  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-08  Tom Tromey  <tom@tromey.com>

	Accept gdb.Value in more Python APIs
	PR python/27000 points out that gdb.block_for_pc will accept a Python
	integer, but not a gdb.Value.  This patch corrects this oversight.

	I looked at all uses of GDB_PY_LLU_ARG and fixed these up to use
	get_addr_from_python instead.  I also looked at uses of GDB_PY_LL_ARG,
	but those seemed relatively unlikely to be useful with a gdb.Value, so
	I didn't change them.  My thinking here is that a Value will typically
	come from inferior memory, and something like a line number is not too
	likely to be found this way.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=27000

2022-07-08  Tom Tromey  <tom@tromey.com>

	Handle bool specially in gdb.set_parameter
	PR python/29217 points out that gdb.parameter will return bool values,
	but gdb.set_parameter will not properly accept them.  This patch fixes
	the problem by adding a special case to set_parameter.

	I looked at a fix involving rewriting set_parameter in C++.  However,
	this one is simpler.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29217

2022-07-08  Ludovic Courtès  <ludo@gnu.org>

	[gdb/build] Handle deprecation of scm_install_gmp_memory_functions
	When building gdb with guile 3.0.8, we run into:
	...
	gdb/guile/guile.c: In function \
	  'void gdbscm_initialize(const extension_language_defn*)':
	gdb/guile/guile.c:680:5: error: 'scm_install_gmp_memory_functions' is \
	  deprecated [-Werror=deprecated-declarations]
	  680 |     scm_install_gmp_memory_functions = 0;
	      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	In file included from /usr/include/guile/3.0/libguile.h:128,
	                 from gdb/guile/guile-internal.h:30,
	                 from gdb/guile/guile.c:36:
	/usr/include/guile/3.0/libguile/deprecated.h:164:20: note: declared here
	  164 | SCM_DEPRECATED int scm_install_gmp_memory_functions;
	      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	cc1plus: all warnings being treated as errors
	make[1]: *** [Makefile:1896: guile/guile.o] Error 1
	...

	The variable has been deprecated because it no longer has any effect.

	Fix this by disabling the specific deprecation warning.

	Also handle upcoming guile versions > 3.0, in which the variable will be
	removed, by limiting the usage of the variable to guile versions <= 3.0.

	This does not break anything.  The variable was merely used to address a
	problem present in guile versions <= v3.0.5.

	Note that we don't limit the usage of the variable to guile versions <= 3.0.5,
	because we want to support f.i. building against 3.0.6 and then using a shared
	lib with 3.0.5.

	Tested on x86_64-linux.

	Co-Authored-By: Tom de Vries <tdevries@suse.de>

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28994

2022-07-08  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Fix assert in process_imported_unit_die
	When running test-case gdb.dwarf2/dw2-symtab-includes.exp with target board
	cc-with-debug-names, I run into:
	...
	(gdb) maint expand-symtab dw2-symtab-includes.h^M
	src/gdb/dwarf2/read.h:311: internal-error: unit_type: \
	  Assertion `m_unit_type != 0' failed.^M
	A problem internal to GDB has been detected,^M
	further debugging may prove unreliable.^M
	----- Backtrace -----^M
	FAIL: gdb.dwarf2/dw2-symtab-includes.exp: maint expand-symtab \
	  dw2-symtab-includes.h (GDB internal error)
	...

	The assert was recently added in commit 2c474c46943 ("[gdb/symtab] Add get/set
	functions for per_cu->lang/unit_type").

	The assert is triggered here:
	...
	    /* We're importing a C++ compilation unit with tag DW_TAG_compile_unit
	       into another compilation unit, at root level.  Regard this as a hint,
	       and ignore it.  */
	    if (die->parent && die->parent->parent == NULL
	        && per_cu->unit_type () == DW_UT_compile
	        && per_cu->lang () == language_cplus)
	      return;
	...

	We're trying to access unit_type / lang which hasn't been set yet.

	Normally, these are set during cooked index creation, but that's not the case
	when using an index (or using -readnow).

	In other words, this lto binary reading speed optimization only works in the
	normal use case.

	IWBN to have this working in all use cases, but for now, allow lang () and
	unit_type () to return language_unknown and 0 here.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29321

2022-07-08  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Fix segfault in dwarf2_per_objfile::symtab_set_p
	When running test-case gdb.cp/cpexprs-debug-types.exp with target board
	cc-with-debug-names, I run into:
	...
	(gdb) print base::operator new^M
	^M
	^M
	Fatal signal: Segmentation fault^M
	----- Backtrace -----^M
	0x57ea46 gdb_internal_backtrace_1^M
	        /home/vries/gdb_versions/devel/src/gdb/bt-utils.c:122^M
	0x57eae9 _Z22gdb_internal_backtracev^M
	        /home/vries/gdb_versions/devel/src/gdb/bt-utils.c:168^M
	0x75b8ad handle_fatal_signal^M
	        /home/vries/gdb_versions/devel/src/gdb/event-top.c:946^M
	0x75ba19 handle_sigsegv^M
	        /home/vries/gdb_versions/devel/src/gdb/event-top.c:1019^M
	0x7f795f46a8bf ???^M
	0x6d3cb1 _ZNK18dwarf2_per_objfile12symtab_set_pEPK18dwarf2_per_cu_data^M
	        /home/vries/gdb_versions/devel/src/gdb/dwarf2/read.c:1515^M
	...

	The problem is in this piece of code in dw2_debug_names_iterator::next:
	...
	        case DW_IDX_type_unit:
	          /* Don't crash on bad data.  */
	          if (ull >= per_bfd->tu_stats.nr_tus)
	            {
	              complaint (_(".debug_names entry has bad TU index %s"
	                           " [in module %s]"),
	                         pulongest (ull),
	                         objfile_name (objfile));
	              continue;
	            }
	          per_cu = per_bfd->get_cu (ull + per_bfd->tu_stats.nr_tus);
	          break;
	...

	The all_comp_units vector (which get_cu accesses) contains both CUs and TUs,
	with CUs first.

	So to get the nth TU we need the element at "nr_cus + n", but
	the code uses "nr_tus + n" instead.

	Fix this by using "nr_cus + n".

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29334

2022-07-08  Enze Li  <enze.li@hotmail.com>

	gdb: initialize the data_head variable to eliminate compilation warnings
	On a machine with gcc 12, I get this warning:

	  CXX    nat/linux-btrace.o
	In function ‘btrace_error linux_read_bts(btrace_data_bts*, btrace_target_info*, btrace_read_type)’,
	    inlined from ‘btrace_error linux_read_btrace(btrace_data*, btrace_target_info*, btrace_read_type)’ at ../gdb/nat/linux-btrace.c:935:29:
	../gdb/nat/linux-btrace.c:865:21: warning: ‘data_head’ may be used uninitialized [-Wmaybe-uninitialized]
	  865 |   pevent->last_head = data_head;
	      |   ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
	../gdb/nat/linux-btrace.c: In function ‘btrace_error linux_read_btrace(btrace_data*, btrace_target_info*, btrace_read_type)’:
	../gdb/nat/linux-btrace.c:792:9: note: ‘data_head’ was declared here
	  792 |   __u64 data_head, data_tail;
	      |         ^~~~~~~~~

	Fix this by initializing the 'data_head' variable.

	Tested by rebuilding on x86_64 openSUSE Tumbleweed with gcc 12.

2022-07-08  Andrew Burgess  <aburgess@redhat.com>

	libopcodes/s390: add support for disassembler styling
	This commit adds disassembler style to the libopcodes s390
	disassembler.  This conversion was pretty straight forward, I just
	converted the fprintf_func calls to fprintf_styled_func calls and
	added an appropriate style.

	For testing the new styling I just assembled then disassembled the
	source files in gas/testsuite/gas/s390 and manually checked that the
	styling looked reasonable.

	If the user does not request styled output from objdump, then there
	should be no change in the disassembler output after this commit.

2022-07-08  Nick Clifton  <nickc@redhat.com>

	Fix regeneration of ld configure and makefiles

	Update release README with new version numbers

	Update version to 2.39.50 and regenerate files

	Add markers for 2.39 branch

2022-07-08  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-07  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: fix regression in testing for not yet installed version
	gprofng/ChangeLog
	2022-07-07  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		* src/Settings.cc (Settings::read_rc): Read environment variable
		GPROFNG_SYSCONFDIR.
		* testsuite/lib/Makefile.skel: Export GPROFNG_SYSCONFDIR.
		* testsuite/gprofng.display/display.exp: Shorten the list of tests.

2022-07-07  Simon Marchi  <simon.marchi@efficios.com>

	gdb: fix {rs6000_nat_target,aix_thread_target}::wait to not use inferior_ptid
	Trying to run a simple program (empty main) on AIX, I get:

	    (gdb) run
	    Starting program: /scratch/simark/build/gdb/a.out
	    Child process unexpectedly missing: There are no child processes..
	    ../../src/binutils-gdb/gdb/inferior.c:304: internal-error: find_inferior_pid: Assertion `pid != 0' failed.
	    A problem internal to GDB has been detected,
	    further debugging may prove unreliable.
	    ----- Backtrace -----
	    0x10ef12a8 gdb_internal_backtrace_1()
	            ../../src/binutils-gdb/gdb/bt-utils.c:122
	    0x10ef1470 gdb_internal_backtrace()
	            ../../src/binutils-gdb/gdb/bt-utils.c:168
	    0x1004d368 internal_vproblem(internal_problem*, char const*, int, char const*, char*)
	            ../../src/binutils-gdb/gdb/utils.c:396
	    0x1004d8a8 internal_verror(char const*, int, char const*, char*)
	            ../../src/binutils-gdb/gdb/utils.c:476
	    0x1004c424 internal_error(char const*, int, char const*, ...)
	            ../../src/binutils-gdb/gdbsupport/errors.cc:55
	    0x102ab344 find_inferior_pid(process_stratum_target*, int)
	            ../../src/binutils-gdb/gdb/inferior.c:304
	    0x102ab4a4 find_inferior_ptid(process_stratum_target*, ptid_t)
	            ../../src/binutils-gdb/gdb/inferior.c:318
	    0x1061bae8 find_thread_ptid(process_stratum_target*, ptid_t)
	            ../../src/binutils-gdb/gdb/thread.c:519
	    0x10319e98 handle_inferior_event(execution_control_state*)
	            ../../src/binutils-gdb/gdb/infrun.c:5532
	    0x10315544 fetch_inferior_event()
	            ../../src/binutils-gdb/gdb/infrun.c:4221
	    0x10952e34 inferior_event_handler(inferior_event_type)
	            ../../src/binutils-gdb/gdb/inf-loop.c:41
	    0x1032640c infrun_async_inferior_event_handler(void*)
	            ../../src/binutils-gdb/gdb/infrun.c:9548
	    0x10673188 check_async_event_handlers()
	            ../../src/binutils-gdb/gdb/async-event.c:335
	    0x1066fce4 gdb_do_one_event()
	            ../../src/binutils-gdb/gdbsupport/event-loop.cc:214
	    0x10001a94 start_event_loop()
	            ../../src/binutils-gdb/gdb/main.c:411
	    0x10001ca0 captured_command_loop()
	            ../../src/binutils-gdb/gdb/main.c:471
	    0x10003d74 captured_main(void*)
	            ../../src/binutils-gdb/gdb/main.c:1329
	    0x10003e48 gdb_main(captured_main_args*)
	            ../../src/binutils-gdb/gdb/main.c:1344
	    0x10000744 main
	            ../../src/binutils-gdb/gdb/gdb.c:32
	    ---------------------
	    ../../src/binutils-gdb/gdb/inferior.c:304: internal-error: find_inferior_pid: Assertion `pid != 0' failed.
	    A problem internal to GDB has been detected,
	    further debugging may prove unreliable.
	    Quit this debugging session? (y or n)

	This is due to some bit-rot in the AIX port, still relying on the entry
	value of inferior_ptid in the wait methods.

	Problem #1 is in rs6000_nat_target::wait, here:

	      /* Ignore terminated detached child processes.  */
	      if (!WIFSTOPPED (status) && pid != inferior_ptid.pid ())
		pid = -1;

	At this point, waitpid has returned an "exited" status for some pid, so
	pid is non-zero.  Since inferior_ptid is set to null_ptid on entry, the
	pid returned by wait is not equal to `inferior_ptid.pid ()`, so we reset
	pid to -1 and go to waiting again.  Since there are not more children to
	wait for, waitpid then returns -1 so we get here:

	      if (pid == -1)
		{
		  gdb_printf (gdb_stderr,
			      _("Child process unexpectedly missing: %s.\n"),
			      safe_strerror (save_errno));

		  /* Claim it exited with unknown signal.  */
		  ourstatus->set_signalled (GDB_SIGNAL_UNKNOWN);
		  return inferior_ptid;
		}

	We therefore return a "signalled" status with a null_ptid (again,
	inferior_ptid is null_ptid).  This confuses infrun, because if the
	target returns a "signalled" status, it should be coupled with a ptid
	for an inferior that exists.

	So, the first step is to fix the snippets above to not use
	inferior_ptid.  In the first snippet, use find_inferior_pid to see if
	we know the event process.  If there is no inferior with that pid, we
	assume it's a detached child process to we ignore the event.  That
	should be enough to fix the problem, because it should make it so we
	won't go into the second snippet.  But still, fix the second snippet to
	return an "ignore" status.  This is copied from inf_ptrace_target::wait,
	which is where rs6000_nat_target::wait appears to be copied from in the
	first place.

	These changes, are not sufficient, as the aix_thread_target, which sits
	on top of rs6000_nat_target, also relies on inferior_ptid.
	aix_thread_target::wait, by calling pd_update, assumes that
	rs6000_nat_target has set inferior_ptid to the appropriate value (the
	ptid of the event thread), but that's not the case.  pd_update
	returns inferior_ptid - null_ptid - and therefore
	aix_thread_target::wait returns null_ptid too, and we still hit the
	assert shown above.

	Fix this by changing pd_activate, pd_update, sync_threadlists and
	get_signaled_thread to all avoid using inferior_ptid.  Instead, they
	accept as a parameter the pid of the process we are working on.

	With this patch, I am able to run the program to completion:

	    (gdb) r
	    Starting program: /scratch/simark/build/gdb/a.out
	    [Inferior 1 (process 11010794) exited normally]

	As well as break on main:

	    (gdb) b main
	    Breakpoint 1 at 0x1000036c
	    (gdb) r
	    Starting program: /scratch/simark/build/gdb/a.out

	    Breakpoint 1, 0x1000036c in main ()
	    (gdb) c
	    Continuing.
	    [Inferior 1 (process 26083688) exited normally]

	Change-Id: I7c2613bbefe487d75fa1a0c0994423471d961ee9

2022-07-07  Pedro Alves  <pedro@palves.net>

	Fix pedantically invalid DWARF in gdb.trace/unavailable-dwarf-piece.exp
	The DWARF spec says:

	  Any debugging information entry representing the declaration of an object,
	  module, subprogram or type may have DW_AT_decl_file, DW_AT_decl_line and
	  DW_AT_decl_column attributes, each of whose value is an unsigned integer
								  ^^^^^^^^
	  constant.

	Grepping around the DWARF-assembler-based testcases, I noticed that
	gdb.trace/unavailable-dwarf-piece.exp emits decl_line with
	DW_FORM_sdata, a signed integer form.  This commit tweaks it to use
	DW_FORM_udata instead.

	Unsurprisingly, this:

	  $ make check \
	      TESTS="gdb.trace/unavailable-dwarf-piece.exp" \
	      RUNTESTFLAGS="--target_board=native-gdbserver"

	... still passes cleanly for me after this change.

	I've noticed this because current llvm-dwarfdump crashed on an
	ROCm-internal DWARF-assembler-based testcase that incorrectly used
	signed forms for DW_AT_decl_file/DW_AT_decl_line.

	The older llvm-dwarfdump found on Ubuntu 20.04 (LLVM 10) reads the
	line numbers with signed forms as "0" instead of crashing.  Here's the
	before/after fix for gdb.trace/unavailable-dwarf-piece.exp with that
	llvm-dwarfdump version:

	  $ diff -up before.txt after.txt
	  --- before.txt    2022-07-07 13:21:28.387690334 +0100
	  +++ after.txt     2022-07-07 13:21:39.379801092 +0100
	  @@ -18,7 +18,7 @@
			   DW_AT_name     ("s")
			   DW_AT_byte_size        (3)
			   DW_AT_decl_file        (0)
	  -                DW_AT_decl_line        (0)
	  +                DW_AT_decl_line        (1)

	   0x0000002f:     DW_TAG_member
			     DW_AT_name   ("a")
	  @@ -41,7 +41,7 @@
			   DW_AT_name     ("t")
			   DW_AT_byte_size        (3)
			   DW_AT_decl_file        (0)
	  -                DW_AT_decl_line        (0)
	  +                DW_AT_decl_line        (1)

	   0x00000054:     DW_TAG_member
			     DW_AT_name   ("a")

	Change-Id: I5c866946356da421ff944019d0eca2607b2b738f

2022-07-07  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: LoongArch: Fix typos in code comments
	"it’s" should be "it's".

2022-07-07  Maciej W. Rozycki  <macro@embecosm.com>

	GDB/testsuite: Add coverage for `print -elements' command
	We currently have no coverage for the `print -elements ...' command (or
	`p -elements ...' in the shortened form), so add a couple of test cases
	mimicking ones using corresponding `set print elements ...' values.

2022-07-07  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: LoongArch: Implement the push_dummy_call gdbarch method
	According to "Procedure Calling Convention" in "LoongArch ELF ABI
	specification" [1], implement the push_dummy_call gdbarch method
	as clear as possible.

	[1] https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html#_procedure_calling_convention

2022-07-07  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Added Zfhmin and Zhinxmin.
	This commit adds Zfhmin and Zhinxmin extensions (subsets of Zfh and
	Zhinx extensions, respectively).  In the process supporting Zfhmin and
	Zhinxmin extension, this commit also changes how instructions are
	categorized considering Zfhmin, Zhinx and Zhinxmin extensions.

	Detailed changes,

	* From INSN_CLASS_ZFH to INSN_CLASS_ZFHMIN:

	flh, fsh, fmv.x.h and fmv.h.x.

	* From INSN_CLASS_ZFH to INSN_CLASS_ZFH_OR_ZHINX:

	fmv.h.

	* From INSN_CLASS_ZFH_OR_ZHINX to INSN_CLASS_ZFH_OR_ZHINX:

	fneg.h, fabs.h, fsgnj.h, fsgnjn.h, fsgnjx.h,
	fadd.h, fsub.h, fmul.h, fdiv.h, fsqrt.h, fmin.h, fmax.h,
	fmadd.h, fnmadd.h, fmsub.h, fnmsub.h,
	fcvt.w.h, fcvt.wu.h, fcvt.h.w, fcvt.h.wu,
	fcvt.l.h, fcvt.lu.h, fcvt.h.l, fcvt.h.lu,
	feq.h, flt.h, fle.h, fgt.h, fge.h,
	fclass.h.

	* From INSN_CLASS_ZFH_OR_ZHINX to INSN_CLASS_ZFHMIN_OR_ZHINXMIN:

	fcvt.s.h and fcvt.h.s.

	* From INSN_CLASS_D_AND_ZFH_INX to INSN_CLASS_ZFHMIN_AND_D:

	fcvt.d.h and fcvt.h.d.

	* From INSN_CLASS_Q_AND_ZFH_INX to INSN_CLASS_ZFHMIN_AND_Q:

	fcvt.q.h and fcvt.h.q.

	bfd/ChangeLog:

		* elfxx-riscv.c (riscv_implicit_subsets): Change implicit
		subsets.  Zfh->Zicsr is not needed and Zfh->F is replaced with
		Zfh->Zfhmin and Zfhmin->F.  Zhinx->Zicsr is not needed and
		Zhinx->Zfinx is replaced with Zhinx->Zhinxmin and
		Zhinxmin->Zfinx.
		(riscv_supported_std_z_ext): Added zfhmin and zhinxmin.
		(riscv_multi_subset_supports):  Rewrite handling for new
		instruction classes.
		(riscv_multi_subset_supports_ext): Updated.
		(riscv_parse_check_conflicts): Change error message to include
		zfh and zfhmin extensions.

	gas/ChangeLog:

		* testsuite/gas/riscv/zfhmin-d-insn-class-fail.s: New complex
		error handling test.
		* testsuite/gas/riscv/zfhmin-d-insn-class-fail-1.d: Likewise.
		* testsuite/gas/riscv/zfhmin-d-insn-class-fail-1.l: Likewise.
		* testsuite/gas/riscv/zfhmin-d-insn-class-fail-2.d: Likewise.
		* testsuite/gas/riscv/zfhmin-d-insn-class-fail-2.l: Likewise.
		* testsuite/gas/riscv/zfhmin-d-insn-class-fail-3.d: Likewise.
		* testsuite/gas/riscv/zfhmin-d-insn-class-fail-3.l: Likewise.
		* testsuite/gas/riscv/zfhmin-d-insn-class-fail-4.d: Likewise.
		* testsuite/gas/riscv/zfhmin-d-insn-class-fail-4.l: Likewise.
		* testsuite/gas/riscv/zfhmin-d-insn-class-fail-5.d: Likewise.
		* testsuite/gas/riscv/zfhmin-d-insn-class-fail-5.l: Likewise.
		* testsuite/gas/riscv/zhinx.d: Renamed from fp-zhinx-insns.d
		and refactored.
		* testsuite/gas/riscv/zhinx.s: Likewise.

	include/ChangeLog:

		* opcode/riscv.h (enum riscv_insn_class): Removed INSN_CLASS_ZFH,
		INSN_CLASS_D_AND_ZFH_INX and INSN_CLASS_Q_AND_ZFH_INX.  Added
		INSN_CLASS_ZFHMIN, INSN_CLASS_ZFHMIN_OR_ZHINXMIN,
		INSN_CLASS_ZFHMIN_AND_D and INSN_CLASS_ZFHMIN_AND_Q.

	opcodes/ChangeLog:

		* riscv-opc.c (riscv_opcodes): Change instruction classes for
		Zfh and Zfhmin instructions.  Fix `fcvt.h.lu' instruction
		(two operand variant) mask.

2022-07-07  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: adjust GPROFNG_VARIANT
	GPROFNG_VARIANT depends on compiler options, not on $(host).

	gprofng/ChangeLog
	2022-07-06  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		PR gprofng/29116
		* libcollector/configure.ac: Adjust GPROFNG_VARIANT.
		* libcollector/configure: Rebuild.

2022-07-07  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Fix disassembling Zfinx with -M numeric
	This commit fixes floating point operand register names from ABI ones
	to dynamically set ones.

	gas/ChangeLog:

		* testsuite/gas/riscv/zfinx-dis-numeric.s: Test new behavior of
		Zfinx extension and -M numeric disassembler option.
		* testsuite/gas/riscv/zfinx-dis-numeric.d: Likewise.

	opcodes/ChangeLog:

		* riscv-dis.c (riscv_disassemble_insn): Use dynamically set GPR
		names to disassemble Zfinx instructions.

2022-07-07  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Fix requirement handling on Zhinx+{D,Q}
	This commit fixes how instructions are masked on Zhinx+Z{d,q}inx.
	fcvt.h.d and fcvt.d.h require ((D&&Zfh)||(Zdinx&&Zhinx)) and
	fcvt.h.q and fcvt.q.h require ((Q&&Zfh)||(Zqinx&&Zhinx)).

	bfd/ChangeLog:

		* elfxx-riscv.c (riscv_multi_subset_supports): Fix feature gate
		on INSN_CLASS_{D,Q}_AND_ZFH_INX.
		(riscv_multi_subset_supports_ext): Fix feature gate diagnostics
		on INSN_CLASS_{D,Q}_AND_ZFH_INX.

	gas/ChangeLog:

		* testsuite/gas/riscv/fp-zhinx-insns.d: Add Zqinx to -march
		for proper testing.

2022-07-07  Alan Modra  <amodra@gmail.com>

	PR29320, 'struct obstack' declared inside parameter list
		PR 29320
		* frags.h: Move declaration of struct obstack..
		* as.h: ..to here.

2022-07-07  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-06  Ruud van der Pas  <ruud.vanderpas@oracle.com>

	gprofng: implement a functional gp-display-html
	This patch enables the first support for the "gprofng display html" command.
	This command works for C/C++ applications on x86_64. Using one or more gprofng
	experiment directories as input, a new directory with html files is created.
	Through the index.html file in this directory, the performance results may be
	viewed in a browser.

	gprofng/Changelog:
	2022-06-28  Ruud van der Pas  <ruud.vanderpas@oracle.com>

		* gp-display-html/gp-display-html.in: implement first support for x86_64 and C/C++

2022-07-06  H.J. Lu  <hjl.tools@gmail.com>

	elf: Copy p_align of PT_GNU_STACK for stack alignment
	commit 74e315dbfe5200c473b226e937935fb8ce391489
	Author: H.J. Lu <hjl.tools@gmail.com>
	Date:   Mon Dec 13 19:46:04 2021 -0800

	    elf: Set p_align to the minimum page size if possible

	may ignore p_align of PT_GNU_STACK when copying ELF program header if
	the maximum page size is larger than p_align of PT_LOAD segments.  Copy
	p_align of PT_GNU_STACK since p_align of PT_GNU_STACK describes stack
	alignment, not page size,

		PR binutils/29319
		* elf.c (copy_elf_program_header): Copy p_align of PT_GNU_STACK
		for stack alignment.

2022-07-06  Jan Beulich  <jbeulich@suse.com>

	x86: make D attribute usable for XOP and FMA4 insns
	This once again allows to reduce redundancy in (and size of) the opcode
	table.

	Don't go as far as also making D work on the two 5-operand XOP insns:
	This would significantly complicate the code, as there the first
	(immediate) operand would need special treatment in several places.

	Note that the .s suffix isn't being enabled to have any effect, for
	being deprecated. Whereas neither {load} nor {store} pseudo prefixes
	make sense here, as the respective operands are inputs (loads) only
	anyway, regardless of order. Hence there is (as before) no way for the
	programmer to request the alternative encoding to be used for register-
	only insns.

	Note further that it is always the first original template which is
	retained (and altered), to make sure the same encoding as before is
	used for register-only insns. This has the slightly odd (but pre-
	existing) effect of XOP register-only insns having XOP.W clear, but FMA4
	ones having VEX.W set.

2022-07-06  Jan Beulich  <jbeulich@suse.com>

	x86: fold two switch() statements in match_template()
	I don't see why two of them were introduced (very long ago) using
	similar fall-through logic.

2022-07-06  Jan Beulich  <jbeulich@suse.com>

	x86: fix 3-operand insn reverse-matching
	The middle operand would have gone entirely unchecked, allowing e.g.

		vmovss		%xmm0, %esp, %xmm2

	to assemble successfully, or e.g.

		vmovss		%xmm0, $4, %xmm2

	causing an internal error. Alongside dealing with this also drop a
	related comment, which hasn't been applicable anymore since the
	introduction of 3-operand patterns with D set (and which perhaps never
	had been logical to be there, as reverse-matched insns don't make it
	there in the first place).

2022-07-06  Bhuvanendra Kumar N  <Bhuvanendra.KumarN@amd.com>

	Descriptive DWARF operations dump support for DW_AT_rank
	DW_AT_rank is a dwarf-5 feature.

2022-07-06  Jan Beulich  <jbeulich@suse.com>

	x86: introduce a state stack for .arch
	When using just slightly non-trivial combinations of .arch, it can be
	quite useful to be able to go back to prior state without needing to
	re-invoke perhaps many earlier directives and without needing to invoke
	perhaps many "negative" ones. Like some other architectures allow
	saving (pushing) and restoring (popping) present/prior state.

	For now require the same .code<N> to be in effect for ".arch pop" that
	was in effect for the corresponding ".arch push".

	Also change the global "no_cond_jump_promotion" to be bool, to match the
	new struct field.

2022-07-06  Jan Beulich  <jbeulich@suse.com>

	x86: generalize disabling of sub-architectures
	I never really understood upon what basis ".arch .no*" options were made
	available. Let's not have any "criteria" at all, and simply allow
	disabling of all of them. Then we also have all data for a sub-arch in
	a single place, as we now only need a single table.

2022-07-06  Jan Beulich  <jbeulich@suse.com>

	x86: permit "default" with .arch
	So far there was no way to reset the architecture to that assembly would
	start with in the absence of any overrides (command line or directives).
	Note that for Intel MCU "default" is merely an alias of "iamcu".

	While there also zap a stray @item from the doc section, as noticed
	when inspecting the generated output (which still has some quirks, but
	those aren't easy to address without re-flowing almost the entire
	section).

2022-07-06  Jan Beulich  <jbeulich@suse.com>

	x86: don't leak sub-architecture accumulated strings
	While it may not be necessary in i386_target_format() (but then setting
	the variable to NULL also wouldn't be necessary), at least in the other
	cases strings may already have accumulated.

2022-07-06  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-05  Tom de Vries  <tdevries@suse.de>

	[gdb/exp] Fix internal error when printing C++ pointer-to-member
	When running the test-case included with this patch, we run into:
	...
	(gdb) print ptm^M
	$1 = gdb/gdbtypes.h:695: internal-error: loc_bitpos: \
	  Assertion `m_loc_kind == FIELD_LOC_KIND_BITPOS' failed.^M
	...
	while printing a c++ pointer-to-member.

	Fix this by skipping static fields in cp_find_class_member, such that we have:
	...
	(gdb) print ptm^M
	$1 = &A::i^M
	...

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29294

2022-07-05  Tom Tromey  <tromey@adacore.com>

	Add gdb.Objfile.is_file attribute
	Sometimes an objfile comes from memory and not from a file.  It can be
	useful to be able to check this from Python, so this patch adds a new
	"is_file" attribute.

2022-07-05  Tom Tromey  <tromey@adacore.com>

	Make 'import gdb.events' work
	Pierre-Marie noticed that, while gdb.events is a Python module, it
	can't be imported.  This patch changes how this module is created, so
	that it can be imported, while also ensuring that the module is always
	visible, just as it was in the past.

	This new approach required one non-obvious change -- when running
	gdb.base/warning.exp, where --data-directory is intentionally not
	found, the event registries can now be nullptr.  Consequently, this
	patch probably also requires

	    https://sourceware.org/pipermail/gdb-patches/2022-June/189796.html

	Note that this patch obsoletes

	    https://sourceware.org/pipermail/gdb-patches/2022-June/189797.html

2022-07-05  Xi Ruoyao  <xry111@xry111.site>

	gdb: LoongArch: add orig_a0 into register set
	The basic support for LoongArch has been merged into the upstream Linux
	kernel since 5.19-rc1 on June 5, 2022.  This commit adds orig_a0 which
	is added into struct user_pt_regs [1] to match the upstream kernel, and
	then the upstream GDB will work with the upstream kernel.

	Note that orig_a0 was added into struct user_pt_regs in the development
	cycle for merging LoongArch port into the upstream Linux kernel, so
	earlier kernels (notably, the product kernel with version 4.19 used in
	distros like UOS and Loongnix) don't have it.  Inspect
	arch/loongarch/include/uapi/asm/ptrace.h in the kernel tree to make sure.
	To build upstream GDB for a kernel lacking orig_a0, it's necessary to
	revert this commit locally.

	[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/loongarch/include/uapi/asm/ptrace.h#n24

2022-07-05  Bhuvanendra Kumar N  <Bhuvanendra.KumarN@amd.com>

	Support for location and range lists for split-dwarf and dwarf-5.
	Adding support for location and range lists for split-dwarf and dwarf-5.
	Following issues are taken care.
	1. Display of the index values for DW_FORM_loclistx and DW_FORM_rnglistx.
	2. Display of .debug_loclists.dwo and .debug_rnglists.dwo sections.

	        * dwarf.c(read_and_display_attr_value): Handle DW_FORM_loclistx
	        and DW_FORM_rnglistx for .dwo files.
	        (process_debug_info): Load .debug_loclists.dwo and
	        .debug_rnglists.dwo if exists.
	        (load_separate_debug_files): Load .debug_loclists and
	        .debug_rnglists if exists.
	        Include 2 entries in debug_displays table.
	        * dwarf.h (enum dwarf_section_display_enum): Include 2 entries.

2022-07-05  Jan Beulich  <jbeulich@suse.com>

	x86: introduce fake processor type to mark sub-arch entries in cpu_arch[]
	This is in preparation of dropping the leading . from the strings.

	While there also move PROCESSOR_GENERIC{32,64} from the middle of AMD
	entries to near the top.

2022-07-05  Jan Beulich  <jbeulich@suse.com>

	x86: macro-ize cpu_arch[] entries
	Putting individual elements behind macros, besides (imo) improving
	readability, will make subsequent (and likely also future) changes less
	intrusive.

	Utilize this right away to pack the table a little more tightly, by
	converting "skip" to bool and putting it earlier in a group of bitfields
	together with "len".

2022-07-05  Jan Beulich  <jbeulich@suse.com>

	x86: de-duplicate sub-architecture strings accumulation
	Introduce a helper function to replace 4 instances of similar code. Use
	reconcat() to cover the previously explicit free().

2022-07-05  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-04  Nick Clifton  <nickc@redhat.com>

	Fix snafu in rust demangler recursion limit code

2022-07-04  Alan Modra  <amodra@gmail.com>

	alloc gas seginfo on notes obstack
	Lots of memory used in gas should go on this obstack.  The patch also
	frees all the gas obstacks on exit, which isn't a completely trivial
	task.

		* subsegs.c (alloc_seginfo): New function.
		(subseg_change, subseg_get): Use it.
		(subsegs_end): New function.
		* as.h (subsegs_end): Declare.
		* output-file.c: Include subsegs.h
		(stash_frchain_obs): New function.
		(output_file_close): Save obstacks attached to output bfd before
		closing.  Call subsegs_end with the array of obstacks.

2022-07-04  Alan Modra  <amodra@gmail.com>

	objcopy: bfd_alloc orelocation
	This fixes an inconsequential objcopy memory leak.  I'd normally
	ignore reports of leaks like this one, that are merely one block or
	fewer per section processed, since objcopy soon exits and frees all
	memory.  However I thought it worth providing support for allocating
	memory on a bfd objalloc in objcopy and other utils.

		PR 29233
		* bucomm.c (bfd_xalloc): New function.
		* bucomm.h (bfd_xalloc): Declare.
		* objcopy.c (copy_relocations_in_section): Use it to allocate
		array of reloc pointers.  Rewrite code stripping relocs to do
		without extra memory allocation.

2022-07-04  Nick Clifton  <nickc@redhat.com>

	Synchronize libbierty sources with gcc.

2022-07-04  Bhuvanendra Kumar N  <Bhuvanendra.KumarN@amd.com>

	Modified changes for split-dwarf and dwarf-5.
	        * dwarf.c(process_debug_info): Include DW_TAG_skeleton_unit.
	        (display_debug_str_offsets): While dumping .debug_str_offsets.dwo,
	        pass proper str_offsets_base to fetch_indexed_string().
	        (load_separate_debug_files): Skip DWO ID dump for dwarf-5.

2022-07-04  Marcus Nilsson  <brainbomb@gmail.com>

	opcodes/avr: Implement style support in the disassembler
		* disassemble.c: (disassemble_init_for_target): Set
		created_styled_output for AVR based targets.
		* avr-dis.c: (print_insn_avr): Use fprintf_styled_ftype
		instead of fprintf_ftype throughout.
		(avr_operand): Pass in and fill disassembler_style when
		parsing operands.

2022-07-04  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Add get/set functions for per_cu->lang/unit_type
	The dwarf2_per_cu_data fields lang and unit_type both have a dont-know
	initial value (respectively language_unknown and (dwarf_unit_type)0), which
	allows us to add certain checks, f.i. checking that that a field is not read
	before written.

	Add get/set member functions for the two fields as a convenient location to
	add such checks, make the fields private to enforce using the member
	functions, and add the m_ prefix.

	Tested on x86_64-linux.

2022-07-04  Jan Beulich  <jbeulich@suse.com>

	gas/testsuite: properly exclude aout in all/weakref1u
	Use the (wider) predicate rather than a triplet. This eliminates the sole
	i386-msdos failure in the testsuite.

2022-07-04  Jan Beulich  <jbeulich@suse.com>

	x86: fold Disp32S and Disp32
	The only case where 64-bit code uses non-sign-extended (can also be
	considered zero-extended) displacements is when an address size override
	is in place for a memory operand (i.e. particularly excluding
	displacements of direct branches, which - if at all - are controlled by
	operand size, and then are still sign-extended, just from 16 bits).
	Hence the distinction in templates is unnecessary, allowing code to be
	simplified in a number of places. The only place where logic becomes
	more complicated is when signed-ness of relocations is determined in
	output_disp().

	The other caveat is that Disp64 cannot be specified anymore in an insn
	template at the same time as Disp32. Unlike for non-64-bit mode,
	templates don't specify displacements for both possible addressing
	modes; the necessary adjustment to the expected ones has already been
	done in match_template() anyway (but of course the logic there needs
	tweaking now). Hence the single template so far doing so is split.

2022-07-04  Jan Beulich  <jbeulich@suse.com>

	x86: restore masking of displacement kinds
	Commit 7d5e4556a375 rendered the check near the end of what is now
	i386_finalize_displacement() entirely dead for AT&T mode, since for
	operands involving a displacement .unspecified will always be set. But
	the logic there is bogus anyway - Intel syntax operand size specifiers
	are of no interest there either. The only thing which matters in the
	"displacement only" determination is .baseindex.

	Of course when masking displacement kinds we should not at the same time
	also mask off other attributes.

	Furthermore the type mask returned by lex_got() also needs to be
	adjusted: The only case where we want Disp32 (rather than Disp32S) is
	when dealing with 32-bit addressing mode in 64-bit code.

2022-07-04  Jan Beulich  <jbeulich@suse.com>

	x86-64: improve handling of branches to absolute addresses
	There are two related problems here: The use of "addr32" on a direct
	branch would, besides causing a warning, result in operands to be
	permitted which mistakenly are refused without "addr32". Plus at some
	point not too long ago I'm afraid it may have been me who regressed the
	relocation addends emitted for such branches. Correct both problems,
	adding a testcase to guard against regressing this again.

2022-07-04  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Update Zihintpause extension version
	Because ratified Zihintpause extension has a version number of 2.0
	(not 1.0), we should update the number.

	bfd/ChangeLog:

		* elfxx-riscv.c (riscv_supported_std_z_ext): Update version
		number of Zihintpause extension.

2022-07-04  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-03  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-02  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Fix data race on per_cu->dwarf_version
	When building gdb with -fsanitize=thread and gcc 12, and running test-case
	gdb.dwarf2/dwz.exp, we run into a data race between thread T2 and the main
	thread in the same write:
	...
	Write of size 1 at 0x7b200000300c:^M
	    #0 cutu_reader::cutu_reader(dwarf2_per_cu_data*, dwarf2_per_objfile*, \
	    abbrev_table*, dwarf2_cu*, bool, abbrev_cache*) gdb/dwarf2/read.c:6252 \
	    (gdb+0x82f3b3)^M
	...
	which is here:
	...
	         this_cu->dwarf_version = cu->header.version;
	...

	Both writes are called from the parallel for in dwarf2_build_psymtabs_hard,
	this one directly:
	...
	    #1 process_psymtab_comp_unit gdb/dwarf2/read.c:6774 (gdb+0x8304d7)^M
	    #2 operator() gdb/dwarf2/read.c:7098 (gdb+0x8317be)^M
	    #3 operator() gdbsupport/parallel-for.h:163 (gdb+0x872380)^M
	...
	and this via the PU import:
	...
	    #1 cooked_indexer::ensure_cu_exists(cutu_reader*, dwarf2_per_objfile*, \
	    sect_offset, bool,  bool) gdb/dwarf2/read.c:17964 (gdb+0x85c43b)^M
	    #2 cooked_indexer::index_imported_unit(cutu_reader*, unsigned char const*, \
	    abbrev_info const*) gdb/dwarf2/read.c:18248 (gdb+0x85d8ff)^M
	    #3 cooked_indexer::index_dies(cutu_reader*, unsigned char const*, \
	    cooked_index_entry const*, bool) gdb/dwarf2/read.c:18302 (gdb+0x85dcdb)^M
	    #4 cooked_indexer::make_index(cutu_reader*) gdb/dwarf2/read.c:18443 \
	    (gdb+0x85e68a)^M
	    #5 process_psymtab_comp_unit gdb/dwarf2/read.c:6812 (gdb+0x830879)^M
	    #6 operator() gdb/dwarf2/read.c:7098 (gdb+0x8317be)^M
	    #7 operator() gdbsupport/parallel-for.h:171 (gdb+0x8723e2)^M
	...

	Fix this by setting the field earlier, in read_comp_units_from_section.

	The write in cutu_reader::cutu_reader() is still needed, in case
	read_comp_units_from_section is not used (run the test-case with say, target
	board cc-with-gdb-index).

	Make the write conditional, such that it doesn't trigger if the field is
	already set by read_comp_units_from_section.  Instead, verify that the
	field already has the value that we're trying to set it to.

	Move this logic into into a member function set_version (in analogy to the
	already present member function version) to make sure it's used consistenly,
	and make the field private in order to enforce access through the member
	functions, and rename it to m_dwarf_version.

	While we're at it, make sure that the version is set before read, to avoid
	say returning true for "per_cu.version () < 5" if "per_cu.version () == 0".

	Tested on x86_64-linux.

2022-07-02  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/early-init-file.exp with -fsanitize=thread
	When building gdb with -fsanitize=thread, I run into:
	...
	FAIL: gdb.base/early-init-file.exp: check startup version string has style \
	  version
	...
	due to this:
	...
	warning: Found custom handler for signal 7 (Bus error) preinstalled.^M
	warning: Found custom handler for signal 8 (Floating point exception) \
	  preinstalled.^M
	warning: Found custom handler for signal 11 (Segmentation fault) \
	  preinstalled.^M
	Some signal dispositions inherited from the environment (SIG_DFL/SIG_IGN)^M
	won't be propagated to spawned programs.^M
	...
	appearing before the "GNU gdb (GDB) $version" line.

	This is similar to the problem fixed by commit f0bbba7886f
	("gdb.debuginfod/fetch_src_and_symbols.exp: fix when GDB is built with
	AddressSanitizer").

	In that commit, the problem was fixed by starting gdb with -quiet, but using
	that would mean the "GNU gdb (GDB) $version" line that we're trying to check
	would disappear.

	Fix this instead by updating the regexp to allow the message.

	Tested on x86_64-linux.

2022-07-02  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-07-01  Maciej W. Rozycki  <macro@embecosm.com>

	GDB/doc: Remove indentation from `print -elements' completion example
	Remove indentation from the text of the manual after the example here:

	"  Completion will in some cases guide you with a suggestion of what
	kind of argument an option expects.  For example:

	     (gdb) print -elements <TAB><TAB>
	     NUMBER     unlimited

	   Here, the option expects a number (e.g., '100'), not literal
	'NUMBER'.  Such metasyntactical arguments are always presented in
	uppercase."

	as this is a continuation of the same paragraph.

2022-07-01  Maciej W. Rozycki  <macro@embecosm.com>

	GDB/doc: Remove extraneous spaces from completion examples
	Completion results are usually different when the operation is applied
	to a word that is or is not followed by a space.  In some cases they are
	equivalent, however a space would not be produced if completion was used
	earlier on in the word processed.

	However in the manual we have completion examples given using a space
	that actually prevents the example from working.  E.g.:

	(gdb) info bre <TAB>

	(nothing) and:

	(gdb) info bre <TAB><TAB>
	Display all 200 possibilities? (y or n)

	as it now goes on to propose the entire symbol table, while:

	(gdb) info bre<TAB>
	(gdb) info breakpoints

	does the right thing, but is not what is shown in the manual.

	In other cases an extraneous space is used that does not correspond to
	the actual completion pattern shown, which gives an impression of
	sloppiness.

	Remove extraneous spaces then from completion examples as appropriate.

2022-07-01  Nick Clifton  <nickc@redhat.com>

	Add newline to the end of the rnglists displsy.

2022-07-01  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-30  Maciej W. Rozycki  <macro@embecosm.com>

	GDB: Add `NUMBER' completion to `set' integer commands
	Fix a completion consistency issue with `set' commands accepting integer
	values and the special `unlimited' keyword:

	(gdb) complete print -elements
	print -elements NUMBER
	print -elements unlimited
	(gdb)

	vs:

	(gdb) complete set print elements
	set print elements unlimited
	(gdb)

	(there is a space entered at the end of both commands, not shown here)
	which also means if you strike <Tab> with `set print elements ' input,
	it will, annoyingly, complete to `set print elements unlimited' right
	away rather than showing a choice between `NUMBER' and `unlimited'.

	Add `NUMBER' then as an available completion for such `set' commands:

	(gdb) complete set print elements
	set print elements NUMBER
	set print elements unlimited
	(gdb)

	Adjust the testsuite accordingly.  Also document the feature in the
	Completion section of the manual in addition to the Command Options
	section already there.

2022-06-30  Bruno Larsen  <blarsen@redhat.com>

	gdb/testsuite: Expand gdb.cp/mb-ctor.exp to test dynamic allocation
	When testing GDB's ability to stop in constructors, gdb.cp/mb-ctor.exp
	only tested objects allocated on the stack. This commit adds a couple of
	dynamic allocations and tests if GDB can stop in it as well.

2022-06-30  Nick Clifton  <nickc@redhat.com>

	Fix implementation of readelf's -wE and -wN options,
		* dwarf.c (dwarf_select_sections_by_name): If the entry's value is
		zero then clear the corresponding variable.
		(dwarf_select_sections_by_letters): Likewise.
		* testsuite/binutils-all/debuginfo.exp: Expect -WE and -wE
		debuginfod tests to fail.

2022-06-30  Tom de Vries  <tdevries@suse.de>

	[gdb] Block SIGTERM in worker threads
	With gdb build with gcc-12 and -fsanitize=thread, and test-case
	gdb.base/gdb-sigterm.exp, I run into:
	...
	WARNING: ThreadSanitizer: data race (pid=9722)^M
	  Write of size 4 at 0x00000325bc68 by thread T1:^M
	  #0 handle_sigterm(int) src/gdb/event-top.c:1211 (gdb+0x8ec01f)^M
	  ...
	  Previous read of size 4 at 0x00000325bc68 by main thread:^M
	    [failed to restore the stack]^M
	^M
	  Location is global 'sync_quit_force_run' of size 4 at \
	  0x00000325bc68 (gdb+0x325bc68)^M
	  ...
	SUMMARY: ThreadSanitizer: data race gdb/event-top.c:1211 in \
	  handle_sigterm(int)^M
	...
	and 3 more data races involving handle_sigterm and locations:
	- active_ext_lang
	- quit_flag
	- heap block of size 40
	  (XNEW (async_signal_handler) in create_async_signal_handler)

	This was reported in PR29297.

	The testcase executes a "kill -TERM $gdb_pid", which generates a
	process-directed signal.

	A process-directed signal can be delivered to any thread, and what we see
	here is the fallout of the signal being delivered to a worker thread rather
	than the main thread.

	Fix this by blocking SIGTERM in the worker threads.

	[ I have not been able to reproduce this after it occurred for the first time,
	so unfortunately I cannot confirm that the patch fixes the problem. ]

	Tested on x86_64-linux, with and without -fsanitize=thread.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29297

2022-06-30  Andrew Burgess  <aburgess@redhat.com>

	gdb/doc: fix column widths in MI compatibility table
	In passing I noticed that the column headings for the table of MI
	compatibility and breaking changes, were overlapping, at least when
	the PDF is generated on my machine.

	I propose giving slightly more space to the two version number
	columns, this prevents the headers overlapping for me.

2022-06-30  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-29  Pedro Alves  <pedro@palves.net>

	Fix GDBserver regression due to change to avoid reading shell registers
	Simon reported that the recent change to make GDB and GDBserver avoid
	reading shell registers caused a GDBserver regression, caught with
	ASan while running gdb.server/non-existing-program.exp:

	 $ /home/smarchi/build/binutils-gdb/gdb/testsuite/../../gdb/../gdbserver/gdbserver stdio non-existing-program
	 =================================================================
	 ==127719==ERROR: AddressSanitizer: heap-use-after-free on address 0x60f0000000e9 at pc 0x55bcbfa301f4 bp 0x7ffd238a7320 sp 0x7ffd238a7310
	 WRITE of size 1 at 0x60f0000000e9 thread T0
	     #0 0x55bcbfa301f3 in scoped_restore_tmpl<bool>::~scoped_restore_tmpl() /home/smarchi/src/binutils-gdb/gdbserver/../gdbsupport/scoped_restore.h:86
	     #1 0x55bcbfa2ffe9 in post_fork_inferior(int, char const*) /home/smarchi/src/binutils-gdb/gdbserver/fork-child.cc:120
	     #2 0x55bcbf9c9199 in linux_process_target::create_inferior(char const*, std::__debug::vector<char*, std::allocator<char*> > const&) /home/smarchi/src/binutils-gdb/gdbserver/linux-low.cc:991
	     #3 0x55bcbf954549 in captured_main /home/smarchi/src/binutils-gdb/gdbserver/server.cc:3941
	     #4 0x55bcbf9552f0 in main /home/smarchi/src/binutils-gdb/gdbserver/server.cc:4084
	     #5 0x7ff9d663b0b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x240b2)
	     #6 0x55bcbf8ef2bd in _start (/home/smarchi/build/binutils-gdb/gdbserver/gdbserver+0x1352bd)

	 0x60f0000000e9 is located 169 bytes inside of 176-byte region [0x60f000000040,0x60f0000000f0)
	 freed by thread T0 here:
	     #0 0x7ff9d6c6f0c7 in operator delete(void*) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:160
	     #1 0x55bcbf910d00 in remove_process(process_info*) /home/smarchi/src/binutils-gdb/gdbserver/inferiors.cc:164
	     #2 0x55bcbf9c4ac7 in linux_process_target::remove_linux_process(process_info*) /home/smarchi/src/binutils-gdb/gdbserver/linux-low.cc:454
	     #3 0x55bcbf9cdaa6 in linux_process_target::mourn(process_info*) /home/smarchi/src/binutils-gdb/gdbserver/linux-low.cc:1599
	     #4 0x55bcbf988dc4 in target_mourn_inferior(ptid_t) /home/smarchi/src/binutils-gdb/gdbserver/target.cc:205
	     #5 0x55bcbfa32020 in startup_inferior(process_stratum_target*, int, int, target_waitstatus*, ptid_t*) /home/smarchi/src/binutils-gdb/gdbserver/../gdb/nat/fork-inferior.c:515
	     #6 0x55bcbfa2fdeb in post_fork_inferior(int, char const*) /home/smarchi/src/binutils-gdb/gdbserver/fork-child.cc:111
	     #7 0x55bcbf9c9199 in linux_process_target::create_inferior(char const*, std::__debug::vector<char*, std::allocator<char*> > const&) /home/smarchi/src/binutils-gdb/gdbserver/linux-low.cc:991
	     #8 0x55bcbf954549 in captured_main /home/smarchi/src/binutils-gdb/gdbserver/server.cc:3941
	     #9 0x55bcbf9552f0 in main /home/smarchi/src/binutils-gdb/gdbserver/server.cc:4084
	     #10 0x7ff9d663b0b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x240b2)

	 previously allocated by thread T0 here:
	     #0 0x7ff9d6c6e5a7 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:99
	     #1 0x55bcbf910ad0 in add_process(int, int) /home/smarchi/src/binutils-gdb/gdbserver/inferiors.cc:144
	     #2 0x55bcbf9c477d in linux_process_target::add_linux_process_no_mem_file(int, int) /home/smarchi/src/binutils-gdb/gdbserver/linux-low.cc:425
	     #3 0x55bcbf9c8f4c in linux_process_target::create_inferior(char const*, std::__debug::vector<char*, std::allocator<char*> > const&) /home/smarchi/src/binutils-gdb/gdbserver/linux-low.cc:985
	     #4 0x55bcbf954549 in captured_main /home/smarchi/src/binutils-gdb/gdbserver/server.cc:3941
	     #5 0x55bcbf9552f0 in main /home/smarchi/src/binutils-gdb/gdbserver/server.cc:4084
	     #6 0x7ff9d663b0b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x240b2)

	Above we see that in the non-existing-program case, the process gets
	deleted before the starting_up flag gets restored to false.

	This happens because startup_inferior calls target_mourn_inferior
	before throwing an error, and in GDBserver, unlike in GDB, mourning
	deletes the process.

	Fix this by not using a scoped_restore to manage the starting_up flag,
	since we should only clear it when startup_inferior doesn't throw.

	Change-Id: I67325d6f81c64de4e89e20e4ec4556f57eac7f6c

2022-06-29  Maciej W. Rozycki  <macro@embecosm.com>

	GDB/testsuite: Tighten `set print elements' error check
	Match the whole error message expected to be given rather than omitting
	the part about the "unlimited" keyword.  There's no point in omitting
	the missing part first, and second with an upcoming change the part in
	parentheses will no longer be a fixed string, so doing a full match will
	ensure the algorithm correctly builds the message expected here.  Also
	avoid any wildcard matches.

2022-06-29  Maciej W. Rozycki  <macro@embecosm.com>

	GDB: Remove extraneous full stops from `set' command error messages
	With errors given for bad commands such as `set annotate' or `set width'
	we produce an extraneous full stop within parentheses:

	(gdb) set annotate
	Argument required (integer to set it to.).
	(gdb) set width
	Argument required (integer to set it to, or "unlimited".).
	(gdb)

	This is grammatically incorrect, so remove the full stop and adjust the
	testsuite accordingly.

2022-06-29  Andrew Burgess  <aburgess@redhat.com>

	gdb/doc: improve description of --data-disassemble opcodes output
	Extend the description of the MI command --data-disassemble.
	Specifically, expand the description of the 'opcodes' field to explain
	how the bytes are formatted.

2022-06-29  Yvan Roux  <yvan.roux@foss.st.com>

	gdb/arm: Only stack S16..S31 when FPU registers are secure
	The FPCCR.TS bit is used to identify if FPU registers are considered
	non-secure or secure.  If they are secure, then callee saved registers
	(S16 to S31) are stacked on exception entry or otherwise skipped.

2022-06-29  Andrew Burgess  <aburgess@redhat.com>

	opcodes/aarch64: split off creation of comment text in disassembler
	The function aarch64_print_operand (aarch64-opc.c) is responsible for
	converting an instruction operand into the textual representation of
	that operand.

	In some cases, a comment is included in the operand representation,
	though this (currently) only happens for the last operand of the
	instruction.

	In a future commit I would like to enable the new libopcodes styling
	for AArch64, this will allow objdump and GDB[1] to syntax highlight
	the disassembler output, however, having operands and comments
	combined in a single string like this makes such styling harder.

	In this commit, I propose to extend aarch64_print_operand to take a
	second buffer.  Any comments for the instruction are written into this
	extra buffer.  The two callers of aarch64_print_operand are then
	updated to pass an extra buffer, and print any resulting comment.

	In this commit no styling is added, that will come later.  However, I
	have adjusted the output slightly.  Before this commit some comments
	would be separated from the instruction operands with a tab character,
	while in other cases the comment was separated with two single spaces.

	After this commit I use a single tab character in all cases.  This
	means a few test cases needed updated.  If people would prefer me to
	move everyone to use the two spaces, then just let me know.  Or maybe
	there was a good reason why we used a mix of styles, I could probably
	figure out a way to maintain the old output exactly if that is
	critical.

	Other than that, there should be no user visible changes after this
	commit.

	[1] GDB patches have not been merged yet, but have been posted to the
	GDB mailing list:
	https://sourceware.org/pipermail/gdb-patches/2022-June/190142.html

2022-06-29  Carl Love  <cel@us.ibm.com>
	    Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: fix gdb.base/break-idempotent.exp on ppc
	When running the gdb.base/break-idempotent.exp test on ppc, I was
	seeing some test failures (or rather errors), that looked like this:

	  (gdb) watch local
	  Hardware watchpoint 2: local

	  has_hw_wp_support: Hardware watchpoint detected
	  ERROR: no fileid for gcc2-power8
	  ERROR: Couldn't send delete breakpoints to GDB.
	  ERROR OCCURED: can't read "gdb_spawn_id": no such variable
	      while executing
	  "expect {
	  -i 1000 -timeout 100
	          -re ".*A problem internal to GDB has been detected" {
	              fail "$message (GDB internal error)"
	              gdb_internal_erro..."
	      ("uplevel" body line 1)
	      invoked from within

	What happens is that in break-idempotent.exp we basically do this:

	    if {[prepare_for_testing "failed to prepare" $binfile $srcfile $opts]} {
	        continue
	    }

	    # ....

	    if {![skip_hw_watchpoint_tests]} {
	        test_break $always_inserted "watch"
	    }

	The problem with this is that skip_hw_watchpoint_tests, includes this:

	    if { [istarget "i?86-*-*"]
		 || [istarget "x86_64-*-*"]
		 || [istarget "ia64-*-*"]
		 || [istarget "arm*-*-*"]
		 || [istarget "aarch64*-*-*"]
		 || ([istarget "powerpc*-*-linux*"] && [has_hw_wp_support])
		 || [istarget "s390*-*-*"] } {
		return 0
	    }

	For powerpc only we call has_hw_wp_support.  This is a caching proc
	that runs a test within GDB to detect if we have hardware watchpoint
	support or not.

	Unfortunately, to run this test we restart GDB, and when the test has
	completed, we exit GDB.  This means that in break-idempotent.exp, when
	we call skip_hw_watchpoint_tests for the first time on powerpc, GDB
	will unexpectedly be exited.  When we later call delete_breakpoints we
	see the errors I reported above.

	The fix is to call skip_hw_watchpoint_tests early, before we start GDB
	as part of the break-idempotent.exp script, and store the result in a
	variable, we can then check this variable in the script as needed.

	After this change break-idempotent.exp runs fine on powerpc.

2022-06-29  Jan Beulich  <jbeulich@suse.com>

	x86: drop stray NoRex64 from XBEGIN
	Presumably this being there was a result of taking CALL as a reference
	when adding the RTM insns. But with No_qSuf the attribute has no effect.

2022-06-29  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: fix build when BUILD_MAN is false
	gprofng/ChangeLog
	2022-06-28  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		PR gprofng/29131
		* gp-display-html/Makefile.am: Set man_MANS only when BUILD_MAN is true.
		* src/Makefile.am: Likewise.
		* gp-display-html/Makefile.in: Rebuild.
		* src/Makefile.in: Rebuild.

2022-06-29  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: use $(sysconfdir) instead $(prefix)/etc
	gprofng/ChangeLog
	2022-06-28  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		PR gprofng/29191
		* src/Makefile.am: Use $(sysconfdir) instead $(prefix)/etc.
		* src/Settings.cc: Likewise.
		* src/Makefile.in: Rebuild.

2022-06-29  Alan Modra  <amodra@gmail.com>

	Re: ld/x86: skip p_align-1 tests with unsuitable compiler
	commit d0e0f9c87a3e results "ERROR: i586-linux-cc does not exist" if
	cross-building an i586-linux target without a target compiler
	installed.

		* testsuite/ld-elf/linux-x86.exp (compiler_honours_aligned): New.
		Use it after first testing check_compiler_available.

2022-06-29  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-28  Pedro Alves  <pedro@palves.net>

	gdb+gdbserver/Linux: avoid reading registers while going through shell
	For every stop, Linux GDB and GDBserver save the stopped thread's PC,
	in lwp->stop_pc.  This is done in save_stop_reason, in both
	gdb/linux-nat.c and gdbserver/linux-low.cc.  However, while we're
	going through the shell after "run", in startup_inferior, we shouldn't
	be reading registers, as we haven't yet determined the target's
	architecture -- the shell's architecture may not even be the same as
	the final inferior's.

	In gdb/linux-nat.c, lwp->stop_pc is only needed when the thread has
	stopped for a breakpoint, and since when going through the shell, no
	breakpoint is going to hit, we could simply teach save_stop_reason to
	only record the stop pc when the thread stopped for a breakpoint.

	However, in gdbserver/linux-low.cc, lwp->stop_pc is used in more cases
	than breakpoint hits (e.g., it's used in tracepoints & the
	"while-stepping" feature).

	So to avoid GDB vs GDBserver divergence, we apply the same approach to
	both implementations.

	We set a flag in the inferior (process in GDBserver) whenever it is
	being nursed through the shell, and when that flag is set,
	save_stop_reason bails out early.  While going through the shell,
	we'll only ever get process exits (normal or signalled), random
	signals, and exec events, so nothing is lost.

	Change-Id: If0f01831514d3a74d17efd102875de7d2c6401ad

2022-06-28  Tom de Vries  <tdevries@suse.de>

	[gdb/build] Fix gdb build with -fsanitize=thread and gcc 7
	When building gdb with system gcc 7.5.0, I run into:
	...
	gdb/ia64-tdep.c: In function ‘int is_float_or_hfa_type_recurse(type*, type**)’:
	gdb/ia64-tdep.c:3362:1: error: control reaches end of non-void function \
	  [-Werror=return-type]
	...

	This is due to PR gcc/81275 - "-fsanitize=thread produce incorrect
	-Wreturn-type warning", which has been fixed in gcc-8.

	Work around this by moving the default return outside the switch.

	Tested on x86_64-linux.

2022-06-28  Clément Chigot  <chigot@adacore.com>

	bfd: handle codepage when opening files on MinGW
	Even if MS docs say that CP_UTF8 should always be used on newer
	applications, forcing it might produce undefined filename if the
	encoding isn't UTF-8.
	MinGW seems to call ___lc_codepage_func() in order to retrieve the
	current thread codepage.

	bfd/ChangeLog:

	        * bfdio.c (_bfd_real_fopen): Retrieve codepage with
	        ___lc_codepage_func() on MinGW.

2022-06-28  Clément Chigot  <chigot@adacore.com>

	windres: add quotes around preprocessor cmd if needed
	This patch ensures that the gcc binary called by windres is quoted if
	needed. Otherwise, errors can occur if the gcc is under a folder having
	a name containing a space (eg "Program Files").

	binutils/
		* resrc.c (DEFAULT_PREPROCESSOR): Split into...
		(DEFAULT_PREPROCESSOR_CMD): that...
		(DEFAULT_PREPROCESSOR_ARGS): and that.
		(look_for_default): Add quotes around the command if needed.
		(read_rc_file): Adapt to new defines.

2022-06-28  Nick Clifton  <nickc@redhat.com>

	Fix the display of the idnex values for DW_FORM_loclistx and DW_FORM_rnglistx.  Correct the display of .debug.loclists sections.
		PR 29267
		* dwarf.c (display_debug_rnglists): New function, broken out of..
		(display_debug_ranges): ... here.
		(read_and_display_attr_value): Correct calculation of index
		displayed for DW_FORM_loclistx and DW_FORM_rnglistx.
		* testsuite/binutils-all/x86-64/pr26808.dump: Update expected
		output.

2022-06-28  Jan Beulich  <jbeulich@suse.com>

	ld/x86: skip p_align-1 tests with unsuitable compiler
	When the compiler doesn't properly arrange for foo's alignment, there's
	no point even trying these tests. Report the situation as a single
	"unsupported" test.

2022-06-28  Alan Modra  <amodra@gmail.com>

	PowerPC64: align plt_branch stubs
	plt_branch stubs are similar to plt_call stubs in that they branch
	via bctr.  Align them too.

	bfd/
		* elf64-ppc.c (ppc_size_one_stub): Align plt_branch stubs as for
		plt_call stubs.
	ld/
		* testsuite/ld-powerpc/elfv2exe.d: Adjust for plt_branch changes.
		* testsuite/ld-powerpc/notoc.d: Likewise.
		* testsuite/ld-powerpc/notoc.wf: Likewise.
		* testsuite/ld-powerpc/notoc3.d: Likewise.
		* testsuite/ld-powerpc/pr23937.d: Likewise.

2022-06-28  Alan Modra  <amodra@gmail.com>

	PowerPC64: plt_stub_pad
		* elf64-ppc.c (plt_stub_pad): Simplify parameters and untangle
		from plt_stub_size.
		(ppc_size_one_stub): Call plt_stub_size before plt_stub_pad to
		provide size.  Recalculate size if it might change.

2022-06-28  Alan Modra  <amodra@gmail.com>

	PowerPC64: Tidy stub type changes
	It made sense before I started using separate fields for main type and
	sub type to add a difference in main type to the type (thus keeping
	sub type unchanged).  Not so much now.

		* elf64-ppc.c (ppc_merge_stub): Simplify stub type change.
		(ppc_size_one_stub): Likewise.

2022-06-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>

	gdb:csky add pseudo regs for float and vector regs
	In the existing CSKY architecture, there are at most 32 floating
	and 16 vector registers. Float registers's count can be configured
	as 16 or 32. In the future, the vector registers's count may be
	extended to 32.

	The bit width of floating-point register is 64bits, and the bit
	width of vector register is 128bit.

	Special points: in fr0~fr15 and vr0~vr15, each FRx is the lower
	64 bits of the corresponding VRx.

	Here, we will split each floating-point and vector register to
	32bits wide, add the corresponding pseudo registers, and finally
	use them for the dwarf registers.

	There are 128 pseudo registers in total, s0~s127, including:
	1. s0 and s1 correspond to fr0, s4 and s5 correspond to fr1, and so on.
	Every two separated pseudo registers correspond to a float register.
	2. s0, s1, s2 and s3 correspond to vr0; s4, s5, s6 and s7 correspond to vr1,
	and so on. Every four pseudo registers corresponds to a vector register.

	Therefore, in s64~s127, there are general registers that are not actually
	used. This part is to prepare for the expansion of vector registers to 32

	Therefore, in s64~s127, half of the registers are actually unused. This
	part is to prepare for the expansion of the vector register to 32.

2022-06-28  Pekka Seppänen  <pexu@sourceware.mail.kapsi.fi>

	PR29293, elfnn-aarch64.c: def_protected member unintialized
		PR 29293
		* elfnn-aarch64.c (elfNN_aarch64_link_hash_newfunc): Init def_protected.

2022-06-28  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Add 'Sstc' extension and its CSRs
	This commit adds "stimecmp / vstimecmp" Extension (Sstc) and its CSRs.

	bfd/ChangeLog:

		* elfxx-riscv.c (riscv_supported_std_s_ext): Add 'Sstc'
		extension to valid 'S' extension list.

	gas/ChangeLog:

		* config/tc-riscv.c (enum riscv_csr_class): Add CSR classes for
		'Sstc' extension. (riscv_csr_address): Add handling for new CSR
		classes.
		* testsuite/gas/riscv/csr-dw-regnums.s: Add new CSRs.
		* testsuite/gas/riscv/csr-dw-regnums.d: Likewise.
		* testsuite/gas/riscv/csr.s: Add new CSRs.
		* testsuite/gas/riscv/csr-version-1p9p1.d: Likewise.
		* testsuite/gas/riscv/csr-version-1p9p1.l: Likewise.
		* testsuite/gas/riscv/csr-version-1p10.d: Likewise.
		* testsuite/gas/riscv/csr-version-1p10.l: Likewise.
		* testsuite/gas/riscv/csr-version-1p11.d: Likewise.
		* testsuite/gas/riscv/csr-version-1p11.l: Likewise.
		* testsuite/gas/riscv/csr-version-1p12.d: Likewise.
		* testsuite/gas/riscv/csr-version-1p12.l: Likewise.

	include/ChangeLog:

		* opcode/riscv-opc.h (CSR_STIMECMP, CSR_STIMECMPH,
		CSR_VSTIMECMP, CSR_VSTIMECMPH): New CSR macros.

2022-06-28  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Add 'Sscofpmf' extension with its CSRs
	This commit adds Count Overflow and Mode-Based Filtering Extension
	(Sscofpmf) and its CSRs.

	bfd/ChangeLog:

		* elfxx-riscv.c (riscv_supported_std_s_ext): Add 'Sscofpmf'
		extension to valid 'S' extension list.

	gas/ChangeLog:

		* config/tc-riscv.c (enum riscv_csr_class): Add CSR classes for
		'Sscofpmf' extension. (riscv_csr_address): Add handling for new
		CSR classes.
		* testsuite/gas/riscv/csr-dw-regnums.s: Add new CSRs.
		* testsuite/gas/riscv/csr-dw-regnums.d: Likewise.
		* testsuite/gas/riscv/csr.s: Add new CSRs.
		* testsuite/gas/riscv/csr-version-1p9p1.d: Likewise.
		* testsuite/gas/riscv/csr-version-1p9p1.l: Likewise.
		* testsuite/gas/riscv/csr-version-1p10.d: Likewise.
		* testsuite/gas/riscv/csr-version-1p10.l: Likewise.
		* testsuite/gas/riscv/csr-version-1p11.d: Likewise.
		* testsuite/gas/riscv/csr-version-1p11.l: Likewise.
		* testsuite/gas/riscv/csr-version-1p12.d: Likewise.
		* testsuite/gas/riscv/csr-version-1p12.l: Likewise.

	include/ChangeLog:

		* opcode/riscv-opc.h (CSR_SCOUNTOVF, CSR_MHPMEVENT3H,
		CSR_MHPMEVENT4H, CSR_MHPMEVENT5H, CSR_MHPMEVENT6H,
		CSR_MHPMEVENT7H, CSR_MHPMEVENT8H, CSR_MHPMEVENT9H,
		CSR_MHPMEVENT10H, CSR_MHPMEVENT11H, CSR_MHPMEVENT12H,
		CSR_MHPMEVENT13H, CSR_MHPMEVENT14H, CSR_MHPMEVENT15H,
		CSR_MHPMEVENT16H, CSR_MHPMEVENT17H, CSR_MHPMEVENT18H,
		CSR_MHPMEVENT19H, CSR_MHPMEVENT20H, CSR_MHPMEVENT21H,
		CSR_MHPMEVENT22H, CSR_MHPMEVENT23H, CSR_MHPMEVENT24H,
		CSR_MHPMEVENT25H, CSR_MHPMEVENT26H, CSR_MHPMEVENT27H,
		CSR_MHPMEVENT28H, CSR_MHPMEVENT29H, CSR_MHPMEVENT30H,
		CSR_MHPMEVENT31H): New CSR macros.

2022-06-28  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Add 'Smstateen' extension and its CSRs
	This commit adds State Enable Extension (Smstateen) and its CSRs.

	bfd/ChangeLog:

		* elfxx-riscv.c (riscv_supported_std_s_ext): Add 'Smstateen'
		extension to valid 'S' extension list.

	gas/ChangeLog:

		* config/tc-riscv.c (enum riscv_csr_class): Add CSR classes for
		'Smstateen' extension. (riscv_csr_address): Add handling for
		new CSR classes.
		* testsuite/gas/riscv/csr-dw-regnums.s: Add new CSRs.
		* testsuite/gas/riscv/csr-dw-regnums.d: Likewise.
		* testsuite/gas/riscv/csr.s: Add new CSRs.
		* testsuite/gas/riscv/csr-version-1p9p1.d: Likewise.
		* testsuite/gas/riscv/csr-version-1p9p1.l: Likewise.
		* testsuite/gas/riscv/csr-version-1p10.d: Likewise.
		* testsuite/gas/riscv/csr-version-1p10.l: Likewise.
		* testsuite/gas/riscv/csr-version-1p11.d: Likewise.
		* testsuite/gas/riscv/csr-version-1p11.l: Likewise.
		* testsuite/gas/riscv/csr-version-1p12.d: Likewise.
		* testsuite/gas/riscv/csr-version-1p12.l: Likewise.

	include/ChangeLog:

		* opcode/riscv-opc.h (CSR_MSTATEEN0, CSR_MSTATEEN1,
		CSR_MSTATEEN2, CSR_MSTATEEN3, CSR_SSTATEEN0, CSR_SSTATEEN1,
		CSR_SSTATEEN2, CSR_SSTATEEN3, CSR_HSTATEEN0, CSR_HSTATEEN1,
		CSR_HSTATEEN2, CSR_HSTATEEN3, CSR_MSTATEEN0H, CSR_MSTATEEN1H,
		CSR_MSTATEEN2H, CSR_MSTATEEN3H, CSR_HSTATEEN0H, CSR_HSTATEEN1H,
		CSR_HSTATEEN2H, CSR_HSTATEEN3H): New CSR macros.

2022-06-28  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Add new CSR feature gate handling (RV32,H)
	To support feature gate like Smstateen && H, this commit adds certain
	CSR feature gate handling.  It also changes how RV32-only CSRs are
	handled for cleanliness.

	gas/ChangeLog:

		* config/tc-riscv.c (riscv_csr_address): Add CSR feature gate
		handling for H.  Change handling on RV32.

2022-06-28  Alan Modra  <amodra@gmail.com>

	Re: Disable execstack and rwx segments warnings for MIPS targets.
		PR 29263
		* configure.ac: Fix typo.
		* testsuite/ld-elf/elf.exp: Add mips to targets that need
		--warn-execstack to pass first pr29072 test.

2022-06-28  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-27  Bruno Larsen  <blarsen@redhat.com>

	gdb/testsuite: update bug numbers from Gnats to bugzilla
	Some tests link to outdated bug numbers when an XFAIL or a KFAIL happen.

	gdb.base/macscp.exp was referencing bug number 555, and the bug 7660
	mentions that it used to be 555 on the Gnats system and seems to relate
	to the issue at hand.

	gdb.base/annota1.exp was referencing bug number 1270, and bug 8375
	mentions being number 1270 on Gnats, and mentions annota1 specifically,
	so it seemed pretty obvious.

2022-06-27  Tom de Vries  <tdevries@suse.de>

	[gdb/build] Fix build breaker with --enable-shared
	When building gdb with --enable-shared, I run into:
	...
	ld: build/zlib/libz.a(libz_a-inffast.o): relocation R_X86_64_32S against \
	  `.rodata' can not be used when making a shared object; recompile with -fPIC
	ld: build/zlib/libz.a(libz_a-inflate.o): warning: relocation against \
	  `inflateResetKeep' in read-only section `.text'
	collect2: error: ld returned 1 exit status
	make[3]: *** [libbfd.la] Error 1
	...

	This is a regression since commit a08bdb159bb ("[gdb/build] Fix gdbserver
	build with -fsanitize=thread").

	The problem is that a single case statement in configure is shared to handle
	special requirements for both the host libiberty and host zlib, which has the
	effect that only one is handled.

	Fix this by handling libiberty and zlib each in its own case statement.

	Build on x86_64-linux, with and without --enable-shared.

	ChangeLog:

	2022-06-27  Tom de Vries  <tdevries@suse.de>

		* configure.ac: Set extra_host_libiberty_configure_flags and
		extra_host_zlib_configure_flags in separate case statements.
		* configure: Regenerate.

2022-06-27  Pedro Alves  <pedro@palves.net>

	Make GDBserver abort on internal error in development mode
	Currently, if GDBserver hits some internal assertion, it exits with
	error status, instead of aborting.  This makes it harder to debug
	GDBserver, as you can't just debug a core file if GDBserver fails an
	assertion.  I've had to hack the code to make GDBserver abort to debug
	something several times before.

	I believe the reason it exits instead of aborting, is to prevent
	potentially littering the filesystem of smaller embedded targets with
	core files.  I think I recall Daniel Jacobowitz once saying that many
	years ago, but I can't be sure.  Anyhow, that seems reasonable to me.

	Since we nowadays have a distinction between development and release
	modes, I propose to make GDBserver abort on internal error if in
	development mode, while keeping the status quo when in release mode.

	Thus, after this patch, in development mode, you get:

	 $ ../gdbserver/gdbserver
	 ../../src/gdbserver/server.cc:3711: A problem internal to GDBserver has been detected.
	 captured_main: Assertion `0' failed.
	 Aborted (core dumped)
	 $

	while in release mode, you'll continue to get:

	 $ ../gdbserver/gdbserver
	 ../../src/gdbserver/server.cc:3711: A problem internal to GDBserver has been detected.
	 captured_main: Assertion `0' failed.
	 $ echo $?
	 1

	I do not think that this requires a separate configure switch.

	A "--target_board=native-extended-gdbserver" run on Ubuntu 20.04 ends
	up with:

			 === gdb Summary ===

	 # of unexpected core files      29
	 ...

	for me, of which 8 are GDBserver core dumps, 7 more than without this
	patch.

	Change-Id: I6861e08ad71f65a0332c91ec95ca001d130b0e9d

2022-06-27  Nick Clifton  <nickc@redhat.com>

	Replace a run-time assertion failure with a warning message when parsing corrupt DWARF data.
		PR 29289
		* dwarf.c (display_debug_names): Replace assert with a warning
		message.

	Fix NULL pointer indirection when parsing corrupt DWARF data.
		PR 29290
		* dwarf.c (read_and_display_attr_value): Check that debug_info_p
		is set before dereferencing it.

	Have gold's File_read::do_read() function check the start parameter
		PR 23765
		* fileread.cc (File_read::do_read): Check start parameter before
		computing number of bytes to read.

2022-06-27  Yvan Roux  <yvan.roux@foss.st.com>

	gdb/arm: Unwind Non-Secure callbacks from Secure
	Without this changeset, the unwinding doesn't take into account
	Non-Secure to Secure stack unwinding enablement status and
	doesn't choose the proper SP to do the unwinding.

	This patch only unwinds the stack when Non-Secure to Secure
	unwinding is enabled, previous SP is set w/r to the current mode
	(Handler -> msp_s, Thread -> psp_s) and then the Secure stack is
	unwound.  Ensure thumb bit is set in PSR when needed.  Also, drop
	thumb bit from PC if set.

2022-06-27  Nick Clifton  <nickc@redhat.com>

	Stop bogus warnings about DWARF indexed string offsets being too big.
		* dwarf.c (fetch_indexed_string): Do not use length of first table
		in string section as the length of every table in the section.
		* testsuite/binutils-all/pr26112.r: Update expected output.

2022-06-27  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Handle older python in gdb.python/py-send-packet.py
	With python 3.4, I run into:
	...
	Traceback (most recent call last):^M
	  File "<string>", line 1, in <module>^M
	  File
	  "outputs/gdb.python/py-send-packet/py-send-packet.py", line 128, in \
	    run_set_global_var_test^M
	    res = conn.send_packet(b"X%x,4:\x02\x02\x02\x02" % addr)^M
	TypeError: Could not convert Python object: b'X%x,4:\x02\x02\x02\x02'.^M
	Error while executing Python code.^M
	...
	while with python 3.6 this works fine.

	The type of addr is <class 'gdb.Value'>, so the first thing to try is whether
	changing it into a string works:
	...
	    addr_str = "%x" % addr
	    res = conn.send_packet(b"X%s,4:\x02\x02\x02\x02" % addr_str)
	...
	which gets us the more detailed:
	...
	TypeError: unsupported operand type(s) for %: 'bytes' and 'str'
	...

	Fix this by avoiding the '%' operator in the byte literal, and use instead:
	...
	def xpacket_header (addr):
	    return ("X%x,4:" % addr).encode('ascii')
	  ...
	    res = conn.send_packet(xpacket_header(addr) + b"\x02\x02\x02\x02")
	...

	Tested on x86_64-linux, with python 3.4 and 3.6, and a backported version was
	tested on the gdb-12-branch in combination with python 2.7.

2022-06-27  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.reverse/i387-env-reverse.exp for -pie
	When running test-case gdb.reverse/i387-env-reverse.exp for x86_64-linux with
	target board unix/-m32/-fPIE/-pie, we run into:
	...
	(gdb) PASS: gdb.reverse/i387-env-reverse.exp: push st0
	info register eax^M
	eax            0x56550000          1448411136^M
	(gdb) FAIL: gdb.reverse/i387-env-reverse.exp: verify eax == 0x8040000
	...

	The problem is that the tested instruction (fstsw) only sets $ax, not $eax.

	Fix this by verifying $ax instead of $eax.

	Tested on x86_64-linux with target boards unix/-m32 and unix/-m32/-fPIE/-pie.

2022-06-27  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Enable some test-cases for x86_64 -m32
	When trying to run test-case gdb.reverse/i387-env-reverse.exp for x86_64-linux
	with target board unix/-m32, it's skipped.

	Fix this by using is_x86_like_target instead of istarget "i?86-*linux*".

	This exposes a number of duplicates, fix those by making the test names unique.

	Likewise in a couple of other test-cases.

	Tested on x86_64-linux with target boards unix/-m32.

2022-06-27  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Workaround unnecessary .s file with gfortran 4.8
	After running test-case gdb.fortran/namelist.exp with gfortran 4.8.5, I'm left
	with:
	...
	$ git sti
	On branch master
	Your branch is up to date with 'origin/master'.

	Untracked files:
	  (use "git add <file>..." to include in what will be committed)
	        gdb/testsuite/lib/compiler.s

	nothing added to commit but untracked files present (use "git add" to track)
	...

	We're running into PR gcc/60447, which was fixed in gcc 4.9.0.

	Workaround this by first copying the source file to the temp dir, such that
	the .s file is left there instead:
	...
	$ ls build/gdb/testsuite/temp/<runtest pid>/
	compiler.c  compiler.F90  compiler.s
	...

	Tested on x86_64-linux.

2022-06-27  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Skip gdb.fortran/namelist.exp for gfortran 4.8
	The test-case gdb.fortran/namelist.exp uses a gfortran feature (emitting
	DW_TAG_namelist in the debug info) that has been supported since gfortran 4.9,
	see PR gcc/37132.

	Skip the test for gfortran 4.8 and earlier.  Do this using gcc_major_version,
	and update it to be able to handle "gcc_major_version {gfortran-*} f90".

	Tested on x86_64-linux, with gfortran 4.8.5, 7.5.0, and 12.1.1.

2022-06-27  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Fix parsing of .debug_str_offsets header
	When running test-case gdb.dwarf2/fission-mix.exp with target board dwarf64
	and gcc-12 (defaulting to DWARF5), I run into:
	...
	(gdb) break func2^M
	Offset from DW_FORM_GNU_str_index or DW_FORM_strx pointing outside of \
	  .debug_str.dwo section in CU at offset 0x0 [in module fission-mix]^M
	(gdb) FAIL: gdb.dwarf2/fission-mix.exp: break func2
	...

	The .debug_str_offsets section has version 5, so as per the standard it has
	it's own header, with initial length and version:
	...
	Contents of the .debug_str_offsets.dwo section (loaded from fission-mix2.dwo):

	    Length: 0x1c
	    Version: 0x5
	       Index   Offset [String]
	           0        0 build/gdb/testsuite
	           1       33 GNU C17
	           2       8f src/gdb/testsuite/gdb.dwarf2/fission-mix-2.c
	...

	But when trying to read the string offset at index 0 in the table (which
	is 0), we start reading at offset 8, which points in the header, at the last
	4 bytes of the initial length (it's 12 bytes because of 64-bit dwarf), as well
	at the 2-byte version field and 2 bytes of padding, so we get:
	...
	(gdb) p /x str_offset
	$1 = 0x500000000
	...
	which indeed is an offset that doesn't fit in the .debug_str section.

	The offset 8 is based on reader->cu->header.addr_size:
	...
	static const char *
	read_dwo_str_index (const struct die_reader_specs *reader, ULONGEST str_index)
	{
	 ULONGEST str_offsets_base = reader->cu->header.version >= 5
	                             ? reader->cu->header.addr_size : 0;
	...
	which doesn't in look in agreement with the standard.

	Note that this happens to give the right answer for 32-bit dwarf and
	addr_size == 8, because then we have header size ==
	(initial length (4) + version (2) + padding (2)) == 8.

	Conversely, for 32-bit dwarf and addr_size == 4 (target board unix/-m32)
	we run into a similar problem.  It just happens to not trigger the warning,
	instead we get the wrong strings, like "func2" for DW_AT_producer and
	"build/gdb/testsuite" for DW_AT_name of the DW_TAG_compile_unit DIE.

	Fix this by parsing the .debug_str_offsets header in read_dwo_str_index.

	Add a FIXME that we should not parse this for every call.

	Tested on x86_64-linux.

2022-06-27  Tom de Vries  <tdevries@suse.de>

	[gdb/build] Fix gdbserver build with -fsanitize=thread
	[ Copied from gcc commit 153689603fd ("[gdb/build] Fix gdbserver build with
	-fsanitize=thread"). ]

	When building gdbserver with -fsanitize=thread (added to CFLAGS/CXXFLAGS) we
	run into:
	...
	ld: ../libiberty/libiberty.a(safe-ctype.o): warning: relocation against \
	  `__tsan_init' in read-only section `.text'
	ld: ../libiberty/libiberty.a(safe-ctype.o): relocation R_X86_64_PC32 \
	  against symbol `__tsan_init' can not be used when making a shared object; \
	  recompile with -fPIC
	ld: final link failed: bad value
	collect2: error: ld returned 1 exit status
	make[1]: *** [libinproctrace.so] Error 1
	...
	which looks similar to what is described in commit 78e49486944 ("[gdb/build]
	Fix gdbserver build with -fsanitize=address").

	The gdbserver component builds a shared library libinproctrace.so, which uses
	libiberty and therefore requires the pic variant.  The gdbserver Makefile is
	setup to use this variant, if available, but it's not there.

	Fix this by listing gdbserver in the toplevel configure alongside libcc1, as a
	component that needs the libiberty pic variant, setting:
	...
	extra_host_libiberty_configure_flags=--enable-shared
	...

	Tested on x86_64-linux.

	ChangeLog:

	2022-06-27  Tom de Vries  <tdevries@suse.de>

		* configure.ac: Build libiberty pic variant for gdbserver.
		* configure: Regenerate.

2022-06-27  Nick Clifton  <nickc@redhat.com>

	Disable execstack and rwx segments warnings for MIPS targets.
		PR 29263
		* configure.ac: Move HPPA specific code from here...
		* configure.tgt: ... to here.  Add similar code for MIPS.
		Move code for CRIS, MIPS and HPPA to block at start of file.
		* configure: Regenerate.

2022-06-27  Jan Beulich  <jbeulich@suse.com>

	bfd: prune config.bfd's setting of targ_archs
	The final "match all" case can take care of a few explicit entries:
	Purge those. Also move s12z* into proper position (the table is
	otherwise sorted, after all).

2022-06-27  Jan Beulich  <jbeulich@suse.com>

	drop XC16x bits
	Commit 04f096fb9e25 ("Move the xc16x target to the obsolete list") moved
	the architecture from the "obsolete but still available" to the
	"obsolete / support removed" list in config.bfd, making the architecture
	impossible to enable (except maybe via "enable everything" options").

	Note that I didn't touch */po/*.po{,t} on the assumption that these
	would be updated by some (half)automatic means.

2022-06-27  Bhuvanendra Kumar N  <Bhuvanendra.KumarN@amd.com>

	Fix location list offset address dump under DW_AT_location (dwarf-5)
	For clang compiled objects with dwarf-5, location list offset address dump
	under DW_AT_location is corrected, where DW_FORM_loclistx is used. While
	dumping the location list offset, the address dumped is wrong where it was
	refering to .debug_addr instead of .debug_loclists

	      * dwarf.c (fetch_indexed_value): Add base_address as parameter and
	      use it to access the section offset.
	      (read_and_display_attr_value): Handle DW_FORM_loclistx form separately.
	      Pass loclists_base to fetch_indexed_value().

2022-06-27  Alan Modra  <amodra@gmail.com>

	PowerPC64 .branch_lt address
	.branch_lt is really an extension of .plt, as is .iplt.  We'd like all
	of the PLT sections to be fixed relative to .TOC. after stub sizing,
	because changes in offset to PLT entries might mean a change in stub
	sizes.  When -z relro, the relro layout does this by laying out
	sections from the end of the relro segment.  So for example, a change
	in .eh_frame (which happens after stub sizing) will keep the same GOT
	to PLT offset when -z relro.  Not so when -z norelro, because then the
	usual forward layout of section is done and .got is more aligned than
	.branch_lt.

		* emulparams/elf64ppc.sh: Set .branch_lt address fixed relative
		to .got.
		* testsuite/ld-powerpc/elfv2exe.d: Adjust to suit.

2022-06-27  Alan Modra  <amodra@gmail.com>

	-z relro relaxation and ld script SIZEOF
	A number of targets use assignments like:
	. = DATA_SEGMENT_RELRO_END (SIZEOF (.got.plt) >= 12 ? 12 : 0, .);
	(from i386) in linker scripts to put the end of the relro segment past
	the header in .got.plt.  Examination of testcases like those edited by
	this patch instead sees the end of the relro segment being placed at
	the start of .got.plt.  For the i386 pie1 test:

	  [ 9] .got.plt          PROGBITS        00002000 001000 00000c 04  WA  0   0  4

	  GNU_RELRO      0x000f90 0x00001f90 0x00001f90 0x00070 0x00070 R   0x1

	A map file shows:

	.dynamic        0x0000000000001f90       0x70
	 *(.dynamic)
	 .dynamic       0x0000000000001f90       0x70 tmpdir/pie1.o
	                0x0000000000001f90                _DYNAMIC

	.got            0x0000000000002000        0x0
	 *(.got)
	 .got           0x0000000000002000        0x0 tmpdir/pie1.o
	 *(.igot)
	                0x0000000000002ff4                . = DATA_SEGMENT_RELRO_END (., (SIZEOF (.got.plt) >= 0xc)?0xc:0x0)

	.got.plt        0x0000000000002000        0xc
	 *(.got.plt)
	 .got.plt       0x0000000000002000        0xc tmpdir/pie1.o
	                0x0000000000002000                _GLOBAL_OFFSET_TABLE_

	The DATA_SEGMENT_RELRO_END value in the map file is weird too.  All of
	this is triggered by SIZEOF (.got.plt) being evaluated wrongly as
	zero.  Fix it by taking into account the action of
	lang_reset_memory_regions during relaxation.

		* ldexp.c (fold_name <SIZEOF>): Use rawsize if size has been reset.
		* ldlang.c (lang_size_sections_1): Don't reset processed_vma here.
		* testsuite/ld-i386/pie1.d: Adjust to suit.
		* testsuite/ld-x86-64/pr20830a.d: Likewise.
		* testsuite/ld-x86-64/pr20830b.d: Likewise.
		* testsuite/ld-x86-64/pr21038a.d: Likewise.
		* testsuite/ld-x86-64/pr21038b.d: Likewise.
		* testsuite/ld-x86-64/pr21038c.d: Likewise.

2022-06-27  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-26  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-25  Fangrui Song  <i@maskray.me>

	arm: Define elf_backend_extern_protected_data to 0 [PR 18705]
	Similar to commit 4fb55bf6a9606eb7b626c30a9f4e71d6c2d4fbb2 for aarch64.

	Commit b68a20d6675f1360ea4db50a9835c073675b9889 changed ld to produce
	R_ARM_GLOB_DAT but that defeated the purpose of protected visibility
	as an optimization.  Restore the previous behavior (which matches
	ld.lld) by defining elf_backend_extern_protected_data to 0.

2022-06-25  Tom Tromey  <tom@tromey.com>

	Fix corrupt DWARF in dw2-double-set-die-type
	The dw2-double-set-die-type.exp test case caused an AddressSanitizer
	failure in the new DWARF scanner.

	The immediate cause was bad DWARF in the test -- in particular, the
	the sibling attribute here:

	     <2><181>: Abbrev Number: 33 (DW_TAG_subprogram)
		<182>   DW_AT_external    : 1
		<183>   DW_AT_name        : address
		<18b>   DW_AT_type        : <0x171>
		<18f>   DW_AT_declaration : 1
		<190>   DW_AT_sibling     : <0x1a1>
	    ...
	     <1><1a1>: Abbrev Number: 23 (DW_TAG_pointer_type)
		<1a2>   DW_AT_byte_size   : 4
		<1a3>   DW_AT_type        : <0x1a7>

	...points to a "sibling" DIE that is at a different child depth.

	Because this test case doesn't really require sibling attributes, this
	patch fixes the problem by removing them from the test.

	Note that gdb is not generally robust against malformed DWARF.
	Detecting and compensating for this problem would probably be
	expensive and, IMO, is better left to some (still hypothetical) DWARF
	linter.

2022-06-25  Tom Tromey  <tom@tromey.com>

	Fix end of CU calculation in cooked_indexer::index_dies
	cooked_indexer::index_dies incorrect computes the end of the current
	CU in the .debug_info.  This isn't readily testable without writing
	intentionally corrupt DWARF, but it's apparent through observation: it
	is currently based on 'info_ptr', which does not always point to the
	start of the CU.  This patch fixes the expression.  Tested on x86-64
	Fedora 34.

2022-06-25  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: LoongArch: Implement loongarch_linux_syscall_next_pc()
	When FRAME is at a syscall instruction, return the PC of the next
	instruction to be executed.

	gdb: LoongArch: Define register numbers and clean up code
	This commit defines register numbers of various important registers,
	we can use them directly in the related code, and also clean up some
	code to make them more clear and readable.

2022-06-25  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-24  Pedro Alves  <pedro@palves.net>

	Eliminate TUI/CLI observers duplication
	For historical reasons, the CLI and the TUI observers are basically
	exact duplicates, except for the downcast:

	 cli:
	       struct cli_interp *cli = as_cli_interp (interp);
	 tui:
	       struct interp *tui = as_tui_interp (interp);

	and how they get at the interpreter's ui_out:

	 cli:
	       cli->cli_uiout
	 tui:
	       tui->interp_ui_out ()

	Since interp_ui_out() is a virtual method that also works for the CLI
	interpreter, and, both the CLI and the TUI interpreters inherit from
	the same base class (cli_interp_base), we can convert the CLI
	observers to cast to cli_interp_base instead and use interp_ui_out()
	too.  With that, the CLI observers will work for the TUI interpreter
	as well.  This lets us completely eliminate the TUI observers.  That's
	what this commit does.

	Change-Id: Iaf6cf12dfa200ed3ab203a895a72b69dfedbd6e0

2022-06-24  Pedro Alves  <pedro@palves.net>

	Revert "Delete delete_thread_silent"
	Turns out we'll be gaining a new use of this function very soon, the
	incoming AMDGPU port needs it.  Let's add it back, as it isn't really
	hurting anything.

	This reverts commit 39b8a8090ed7e8967ceca3655aa5f3a2ae91219d.

2022-06-24  Yvan Roux  <yvan.roux@foss.st.com>

	gdb/arm: Update the value of active sp when base sp changes
	For Arm Cortex-M33 with security extensions, there are 4 different
	stacks pointers (msp_s, msp_ns, psp_s, psp_ns).
	When plain "sp" is updated during unwinding of the stack, the active
	stack pointer of the 4 stack pointers needs to be kept in sync.

2022-06-24  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: remove unneeded calls to get_compiler_info
	It is not necessary to call get_compiler_info before calling
	test_compiler_info, and, after recent commits that removed setting up
	the gcc_compiled, true, and false globals from get_compiler_info,
	there is now no longer any need for any test script to call
	get_compiler_info directly.

	As a result every call to get_compiler_info outside of lib/gdb.exp is
	redundant, and this commit removes them all.

	There should be no change in what is tested after this commit.

2022-06-24  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: remove global gcc_compiled from gdb.exp
	After this commit the gcc_compiled global is no longer exported from
	lib/gdb.exp.  In theory we could switch over all uses of gcc_compiled
	to instead call test_compiler_info directly, however, I have instead
	added a new proc to gdb.exp: 'is_c_compiler_gcc'.  I've then updated
	the testsuite to call this proc instead of using the global.

	Having a new proc specifically for this task means that we have a
	single consistent pattern for detecting gcc.  By wrapping this logic
	within a proc that calls test_compiler_info, rather than using the
	global, means that test scripts don't need to call get_compiler_info
	before they read the global, simply calling the new proc does
	everything in one go.

	As a result I've been able to remove the get_compiler_info calls from
	all the test scripts that I've touched in this commit.

	In some of the tests e.g. gdb.dwarf2/*.exp, the $gcc_compiled flag was
	being checked at the top of the script to decide if the whole script
	should be skipped or not.  In these cases I've called the new proc
	directly and removed all uses of gcc_compiled.

	In other cases, e.g. most of the gdb.base scripts, there were many
	uses of gcc_compiled.  In these cases I set a new global gcc_compiled
	near the top of the script, and leave the rest of the script
	unchanged.

	There should be no changes in what is tested after this commit.

2022-06-24  Pedro Alves  <pedro@palves.net>

	Include count of unexpected core files in gdb.sum summary
	If GDB, GDBserver, a testcase program, Valgrind, etc. unexpectedly
	crash while running the GDB testsuite, and you've setup your machine
	such that core files are dumped in the current directory instead of
	being shoved somewhere by abrt, apport, or similar (as you should for
	proper GDB testing), you'll end up with an unexpected core file in the
	$build/gdb/testsuite/ directory.

	It can happen that GDB, GDBserver, etc. even crashes _after_ gdb_exit,
	during teardown, and thus such a crash won't be noticed by looking at
	the gdb.sum file at all.  This commit aims at improving that, by
	including a new "unexpected core files" line in the testrun summary.

	For example, here's what I get on x86-64 Ubuntu 20.04, with this
	patch:

			 === gdb Summary ===

	 # of unexpected core files      12          << new info
	 # of expected passes            107557
	 # of unexpected failures        35
	 # of expected failures          77
	 # of unknown successes          2
	 # of known failures             114
	 # of untested testcases         31
	 # of unsupported tests          139

	I have my core pattern setup like this:

	 $ cat /proc/sys/kernel/core_pattern
	 core.%e.%p.%h.%t

	That's:

	 %e: executable filename
	 %p: pid
	 %h: hostname
	 %t: UNIX time of dump

	and so I get these core files:

	 $ ls -1 testsuite/core.*
	 testsuite/core.connect-with-no.216191.nelson.1656002431
	 testsuite/core.connect-with-no.217729.nelson.1656002431
	 testsuite/core.gdb.194247.nelson.1656002423
	 testsuite/core.gdb.226014.nelson.1656002435
	 testsuite/core.gdb.232078.nelson.1656002438
	 testsuite/core.gdb.352268.nelson.1656002441
	 testsuite/core.gdb.4152093.nelson.1656002337
	 testsuite/core.gdb.4154515.nelson.1656002338
	 testsuite/core.gdb.4156668.nelson.1656002339
	 testsuite/core.gdb.4158871.nelson.1656002341
	 testsuite/core.gdb.468495.nelson.1656002444
	 testsuite/core.vgdb.4192247.nelson.1656002366

	where we can see that GDB crashed a number of times, but also
	Valgrind's vgdb, and a couple testcase programs.  Neither of which is
	good.

	If your core_pattern is just "core" (but why??), then I guess that you
	may end up with just a single core file in testsuite/.  Still, that is
	one core file too many.

	Above, we see a couple cores for "connect-with-no", which are the
	result of gdb.server/connect-with-no-symbol-file.exp.  This is a case
	mentioned above -- while the program crashed, that happens during
	testcase teardown, and it goes unnoticed (without this commit) by
	gdb.sum results.  Vis:

	 $ make check TESTS="gdb.server/connect-with-no-symbol-file.exp"
	 ...
			 === gdb Summary ===

	 # of unexpected core files      2
	 # of expected passes            8

	 ...
	 $

	The tests fully passed, but still the testcase program crashed
	somehow:

	 $ ls -1 testsuite/core.*
	 testsuite/core.connect-with-no.941561.nelson.1656003317
	 testsuite/core.connect-with-no.941682.nelson.1656003317

	Against --target_board=native-extended-gdbserver it's even worse.  I
	get:

	 # of unexpected core files      26

	and note that when GDBserver hits an assertion failure, it exits with
	error, instead of crashing with SIGABRT.  I think that should be
	changed, at least on development builds, but that would be for another
	patch.  After such patch, I suspect the number of unexpected cores
	will be higher, as there are likely teardown GDBserver assertions that
	we're not noticing.

	I decided to put this new info in the "gdb Summary" section, as that's
	a place people already are used to looking at, either when looking at
	the tail of gdb.sum, or when diffing gdb.sum files, and we've already
	extended this section before, to include the count of DUPLICATE and
	PATH problems, so there's precedent.

	Implementation-wise, the new line is appended after DejaGnu is
	finished, with a shell script that is invoked by the Makefile.  It is
	done this way so that serial and parallel testing work the same way.
	My initial cut at an implementation was in TCL, straight in
	testsuite/lib/check-test-names.exp, where DUPLICATES and PATH are
	handled, like so:

	 @@ -148,6 +159,10 @@ namespace eval ::CheckTestNames {
		     $counts(paths,$which)
		 maybe_show_count "# of duplicate test names\t" \
		     $counts(duplicates,$which)
	 +
	 +       set cores [glob -nocomplain -directory $::objdir core*]
	 +       maybe_show_count "# of unexpected core files\t" \
	 +           [llength $cores]
	      }

	But that would only work for serial testing, as in parallel testing,
	the final gdb.sum is generated by aggregating the results of all the
	individual gdb.sum files, and dg-extract-results.sh doesn't know about
	our new summary line.  And I don't think that dg-extract-results.sh
	should be taught about it, since the count of core files is not
	something that we want to count many times, once per testcase, and
	then add up the subcounts at the end.  Every time we count the core
	files, we're already counting the final count.

	I considered using the Tcl implementation in serial mode, and the
	script approach for parallel testing, but that has the obvious
	downside of implementing and maintaining the same thing twice.  In the
	end, I settled on the script approach for serial mode too, which
	requires making the "check-single" rule print the tail end of the
	gdb.sum file, with a side effect being that if you look at the
	terminal after a run (instead of at the gdb.sum file), you'll see the
	"gdb Summary" section twice, once without the unexpected core lines
	printed, and then another with.  IMO, this isn't an issue; when
	testing in parallel mode, if you look at the terminal after "make -jN
	check", you'll also see multiple "gdb Summary" sections printed.

	Change-Id: I190b8d41856d49ad143854b6e3e6ccd7caa04491

2022-06-24  Pedro Alves  <pedro@palves.net>

	Improve core file path detection & put cores in output dir
	After a testrun, I noticed that I have some kernel-produced cores for
	testcase programs, under build/gdb/testsuite/, which shouldn't be
	there:

	 $ ls -1 testsuite/core.*
	 testsuite/core.annota1.1274351.nelson.1656004407
	 testsuite/core.annota3.1288474.nelson.1656004414
	 testsuite/core.exitsignal.1240674.nelson.1656004391

	I have my core pattern setup like this:

	 $ cat /proc/sys/kernel/core_pattern
	 core.%e.%p.%h.%t

	That's:

	 %e: executable filename
	 %p: pid
	 %h: hostname
	 %t: UNIX time of dump

	so it's easy to tell which program produced the core from the core
	file name.

	From above, we can tell that the corresponding testcases are
	gdb.base/annota1.exp, gdb.base/annota3.exp and
	gdb.base/exitsignal.exp.

	At least gdb.base/annota1.exp and gdb.base/annota3.exp have code in
	them to delete the core file.  However, that isn't working for me,
	because said code only looks for cores named exactly either "core" or
	"core.PID", and my core_pattern doesn't match that.

	Another issue I noticed, is that I have not been running
	gdb.base/bigcore.exp, for a similar reason.  I get:

	  Program terminated with signal SIGABRT, Aborted.
	  The program no longer exists.
	  (gdb) PASS: gdb.base/bigcore.exp: signal SIGABRT
	  UNTESTED: gdb.base/bigcore.exp: can't generate a core file

	But I actually have a core file under the testcase's output dir:

	 $ find . -name "core.*"
	 ./testsuite/outputs/gdb.base/bigcore/core.bigcore.2306705.nelson.1656005213
	 $

	This commit fixes these things, by adding a find_core_file routine
	that searches core files in a way that works with my core pattern as
	well.  This then also adds a convenience remove_core routine as a
	wrapper around find_core_file that removes the found core file.

	In addition, it changes some testcases that expect to have their
	program dump core, to switch the inferior's cwd to the testcase's
	output dir, so that the core is dumped there instead of in
	build/gdb/testsuite/.  Some testcases were already doing that, but not
	all.  The idea is that any core file dumped in build/gdb/testsuite/ is
	an unexpected core file.  The next patch will add a count of such
	unexpected core files to gdb.sum.

	Another change is that the directory changing is now done with "set
	cwd" instead of with "cd".  "set cwd" only affects the inferior cwd,
	while "cd" affects GDB's cwd too.  By using "set cwd" instead of "cd",
	if GDB dumps core in these testcases, the GDB core dump will still end
	up in build/gdb/testsuite/, and can thus be detected as an unexpected
	core.

	Change-Id: I45068f21ffd4814350aaa8a3cc65cad5e3107607

2022-06-24  Andrew Burgess  <aburgess@redhat.com>

	gdb: make use of RAII in run_inferior_call
	In passing I noticed that there are three local variables in
	run_inferior_call that are used to save, and then restore some state,
	I think these could all be replaced with a RAII style scoped_restore
	instead.

	Of the three locals that I've changed, the only one that I believe is
	now restored in a different location is ui::async, before this commit
	the async field was restored after a call to either delete_file_handle
	or ui_register_input_event_handler, and after this commit, the field
	is restored before these calls.  However, I don't believe that either
	of these functions depend on the value of the async field, so I
	believe the commit is fine.

	Tested on x86-64/Linux passes with no regressions.

2022-06-24  Pedro Alves  <pedro@palves.net>

	Delete delete_thread_silent
	delete_thread_silent is no longer used anywhere.  Delete it.

	Change-Id: Iafcec12339861d5ab2e29c14d7b1f884c9e11c0f

2022-06-24  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-23  Tom Tromey  <tromey@adacore.com>

	Don't declare cli_set_logging
	cli_set_logging is declared but not defined.  It's probably a leftover
	from whenever interpreters were changed to use inheritance.  This
	patch removes the declaration.  Tested by grep and rebuilding.

	Use PyBool_FromLong
	I noticed a few spots that were explicitly creating new references to
	Py_True or Py_False.  It's simpler here to use PyBool_FromLong, so
	this patch changes all the places I found.

2022-06-23  Alan Modra  <amodra@gmail.com>

	PowerPC64: fix assertion in ppc_build_one_stub with -Os code
	save_res stubs aren't written in ppc_build_one_stub, their offsets
	(which are zero) should not be checked.

		* elf64-ppc.c (ppc_build_one_stub): Don't check save_res offsets.

2022-06-23  Alan Modra  <amodra@gmail.com>

	Re: PowerPC64: stub debug dump
	Let's show the current stub as well as the previous one.  Of interest
	is the current offset and a new field, id.  Check that the build
	hash table traversal is in the same order as sizing traversal too.

		* elf64-ppc.c (struct ppc_stub_hash_entry): Add id.
		(struct ppc_link_hash_table): Add stub_id.
		(stub_hash_newfunc): Init id and symtype.
		(dump_stub): New function, extracted from..
		(dump_previous_stub): ..here.  Deleted.
		(ppc_build_one_stub): Sanity check stub id as well as offset.
		Show current stub as well as previous.
		(ppc_size_one_stub): Set stub id.
		(ppc64_elf_size_stubs): Init stub_id before traversal.
		(ppc64_elf_build_stubs): Likewise.

2022-06-23  Fangrui Song  <maskray@google.com>

	aarch64: Allow PC-relative relocations against protected STT_FUNC for -shared
	    __attribute__((visibility("protected"))) void *foo() {
	      return (void *)foo;
	    }

	gcc -fpic -shared -fuse-ld=bfd fails with the confusing diagnostic:

	    relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `foo' which may bind externally can not be used when making a shared object; recompile with -fPIC

	Call _bfd_elf_symbol_refs_local_p with local_protected==true to suppress
	the error.  The new behavior matches gold and ld.lld.

	Note: if some code tries to use direct access relocations to take the
	address of foo (likely due to -fno-pic), the pointer equality will
	break, but the error should be reported on the executable link, not on
	the innocent shared object link.  glibc 2.36 will give a warning at
	relocation resolving time.

2022-06-23  Fangrui Song  <maskray@google.com>

	aarch64: Define elf_backend_extern_protected_data to 0 [PR 18705]
	Follow-up to commit 90b7a5df152a64d2bea20beb438e8b81049a5c30
	("aarch64: Disallow copy relocations on protected data").

	Commit 32f573bcb3aaa1c9defcad79dbb5851fcc02ae2d changed ld to produce
	R_AARCH64_GLOB_DAT but that defeated the purpose of protected visibility
	as an optimization.  Restore the previous behavior (which matches
	ld.lld) by defining elf_backend_extern_protected_data to 0.

2022-06-23  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-22  Tom Tromey  <tromey@adacore.com>

	Use std::string for interpreter_p
	The global interpreter_p is a manually-managed 'char *'.  This patch
	changes it to be a std::string instead, and removes some erroneous
	comments.

	Move mi_interpreter to mi-interp.h
	I noticed that touching interps.h caused a lot of recompilation.  I
	tracked this down to mi-common.h including this file.  This patch
	moves the MI interpreter to mi-interp.h, which cuts down on
	recompilation when modifying interps.h.

	Use unique_xmalloc_ptr in interp
	This changes interp::m_name to be a unique_xmalloc_ptr, removing some
	manual memory management.  It also cleans up the initialization of the
	'inited' member, and moves the 'private:' and 'public:' keywords to
	their proper spots.

2022-06-22  Fangrui Song  <i@maskray.me>

	aarch64: Disallow copy relocations on protected data
	If an executable has copy relocations for extern protected data, that
	can only work if the shared object containing the definition is built
	with assumptions (a) the compiler emits GOT-generating relocations (b)
	the linker produces R_*_GLOB_DAT instead of R_*_RELATIVE.  Otherwise the
	shared object uses its own definition directly and the executable
	accesses a stale copy.  Note: the GOT relocations defeat the purpose of
	protected visibility as an optimization, and it turns out this never
	worked perfectly.

	glibc 2.36 will warn on copy relocations on protected data.  Let's
	produce a warning at link time, matching ld.lld which has been used on
	many aarch64 OSes.

	Note: x86 requires GNU_PROPERTY_NO_COPY_ON_PROTECTED to have the error.
	This is to largely due to GCC 5's "x86-64: Optimize access to globals in
	PIE with copy reloc" which started to use direct access relocations for
	external data symbols in -fpie mode.

	GCC's aarch64 port does not have the change.  Nowadays with most builds
	switching to -fpie/-fpic, aarch64 mostly doesn't need to worry about
	copy relocations.  So for aarch64 we simply don't check
	GNU_PROPERTY_NO_COPY_ON_PROTECTED.

2022-06-22  Kumar N, Bhuvanendra  <Kavitha.Natarajan@amd.com>

	Binutils support for split-dwarf and dwarf-5
		* dwarf.c (fetch_indexed_string): Added new parameter
		str_offsets_base to calculate the string offset.
		(read_and_display_attr_value): Read DW_AT_str_offsets_base
		attribute.
		(process_debug_info): While allocating memory and initializing
		debug_information, do it for do_debug_info also, if its true.
		(load_separate_debug_files): Load .debug_str_offsets if exists.
		* dwarf.h (struct debug_info): Add str_offsets_base field.

2022-06-22  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: Reorder the prefixed extensions which are out of order.
	This patch has been pending for almost a year...  However, I noticed that
	llvm can already re-order the extensions, even if they are out of orders.
	Not really sure if they can also re-order the single letter extensions,
	but at least we can do this for the multi-letter extensions in binutils.

	bfd/
	    * elfxx-riscv.c (riscv_parse_prefixed_ext): Removed the code which are
	    used to check the prefixed extension orders.
	gas/
	    * testsuite/gas/riscv/march-fail-order-x-z.d: Removed since we will help
	    tp reorder the prefixed extensions for now.
	    * testsuite/gas/riscv/march-fail-order-x-z.l: Likewise.
	    * testsuite/gas/riscv/march-fail-order-x.d: Likewise.
	    * testsuite/gas/riscv/march-fail-order-x.l: Likewise.
	    * testsuite/gas/riscv/march-fail-order-z.d: Likewise.
	    * testsuite/gas/riscv/march-fail-order-z.l: Likewise.

2022-06-22  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: Use single h extension to control hypervisor CSRs and instructions.
	According to the picture 28.1 in the current ISA spec, h is no larger the
	multi-letter extension, it is a single extension after v.  Therefore, this
	patch fix the implementation, and use the single h to control hypervisor
	CSRs and instructions, which we promised to do before.

	bfd/
	    * elfxx-riscv.c (riscv_supported_std_ext): Added h with version 1.0 after v.
	    (riscv_supported_std_h_ext): Removed.
	    (riscv_all_supported_ext): Updated since riscv_supported_std_h_ext is removed.
	    (riscv_prefix_ext_class): Removed RV_ISA_CLASS_H.
	    (parse_config): Updated since riscv_prefix_ext_class is removed.
	    (riscv_recognized_prefixed_ext): Likewise.
	    (riscv_get_default_ext_version): Likewise.
	    (riscv_multi_subset_supports): Handle INSN_CLASS_H for hypervisor instructions.
	    (riscv_multi_subset_supports_ext): Likewise.
	gas/
	    * config/tc-riscv.c (riscv_csr_class): Added CSR_CLASS_H and CSR_CLASS_H_32 for
	    hypervisor CSRs.
	    (riscv_csr_address): Likewise.
	    * testsuite/gas/riscv/csr-version-1p10.d: Updated since hypervisor CSRs are
	    controlled by single h extension for now.
	    * testsuite/gas/riscv/csr-version-1p10.l: Likewise.
	    * testsuite/gas/riscv/csr-version-1p11.d: Likewise.
	    * testsuite/gas/riscv/csr-version-1p11.l: Likewise.
	    * testsuite/gas/riscv/csr-version-1p12.d: Likewise.
	    * testsuite/gas/riscv/csr-version-1p12.l: Likewise.
	    * testsuite/gas/riscv/csr-version-1p9p1.d: Likewise.
	    * testsuite/gas/riscv/csr-version-1p9p1.l: Likewise.
	    * testsuite/gas/riscv/h-ext-32.d: Added h to architecture string.
	    * testsuite/gas/riscv/h-ext-64.d: Likewise.
	    * testsuite/gas/riscv/march-fail-single-prefix-h: Removed since h is no
	    longer multi-letter extension.
	    * testsuite/gas/riscv/march-fail-unknown-h.d: Likewise.
	include/
	    * opcode/riscv-opc.h: Control hypervisor CSRs by h extension, rather than
	    the privileged spec verisons.
	    * opcode/riscv.h (riscv_insn_class): Added INSN_CLASS_H.
	opcodes/
	    * riscv-opc.c (riscv_opcodes): Control hypervisor instructions by h extension.

2022-06-22  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Add 'H' to canonical extension ordering
	This commit adds 'H' to canonical extension ordering based on current
	consensus (not officially ratified as a new ISA specification manual
	but discussion for software compatibility is made).

	bfd/ChangeLog

		* elfxx-riscv.c (riscv_ext_canonical_order): Add 'H' for
		canonical extension ordering based on current consensus.

2022-06-22  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Prepare i18n for required ISA extensions
	Some strings returned by the riscv_multi_subset_supports_ext function
	contain not just extension names but words like "and" and "or".
	This commit wraps such strings with the gettext macro (_) for
	internationalization in the future.

	bfd/ChangeLog:

		* elfxx-riscv.c (riscv_multi_subset_supports_ext): Wrap some
		strings with the gettext macro to prepare future i18n.

2022-06-22  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Fix inconsistent error message (range)
	This commit fixes inconsistent error message format involving compressed
	funct<n> fields.  In specific, funct6 had an error message with range
	0..2^<n> ("0..64") unlike other funct<n> fields with 0..2^<n>-1
	(e.g. funct4 with "0..15").

	gas/ChangeLog:

		* config/tc-riscv.c (riscv_ip): Fix inconsistent error message.

2022-06-22  Marcus Nilsson  <brainbomb@gmail.com>

	readelf: replace xmalloc with malloc in slurp_relr_relocs
	Using xmalloc makes the null check redundant since failing allocation
	will exit the program. Instead use malloc and let the error be
	conveyed up the call chain.

2022-06-22  Alan Modra  <amodra@gmail.com>

	PowerPC64: stub debug dump
	powerpc64le-linux-ld is failing the assertion in ppc_build_one_stub,
	again apparently, which means a stub will overwrite the tail of a
	previous stub.  The difficulty with debugging these issues is that
	it's not a problem with the stub that triggers the assertion, but the
	previous stub in that section.  This patch keeps track of the last
	stub and adds a debug dump.  Hopefully that will help.

		* elf64-ppc.c (enum _ppc64_sec_type): Add sec_stub.
		(struct _ppc64_elf_section_data): Add u.last_ent.
		(dump_previous_stub): New function.
		(ppc_build_one_stub): Keep track of previous stub, and dump it
		when finding an overlapping stub.

2022-06-22  Alan Modra  <amodra@gmail.com>

	PR29270, DW_FORM_udata signed output
		PR 29270
		* dwarf.c (read_and_display_attr_value): Output DW_FORM_udata
		as unsigned.

2022-06-22  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-21  Nick Alcock  <nick.alcock@oracle.com>

	ld: regenerate configure after recent misgeneration
	Things work again after this.

	ld/ChangeLog:

		* configure: Regenerate.

2022-06-21  Nick Alcock  <nick.alcock@oracle.com>

	libctf: tests: prune warnings from compiler output
	We were failing to call prune_warnings appropriately, leading to
	false-positive test failures on some platforms (observed on
	sparclinux).

	libctf/ChangeLog:

		* testsuite/lib/ctf-lib.exp: Prune warnings from compiler and
		linker output.
		* testsuite/libctf-regression/libctf-repeat-cu.exp: Likewise,
		and ar output too.

2022-06-21  Nick Alcock  <nick.alcock@oracle.com>

	libctf: avoid mingw warning
	A missing paren led to an intended cast to avoid dependence on the size
	of size_t in one argument of ctf_err_warn applying to the wrong type by
	mistake.

	libctf/ChangeLog:

		* ctf-serialize.c (ctf_write_mem): Fix cast.

2022-06-21  Nick Alcock  <nick.alcock@oracle.com>

	libctf: fix linking together multiple objects derived from the same source
	Right now, if you compile the same .c input repeatedly with CTF enabled
	and different compilation flags, then arrange to link all of these
	together, then things misbehave in various ways.  libctf may conflate
	either inputs (if the .o files have the same name, say if they are
	stored in different .a archives), or per-CU outputs when conflicting
	types are found: the latter can lead to entirely spurious errors when
	it tries to produce multiple per-CU outputs with the same name
	(discarding all but the last, but then looking for types in the earlier
	ones which have just been thrown away).

	Fixing this is multi-pronged.  Both inputs and outputs need to be
	differentiated in the hashtables libctf keeps them in: inputs with the
	same cuname and filename need to be considered distinct as long as they
	have different associated CTF dicts, and per-CU outputs need to be
	considered distinct as long as they have different associated input
	dicts.  Right now there is nothing tying the two together other than the
	CU name: fix this by introducing a new field in the ctf_dict_t named
	ctf_link_in_out, which (for input dicts) points to the associated per-CU
	output dict (if any), and for output dicts points to the associated
	input dict.  At creation time the name used is completely arbitrary:
	it's only important that it be distinct if CTF dicts are distinct.  So,
	when a clash is found, adjust the CU name by sticking the number of
	elements in the input on the end.  At output time, the CU name will
	appear in the linked object, so it matters a little more that it look
	slightly less ugly: in conflicting cases, append an incrementing
	integer, starting at 0.

	This naming scheme is not very helpful, but it's hard to see what else
	we can do.  The input .o name may be the same.  The input .a name is not
	even visible to ctf_link, and even *that* might be the same, because
	.a's can contain many members with the same name, all of which
	participate in the link.  All we really know is that the two have
	distinct dictionaries with distinct types in them, and at least this way
	they are all represented, any any symbols, variables etc referring to
	those types are accurately stored.

	(As a side-effect this also fixes a use-after-free and double-free when
	errors are found during variable or symbol emission.)

	Use the opportunity to prevent a couple of sources of problems, to wit
	changing the active CU mappings when a link has already been done
	(no effect on ld, which doesn't use CU mappings at all), and causing
	multiple consecutive ctf_link's to have the same net effect as just
	doing the last one (no effect on ld, which only ever does one
	ctf_link) rather than having the links be a sort of half-incremental
	not-really-intended mess.

	libctf/ChangeLog:

		PR libctf/29242
		* ctf-impl.h (struct ctf_dict) [ctf_link_in_out]: New.
		* ctf-dedup.c (ctf_dedup_emit_type): Set it.
		* ctf-link.c (ctf_link_add_ctf_internal): Set the input
		CU name uniquely when clashes are found.
		(ctf_link_add): Document what repeated additions do.
		(ctf_new_per_cu_name): New, come up with a consistent
		name for a new per-CU dict.
		(ctf_link_deduplicating): Use it.
		(ctf_create_per_cu): Use it, and ctf_link_in_out, and set
		ctf_link_in_out properly.  Don't overwrite per-CU dicts with
		per-CU dicts relating to different inputs.
		(ctf_link_add_cu_mapping): Prevent per-CU mappings being set up
		if we already have per-CU outputs.
		(ctf_link_one_variable): Adjust ctf_link_per_cu call.
		(ctf_link_deduplicating_one_symtypetab): Likewise.
		(ctf_link_empty_outputs): New, delete all the ctf_link_outputs
		and blank out ctf_link_in_out on the corresponding inputs.
		(ctf_link): Clarify the effect of multiple ctf_link calls.
		Empty ctf_link_outputs if it already exists rather than
		having the old output leak into the new link.  Fix a variable
		name.
		* testsuite/config/default.exp (AR): Add.
		(OBJDUMP): Likewise.
		* testsuite/libctf-regression/libctf-repeat-cu.exp: New test.
		* testsuite/libctf-regression/libctf-repeat-cu*: Main program,
		library, and expected results for the test.

2022-06-21  Kevin Buettner  <kevinb@redhat.com>

	Document how GDB searches for files when using -s, -e, and -se options
	GDB's documentation of the 'file' command says:

	    If you do not specify a directory and the file is not found in the
	    GDB working directory, GDB uses the environment variable PATH as a
	    list of directories to search, just as the shell does when looking
	    for a program to run.

	The same is true for files specified via commandline options -s, -e,
	and -se.

	This commit adds a cross reference to the file command for these options.

2022-06-21  Nick Clifton  <nickc@redhat.com>

	Binutils support for dwarf-5 (location and range lists related)
		* dwarf.h (struct debug_info): Add rnglists_base field.
		* dwarf.c (read_and_display_attr_value): Read attribute DW_AT_rnglists_base.
		(display_debug_rnglists_list): While handling DW_RLE_base_addressx,
	  	DW_RLE_startx_endx, DW_RLE_startx_length items, pass the proper parameter
		value to fetch_indexed_addr(), i.e. fetch the proper entry in .debug_addr section.
		(display_debug_ranges): Add rnglists_base to the .debug_rnglists base address.
		(load_separate_debug_files): Load .debug_addr section, if exists.

	Default to disabling the linker warnings about execstack and RWX segments if the target is the HPPA architecture.
		PR 29263
		* configure.ac (ac_default_ld_warn_execstack): Default to 'no' for
		HPPA targets.
		(ac_default_ld_warn_rwx_segments): Likewise.
		* configure: Regenerate.
		* testsuite/ld-elf/elf.exp: Add the --warn-execstack command line
		option to the command line when running execstack tests for the
		HPPA target.

2022-06-21  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-20  Tom Tromey  <tromey@adacore.com>

	Move finish_print out of value_print_options
	'finish_print' does not really belong in value_print_options -- this
	is consulted only when deciding whether or not to print a value, and
	never during the course of printing.  This patch removes it from the
	structure and makes it a static global in infcmd.c instead.

	Tested on x86-64 Fedora 34.

2022-06-20  Alan Modra  <amodra@gmail.com>

	PR29262, memory leak in pr_function_type
		PR 29262
		* prdbg.c (pr_function_type): Free "s" on failure path.

	PR29261, memory leak in parse_stab_struct_fields
		PR 29261
		* stabs.c (parse_stab_struct_fields): Free "fields" on failure path.

2022-06-20  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-19  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-18  Tom Tromey  <tom@tromey.com>

	Fix assertion failure in copy_type
	PR exp/20630 points out a simple way to cause an assertion failure in
	copy_type -- but this was found in the wild a few times as well.

	copy_type only works for objfile-owned types, but there isn't a deep
	reason for this.  This patch fixes the bug by updating copy_type to
	work for any sort of type.

	Better would perhaps be to finally implement type GC, but I still
	haven't attempted this.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=20630

2022-06-18  Tomoaki Kawada  <kawada@kmckk.co.jp>

	Fix the sorting algorithm for reloc entries
	The optimized insertion sort algorithm in `elf_link_adjust_relocs`
	incorrectly assembled "runs" from unsorted entries and inserted them to an
	already-sorted prefix, breaking the loop invariants of insertion sort.
	This commit updates the run assembly loop to break upon encountering a
	non-monotonic change in the sort key.

		PR 29259
	bfd/
		* elflink.c (elf_link_adjust_relocs): Ensure run being inserted
		is sorted.
	ld/
		* testsuite/ld-elf/pr29259.d,
		* testsuite/ld-elf/pr29259.s,
		* testsuite/ld-elf/pr29259.t: New test.

2022-06-18  Enze Li  <enze.li@hotmail.com>

	gdb/python: Export nibbles to python layer
	This patch makes it possible to allow Value.format_string() to return
	nibbles output.

	When we set the parameter of nibbles to True, we can achieve the
	displaying binary values in groups of every four bits.

	Here's an example:
	  (gdb) py print (gdb.Value (1230).format_string (format='t', nibbles=True))
	  0100 1100 1110
	  (gdb)

	Note that the parameter nibbles is only useful if format='t' is also used.

	This patch also includes update to the relevant testcase and
	documentation.

	Tested on x86_64 openSUSE Tumbleweed.

2022-06-18  Enze Li  <enze.li@hotmail.com>

	gdb/doc: Documentation for the new print command
	Document the new command "print nibbles" and add a NEWS entry.

2022-06-18  Enze Li  <enze.li@hotmail.com>

	gdb: Add new 'print nibbles' feature
	Make an introduction of a new print setting that can be set by 'set
	print nibbles [on|off]'.  The default value if OFF, which can be changed
	by user manually.  Of course, 'show print nibbles' is also included in
	the patch.

	The new feature displays binary values by group, with four bits per
	group.  The motivation for this work is to enhance the readability of
	binary values.

	Here's a GDB session before this patch is applied.
	  (gdb) print var_a
	  $1 = 1230
	  (gdb) print/t var_a
	  $2 = 10011001110

	With this patch applied, we can use the new print setting to display the
	new form of the binary values.
	  (gdb) print var_a
	  $1 = 1230
	  (gdb) print/t var_a
	  $2 = 10011001110
	  (gdb) set print nibbles on
	  (gdb) print/t var_a
	  $3 = 0100 1100 1110

	Tested on x86_64 openSUSE Tumbleweed.

2022-06-18  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-17  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: NEWS: Move LoongArch gdbserver to the correct section
	commit e5ab6af52d38 ("gdbserver: Add LoongArch/Linux support")
	was merged into the master since GDB 12, so we should put the
	news in the "Changes since GDB 12" section.

	Thanks Tom Tromey for your correction [1], sorry for that.

	[1] https://sourceware.org/pipermail/gdb-patches/2022-June/190122.html

2022-06-17  Alan Modra  <amodra@gmail.com>

	PR29256, memory leak in obj_elf_section_name
	When handling section names in quotes obj_elf_section_name calls
	demand_copy_C_string, which puts the name on the gas notes obstack.
	Such strings aren't usually freed, since obstack_free frees all more
	recently allocated objects as well as its arg.  When handling
	non-quoted names, obj_elf_section_name mallocs the name.  Due to the
	mix of allocation strategies it isn't possible for callers to free
	names, if that was desirable.  Partially fix this by always creating
	names on the obstack, which is more efficient anyway.  (You still
	can't obstack_free on error paths due to the xtensa
	tc_canonicalize_section_name.)  Also remove a couple of cases where
	the name is dup'd for no good reason as far as I know.

		PR 29256
		* config/obj-elf.c (obj_elf_section_name): Create name on notes
		obstack.
		(obj_elf_attach_to_group): Don't strdup group name.
		(obj_elf_section): Likewise.
		(obj_elf_vendor_attribute): Use xmemdup0 rather than xstrndup.

2022-06-17  Alan Modra  <amodra@gmail.com>

	PR29255, memory leak in make_tempdir
		PR 29255
		* bucomm.c (make_tempdir, make_tempname): Free template on all
		failure paths.

	PR29254, memory leak in stab_demangle_v3_arg
		PR 29254
		* stabs.c (stab_demangle_v3_arg): Free dt on failure path.

2022-06-17  Pedro Alves  <pedro@palves.net>

	Fix GDB build with GCC 4.8 & 4.9
	With gcc 4.8/4.9, we run into this build failure (and other similar
	ones):

	  /home/palves/gdb/binutils-gdb/src/gdb/location.h:224:59: error: could not convert ‘{0, LINE_OFFSET_UNKNOWN}’ from ‘<brace-enclosed initializer list>’ to ‘line_offset’
	     struct line_offset line_offset = {0, LINE_OFFSET_UNKNOWN};
								     ^

	The issue is that at around the GCC 4.8/4.9 era, a default member
	initializer prevented the struct from being an aggregate, so you
	cannot use aggregate initialization on them.  That rule changed after
	GCC 4.9 and GCC 5 & later uses new rules.

	Fix this by not using aggregate initialization for struct line_offset.
	The default member initization already leaves line_offset as {0,
	LINE_OFFSET_UNKNOWN}, so initialization to those values can just go
	away.  The remaining cases are of the form {0, LINE_OFFSET_NONE}, and
	those cases can be better rewritten to delay setting the sign field
	until we know we have a valid offset.

	Change-Id: I0506ea4a83c5fa2f15e159569db68b3b0a7509b4

2022-06-17  Pedro Alves  <pedro@palves.net>

	Convert set_location_spec_string to a method
	This converts set_location_spec_string to a method of location_spec,
	and makes the location_spec::as_string field protected, renaming it to
	m_as_string along the way.

	Change-Id: Iccfb1654e9fa7808d0512df89e775f9eacaeb9e0

2022-06-17  Pedro Alves  <pedro@palves.net>

	Convert location_spec_to_string to a method
	This converts location_spec_to_string to a method of location_spec,
	simplifying the code using it, as it no longer has to use
	std::unique_ptr::get().

	Change-Id: I621bdad8ea084470a2724163f614578caf8f2dd5

2022-06-17  Pedro Alves  <pedro@palves.net>

	Convert location_spec_type to a method
	This converts location_spec_type to location_spec::type().

	Change-Id: Iff4cbfafb1cf3d22adfa142ff939b4a148e52273

2022-06-17  Pedro Alves  <pedro@palves.net>

	Convert location_spec_empty_p to a method
	This converts location_spec_empty_p to a method of location_spec,
	simplifying users, as they no longer have to use
	std::unique_ptr::get().

	Change-Id: I83381a729896f12e1c5a1b4d6d4c2eb1eb6582ff

2022-06-17  Pedro Alves  <pedro@palves.net>

	Eliminate copy_location_spec
	copy_location_spec is just a wrapper around location_spec::clone(), so
	remove it and call clone() directly.  This simplifies users, as they
	no longer have to use std::unique_ptr::get().

	Change-Id: I8ce8658589460b98888283b306b315a5b8f73976

2022-06-17  Pedro Alves  <pedro@palves.net>

	Eliminate the two-level data structures behind location_specs
	Currently, there's the location_spec hierarchy, and then some
	location_spec subclasses have their own struct type holding all their
	data fields.

	I.e., there is this:

	 location_spec
	   explicit_location_spec
	   linespec_location_spec
	   address_location_spec
	   probe_location_spec

	and then these separate types:

	  explicit_location
	  linespec_location

	where:

	  explicit_location_spec
	     has-a explicit_location
	  linespec_location_spec
	     has-a linespec_location

	This patch eliminates explicit_location and linespec_location,
	inlining their members in the corresponding location_spec type.

	The location_spec subclasses were the ones currently defined in
	location.c, so they are moved to the header.  Since the definitions of
	the classes are now visible, we no longer need location_spec_deleter.

	Some constructors that are used for cloning location_specs, like:

	  explicit explicit_location_spec (const struct explicit_location *loc)

	... were converted to proper copy ctors.

	In the process, initialize_explicit_location is eliminated, and some
	functions that returned the "data type behind a locspec", like
	get_linespec_location are converted to downcast functions, like
	as_linespec_location_spec.

	Change-Id: Ia31ccef9382b25a52b00fa878c8df9b8cf2a6c5a

2022-06-17  Pedro Alves  <pedro@palves.net>

	event_location -> location_spec
	Currently, GDB internally uses the term "location" for both the
	location specification the user input (linespec, explicit location, or
	an address location), and for actual resolved locations, like the
	breakpoint locations, or the result of decoding a location spec to
	SaLs.  This is expecially confusing in the breakpoints module, as
	struct breakpoint has these two fields:

	  breakpoint::location;
	  breakpoint::loc;

	"location" is the location spec, and "loc" is the resolved locations.

	And then, we have a method called "locations()", which returns the
	resolved locations as range...

	The location spec type is presently called event_location:

	  /* Location we used to set the breakpoint.  */
	  event_location_up location;

	and it is described like this:

	  /* The base class for all an event locations used to set a stop event
	     in the inferior.  */

	  struct event_location
	  {

	and even that is incorrect...  Location specs are used for finding
	actual locations in the program in scenarios that have nothing to do
	with stop events.  E.g., "list" works with location specs.

	To clean all this confusion up, this patch renames "event_location" to
	"location_spec" throughout, and then all the variables that hold a
	location spec, they are renamed to include "spec" in their name, like
	e.g., "location" -> "locspec".  Similarly, functions that work with
	location specs, and currently have just "location" in their name are
	renamed to include "spec" in their name too.

	Change-Id: I5814124798aa2b2003e79496e78f95c74e5eddca

2022-06-17  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: fix build with -Werror=format-truncation
	gprofng/ChangeLog
	2022-06-16  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		* configure.ac: Remove -Wno-format-truncation.
		* src/Makefile.am: Likewise.
		* configure: Rebuild.
		* src/Makefile.in: Rebuild.
		* common/hwctable.c: Fix -Werror=format-truncation errors.
		* src/ipc.cc: Likewise.
		* src/parse.cc: Likewise.

2022-06-17  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-16  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix have_mpx test
	When testing on openSUSE Leap 15.4 I ran into this FAIL:
	...
	FAIL: gdb.arch/i386-mpx-map.exp: NULL address of the pointer
	...
	and likewise for all the other mpx tests.

	The problem is that have_mpx is supposed to return 0, but it doesn't because
	it tries to match this output:
	...
	builtin_spawn -ignore SIGHUP temp/20294/have_mpx-2-20294.x^M
	No MPX support^M
	No MPX support^M
	...
	using:
	...
	                   && ![string equal $output "No MPX support\r\n"]]
	...

	Fix this by matching using a regexp instead.

	Tested on x86_64-linux.

2022-06-16  Alan Modra  <amodra@gmail.com>

	use of uninitialised value in input_file_open
	Triggered by a file containing just "#N" or "#A".  fgets when hitting
	EOF before reading anything returns NULL and does not write to buf.
	strchr (buf, '\n') then is reading from uninitialised memory.

		* input-file.c (input_file_open): Don't assume buf contains
		zero string terminator when fgets returns NULL.

2022-06-16  Alan Modra  <amodra@gmail.com>

	Always free matching vector from bfd_check_format_matches
	At least one place calling list_matching_formats failed to free the
	"matching" vector from bfd_check_format_matches afterwards.  Fix that
	by calling free inside list_matching_formats.

	binutils/
		* bucomm.c (list_matching_formats): Free arg.
		* addr2line.c (process_file): Adjust to suit.
		* ar.c (open_inarch, ranlib_touch): Likewise.
		* coffdump.c (main): Likewise.
		* nm.c (display_archive, display_file): Likewise.
		* objcopy.c (copy_file): Likewise.
		* objdump.c (display_object_bfd): Likewise.
		* size.c (display_bfd): Likewise.
		* srconv.c (main): Likewise.
	ld/
		* ldlang.c (load_symbols): Free "matching".

2022-06-16  Alan Modra  <amodra@gmail.com>

	Revert "Revert "Fix fbsd core matching""
	This reverts commit 476288fa2bddecf0f0e13dee826a076309bf01fe.

2022-06-16  Alan Modra  <amodra@gmail.com>

	Restore readelf -wF
	Commit 94585d6d4495 resulted in readelf -wF failing with
	Unrecognized debug letter option 'F'

	binutils/
		* dwarf.c (debug_dump_long_opts): Add letter.
		(debug_option_table): New, replacing..
		(opts_table, letter_table): ..these.
		(dwarf_select_sections_by_names): Adjust to suit.  Set
		do_debug_frames outside of loop.
		(dwarf_select_sections_by_letters): Similarly.
	gas/
		* testsuite/gas/i386/ehinterp.d: Use readelf -wF.

2022-06-16  Alan Modra  <amodra@gmail.com>

	PR29250, readelf erases CIE initial register state
		PR 29250
	binutils/
		* dwarf.c (display_debug_frames): Set col_type[reg] on sizing
		pass over FDE to cie->col_type[reg] if CIE specifies reg.
		Handle DW_CFA_restore and DW_CFA_restore_extended on second
		pass using the same logic.  Remove unnecessary casts.  Don't
		call frame_need_space on second pass over FDE.
	gas/
		* testsuite/gas/i386/ehinterp.d,
		* testsuite/gas/i386/ehinterp.s: New test.
		* testsuite/gas/i386/i386.exp: Run it.

2022-06-16  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-15  Sergei Trofimovich  <siarheit@google.com>

	sim: fix BFD_VMA format arguments on 32-bit hosts [PR gdb/29184]
	Noticed format mismatch when attempted to build gdb on i686-linux-gnu
	in --enable-64-bit-bfd mode:

	    sim/../../sim/cris/sim-if.c:576:28:
	        error: format '%lx' expects argument of type 'long unsigned int',
	        but argument 4 has type 'bfd_size_type' {aka 'long long unsigned int'} [-Werror=format=]
	      576 |       sim_do_commandf (sd, "memory region 0x%" BFD_VMA_FMT "x,0x%lx",
	          |                            ^~~~~~~~~~~~~~~~~~~
	      577 |          interp_load_addr, interpsiz);
	          |                            ~~~~~~~~~
	          |                            |
	          |                            bfd_size_type {aka long long unsigned int}

	While at it fixed format string for time-related types.

2022-06-15  Tom Tromey  <tromey@adacore.com>

	Check for listeners in emit_exiting_event
	I noticed that emit_exiting_event does not check whether there are any
	listeners before creating the event object.  All other event emitters
	do this, so this patch updates this one as well.

2022-06-15  Tom Tromey  <tom@tromey.com>

	Add to documentation of Python 'dont_repeat' method
	PR python/28533 points out that the Python 'dont_repeat' documentation
	is a bit ambiguous about when the method ought to be called.  This
	patch spells it out.

2022-06-15  Yvan Roux  <yvan.roux@foss.st.com>

	gdb/arm: Make sp alias for one of the other stack pointers
	For Cortex-M targets, SP register is never detached from msp or
	psp, it always has the same value as one of them.  Let GDB treat
	ARM_SP_REGNUM as an alias similar to what is done in hardware.

2022-06-15  Yvan Roux  <yvan.roux@foss.st.com>

	gdb/arm: Track msp and psp
	For Arm Cortex-M33 with security extensions, there are 4 different
	stack pointers (msp_s, msp_ns, psp_s, psp_ns).  To be compatible
	with earlier Cortex-M derivates, the msp and psp registers are
	aliases for one of the 4 real stack pointer registers.

	These are the combinations that exist:
	sp -> msp -> msp_s
	sp -> msp -> msp_ns
	sp -> psp -> psp_s
	sp -> psp -> psp_ns

	This means that when the GDB client is to show the value of "msp",
	the value should always be equal to either "msp_s" or "msp_ns".
	Same goes for "psp".

	To add a bit more context; GDB does not really use the register msp
	(or psp) internally, but they are part of the set of registers which
	are provided by the target.xml file.  As a result, they will be part
	of the set of registers printed by the "info r" command.

	Without this particular patch, GDB will hit the assert in the bottom
	of arm_cache_get_sp_register function.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29121

2022-06-15  Yvan Roux  <yvan.roux@foss.st.com>

	gdb/arm: Fetch initial sp value prior to compare
	For Arm Cortex-M33 with security extensions, there are 4 different
	stack pointers (msp_s, msp_ns, psp_s, psp_ns).  In order to
	identify the active one, compare the values of the different
	stacks. The value of the initial sp register needs to be fetched to
	perform this comparison.

2022-06-15  Andrew Burgess  <aburgess@redhat.com>

	gdb: unify two dis_asm_read_memory functions in disasm.c
	After the recent restructuring of the disassembler code, GDB has ended
	up with two identical class static functions, both called
	dis_asm_read_memory, with identical implementations.

	My first thought was to move these out of their respective classes,
	and just make them global functions, then I'd only need a single
	copy.

	And maybe that's the right way to go.  But I disliked that by doing
	that I loose the encapsulation of the method with the corresponding
	disassembler class.

	So, instead, I placed the static method into its own class, and had
	both the gdb_non_printing_memory_disassembler and gdb_disassembler
	classes inherit from this new class as an additional base-class.

	In terms of code generated, I don't think there's any significant
	difference with this approach, but I think this better reflects how
	the function is closely tied to the disassembler.

	There should be no user visible changes after this commit.

2022-06-15  Andrew Burgess  <aburgess@redhat.com>

	gdb: refactor the non-printing disassemblers
	This commit started from an observation I made while working on some
	other disassembler patches, that is, that the function
	gdb_buffered_insn_length, is broken ... sort of.

	I noticed that the gdb_buffered_insn_length function doesn't set up
	the application data field if the disassemble_info structure.

	Further, I noticed that some architectures, for example, ARM, require
	that the application_data field be set, see gdb_print_insn_arm in
	arm-tdep.c.

	And so, if we ever use gdb_buffered_insn_length for ARM, then GDB will
	likely crash.  Which is why I said only "sort of" broken.  Right now
	we don't use gdb_buffered_insn_length with ARM, so maybe it isn't
	broken yet?

	Anyway to prove to myself that there was a problem here I extended the
	disassembler self tests in disasm-selftests.c to include a test of
	gdb_buffered_insn_length.  As I run the test for all architectures, I
	do indeed see GDB crash for ARM.

	To fix this we need gdb_buffered_insn_length to create a disassembler
	that inherits from gdb_disassemble_info, but we also need this new
	disassembler to not print anything.

	And so, I introduce a new gdb_non_printing_disassembler class, this is
	a disassembler that doesn't print anything to the output stream.

	I then observed that both ARC and S12Z also create non-printing
	disassemblers, but these are slightly different.  While the
	disassembler in gdb_non_printing_disassembler reads the instruction
	from a buffer, the ARC and S12Z disassemblers read from target memory
	using target_read_code.

	And so, I further split gdb_non_printing_disassembler into two
	sub-classes, gdb_non_printing_memory_disassembler and
	gdb_non_printing_buffer_disassembler.

	The new selftests now pass, but otherwise, there should be no user
	visible changes after this commit.

2022-06-15  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb/python: implement the print_insn extension language hook
	This commit extends the Python API to include disassembler support.

	The motivation for this commit was to provide an API by which the user
	could write Python scripts that would augment the output of the
	disassembler.

	To achieve this I have followed the model of the existing libopcodes
	disassembler, that is, instructions are disassembled one by one.  This
	does restrict the type of things that it is possible to do from a
	Python script, i.e. all additional output has to fit on a single line,
	but this was all I needed, and creating something more complex would,
	I think, require greater changes to how GDB's internal disassembler
	operates.

	The disassembler API is contained in the new gdb.disassembler module,
	which defines the following classes:

	  DisassembleInfo

	      Similar to libopcodes disassemble_info structure, has read-only
	  properties: address, architecture, and progspace.  And has methods:
	  __init__, read_memory, and is_valid.

	      Each time GDB wants an instruction disassembled, an instance of
	  this class is passed to a user written disassembler function, by
	  reading the properties, and calling the methods (and other support
	  methods in the gdb.disassembler module) the user can perform and
	  return the disassembly.

	  Disassembler

	      This is a base-class which user written disassemblers should
	  inherit from.  This base class provides base implementations of
	  __init__ and __call__ which the user written disassembler should
	  override.

	  DisassemblerResult

	      This class can be used to hold the result of a call to the
	  disassembler, it's really just a wrapper around a string (the text
	  of the disassembled instruction) and a length (in bytes).  The user
	  can return an instance of this class from Disassembler.__call__ to
	  represent the newly disassembled instruction.

	The gdb.disassembler module also provides the following functions:

	  register_disassembler

	      This function registers an instance of a Disassembler sub-class
	  as a disassembler, either for one specific architecture, or, as a
	  global disassembler for all architectures.

	  builtin_disassemble

	      This provides access to GDB's builtin disassembler.  A common
	  use case that I see is augmenting the existing disassembler output.
	  The user code can call this function to have GDB disassemble the
	  instruction in the normal way.  The user gets back a
	  DisassemblerResult object, which they can then read in order to
	  augment the disassembler output in any way they wish.

	      This function also provides a mechanism to intercept the
	  disassemblers reads of memory, thus the user can adjust what GDB
	  sees when it is disassembling.

	The included documentation provides a more detailed description of the
	API.

	There is also a new CLI command added:

	  maint info python-disassemblers

	This command is defined in the Python gdb.disassemblers module, and
	can be used to list the currently registered Python disassemblers.

2022-06-15  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: add extension language print_insn hook
	This commit is setup for the next commit.

	In the next commit I will add a Python API to intercept the print_insn
	calls within GDB, each print_insn call is responsible for
	disassembling, and printing one instruction.  After the next commit it
	will be possible for a user to write Python code that either wraps
	around the existing disassembler, or even, in extreme situations,
	entirely replaces the existing disassembler.

	This commit does not add any new Python API.

	What this commit does is put the extension language framework in place
	for a print_insn hook.  There's a new callback added to 'struct
	extension_language_ops', which is then filled in with nullptr for Python
	and Guile.

	Finally, in the disassembler, the code is restructured so that the new
	extension language function ext_lang_print_insn is called before we
	delegate to gdbarch_print_insn.

	After this, the next commit can focus entirely on providing a Python
	implementation of the new print_insn callback.

	There should be no user visible change after this commit.

2022-06-15  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: add new base class to gdb_disassembler
	The motivation for this change is an upcoming Python disassembler API
	that I would like to add.  As part of that change I need to create a
	new disassembler like class that contains a disassemble_info and a
	gdbarch.  The management of these two objects is identical to how we
	manage these objects within gdb_disassembler, so it might be tempting
	for my new class to inherit from gdb_disassembler.

	The problem however, is that gdb_disassembler has a tight connection
	between its constructor, and its print_insn method.  In the
	constructor the ui_file* that is passed in is replaced with a member
	variable string_file*, and then in print_insn, the contents of the
	member variable string_file are printed to the original ui_file*.

	What this means is that the gdb_disassembler class has a tight
	coupling between its constructor and print_insn; the class just isn't
	intended to be used in a situation where print_insn is not going to be
	called, which is how my (upcoming) sub-class would need to operate.

	My solution then, is to separate out the management of the
	disassemble_info and gdbarch into a new gdb_disassemble_info class,
	and make this class a parent of gdb_disassembler.

	In arm-tdep.c and mips-tdep.c, where we used to cast the
	disassemble_info->application_data to a gdb_disassembler, we can now
	cast to a gdb_disassemble_info as we only need to access the gdbarch
	information.

	Now, my new Python disassembler sub-class will still want to print
	things to an output stream, and so we will want access to the
	dis_asm_fprintf functionality for printing.

	However, rather than move this printing code into the
	gdb_disassemble_info base class, I have added yet another level of
	hierarchy, a gdb_printing_disassembler, thus the class structure is
	now:

	  struct gdb_disassemble_info {};
	  struct gdb_printing_disassembler : public gdb_disassemble_info {};
	  struct gdb_disassembler : public gdb_printing_disassembler {};

	In a later commit my new Python disassembler will inherit from
	gdb_printing_disassembler.

	The reason for adding the additional layer to the class hierarchy is
	that in yet another commit I intend to rewrite the function
	gdb_buffered_insn_length, and to do this I will be creating yet more
	disassembler like classes, however, these will not print anything,
	thus I will add a gdb_non_printing_disassembler class that also
	inherits from gdb_disassemble_info.  Knowing that that change is
	coming, I've gone with the above class hierarchy now.

	There should be no user visible changes after this commit.

2022-06-15  Andrew Burgess  <aburgess@redhat.com>

	gdb/python: convert gdbpy_err_fetch to use gdbpy_ref
	Convert the gdbpy_err_fetch class to make use of gdbpy_ref, this
	removes the need for manual reference count management, and allows the
	destructor to be removed.

	There should be no functional change after this commit.

	I think this cleanup is worth doing on its own, however, in a later
	commit I will want to copy instances of gdbpy_err_fetch, and switching
	to using gdbpy_ref means that I can rely on the default copy
	constructor, without having to add one that handles the reference
	counts, so this is good preparation for that upcoming change.

2022-06-15  Jan Beulich  <jbeulich@suse.com>

	x86: drop print_operand_value()'s "hex" parameter
	For quite some  time all callers have been passing 1 / true. While there
	fold the final oappend_with_style() calls.

2022-06-15  Tom de Vries  <tdevries@suse.de>

	[gdb/build] Fix build for gcc < 11
	When building trunk on openSUSE Leap 15.3 with system gcc 7.5.0, I run into:
	...
	In file included from ../bfd/bfd.h:46:0,
	                 from gdb/defs.h:37,
	                 from gdb/debuginfod-support.c:19:
	gdb/debuginfod-support.c: In function ‘bool debuginfod_is_enabled()’:
	gdb/../include/diagnostics.h:42:3: error: unknown option after \
	  ‘#pragma GCC diagnostic’ kind [-Werror=pragmas]
	   _Pragma (DIAGNOSTIC_STRINGIFY (GCC diagnostic ignored option))
	   ^
	gdb/../include/diagnostics.h:80:3: note: in expansion of macro \
	  ‘DIAGNOSTIC_IGNORE’
	   DIAGNOSTIC_IGNORE ("-Wstringop-overread")
	   ^~~~~~~~~~~~~~~~~
	gdb/debuginfod-support.c:201:4: note: in expansion of macro \
	  ‘DIAGNOSTIC_IGNORE_STRINGOP_OVERREAD’
	    DIAGNOSTIC_IGNORE_STRINGOP_OVERREAD
	    ^
	...

	The problem is that the warning -Wstringop-overread has been introduced for
	gcc 11, and we can only tell gcc to ignore if it knows about it.

	Fix this by guarding the DIAGNOSTIC_IGNORE_STRINGOP_OVERREAD definition in
	diagnostics.c with '#if __GNUC__ >= 11'.

	Tested on x86_64-linux, by completing a build.

2022-06-15  Alan Modra  <amodra@gmail.com>

	PR29230, segv in lookup_symbol_in_variable_table
	The PR23230 testcase uses indexed strings without specifying
	SW_AT_str_offsets_base.  In this case we left u.str with garbage (from
	u.val) which then led to a segfault when attempting to access the
	string.  Fix that by clearing u.str.  The patch also adds missing
	sanity checks in the recently committed read_indexed_address and
	read_indexed_string functions.

		PR 29230
		* dwarf2.c (read_indexed_address): Return uint64_t.  Sanity check idx.
		(read_indexed_string): Use uint64_t for str_offset.  Sanity check idx.
		(read_attribute_value): Clear u.str for indexed string forms when
		DW_AT_str_offsets_base is not yet read or missing.

2022-06-15  Mark Wielaard  <mark@klomp.org>

	gdb: Always suppress stringop-overread warning in debuginfod-support.c
	Just like on s390x with g++ 11.2.1 and ppc64le with g++ 11.3.1 g++ 11
	on hppa produces a spurious warning for stringop-overread in
	debuginfod_is_enabled for url_view. Just always suppress it on all
	arches.

	https://sourceware.org/bugzilla/show_bug.cgi?id=29198

	gdb/ChangeLog:

		* debuginfod-support.c (debuginfod_is_enabled): Always use
		DIAGNOSTIC_IGNORE_STRINGOP_OVERREAD.

2022-06-15  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-14  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng docs: provide help for <rate> == <interval>
	The help message from 'gprofng collect app -h', in
	the section on <rate> == <interval>, had a dangling
	reference to a non-existent manpage. Provide basic
	info, including reasons for caution.

	gprofng docs: mention HTML / PDF in the gprofng README
	The HTML and PDF formats are described in the gprofng tutorial (info
	topic "Other Document Formats"). In addition, describe them in the
	README because: they are important; they are easily searchable; and the
	README is primarily oriented to the person who is installing gprofng,
	who may differ from the person who follows a user tutorial.

2022-06-14  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: fix build with -Werror=format-security
	gprofng/ChangeLog
	2022-06-13  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		PR gprofng/28968
		* src/src/Hist_data.cc (print_row): Make param const.
		* src/src/Hist_data.h (print_row): Likewise.
		* src/src/Print.h: Remove unused functions and variables.
		* src/Print.cc: Fix -Werror=format-security errors.
		* src/parse.cc: Likewise.

2022-06-14  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Handle unordered dict in gdb.python/py-mi-cmd.exp
	When running test-case gdb.python/py-mi-cmd.exp on openSUSE Leap 42.3 with
	python 3.4, I occasionally run into:
	...
	Expecting: ^(-pycmd dct[^M
	]+)?(\^done,result={hello="world",times="42"}[^M
	]+[(]gdb[)] ^M
	[ ]*)
	-pycmd dct^M
	^done,result={times="42",hello="world"}^M
	(gdb) ^M
	FAIL: gdb.python/py-mi-cmd.exp: -pycmd dct (unexpected output)
	...

	The problem is that the data type used here in py-mi-cmd.py:
	...
	        elif argv[0] == "dct":
	            return {"result": {"hello": "world", "times": 42}}
	...
	is a dictionary, and only starting version 3.6 are dictionaries insertion
	ordered, so using PyDict_Next in serialize_mi_result doesn't guarantee a
	fixed order.

	Fix this by allowing the alternative order.

	Tested on x86_64-linux.

2022-06-14  Tom Tromey  <tromey@adacore.com>

	Implement lazy FPU initialization for ravenscar
	Some ravenscar runtimes implement lazy FPU handling.  On these
	runtimes, the FPU is only initialized when a task tries to use it.
	Furthermore, the FP registers aren't automatically saved on a task
	switch -- instead, the save is deferred until the new task tries to
	use the FPU.  Furthermore, each task's context area has a flag
	indicating whether the FPU has been initialized for this task.

	This patch teaches GDB to understand this implementation.  When
	fetching or storing registers, GDB now checks to see whether the live
	FP registers should be used.  If not, the task's saved FP registers
	will be used if the task has caused FPU initialization.

	Currently only AArch64 uses this code.  bb-runtimes implements this
	for ARM as well, but GDB doesn't yet have an arm-ravenscar-thread.c.

2022-06-14  Tom Tromey  <tromey@adacore.com>

	Reimplement ravenscar registers using tables
	Currently, the ravenscar-thread implementation for each architecture
	is written by hand.  However, these are actually written by
	copy-paste.  It seems better to switch to a table-driven approach.

	The previous code also fetched all registers whenever any register was
	requested.  This is corrected in the new implementation.

2022-06-14  Tom Tromey  <tromey@adacore.com>

	Fix bugs in aarch64-ravenscar-thread.c
	We found a few bugs in aarch64-ravenscar-thread.c.

	First, some of the register offsets were incorrect.  The "bb-runtimes"
	file for this runtime had the wrong offsets in comments, which GDB
	took to be correct.  However, those comments didn't account for
	alignment.  This patch adjusts the offsets.

	Next, the "FPU Saved field" is not a register -- it is an
	implementation detail of the runtime.  This is removed.

	Finally, I think the FP registers are actually named V0-V31, and the
	"Q" names are pseudo-registers.  This patch fixes the comment.

2022-06-14  Tom Tromey  <tromey@adacore.com>

	Allow 'interrupt -a' in all-stop mode
	PR gdb/17160 points out that "interrupt -a" errors in all-stop mode,
	but there's no good reason for this.  This patch removes the error.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=17160

2022-06-14  Youling Tang  <tangyouling@loongson.cn>

	gdbserver: Add LoongArch/Linux support
	Implement LoongArch/Linux support, including XML target description
	handling based on features determined, GPR regset support, and software
	breakpoint handling.

	In the Linux kernel code of LoongArch, ptrace implements PTRACE_POKEUSR
	and PTRACE_PEEKUSR in the arch_ptrace function, so srv_linux_usrregs is
	set to yes.

	With this patch on LoongArch:

	  $ make check-gdb TESTS="gdb.server/server-connect.exp"
	  [...]
	  # of expected passes		18
	  [...]

2022-06-14  Tom de Vries  <tdevries@suse.de>

	Revert "Fix fbsd core matching"
	This reverts commit a7e29f797cecd5a2f73c27838b09eae1f1b6c657.

	I accidentally pushed this, so revert.

2022-06-14  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix regexp in gdb.ada/mi_var_access.exp
	With gcc-12 and target board unix/-m32, we run into:
	...
	(gdb) ^M
	Expecting: ^(-var-create A_String_Access \* A_String_Access[^M
	]+)?(\^done,name="A_String_Access",numchild="1",.*[^M
	]+[(]gdb[)] ^M
	[ ]*)
	-var-create A_String_Access * A_String_Access^M
	^error,msg="Value out of range."^M
	(gdb) ^M
	FAIL: gdb.ada/mi_var_access.exp: Create varobj (unexpected output)
	...

	What happens is easier to understand if we take things out of the mi context:
	...
	$ gdb -q -batch \
	    outputs/gdb.ada/mi_var_access/mi_access \
	    -ex "b mi_access.adb:19" \
	    -ex run \
	    -ex "p A_String_Access"
	  ...
	Breakpoint 1, mi_access () at mi_access.adb:19
	19         A_String : String (3 .. 5) := "345"; -- STOP
	$1 = (pck.string_access) <error reading variable: Value out of range.>
	...
	while with target board unix we have instead:
	...
	$1 = (pck.string_access) 0x431b40 <ada_main.sec_default_sized_stacks>
	...

	The var-create command samples the value of the variable at a location where
	the variable is not yet initialized, and with target board unix we
	accidentally hit a valid address, but with target board unix/-m32 that's not
	the case.

	Fix the FAIL by accepting the error message.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28464

2022-06-14  Alan Modra  <amodra@gmail.com>

	Fix fbsd core matching
	On Thu, Jun 09, 2022 at 08:59:37AM -0700, John Baldwin wrote:
	> On 6/9/22 1:58 AM, Tom de Vries via Gdb-patches wrote:
	> > Hi,
	> >
	> > With an --enable-targets=all build and target board unix/-m32 I run into a
	> > FAIL in test-case gdb.base/corefile.exp:
	> > ...
	> > (gdb) file outputs/gdb.base/corefile/corefile^M
	> > Reading symbols from outputs/gdb.base/corefile/corefile...^M
	> > (gdb) core-file outputs/gdb.base/corefile/corefile.core^M
	> > warning: core file may not match specified executable file.^M
	> > [New LWP 12011]^M
	> > Core was generated by `outputs/gdb.base/corefile/co'.^M
	> > Program terminated with signal SIGABRT, Aborted.^M
	> > (gdb) FAIL: gdb.base/corefile.exp: core-file warning-free
	> > ...
	> >
	> > The warning is there because of this mismatch between core and exec:
	> > ...
	> > (gdb) p core_bfd->xvec
	> > $3 = (const struct bfd_target *) 0x20112a0 <i386_elf32_fbsd_vec>
	> > (gdb) p exec_bfd->xvec
	> > $4 = (const struct bfd_target *) 0x2010b00 <i386_elf32_vec>
	> > ...
	> >
	> > In the exec case, the detected architecture is i386_elf32_vec because this bit
	> > of code in elfcode.h:elf_object_p():
	> > ...
	> >    if (ebd->elf_machine_code != EM_NONE
	> >        && i_ehdrp->e_ident[EI_OSABI] != ebd->elf_osabi
	> >        && ebd->elf_osabi != ELFOSABI_NONE)
	> >      goto got_wrong_format_error;
	> > ...
	> > prevents i386_elf32_fbsd from matching.
	> >
	> > Fix the core matching by copying that code to elfcore.h:elf_core_file_p().
	> >
	> > Tested on x86_64-linux.
	> >
	> > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29227
	> >
	> > Any comments?

	Looks good.

	> Looking at elfcore.h, it seems to have not gotten changes made to elfcode.h over
	> time and is a bit rotted.  I suspect that all of changes made in commit 0aabe54e6222
	> that added these lines in elfcode.h (along with several other changes) need to
	> be applied to this function in elfcore.h, not just adding these lines.

	Yes, the commit 0aabe54e6222 changes likely should go in too.  I'm a
	little wary of adding all the sanity checks to elf_core_file_p since
	that might result in some core files not being recognised at all.  For
	example, despite the FIXME I'd guess leaving out the EI_VERSION check
	was deliberate.  The following seems reasonable to me.  Please test.

2022-06-14  Kavitha Natarajan  <kavitha.natarajan@amd.com>

	Debug support for global alias variable
	Starting with (future) Clang 15 (since
	https://reviews.llvm.org/D120989), Clang emits the DWARF information
	of global alias variables as DW_TAG_imported_declaration.  However,
	GDB does not handle it.  It incorrectly always reads this tag as
	C++/Fortran imported declaration (type alias, namespace alias and
	Fortran module).  This commit adds support to handle this tag as an
	alias variable.

	This change fixes the failures in the gdb.base/symbol-alias.exp
	testcase with current git Clang.  This testcase is also updated to
	test nested (recursive) aliases.

2022-06-14  Alan Modra  <amodra@gmail.com>

	BFD_RELOC_MIPS_16
	MIPS should not be using BFD_RELOC_16 for its R_MIPS_16 relocation,
	since R_MIPS_16 specifies a 16-bit field in a 32-bit word.
	BFD_RELOC_16, emitted by generic code to handle fixups on 16-bit data
	directives, expects fixups to operate on the whole of a 16-bit word.

	This patch corrects the problem by using BFD_RELOC_MIPS_16, a new bfd
	reloc that is used to generate R_MIPS_16.  BFD_RELOC_16 is handled in
	md_apply_fix for cases where the fixup can be applied at assembly
	time.  Like BFD_RELOC_8, BFD_RELOC_16 now has no corresponding object
	file relocation, and thus .half, .hword, .short and .dc.w must be
	resolved at assembly time.  BFD_RELOC_MIPS_REL16 is removed by this
	patch since it isn't used.

		PR 3243
		PR 26542
		* reloc.c (BFD_RELOC_MIPS_16): Rename from BFD_RELOC_MIPS_REL16.
		* elf32-mips.c (mips_reloc_map): Map BFD_RELOC_MIPS_16 to R_MIPS_16.
		* elf64-mips.c (mips_reloc_map): Likewise, delete BFD_RELOC_MIPS_REL16.
		* elfn32-mips.c (mips_reloc_map): Likewise.
		* libbfd.h: Regenerate.
		* bfd-in2.h: Regenerate.
	gas/
		* config/tc-mips.c (append_insn): Handle BFD_RELOC_MIPS_16.
		(macro_build): Likewise.
		(mips_percent_op <%half>): Generate BFD_RELOC_MIPS_16.
		(md_apply_fix): Handle BFD_RELOC_16 and BFD_RELOC_MIPS_16 when fx_done.
	ld/
		* testsuite/ld-mips-elf/reloc-local-overflow.d,
		* testsuite/ld-mips-elf/reloc-local-overflow.s: Rewrite.

2022-06-14  Alan Modra  <amodra@gmail.com>

	Correct R_MIPS_16 n32 howto
	If the howto is actually used, an all-zero dst_mask will result in
	unchanged section contents on attempting to apply R_MIPS_16.

		* elfn32-mips.c (elf_mips_howto_table_rela <R_MIPS_16>): Correct
		dst_mask.

2022-06-14  Alan Modra  <amodra@gmail.com>

	asan: applying zero offset to NULL pointer
		* dwarf.c (fetch_indexed_string): Move initialisation of "curr"
		and "end" after checking for missing section.

2022-06-14  Alan Modra  <amodra@gmail.com>

	gas dwarf2dbg.c tidy
	Make it a little more obvious that remap_debug_filename returns an
	allocated string (that should be freed) by returning a char * rather
	than const char *.  Free a few missed cases in dwarf2dbg.c, and free
	other memory allocated in dwarf2dbg.c.  Also remove static
	initialisation of variables and initialise in dwarf2_init instead,
	in order to ensure gas state is saner for oss-fuzz.

		* remap.c (remap_debug_filename): Remove const from return.
		* as.h (remap_debug_filename): Update prototype.
		* config/obj-elf.c (obj_elf_ident): Simplify free of
		remap_debug_filename output.
		* stabs.c (stabs_generate_asm_file): Likewise.
		* dwarf2dbg.c (dirs, dirs_in_use, dirs_allocated, current): Don't
		initialise statically..
		(dwarf2_init): ..do so here, along with most other static vars.
		(assign_file_to_slot): Don't set files_allocated until we
		succeed in allocating memory.
		(purge_generated_debug): Add bool param, free more stuff if true.
		(dwarf2_directive_filename): Adjust purge_generated_debug call.
		(process_entries): Don't free line_entry here..
		(dwarf2_cleanup): ..do so here instead, new function.
		(dwarf2_finish): Call dwarf2_cleanup.  When chaining together
		subseg line entries, unhook entries from old subseg list.
		(dwarf2_directive_loc): Free remap_debug_filename string.
		(out_dir_and_file_list): Likewise.
		(out_debug_str): Likewise.

2022-06-14  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-13  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.reverse/test_ioctl_TCSETSW.exp with libc debuginfo
	When running test-case gdb.reverse/test_ioctl_TCSETSW.exp with glibc debuginfo
	installed, I run into:
	...
	(gdb) PASS: gdb.reverse/test_ioctl_TCSETSW.exp: at TCSETSW call
	step^M
	__tcsetattr (fd=0, optional_actions=1, termios_p=0x7fffffffcf50) at \
	  ../sysdeps/unix/sysv/linux/tcsetattr.c:45^M
	45      {^M
	(gdb) FAIL: gdb.reverse/test_ioctl_TCSETSW.exp: handle TCSETSW
	...

	The problem is that the step is expected to step over the call to tcsetattr,
	but due to glibc debuginfo being installed, we step into the call.

	Fix this by using next instead of step.

	Tested on x86_64-linux.

2022-06-13  Tom de Vries  <tdevries@suse.de>

	[gdb] Avoid warnings in cooked_{read,write}_test for m68hc11
	With --enable-targets=all we have:
	...
	$ gdb -q -batch -ex "maint selftest"
	  ...
	Running selftest regcache::cooked_read_test::m68hc11.
	warning: No frame soft register found in the symbol table.
	Stack backtrace will not work.
	Running selftest regcache::cooked_read_test::m68hc12.
	warning: No frame soft register found in the symbol table.
	Stack backtrace will not work.
	Running selftest regcache::cooked_read_test::m68hc12:HCS12.
	warning: No frame soft register found in the symbol table.
	Stack backtrace will not work.
	...

	Likewise for regcache::cooked_write_test.

	The warning has no use in the selftest context.

	Fix this by skipping the specific selftests.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29224

2022-06-13  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: LoongArch: Deal with atomic sequence
	We can't put a breakpoint in the middle of a ll/sc atomic sequence,
	so look for the end of the sequence and put the breakpoint there.

2022-06-13  Sam James  <sam@gentoo.org>

	gdb: don't use bashism in configure test
	Results in configure output like:
	```
	checking for X... no
	/var/tmp/portage/sys-devel/gdb-12.1/work/gdb-12.1/gdb/configure: 18837: test: yes: unexpected operator
	checking whether to use babeltrace... auto
	```

	... when /bin/sh is provided by a POSIX-compliant shell, like dash,
	instead of bash.

2022-06-13  Jiangshuai Li  <jiangshuai_li@c-sky.com>

	gdb:csky add support target-descriptions for CSKY arch
	Registers in CSKY architecture included:
	1. 32 gprs
	2. 16 ars (alternative gprs used for quick interrupt)
	3. hi, lo, pc
	4. fr0~fr31, fcsr, fid, fesr
	5. vr0~vr15
	6. ((32 banks) * 32) cr regs (max 32 banks, 32 control regs a bank)

	For register names:
	Except over control registers, other registers, like gprs, hi, lo ...
	are fixed names. Among the 32*32 control registers, some used registers
	will have fixed names, others will have a default name "cpxcry". 'x'
	refers to bank, y refers index in the bank(a control register in bank
	4 with index 14 will has a default name cp4cr14).

	For register numbers in GDB:
	We assign a fixed number to each register in GDB, like:
	r0~r31 with 0~31
	hi, lo with 36, 37
	fpu/vpu with 40~71
	...
	described in function csky_get_supported_register_by_index().

	Function csky_get_supported_tdesc_registers_count():
	To calculate the total number of registers that GDB can analyze,
	including those with fixed names and those with default register names.

	Function csky_get_supported_register_by_index():
	To find a supported struct csky_supported_tdesc_register, return a
	struct include name with regnum via index.

	Arrays csky_supported_tdesc_feature_names[]:
	Include all supported feature names in tdesc-xmls.

	We use the information described above to load the register description
	file of the target from the stub. When loading, do a little check that
	whether the register description file contains SP, LR and PC.

2022-06-13  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Handle quotes in gdb_py_module_available
	On openSUSE Leap 42.3 with python 3.4, I run into:
	...
	(gdb) python import pygments^M
	Traceback (most recent call last):^M
	  File "<string>", line 1, in <module>^M
	ImportError: No module named 'pygments'^M
	Error while executing Python code.^M
	(gdb) FAIL: gdb.base/style.exp: python import pygments
	ERROR: unexpected output from python import
	...
	because gdb_py_module_available doesn't handle the single quotes around the
	module name in the ImportError.

	Fix this by allowing the single quotes.

	Tested on x86_64-linux.

2022-06-13  Jan Beulich  <jbeulich@suse.com>

	x86: fix incorrect indirection
	Commit 384e201e5aec ("x86: properly initialize struct instr_info
	instance(s)") was based on an improperly refreshed patch. Correct the
	oversight.

2022-06-13  Jan Beulich  <jbeulich@suse.com>

	x86: replace global scratch buffer
	With its movement to the stack, and with the subsequent desire to
	initialize the entire instr_info instances, this has become doubly
	inefficient. Individual users have better knowledge of how big a buffer
	they need, and in a number of cases going through an intermediate buffer
	can be avoided altogether.

	Having got confirmation that it wasn't intentional to print memory
	operand displacements with inconsistent style, print_displacement() is
	now using dis_style_address_offset consistently (eliminating the need
	for callers to pass in a style).

	While touching print_operand_value() also convert its "hex" parameter to
	bool. And while altering (and moving) oappend_immediate(), fold
	oappend_maybe_intel_with_style() into its only remaining caller. Finally
	where doing adjustments, use snprintf() in favor of sprintf().

2022-06-13  Jan Beulich  <jbeulich@suse.com>

	x86: avoid string copy when swapping Vex.W controlled operands
	Now that op_out[] is an array of pointers, there's no need anymore to
	copy strings. Simply swap the pointers.

2022-06-13  Jan Beulich  <jbeulich@suse.com>

	x86: shrink prefix related disassembler state fields
	By changing the values used for "artificial" prefix values,
	all_prefixes[] can be shrunk to array of unsigned char. All that
	additionally needs adjusting is the printing of possible apparently
	standalone prefixes when recovering from longjmp(): Simply check
	whether any prefixes were successfully decoded, to avoid converting
	opcode bytes matching the "artificial" values to prefix mnemonics.

	Similarly by re-arranging the bits assigned to PREFIX_* mask values
	we can fit all segment register masks in a byte and hence shrink
	active_seg_prefix to unsigned char.

	Somewhat similarly with last_*_prefix representing offsets into the
	opcode being disassembled, signed char is sufficient to hold all possible
	values.

2022-06-13  Jan Beulich  <jbeulich@suse.com>

	x86: properly initialize struct instr_info instance(s)
	Commit 39fb369834a3 ("opcodes: Make i386-dis.c thread-safe") introduced
	a lot of uninitialized data. Alan has in particular observed ubsan
	taking issue with the loop inverting the order of operands, where
	op_riprel[] - an array of bool - can hold values other than 0 or 1.

	Move instantiation of struct instr_info into print_insn() (thus having
	just a single central point), and make use of C99 dedicated initializers
	to fill fields right in the initializer where possible. This way all
	fields not explicitly initialized will be zero-filled, which in turn
	allows dropping of some other explicit initialization later in the
	function or in ckprefix(). Additionally this removes a lot of
	indirection, as all "ins->info" uses can simply become "info".

	Make one further arrangement though, to limit the amount of data needing
	(zero)initializing on every invocation: Convert the op_out structure
	member to just an array of pointers, with the actual arrays living
	inside print_insn() (and, as befoe, having just their 1st char filled
	with nul).

	While there, instead of adjusting print_insn()'s forward declaration,
	arrange for no such declaration to be needed in the first place.

2022-06-13  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-12  Tom Tromey  <tom@tromey.com>

	Fix self-test failure in addrmap
	Mark pointed out that my recent addrmap C++-ficiation changes caused a
	regression in the self-tests.  This patch fixes the problem by
	updating this test not to allocate the mutable addrmap on an obstack.

	Remove psymtab_addrmap
	While working on addrmaps, I noticed that psymtab_addrmap is no longer
	needed now.  It was introduced in ancient times as an optimization for
	DWARF, but no other symbol reader was ever updated to use it.  Now
	that DWARF does not use psymtabs, it can be deleted.

	Use malloc for mutable addrmaps
	Mutable addrmaps currently require an obstack.  This was probably done
	to avoid having to call splay_tree_delete, but examination of the code
	shows that all mutable obstacks have a limited lifetime -- now it's
	simple to treat them as ordinary C++ objects, in some cases
	stack-allocating them, and have a destructor to make the needed call.
	This patch implements this change.

	Remove addrmap::create_fixed
	addrmap::create_fixed is just a simple wrapper for 'new', so remove it
	in favor of uses of 'new'.

	Remove addrmap_create_mutable
	This removes addrmap_create_mutable in favor of using 'new' at the
	spots where the addrmap is created.

	Remove addrmap wrapper functions
	This removes the various addrmap wrapper functions in favor of simple
	method calls on the objects themselves.

	Move addrmap classes to addrmap.h
	This moves the addrmap class definitions to addrmap.h.  This is safe
	to do now that the contents are private.

	Privacy for addrmap_mutable
	This changes addrmap_mutable so that its data members are private.

	Privacy for addrmap_fixed
	This changes addrmap_fixed so that its data members are private.
	It also makes struct addrmap_transition private as well.

	Use inheritance for addrmap
	This is a simply C++-ification of the basics of addrmap: it uses
	virtual methods rather than a table of function pointers, and it
	changes the concrete implementations to be subclasses.

2022-06-12  Jon Turney  <jon.turney@dronecode.org.uk>

	Trivial fixes to Cygwin build after 8fea1a81
	* Remove a stray semicolon
	* Restore dropped nullptr program argument in use of create_process() under CYGWIN

	Simplify __USEWIDE
	Prior to c6ca3dab dropping support for Cygwin 1.5, __USEWIDE was not
	defined for Cygwin 1.5.  After that, it's always defined if __CYGWIN__
	is, so remove __USEWIDE conditionals inside __CYGWIN__ conditionals.

	Simplify cygwin_buf_t
	Prior to c6ca3dab dropping support for Cygwin 1.5, cygwin_buf_t was
	defined as char for Cygwin 1.5.  After that, it's always wchar_t, so
	just use that.

2022-06-12  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-11  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-10  Tom Tromey  <tom@tromey.com>

	Fix warning-avoidance initialization in xcoffread.c
	With the registry rewrite series, on Fedora 34, I started seeing this
	error in xcoffread.c:

	../../binutils-gdb/gdb/xcoffread.c: In function ‘void read_xcoff_symtab(objfile*, legacy_psymtab*)’:
	../../binutils-gdb/gdb/xcoffread.c:948:25: error: ‘main_aux’ is used uninitialized [-Werror=uninitialized]
	  948 |   union internal_auxent fcn_aux_saved = main_aux;
	      |                         ^~~~~~~~~~~~~
	../../binutils-gdb/gdb/xcoffread.c:933:25: note: ‘main_aux’ declared here
	  933 |   union internal_auxent main_aux;
	      |                         ^~~~~~~~

	I don't know why this error started suddenly... that seems weird,
	because it's not obviously related to the changes I made.

	Looking into it, it seems this line was intended to avoid a similar
	warning -- but since 'main_aux' is uninitialized at the point where it
	is used, this fix was incomplete.

	This patch avoids the warning by initializing using "{}".  I'm
	checking this in.

2022-06-10  Carl Love  <cel@us.ibm.com>

	Fix comparison of unsigned long int to int in record_linux_system_call.
	The if statement in case gdb_sys_ioctl in function
	record_linux_system_call in file gdb/linux-record.c is as follows:

	   if (tmpulongest == tdep->ioctl_FIOCLEX
	      || tmpulongest == tdep->ioctl_FIONCLEX
	    ....
	      || tmpulongest == tdep->ioctl_TCSETSW
	     ...
	   }

	The PowerPC ioctl value for ioctl_TCSETW is 0x802c7415.  The variable
	ioctl_TCSETW is defined in gdb/linux-record.h as an int.  The TCSETW value
	has the MSB set to one so it is a negative integer.  The comparison of the
	unsigned long value tmpulongest to a negative integer value for
	ioctl_TCSETSW fails.

	This patch changes the declarations for the ioctl_* values in struct
	linux_record_tdep to unsigned long to fix the comparisons between
	tmpulongest and the tdep->ioctl_* values.

	An additional test gdb.reverse/test_ioctl_TCSETSW.exp is added to verify
	the gdb record_linux_system_call() if statement for the ioctl TCSETSW
	succeeds.

	This patch has been tested on Power 10 and Intel with no test failures.

2022-06-10  Carl Love  <cel@us.ibm.com>

	PowerPC, correct the gdb ioctl values for TCGETS, TCSETS, TCSETSW and TCSETSF.
	Some of the ioctl numbers are based on the size of kernel termios structure.
	Currently the PowerPC GDB definitions are "hard coded" into the ioctl
	number.

	The current PowerPC values for TCGETS, TCSETS, TCSETSW and TCSETSF are
	defined in gdb/ppc-linux-tdep.c as:

	  record_tdep->ioctl_TCGETS = 0x403c7413;
	  record_tdep->ioctl_TCSETS = 0x803c7414;
	  record_tdep->ioctl_TCSETSW = 0x803c7415;
	  record_tdep->ioctl_TCSETSF = 0x803c7416;

	Where the termios structure size is in hex digits [5:4] as 0x3c.

	The definition for the PowerPC termios structure is given in:
	  arch/powerpc/include/uapi/asm/termbits.h

	The size of the termios data structure in this file is 0x2c not 0x3c.

	This patch changes the hex digits for the size of the PowerPC termios size
	in the ioctl values for TCGETS, TCSETS, TCSETSW and TCSETSF to 0x2c.
	This patch also changes the hard coding to generate the number based on a
	it easier to update the ioctl numbers.

2022-06-10  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: remove definition of true/false from gdb_compiler_info
	Since pretty much forever the get_compiler_info function has included
	these lines:

	    # Most compilers will evaluate comparisons and other boolean
	    # operations to 0 or 1.
	    uplevel \#0 { set true 1 }
	    uplevel \#0 { set false 0 }

	These define global variables true (to 1) and false (to 0).

	It seems odd to me that these globals are defined in
	get_compiler_info, I guess maybe the original thinking was that if a
	compiler had different true/false values then we would detect it there
	and define true/false differently.

	I don't think we should be bundling this logic into get_compiler_info,
	it seems weird to me that in order to use $true/$false a user needs to
	first call get_compiler_info.

	It would be better I think if each test script that wants these
	variables just defined them itself, if in the future we did need
	different true/false values based on compiler version then we'd just
	do:

	  if { [test_compiler_info "some_pattern"] } {
	    # Defined true/false one way...
	  } else {
	    # Defined true/false another way...
	  }

	But given the current true/false definitions have been in place since
	at least 1999, I suspect this will not be needed any time soon.

	Given that the definitions of true/false are so simple, right now my
	suggestion is just to define them in each test script that wants
	them (there's not that many).  If we ever did need more complex logic
	then we can always add a function in gdb.exp that sets up these
	globals, but that seems overkill for now.

	There should be no change in what is tested after this commit.

2022-06-10  Luis Machado  <luis.machado@arm.com>

	Document the ARM_CC_FOR_TARGET testsuite variable
	This variable is useful when exercising AArch64 multi-arch support (debugging
	32-bit AArch32 executables).

	Unfortunately it isn't well documented. This patch adds information about it
	and explains how to use it.

2022-06-10  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix XPASS with gcc-12 in gdb.base/vla-struct-fields.exp
	With gcc-12, I get for test-case gdb.base/vla-struct-fields.exp:
	...
	(gdb) print inner_vla_struct_object_size == sizeof(inner_vla_struct_object)^M
	$7 = 1^M
	(gdb) XPASS: gdb.base/vla-struct-fields.exp: size of inner_vla_struct_object
	...

	Fix this by limiting the xfailing to gcc-11 and earlier.  Also, limit the
	xfailing to the equality test.

	Tested on x86_64-linux.

2022-06-10  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix timeout in gdb.ada/ghost.exp
	On openSUSE Tumbleweed with gcc-12, I run into a timeout:
	...
	(gdb) print value^M
	Multiple matches for value^M
	[0] cancel^M
	[1] ada.strings.maps.value (<ref> ada.strings.maps.character_mapping; \
	    character) return character at a-strmap.adb:599^M
	[2] pck.value at src/gdb/testsuite/gdb.ada/ghost/pck.ads:17^M
	[3] system.object_reader.value (<ref> system.object_reader.object_symbol) \
	    return system.object_reader.uint64 at s-objrea.adb:2279^M
	[4] system.traceback.symbolic.value (system.address) return string at \
	    s-trasym.adb:200^M
	> FAIL: gdb.ada/ghost.exp: print value (timeout)
	print ghost_value^M
	Argument must be choice number^M
	(gdb) FAIL: gdb.ada/ghost.exp: print ghost_value
	...

	Fix this by prefixing value (as well as the other printed values) with the
	package name:
	...
	(gdb) print pck.value^M
	...

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29055

2022-06-10  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-09  Tom Tromey  <tromey@adacore.com>

	Minor fix to Python breakpoint event documentation
	I noticed that the Python event documentation referred to the event's
	"breakpoint" field as a function, whereas it is actually an attribute.
	This patch fixes the error.

2022-06-09  Andrew Burgess  <aburgess@redhat.com>

	gdb/aarch64: fix 32-bit arm compatibility
	GDB's ability to run 32-bit ARM processes on an AArch64 native target
	is currently broken.  The test gdb.multi/multi-arch.exp currently
	fails with a timeout.

	The cause of these problems is the following three functions:

	  aarch64_linux_nat_target::thread_architecture
	  aarch64_linux_nat_target::fetch_registers
	  aarch64_linux_nat_target::store_registers

	What has happened, over time, is that these functions have been
	modified, forgetting that any particular thread (running on the native
	target) might be an ARM thread, or might be an AArch64 thread.

	The problems always start with a line similar to this:

	  aarch64_gdbarch_tdep *tdep
	    = (aarch64_gdbarch_tdep *) gdbarch_tdep (inf->gdbarch);

	The problem with this line is that if 'inf->gdbarch' is an ARM
	architecture, then gdbarch_tdep will return a pointer to an
	arm_gdbarch_tdep object, not an aarch64_gdbarch_tdep object.  The
	result of the above cast will, as a consequence, be undefined.

	In aarch64_linux_nat_target::thread_architecture, after the undefined
	cast we then proceed to make use of TDEP, like this:

	  if (vq == tdep->vq)
	    return inf->gdbarch;

	Obviously at this point the result is undefined, but, if this check
	returns false we then proceed with this code:

	  struct gdbarch_info info;
	  info.bfd_arch_info = bfd_lookup_arch (bfd_arch_aarch64, bfd_mach_aarch64);
	  info.id = (int *) (vq == 0 ? -1 : vq);
	  return gdbarch_find_by_info (info);

	As a consequence we will return an AArch64 gdbarch object for our ARM
	thread!  Things go downhill from there on.

	There are similar problems, with similar undefined behaviour, in the
	fetch_registers and store_registers functions.

	The solution is to make use of a check like this:

	  if (gdbarch_bfd_arch_info (inf->gdbarch)->bits_per_word == 32)

	If the word size is 32 then we know we have an ARM architecture.  We
	just need to make sure that we perform this check before trying to
	read the tdep field.

	In aarch64_linux_nat_target::thread_architecture a little reordering,
	and the addition of the above check allows us to easily avoid the
	undefined behaviour.

	For fetch_registers and store_registers I made the decision to split
	each of the functions into two new helper functions, and so
	aarch64_linux_nat_target::fetch_registers now calls to either
	aarch64_fetch_registers or aarch32_fetch_registers, and there's a
	similar change for store_registers.

	One thing I had to decide was whether to place the new aarch32_*
	functions into the aarch32-linux-nat.c file.  In the end I decided to
	NOT place the functions there, but instead leave them in
	aarch64-linux-nat.c, my reasoning was this:

	The existing functions in that file are shared from arm-linux-nat.c
	and aarch64-linux-nat.c, this generic code to support 32-bit ARM
	debugging from either native target.

	In contrast, the two new aarch32 functions I have added _only_ make
	sense when debugging on an AArch64 native target.  These function
	shouldn't be called from arm-linux-nat.c at all, and so, if we places
	the functions into aarch32-linux-nat.c, the functions would be built
	into a 32-bit ARM GDB, but never used.

	With that said, there's no technical reason why they couldn't go in
	aarch32-linux-nat.c, so if that is preferred I'm happy to move them.

	After this commit the gdb.multi/multi-arch.exp passes.

2022-06-09  Yvan Roux  <yvan.roux@foss.st.com>

	gdb/arm: Document and fix exception stack offsets
	Add a description of exception entry context stacking and fix next
	frame offset (at 0xA8 relative to R0 location) as well as FPU
	registers ones (starting at 0x68 relative to R0).

	gdb/arm: Simplify logic for updating addresses
	Small performance improvement by fetching previous SP value only
	once before the loop and reuse it to avoid fetching at every
	iteration.

2022-06-09  Pedro Alves  <pedro@palves.net>

	Fix ARM_CC_FOR_TARGET handling
	The previous patch that introduced the arm_cc_for_target procedure
	moved the ARM_CC_FOR_TARGET global check to that procedure, but forgot
	to tell tcl that ARM_CC_FOR_TARGET is a global.  As a result,
	specifying ARM_CC_FOR_TARGET on the command line actually does
	nothing.  This fixes it.

	Change-Id: I4e33b7633fa665e2f7b8f8c9592a949d74a19153

2022-06-09  Yvan Roux  <yvan.roux@foss.st.com>

	gdb/arm: Terminate unwinding when LR is 0xffffffff
	ARMv7-M Architecture Reference "A2.3.1 Arm core registers" states
	that LR is set to 0xffffffff on reset.

	ARMv8-M Architecture Reference "B3.3 Registers" states that LR is set
	to 0xffffffff on warm reset if Main Extension is implemented,
	otherwise the value is unknown.

2022-06-09  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: solve problems with compiler_info caching
	After this commit:

	  commit 44d469c5f85a4243462b8966722dafa62b602bf5
	  Date:   Tue May 31 16:43:44 2022 +0200

	      gdb/testsuite: add Fortran compiler identification to GDB

	Some regressions were noticed:

	  https://sourceware.org/pipermail/gdb-patches/2022-May/189673.html

	The problem is associated with how compiler_info variable is cached
	between calls to get_compiler_info.

	Even before the above commit, get_compiler_info supported two
	language, C and C++.  Calling get_compiler_info would set the global
	compiler_info based on the language passed as an argument to
	get_compiler_info, and, in theory, compiler_info would not be updated
	for the rest of the dejagnu run.

	This obviously is slightly broken behaviour.  If the first call to
	get_compiler_info was for the C++ language then compiler_info would be
	set based on the C++ compiler in use, while if the first call to
	get_compiler_info was for the C language then compiler_info would be
	set based on the C compiler.

	This probably wasn't very noticable, assuming a GCC based test
	environment then in most cases the C and C++ compiler would be the
	same version.

	However, if the user starting playing with CC_FOR_TARGET or
	CXX_FOR_TARGET, then they might not get the behaviour they expect.

	Except, to make matters worse, most of the time, the user probably
	would get the behaviour they expected .... except when they didn't!
	I'll explain:

	In gdb.exp we try to avoid global variables leaking between test
	scripts, this is done with the help of the two procs
	gdb_setup_known_globals and gdb_cleanup_globals.  All known globals
	are recorded before a test script starts, and then, when the test
	script ends, any new globals are deleted.

	Normally, compiler_info is only set as a result of a test script
	calling get_compiler_info or test_compiler_info.  This means that the
	compiler_info global will not exist when the test script starts, but
	will exist when the test script end, and so, the compiler_info
	variable is deleted at the end of each test.

	This means that, in reality, the compiler_info is recalculated once
	for each test script, hence, if a test script just checks on the C
	compiler, or just checks on the C++ compiler, then compiler_info will
	be correct and the user will get the behaviour they expect.

	However, if a single test script tries to check both the C and C++
	compiler versions then this will not work (even before the above
	commit).

	The situation is made worse be the behaviour or the load_lib proc.
	This proc (provided by dejagnu) will only load each library once.
	This means that if a library defines a global, then this global would
	normally be deleted at the end of the first test script that includes
	the library.

	As future attempts to load the library will not actually reload it,
	then the global will not be redefined and would be missing for later
	test scripts that also tried to load that library.

	To work around this issue we override load_lib in gdb.exp, this new
	version adds all globals from the newly loaded library to the list of
	globals that should be preserved (not deleted).

	And this is where things get interesting for us.  The library
	trace-support.exp includes calls, at the file scope, to things like
	is_amd64_regs_target, which cause get_compiler_info to be called.
	This means that after loading the library the compiler_info global is
	defined.

	Our override of load_lib then decides that this new global has to be
	preserved, and adds it to the gdb_persistent_globals array.

	From that point on compiler_info will never be recomputed!

	This commit addresses all the caching problems by doing the following:

	Change the compiler_info global into compiler_info_cache global.  This
	new global is an array, the keys of this array will be each of the
	supported languages, and the values will be the compiler version for
	that language.

	Now, when we call get_compiler_info, if the compiler information for
	the specific language has not been computed, then we do that, and add
	it to the cache.

	Next, compiler_info_cache is defined by calling
	gdb_persistent_global.  This automatically adds the global to the list
	of persistent globals.  Now the cache will not be deleted at the end
	of each test script.

	This means that, for a single test run, we will compute the compiler
	version just once for each language, this result will then be cached
	between test scripts.

	Finally, the legacy 'gcc_compiled' flag is now only set when we call
	get_compiler_info with the language 'c'.  Without making this change
	the value of 'gcc_compiled' would change each time a new language is
	passed to get_compiler_info.  If the last language was e.g. Fortran,
	then gcc_compiled might be left false.

2022-06-09  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: handle errors better in test_compiler_info
	Now that get_compiler_info might actually fail (if the language is not
	handled), then we should try to handle this failure better in
	test_compiler_info.

	After this commit, if get_compiler_info fails then we will return a
	suitable result depending on how the user called test_compiler_info.

	If the user does something like:

	  set version [test_compiler_info "" "unknown-language"]

	Then test_compiler_info will return an empty string.  My assumption is
	that the user will be trying to match 'version' against something, and
	the empty string hopefully will not match.

	If the user does something like:

	  if { [test_compiler_info "some_pattern" "unknown-language"] } {
	    ....
	  }

	Then test_compiler_info will return false which seems the obvious
	choice.

	There should be no change in the test results after this commit.

2022-06-09  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: make 'c' default language for get/test compiler info
	This commit is a minor cleanup for the two functions (in gdb.exp)
	get_compiler_info and test_compiler_info.

	Instead of using the empty string as the default language, and just
	"knowing" that this means the C language.  Make this explicit.  The
	language argument now defaults to "c" if not specified, and the if
	chain in get_compiler_info that checks the language not explicitly
	handles "c" and gives an error for unknown languages.

	This is a good thing, now that the API appears to take a language, if
	somebody does:

	  test_compiler_info "xxxx" "rust"

	to check the version of the rust compiler then we will now give an
	error rather than just using the C compiler and leaving the user
	having to figure out why they are not getting the results they
	expect.

	After a little grepping, I think the only place we were explicitly
	passing the empty string to either get_compiler_info or
	test_compiler_info was in gdb_compile_shlib_1, this is now changed to
	pass "c" as the default language.

	There should be no changes to the test results after this commit.

2022-06-09  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: remove get_compiler_info calls from gdb.exp and dwarf.exp
	We don't need to call get_compiler_info before calling
	test_compiler_info; test_compiler_info includes a call to
	get_compiler_info.

	This commit cleans up lib/gdb.exp and lib/dwarf.exp a little by
	removing some unneeded calls to get_compiler_info.  We could do the
	same cleanup throughout the testsuite, but I'm leaving that for
	another day.

	There should be no change in the test results after this commit.

2022-06-09  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	gdb/testsuite: use test_compiler_info in gcc_major_version
	The procedure gcc_major_version was earlier using the global variable
	compiler_info to retrieve gcc's major version.  This is discouraged and
	(as can be read in a comment in compiler.c) compiler_info should be
	local to get_compiler_info and test_compiler_info.

	The preferred way of getting the compiler string is via calling
	test_compiler_info without arguments.  Gcc_major_version was changed to
	do that.

2022-06-09  Yvan Roux  <yvan.roux@foss.st.com>

	gdb: add Yvan Roux to gdb/MAINTAINERS

2022-06-09  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: resolve duplicate test names in gdb.threads/tls.exp
	While running the gdb.threads/tls.exp test with a GDB configured
	without Python, I noticed some duplicate test names.

	This is caused by a call to skip_python_tests that is within a proc
	that is called multiple times by the test script.  Each call to
	skip_python_tests results in a call to 'unsupported', and this causes
	the duplicate test names.

	After this commit we now call skip_python_tests just once and place
	the result into a variable.  Now, instead of calling skip_python_tests
	multiple times, we just check the variable.

	There should be no change in what is tested after this commit.

2022-06-09  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: resolve duplicate test name in gnu_vector.exp
	While testing on AArch64 I spotted a duplicate test name in the
	gdb.base/gnu_vector.exp test.

	This commit adds a 'with_test_prefix' to resolve the duplicate.

	While I was in the area I updated a 'gdb_test_multiple' call to make
	use of $gdb_test_name.

	There should be no change in what is tested after this commit.

2022-06-09  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-08  Andrew Burgess  <aburgess@redhat.com>

	gdb: make throw_perror_with_name static
	The throw_perror_with_name function is not used outside of utils.c
	right now.  And as perror_with_name is just a wrapper around
	throw_perror_with_name, then any future calls would be to
	perror_with_name.

	Lets make throw_perror_with_name static.

	There should be no user visible changes after this commit.

2022-06-08  Andrew Burgess  <aburgess@redhat.com>

	gdb: remove trailing '.' from perror_with_name calls
	I ran into this error while working on AArch64 GDB:

	  Unable to fetch VFP registers.: Invalid argument.

	Notice the '.:' in the middle of this error message.

	This is because of this call in aarch64-linux-nat.c:

	  perror_with_name (_("Unable to fetch VFP registers."));

	The perror_with_name function take a string, and adds ': <message>' to
	the end the string, so I don't think the string that we pass to
	perror_with_name should end in '.'.

	This commit removes all of the trailing '.' characters from
	perror_with_name calls, which give more readable error messages.

	I don't believe that any of these errors are tested in the
	testsuite (after a little grepping).

2022-06-08  Tom Tromey  <tom@tromey.com>

	Move CU queue to dwarf2_per_objfile
	The CU queue is a member of dwarf2_per_bfd, but it is only used when
	expanding CUs.  Also, the dwarf2_per_objfile destructor checks the
	queue -- however, if the per-BFD object is destroyed first, this will
	not work.  This was pointed out Lancelot as fallout from the patch to
	rewrite the registry system.

	This patch avoids this problem by moving the queue to the per-objfile
	object.

2022-06-08  Tom Tromey  <tom@tromey.com>

	Change allocation of m_dwarf2_cus
	m_dwarf2_cus manually manages the 'dwarf2_cu' pointers it owns.  This
	patch simplifies the code by changing it to use unique_ptr.

2022-06-08  Andrew Burgess  <aburgess@redhat.com>

	libopcodes: extend the styling within the i386 disassembler
	The i386 disassembler is pretty complex.  Most disassembly is done
	indirectly; operands are built into buffers within a struct instr_info
	instance, before finally being printed later in the disassembly
	process.

	Sometimes the operand buffers are built in a different order to the
	order in which they will eventually be printed.

	Each operand can contain multiple components, e.g. multiple registers,
	immediates, other textual elements (commas, brackets, etc).

	When looking for how to apply styling I guess the ideal solution would
	be to move away from the operands being a single string that is built
	up, and instead have each operand be a list of "parts", where each
	part is some text and a style.  Then, when we eventually print the
	operand we would loop over the parts and print each part with the
	correct style.

	But it feels like a huge amount of work to move from where we are
	now to that potentially ideal solution.  Plus, the above solution
	would be pretty complex.

	So, instead I propose a .... different solution here, one that works
	with the existing infrastructure.

	As each operand is built up, piece be piece, we pass through style
	information.  This style information is then encoded into the operand
	buffer (see below for details).  After this the code can continue to
	operate as it does right now in order to manage the set of operand
	buffers.

	Then, as each operand is printed we can split the operand buffer into
	chunks at the style marker boundaries, with each chunk being printed
	with the correct style.

	For encoding the style information I use a single character, currently
	\002, followed by the style encoded as a single hex digit, followed
	again by the \002 character.

	This of course relies on there not being more than 16 styles, but that
	is currently true, and hopefully will remain true for the foreseeable
	future.

	The other major concern that has arisen around this work is whether
	the escape character could ever be encountered in output naturally
	generated by the disassembler.  If this did happen then the escape
	characters would be stripped from the output, and the wrong styling
	would be applied.

	However, I don't believe that this is currently a problem.
	Disassembler content comes from a number of sources.  First there's
	content that copied directly from the i386-dis.c file, this is things
	like register names, and other syntax elements (brackets, commas,
	etc).  We can easily check that the i386-dis.c file doesn't contain
	our special character.

	The next source of content are immediate operands.  The text for these
	operands is generated by calls into libc.  By selecting a
	non-printable character we can be confident that this is not something
	that libc will generate as part of an immediate representation.

	The other output that appears to be from the disassembler is operands
	that contain addresses and (possibly) symbol names.  It is quite
	possible that a symbol name might contain any special character we
	could imagine, so is this a problem?

	I don't think it is, we don't actually print address and symbol
	operands through the disassembler, instead, the disassembler calls
	back to the user (objdump, gdb, etc) to print the address and symbol
	on its behalf.  This content is printed directly to the output stream,
	it does not pass through the i386 disassembler output buffers.  As a
	result, we never check this particular output for styling escape
	characters.

	In some (not very scientific) benchmarking on my machine,
	disassembling a reasonably large (142M) shared library, I'm not seeing
	any significant slow down in disassembler speed with this change.

	Most instructions are now being fully syntax highlighted when I
	disassemble using the --disassembler-color=extended-color option.  I'm
	sure that there are probably still a few corner cases that need fixing
	up, but we can come back to them later I think.

	When disassembler syntax highlighting is not being used, then there
	should be no user visible changes after this commit.

2022-06-08  Carl Love  <cel@us.ibm.com>

	Fix gdb.arch/powerpc-power7.exp isel disassembly output.
	The following commit changes the output format for the isel instruction on
	PowerPC.

	   commit dd4832bf3efc1bd1797a6b9188260692b8b0db52     Introduces error in test
	   Author: Dmitry Selyutin <ghostmansd@gmail.com>
	   Date:   Tue May 24 13:46:35 2022 +0000

	       opcodes: introduce BC field; fix isel

	       Per Power ISA Version 3.1B 3.3.12, isel uses BC field rather than CRB
	       field present in binutils sources. Also, per 1.6.2, BC has the same
	       semantics as BA and BB fields, so this should keep the same flags and
	       mask, only with the different offset.

	       opcodes/
	               * ppc-opc.c
	               (BC): Define new field, with the same definition as CRB field,
	               but with the PPC_OPERAND_CR_BIT flag present.
	       gas/
	               * testsuite/gas/ppc/476.d: Update.
	               * testsuite/gas/ppc/a2.d: Update.
	               * testsuite/gas/ppc/e500.d: Update.
	               * testsuite/gas/ppc/power7.d: Update.
	  <snip>
	   --- a/gas/testsuite/gas/ppc/476.d
	   +++ b/gas/testsuite/gas/ppc/476.d
	   @@ -209,7 +209,7 @@ Disassembly of section \.text:
	    .*:    (7c 20 07 8c|8c 07 20 7c)       ici     1
	    .*:    (7c 03 27 cc|cc 27 03 7c)       icread  r3,r4
	    .*:    (50 83 65 36|36 65 83 50)       rlwimi  r3,r4,12,20,27
	    -.*:    (7c 43 27 1e|1e 27 43 7c)       isel    r2,r3,r4,28
	    +.*:    (7c 43 27 1e|1e 27 43 7c)       isel    r2,r3,r4,4\*cr7\+lt

	The above change breaks the gdb regression test gdb.arch/powerpc-power7.exp
	on Power 7, Power 8, Power 9 and Power 10.

	This patch updates the regression test gdb.arch/powerpc-power7.exp with
	the new expected output for the isel instruction.

	The patch has been tested on Power 7 and Power 10 to verify the patch fixes
	the test.

2022-06-08  Pedro Alves  <pedro@palves.net>

	aarch64: Add fallback if ARM_CC_FOR_TARGET not set
	On Aarch64, you can set ARM_CC_FOR_TARGET to point to the 32-bit
	compiler to use when testing gdb.multi/multi-arch.exp and
	gdb.multi/multi-arch-exec.exp.  If you don't set it, then those
	testcases don't run.

	I guess that approximately nobody remembers to set ARM_CC_FOR_TARGET.

	This commit adds a fallback.  If ARM_CC_FOR_TARGET is not set, and
	testing for Linux, try arm-linux-gnueabi-gcc,
	arm-none-linux-gnueabi-gcc, arm-linux-gnueabihf-gcc as 32-bit
	compilers, making sure that the produced executable runs on the target
	machine before claiming that the compiler produces useful executables.

	Change-Id: Iefe5865d5fc84b4032eaff7f4c5c61582bf75c39

2022-06-08  Alan Modra  <amodra@gmail.com>

	Don't encode reloc.size
	I expect the encoded reloc.size field originally came from aout
	r_length ecoding, but somehow went wrong for 64-bit relocs (which
	should have been encoded as 3).  Toss all that out, just use a byte
	size instead.  The changes outside of reloc.c in this patch should
	make the code independent of how reloc.size is encoded.

		* reloc.c (struct reloc_howto_struct): Increase size field by
		one bit.  Comment.
		(HOWTO_RSIZE): Don't encode size.
		(bfd_get_reloc_size): Adjust, and make it an inline function.
		(read_reloc, write_reloc): Adjust.
		* bfd-in2.h: Regenerate.
		* aout-ns32k.c: Include libbfd.h.
		(put_reloc): Don't use howto->size directly.  Calculate r_length
		using bfd_log2 and bfd_get_reloc_size.
		* aoutx.h (swap_std_reloc_out): Likewise.
		(aout_link_reloc_link_order): Likewise.
		* i386lynx.c (swap_std_reloc_out
		* mach-o-i386.c (bfd_mach_o_i386_swap_reloc_out
		* pdp11.c (aout_link_reloc_link_order
		* coff-arm.c (coff_arm_reloc): Don't use howto->size directly,
		use bfd_get_reloc_size instead and adjust switch cases.
		* coff-i386.c (coff_i386_reloc): Similarly.
		* coff-x86_64.c (coff_amd64_reloc): Likewise.
		* cpu-ns32k.c (do_ns32k_reloc): Likewise.
		* elf32-arc.c (arc_do_relocation): Likewise.
		* elf32-arm.c (elf32_arm_final_link_relocate): Likewise.
		* elf32-bfin.c (bfin_bfd_reloc): Likewise.
		* elf32-cr16.c (cr16_elf_final_link_relocate): Likewise.
		* elf32-cris.c (cris_elf_pcrel_reloc): Likewise.
		* elf32-crx.c (crx_elf_final_link_relocate): Likewise.
		* elf32-csky.c (csky_elf_relocate_section): Likewise.
		* elf32-d10v.c (extract_rel_addend, insert_rel_addend): Likewise.
		* elf32-i386.c (elf_i386_relocate_section): Likewise.
		* elf32-m32r.c (m32r_elf_generic_reloc): Likewise.
		* elf32-nds32.c (nds32_elf_generic_reloc): Likewise.
		* syms.c (_bfd_stab_section_find_nearest_line): Likewise.
		* coff-rs6000.c (xcoff_ppc_relocate_section): Adjust howto.size.
		* coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.

2022-06-08  Alan Modra  <amodra@gmail.com>

	bfin reloc offset checks
	These all ought to use bfd_reloc_offset_in_range.  In particular, replace
	the check using howto->size + 1u.

		* elf32-bfin.c (bfin_pcrel24_reloc): Use bfd_reloc_offset_in_range.
		(bfin_imm16_reloc, bfin_byte4_reloc, bfin_bfd_reloc),
		(bfin_final_link_relocate): Likewise.

2022-06-08  Alan Modra  <amodra@gmail.com>

	Revert reloc howto nits
	The "HOWTO size encoding" patch put 1 as the HOWTO size arg for
	numerous howtos that are unused, describe dynamic relocs, are markers,
	or otherwise are special purpose reloc howtos that don't care about
	the size.  The idea was to ensure no howto changed by inspecting
	object files.  Revert those changes, making them zero size.

		* coff-alpha.c: Give special purpose reloc howtos a size of zero.
		* coff-mcore.c, * elf-hppa.h, * elf-m10300.c, * elf32-arm.c,
		* elf32-csky.c, * elf32-m32c.c, * elf32-m68k.c, * elf32-mep.c,
		* elf32-mips.c, * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c,
		* elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c, *elf32-vax.c,
		* elf32-xtensa.c, * elf64-alpha.c, * elf64-mips.c,
		* elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elfn32-mips.c,
		* elfxx-loongarch.c, * elfxx-riscv.c, * elfxx-sparc.c,
		* elfxx-tilegx.c, * som.c, * vms-alpha.c: Likewise.

2022-06-08  Alan Modra  <amodra@gmail.com>

	HOWTO size encoding
	This changes the HOWTO macro to encode the howto.size field from a
	value given in bytes.  This of course requires editing all target
	uses of HOWTO, a major pain, but makes it a little nicer to specify
	new target HOWTOs.  Object files before/after this patch are
	unchanged in .data and .rodata.

	bfd/
		* reloc.c (HOWTO_RSIZE): Encode size in bytes.
		(EMPTY_HOWTO): Adjust to keep it all zero.
		* aout-ns32k.c, * aoutx.h, * coff-alpha.c, * coff-arm.c,
		* coff-i386.c, * coff-mcore.c, * coff-mips.c, * coff-rs6000.c,
		* coff-sh.c, * coff-tic30.c, * coff-tic4x.c, * coff-tic54x.c,
		* coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c,
		* elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf32-arc.c,
		* elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c,
		* elf32-cris.c, * elf32-crx.c, * elf32-csky.c, * elf32-d10v.c,
		* elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
		* elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-gen.c,
		* elf32-h8300.c, * elf32-i386.c, * elf32-ip2k.c, * elf32-iq2000.c,
		* elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c,
		* elf32-m68hc12.c, * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c,
		* elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c,
		* elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
		* elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c,
		* elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s12z.c,
		* elf32-s390.c, * elf32-score.c, * elf32-score7.c,
		* elf32-sh-relocs.h, * elf32-spu.c, * elf32-tic6x.c,
		* elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
		* elf32-visium.c, * elf32-wasm32.c, * elf32-xc16x.c,
		* elf32-xgate.c, * elf32-xstormy16.c, * elf32-xtensa.c,
		* elf32-z80.c, * elf64-alpha.c, * elf64-bpf.c, * elf64-gen.c,
		* elf64-mips.c, * elf64-mmix.c, * elf64-nfp.c, * elf64-ppc.c,
		* elf64-s390.c, * elf64-x86-64.c, * elfn32-mips.c,
		* elfnn-aarch64.c, * elfxx-ia64.c, * elfxx-loongarch.c,
		* elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c,
		* elfxx-tilegx.c, * mach-o-aarch64.c, * mach-o-arm.c,
		* mach-o-i386.c, * mach-o-x86-64.c, * pdp11.c, * reloc.c,
		* som.c, * vms-alpha.c: Adjust all uses of HOWTO.
		* bfd-in2.h: Regenerate.
	include/
		* elf/arc-reloc.def: Adjust all uses of HOWTO.

2022-06-08  Alan Modra  <amodra@gmail.com>

	HOWTO_RSIZE
	Define a helper macro for HOWTO.

	       * reloc.c (HOWTO_RSIZE): Define.
	       (HOWTO): Use it.
	       * bfd-in2.h: Regenerate.

2022-06-08  Alan Modra  <amodra@gmail.com>

	elf64-nfp reloc fix
	These are all dummy howtos, there is no reason one of them should
	have partial_inplace true.

		* elf64-nfp.c (elf_nfp_howto_table <R_NFP_IMMED_LO16_I_B>): Don't
		set partial_inplace.

2022-06-08  Alan Modra  <amodra@gmail.com>

	coff-z80 reloc howto fixes
	Mostly cosmetic unless attempting to link coff-z80 into another output
	format.

		* coff-z80.c (howto_table <R_IMM24, R_WORD0, R_WORD1>): Correct size.
		(extra_case): Use bfd_{get,put}_24 when applying R_IMM24.

2022-06-08  Alan Modra  <amodra@gmail.com>

	NONE reloc fixes
	Make them all zero size standard do-nothing howtos.

		* elf32-csky.c (csky_elf_howto_table <R_CKCORE_NONE>): Correct howto.
		* elf32-ft32.c (ft32_elf_howto_table <R_FT32_NONE>): Likewise.
		* elf32-gen.c (dummy): Likewise.
		* elf32-nds32.c (none_howto): Likewise.
		* elf32-nios2.c (elf_nios2_r2_howto_table_rel <R_NIOS2_NONE>):
		Likewise.
		* elf32-pru.c (elf_pru_howto_table_rel <R_PRU_NONE>): Likewise.
		* elf32-v850.c (v800_elf_howto_table <R_V810_NONE>): Likewise.
		* elf64-gen.c (dummy): Likewise.
		* elfn32-mips.c (elf_mips_howto_table_rela <R_MIPS_NONE): Likewise.
		* elfxx-mips.c (none_howto): Likewise.
		* reloc.c (none_howto): Likewise.

2022-06-08  Alan Modra  <amodra@gmail.com>

	asan: double free sb_kill
	oss-fuzz hits a flaky crash with a double-free.  I think this is due
	to gas static state not being reinitialised between testcases, a bug
	with oss-fuzz not gas.  Anyway, this patch should avoid the problem.

		* input-scrub.c (input_scrub_push): Move init of sb_index..
		(input_scrub_reinit): ..to here.

2022-06-08  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-07  Tom Tromey  <tromey@adacore.com>

	Use subclasses of windows_process_info
	This changes windows_process_info to use virtual methods for its
	callbacks, and then changes the two clients of this code to subclass
	this class to implement the methods.

	I considered using CRTP here, but that would require making the new
	structures visible to the compilation of of nat/windows-nat.c.  This
	seemed like a bit of a pain, so I didn't do it.

	This change then lets us change all the per-inferior globals to be
	members of the new subclass.  Note that there can still only be a
	single inferior -- currently there's a single global of the new type.
	This is just another step toward possibly implementing multi-inferior
	for Windows.

	It's possible this could be cleaned up further... ideally I'd like to
	move more of the data into the base class.  However, because gdb
	supports Cygwin and gdbserver does not, and because I don't have a way
	to build or test Cygwin, larger refactorings are difficult.

2022-06-07  Tom Tromey  <tromey@adacore.com>

	Turn some windows-nat.c static functions into methods
	This patch turns some windows-nat.c static functions into methods on
	windows_nat_target.  This avoids having to reference the
	windows_nat_target singleton in some more spots -- a minor code
	cleanup.

	Allow ASLR to be disabled on Windows
	On Windows, it is possible to disable ASLR when creating a process.
	This patch adds code to do this, and hooks it up to gdb's existing
	disable-randomization feature.  Because the Windows documentation
	cautions that this isn't available on all versions of Windows, the
	CreateProcess wrapper function is updated to make the attempt, and
	then fall back to the current approach if it fails.

	Introduce wrapper for CreateProcess
	This is a small refactoring that introduces a wrapper for the Windows
	CreateProcess function.  This is done to make the next patch a bit
	simpler.

2022-06-07  Enze Li  <enze.li@hotmail.com>

	Update my email address in gdb/MAINTAINERS

2022-06-07  Tom Tromey  <tromey@adacore.com>

	Constify solib_name_from_address
	I noticed that solib_name_from_address returned a non-const string,
	but it's more appropriate to return const.  This patch implements
	this.  Tested by rebuilding.

2022-06-07  Tom de Vries  <tdevries@suse.de>

	[gdb/rust] Add missing _() for error call
	In commit 1390b65a1b9 ("[gdb/rust] Fix literal truncation") I forgot to add
	_() around a string using in an error call.

	Fix this by adding the missing _().

	Tested on x86_64-linux.

2022-06-07  Tom de Vries  <tdevries@suse.de>

	[gdb] Allow frv::fr300 in selftests
	In skip_arch in gdb/selftest-arch.c we skip architecture fr300 because of
	PR20946, but the PR has been fixed by commit 0ae60c3ef45 ("Prevent an abort in
	the FRV disassembler if the target bfd name is unknown.") in Januari 2017.

	Remove the skipping of frv::fr300.

	Tested on x86_64-linux.

2022-06-07  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-06  Tom Tromey  <tromey@adacore.com>

	Consolidate "Python API" sections in NEWS
	I noticed that the gdb NEWS file had two "Python API" sections in
	"Changes since GDB 12".  This patch consolidates the two.  I chose to
	preserve the second one, first because it is longer, and second
	because I felt that user command changes should come before API
	changes.

	Simplify varobj "change" logic
	varobj used to store 'print_value' as a C string, where NULL was a
	valid value, and so it had logic to handle this situation.  However,
	at some point this was changed to be a std::string, and so the code
	can be simplified in this spot.

2022-06-06  Tom Tromey  <tromey@adacore.com>

	Remove "-break-insert -r" tests
	PR mi/14270 points out that mi-break.exp has some tests for an
	unimplemented "-r" switch for "-break-insert".  This switch was never
	implemented, and is not documented -- though it is mentioned in a
	comment in the documentation.  This patch removes the test and the doc
	comment.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=14270

2022-06-06  Tom de Vries  <tdevries@suse.de>

	[gdb] Name arch selftests more clearly
	When running some all archs selftest I get:
	...
	$ gdb -q -batch -ex "maint selftest unpack_field_as_long"
	Running selftest unpack_field_as_long::A6.
	...

	By now I know that A6 is an arc architecture, but for others that's less
	clear.

	Fix this by using unpack_field_as_long::arc::A6 instead.

	This then introduces redundant names like arm::arm, so try to avoid those,
	though I'm not entirely convinced that that's worth the trouble.

	This introduces the following new names:
	...
	+Running selftest unpack_field_as_long::am33_2::am33-2.
	+Running selftest unpack_field_as_long::arc::A6.
	+Running selftest unpack_field_as_long::arc::A7.
	+Running selftest unpack_field_as_long::arc::EM.
	+Running selftest unpack_field_as_long::arc::HS.
	+Running selftest unpack_field_as_long::arm::ep9312.
	+Running selftest unpack_field_as_long::arm::iwmmxt.
	+Running selftest unpack_field_as_long::arm::iwmmxt2.
	+Running selftest unpack_field_as_long::arm::xscale.
	+Running selftest unpack_field_as_long::bpf::xbpf.
	+Running selftest unpack_field_as_long::frv::fr400.
	+Running selftest unpack_field_as_long::frv::fr450.
	+Running selftest unpack_field_as_long::frv::fr500.
	+Running selftest unpack_field_as_long::frv::fr550.
	+Running selftest unpack_field_as_long::frv::simple.
	+Running selftest unpack_field_as_long::frv::tomcat.
	+Running selftest unpack_field_as_long::iq2000::iq10.
	+Running selftest unpack_field_as_long::m32c::m16c.
	+Running selftest unpack_field_as_long::mep::c5.
	+Running selftest unpack_field_as_long::mep::h1.
	+Running selftest unpack_field_as_long::nds32::n1.
	+Running selftest unpack_field_as_long::nds32::n1h.
	+Running selftest unpack_field_as_long::nds32::n1h_v2.
	+Running selftest unpack_field_as_long::nds32::n1h_v3.
	+Running selftest unpack_field_as_long::nds32::n1h_v3m.
	+Running selftest unpack_field_as_long::z80::ez80-adl.
	+Running selftest unpack_field_as_long::z80::ez80-z80.
	+Running selftest unpack_field_as_long::z80::gbz80.
	+Running selftest unpack_field_as_long::z80::r800.
	+Running selftest unpack_field_as_long::z80::z180.
	...

	Tested on x86_64-linux.

2022-06-06  Tom de Vries  <tdevries@suse.de>

	[gdb] Enable some more print_one_insn selftests
	In print_one_insn_test we have this cluster of skipped tests:
	...
	    case bfd_arch_ia64:
	    case bfd_arch_mep:
	    case bfd_arch_mips:
	    case bfd_arch_tic6x:
	    case bfd_arch_xtensa:
	      return;
	...

	Enable some of these, and document in more detail why they're enabled or
	skipped.

	Likewise, document bfd_arch_or1k because it's an odd case.

	Tested on x86_64-linux.

2022-06-06  Tom de Vries  <tdevries@suse.de>

	[gdb] Fix maint selftest -v print_one_insn
	When running the print_one_insn selftests with -v, I get:
	...
	$ gdb -q -batch -ex "maint selftest -v print_one_insn"
	Running selftest print_one_insn::A6.
	.shor   0x783eRunning selftest print_one_insn::A7.
	trap_s  0x1Running selftest print_one_insn::ARC600.
	.shor   0x783eRunning selftest print_one_insn::ARC601.
	Running selftest print_one_insn::ARC700.
	trap_s  0x1Running selftest print_one_insn::ARCv2.
	trap_s  0x1Running selftest print_one_insn::EM.
	trap_s  0x1Running selftest print_one_insn::HS.
	trap_s  0x1Running selftest print_one_insn::Loongarch32.
	...

	The insn is written to gdb_stdout, and there is code in the selftest to add a
	newline after the insn, which writes to stream().

	The stream() ui_file points into a string buffer, which the disassembler uses
	before writing to gdb_stdout, so writing into it after the disassembler has
	finished has no effect.

	Fix this by using gdb_stdlog and debug_printf (which is what the unit test
	infrastructure itself uses) instead, such that we have:
	...
	Running selftest print_one_insn::A6.
	.shor   0x783e
	Running selftest print_one_insn::A7.
	trap_s  0x1
	Running selftest print_one_insn::ARC600.
	.shor   0x783e
	Running selftest print_one_insn::ARC601.
	Running selftest print_one_insn::ARC700.
	trap_s  0x1
	Running selftest print_one_insn::ARCv2.
	trap_s  0x1
	Running selftest print_one_insn::Loongarch32.
	...

	Note: I've also removed the printing of arch_name, which would give
	us otherwise the redundant:
	...
	Running selftest print_one_insn::A6.
	arc .shor       0x783e
	Running selftest print_one_insn::A7.
	arc trap_s      0x1
	...

	Tested on x86_64-linux.

2022-06-06  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: add missing skip_python_tests call in py-doc-reformat.exp
	In commit:

	  commit 51e8dbe1fbe7d8955589703140ca5eba7b4f1bd7
	  Date:   Mon May 16 19:26:54 2022 +0100

	      gdb/python: improve formatting of help text for user defined commands

	the test that was added (gdb.python/py-doc-reformat.exp) was missing a
	call to skip_python_tests.  As a result, this test would fail for any
	GDB built within Python support.

	This commit adds a call to skip_python_tests.

2022-06-06  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-05  Tom Tromey  <tom@tromey.com>

	Remove obsolete Python 2 comment
	I found a comment that referred to Python 2, but that is now obsolete
	-- the code it refers to is gone.  I'm checking in this patch to
	remove the comment.

	There's a similar comment elsewhere, but I plan to remove that one in
	another patch I'm going to submit shortly.

2022-06-05  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-04  Alan Modra  <amodra@gmail.com>

	asan: null dereference in coff_count_linenumbers
		* coffgen.c (coff_count_linenumbers): Don't segfault when asymbol
		the_bfd is NULL.

	asan: uninitialised write in bfd_mach_o_write_contents
		* mach-o.c (bfd_mach_o_write_contents): Always set
		bfd_mach_o_dyld_info_command *_off fields.

2022-06-04  Tom de Vries  <tdevries@suse.de>

	[gdb/ada] Fix literal truncation
	Make sure we error out on overflow instead of truncating in all cases.

	Tested on x86_64-linux, with a build with --enable-targets=all.

2022-06-04  Tom de Vries  <tdevries@suse.de>

	[gdb/m2] Fix UB and literal truncation
	Rewrite parse_number to use ULONGEST instead of LONGEST, to fix UB errors as
	mentioned in PR29163.

	Furthermore, make sure we error out on overflow instead of truncating in all
	cases.

	Tested on x86_64-linux, with a build with --enable-targets=all.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29163

2022-06-04  Tom de Vries  <tdevries@suse.de>

	[gdb/rust] Fix literal truncation
	Make sure we error out on overflow instead of truncating in all cases.

	I've used as overflow string: "Integer literal is too large", based
	on what I found at
	<rust-lang/rust>/src/test/ui/parser/int-literal-too-large-span.rs
	but perhaps someone has a better idea.

	Tested on x86_64-linux, with a build with --enable-targets=all.

2022-06-04  Tom de Vries  <tdevries@suse.de>

	[gdb/pascal] Fix literal truncation
	Make sure we error out on overflow instead of truncating in all cases.

	The current implementation of parse_number contains a comment about PR16377,
	but that's related to C-like languages.  In absence of information of whether
	the same fix is needed for pascal, take the conservative approach and keep
	behaviour for decimals unchanged.

	Tested on x86_64-linux, with a build with --enable-targets=all.

2022-06-04  Tom de Vries  <tdevries@suse.de>

	[gdb/go] Fix literal truncation
	Make sure we error out on overflow instead of truncating in all cases.

	The current implementation of parse_number contains a comment about PR16377,
	but that's related to C-like languages.  In absence of information of whether
	the same fix is needed for go, take the conservative approach and keep
	behaviour for decimals unchanged.

	Tested on x86_64-linux, with a build with --enable-targets=all.

2022-06-04  Tom de Vries  <tdevries@suse.de>

	[gdb/fortran] Fix literal truncation
	As mentioned in commit 5b758627a18 ("Make gdb.base/parse_number.exp test all
	architectures"):
	...
	    There might be a bug that 32-bit fortran truncates 64-bit values to
	    32-bit, given "p/x 0xffffffffffffffff" returns "0xffffffff".
	...

	More concretely, we have:
	...
	$ for arch in i386:x86-64 i386; do \
	    gdb -q -batch -ex "set arch $arch" -ex "set lang fortran" \
	      -ex "p /x 0xffffffffffffffff"; \
	  done
	The target architecture is set to "i386:x86-64".
	$1 = 0xffffffffffffffff
	The target architecture is set to "i386".
	$1 = 0xffffffff
	...

	Fix this by adding a range check in parse_number in gdb/f-exp.y.

	Furthermore, make sure we error out on overflow instead of truncating in all
	other cases.

	Tested on x86_64-linux.

2022-06-04  Tom de Vries  <tdevries@suse.de>

	[gdb/c] Fix type of 2147483648 and literal truncation
	[ Assuming arch i386:x86-64, sizeof (int) == 4,
	sizeof (long) == sizeof (long long) == 8. ]

	Currently we have (decimal for 0x80000000):
	...
	(gdb) ptype 2147483648
	type = unsigned int
	...

	According to C language rules, unsigned types cannot be used for decimal
	constants, so the type should be long instead (reported in PR16377).

	Fix this by making sure the type of 2147483648 is long.

	The next interesting case is (decimal for 0x8000000000000000):
	...
	(gdb) ptype 9223372036854775808
	type = unsigned long
	...

	According to the same rules, unsigned long is incorrect.

	Current gcc uses __int128 as type, which is allowed, but we don't have that
	available in gdb, so the strict response here would be erroring out with
	overflow.

	Older gcc without __int128 support, as well as clang use an unsigned type, but with
	a warning.  Interestingly, clang uses "unsigned long long" while gcc uses
	"unsigned long", which seems the better choice.

	Given that the compilers allow this as a convience, do the same in gdb
	and keep type "unsigned long", and make this explicit in parser and test-case.

	Furthermore, make sure we error out on overflow instead of truncating in all
	cases.

	Tested on x86_64-linux with --enable-targets=all.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=16377

2022-06-04  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Test more values in gdb.base/parse_numbers.exp
	Currently we only test value 0xffffffffffffffff in test-case
	gdb.base/parse_numbers.exp.

	Test more interesting values, both in decimal and hex format, as well as
	negative decimals for language modula-2.

	This results in an increase in total tests from 15572 to 847448 (55 times
	more tests).

	Balance out the increase in runtime by reducing the number of architectures
	tested: only test one architecture per sizeof longlong/long/int/short
	combination, while keeping the possibility intact to run with all
	architectures (through setting a variable in the test-case)

	Results in slight reduction of total tests: 15572 -> 13853.

	Document interesting cases in the expected results:
	- wrapping from unsigned to signed
	- truncation
	- PR16377: using unsigned types to represent decimal constants in C

	Running the test-case with a gdb build with -fsanitize=undefined, we trigger
	two UB errors in the modula-2 parser, filed as PR29163.

	Tested on x86_64-linux with --enable-targets=all.

2022-06-04  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix ERROR in gdb.ctf/funcreturn.exp
	On openSUSE Tumbleweed (with gcc-12, enabling ctf tests) I run into:
	...
	ERROR: tcl error sourcing src/gdb/testsuite/gdb.ctf/funcreturn.exp.
	ERROR: tcl error code NONE
	ERROR: Unexpected arguments: \
	  {print v_double_func} \
	  {[0-9]+ = {double \(\)} 0x[0-9a-z]+.*} \
	  {print double function} \
	  }
	...

	The problem is a curly brace as fourth argument to gdb_test, which errors out
	due to recently introduced more strict argument checking in gdb_test.

	Fix the error by removing the brace.

	Though this fixes the error for me, due to PR29160 I get only FAILs, so I can't
	claim proper testing on x86_64-linux.

2022-06-04  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.threads/manythreads.exp with check-read1
	When running test-case gdb.threads/manythreads.exp with check-read1, I ran
	into this hard-to-reproduce FAIL:
	...
	[New Thread 0x7ffff7318700 (LWP 31125)]^M
	[Thread 0x7ffff7321700 (LWP 31124) exited]^M
	[New T^C^M
	^M
	Thread 769 "manythreads" received signal SIGINT, Interrupt.^M
	[Switching to Thread 0x7ffff6d66700 (LWP 31287)]^M
	0x00007ffff7586a81 in clone () from /lib64/libc.so.6^M
	(gdb) FAIL: gdb.threads/manythreads.exp: stop threads 1
	...

	The matching in the failing gdb_test_multiple is done in an intricate way,
	trying to pass on some order and fail on another order.

	Fix this by rewriting the regexps to match one line at most, and detecting
	invalid order by setting and checking state variables.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29177

2022-06-04  Tom de Vries  <tdevries@suse.de>

	[gdb] Fix warning in print_one_insn::ez80-adl
	When running selftest print_one_insn::ez80-adl we run into this warning:
	...
	Running selftest print_one_insn::ez80-adl.
	warning: Unable to determine inferior's software breakpoint type: couldn't
	  find `_break_handler' function in inferior. Will be used default software \
	  breakpoint instruction RST 0x08.
	...

	Fix this by explicitly handling bfd_arch_z80 in print_one_insn_test.

	Tested on x86_64-linux.

2022-06-04  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-03  Tom Tromey  <tromey@adacore.com>

	Use bool for evregpy_no_listeners_p
	I noticed that evregpy_no_listeners_p should return a bool.  This
	patch makes this change.  I'm checking it in.

2022-06-03  Alan Modra  <amodra@gmail.com>

	asan: heap buffer overflow in _bfd_mips_elf_section_from_shdr
		* elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Sanity check
		intopt.size and remaining bytes in section for reginfo.

2022-06-03  Alan Modra  <amodra@gmail.com>

	Re: ubsan: undefined shift in frag_align_code
	This one needs the same fix too.

		* config/tc-i386.h (MAX_MEM_FOR_RS_ALIGN_CODE): Avoid signed
		integer overflow.

2022-06-03  Tom de Vries  <tdevries@suse.de>

	[gdb] Fix warning in foreach_arch selftests
	When running the selftests, I run into:
	...
	$ gdb -q -batch -ex "maint selftest"
	  ...
	Running selftest execute_cfa_program::aarch64:ilp32.
	warning: A handler for the OS ABI "GNU/Linux" is not built into this
	configuration of GDB.  Attempting to continue with the default aarch64:ilp32
	settings.
	...
	and likewise for execute_cfa_program::i8086 and
	execute_cfa_program::ia64-elf32.

	The warning can easily be reproduced outside the selftests by doing:
	...
	$ gdb -q -batch -ex "set arch aarch64:ilp32"
	...
	and can be prevented by first doing "set osabi none".

	Fix the warning by setting osabi to none while doing selftests that iterate
	over all architectures.

	This causes a regression in the print_one_insn selftests for the ARC
	architecture.

	The problem is pre-existing, and can be demonstrated (already without this
	patch) using:
	...
	$ gdb -q -batch -ex "set osabi none" -ex "maint selftest print_one_insn::A6"
	Running selftest print_one_insn::A6.
	Self test failed: Cannot access memory at address 0x0
	Ran 1 unit tests, 1 failed
	$
	...

	For ARC, we use the generic case in print_one_insn_test, containing this code:
	...
	       int kind = gdbarch_breakpoint_kind_from_pc (gdbarch, &pc);
	       ...
	       insn = gdbarch_sw_breakpoint_from_kind (gdbarch, kind, &bplen);
	...

	The problem is that with osabi linux we trigger:
	...
	static int
	arc_linux_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
	{
	  return trap_size;
	}
	...
	but with osabi none:
	...
	arc_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
	{
	  size_t length_with_limm = gdb_insn_length (gdbarch, *pcptr);
	...
	which needs access to memory, and will consequently fail.

	Fix this in print_one_insn_test, in the default case, by iterating over
	supported osabi's to makes sure we trigger arc_linux_breakpoint_kind_from_pc
	which will give us a usable instruction to disassemble.

	Tested on x86_64-linux.

2022-06-03  Tom de Vries  <tdevries@suse.de>

	Revert "[gdb] Fix warning in foreach_arch selftests"
	This reverts commit fc18b1c5afd ("[gdb] Fix warning in foreach_arch
	selftests").

	The commit introduced regressions for an --enable-targets=all build:
	...
	Running selftest print_one_insn::A6.^M
	Self test failed: Cannot access memory at address 0x0^M
	...
	and while investigating those I realized that the commit fc18b1c5afd
	complicates things by trying to set the current osabi.

	So, revert the patch in preparation for a simpler solution.

	Tested on x86_64-linux.

2022-06-03  Jan Beulich  <jbeulich@suse.com>

	x86: exclude certain ISA extensions from v3/v4 ISA
	Like TBM and LWP, XOP and FMA4 also shouldn't be included in v3.

	Like AVX512-4VNNIW, AVX512-4FMAPS also shouldn't be included in v4.

2022-06-03  Roland McGrath  <mcgrathr@google.com>

	gdb: LoongArch: Remove nonportable #include
	Don't use gregset.h in *-tdep.c since it's not usable on
	hosts that don't have <sys/procfs.h>.  It's not needed by
	this file, and should only be needed by *-nat.c files.

2022-06-03  Alan Modra  <amodra@gmail.com>

	Re: asan: mips_gprel_reloc segfault
	Similarly for the elf mips support.

		* elf32-mips.c (mips_elf_final_gp): Don't segfault on symbols
		in any of the bfd_is_const_section sections.
		* elf64-mips.c (mips_elf64_final_gp): Likewise.
		* elfn32-mips.c (mips_elf_final_gp): Likewise.

2022-06-03  Alan Modra  <amodra@gmail.com>

	asan: mips_gprel_reloc segfault
	Not just the undefined section has a NULL owner, the absolute section
	has too.  Which means we can't find output_bfd for __gp.  Also, may as
	well test directly for output_bfd == NULL.

		* coff-mips.c (mips_gprel_reloc): Don't segfault on any of
		bfd_is_const_section sections.

2022-06-03  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-02  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Detect change instead of init in gdb.mi/mi-var-block.exp
	On openSUSE Tumbleweed with target board unix/-m32, I run into:
	...
	PASS: gdb.mi/mi-var-block.exp: step at do_block_test 2
	Expecting: ^(-var-update \*[^M
	]+)?(\^done,changelist=\[{name="foo",in_scope="true",type_changed="false",has_more="0"},
	{name="cb",in_scope="true",type_changed="false",has_more="0"}\][^M
	]+[(]gdb[)] ^M
	[ ]*)
	-var-update *^M
	^done,changelist=[{name="foo",in_scope="true",type_changed="false",has_more="0"}]^M
	(gdb) ^M
	FAIL: gdb.mi/mi-var-block.exp: update all vars: cb foo changed (unexpected output)
	...

	The problem is that the test-case attempts to detect a change in the cb
	variable caused by this initialization:
	...
	void
	do_block_tests ()
	{
	  int cb = 12;
	...
	but that only works if the stack location happens to be unequal to 12 before
	the initialization.

	Fix this by first initializing to 0, and then changing the value to 12:
	...
	-  int cb = 12;
	+  int cb = 0;
	+  cb = 12;
	...
	and detecting that change.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29195

2022-06-02  Eli Zaretskii  <eliz@gnu.org>

	Rearrange and slightly reword the "Location Specification" section
	This rearranges and changes the wording of the "Location
	Specification" section of the GDB manual in minor ways.

2022-06-02  Tom Tromey  <tromey@adacore.com>

	ODR warning for "main"
	"main" is redeclared with a different type in maint.c.  I think this
	might have come from my first gdb patch, many many years ago.  While I
	wonder if this profiling code is actually useful at all any more, in
	the meantime it's simple to fix the declaration.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395

2022-06-02  Tom Tromey  <tromey@adacore.com>

	ODR warnings for "struct coff_symbol"
	"struct coff_symbol" is defined in multiple .c files, causing ODR
	warnings.  This patch renames just the xcoffread.c type.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395

2022-06-02  Tom Tromey  <tromey@adacore.com>

	ODR warnings for "struct insn_decode_record_t"
	"struct insn_decode_record_t" is defined in multiple .c files, causing
	ODR warnings.  This patch renames the types, and removes the use of
	"typedef" here -- this is a C-ism that's no longer needed.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395

2022-06-02  Tom Tromey  <tromey@adacore.com>

	ODR warnings for "struct insn_info"
	"struct insn_info" is defined in multiple .c files, causing ODR
	warnings.  This patch renames the type in z80-tdep.c, leaving the
	other one alone.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395

2022-06-02  Tom Tromey  <tromey@adacore.com>

	ODR warnings from overlay constants
	Some overlay-related constants are duplicated in z80-tdep.c, causing
	ODR warnings.  This patch renames just the z80-specific ones.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395

2022-06-02  Tom Tromey  <tromey@adacore.com>

	ODR warning for "enum string_repr_result"
	"enum string_repr_result" is defined in multiple .c files, causing ODR
	warnings.  This patch renames the types.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395

2022-06-02  Tom Tromey  <tromey@adacore.com>

	ODR warning for "struct find_targ_sec_arg"
	"struct find_targ_sec_arg" is defined in multiple .c files, causing
	ODR warnings.  This patch renames the types.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395

2022-06-02  Tom Tromey  <tromey@adacore.com>

	ODR warning for "struct stack_item"
	"struct stack_item" is defined in multiple .c files, causing ODR
	warnings.  This patch renames these types.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395

2022-06-02  Tom Tromey  <tromey@adacore.com>

	ODR warning for "struct instruction_type"
	"struct instruction_type" is defined in multiple .c files, causing an
	ODR warning.  This patch renames the types.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395

2022-06-02  Tom Tromey  <tromey@adacore.com>

	ODR warning for struct ext_link_map
	This renames the solib-dsbt.c copy of "struct ext_link_map" to avoid
	an ODR warning.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395

2022-06-02  Tom Tromey  <tromey@adacore.com>

	ODR warning for struct field_info
	This renames one of the instance of "struct field_info" to avoid an
	ODR warning.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395

2022-06-02  Tom Tromey  <tromey@adacore.com>

	ODR warnings for struct nextfield
	"struct nextfield" is defined in multiple places in GDB.  This patch
	renames just the stabs one, leaving the DWARF one untouched.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395

2022-06-02  Tom Tromey  <tromey@adacore.com>

	ODR warnings for struct symloc
	"struct symloc" is defined in multiple spots in gdb, causing ODR
	warnings.  This patch renames these.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395

2022-06-02  Tom Tromey  <tromey@adacore.com>

	Fix ODR warning in observable.h
	observable.h triggers an ODR warning because this line:

	    extern observable<struct target_ops */* target */> target_changed;

	... may be the only declaration of "struct target_ops" in scope
	(depending on the particular .c file) -- and this declares it in a
	namespace, resulting in confusion.

	This patch fixes the problem by adding a forward declaration.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395

2022-06-02  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: LoongArch: Implement the software_single_step gdbarch method
	When execute the following command on LoongArch:

	  make check-gdb TESTS="gdb.base/branch-to-self.exp"

	there exist the following failed testcases:

	  FAIL: gdb.base/branch-to-self.exp: single-step: si (timeout)
	  FAIL: gdb.base/branch-to-self.exp: break-cond: side=host: continue to breakpoint: continue to break (timeout)
	  FAIL: gdb.base/branch-to-self.exp: break-cond: side=host: p counter (timeout)

	Implement the software_single_step gdbarch method to decode the current
	branch instruction and determine the address of the next instruction on
	LoongArch to fix the above failed testcases.

2022-06-02  Ilya Leoshkevich  <iii@linux.ibm.com>

	gdb: Do not add empty sections to the section map
	From: Ulrich Weigand <ulrich.weigand@de.ibm.com>

	build_objfile_section_table () creates four synthetic sections per
	objfile, which are collected by update_section_map () and passed to
	std::sort ().  When there are a lot of objfiles, for example, when
	debugging JITs, the presence of these sections slows down the sorting
	significantly.

	The output of update_section_map () is used by find_pc_section (),
	which can never return any of these sections: their size is 0, so they
	cannot be accepted by bsearch_cmp ().

	Filter them (and all the other empty sections) out in
	insert_section_p (), which is used only by update_section_map ().

2022-06-02  Jon Turney  <jon.turney@dronecode.org.uk>

	Fix a new warning on Cygwin
	> ../../gdb/windows-nat.c: In function ‘windows_solib* windows_make_so(const char*, LPVOID)’:
	> ../../gdb/windows-nat.c:714:12: error: declaration of ‘char name [512]’ shadows a parameter [-Werror=shadow=compatible-local]
	>   714 |       char name[SO_NAME_MAX_PATH_SIZE];
	>       |            ^~~~
	> ../../gdb/windows-nat.c:655:30: note: shadowed declaration is here
	>   655 | windows_make_so (const char *name, LPVOID load_addr)
	>       |                  ~~~~~~~~~~~~^~~~

	Fix Cygwin build after 85b25bd9
	Fix Cygwin build after 85b25bd9 ("Simplify windows-nat.c solib handling").

	Fix Cygwin build after 0578e87f
	Fix Cygwin build after 0578e87f ("Remove some globals from
	nat/windows-nat.c").  Update code under ifdef __CYGWIN__ for globals
	moved to members of struct windows_process_info.

	Fix Cygwin build after fcab5839
	Fix Cygwin build after fcab5839 ("Implement pid_to_exec_file for Windows
	in gdbserver"). That change moves code from gdb/windows-nat.c to
	gdb/nat/windows-nat.c, but doesn't add the required typedefs and
	includes for parts of that code under ifdef __CYGWIN__.

2022-06-02  Alan Modra  <amodra@gmail.com>

	Re: ubsan: signed integer overflow in atof_generic
	Oops.

		* atof-generic.c: Include limits.h.

2022-06-02  Alan Modra  <amodra@gmail.com>

	ubsan: signed integer overflow in atof_generic
	Fix the signed overflows by using unsigned variables and detect
	overflow at BUG! comment.

		* atof-generic.c (atof_generic): Avoid signed integer overflow.
		Return ERROR_EXPONENT_OVERFLOW if exponent overflows a long.

2022-06-02  Alan Modra  <amodra@gmail.com>

	asan: uninit write _bfd_ecoff_write_object_contents
		* ecoff.c (_bfd_ecoff_write_object_contents): zalloc reloc_buff.

	asan: null deref in coff_write_relocs
		* coffcode.h (coff_write_relocs): Don't deref NULL howto.

	ubsan: undefined shift in frag_align_code
		* frags.c (MAX_MEM_FOR_RS_ALIGN_CODE): Avoid signed integer
		overflow.

2022-06-02  Alan Modra  <amodra@gmail.com>

	gas read_a_source_file #APP processing
	This fixes some horrible code using do_scrub_chars.  What we had ran
	text through do_scrub_chars twice, directly in read_a_source_file and
	again via the input_scrub_include_sb call.  That's silly, and since
	do_scrub_chars is a state machine, possibly wrong.  More silliness is
	evident in the temporary malloc'd buffer for do_scrub_chars output,
	which should have been written directly to sbuf.

	So, get rid of the do_scrub_chars call and support functions, leaving
	scrubbing to input_scrub_include_sb.  I did wonder about #NO_APP
	overlapping input_scrub_next_buffer buffers, but that should only
	happen if the string starts in one file and finishes in another.

		* read.c (scrub_string, scrub_string_end): Delete.
		(scrub_from_string): Delete.
		(read_a_source_file): Rewrite #APP processing.

2022-06-02  Alan Modra  <amodra@gmail.com>

	sb_scrub_and_add_sb not draining input string buffer
	It is possible for sb_scrub_and_add_sb to not consume all of the input
	string buffer.  If this happens for reasons explained in the comment,
	do_scrub_chars can leave pointers to the string buffer for the next
	call.  This patch fixes that by ensuring the input is drained.  Note
	that the behaviour for an empty string buffer is also changed,
	avoiding another do_scrub_chars bug where empty input and single char
	sized output buffers could result in a write past the end of the
	output.

		sb.c (sb_scrub_and_add_sb): Loop until all of input sb is
		consumed.

2022-06-02  Alan Modra  <amodra@gmail.com>

	asan: heap buffer overflow in dwarf2_directive_filename
	Seen with .file 4294967289 "xxx.c"

		* dwarf2dbg.c (assign_file_to_slot): Catch more cases of integer
		overflow.  Make param i an unsigned int.

2022-06-02  Alan Modra  <amodra@gmail.com>

	asan: NULL deref in scan_unit_for_symbols
	Since commit b43771b045 it has been possible to look up addresses
	that match a unit with errors, since ranges are added to a trie while
	the unit is being parsed.  On error, parse_comp_unit leaves
	first_child_die_ptr NULL which results in a NULL info_ptr being passed
	to scan_unit_for_symbols.  Fix this by setting unit->error.

	Also wrap some overlong lines, and fix some formatting errors.

		* dwarf2.c: Formatting.
		(parse_comp_unit): Set unit->error on err_exit path.

2022-06-02  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-01  Tom de Vries  <tdevries@suse.de>

	[gdb] Fix warning in foreach_arch selftests
	When running the selftests, I run into:
	...
	$ gdb -q -batch -ex "maint selftest"
	  ...
	Running selftest execute_cfa_program::aarch64:ilp32.
	warning: A handler for the OS ABI "GNU/Linux" is not built into this
	configuration of GDB.  Attempting to continue with the default aarch64:ilp32
	settings.
	...
	and likewise for execute_cfa_program::i8086 and
	execute_cfa_program::ia64-elf32.

	The warning can easily be reproduced outside the selftests by doing:
	...
	$ gdb -q -batch -ex "set arch aarch64:ilp32"
	...
	and can be prevented by first doing "set osabi none".

	Fix the warning by setting osabi to none while doing selftests that iterate
	over all architectures.

	Tested on x86_64-linux.

2022-06-01  Tom Tromey  <tromey@adacore.com>

	Add gdb.current_language and gdb.Frame.language
	This adds the gdb.current_language function, which can be used to find
	the current language without (1) ever having the value "auto" or (2)
	having to parse the output of "show language".

	It also adds the gdb.Frame.language, which can be used to find the
	language of a given frame.  This is normally preferable if one has a
	Frame object handy.

2022-06-01  Yvan Roux  <yvan.roux@foss.st.com>

	[arm] Don't use special treatment for PC
	In an exception frame the PC register is extracted from the stack
	just like other base registers, so there is no need for a special
	treatment.

	[arm] Add support for FPU registers in prologue unwinder
	The prologue unwinder had support for FPU registers, but only to
	calculate the correct offset on the stack, the values were not saved.

2022-06-01  Yvan Roux  <yvan.roux@foss.st.com>

	[arm] d0..d15 are 64-bit each, not 32-bit
	When unwinding the stack, the floating point registers d0 to d15
	need to be handled as double words, not words.

	Only the first 8 registers have been confirmed fixed with this patch
	on a STM32F407-DISC0 board, but the upper 8 registers on Cortex-M33
	should be handled in the same way.

	The test consisted of running a program compiled with float-abi=hard.
	In the main function, a function taking a double as an argument was
	called. After the function call, a hardware timer was used to
	trigger an interrupt.

	In the debug session, a breakpoint was set in the function called
	from main to verify the content of the registers using "info float"
	and another breakpoint in the interrupt handler was used to check
	the same registers using "info float" on frame 2 (the frame just
	before the dummy frame created for the signal handler in gdb).

2022-06-01  Yvan Roux  <yvan.roux@foss.st.com>

	[arm] Cleanup: use hex for offsets
	Changed offset from decimal to hex to match architecture reference
	manual terminology and keep coherency with the rest of the code.

2022-06-01  Jiangshuai Li  <jiangshuai_li@c-sky.com>

	gdb:csky save fpu and vdsp info to struct csky_gdbarch_tdep
	First, add three variables fpu_abi, fpu_hardfp and vdsp_version
	to csky_gdbarch_tdep. They will be initialized from info.abfd in
	cskg_gdbarch_init.

	Now, they are just used to find a candidate among the list of pre-declared
	architectures

	Later, they will be used in gdbarch_return_value and gdbarch_push_dummy_call
	for funtions described below:
	fpu_abi: to check if the bfd is using VAL_CSKY_FPU_ABI_HARD or
	VAL_CSKY_FPU_ABI_SOFT
	fpu_hardfp: to check if the bfd is using VAL_CSKY_FPU_HARDFP_SINGLE
	or VAL_CSKY_FPU_HARDFP_DOUBLE
	vdsp_version: to check if a function is returned with CSKY_VRET_REGNUM

2022-06-01  Alan Modra  <amodra@gmail.com>

	Re: use libiberty xmalloc in bfd/doc/chew.c
	We can't use libiberty.a in chew.  libiberty is a host library, chew
	a build program.  Partly revert commit 7273d78f3f7a, instead define
	local versions of the libiberty functions.  ansidecl.h also isn't
	needed.

		* doc/chew.c: Don't include libiberty.h or ansidecl.h.
		(xmalloc, xrealloc, xstrdup): New functions.
		* doc/local.mk (LIBIBERTY): Don't define or use.
		* Makefile.in: Regenerate.

2022-06-01  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-06-01  H.J. Lu  <hjl.tools@gmail.com>

	x86: Properly handle IFUNC function pointer reference
	Update

	commit 68c4956b1401de70173848a6bdf620cb42fa9358
	Author: H.J. Lu <hjl.tools@gmail.com>
	Date:   Tue Apr 26 09:08:54 2022 -0700

	    x86: Properly handle function pointer reference

	to properly handle IFUNC function pointer reference.  Since IFUNC symbol
	value is only known at run-time, set pointer_equality_needed for IFUNC
	function pointer reference in PDE so that it will be resolved to its PLT
	entry directly.

	bfd/

		PR ld/29216
		* elf32-i386.c (elf_i386_scan_relocs): Set pointer_equality_needed
		for IFUNC function pointer reference in PDE.
		* elf64-x86-64.c (elf_x86_64_scan_relocs): Likewise.

	ld/

		PR ld/29216
		* testsuite/ld-ifunc/ifunc.exp: Run PR ld/29216 test.
		* testsuite/ld-ifunc/pr29216.c: New file.

2022-05-31  H.J. Lu  <hjl.tools@gmail.com>

	i386: Ajdust more tests for opcodes/i386: remove trailing whitespace
	This fixes:

	FAIL: Build ifunc-1a with -z ibtplt
	FAIL: Build ifunc-1a with PIE -z ibtplt
	FAIL: Build libno-plt-1b.so
	FAIL: No PLT (dynamic 1a)
	FAIL: No PLT (dynamic 1b)
	FAIL: No PLT (dynamic 1c)
	FAIL: No PLT (static 1d)
	FAIL: No PLT (PIE 1e)
	FAIL: No PLT (PIE 1f)
	FAIL: No PLT (PIE 1g)
	FAIL: No PLT (dynamic 1h)
	FAIL: No PLT (dynamic 1i)
	FAIL: No PLT (static 1j)

		* ld-i386/libno-plt-1b.dd: Remove trailing whitespaces.
		* ld-i386/no-plt-1a.dd: Likewise.
		* ld-i386/no-plt-1b.dd: Likewise.
		* ld-i386/no-plt-1c.dd: Likewise.
		* ld-i386/no-plt-1d.dd: Likewise.
		* ld-i386/no-plt-1e.dd: Likewise.
		* ld-i386/no-plt-1f.dd: Likewise.
		* ld-i386/no-plt-1g.dd: Likewise.
		* ld-i386/no-plt-1h.dd: Likewise.
		* ld-i386/no-plt-1i.dd: Likewise.
		* ld-i386/no-plt-1j.dd: Likewise.
		* ld-i386/plt-main-ibt.dd: Likewise.
		* ld-i386/plt-pie-ibt.dd: Likewise.

2022-05-31  Tom Tromey  <tom@tromey.com>

	Use unique_ptr for objfiles
	A while back, I changed objfiles to be held via a shared_ptr.  The
	idea at the time was that this was a step toward writing to the index
	cache in the background, and this would let gdb keep a reference alive
	to do so.  However, since then we've rewritten the DWARF reader, and
	the new index can do this without requiring a shared pointer -- in
	fact there are patches pending to implement this.

	This patch switches objfile management to unique_ptr, which makes more
	sense now.

	Regression tested on x86-64 Fedora 34.

2022-05-31  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	gdb/testsuite: fixup common-block.exp for intel compilers
	The order in which the variables in info common and info locals are
	displayed is compiler (and dwarf) dependent.  While all symbols should
	be displayed the order is not fixed.

	I added a gdb_test_multiple that lets ifx and ifort pass in cases where
	only the order differs.

2022-05-31  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	gdb, testsuite, fortran: fixup mixed-lang-stack for Intel/LLVM compilers
	When value-printing a pointer within GDB by default GDB will look for
	defined symbols residing at the address of the pointer.  For the given
	test the Intel/LLVM compiler stacks both display a symbol associated
	with a printed pointer while the gnu stack does not.  This leads to
	failures in the test when running the test with CC_FOR_TARGET='clang'
	CXX_FOR_TARGET='clang' F90_FOR_TARGET='flang'"

	  (gdb) b 37
	  (gdb) r
	  (gdb) f 6
	  (gdb) info args
	  a = 1
	  b = 2
	  c = 3
	  d = 4 + 5i
	  f = 0x419ed0 "abcdef"
	  g = 0x4041a0 <.BSS4>

	or CC_FOR_TARGET='icx' CXX_FOR_TARGET='icpx' F90_FOR_TARGET='ifx'"

	  (gdb) b 37
	  (gdb) r
	  (gdb) f 6
	  (gdb) info args
	  a = 1
	  b = 2
	  c = 3
	  d = 4 + 5i
	  f = 0x52eee0 "abcdef"
	  g = 0x4ca210 <mixed_func_1a_$OBJ>

	For the compiled binary the Intel/LLVM compilers both decide to move the
	local variable g into the .bss section of their executable.  The gnu
	stack will keep the variable locally on the stack and not define a
	symbol for it.

	Since the behavior for Intel/LLVM is actually expected I adapted the
	testcase at this point to be a bit more allowing for other outputs.
	I added the optional "<SYMBOLNAME>" to the regex testing for g.

	The given changes reduce the test fails for Intel/LLVM stack by 4 each.

2022-05-31  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	gdb, testsuite, fortran: fix double free in mixed-lang-stack.exp
	While testing mixed-lang-stack I realized that valgrind actually
	complained about a double free in the test.

	   All done
	  ==2503051==
	  ==2503051== HEAP SUMMARY:
	  ==2503051==     in use at exit: 0 bytes in 0 blocks
	  ==2503051==   total heap usage: 26 allocs, 27 frees, 87,343 bytes allocated
	  ==2503051==
	  ==2503051== All heap blocks were freed -- no leaks are possible
	  ==2503051==
	  ==2503051== For lists of detected and suppressed errors, rerun with: -s
	  ==2503051== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

	Reason for this is that in mixed-lang-stack.cpp in mixed_func_1f an
	object "derived_type obj" goes on the stack which is then passed-by-value
	(so copied) to mixed_func_1g.  The default copy-ctor will be called but,
	since derived_type contains a heap allocated string and the copy
	constructor is not implemented it will only be able to shallow copy the
	object.  Right after each of the functions the object gets freed - on the
	other hand the d'tor of derived_type actually is implemented and calls
	free on the heap allocated string which leads to a double free.  Instead
	of obeying the rule of 3/5 I just got rid of all that since it does not
	serve the test.  The string is now just a const char* = ".." object
	member.

2022-05-31  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	testsuite, fortran: allow additional completions in module.exp
	For ifort, ifx, and flang the tests "complete modm" and "complete
	modmany" fail.  This is because all three emit additional completion
	suggestions.  These additional suggestions have their origin in symbols
	emitted by the compilers which can also be completed from the respective
	incomplete word (modm or modmany).  For this specific example gfortran
	does not emit any additional symbols.

	For example, in this test the linkage name for var_a in ifx is
	"modmany_mp_var_a_" while gfortran uses "__modmany_MOD_var_a" instead.
	Since modmany_mp_var_a can be completed from modm and also modmany they
	will get displayed, while gfortran's symbol starts with "__" and thus will
	be ignored (it cannot be a completion of a word starting with "m").

	Similar things happen in flang and ifort.  Some example output is shown
	below:

	FLANG
	  (gdb) complete p modm
	  p modmany
	  p modmany::var_a
	  p modmany::var_b
	  p modmany::var_c
	  p modmany::var_i
	  p modmany_

	IFX/IFORT
	  (gdb) complete p modm
	  p modmany
	  p modmany._
	  p modmany::var_a
	  p modmany::var_b
	  p modmany::var_c
	  p modmany::var_i
	  p modmany_mp_var_a_
	  p modmany_mp_var_b_
	  p modmany_mp_var_c_
	  p modmany_mp_var_i_

	GFORTRAN
	  (gdb) complete p modm
	  p modmany
	  p modmany::var_a
	  p modmany::var_b
	  p modmany::var_c
	  p modmany::var_i

	I want to emphasize: for Fortran (and also C/C++) the complete command
	does not actually check whether its suggestions make sense - all it does
	is look for any symbol (in the minimal symbols, partial symbols etc.)
	that a given substring can be completed to (meaning that the given substring
	is the beginning of the symbol).  One can easily produce a similar
	output for the gfortran compiled executable.  For this look at the
	slightly modified "complete p mod" in gfortran:

	  (gdb) complete p mod
	  p mod1
	  p mod1::var_const
	  ...
	  p mod_1.c
	  p modcounter
	  p mode_t
	  p modf
	  ...
	  p modify_ldt
	  p modmany
	  p modmany::var_a
	  p modmany::var_b
	  p modmany::var_c
	  p modmany::var_i
	  p module
	  p module.f90
	  p module_entry
	  p moduse
	  p moduse::var_x
	  p moduse::var_y

	Many of the displayed symbols do not actually work with print:

	  (gdb) p mode_t
	  Attempt to use a type name as an expression
	  (gdb) p mod_1.c
	  No symbol "mod_1" in current context.
	  (gdb)

	I think that in the given test the output for gfortran only looks nice
	"by chance" rather than is actually expected.  Expected is any output
	that also contains the completions

	  p modmany

	  p modmany::var_a
	  p modmany::var_b
	  p modmany::var_c
	  p modmany::var_i

	while anythings else can be displayed as well (depending on the
	compiler and its emitted symbols).

	This, I'd consider all three outputs as valid and expected - one is just
	somewhat lucky that gfortran does not produce any additional symbols that
	got matched.

	The given patch improves test performance for all three compilers
	by allowing additional suggested completions inbetween and after
	the two given blocks in the test.  I did not allow additional print
	within the modmany_list block since the output is ordered alphabetically
	and there should normally not appear any additional symbols there.

	For flang/ifx/ifort I each see 2 failures less (which are exactly the two
	complete tests).

	As a side note and since I mentioned C++ in the beginning: I also tried
	the gdb.cp/completion.exp.  The output seems a bit more reasonable,
	mainly since C++ actually has a demangler in place and linkage symbols
	do not appear in the output of complete.  Still, with a poor enough
	to-be-completed string one can easily produce similar results:

	  (gdb) complete p t
	  ...
	  p typeinfo name for void
	  p typeinfo name for void const*
	  p typeinfo name for void*
	  p typeinfo name for wchar_t
	  p typeinfo name for wchar_t const*
	  p typeinfo name for wchar_t*
	  p t *** List may be truncated, max-completions reached. ***
	  (gdb) p typeinfo name for void*
	  No symbol "typeinfo" in current context.
	  (gdb) complete p B
	  p BACK_SLASH
	  p BUF_FIRST
	  p BUF_LAST
	  ...
	  p Base
	  p Base::Base()
	  p Base::get_foo()
	  p bad_key_err
	  p buf
	  p buffer
	  p buffer_size
	  p buflen
	  p bufsize
	  p build_charclass.isra
	  (gdb) p bad_key_err
	  No symbol "bad_key_err" in current context.

	(compiled with gcc/g++ and breaking at main).

	This patch is only about making the referenced test more 'fair' for the
	other compilers.  Generally, I find the behavior of complete a bit
	confusing and maybe one wants to change this at some point but this
	would be a bigger task.

2022-05-31  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	testsuite, fortran: fix info-types for intel compilers
	This info-types.exp test case had a few issues that this patch fixes.

	First, the emitted symbol character(kind=1)/character*1 (different
	compilers use different naming converntions here) which is checkedin the
	test is not actually expected given the test program.  There is no
	variable of that type in the test.  Still, gfortran emits it for every
	Fortran program there is.  The reason is the way gfortran handles Fortran's
	named main program.  It generates a wrapper around the Fortran program
	that is quite similar to a C main function.  This C-like wrapper has
	argc and argv arguments for command line argument passing and the argv
	pointer type has a base type character(kind=1) DIE emitted at CU scope.

	Given the program

	  program prog
	  end program prog

	the degbug info gfortran emits looks somewhat like

	   <0><c>: Abbrev Number: 3 (DW_TAG_compile_unit)
	      ...
	   <1><2f>: Abbrev Number: 4 (DW_TAG_subprogram)
	      <30>   DW_AT_external    : 1
	      <30>   DW_AT_name        : (indirect string, ...): main
	      ...
	   <2><51>: Abbrev Number: 1 (DW_TAG_formal_parameter)
	      <52>   DW_AT_name        : (indirect string, ...): argc
	      ...
	   <2><5d>: Abbrev Number: 1 (DW_TAG_formal_parameter)
	      <5e>   DW_AT_name        : (indirect string, ...): argv
	      ...
	      <62>   DW_AT_type        : <0x77>
	      ...
	   <2><6a>: Abbrev Number: 0
	   ...
	   <1><77>: Abbrev Number: 6 (DW_TAG_pointer_type)
	      <78>   DW_AT_byte_size   : 8
	      <79>   DW_AT_type        : <0x7d>
	   <1><7d>: Abbrev Number: 2 (DW_TAG_base_type)
	      <7e>   DW_AT_byte_size   : 1
	      <7f>   DW_AT_encoding    : 8        (unsigned char)
	      <80>   DW_AT_name        : (indirect string, ...): character(kind=1)
	   <1><84>: Abbrev Number: 7 (DW_TAG_subprogram)
	      <85>   DW_AT_name        : (indirect string, ...): prog
	   ...

	Ifx and flang do not emit any debug info for a wrapper main method so
	the type is missing here.  There was the possibility of actually adding
	a character*1 type variable to the Fortran executable, but both, ifx and
	gfortran chose to emit this variable's type as a DW_TAG_string_type of
	length one (instead of a character(kind=1), or whatever the respective
	compiler naming convention is).  While string types are printed as
	character*LENGHT in the fortran language part (e.g. when issuing a
	'ptype') they do not generate any symbols inside GDB.  In read.c it says

	   /* These dies have a type, but processing them does not create
	      a symbol or recurse to process the children.  Therefore we can
	      read them on-demand through read_type_die.  */

	So they did not add any output to 'info types'.  Only flang did emit a
	character type here.
	As adding a type would have a) not solved the problem for ifx and would
	have b) somehow hidden the curious behavior of gfortran, instead, the
	check for this character type was chagened to optional with the
	check_optional_entry to allow for the symbols's absence and to allow
	flang and ifx to pass this test as well.

	Second, the line checked for s1 was hardcoded as 37 in the test.  Given
	that the type is actually defined on line 41 (which is what is emitted by
	ifx) it even seems wrong.  The line check for s1 was changed to actually
	check for 41 and a gfortran bug has been filed here

	   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105454

	The test is now marked as xfail for gfortran.

	Third, the whole test of checking for the 'Type s1' in info types seemed
	questionable.  The type s1 is declared iside the scope of the Fortran
	program info_types_test.  Its DIE however is emitted as a child of the
	whole compilation unit making it visible outside of the program's scope.
	The 'info types' command checks for types stored in the GLOBAL_BLOCK,
	or STATIC_BLOCKm wgucm according to block.h

	   The GLOBAL_BLOCK contains all the symbols defined in this compilation
	   whose scope is the entire program linked together.
	   The STATIC_BLOCK contains all the symbols whose scope is the
	   entire compilation excluding other separate compilations.

	so for gfortran, the type shows up in the output of 'info types'.  For
	flang and ifx on the other hand this is not the case.  The two compilers
	emit the type (correctly) as a child of the Fortran program, thus not
	adding it to either, the GLOBAL_BLOCK nor the LOCAL_BLOCK.  A bug has
	been opened for the gfortran scoping issue:

	   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105454

	While the most correct change might have been removing the check for s1,
	the change made here was to only check for this type in case of gfortran
	being used as the compiler, as this check also covers the declaration
	line issue mentioned above.  A comment was added to maybe remove this
	check once the scoping issue is resolved (and it starts to fail with
	newer gfortran versions).  The one used to test these changes was 13.0.

2022-05-31  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	testsuite/lib: add check_optional_entry for GDBInfoSymbols
	There was already a similar functionality for the GDBInfoModuleSymbols.
	This just extends the GDBInfoSymbols.  We will use this feature in a
	later commit to make a testcase less GNU specific and more flexible for
	other compilers.

	Namely, in gdb.fortran/info-types.exp currenlty
	GDBInfoSymbols::check_entry is used to verify and test the output of the
	info symbols command.  The test, however was written with gfortran as a
	basis and some of the tests are not fair with e.g. ifx and ifort as
	they test for symbols that are not actually required to be emitted.  The
	lines
	   GDBInfoSymbols::check_entry "${srcfile}" "" "${character1}"
	and
	   GDBInfoSymbols::check_entry "${srcfile}" "37" "Type s1;"

	check for types that are either not used in the source file (character1)
	or should not be emitted by the compiler at global scope (s1) thus no
	appearing in the info symbols command.  In order to fix this we will
	later use the newly introduced check_optional_entry over check_entry.

2022-05-31  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	testsuite, fortran: Add '-debug-parameters all' when using ifx/ifort
	In order for ifx and ifort to emit all debug entries, even for unused
	parameters in modules we have to define the '-debug-parameters all' flag.

	This commit adds it to the ifx-*/ifort-* specific flags in gdb.exp.

2022-05-31  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	testsuite, fortran: add compiler dependent types to dynamic-ptype-whatis
	The test was earlier not using the compiler dependent type print system
	in fortran.exp.  I changed this.  It should generally improve the test
	performance for different compilers.  For ifx and gfortran I do not see
	any failures.

2022-05-31  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	testsuite, fortran: add required external keyword
	Currenlty, ifx/ifort cannot compile the given executable as it is not
	valid Fortran.  It is missing the external keyword on the
	no_arg_subroutine.  Gfortran compiles the example but this is actually
	a bug and there is an open gcc ticket for this here:

	   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50377

	Adding the keyword does not change the gfortran compiling of the example.
	It will, however, prevent a future fail once 50377 has been addressed.

2022-05-31  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	gdb/testsuite: disable charset.exp for intel compilers
	The test specifically tests for the Fortran CHARACTER(KIND=4) which is
	not available in ifx/ifort.

	Since the other characters are also printed elsewhere, we disable this
	test for the unsupported compilers.

2022-05-31  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	gdb/testsuite: rename intel next gen c/cpp compilers
	The name for icx and icpx in the testsuite was earlier set to 'intel-*'
	by the compiler identification.  This commit changes this to 'icx-*'.

	Note, that currently these names are not used within the testsuite so no
	tests have to be adapted here.

2022-05-31  Cristian Sandu  <cristian.sandu@intel.com>
	    Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	gdb/testsuite: add Fortran compiler identification to GDB
	This commit adds a separate Fortran compiler identification mechanism to
	the testsuite, similar to the existing one for C/C++.  Before this
	change, the options and version for the Fortran compiler specified when
	running the testsuite with F90_FOR_TARGET set, was detected via its
	respective C compiler.  So running the testsuite as

	  make check TEST=gdb.fortran/*.exp CC_FOR_TARGET=gcc F90_FOR_TARGET=ifx

	or even

	  make check TEST=gdb.fortran/*.exp F90_FOR_TARGET=ifx

	would use the gcc compiler inside the procedures get_compiler_info and
	test_compiler_info to identify compiler flags and the compiler version.
	This could sometimes lead to unpredictable outputs.  It also limited
	testsuite execution to combinations where C and Fortran compiler would
	come from the same family of compiers (gcc/gfortran, icc/ifort, icx/ifx,
	clang/flang ..).  This commit enables GDB to detect C and Fortran
	compilers independently of each other.

	As most/nearly all Fortran compilers have a mechanism for preprocessing
	files in a C like fashion we added the exact same meachnism that already
	existed for C/CXX.  We let GDB preprocess a file with the compilers
	Fortran preprocessor and evaluate the preprocessor defined macros in that
	file.

	This enables GDB to properly run heterogeneous combinations of C and
	Fortran compilers such as

	  CC_FOR_TARGET='gcc' and F90_FOR_TARGET='ifort'

	or enables one to run the testsuite without specifying a C compiler as in

	  make check TESTS=gdb.fortran/*.exp F90_FOR_TARGET='ifx'
	  make check TESTS=gdb.fortran/*.exp F90_FOR_TARGET='flang'

	On the other hand this also requires one to always specify a
	identification mechanism for Fortran compilers in the compiler.F90 file.

	We added identification for GFORTRAN, FLANG (CLASSIC and LLVM) IFX,
	IFORT, and ARMFLANG for now.

	Classic and LLVM flang were each tested with their latest releases on
	their respective release pages.  Both get recognized by the new compiler
	identification and we introduced the two names flang-classic and
	flang-llvm to distinguish the two.  While LLVM flang is not quite mature
	enough yet for running the testsuite we still thought it would be a good
	idea to include it already.  For this we added a case for the fortran_main
	procedure.  LLVM flang uses 'MAIN__' as opposed to classic flang which
	uses 'MAIN_' here.

	We did not have the possibility to test ARMFLANG - the versioning scheme
	here was extracted from its latest online documentation.

	We changed the test_compiler_info procedure to take another optional
	argument, the language string, which will be passed though to the
	get_compiler_info procedure.  Passing 'f90' or 'c++' here will then
	trigger the C++/Fortran compiler identification within
	get_compiler_info.  The latter procedure was extended to also handle
	the 'f90' argument (similarly to the already existing 'c++' one).

2022-05-31  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	gdb/testsuite: move getting_compiler_info to front of gdb_compile
	The procedure gdb_compile queries its options via

	   [lsearch -exact $options getting_compiler_info]

	to check whether or not it was called in with the option
	getting_compiler_info.  If it was called with this option it would
	preprocess some test input to try and figure out the actual compiler
	version of the compiler used.  While doing this we cannot again try to
	figure out the current compiler version via the 'getting_compiler_info'
	option as this would cause infinite recursion.  As some parts of the
	procedure do recursively test for the compiler version to e.g. set
	certain flags, at several places gdb_compile there are checks for the
	getting_compiler_info option needed.

	In the procedure, there was already a variable 'getting_compiler_info'
	which was set to the result of the 'lsearch' query and used instead of
	again and again looking for getting_compiler_info in the procedure
	options.  But, this variable was actually set too late within the code.
	This lead to a mixture of querying 'getting_compiler_info' or
	doing an lserach on the options passed to the procedure.

	I found this inconsistent and instead moved the variable
	getting_compiler_info to the front of the procedure.  It is set to true
	or false depending on whether or not the argument is found in the
	procedure's options (just as before) and queried instead of doing an
	lsearch on the procedure options in the rest of the procedure.

2022-05-31  Felix Willgerodt  <felix.willgerodt@intel.com>
	    Abdul Basit Ijaz  <abdul.b.ijaz@intel.com>
	    Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	gdb/testsuite: Fix fortran types for Intel compilers.
	Newer Intel compilers emit their dwarf type name in a slightly different
	format.  Therefore, this needs adjustment to make more tests pass in the
	Fortran testsuite.

2022-05-31  Abdul Basit Ijaz  <abdul.b.ijaz@intel.com>

	gdb/testsuite: Use -module option for Intel Fortran compilers
	The '-J' option is not supported in Intel compilers (ifx and ifort).
	The Intel version of the flag is '-module' which serves the same purpose.

2022-05-31  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	gdb/testsuite: remove F77_FOR_TARGET support
	The last uses of the F77_FOR_TARGET via passing f77 to GDB's compile
	procedure were removed in this commit

	   commit 0ecee54cfd04a60e7ca61ae07c72b20e21390257
	   Author: Tom Tromey <tromey@redhat.com>
	   Date:   Wed Jun 29 17:50:47 2011 +0000

	over 10 years ago.  The last .f files in the testsuite by now are all
	being compiled by passing 'f90' to the GDB compile, thus only actually
	using F90_FOR_TARGET (array-element.f, block-data.f, subarray.f).
	Gfortran in this case is backwards compatible with most f77 code as
	claimed on gcc.gnu.org/fortran.

	The reason we'd like to get rid of this now is, that we'll be
	implementing a Fortran compiler identification mechanism, similar to the
	C/Cpp existing ones.  It would be using the Fortran preprocessor macro
	defines to identify the Fortran compiler version at hand.  We found it
	inconsequent to only implement this for f90 but, on the other hand, f77
	seems deprecated.  So, with this commit we remove the remaining lines for
	its support.

2022-05-31  Pedro Alves  <pedro@palves.net>

	Improve clear command's documentation
	Co-Authored-By: Eli Zaretskii <eliz@gnu.org>

	Change-Id: I9440052fd28f795d6f7c93a4576beadd21f28885

2022-05-31  Pedro Alves  <pedro@palves.net>

	Clarify why we unit test matching symbol names with 0xff characters
	In the name matching unit tests in gdb/dwarf2/read.c, explain better
	why we test symbols with \377 / 0xff characters (Latin1 'ÿ').

	Change-Id: I517f13adfff2e4d3cd783fec1d744e2b26e18b8e

2022-05-31  Pedro Alves  <pedro@palves.net>

	Improve break-range's documentation
	Change-Id: Iac26e1d2e7d8dc8a7d9516e6bdcc5c3fc4af45c8

	Explicitly mention yet-unloaded shared libraries in location spec examples
	Change-Id: I05639ddb3bf620c7297b57ed286adc3aa926b7b6

2022-05-31  Alan Modra  <amodra@gmail.com>

	sparc64 segfault in finish_dynamic_symbol
	SYMBOL_REFERENCES_LOCAL can return true for undefined symbols.  This
	can result in a segfault when running sparc64 ld/testsuite/ld-vsb
	tests that expect a failure.

		* elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Don't
		access u.def.section on non-default visibility undefined symbol.

2022-05-31  Alan Modra  <amodra@gmail.com>

	ia64 gas: Remove unnecessary init
	The whole struct is cleared by alloc_record.

		* config/tc-ia64.c (output_prologue, output_prologue_gr): Don't
		zero r.record.r.mask.

2022-05-31  Alan Modra  <amodra@gmail.com>

	v850_elf_set_note prototype
	v850_elf_set_note is declared using an unsigned int note param in
	elf32-v850.h but defined with enum c850_notes note in elf32-v850.c.
	Current mainline gcc is warning about this.  Huh.

		* elf32-v850.c (v850_elf_set_note): Make "note" param an
		unsigned int.

2022-05-31  Alan Modra  <amodra@gmail.com>

	Import libiberty from gcc
		PR 29200
	include/
		* ansidecl.h,
		* demangle.h: Import from gcc.
	libiberty/
		* cp-demangle.c,
		* testsuite/demangle-expected: Import from gcc.

2022-05-31  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: resolve duplicate test name in gdb.trace/signal.exp
	Spotted a duplicate test name in gdb.trace/signal.exp, resolved in
	this commit by making use of 'with_test_prefix'.

2022-05-31  Alan Modra  <amodra@gmail.com>

	Ajdust more tests for opcodes/i386: remove trailing whitespace
	git commit 202be274a4 also missed adjusting a few testsuite files.
	This fixes
	i686-vxworks  +FAIL: VxWorks shared library test 1
	i686-vxworks  +FAIL: VxWorks executable test 1 (dynamic)

2022-05-31  Alan Modra  <amodra@gmail.com>

	Trailing spaces in objdump -r header
	git commit 202be274a4 went a little wild in removing trailing spaces
	in gas/testsuite/gas/i386/{secidx.d,secrel.d}, causing
	x86_64-w64-mingw32  +FAIL: i386 secrel reloc
	x86_64-w64-mingw32  +FAIL: i386 secidx reloc

	I could have just replaced the trailing space, but let's fix the
	objdump output instead.  Touches lots of testsuite files.

2022-05-31  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-30  Simon Marchi  <simon.marchi@efficios.com>

	gdb/testsuite: fix gdb.trace/signal.exp on x86
	Patch

	  202be274a41a ("opcodes/i386: remove trailing whitespace from insns with zero operands")

	causes this regression:

	  FAIL: gdb.trace/signal.exp: find syscall insn in kill

	It's because the test still expects to match a whitespace after the
	instruction, which the patch mentioned above removed.  Remove the
	whitespaces for the regexp.

	Change-Id: Ie194273cc942bfd91332d4035f6eec55b7d3a428

2022-05-30  Pedro Alves  <pedro@palves.net>

	gdb/manual: Introduce location specs
	The current "Specify Location" section of the GDB manual starts with:

	 "Several @value{GDBN} commands accept arguments that specify a location
	 of your program's code."

	And then, such commands are documented as taking a "location"
	argument.  For example, here's a representative subset:

	 @item break @var{location}
	 @item clear @var{location}
	 @item until @var{location}
	 @item list @var{location}
	 @item edit @var{location}
	 @itemx info line @var{location}
	 @item info macros @var{location}
	 @item trace @var{location}
	 @item info scope @var{location}
	 @item maint agent @r{[}-at @var{location}@r{,}@r{]} @var{expression}

	The issue here is that "location" isn't really correct for most of
	these commands.  Instead, the "location" argument is really a
	placeholder that represent an umbrella term for all of the
	"linespecs", "explicit location", and "address location" input
	formats.  GDB parses these and then finds the actual code locations
	(plural) in the program that match.  For example, a "location"
	specified like "-function func" will actually match all the code
	locations in the program that correspond to the address/file/lineno of
	all the functions named "func" in all the loaded programs and shared
	libraries of all the inferiors.  A location specified like "-function
	func -label lab" matches all the addresses of C labels named "lab" in
	all functions named "func".  Etc.

	This means that several of the commands that claim they accept a
	"location", actually end up working with multiple locations, and the
	manual doesn't explain that all that well.  In some cases, the command
	will work with all the resolved locations.  In other cases, the
	command aborts with an error if the location specification resolves to
	multiple locations in the program.  In other cases, GDB just
	arbitrarily and silently picks whatever is the first resolved code
	location (which sounds like should be improved).

	To clarify this, I propose we use the term "Location Specification",
	with shorthand "locaction spec", when we're talking about the user
	input, the argument or arguments that is/are passed to commands to
	instruct GDB how to find locations of interest.  This is distinct from
	the actual code locations in the program, which are what GDB finds
	based on the user-specified location spec.  Then use "location
	specification or the shorter "location spec" thoughout instead of
	"location" when we're talking about the user input.

	Thus, this commit does the following:

	- renames the "Specify Location" section of the manual to "Location
	  Specifications".

	- It then introduces the term "Location Specification", with
	  corresponding shorthand "location spec", as something distinct from
	  an actual code location in the program.  It explains what a concrete
	  code location is.  It explains that a location specification may be
	  incomplete, and that may match multiple code locations in the
	  program, or no code location at all.  It gives examples.  Some
	  pre-existing examples were moved from the "Set Breaks" section, and
	  a few new ones that didn't exist yet were added.  I think it is
	  better to have these centralized in this "Location Specification"
	  section, since all the other commands that accept a location spec
	  have an xref that points there.

	- Goes through the manual, and where "@var{location}" was used for a
	  command argument, updated it to say "@var{locspec}" instead.  At the
	  same time, tweaks the description of the affected commands to
	  describe what happens when the location spec resolves to more than
	  one location.  Most commands just did not say anything about that.

	  One command -- "maint agent -at @var{location}" -- currently says it
	  accepts a "location", suggesting it can accept address and explicit
	  locations too, but that's incorrect.  In reality, it only accepts
	  linespecs, so fix it accordingly.

	  One MI command -- "-trace-find line" -- currently says it accepts a
	  "line specification", but it can accept address and explicit
	  locations too, so fix it accordingly.

	Special thanks goes to Eli Zaretskii for reviews and rewording
	suggestions.

	Change-Id: Ic42ad8565e79ca67bfebb22cbb4794ea816fd08b

2022-05-30  Luis Machado  <luis.machado@arm.com>

	Move 64-bit BFD files from ALL_TARGET_OBS to ALL_64_TARGET_OBS
	Doing a 32-bit build with "--enable-targets=all --disable-sim" fails to link
	properly.

	--

	loongarch-tdep.o: In function `loongarch_gdbarch_init':
	binutils-gdb/gdb/loongarch-tdep.c:443: undefined reference to `loongarch_r_normal_name'
	loongarch-tdep.o: In function `loongarch_fetch_instruction':
	binutils-gdb/gdb/loongarch-tdep.c:37: undefined reference to `loongarch_insn_length'
	loongarch-tdep.o: In function `loongarch_scan_prologue(gdbarch*, unsigned long long, unsigned long long, frame_info*, trad_frame_cache*) [clone .isra.4]':
	binutils-gdb/gdb/loongarch-tdep.c:87: undefined reference to `loongarch_insn_length'
	binutils-gdb/gdb/loongarch-tdep.c:88: undefined reference to `loongarch_decode_imm'
	binutils-gdb/gdb/loongarch-tdep.c:89: undefined reference to `loongarch_decode_imm'
	binutils-gdb/gdb/loongarch-tdep.c:90: undefined reference to `loongarch_decode_imm'
	binutils-gdb/gdb/loongarch-tdep.c:91: undefined reference to `loongarch_decode_imm'
	binutils-gdb/gdb/loongarch-tdep.c:92: undefined reference to `loongarch_decode_imm'

	--

	Given the list of 64-bit BFD files in
	opcodes/Makefile.am:TARGET64_LIBOPCODES_CFILES, it looks like GDB's
	ALL_TARGET_OBS list is including files that should be included in
	ALL_64_TARGET_OBS instead.

	This patch accomplishes this and enables a 32-bit build with
	"--enable-targets=all --disable-sim" to complete.

	Moving the bpf, tilegx and loongarch files to the correct list means GDB can
	find the correct disassembler function instead of finding a null pointer.

	We still need the "--disable-sim" switch (or "--enable-64-bit-bfd") to
	make a 32-bit build with "--enable-targets=all" complete correctly

2022-05-30  Luis Machado  <luis.machado@arm.com>

	Fix failing test for armeb-gnu-eabi
	The following test fails on the armeb-gnu-eabi target:

	FAIL: Unwind information for Armv8.1-M.Mainline PACBTI extension

	This patch adjusts the expected output for big endian.

2022-05-30  Alan Modra  <amodra@gmail.com>

	Use a union to avoid casts in bfd/doc/chew.c
	This fixes -Wpedantic warnings in chew.c.  Conversion between function
	and object pointers is not guaranteed.  They can even be different
	sizes, not that we're likely to encounter build machines like that
	nowadays.

		PR 29194
		* doc/chew.c (pcu): New union typedef.
		(dict_type, pc): Use it here.  Adjust uses of pc.
		(add_to_definition): Make "word" param a pcu.  Adjust all uses
		of function.
		(stinst_type): Delete.

2022-05-30  Alan Modra  <amodra@gmail.com>

	use libiberty xmalloc in bfd/doc/chew.c
	Catch out of memory.

		* doc/chew.c: Include libibery.h.
		(init_string_with_size, nextword): Replace malloc with xmalloc.
		(newentry, add_to_definition): Likewise.
		(catchar, catbuf): Replace realloc with xrealloc.
		(add_intrinsic): Replace strdup with xstrdup.
		* doc/local.mk (LIBIBERTY): Define.
		(chew): Link against libiberty.
		* Makefile.in: Regenerate.

2022-05-30  Alan Modra  <amodra@gmail.com>

	Update K&R functions in bfd/doc/chew.c
		* doc/chew.c: Update function definitions to ISO C, remove
		now unnecessary prototypes.

2022-05-30  Alan Modra  <amodra@gmail.com>

	Reorganise bfd/doc/chew.c a little
	This also removes some unused variables, and deletes support for the
	"var" keyword which isn't used and was broken.  (No means to set
	variables, and add_var used push_number inconsistent with its use
	elsewhere.)

		* doc/chew.c: Move typedefs before variables, variables before
		functions.
		(die): Move earlier.
		(word_type, sstack, ssp): Delete.
		(dict_type): Delete var field.
		(add_var): Delete.
		(compile): Remove "var" support.

2022-05-30  jiawei  <jiawei@iscas.ac.cn>

	RISC-V: Add zhinx extension supports.
	The zhinx extension is a sub-extension in zfinx, corresponding to
	zfh extension but use GPRs instead of FPRs.

	This patch expanded the zfh insn class define, since zfh and zhinx
	use the same opcodes, thanks for Nelson's works.

	changelog in V2: Add missing classes of 'zfh' and 'zhinx' in
	"riscv_multi_subset_supports_ext".

	bfd/ChangeLog:

	        * elfxx-riscv.c (riscv_multi_subset_supports): New extensions.
	        (riscv_multi_subset_supports_ext): New extensions.

	gas/ChangeLog:

	        * testsuite/gas/riscv/fp-zhinx-insns.d: New test.
	        * testsuite/gas/riscv/fp-zhinx-insns.s: New test.

	include/ChangeLog:

	        * opcode/riscv.h (enum riscv_insn_class): New INSN classes.

	opcodes/ChangeLog:

	        * riscv-opc.c: Modify INSN_CLASS.

2022-05-30  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-29  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-28  Andrew Burgess  <aburgess@redhat.com>

	gdb/python: improve formatting of help text for user defined commands
	Consider this command defined in Python (in the file test-cmd.py):

	  class test_cmd (gdb.Command):
	    """
	    This is the first line.
	      Indented second line.
	    This is the third line.
	    """

	    def __init__ (self):
	      super ().__init__ ("test-cmd", gdb.COMMAND_OBSCURE)

	    def invoke (self, arg, from_tty):
	      print ("In test-cmd")

	  test_cmd()

	Now, within a GDB session:

	  (gdb) source test-cmd.py
	  (gdb) help test-cmd

	    This is the first line.
	      Indented second line.
	    This is the third line.

	  (gdb)

	I think there's three things wrong here:

	  1. The leading blank line,
	  2. The trailing blank line, and
	  3. Every line is indented from the left edge slightly.

	The problem of course, is that GDB is using the Python doc string
	verbatim as its help text.  While the user has formatted the help text
	so that it appears clear within the .py file, this means that the text
	appear less well formatted when displayed in the "help" output.

	The same problem can be observed for gdb.Parameter objects in their
	set/show output.

	In this commit I aim to improve the "help" output for commands and
	parameters.

	To do this I have added gdbpy_fix_doc_string_indentation, a new
	function that rewrites the doc string text following the following
	rules:

	  1. Leading blank lines are removed,
	  2. Trailing blank lines are removed, and
	  3. Leading whitespace is removed in a "smart" way such that the
	  relative indentation of lines is retained.

	With this commit in place the above example now looks like this:

	  (gdb) source ~/tmp/test-cmd.py
	  (gdb) help test-cmd
	  This is the first line.
	    Indented second line.
	  This is the third line.
	  (gdb)

	Which I think is much neater.  Notice that the indentation of the
	second line is retained.  Any blank lines within the help text (not
	leading or trailing) will be retained.

	I've added a NEWS entry to note that there has been a change in
	behaviour, but I didn't update the manual.  The existing manual is
	suitably vague about how the doc string is used, so I think the new
	behaviour is covered just as well by the existing text.

2022-05-28  Andrew Burgess  <aburgess@redhat.com>

	gdb: use gdb::unique_xmalloc_ptr<char> for docs in cmdpy_init
	Make use of gdb::unique_xmalloc_ptr<char> to hold the documentation
	string in cmdpy_init (when creating a custom GDB command in Python).
	I think this is all pretty straight forward, the only slight weirdness
	is the removal of the call to free toward the end of this function.

	Prior to this commit, if an exception was thrown after the GDB command
	was created then we would (I think) end up freeing the documentation
	string even though the command would remain registered with GDB, which
	would surely lead to undefined behaviour.

	After this commit we release the doc string at the point that we hand
	it over to the command creation routines.  If we throw _after_ the
	command has been created within GDB then the doc string will be left
	live.  If we throw during the command creation itself (either from
	add_prefix_cmd or add_cmd) then it is up to those functions to free
	the doc string (I suspect we don't, but I think in general the
	commands are pretty bad at cleaning up after themselves, so I don't
	think this is a huge problem).

2022-05-28  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: fix build with -mx32
	gprofng/ChangeLog
	2022-05-27  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		PR gprofng/28983
		PR gprofng/29143
		* src/Experiment.cc (write_header): Fix argument for ctime.
		Fix -Wformat= warnings.
		* src/Dbe.cc: Likewise.
		* src/DwarfLib.h: Fix [-Wsign-compare] warnings.
		* src/Experiment.h: Likewise.
		* src/ipc.cc: Fix -Wformat= warnings.

2022-05-28  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-27  Tom Tromey  <tom@tromey.com>

	Fix crash with "maint print arc"
	Luis noticed that "maint print arc" would crash, because the command
	handler did not find "show" in the command name, violating an
	invariant.  This patch fixes the bug by changing the registration to
	use add_basic_prefix_cmd instead.

2022-05-27  Andrew Burgess  <aburgess@redhat.com>

	opcodes/i386: remove trailing whitespace from insns with zero operands
	While working on another patch[1] I had need to touch this code in
	i386-dis.c:

	  ins->obufp = ins->mnemonicendp;
	  for (i = strlen (ins->obuf) + prefix_length; i < 6; i++)
	    oappend (ins, " ");
	  oappend (ins, " ");
	  (*ins->info->fprintf_styled_func)
	    (ins->info->stream, dis_style_mnemonic, "%s", ins->obuf);

	What this code does is add whitespace after the instruction mnemonic
	and before the instruction operands.

	The problem I ran into when working on this code can be seen by
	assembling this input file:

	    .text
	    nop
	    retq

	Now, when I disassemble, here's the output.  I've replaced trailing
	whitespace with '_' so that the issue is clearer:

	    Disassembly of section .text:

	    0000000000000000 <.text>:
	       0:	90                   	nop
	       1:	c3                   	retq___

	Notice that there's no trailing whitespace after 'nop', but there are
	three spaces after 'retq'!

	What happens is that instruction mnemonics are emitted into a buffer
	instr_info::obuf, then instr_info::mnemonicendp is setup to point to
	the '\0' character at the end of the mnemonic.

	When we emit the whitespace, this is then added starting at the
	mnemonicendp position.  Lets consider 'retq', first the buffer is
	setup like this:

	  'r' 'e' 't' 'q' '\0'

	Then we add whitespace characters at the '\0', converting the buffer
	to this:

	  'r' 'e' 't' 'q' ' ' ' ' ' ' '\0'

	However, 'nop' is actually an alias for 'xchg %rax,%rax', so,
	initially, the buffer is setup like this:

	  'x' 'c' 'h' 'g' '\0'

	Then in NOP_Fixup we spot that we have an instruction that is an alias
	for 'nop', and adjust the buffer to this:

	  'n' 'o' 'p' '\0' '\0'

	The second '\0' is left over from the original buffer contents.
	However, when we rewrite the buffer, we don't afjust mnemonicendp,
	which still points at the second '\0' character.

	Now, when we insert whitespace we get:

	  'n' 'o' 'p' '\0' ' ' ' ' ' ' ' ' '\0'

	Notice the whitespace is inserted after the first '\0', so, when we
	print the buffer, the whitespace is not printed.

	The fix for this is pretty easy, I can change NOP_Fixup to adjust
	mnemonicendp, but now a bunch of tests start failing, we now produce
	whitespace after the 'nop', which the tests don't expect.

	So, I could update the tests to expect the whitespace....

	...except I'm not a fan of trailing whitespace, so I'd really rather
	not.

	Turns out, I can pretty easily update the whitespace emitting code to
	spot instructions that have zero operands and just not emit any
	whitespace in this case.  So this is what I've done.

	I've left in the fix for NOP_Fixup, I think updating mnemonicendp is
	probably a good thing, though this is not really required any more.

	I've then updated all the tests that I saw failing to adjust the
	expected patterns to account for the change in whitespace.

	[1] https://sourceware.org/pipermail/binutils/2022-April/120610.html

2022-05-27  Alan Modra  <amodra@gmail.com>

	Replace bfd_hostptr_t with uintptr_t
	bfd_hostptr_t is defined as a type large enough to hold either a long
	or a pointer.  It mostly appears in the coff backend code in casts.
	include/coff/internal.h struct internal_syment and union
	internal_auxent have the only uses in data structures, where
	comparison with include/coff/external.h and other code reveals that
	the type only needs to be large enough for a 32-bit integer or a
	pointer.  That should mean replacing with uintptr_t is OK.

	Remove much of BFD_HOST configury
	This patch removes the definition of bfd_uint64_t and bfd_int64_t as
	well as most BFD_HOST_* which are now unused.

	Remove use of bfd_uint64_t and similar
	Requiring C99 means that uses of bfd_uint64_t can be replaced with
	uint64_t, and similarly for bfd_int64_t, BFD_HOST_U_64_BIT, and
	BFD_HOST_64_BIT.  This patch does that, removes #ifdef BFD_HOST_*
	and tidies a few places that print 64-bit values.

2022-05-27  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: fix build with --disable-shared
	gprofng/ChangeLog
	2022-05-26  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		* libcollector/configure.ac: Use AC_MSG_WARN instead of AC_MSG_ERROR
		* libcollector/configure: Rebuild.

2022-05-27  Jan Beulich  <jbeulich@suse.com>

	x86/Intel: allow MASM representation of embedded rounding / SAE
	MASM doesn't support the separate operand form; the modifier belongs
	after the instruction instead. Accept this form alongside the original
	(now legacy) one. Short of having access to a MASM version to actually
	check in how far "after the instruction" is a precise statement in their
	documentation, allow both that and the SDM mandated form where the
	modifier is on the last register operand (with a possible immediate
	operand following).

	Sadly the split out function, at least for the time being, needs to cast
	away constness at some point, as the two callers disagree in this
	regard.

	Adjust some, but not all of the testcases.

2022-05-27  Jan Beulich  <jbeulich@suse.com>

	x86: re-work AVX512 embedded rounding / SAE
	As a preparatory step to allowing proper non-operand forms of specifying
	embedded rounding / SAE, convert the internal representation to non-
	operand form. While retaining properties (and in a few cases perhaps
	providing more meaningful diagnostics), this means doing away with a few
	hundred standalone templates, thus - as a nice side effect - reducing
	memory consumption / cache occupancy.

	x86/Intel: adjust representation of embedded rounding / SAE
	MASM doesn't consider {sae} and alike a separate operand; it is attached
	to the last register operand instead, just like spelled out by the SDM.
	Make the disassembler follow this first, before also adjusting the
	assembler (such that it'll be easy to see that the assembler change
	doesn't alter generated code).

2022-05-27  Jan Beulich  <jbeulich@suse.com>

	x86/Intel: allow MASM representation of embedded broadcast
	MASM doesn't support the {1to<n>} form; DWORD BCST (paralleling
	DWORD PTR) and alike are to be used there instead. Accept these forms
	alongside the original (now legacy) ones.

	Acceptance of the original {1to<n>} operand suffix is retained both for
	backwards compatibility and to disambiguate VFPCLASSP{S,D,H} and vector
	conversions with shrinking element sizes. I have no insight (yet) into
	how MASM expects those to be disambiguated.

	Adjust some, but not all of the testcases.

2022-05-27  Jan Beulich  <jbeulich@suse.com>

	x86/Intel: adjust representation of embedded broadcast
	MASM doesn't support the {1to<n>} form; DWORD BCST (paralleling
	DWORD PTR) and alike are to be used there instead. Make the disassembler
	follow this first, before also adjusting the assembler (such that it'll
	be easy to see that the assembler change doesn't alter generated code).

	For VFPCLASSP{S,D,H} and vector conversions with shrinking element sizes
	the original {1to<n>} operand suffix is retained, to disambiguate
	output. I have no insight (yet) into how MASM expects those to be
	disambiguated.

2022-05-27  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: fix build with -mx32
	gprofng/ChangeLog
	2022-05-26  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		PR gprofng/28983
		* libcollector/libcol_util.h (__collector_getsp, __collector_getfp,
		__collector_getpc): Adapt for build with -mx32
		* libcollector/heaptrace.c: Fix -Wpointer-to-int-cast warnings.
		* libcollector/hwprofile.h: Likewise.
		* libcollector/mmaptrace.c: Likewise.
		* libcollector/synctrace.c: Likewise.
		* libcollector/unwind.c: Likewise.

2022-05-27  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-27  Hans-Peter Nilsson  <hp@axis.com>

	ld: cris*-elf: Default to --no-warn-rwx-segment
	ld:
		configure.tgt (cris-*-*, crisv32-*-* sans *-aout and *-linux): Unless
		specified through the --enable-* -option, default to
		--no-warn-rwx-segment.

	Change-Id: I846bcd3e6762da807b17215a9fe337461ea0d710

2022-05-27  Hans-Peter Nilsson  <hp@axis.com>

	cris: bfd: Correct default to no execstack
	In the now-historical CRIS glibc port, the default stack permission
	was no-exec as in "#define DEFAULT_STACK_PERMS (PF_R|PF_W)", and the
	gcc port only emits the executable-stack marker when needed; when
	emitting code needing it.  In other words, the binutils setting
	mismatches.  It doesn't matter much, except being confusing and
	defaulting to "off" is more sane.

	ld:

		* testsuite/ld-elf/elf.exp (target_defaults_to_execstack): Switch to 0
		for cris*-*-*.

	bfd:
		* elf32-cris.c (elf_backend_default_execstack): Define to 0.

	Change-Id: I52f37598f119b19111c7a6546c00a627fca0f396

2022-05-26  John Baldwin  <jhb@FreeBSD.org>

	aarch64-fbsd-nat: Move definition of debug_regs_probed under HAVE_DBREG.
	This fixes the build on older FreeBSD systems without support for
	hardware breakpoints/watchpoints.

2022-05-26  Lancelot SIX  <lancelot.six@amd.com>

	gdb: Change psymbol_functions::require_partial_symbols to partial_symbols
	The previous patch ensured that partial symbols are read before calling
	most of the quick_function's methods.

	The psymbol_functions class has the require_partial_symbols method which
	serves this exact purpose, and does not need to do it anymore.

	This patch renames this method to partial_symbols and makes it an accessor
	which asserts that partial symbols have been read at this point.

	Regression tested on x86_64-linux.

2022-05-26  Lancelot SIX  <lancelot.six@amd.com>

	gdb: Require psymtab before calling quick_functions in objfile
	The recent DWARF indexer rewrite introduced a regression when debugging
	a forking program.

	Here is a way to reproduce the issue (there might be other ways, but one
	is enough and this one mimics the situation we encountered).  Consider a
	program which forks, and the child loads a shared library and calls a
	function in this shared library:

	    if (fork () == 0)
	      {
	        void *solib = dlopen (some_solib, RTLD_NOW);
	        void (*foo) () = dlsym (some_solib, "foo");
	        foo ();
	      }

	Suppose that this program is compiled without debug info, but the shared
	library it loads has debug info enabled.

	When debugging such program with the following options:

	  - set detach-on-fork off
	  - set follow-fork-mode child

	we see something like:

	    (gdb) b foo
	    Function "foo" not defined.
	    Make breakpoint pending on future shared library load? (y or [n]) y
	    Breakpoint 1 (foo) pending.
	    (gdb) run
	    Starting program: a.out
	    [Attaching after process 19720 fork to child process 19723]
	    [New inferior 2 (process 19723)]
	    [Switching to process 19723]

	    Thread 2.1 "a.out" hit Breakpoint 1, 0x00007ffff7fc3101 in foo () from .../libfoo.so
	    (gdb) list

	    Fatal signal: Segmentation fault
	    ----- Backtrace -----
	    0x55a278f77d76 gdb_internal_backtrace_1
	            ../../gdb/bt-utils.c:122
	    0x55a278f77f83 _Z22gdb_internal_backtracev
	            ../../gdb/bt-utils.c:168
	    0x55a27940b83b handle_fatal_signal
	            ../../gdb/event-top.c:914
	    0x55a27940bbb1 handle_sigsegv
	            ../../gdb/event-top.c:987
	    0x7effec0343bf ???
	            /build/glibc-sMfBJT/glibc-2.31/nptl/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
	    0x55a27924c9d3 _ZNKSt15__uniq_ptr_implI18dwarf2_per_cu_data26dwarf2_per_cu_data_deleterE6_M_ptrEv
	            /usr/include/c++/9/bits/unique_ptr.h:154
	    0x55a279248bc9 _ZNKSt10unique_ptrI18dwarf2_per_cu_data26dwarf2_per_cu_data_deleterE3getEv
	            /usr/include/c++/9/bits/unique_ptr.h:361
	    0x55a2792ae718 _ZN27dwarf2_base_index_functions23find_last_source_symtabEP7objfile
	            ../../gdb/dwarf2/read.c:3164
	    0x55a279afb93e _ZN7objfile23find_last_source_symtabEv
	            ../../gdb/symfile-debug.c:139
	    0x55a279aa3040 _Z20select_source_symtabP6symtab
	            ../../gdb/source.c:365
	    0x55a279aa22a1 _Z34set_default_source_symtab_and_linev
	            ../../gdb/source.c:268
	    0x55a27903c44c list_command
	            ../../gdb/cli/cli-cmds.c:1185
	    0x55a279051233 do_simple_func
	            ../../gdb/cli/cli-decode.c:95
	    0x55a27905f221 _Z8cmd_funcP16cmd_list_elementPKci
	            ../../gdb/cli/cli-decode.c:2514
	    0x55a279c3b0ba _Z15execute_commandPKci
	            ../../gdb/top.c:660
	    0x55a27940a6c3 _Z15command_handlerPKc
	            ../../gdb/event-top.c:598
	    0x55a27940b032 _Z20command_line_handlerOSt10unique_ptrIcN3gdb13xfree_deleterIcEEE
	            ../../gdb/event-top.c:797
	    0x55a279caf401 tui_command_line_handler
	            ../../gdb/tui/tui-interp.c:278
	    0x55a279409098 gdb_rl_callback_handler
	            ../../gdb/event-top.c:230
	    0x55a279ed5df2 rl_callback_read_char
	            ../../../readline/readline/callback.c:281
	    0x55a279408bd8 gdb_rl_callback_read_char_wrapper_noexcept
	            ../../gdb/event-top.c:188
	    0x55a279408de7 gdb_rl_callback_read_char_wrapper
	            ../../gdb/event-top.c:205
	    0x55a27940a061 _Z19stdin_event_handleriPv
	            ../../gdb/event-top.c:525
	    0x55a27a23771e handle_file_event
	            ../../gdbsupport/event-loop.cc:574
	    0x55a27a237f5f gdb_wait_for_event
	            ../../gdbsupport/event-loop.cc:700
	    0x55a27a235d81 _Z16gdb_do_one_eventv
	            ../../gdbsupport/event-loop.cc:237
	    0x55a2796c2ef0 start_event_loop
	            ../../gdb/main.c:418
	    0x55a2796c3217 captured_command_loop
	            ../../gdb/main.c:478
	    0x55a2796c717b captured_main
	            ../../gdb/main.c:1340
	    0x55a2796c7217 _Z8gdb_mainP18captured_main_args
	            ../../gdb/main.c:1355
	    0x55a278d0b381 main
	            ../../gdb/gdb.c:32
	    ---------------------
	    A fatal error internal to GDB has been detected, further
	    debugging is not possible.  GDB will now terminate.

	    This is a bug, please report it.  For instructions, see:
	    <https://www.gnu.org/software/gdb/bugs/>.

	The first issue observed is in the message printed when hitting the
	breakpoint.  It says that there was a break in the .so file as if there
	was no debug info associated with it, but there is.  Later, if we try to
	display the source where the execution stopped, we have a segfault.

	Note that not having the debug info on the main binary is not strictly
	required to encounter some issues, it only is to encounter the segfault.
	If the main binary has debug information, GDB shows some source form the
	main binary, unrelated to where we stopped.

	The core of the issue is that GDB never loads the psymtab for the
	library.  It is not loaded when we first see the .so because in case of
	detach-on-fork off, follow-fork-mode child, infrun.c sets
	child_inf->symfile_flags = SYMFILE_NO_READ to delay the psymtab loading
	as much as possible.  If we compare to what was done to handle this
	before the new indexer was activated, the psymatb construction for the
	shared library was done under
	psymbol_functions::expand_symtabs_matching:

	    bool
	    psymbol_functions::expand_symtabs_matching (...)
	    {
	        for (partial_symtab *ps : require_partial_symbols (objfile))
	        ...
	    }

	The new indexer's expand_symtabs_matching callback does not have a call
	to the objfile's require_partial_symbols, so if the partial symbol table
	is not loaded at this point, there is no mechanism to fix this.

	Instead of requiring each implementation of the quick_functions to check
	that partial symbols have been read, I think it is safer to enforce this
	when calling the quick functions.  The general pattern for calling the
	quick functions is:

	    for (auto *iter : qf)
	      iter->the_actual_method_call (...)

	This patch proposes to wrap the access of the `qf` field with an accessor
	which ensures that partial symbols have been read before iterating:
	qf_require_partial_symbols.  All calls to quick functions are updated
	except:

	- quick_functions::dump
	- quick_functions::read_partial_symbols (from
	  objfile::require_partial_symbols)
	- quick_functions::can_lazily_read_symbols and quick_functions::has_symbols
	  (from objfile::has_partial_symbols)

	Regression tested on x86_64-gnu-linux.

	Change-Id: I39a13a937fdbaae613a5cf68864b021000554546

2022-05-26  Tom Tromey  <tom@tromey.com>

	Fix crash in new DWARF indexer
	PR gdb/29128 points out a crash in the new DWARF index code.  This
	happens if the aranges for a CU claims a PC, but the symtab that is
	created during CU expansion does not actually contain the PC.  This
	can only occur due to bad debuginfo, but at the same time, gdb should
	not crash.

	This patch fixes the bug and further merges some code into
	dwarf2_base_index_functions.  This merger helps prevent the same issue
	from arising from the other index implementations.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29128

2022-05-26  Tom Tromey  <tromey@adacore.com>

	Finalize each cooked index separately
	After DWARF has been scanned, the cooked index code does a
	"finalization" step in a worker thread.  This step combines all the
	index entries into a single master list, canonicalizes C++ names, and
	splits Ada names to synthesize package names.

	While this step is run in the background, gdb will wait for the
	results in some situations, and it turns out that this step can be
	slow.  This is PR symtab/29105.

	This can be sped up by parallelizing, at a small memory cost.  Now
	each index is finalized on its own, in a worker thread.  The cost
	comes from name canonicalization: if a given non-canonical name is
	referred to by multiple indices, there will be N canonical copies (one
	per index) rather than just one.

	This requires changing the users of the index to iterate over multiple
	results.  However, this is easily done by introducing a new "chained
	range" class.

	When run on gdb itself, the memory cost seems rather low -- on my
	current machine, "maint space 1" reports no change due to the patch.

	For performance testing, using "maint time 1" and "file" will not show
	correct results.  That approach measures "time to next prompt", but
	because the patch only affects background work, this shouldn't (and
	doesn't) change.  Instead, a simple way to make gdb wait for the
	results is to set a breakpoint.

	Before:

	    $ /bin/time -f%e ~/gdb/install/bin/gdb -nx -q -batch \
	        -ex 'break main' /tmp/gdb
	    Breakpoint 1 at 0x43ec30: file ../../binutils-gdb/gdb/gdb.c, line 28.
	    2.00

	After:

	    $ /bin/time -f%e ./gdb/gdb -nx -q -batch \
	        -ex 'break main' /tmp/gdb
	    Breakpoint 1 at 0x43ec30: file ../../binutils-gdb/gdb/gdb.c, line 28.
	    0.65

	Regression tested on x86-64 Fedora 34.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29105

2022-05-26  Alan Modra  <amodra@gmail.com>

	bit-rot in target before_parse function
	Copy initialisation over from the elf.em before_parse.  Commit
	ba951afb999 2022-05-03 changed behaviour on arm and score regarding
	exec stack.  This patch restores the previous behaviour.

		* emultempl/aarch64elf.em (before_parse): Init separate_code,
		warn_execstack, no_warn_rwx_segments and default_execstack.
		* emultempl/armelf.em (before_parse): Likewise.
		* emultempl/scoreelf.em (before_parse): Likewise.
		* testsuite/ld-elf/elf.exp (target_defaults_to_execstack): Return
		true for arm and nacl.

2022-05-26  Richard Earnshaw  <rearnsha@arm.com>

	 arm: avoid use of GNU builtin function in s_arm_unwind_save_mixed
	Whilst reviewing Luis' proposed change to s_arm_unwind_save_mixed
	yesterday I noticed that we were making use of __builting_clzl
	directly within the main function, which is not guaranteed to be
	portable.  Whilst studying the code further, I also realized that it
	could be rewritten without using it and also reworked to remove a lot
	of unnecessary iterations steps.  So this patch does that (and also
	removes the source of the warning that Luis was trying to fix).
	Finally, with the rewrite we can also simplify the caller of this
	routine as the new version can handle all the cases directly.

		* config/tc-arm.c (s_arm_unwind_save_mixed): Rewrite without
		using __builtin_clzl.
		(s_arm_unwind_save): Simplify logic for simple/mixed register saves.

2022-05-26  Lancelot SIX  <lancelot.six@amd.com>

	gdb/linux-nat: xfer_memory_partial return E_IO on error
	When accessing /proc/PID/mem, if pread64/pwrite64/read/write encounters
	an error and return -1, linux_proc_xfer_memory_partial return
	TARGET_XFER_EOF.

	I think it should return TARGET_XFER_E_IO in this case.  TARGET_XFER_EOF
	is returned when pread64/pwrite64/read/frite returns 0, which indicates
	that the address space is gone and the whole process has exited or
	execed.

	This patch makes this change.

	Regression tested on x86_64-linux-gnu.

	Change-Id: I6030412459663b8d7933483fdda22a6c2c5d7221

2022-05-26  Lancelot SIX  <lancelot.six@amd.com>

	gdb/testsuite: prefer gdb_test in gdb.dwarf2/calling-convention
	Since ed01945057c "Make gdb_test's question non-optional if specified",
	if the question and response parameters are given to gdb_test, the
	framework enforces that GDB asks the question.  Before this patch, tests
	needed to use gdb_test_multiple to enforce this.

	This patch updates the gdb.dwarf2/calling-convention.exp testcase to use
	gdb_test to check that GDB asks a question.  This replaces the more
	complicated gdb_test_multiple based implementation.

	Tested on x86_64-gnu-linux.

	Change-Id: I7216e822ca68f2727e0450970097d74c27c432fe

2022-05-26  Potharla, Rupesh  <Rupesh.Potharla@amd.com>

	bfd: Add Support for DW_FORM_strx* and DW_FORM_addrx*

2022-05-26  Luca Boccassi  <bluca@debian.org>

	ld: add --package-metadata
	Generate a .note.package FDO package metadata ELF note, following
	the spec: https://systemd.io/ELF_PACKAGE_METADATA/

	If the jansson library is available at build time (and it is explicitly
	enabled), link ld to it, and use it to validate that the input is
	correct JSON, to avoid writing garbage to the file. The
	configure option --enable-jansson has to be used to explicitly enable
	it (error out when not found). This allows bootstrappers (or others who
	are not interested) to seamlessly skip it without issues.

2022-05-26  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-26  Natarajan, Kavitha  <Kavitha.Natarajan@amd.com>

	Re: Add bionutils support for DWARF v5's DW_OP_addrx
	Testsuite files belonging to commit 3ac9da49378c.

2022-05-25  Pedro Alves  <pedro@palves.net>

	Show enabled locations with disabled breakpoint parent as "y-"
	Currently, breakpoint locations that are enabled while their parent
	breakpoint is disabled are displayed with "y" in the Enb colum of
	"info breakpoints":

	 (gdb) info breakpoints
	 Num     Type           Disp Enb Address            What
	 1       breakpoint     keep n   <MULTIPLE>
	 1.1                         y   0x00000000000011b6 in ...
	 1.2                         y   0x00000000000011c2 in ...
	 1.3                         n   0x00000000000011ce in ...

	Such locations won't trigger a break, so to avoid confusion, show "y-"
	instead.  For example:

	 (gdb) info breakpoints
	 Num     Type           Disp Enb Address            What
	 1       breakpoint     keep n   <MULTIPLE>
	 1.1                         y-  0x00000000000011b6 in ...
	 1.2                         y-  0x00000000000011c2 in ...
	 1.3                         n   0x00000000000011ce in ...

	The "-" sign is inspired on how the TUI represents breakpoints on the
	left side of the source window, with "b-" for a disabled breakpoint.

	Change-Id: I9952313743c51bf21b4b380c72360ef7d4396a09

2022-05-25  Natarajan, Kavitha  <Kavitha.Natarajan@amd.com>

	Add bionutils support for DWARF v5's DW_OP_addrx.

2022-05-25  Pedro Alves  <pedro@palves.net>

	gdb: Fix DUPLICATE and PATH regressions throughout
	The previous patch to add -prompt/-lbl to gdb_test introduced a
	regression: Before, you could specify an explicit empty message to
	indicate you didn't want to PASS, like so:

	  gdb_test COMMAND PATTERN ""

	After said patch, gdb_test no longer distinguishes
	no-message-specified vs empty-message, so tests that previously would
	be silent on PASS, now started emitting PASS messages based on
	COMMAND.  This in turn introduced a number of PATH/DUPLICATE
	violations in the testsuite.

	This commit fixes all the regressions I could see.

	This patch uses the new -nopass feature introduced in the previous
	commit, but tries to avoid it if possible.  Most of the patch fixes
	DUPLICATE issues the usual way, of using with_test_prefix or explicit
	unique messages.

	See previous commit's log for more info.

	In addition to looking for DUPLICATEs, I also looked for cases where
	we would now end up with an empty message in gdb.sum, due to a
	gdb_test being passed both no message and empty command.  E.g., this
	in gdb.ada/bp_reset.exp:

	 gdb_run_cmd
	 gdb_test "" "Breakpoint $decimal, foo\\.nested_sub \\(\\).*"

	was resulting in this in gdb.sum:

	 PASS: gdb.ada/bp_reset.exp:

	I fixed such cases by passing an explicit message.  We may want to
	make such cases error out.

	Tested on x86_64 GNU/Linux, native and native-extended-gdbserver.  I
	see zero PATH cases now.  I get zero DUPLICATEs with native testing
	now.  I still see some DUPLICATEs with native-extended-gdbserver, but
	those were preexisting, unrelated to the gdb_test change.

	Change-Id: I5375f23f073493e0672190a0ec2e847938a580b2

2022-05-25  Pedro Alves  <pedro@palves.net>

	Add -nopass option to gdb_test/gdb_test_multiple
	The previous patch to add -prompt/-lbl to gdb_test introduced a
	regression: Before, you could specify an explicit empty message to
	indicate you didn't want to PASS, like so:

	  gdb_test COMMAND PATTERN ""

	After said patch, gdb_test no longer distinguishes
	no-message-specified vs empty-message, so tests that previously would
	be silent on PASS, now started emitting PASS messages based on
	COMMAND.  This in turn introduced a number of PATH/DUPLICATE
	violations in the testsuite.

	I think that not issuing a PASS should be restricted to only a few
	cases -- namely in shared routines exported by gdb.exp, which happen
	to use gdb_test internally.  In tests that iterate an unknown number
	of tests exercising some racy scenario.  In the latter case, if we
	emit PASSes for each iteration, we run into the situation where
	different testsuite runs emit a different number of PASSes.

	Thus, this patch preserves the current behavior, and, instead, adds a
	new "-nopass" option to gdb_test and gdb_test_no_output.  Compared to
	the old way of supressing PASS with an empty message, this has the
	advantage that you can specify a FAIL message that is distinct from
	the command string, and, it's also more explicit.

	Change-Id: I5375f23f073493e0672190a0ec2e847938a580b2

2022-05-25  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Fix RV32Q conflict
	This commit makes RV32 + 'Q' extension (version 2.2 or later) not
	conflicting since this combination is no longer prohibited by the
	specification.

	bfd/ChangeLog:

		* elfxx-riscv.c (riscv_parse_check_conflicts): Remove conflict
		detection that prohibits RV32Q on 'Q' version 2.2 or later.

	gas/ChangeLog:

		* testsuite/gas/riscv/march-fail-rv32iq.d: Removed.
		* testsuite/gas/riscv/march-fail-rv32iq.l: Likewise.
		* testsuite/gas/riscv/march-fail-rv32iq2p0.d: New test
		showing RV32IQ fails on 'Q' extension version 2.0.
		* testsuite/gas/riscv/march-fail-rv32iq2p0.l: Likewise.
		* testsuite/gas/riscv/march-fail-rv32iq2.d: Likewise.
		* testsuite/gas/riscv/march-fail-rv32iq-isa-2p2.d: New test
		showing RV32IQ fails on ISA specification version 2.2.
		* testsuite/gas/riscv/march-ok-rv32iq2p2.d: New test
		showing RV32IQ succesds on 'Q' extension version 2.2.
		* testsuite/gas/riscv/march-ok-rv32iq-isa-20190608.d: New test
		showing RV32IQ succesds on ISA specification 20190608.

2022-05-25  Dmitry Selyutin  <ghostmansd@gmail.com>

	opcodes: introduce BC field; fix isel
	Per Power ISA Version 3.1B 3.3.12, isel uses BC field rather than CRB
	field present in binutils sources. Also, per 1.6.2, BC has the same
	semantics as BA and BB fields, so this should keep the same flags and
	mask, only with the different offset.

	opcodes/
	        * ppc-opc.c
	        (BC): Define new field, with the same definition as CRB field,
	        but with the PPC_OPERAND_CR_BIT flag present.
	gas/
	        * testsuite/gas/ppc/476.d: Update.
	        * testsuite/gas/ppc/a2.d: Update.
	        * testsuite/gas/ppc/e500.d: Update.
	        * testsuite/gas/ppc/power7.d: Update.

2022-05-25  Dmitry Selyutin  <ghostmansd@gmail.com>

	ppc: extend opindex to 16 bits
	With the upcoming SVP64 extension[0] to PowerPC architecture, it became
	evident that PowerPC operand indices no longer fit 8 bits. This patch
	switches the underlying type to uint16_t, also introducing a special
	typedef so that any future extension goes even smoother.

	[0] https://libre-soc.org

	include/
		* opcode/ppc.h (ppc_opindex_t): New typedef.
		(struct powerpc_opcode): Use it.
		(PPC_OPINDEX_MAX): Define.
	gas/
		* write.h (struct fix): Increase size of fx_pcrel_adjust.
		Reorganise.
		* config/tc-ppc.c (insn_validate): Use ppc_opindex_t for operands.
		(md_assemble): Likewise.
		(md_apply_fix): Likewise.  Mask fx_pcrel_adjust with PPC_OPINDEX_MAX.
		(ppc_setup_opcodes): Adjust opcode index assertion.
	opcodes/
		* ppc-dis.c (skip_optional_operands): Use ppc_opindex_t for
		operand pointer.
		(lookup_powerpc, lookup_prefix, lookup_vle, lookup_spe2): Likewise.
		(print_insn_powerpc): Likewise.

2022-05-25  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-24  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.opt/clobbered-registers-O2.exp with clang
	When running test-case gdb.opt/clobbered-registers-O2.exp with clang 12.0.1, I
	get:
	...
	(gdb) run ^M
	Starting program: clobbered-registers-O2 ^M
	^M
	Program received signal SIGSEGV, Segmentation fault.^M
	gen_movsd (operand0=<optimized out>, operand1=<optimized out>) at \
	  clobbered-registers-O2.c:31^M
	31              return *start_sequence(operand0, operand1);^M
	(gdb) FAIL: gdb.opt/clobbered-registers-O2.exp: runto: run to start_sequence
	...

	The problem is that the breakpoint in start_sequence doesn't trigger, because:
	- the call to start_sequence in gen_movsd is optimized away, despite the
	  __attribute__((noinline)), so the actual function start_sequence doesn't get
	  called, and
	- the debug info doesn't contain inlined function info, so there's only one
	  breakpoint location.

	Adding noclone and noipa alongside the noinline attribute doesn't fix this.

	Adding the clang-specific attribute optnone in start_sequence does, but since
	it inhibits all optimization, that's not a preferred solution in a gdb.opt
	test-case, and it would work only for clang and not other compilers that
	possibly have the same issue.

	Fix this by moving functions start_sequence and gen_movsd into their own
	files, as a way of trying harder to enforce noinline/noipa/noclone.

	Tested on x86_64-linux.

2022-05-24  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.opt/clobbered-registers-O2.exp with gcc-12
	When running test-case gdb.opt/clobbered-registers-O2.exp with gcc-12, I run
	into:
	...
	(gdb) PASS: gdb.opt/clobbered-registers-O2.exp: backtracing
	print operand0^M
	$1 = (unsigned int *) 0x7fffffffd070^M
	(gdb) print *operand0^M
	$2 = 4195541^M
	(gdb) FAIL: gdb.opt/clobbered-registers-O2.exp: print operand0
	...

	The problem is that starting gcc-12, the assignments to x and y in main are
	optimized away:
	...
	int main(void)
	{
	  unsigned x, y;

	  x = 13;
	  y = 14;
	  return (int)gen_movsd (&x, &y);
	...

	Fix this by making x and y volatile.

	Note that the test-case intends to check the handling of debug info for
	optimized code in function gen_movsd, so inhibiting optimization in main
	doesn't interfere with that.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29161

2022-05-24  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: LoongArch: Define LOONGARCH_LINUX_NUM_GREGSET as 45
	LOONGARCH_LINUX_NUM_GREGSET should be defined as 45 (32 + 1 + 1 + 11)
	due to reserved 11 for extension in glibc, otherwise when execute:

	  make check-gdb TESTS="gdb.base/corefile.exp"

	there exists the following failed testcase:

	  (gdb) core-file /home/loongson/build.git/gdb/testsuite/outputs/gdb.base/corefile/corefile.core
	  [New LWP 7742]
	  warning: Unexpected size of section `.reg/7742' in core file.
	  Core was generated by `/home/loongson/build.git/gdb/testsuite/outputs/gdb.base/corefile/corefile'.
	  Program terminated with signal SIGABRT, Aborted.
	  warning: Unexpected size of section `.reg/7742' in core file.
	  #0  0x000000fff76f4e24 in raise () from /lib/loongarch64-linux-gnu/libc.so.6
	  (gdb) FAIL: gdb.base/corefile.exp: core-file warning-free

2022-05-24  Christophe Lyon  <christophe.lyon@arm.com>

	AArch64: add support for DFP (Decimal Floating point)
	This small patch adds support for TYPE_CODE_DECFLOAT in
	aapcs_is_vfp_call_or_return_candidate_1 and pass_in_v_vfp_candidate,
	so that GDB for AArch64 knows how to pass DFP parameters and how to
	read DFP results when calling a function.

	Tested on aarch64-linux-gnu, with a GCC with DFP support in the PATH,
	all of GDB's DFP tests pass.

2022-05-24  Christophe Lyon  <christophe.lyon@arm.com>

	Merge config/ changes from GCC, to enable DFP on AArch64
	2022-04-28  Christophe Lyon  <christophe.lyon@arm.com>

		config/
		* dfp.m4 (enable_decimal_float): Enable BID for AArch64.

		libdecnumber/
		* configure: Regenerate.

2022-05-24  Alan Modra  <amodra@gmail.com>

	PR29171, invalid read causing SIGSEGV
	The fix here is to pass "section" down to read_and_display_attr_value.
	The test in read_and_display_attr_value is a little bit of hardening.

		PR 29171
		* dwarf.c (display_debug_macro, display_debug_names): Pass section
		to read_and_display_attr_value2.
		(read_and_display_attr_value): Don't attempt to check for .dwo
		section name when section is NULL.

2022-05-24  Alan Modra  <amodra@gmail.com>

	PR29170, divide by zero displaying fuzzed .debug_names
		PR 29170
		* dwarf.c (display_debug_names): Don't attempt to display bucket
		clashes when bucket count is zero.

	PR29169, invalid read displaying fuzzed .gdb_index
		PR 29169
		* dwarf.c (display_gdb_index): Combine sanity checks.  Calculate
		element counts, not word counts.

2022-05-24  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-23  John Baldwin  <jhb@FreeBSD.org>

	Tweak the std::hash<> specialization for aarch64_features.
	Move the specialization into an explicit std namespace to workaround a
	bug in older compilers.  GCC 6.4.1 at least fails to compile the previous
	version with the following error:

	gdb/arch/aarch64.h:48:13: error: specialization of 'template<class _Tp> struct std::hash' in different namespace [-fpermissive]

	  struct std::hash<aarch64_features>

2022-05-23  John Baldwin  <jhb@FreeBSD.org>

	Fix loongarch_iterate_over_regset_sections for non-native targets.
	Define a constant for the number of registers stored in a register set
	and use this with register_size to compute the size of the
	general-purpose register set in core dumps.

	This also fixes the build on hosts such as FreeBSD that do not define
	an elf_gregset_t type.

2022-05-23  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: LoongArch: Implement the iterate_over_regset_sections gdbarch method
	When execute the following command on LoongArch:

	  make check-gdb TESTS="gdb.base/auxv.exp"

	there exist the following unsupported and failed testcases:

	  UNSUPPORTED: gdb.base/auxv.exp: gcore
	  FAIL: gdb.base/auxv.exp: load core file for info auxv on native core dump
	  FAIL: gdb.base/auxv.exp: info auxv on native core dump
	  FAIL: gdb.base/auxv.exp: matching auxv data from live and core
	  UNSUPPORTED: gdb.base/auxv.exp: info auxv on gcore-created dump
	  UNSUPPORTED: gdb.base/auxv.exp: matching auxv data from live and gcore

	we can see the following messages in gdb/testsuite/gdb.log:

	  gcore /home/loongson/build.git/gdb/testsuite/outputs/gdb.base/auxv/auxv.gcore
	  Target does not support core file generation.
	  (gdb) UNSUPPORTED: gdb.base/auxv.exp: gcore

	In order to fix the above issues, implement the iterate_over_regset_sections
	gdbarch method to iterate over core file register note sections on LoongArch.

	By the way, with this patch, the failed testcases in gdb.base/corefile.exp
	and gdb.base/gcore.exp can also be fixed.

2022-05-23  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix -prompt handling in gdb_test
	With check-read1 I run into:
	...
	   [infrun] maybe_set_commit_resumed_all_targets: not requesting
	commit-resumed for target native, no resumed threads^M
	(gdb) FAIL: gdb.base/ui-redirect.exp: debugging: continue
	[infrun] fetch_inferior_event: exit^M
	...

	The problem is that proc gdb_test doesn't pass down the -prompt option to proc
	gdb_test_multiple, due to a typo making this lappend without effect:
	...
	    set opts {}
	    lappend "-prompt $prompt"
	...

	Fix this by actually appending to opts.

	Tested on x86_64-linux.

2022-05-23  Tom de Vries  <tdevries@suse.de>

	[gdbsupport] Fix UB in print-utils.cc:int_string
	When building gdb with -fsanitize=undefined, I run into:
	...
	(gdb) PASS: gdb.ada/access_to_packed_array.exp: set logging enabled on
	maint print symbols^M
	print-utils.cc:281:29:runtime error: negation of -9223372036854775808 cannot \
	  be represented in type 'long int'; cast to an unsigned type to negate this \
	  value to itself
	(gdb) FAIL: gdb.ada/access_to_packed_array.exp: maint print symbols
	...

	By running in a debug session, we find that this happens during printing of:
	...
	   typedef system.storage_elements.storage_offset: \
	     range -9223372036854775808 .. 9223372036854775807;
	...
	Possibly, an ada test-case could be created that exercises this in isolation.

	The problem is here in int_string, where we negate a val with type LONGEST:
	...
	         return decimal2str ("-", -val, width);
	...

	Fix this by, as recommend, using "-(ULONGEST)val" instead.

	Tested on x86_64-linux.

2022-05-23  Tom de Vries  <tdevries@suse.de>

	[gdb/exp] Fix UB in scalar_binop
	When building gdb with -fsanitize=undefined, I run into:
	...
	$ gdb -q -batch -ex "p -(-0x7fffffffffffffff - 1)"
	src/gdb/valarith.c:1385:10: runtime error: signed integer overflow: \
	  0 - -9223372036854775808 cannot be represented in type 'long int'
	$1 = -9223372036854775808
	...

	Fix this by performing the substraction in scalar_binop using unsigned types.

	Tested on x86_64-linux.

2022-05-23  Tom de Vries  <tdevries@suse.de>

	[gdb/ada] Fix gdb.ada/dynamic-iface.exp with gcc 7
	This test in test-case gdb.ada/dynamic-iface.exp passes with gcc 8:
	...
	(gdb) print obj^M
	$1 = (n => 3, a => "ABC", value => 93)^M
	(gdb) PASS: gdb.ada/dynamic-iface.exp: print local as interface
	...
	but fails with gcc 7:
	...
	(gdb) print obj^M
	$1 = ()^M
	(gdb) FAIL: gdb.ada/dynamic-iface.exp: print local as interface
	...

	More concretely, we have trouble finding the type of obj.  With gcc 8:
	...
	$ gdb -q -batch main -ex "b concrete.adb:20" -ex run -ex "ptype obj"
	  ...
	type = <ref> new concrete.intermediate with record
	    value: integer;
	end record
	...
	and with gcc 7:
	...
	type = <ref> tagged record null; end record
	...

	The translation from tagged type to "full view" type happens in
	ada_tag_value_at_base_address, where we hit this code:
	...
	  /* Storage_Offset'Last is used to indicate that a dynamic offset to
	     top is used.  In this situation the offset is stored just after
	     the tag, in the object itself.  */
	  if (offset_to_top == last)
	    {
	      struct value *tem = value_addr (tag);
	      tem = value_ptradd (tem, 1);
	      tem = value_cast (ptr_type, tem);
	      offset_to_top = value_as_long (value_ind (tem));
	    }
	...
	resulting in an offset_to_top for gcc 8:
	...
	(gdb) p offset_to_top
	$1 = -16
	...
	and for gcc 7:
	...
	(gdb) p offset_to_top
	$1 = 16
	...

	The difference is expected, it bisects to gcc commit d0567dc0dbf ("[multiple
	changes]") which mentions this change.

	There's some code right after the code quoted above that deals with this
	change:
	...
	  else if (offset_to_top > 0)
	    {
	      /* OFFSET_TO_TOP used to be a positive value to be subtracted
		 from the base address.  This was however incompatible with
		 C++ dispatch table: C++ uses a *negative* value to *add*
		 to the base address.  Ada's convention has therefore been
		 changed in GNAT 19.0w 20171023: since then, C++ and Ada
		 use the same convention.  Here, we support both cases by
		 checking the sign of OFFSET_TO_TOP.  */
	      offset_to_top = -offset_to_top;
	    }
	...
	but it's not activated because of the 'else'.

	Fix this by removing the 'else'.

	Tested on x86_64-linux, with gcc 7.5.0.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29057

2022-05-23  Mark Harmstone  <mark@harmstone.com>

	ld: use definitions in generate_reloc rather than raw literals

2022-05-23  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Skip language auto in gdb.base/parse_number.exp
	In test-case gdb.base/parse_number.exp, we skip architecture auto in the
	$supported_archs loop, to prevent duplicate testing.

	Likewise, skip language auto and its alias local in the $::all_languages
	loop.  This reduces the number of tests from 17744 to 15572.

	Tested on x86_64-linux, with a build with --enable-targets=all.

2022-05-23  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-22  Alok Kumar Sharma  <AlokKumar.Sharma@amd.com>

	Accept functions with DW_AT_linkage_name present
	Currently GDB is not able to debug (Binary generated with Clang) variables
	present in shared/private clause of OpenMP Task construct. Please note that
	LLVM debugger LLDB is able to debug.

	In case of OpenMP, compilers generate artificial functions which are not
	present in actual program. This is done to apply parallelism to block of
	code.

	For non-artifical functions, DW_AT_name attribute should contains the name
	exactly as present in actual program.
	(Ref# http://wiki.dwarfstd.org/index.php?title=Best_Practices)
	Since artificial functions are not present in actual program they not having
	DW_AT_name and having DW_AT_linkage_name instead should be fine.

	Currently GDB is invalidating any function not havnig DW_AT_name which is why
	it is not able to debug OpenMP (Clang).

	It should be fair to fallback to check DW_AT_linkage_name in case DW_AT_name
	is absent.

2022-05-22  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-21  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-20  Pedro Alves  <pedro@palves.net>

	Rename base_breakpoint -> code_breakpoint
	Even after the previous patches reworking the inheritance of several
	breakpoint types, the present breakpoint hierarchy looks a bit
	surprising, as we have "breakpoint" as the superclass, and then
	"base_breakpoint" inherits from "breakpoint".  Like so, simplified:

	   breakpoint
	       base_breakpoint
	          ordinary_breakpoint
		  internal_breakpoint
		  momentary_breakpoint
		  ada_catchpoint
		  exception_catchpoint
	       tracepoint
	       watchpoint
	       catchpoint
		  exec_catchpoint
		  ...

	The surprising part to me is having "base_breakpoint" being a subclass
	of "breakpoint".  I'm just refering to naming here -- I mean, you'd
	expect that it would be the top level baseclass that would be called
	"base".

	Just flipping the names of breakpoint and base_breakpoint around
	wouldn't be super great for us, IMO, given we think of every type of
	*point as a breakpoint at the user visible level.  E.g., "info
	breakpoints" shows watchpoints, tracepoints, etc.  So it makes to call
	the top level class breakpoint.

	Instead, I propose renaming base_breakpoint to code_breakpoint.  The
	previous patches made sure that all code breakpoints inherit from
	base_breakpoint, so it's fitting.  Also, "code breakpoint" contrasts
	nicely with a watchpoint also being typically known as a "data
	breakpoint".

	After this commit, the resulting hierarchy looks like:

	   breakpoint
	       code_breakpoint
	          ordinary_breakpoint
		  internal_breakpoint
		  momentary_breakpoint
		  ada_catchpoint
		  exception_catchpoint
	       tracepoint
	       watchpoint
	       catchpoint
		  exec_catchpoint
		  ...

	... which makes a lot more sense to me.

	I've left this patch as last in the series in case people want to
	bikeshed on the naming.

	"code" has a nice property that it's exactly as many letters as
	"base", so this patch didn't require any reindentation.  :-)

	Change-Id: Id8dc06683a69fad80d88e674f65e826d6a4e3f66

2022-05-20  Pedro Alves  <pedro@palves.net>

	Test "set multiple-symbols on" creating multiple breakpoints
	To look for code paths that lead to create_breakpoints_sal creating
	multiple breakpoints, I ran the whole testsuite with this hack:

	  --- a/gdb/breakpoint.c
	  +++ b/gdb/breakpoint.c
	  @@ -8377,8 +8377,7 @@ create_breakpoints_sal (struct gdbarch *gdbarch,
				  int from_tty,
				  int enabled, int internal, unsigned flags)
	   {
	  -  if (canonical->pre_expanded)
	  -    gdb_assert (canonical->lsals.size () == 1);
	  +  gdb_assert (canonical->lsals.size () == 1);

	surprisingly, the assert never failed...

	The way to get to create_breakpoints_sal with multiple lsals is to use
	"set multiple-symbols ask" and then select multiple options from the
	menu, like so:

	 (gdb) set multiple-symbols ask
	 (gdb) b overload1arg
	 [0] cancel
	 [1] all
	 [2] /home/pedro/gdb/binutils-gdb/src/gdb/testsuite/gdb.cp/ovldbreak.cc:foo::overload1arg()
	 [3] /home/pedro/gdb/binutils-gdb/src/gdb/testsuite/gdb.cp/ovldbreak.cc:foo::overload1arg(char)
	 [4] /home/pedro/gdb/binutils-gdb/src/gdb/testsuite/gdb.cp/ovldbreak.cc:foo::overload1arg(double)
	 [5] /home/pedro/gdb/binutils-gdb/src/gdb/testsuite/gdb.cp/ovldbreak.cc:foo::overload1arg(float)
	 [6] /home/pedro/gdb/binutils-gdb/src/gdb/testsuite/gdb.cp/ovldbreak.cc:foo::overload1arg(int)
	 [7] /home/pedro/gdb/binutils-gdb/src/gdb/testsuite/gdb.cp/ovldbreak.cc:foo::overload1arg(long)
	 [8] /home/pedro/gdb/binutils-gdb/src/gdb/testsuite/gdb.cp/ovldbreak.cc:foo::overload1arg(short)
	 [9] /home/pedro/gdb/binutils-gdb/src/gdb/testsuite/gdb.cp/ovldbreak.cc:foo::overload1arg(signed char)
	 [10] /home/pedro/gdb/binutils-gdb/src/gdb/testsuite/gdb.cp/ovldbreak.cc:foo::overload1arg(unsigned char)
	 [11] /home/pedro/gdb/binutils-gdb/src/gdb/testsuite/gdb.cp/ovldbreak.cc:foo::overload1arg(unsigned int)
	 [12] /home/pedro/gdb/binutils-gdb/src/gdb/testsuite/gdb.cp/ovldbreak.cc:foo::overload1arg(unsigned long)
	 [13] /home/pedro/gdb/binutils-gdb/src/gdb/testsuite/gdb.cp/ovldbreak.cc:foo::overload1arg(unsigned short)
	 > 2-3
	 Breakpoint 2 at 0x1532: file /home/pedro/gdb/binutils-gdb/src/gdb/testsuite/gdb.cp/ovldbreak.cc, line 107.
	 Breakpoint 3 at 0x154b: file /home/pedro/gdb/binutils-gdb/src/gdb/testsuite/gdb.cp/ovldbreak.cc, line 110.
	 warning: Multiple breakpoints were set.
	 Use the "delete" command to delete unwanted breakpoints.

	... which would trigger the assert.

	This commit makes gdb.cp/ovldbreak.exp test this scenario.  It does
	that by making set_bp_overloaded take a list of expected created
	breakpoints rather than just one breakpoint.  It converts the
	procedure to use gdb_test_multiple instead of send_gdb/gdb_expect
	along the way.

	Change-Id: Id87d1e08feb6670440d926f5344e5081f5e37c8e

2022-05-20  Pedro Alves  <pedro@palves.net>

	Make sure momentary breakpoints are always thread-specific
	This adds a new ctor to momentary_breakpoints with a few parameters
	that are always necessary for momentary breakpoints.

	In particular, I noticed that set_std_terminate_breakpoint doesn't
	make the breakpoint be thread specific, which looks like a bug to me.

	The point of that breakpoint is to intercept std::terminate calls that
	happen as result of the called thread throwing an exception that won't
	be caught by the dummy frame.  If some other thread calls
	std::terminate, IMO, it's no different from some other thread calling
	exit/_exit, for example.

	Change-Id: Ifc5ff4a6d6e58b8c4854d00b86725382d38a1a02

2022-05-20  Pedro Alves  <pedro@palves.net>

	Momentary breakpoints should have no breakpoint number
	Momentary breakpoints have no breakpoint number, their breakpoint
	number should be always 0, to avoid constantly incrementing (or
	decrementing) the internal breakpoint count.

	Indeed, set_momentary_breakpoint installs the created breakpoint
	without a number.

	However, momentary_breakpoint_from_master incorrectly gives an
	internal breakpoint number to the new breakpoint.  This commit fixes
	that.

	Change-Id: Iedcae5432cdf232db9e9a6e1a646d358abd34f95

2022-05-20  Pedro Alves  <pedro@palves.net>

	Add/tweak intro comments of struct breakpoint and several subclasses
	This tweaks the intro comments of the following classes:

	 internal_breakpoint
	 momentary_breakpoint
	 breakpoint
	 base_breakpoint
	 watchpoint
	 catchpoint

	Change-Id: If6b31f51ebbb81705fbe5b8435f60ab2c88a98c8

2022-05-20  Pedro Alves  <pedro@palves.net>

	Move add_location(sal) to base_breakpoint
	After the previous patches, only base_breakpoint subclasses use
	add_location(sal), so we can move it to base_breakpoint (a.k.a. base
	class for code breakpoints).

	This requires a few casts here and there, but always at spots where
	you can see from context what the breakpoint's type actually is.

	I inlined new_single_step_breakpoint into its only caller exactly for
	this reason.

	I did try to propagate more use of base_breakpoint to avoid casts, but
	that turned out unwieldy for this patch.

	Change-Id: I49d959322b0fdce5a88a216bb44730fc5dd7c6f8

2022-05-20  Pedro Alves  <pedro@palves.net>

	Move common bits of catchpoint/exception_catchpoint to breakpoint's ctor
	Move common bits of catchpoint and exception_catchpoint to
	breakpoint's ctor, to avoid duplicating code.

	Change-Id: I3a115180f4d496426522f1d89a3875026aea3cf2

2022-05-20  Pedro Alves  <pedro@palves.net>

	Make catchpoint inherit breakpoint, eliminate init_raw_breakpoint
	struct catchpoint's ctor currently calls init_raw_breakpoint, which is
	a bit weird, as that ctor-like function takes a sal argument, but
	catchpoints don't have code locations.

	Instead, make struct catchpoint's ctor add the catchpoint's dummy
	location using add_dummy_location.

	init_raw_breakpoint uses add_location under the hood, and with a dummy
	sal it would ultimately use the breakpoint's gdbarch for the
	location's gdbarch, so replace the references to loc->gdbarch (which
	is now NULL) in syscall_catchpoint to references to the catchpoint's
	gdbarch.

	struct catchpoint's ctor was the last user of init_raw_breakpoint, so
	this commit eliminates the latter.

	Since catchpoint locations aren't code locations, make struct
	catchpoint inherit struct breakpoint instead of base_breakpoint.  This
	let's us delete the tracepoint::re_set override too.

	Change-Id: Ib428bf71efb09fdaf399c56e4372b0f41d9c5869

2022-05-20  Pedro Alves  <pedro@palves.net>

	Make breakpoint_address_bits look at the location kind
	Software watchpoints allocate a special dummy location using
	software_watchpoint_add_no_memory_location, and then
	breakpoint_address_bits checks whether the location is that special
	location to decide whether the location has a meaninful address to
	print.

	Introduce a new bp_loc_software_watchpoint location kind, and make
	breakpoint_address_bits use bl_address_is_meaningful instead, which
	returns false for bp_loc_other, which is in accordance with we
	document for bp_location::address:

	  /* (... snip ...)  Valid for all types except
	     bp_loc_other.  */
	  CORE_ADDR address = 0;

	Rename software_watchpoint_add_no_memory_location to
	add_dummy_location, and simplify it.  This will be used by catchpoints
	too in a following patch.

	Note that neither "info breakpoints" nor "maint info breakpoints"
	actually prints the addresses of watchpoints, but I think it would be
	useful to do so in "maint info breakpoints".  This approach let's us
	implement that in the future.

	Change-Id: I50e398f66ef618c31ffa662da755eaba6295aed7

2022-05-20  Pedro Alves  <pedro@palves.net>

	Make exception_catchpoint inherit base_breakpoint instead of catchpoint
	exception_catchpoint is really a code breakpoint, with locations set
	by sals, re-set like other code breakpoints, etc., so make it inherit
	base_breakpoint.

	This adds a bit of duplicated code to exception_catchpoint's ctor
	(copied from struct catchpoint's ctor), but it will be eliminated in a
	following patch.

	Change-Id: I9fbb2927491120e9744a4f5e5cb5e6870ca07009

2022-05-20  Pedro Alves  <pedro@palves.net>

	Refactor momentary breakpoints, eliminate set_raw_breakpoint{,_without_location}
	This commit makes set_momentary_breakpoint allocate the breakpoint
	type without relying on set_raw_breakpoint, and similarly,
	momentary_breakpoint_from_master not rely on
	set_raw_breakpoint_without_location.  This will let us convert
	init_raw_breakpoint to a ctor in a following patch.

	The comment about set_raw_breakpoint being used in gdbtk sources is
	stale.  gdbtk no longer uses it.

	Change-Id: Ibbf77731e4b22e18ccebc1b5799bbec0aff28c8a

2022-05-20  Pedro Alves  <pedro@palves.net>

	Refactor set_internal_breakpoint / internal_breakpoint ctor
	This moves initialization of internal_breakpoint's breakpoint fields
	to internal_breakpoint's ctor, and stops using
	new_breakpoint_from_type for internal_breakpoint breakpoints.

	Change-Id: I898ed0565f47cb00e4429f1c6446e6f9a385a78d

2022-05-20  Pedro Alves  <pedro@palves.net>

	Convert init_ada_exception_catchpoint to a ctor
	Currently, init_ada_exception_catchpoint is defined in breakpoint.c, I
	presume so it can call the static describe_other_breakpoints function.
	I think this is a dependency inversion.
	init_ada_exception_catchpoint, being code specific to Ada catchpoints,
	should be in ada-lang.c, and describe_other_breakpoints, a core
	function, should be exported.

	And then, we can convert init_ada_exception_catchpoint to an
	ada_catchpoint ctor.

	Change-Id: I07695572dabc5a75d3d3740fd9b95db1529406a1

2022-05-20  Pedro Alves  <pedro@palves.net>

	Make ada_catchpoint_location's owner ctor parameter be ada_catchpoint
	This commit changes ada_catchpoint_location's ctor from:

	  ada_catchpoint_location (breakpoint *owner)

	to:

	  ada_catchpoint_location (ada_catchpoint *owner)

	just to make the code better document intention.

	To do this, we need to move the ada_catchpoint_location type's
	definition to after ada_catchpoint is defined, otherwise the compiler
	doesn't know that ada_catchpoint is convertible to struct breakpoint.

	Change-Id: Id908b2e38bde30b262381e00c5637adb9bf0129d

2022-05-20  Pedro Alves  <pedro@palves.net>

	init_breakpoint_sal -> base_breakpoint::base_breakpoint
	This converts init_breakpoint_sal to a base_breakpoint constructor.

	It removes a use of init_raw_breakpoint.

	To avoid manually adding a bunch of parameters to
	new_breakpoint_from_type, and manually passing them down to the
	constructors of a number of different base_breakpoint subclasses, make
	new_breakpoint_from_type a variable template function.

	Change-Id: I4cc24133ac4c292f547289ec782fc78e5bbe2510

2022-05-20  Pedro Alves  <pedro@palves.net>

	Remove "internal" parameter from a couple functions
	None of init_breakpoint_sal, create_breakpoint_sal, and
	strace_marker_create_breakpoints_sal make use of their "internal"
	parameter, so remove it.

	Change-Id: I943f3bb44717ade7a7b7547edf8f3ff3c37da435

2022-05-20  Pedro Alves  <pedro@palves.net>

	More breakpoint_ops parameter elimination
	Remove breakpoint_ops parameters from a few functions that don't need
	it.

	Change-Id: Ifcf5e1cc688184acbf5e19b8ea60138ebe63cf28

2022-05-20  Pedro Alves  <pedro@palves.net>

	Make a few functions work with base_breakpoint instead of breakpoint
	This makes tracepoints inherit from base_breakpoint, since their
	locations are code locations.  If we do that, then we can eliminate
	tracepoint::re_set and tracepoint::decode_location, as they are doing
	the same as the base_breakpoint implementations.

	With this, all breakpoint types created by new_breakpoint_from_type
	are code breakpoints, i.e., base_breakpoint subclasses, and thus we
	can make it return a base_breakpoint pointer.

	Finally, init_breakpoint_sal can take a base_breakpoint pointer as
	"self" pointer too.  This will let us convert this function to a
	base_breakpoint ctor in a following patch.

	Change-Id: I3a4073ff1a4c865f525588095c18dc42b744cb54

2022-05-20  Pedro Alves  <pedro@palves.net>

	ranged_breakpoint: move initialization to ctor
	Move initialization of ranged_breakpoint's fields to its ctor.

	Change-Id: If7b842861f3cc6a429ea329d45598b5852283ba3

2022-05-20  Pedro Alves  <pedro@palves.net>

	ranged_breakpoint: use install_breakpoint
	This commit replaces a chunk of code in break_range_command by an
	equivalent call to install_breakpoint.

	Change-Id: I31c06cabd36f5be91740aab029265f678aa78e35

2022-05-20  Pedro Alves  <pedro@palves.net>

	ranged_breakpoint: don't use init_raw_breakpoint
	ranged_breakpoint's ctor already sets the breakpoint's type to
	bp_hardware_breakpoint.

	Since this is a "regular" breakpoint, b->pspace should remain NULL.

	Thus, the only thing init_raw_breakpoint is needed for, is to add the
	breakpoint's location.  Do that directly.

	Change-Id: I1505de94c3919881c2b300437e2c0da9b05f76bd

2022-05-20  Pedro Alves  <pedro@palves.net>

	Make structs breakpoint/base_breakpoint/catchpoint be abstract
	You should never instanciate these types directly.

	Change-Id: I8086c74c415eadbd44924bb0ef20f34b5b97ee6f

2022-05-20  Pedro Alves  <pedro@palves.net>

	add_location_to_breakpoint -> breakpoint::add_location
	Make add_location_to_breakpoint be a method of struct breakpoint.

	A patch later in the series will move this to base_breakpoint, but for
	now, it needs to be here.

	Change-Id: I5bdc2ec1a7c2d66f26f51bf6f6adc8384a90b129

2022-05-20  Carl Love  <cel@us.ibm.com>

	PowerPC: Make test gdb.arch/powerpc-power10.exp Endian independent.
	The .quad statement stores the 64-bit hex value in Endian order.  When used
	to store a 64-bit prefix instructions on Big Endian (BE) systems, the .quad
	statement stores the 32-bit suffix followed by the 32-bit prefix rather
	than the expected order of prefix word followed by the suffix word.  GDB
	fetches 32-bits at a time when disassembling instructions.  The disassembly
	on BE gets messed up since GDB fetches the suffix first and interprets it
	as a word instruction not a prefixed instruction.  When gdb fetches the
	prefix part of the instruction, following the initial suffix word, gdb
	associates the prefix word incorrectly with the following 32-bits as the
	suffix for the instruction when in fact it is the following instruction.

	For example on BE we have two prefixed instructions stored using the
	.quad statement as follows:

	 addr    word                GDB action
	---------------------------------------------
	  1      suffix inst A   <- GDB interprets as a word instruction
	  2      prefix inst A   <- GDB uses this prefix with

	  3      suffix inst B   <- this suffix rather than the suffix at addr 1.
	  4      prefix inst B

	This patch changes the .quad statement into two .longs to explicitly store
	the prefix followed by the suffix of the instruction.

	The patch rearranges the instructions to put all of the word instructions
	together followed by the prefix instructions for clarity.

	The patch has been tested on Power 10 and Power 7 BE and LE to verify
	the change works as expected.

2022-05-20  Tom Tromey  <tromey@adacore.com>

	Remove obsolete text from documentation
	The documentation says that -enable-pretty-printing is experimental in
	7.0 and may change -- that's long enough ago that I think we can say
	that this text is no longer correct or useful.

2022-05-20  Nick Clifton  <nickc@redhat.com>

	Stop readekf and objdump from aggressively following links.
		* dwarf.c (dwarf_select_sections_by_names): Return zero if no
		sections were selected.
		(dwarf_select_sections_by_letters): Likewise.
		* dwarf.h: (dwarf_select_sections_by_names): Update prototype.
		(dwarf_select_sections_by_letters): Update prototype.
		* objdump.c (might_need_separate_debug_info): New function.
		(dump_bfd): Call new function before attempting to load separate
		debug info files.
		(main): Do not enable dwarf section dumping for -WK or -WN.
		* readelf.c (parse_args): Do not enable dwarf section dumping for
		-wK or -wN.
		(might_need_separate_debug_info): New function.
		(process_object): Call new function before attempting to load
		separate debug info files.
		* testsuite/binutils-all/debuginfo.exp: Expect -WE and -wE
		debuginfod tests to pass.
		* testsuite/binutils-all/objdump.Wk: Add extra regexps.
		* testsuite/binutils-all/readelf.k: Add extra regexps.

2022-05-20  Jia-Wei Chen  <jiawei@iscas.ac.cn>

	RISC-V: Update zfinx implement with zicsr.
	Update zfinx implement with zicsr, fix missing fcsr use by zfinx.
	add zicsr imply by zfinx.

	bfd/ChangeLog:

	        * elfxx-riscv.c: New imply.

	gas/ChangeLog:

	        * testsuite/gas/riscv/csr-insns-pseudo-zfinx.d: New test.

	opcodes/ChangeLog:

	        * riscv-opc.c: Update insn class.

2022-05-20  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Remove RV128-only fmv instructions
	As fmv.x.q and fmv.q.x instructions are RV128-only (not RV64-only),
	it should be removed until RV128 support for GNU Binutils is required
	again.

	gas/ChangeLog:

		* testsuite/gas/riscv/fmv.x.q-rv64-fail.d: New failure test.
		* testsuite/gas/riscv/fmv.x.q-rv64-fail.l: Likewise.
		* testsuite/gas/riscv/fmv.x.q-rv64-fail.s: Likewise.

	include/ChangeLog:

		* opcode/riscv-opc.h (MATCH_FMV_X_Q, MASK_FMV_X_Q,
		MATCH_FMV_Q_X, MASK_FMV_Q_X): Remove RV128-only instructions.

	opcodes/ChangeLog:

		* riscv-opc.c (riscv_opcodes): Remove RV128-only instructions.

2022-05-20  Aditya Vidyadhar Kamath  <ADITYA.VIDYADHAR.KAMATH@ibm.com>

	Fix non-pointer type compilation error in aix-thread.c
	In aix-thread.c we use ms->value_address () to get the symbol address.
	This triggers the following compiler error...

	     base operand of '->'  has non-pointer type 'bound_minimal_symbol'

	... because ms is not a pointer.

	This commit fixes this error by using ms.value_address () instead.

2022-05-20  Steinar H. Gunderson  <sesse@google.com>

	add a trie to map quickly from address range to compilation unit
	When using perf to profile large binaries, _bfd_dwarf2_find_nearest_line()
	becomes a hotspot, as perf wants to get line number information
	(for inline-detection purposes) for each and every sample. In Chromium
	in particular (the content_shell binary), this entails going through
	475k address ranges, which takes a long time when done repeatedly.

	Add a radix-256 trie over the address space to quickly map address to
	compilation unit spaces; for content_shell, which is 1.6 GB when some
	(but not full) debug information turned is on, we go from 6 ms to
	0.006 ms (6 µs) for each lookup from address to compilation unit, a 1000x
	speedup.

	There is a modest RAM increase of 180 MB in this binary (the existing
	linked list over ranges uses about 10 MB, and the entire perf job uses
	between 2–3 GB for a medium-size profile); for smaller binaries with few
	ranges, there should be hardly any extra RAM usage at all.

2022-05-20  Alan Modra  <amodra@gmail.com>

	Tidy warn-execstack handling
	Make ld and bfd values consistent by swapping values 0 and 2 in
	link_info.warn_execstack.  This has the benefit of making the value an
	"extended" boolean, with 0 meaning no warning, 1 meaning warn, other
	values a conditional warning.

	Yes, this patch introduces fails on arm/aarch64.  Not a problem with
	this patch but an arm/aarch64 before_parse problem.

	bfd/
		* elflink.c (bfd_elf_size_dynamic_sections): Adjust
		warn_execstack test.
	include/
		* bfdlink.h (warn_execstack): Swap 0 and 2 meaning.
	ld/
		* configure.ac (DEFAULT_LD_WARN_EXECSTACK): Use values of 0,
		1, 2 consistent with link_info.warn_execstack.
		* ld.texi: Typo fixes.
		* lexsup.c (parse_args): Adjust setting of link_info.warn_execstack.
		(elf_static_list_options): Adjust help message conditions.
		* configure: Regenerate.

2022-05-20  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-19  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>

	arm: Fix system register fpcxt_ns and fpcxt_s naming convention.
	The current assembler accepts system registers FPCXTNS and FPCXTS for Armv8.1-M
	Mainline Instructions VSTR, VLDR, VMRS and VMSR.
	Assembler should be also allowing FPCXT_NS, fpcxt_ns, fpcxtns, FPCXT_S, fpcxt_s
	and fpcxts. This patch fixes the issue.

2022-05-19  Andrew Burgess  <aburgess@redhat.com>

	gdb/doc: use @value{GDBP} in 'info pretty-printer' example
	Update the 'info pretty-printer' example in the manual to make use of
	@value{GDBP} instead of hard-coding '(gdb)'.

2022-05-19  Andrew Burgess  <aburgess@redhat.com>

	gdb/doc: make use of group/end group in 'info pretty-printers' example
	The 'info pretty-printers' example is pretty long and consists of many
	commands and their output.

	Currently, when the pdf manual is generated this example spans a
	page-break, with the page-break falling part way through some example
	output from GDB.

	This commit breaks up the example using @group .... @end group, within
	each group is a single GDB command and all its output.

	Now, when the pdf manual is created, the page-break is placed after
	the output of one GDB command, and before the subsequent command, this
	looks much nicer.

2022-05-19  Nikolaos Chatzikonstantinou  <nchatz314@gmail.com>

	gdb/doc: fix inconsistent info pretty-printer example
	The example for 'info pretty-printer' in the manual passes an
	object-regexp in some cases, but presents output as though no
	object-regexp was passed.

	This commit fixes the two mistakes, in one case, fixing the output to
	filter based on object-regexp, and in the other, to remove the
	object-regexp from the command and leave all the output.

2022-05-19  Nick Clifton  <nickc@redhat.com>

	Fix potentially uninitialised variables in the Windows tools

2022-05-19  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: testsuite: Support displaced stepping on LoongArch
	When execute the following command on LoongArch:

	  make check-gdb TESTS="gdb.base/async-shell.exp"

	we can see the following message in gdb/testsuite/gdb.sum:

	  UNSUPPORTED: gdb.base/async-shell.exp: displaced stepping

	modify support_displaced_stepping to support displaced stepping
	on LoongArch.

	With this patch:

	  PASS: gdb.base/async-shell.exp: run &
	  PASS: gdb.base/async-shell.exp: shell echo foo
	  PASS: gdb.base/async-shell.exp: interrupt
	  PASS: gdb.base/async-shell.exp: process stopped

	I did the following tests that use support_displaced_stepping
	with this patch on LoongArch, there is no failed testcases.

	loongson@linux:~/gdb.git$ grep -r support_displaced_stepping gdb/testsuite/gdb.*
	gdb/testsuite/gdb.arch/disp-step-insn-reloc.exp:if { ![support_displaced_stepping] } {
	gdb/testsuite/gdb.base/step-over-no-symbols.exp:    if { $displaced != "off" && ![support_displaced_stepping] } {
	gdb/testsuite/gdb.base/moribund-step.exp:if { ![support_displaced_stepping] } {
	gdb/testsuite/gdb.base/async-shell.exp:if { ![support_displaced_stepping] } {
	gdb/testsuite/gdb.base/inferior-died.exp:if { ![support_displaced_stepping] } {
	gdb/testsuite/gdb.base/step-over-syscall.exp:        if {$displaced == "on" && ![support_displaced_stepping]} {
	gdb/testsuite/gdb.mi/mi-watch-nonstop.exp:if { ![support_displaced_stepping] } {
	gdb/testsuite/gdb.mi/mi-ns-stale-regcache.exp:if { ![support_displaced_stepping] } {
	gdb/testsuite/gdb.mi/mi-nonstop.exp:if { ![support_displaced_stepping] } {
	gdb/testsuite/gdb.mi/mi-nsmoribund.exp:if { ![support_displaced_stepping] } {
	gdb/testsuite/gdb.mi/mi-nsintrall.exp:if { ![support_displaced_stepping] } {
	gdb/testsuite/gdb.mi/mi-nsthrexec.exp:if { ![support_displaced_stepping] } {
	gdb/testsuite/gdb.mi/mi-nonstop-exit.exp:if { ![support_displaced_stepping] } {
	gdb/testsuite/gdb.multi/watchpoint-multi.exp:if [support_displaced_stepping] {
	gdb/testsuite/gdb.python/py-evthreads.exp:if { ![support_displaced_stepping] } {
	gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp:    if { $displaced != "off" && ![support_displaced_stepping] } {
	gdb/testsuite/gdb.threads/interrupt-while-step-over.exp:    if { ${displaced-stepping} != "off" && ![support_displaced_stepping] } {
	gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp:    if { $displaced != "off" && ![support_displaced_stepping] } {

2022-05-19  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbsupport: fix path_join crash with -std=c++17 and -D_GLIBCXX_DEBUG
	When building GDB with -std=c++17 and -D_GLIBCXX_DEBUG=1, I get:

	  $ ./gdb -nx --data-directory=data-directory -q -ex "maint selftest path_join"
	  /usr/include/c++/11.2.0/string_view:233: constexpr const value_type& std::basic_string_view<_CharT, _Traits>::operator[](std::basic_string_view<_CharT, _Traits>::size_type) const [with _CharT = char; _Traits = std::char_traits<char>; std::basic_string_view<_CharT, _Traits>::const_reference = const char&; std::basic_string_view<_CharT, _Traits>::size_type = long unsigned int]: Assertion  '__pos < this->_M_len' failed.

	The problem is that we're passing an empty string_view to
	IS_ABSOLUTE_PATH.  IS_ABSOLUTE_PATH accesses [0] on that string_view,
	which is out-of-bounds.

	The reason this is not seen with -std less than c++17 is that our local
	copy of string_view (used with C++ < 17) does not have the assert in
	operator[], as that wouldn't work in a constexpr method:

	  https://gitlab.com/gnutools/binutils-gdb/-/blob/5890af36e5112bcbb8d7555e63570f68466e6944/gdbsupport/gdb_string_view.h#L180

	IS_ABSOLUTE_PATH is normally used with null-terminated string.  It's
	fine to pass an empty null-terminated string to IS_ABSOLUTE_PATH,
	because index 0 in such a string is valid.  But not with an empty
	string_view.

	Fix that by avoiding the "call" to IS_ABSOLUTE_PATH if the string_view
	is empty.

	Change-Id: Idf4df961b63f513b3389235e93814c02b89ea32e

2022-05-19  Jan Beulich  <jbeulich@suse.com>

	Arm64: force emission of ILP32-dependent relocs
	Like the placeholder types added in 04dfe7aa5217 ("Arm64: follow-on to
	PR gas/27217 fix"), these are also placeholders which are subsequently
	resolved (albeit later, hence this being a separate issue). As for the
	resolved types 1 is returned, these pseudo-relocs should also have 1
	returned to force retaining of the [eventual] relocations. This is also
	spelled out individually for each of them in md_apply_fix().

2022-05-19  Jan Beulich  <jbeulich@suse.com>

	COFF: use hash for string table also when copying / stripping
	Otherwise the string table may grow and hence e.g. change a final binary
	(observed with PE/COFF ones) even if really there's no change. Doing so
	in fact reduces the overall amount of code, and in particular the number
	of places which need to remain in sync.

	Afaics there's no real equivalent to the "traditional_format" field used
	when linking, so hashing is always enabled when copying / stripping.

2022-05-19  Jan Beulich  <jbeulich@suse.com>

	COFF/PE: keep linker version during objcopy / strip
	Neither of the tools is really a linker, so whatever was originally
	recorded should be retained rather than being overwritten by these
	tools' versions.

	COFF/PE: don't leave zero timestamp after objcopy / strip
	Fill the timestamp field suitably for _bfd_XXi_only_swap_filehdr_out().
	Instead of re-arranging the present if(), fold this logic with that of
	copying the optional header.

2022-05-19  Jan Beulich  <jbeulich@suse.com>

	COFF: make objcopy / strip honor --keep-file-symbols
	So far this option had no effect when used together with e.g.
	--strip-debug. Set BSF_FILE on these symbols to change that.

	While altering this also join two adjacent blocks of case labeled
	statements with identical code.

2022-05-19  Jan Beulich  <jbeulich@suse.com>

	don't over-align file positions of PE executable sections
	When a sufficiently small alignment was specified via --file-alignment,
	individual section alignment shouldn't affect placement within the file.
	This involves first of all clearing D_PAGED for images when section and
	file alignment together don't permit paging of the image. The involved
	comparison against COFF_PAGE_SIZE in turn helped point out (through a
	compiler warning) that 'page_size' should be of unsigned type (as in
	particular FileAlignment is). This yet in turn pointed out a dubious
	error condition (which is being deleted).

	For the D_PAGED case I think the enforced file alignment may still be
	too high, but I'm wary of changing that logic without knowing of
	possible corner cases.

	Furthermore file positions in PE should be independent of the alignment
	recorded in section headers anyway. Otherwise there are e.g. anomalies
	following commit 6f8f6017a0c4 ("PR27567, Linking PE files adds alignment
	section flags to executables") in that linking would use information a
	subsequent processing step (e.g. stripping) wouldn't have available
	anymore, and hence a binary could change in that 2nd step for no actual
	reason. (Similarly stripping a binary linked with a linker pre-dating
	that commit would change the binary again when stripping it a 2nd time.)

2022-05-19  Yvan Roux  <yvan.roux@foss.st.com>

	 _bfd_real_fopen should not use ccs parameter on Windows
		PR 25713
		* bfdio.c (_bfd_real_fopen): Delete ccs string.

2022-05-19  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Fix canonical extension order (K and J)
	This commit fixes canonical extension order to follow the RISC-V ISA
	Manual draft-20210402-1271737 or later.

	bfd/ChangeLog:

		* elfxx-riscv.c (riscv_recognized_prefixed_ext): Fix "K" extension
		prefix to be placed before "J".

2022-05-19  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-18  John Baldwin  <jhb@FreeBSD.org>

	Use aarch64_features to describe register features in target descriptions.
	Replace the sve bool member of aarch64_features with a vq member that
	holds the vector quotient.  It is zero if SVE is not present.

	Add std::hash<> specialization and operator== so that aarch64_features
	can be used as a key with std::unordered_map<>.

	Change the various functions that create or lookup aarch64 target
	descriptions to accept a const aarch64_features object rather than a
	growing number of arguments.

	Replace the multi-dimension tdesc_aarch64_list arrays used to cache
	target descriptions with unordered_maps indexed by aarch64_feature.

2022-05-18  Jan Beulich  <jbeulich@suse.com>

	Arm64: follow-on to PR gas/27217 fix
	PR gas/27217

	Prior to trying to address PR gas/28888 I noticed anomalies in how
	certain insns would / wouldn't be affected in similar ways.

	Commit eac4eb8ecb26 ("Fix a problem assembling AArch64 sources when a
	relocation is generated against a symbol that has a defined value") had
	two copy-and-paste mistakes, passing the wrong type to
	aarch64_force_reloc().

	It further failed to add placeholder relocation types to that function's
	block of case labels leading to a return of 1. While not of interest for
	aarch64_force_relocation() (these placeholders are resolved right in
	parse_operands()), calls to aarch64_force_reloc() happen before that
	resolution would take place.

2022-05-18  Nick Clifton  <nickc@redhat.com>

	Fix compile time warning building gold with Clang-14.
		* int_encoding.cc (get_length_as_unsigned_LEB_128): Remove
		current_length variable.

2022-05-18  Victor Do Nascimento  <victor.donascimento@arm.com>

	oops - forgot changelog entry for the previous delta.

	arm: Add unwind support for mixed register lists
		* config/tc-arm.c (parse_reg_list): Add handling of mixed register
		types.
		(reg_names): Enumerate pseudoregister according to mapped physical
		register number.
		(s_arm_unwind_save_pseudo): Modify function signature.
		(s_arm_unwind_save_core): Likewise.
		(s_arm_unwind_save_mixed): New function.
		(s_arm_unwind_save): Generate register list mask to pass to nested
		functions.
		* testsuite/gas/arm/unwind-pacbti-m.s: Expand test for mixed
	 	register type lists.
	 	* testsuite/gas/arm/unwind-pacbti-m.d: Likewise.
		* testsuite/gas/arm/unwind-pacbti-m-readelf.d: Likewise.

2022-05-18  Carl Love  <cel@us.ibm.com>

	PowerPC: bp-permanent.exp, kill-after-signal fix
	Fix changes that didn't make it into commit:
	dd9cd55e990bcc9f8448cac38d242d53974b3604.

	Fix missing -wrap on gdb_test_multiple in gdb.base/kill-after-signal.exp
	that is causing regression test on x86_64-linux with taskset -c 0.

2022-05-18  Yichao Yu  <yyc1992@gmail.com>

	[AArch64] Return the regnum for PC (32) on aarch64
	This will allow the unwind info to explicitly specify a different value
	for the return address from the link register.
	Such usage, although uncommon, is valid and useful for signal frames.
	It is also supported by aadwarf64 from ARM (Note 9 in [1]).

	Ref https://sourceware.org/pipermail/gdb/2022-May/050091.html

	[1] https://github.com/ARM-software/abi-aa/blob/2022Q1/aadwarf64/aadwarf64.rst#dwarf-register-names

2022-05-18  Jan Beulich  <jbeulich@suse.com>

	x86: shrink op_riprel
	It is only ever initialized from a boolean, so it as well as related
	variables' types can simply be bool and there's no masking to 32 bits
	needed in set_op().

2022-05-18  Nick Clifton  <nickc@redhat.com>

	Add a --no-weak option to nm.
		PR 29135
		* nm.c (non_weak): New variable.
		(filter_symbols): When non-weak is true, ignore weak symbols.
		(long_options): Add --no-weak.
		(usage): Mention --no-weak.
		(main): Handle -W/--no-weak.
		* doc/binutils.texi: Document new feature.
		* NEWS: Mention the new feature.
		* testsuite/binutils-all/nm.exp: Add test of new feature.
		* testsuite/binutils-all/no-weak.s: New test source file.

2022-05-18  Pedro Alves  <pedro@palves.net>

	Support -prompt and -lbl in gdb_test
	This teaches gdb_test to forward the -prompt and -lbl options to
	gdb_test_multiple.

	The option parsing is done with parse_args.

	As a cleanup, instead of using llength and lindex to get at the
	positional arguments, use lassign, and check whether the corresponding
	variable is empty.

	Convert gdb.base/ui-redirect.exp and gdb.xml/tdesc-reload.exp to use
	gdb_test -prompt/-lbl instead of gdb_test_multiple as examples.

	Change-Id: I243e1296d32c05a421ccef30b63d43a89eaeb4a0

2022-05-18  Luis Machado  <luis.machado@arm.com>

	Remove unused DWARF PAUTH registers
	The AARCH64_DWARF_PAUTH_DMASK and AARCH64_DWARF_PAUTH_CMASK DWARF registers
	never made their way into the aadwarf64. The following patch removes these
	constants and their use.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=26295

2022-05-18  Luis Machado  <luis.machado@arm.com>

	Rename PAUTH_RA_STATE to RA_SIGN_STATE
	The aadwarf64 [1] names this register RA_SIGN_STATE, so update the code to use
	the same name.

	[1] https://github.com/ARM-software/abi-aa/blob/main/aadwarf64/aadwarf64.rst

2022-05-18  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Simplify unknown lang testing in gdb.base/parse_number.exp
	Move testing of language unknown out of the $supported_archs loop in
	gdb.base/parse_number.exp.  This reduces total amount of tests from 18466 to
	17744.

	Tested on x86_64-linux.

2022-05-18  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Use hex_for_lang in gdb.base/parse_number.exp
	In gdb.base/parse_number.exp, add a new proc hex_for_lang that formats a hex
	number appropriately for a given language.

	Tested on x86_64-linux.

2022-05-18  Tom de Vries  <tdevries@suse.de>

	[gdb/tdep] Add gdb/syscalls/update-linux-from-src.sh
	Add a new script gdb/syscalls/update-linux-from-src.sh, that can be used to
	generate *-linux.xml.in files from linux kernel sources, like so:
	...
	$ ./update-linux-from-src.sh ~/upstream/linux-stable.git
	Skipping aarch64-linux.xml.in, no syscall.tbl
	Generating amd64-linux.xml.in
	Skipping arm-linux.xml.in, use arm-linux.py instead
	Skipping bfin-linux.xml.in, no longer supported
	Generating i386-linux.xml.in
	Generating mips-n32-linux.xml.in
	Generating mips-n64-linux.xml.in
	Generating mips-o32-linux.xml.in
	Generating ppc64-linux.xml.in
	Generating ppc-linux.xml.in
	Generating s390-linux.xml.in
	Generating s390x-linux.xml.in
	Generating sparc64-linux.xml.in
	Generating sparc-linux.xml.in
	...

	Update *-linux.xml.in and *-linux.xml using linux kernel tag v5.18-rc6.

2022-05-18  Tamar Christina  <tamar.christina@arm.com>

	AArch64: Enable FP16 by default for Armv9-A.
	In Armv9-A SVE is mandatory, and for SVE FP16 is mandatory.  This fixes a disconnect
	between GCC and binutils where GCC has FP16 on by default and gas doesn't.

	include/ChangeLog:

	2022-05-16  Tamar Christina  <tamar.christina@arm.com>

		* opcode/aarch64.h (AARCH64_ARCH_V9_FEATURES): Add AARCH64_FEATURE_F16.

2022-05-18  Jan Beulich  <jbeulich@suse.com>

	gas: avoid octal numbers being accepted when processing .linefile
	Compilers would put decimal numbers there, so I think we should treat
	finding octal numbers the same as finding bignums - ignore them as
	actually being comments of some very specific form.

2022-05-18  Jan Beulich  <jbeulich@suse.com>

	gas: avoid bignum related errors when processing .linefile
	Any construct which to the scrubber looks like a C preprocessor
	line/file "directive" is converted to .linefile, but the amount of
	checking the scrubber does is minimal (albeit it does let through only
	decimal digits for the line part of the contruct). Since the scrubber
	conversion is further tied to # being a line comment character, anything
	which upon closer inspection turns out not to be a line/file "directive"
	is supposed to be treated as a comment, i.e. ignored. Therefore we
	cannot use get_absolute_expression(), as this may raise errors. Open-
	code the function instead, treating everything not resulting in
	O_constant as a comment as well.

	Furthermore also bounds-check the parsed value. This bounds check tries
	to avoid implementation defined behavior (which may be the raising of an
	implementation defined signal), but for now makes the assumption that
	int has less than 64 bits. The way bfd_signed_vma (which is what offsetT
	aliases) is defined in bfd.h for the BFD64 case I cannot really see a
	clean way of avoiding this assumption. Omitting the #ifdef, otoh, would
	risk "condition is always false" warnings by compilers.

	Convert get_linefile_number() to return bool at this occasion as well.

2022-05-18  Jan Beulich  <jbeulich@suse.com>

	gas: fold do_repeat{,_with_expander}()
	do_repeat_with_expander() already deals with the "no expander" case
	quite fine, so there's really little point having two functions. What it
	lacks compared with do_repeat() is a call to sb_build(), which can
	simply be moved (and the then redundant sb_new() be avoided). Along with
	this moving also flip if the main if()'s condition such that the "no
	expander" case is handled first.

	gas: don't ignore .linefile inside false conditionals
	When assembling code previously pre-processed by a C compiler, long
	enough comments may have been collapsed into "# <line> <file>"
	constructs. If we skip these, line numbers (and possibly even file
	names) will be off / wrong in both diagnostics and debug info.

	gas: simplify ignore_input()
	First of all convert to switch(), in preparation of adding another
	directive here which may not be ignored. While doing so drop dead code:
	A string the first two characters of which do not match "if" also wont
	match "ifdef" or "ifndef".

	gas: tweak .irp and alike file/line handling for M68K/MRI
	In commit 2ee1792bec22 ("gas: further adjust file/line handling for .irp
	and alike") I neglected the need to omit the leading . in M68K/MRI mode.

2022-05-18  Xi Ruoyao  <xry111@mengyan1223.wang>

	gold: don't invoke IA32 syscall in x86_64 assembly testcase
	pr17704a_test.s is a x86_64 assembly file, but it invokes IA32 exit
	syscall with "int 0x80".  This causes a segfault on kernels with
	CONFIG_IA32_EMULATION disabled.

	gold/

		* testsuite/pr17704a_test.s (_start): Invoke x86_64 exit syscall
		instead of its IA32 counterpart.

2022-05-18  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-17  Nikolaos Chatzikonstantinou  <nchatz314@gmail.com>

	Fix typo in info page

2022-05-17  Pedro Alves  <pedro@palves.net>

	Fix gdb.python/py-connection.exp with remote targets
	After the patch to make gdb_test's question non-optional when
	specified, gdb.python/py-connection.exp started failing like so:

	  $ make check TESTS="gdb.python/py-connection.exp" RUNTESTFLAGS="--target_board=native-gdbserver"
	  (gdb) PASS: gdb.python/py-connection.exp: info connections while the connection is still around
	  disconnect^M
	  Ending remote debugging.^M
	  (gdb) FAIL: gdb.python/py-connection.exp: kill the inferior

	The problem is that "disconnect" when debugging with the native target
	asks the user whether to kill the program, while with remote targets,
	it doesn't.

	Fix it by explicitly killing before disconnecting.

	Tested with --target_board unix, native-gdbserver, and native-extended-gdbserver.

	Change-Id: Icd85015c76deb84b71894715d43853c1087eba0b

2022-05-17  Felix Willgerodt  <felix.willgerodt@intel.com>

	gdb, btrace: Throw an error for empty recordings when replaying starts.
	This makes record_btrace_start_replaying() more consistent, as it already
	errors out e.g. on a recording with only gaps.

2022-05-17  Pedro Alves  <pedro@palves.net>

	Make gdb_test's question non-optional if specified
	gdb_test supports handling scenarios where GDB asks a question before
	finishing handling some command.  The full prototype of gdb_test is:

	  # gdb_test COMMAND PATTERN MESSAGE QUESTION RESPONSE

	However, QUESTION is a question that GDB _may_ ask, not one that GDB
	_must_ ask:

	 # QUESTION is a question GDB may ask in response to COMMAND, like
	 #   "are you sure?"
	 # RESPONSE is the response to send if QUESTION appears.

	If GDB doesn't raise the question, the test still passes.

	I think that this is a misfeature.  If GDB regresses and stops asking
	a question, the testsuite won't notice.  So I think that if a QUESTION
	is specified, gdb_test should ensure it comes out of GDB.

	Running the testsuite exposed a number of tests that pass
	QUESTION/RESPONSE to GDB, but no question comes out.  The previous
	commits fixed them all, so this commit changes gdb_test's behavior.

	A related issue is that gdb_test doesn't enforce that if you specify
	QUESTION, that you also specify RESPONSE.  I.e., you should pass 1, 2,
	3, or 5 arguments to gdb_test, but never 4, or more than 5.  Making
	gdb_test detect bogus arguments actually regressed some testcases,
	also all fixed in previous commits.

	Change-Id: I47c39c9034e6a6841129312037a5ca4c5811f0db

2022-05-17  Pedro Alves  <pedro@palves.net>

	gdb.base/skip.exp: Don't abuse gdb_test's question support
	gdb.base/skip.exp abuses gdb_test's support for answering a GDB
	question to do this:

	    # With gcc 9.2.0 we jump once back to main before entering foo here.
	    # If that happens try to step a second time.
	    gdb_test "step" "foo \\(\\) at.*" "step 3" \
		"main \\(\\) at .*\r\n$gdb_prompt " "step"

	After a patch later in this series, gdb_test will FAIL if GDB does NOT
	issue the question, so this test would start failing on older GCCs.

	Switch to using gdb_test_multiple instead.  There are three spots in
	the file that have the same pattern, and they're actually in a
	sequence of commands that is repeated those 3 times.  Factor all that
	out to a procedure.

	I don't have gcc 9.2 handy, but I do have gcc 6.5, and that one is
	affected as well, so update the comment.

	Change-Id: If0a7e3cdf5191b4eec95ce0c8845c3a4d801c39e

2022-05-17  Pedro Alves  <pedro@palves.net>

	Avoid having to unload file in gdb.server/connect-with-no-symbol-file.exp
	gdb.server/connect-with-no-symbol-file.exp's connect_no_symbol_file
	does:

		gdb_test "file" ".*" "discard symbol table" \
		    {Discard symbol table from `.*'\? \(y or n\) } "y"

	A following patch will make gdb_test expect the question out of GDB if
	one is passed down as argument to gdb_test.  With that, this test
	starts failing.  This is because connect_no_symbol_file is called in a
	loop, and the first time around, there's a loaded file, so "file" asks
	the "Discard symbol table ... ?" question, while in the following
	iterations there's no file, so there's no question.

	Fix this by not loading a file into GDB in the first place.

	Change-Id: I810c036b57842c4c5b47faf340466b0d446d1abc

2022-05-17  Pedro Alves  <pedro@palves.net>

	Fix bogus gdb_test invocations
	A following patch will make gdb_test error out if bogus arguments are
	passed, which exposed bugs in a few testcases:

	 - gdb.python/py-parameter.exp, passing a spurious "1" as extra
	   parameter, resulting in:

	   ERROR: Unexpected arguments: {set test-file-param bar.txt} {The name of the file has been changed to bar.txt} {set new file parameter} 1

	 - gdb.python/py-xmethods.exp, a missing test message, resulting in
	   the next gdb_test being interpreted as message, question and
	   response!  With the enforcing patch, this was caught with:

	   ERROR: Unexpected arguments: {p g.mul<char>('a')} {From Python G<>::mul.*} gdb_test {p g_ptr->mul<char>('a')} {From Python G<>::mul.*} {after: g_ptr->mul<char>('a')}

	 - gdb.base/pointers.exp, missing a quote.

	Change-Id: I66f2db4412025a64121db7347dfb0b48240d46d4

2022-05-17  Pedro Alves  <pedro@palves.net>

	gdb.base/scope.exp: Remove bogus gdb_test questions
	This test is abusing the QUESTION/RESPONSE feature to send an
	alternative command to GDB if the first command fails.  Like so:

	   gdb_test "print 'scope0.c'::filelocal" \
		    "\\\$$decimal = 1" "print 'scope0.c'::filelocal at main" \
		    "No symbol \"scope0.c\" in current context.*" \
		    "print '$srcdir/$subdir/scope0.c'::filelocal"

	So if 'scope0.c' doesn't work, we try again with
	'$srcdir/$subdir/scope0.c'.  I strongly suspect this is really an
	obsolete test.  I think that if '$srcdir/$subdir/scope0.c' works, then
	'scope0.c' should have worked too, thus I'd think that if we pass due
	to the question path, then it's a bug.  So just remove the question
	part passed to gdb_test.

	Change-Id: I2acc99285f1d519284051b49693b5441fbdfe3cd

2022-05-17  Pedro Alves  <pedro@palves.net>

	Remove gdb_test questions that GDB doesn't ask
	Change-Id: Ib2616dc883e9dc9ee100f6c86d83a921a0113c16

2022-05-17  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: Added half-precision floating-point v1.0 instructions.
	bfd/
		* elfxx-riscv.c (riscv_implicit_subsets): Added implicit f
		and zicsr for zfh.
		(riscv_supported_std_z_ext): Added default v1.0 version for zfh.
		(riscv_multi_subset_supports): Handle INSN_CLASS_ZFH,
		INSN_CLASS_D_AND_ZFH and INSN_CLASS_Q_AND_ZFH.
	gas/
		* config/tc-riscv.c (FLT_CHARS): Added "hH".
		(macro): Expand Pseudo M_FLH and M_FSH.
		(riscv_pseudo_table): Added .float16 directive.
		* testsuite/gas/riscv/float16-be.d: New testcase for .float16.
		* testsuite/gas/riscv/float16-le.d: Likewise.
		* testsuite/gas/riscv/float16.s: Likewise.
		* testsuite/gas/riscv/fp-zfh-insns.d: New testcase for zfh.
		* testsuite/gas/riscv/fp-zfh-insns.s: Likewise.
	include/
		* opcode/riscv-opc.h: Added MASK and MATCH encodings for zfh.
		* opcode/riscv.h: Added INSN_CLASS and pseudo macros for zfh.
	opcodes/
		* riscv-opc.c (riscv_opcodes): Added zfh instructions.

2022-05-17  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-16  Ilya Leoshkevich  <iii@linux.ibm.com>

	IBM zSystems: Fix left-shifting negative PCRel32 values (PR gas/29152)
	s390_insert_operand ()'s val, min and max are encoded PCRel32 values
	and need to be left-shifted by 1 before being shown to the user.
	Left-shifting negative values is undefined behavior in C, but the
	current code does not try to prevent it, causing UBSan to complain.

	Fix by casting the values to their unsigned equivalents before
	shifting.

2022-05-16  Pedro Alves  <pedro@palves.net>

	Reindent gdbsupport/event-loop.cc:handle_file_event
	The handle_file_event function has a few unnecessary {} lexical
	blocks, presumably because they were originally if blocks, and the
	conditions were removed, or something along those lines.

	Remove the unnecessary blocks, and reindent.

	Change-Id: Iaecbe5c9f4940a80b81dbbc42e51ce506f6aafb2

2022-05-16  Pedro Alves  <pedro@palves.net>

	gdbsupport/event-loop.cc: simplify !HAVE_POLL paths
	gdbsupport/event-loop.cc throughout handles the case of use_poll being
	true on a system where HAVE_POLL is not defined, by calling
	internal_error if that situation ever happens.

	Simplify this by moving the "use_poll" global itself under HAVE_POLL,
	so that it's way more unlikely to ever end up in such a situation.
	Then, move the code that checks the value of use_poll under HAVE_POLL
	too, and remove the internal_error calls.  Like, from:

	    if (use_poll)
	      {
	  #ifdef HAVE_POLL
	        // poll code
	  #else
	      internal_error (....);
	  #endif /* HAVE_POLL */
	      }
	    else
	      {
		// select code
	      }

	to

	  #ifdef HAVE_POLL
	    if (use_poll)
	      {
	        // poll code
	      }
	    else
	  #endif /* HAVE_POLL */
	      {
		// select code
	      }

	While at it, make use_poll be a bool.  The current code is using
	unsigned char most probably to save space, but I don't think it really
	matters here.

	Co-Authored-By: Youling Tang <tangyouling@loongson.cn>
	Change-Id: I0dd74fdd4d393ccd057906df4cd75e8e83c1cdb4

2022-05-16  Eli Zaretskii  <eliz@gnu.org>

	gdb: Fix typo in last change in gdb.texinfo

	gdb: Document the 'metadata' styling in GDB displays.
	The 'metadata' styling was never documented in the GDB manual.
	This fills that gap.

2022-05-16  Tom Tromey  <tromey@adacore.com>

	Fix Ada exception regression on Windows
	The breakpoint c++-ification series introduced another bug in Ada --
	it caused "catch exception" and related commands to fail on Windows.
	The problem is that the re_set method calls the wrong superclass
	method, so the breakpoint doesn't get correctly re-set when the
	runtime offsets change.  This patch fixes the problem.

2022-05-16  Bruno Larsen  <blarsen@redhat.com>

	gdb/testsuite: fix "continue outside of loop" TCL errors
	Many test cases had a few lines in the beginning that look like:

	if { condition } {
	  continue
	}

	Where conditions varied, but were mostly in the form of ![runto_main] or
	[skip_*_tests], making it quite clear that this code block was supposed
	to finish the test if it entered the code block. This generates TCL
	errors, as most of these tests are not inside loops.  All cases on which
	this was an obvious mistake are changed in this patch.

2022-05-16  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-15  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-14  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-13  Tom Tromey  <tromey@adacore.com>

	Remove unused field cooked_index::m_start
	cooked_index::m_start is unused and can be removed.  I think this was
	a leftover from a previous approach in the index finalization code,
	and then when rewriting it I forgot to remove it.

	Tested by rebuilding.

2022-05-13  Tom Tromey  <tromey@adacore.com>

	Implement pid_to_exec_file for Windows in gdbserver
	I noticed that gdbserver did not implement pid_to_exec_file for
	Windows, while gdb did implement it.  This patch moves the code to
	nat/windows-nat.c, so that it can be shared.  This makes the gdbserver
	implementation trivial.

	Remove windows_process_info::id
	I noticed that windows_process_info::id is only used by gdbserver, and
	not really necessary.  This patch removes it.

	Constify target_pid_to_exec_file
	This changes target_pid_to_exec_file and target_ops::pid_to_exec_file
	to return a "const char *".  I couldn't build many of these targets,
	but did examine the code by hand -- also, as this only affects the
	return type, it's normally pretty safe.  This brings gdb and gdbserver
	a bit closer, and allows for the removal of a const_cast as well.

	Put corefile-run.core into test subdirectory
	I noticed that corefile-run.core ends up in the 'runtest' directory.
	It's better, when at all possible, for test files to end up in the
	test's designated subdirectory.  This patch makes this change.

2022-05-13  Tom Tromey  <tromey@adacore.com>

	Do not double-read minimal symbols for PE COFF
	This changes coffread.c to avoid re-reading minimal symbols when
	possible.  This only works when there are no COFF symbols to be read,
	but at least for my mingw builds of gdb, this seems to be the case.

	Tested using the AdaCore internal test suite on Windows.  I also did
	some local builds to ensure that no warnings crept in.

2022-05-13  Pedro Alves  <pedro@palves.net>

	Fix "gdb --write" with core files
	If you load a core file into GDB with the --write option, or "set
	write on" (equivalent), and then poke memory expecting it to patch the
	core binary, you'll notice something odd -- the write seems to
	succeed, but in reality, it doesn't.  The value you wrote doesn't
	persist.  Like so:

	 $ gdb -q --write -c testsuite/outputs/gdb.base/patch/gcore.test
	 [New LWP 615986]
	 Core was generated by `/home/pedro/gdb/build/gdb/testsuite/outputs/gdb.base/patch/patch'.
	 Program terminated with signal SIGTRAP, Trace/breakpoint trap.
	 #0  0x0000555555555131 in ?? ()
	 (gdb) p *(unsigned char *)0x0000555555555131 = 1
	 $1 = 1 '\001'
	 (gdb) p *(unsigned char *)0x0000555555555131
	 $2 = 185 '\271'
	 (gdb)

	Diffing hexdumps of before/after patching, reveals that a "0x1" was
	actually written somewhere in the file.  The problem is that the "0x1"
	was written at the wrong offset in the file...

	That happens because _bfd_elf_set_section_contents does this to seek
	to the section's offset:

	  pos = hdr->sh_offset + offset;
	  if (bfd_seek (abfd, pos, SEEK_SET) != 0
	      || bfd_bwrite (location, count, abfd) != count)
	    return false;

	... and 'hdr->sh_offset' is zero, so we seek to just OFFSET, which is
	incorrect.  The reason 'hdr->sh_offset' is zero is that
	kernel-generated core files normally don't even have a section header
	table (gdb-generated ones do, but that's more an accident than a
	feature), and indeed elf_core_file_p doesn't even try to read sections
	at all:

	  /*  Core files are simply standard ELF formatted files that partition
	      the file using the execution view of the file (program header table)
	      rather than the linking view.  In fact, there is no section header
	      table in a core file.

	      The process status information (including the contents of the general
	      register set) and the floating point register set are stored in a
	      segment of type PT_NOTE.  We handcraft a couple of extra bfd sections
	      that allow standard bfd access to the general registers (.reg) and the
	      floating point registers (.reg2).  */

	  bfd_cleanup
	  elf_core_file_p (bfd *abfd)

	Changing _bfd_elf_set_section_contents from:

	  pos = hdr->sh_offset + offset;

	to:

	  pos = section->filepos + offset;

	fixes it.  If we do that however, the tail end of
	_bfd_elf_set_section_contents ends up as a copy of
	_bfd_generic_set_section_contents, so just call the latter, thus
	eliminating some duplicate code.

	New GDB testcase included, which exercises both patching an executable
	and patching a core file.  Patching an executable already works
	without this fix, because in that case BFD reads in the sections
	table.  Still, we had no testcase for that yet.  In fact, we have no
	"set write on" testcases at all, this is the first one.

	Tested on x86-64 GNU/Linux, gdb, ld, binutils, and gas.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=18227
	Change-Id: I0f49f58b48aabab2e269f2959b8fd8a7fe36fdce

2022-05-13  Alan Modra  <amodra@gmail.com>

	Import libiberty from gcc

	sim: remove use of PTR
	PTR will soon disappear from ansidecl.h.  Remove uses in sim.  Where
	a PTR cast is used in assignment or function args to a void* I've
	simply removed the unnecessary (in C) cast rather than replacing with
	(void *).

2022-05-13  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-13  Alan Modra  <amodra@gmail.com>

	gdb: remove use of PTR
	PTR will disappear from ansidecl.h and libiberty on the next import
	from gcc.  Remove current uses in gdb.

2022-05-12  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.cp/break-f-std-string.cc with older gcc
	When running test-case gdb.cp/break-f-std-string.exp on openSUSE Leap 15.3
	with system gcc 7.5.0, I run into:
	...
	(gdb) whatis /r std::string^M
	No symbol "string" in namespace "std".^M
	(gdb) FAIL: gdb.cp/break-f-std-string.exp: _GLIBCXX_USE_CXX11_ABI=1: \
	  whatis /r std::string
	...
	The same for gcc 8.2.1, but it passes with gcc 9.3.1.

	At source level (as we can observe in the .ii file with -save-temps) we have
	indeed:
	...
	namespace std {
	  namespace __cxx11 {
	    typedef basic_string<char> string;
	  }
	}
	...
	while with gcc 9.3.1, we have instead:
	...
	namespace std {
	  namespace __cxx11 {
	    ...
	  }
	  typedef basic_string<char> string;
	}
	...
	due to gcc commit 33b43b0d8cd ("Define std::string and related typedefs
	outside __cxx11 namespace").

	Fix this by adding the missing typedef for gcc version 5 (the first version to
	have the dual abi) to 8 (the last version missing aforementioned gcc commit).

	Tested on x86_64-linux, with:
	- system gcc 7.5.0
	- gcc 4.8.5, 8.2.1, 9.3.1, 10.3.0, 11.2.1
	- clang 8.0.1, 12.0.1

2022-05-12  Alan Modra  <amodra@gmail.com>

	Fix an illegal memory access when creating DLLs.
		PR 29006
		* pe-dll.c (dll_name): Delete, replacing with..
		(dll_filename): ..this, moved earlier in file.
		(generate_edata): Delete parameters.  Don't set up dll_name here..
		(pe_process_import_defs): ..instead set up dll_filename and
		dll_symname here before returning.
		(dll_symname_len): Delete write-only variable.
		(pe_dll_generate_implib): Don't set up dll_symname here.

2022-05-12  Mark Wielaard  <mark@klomp.org>

	gdb: Workaround stringop-overread warning in debuginfod-support.c on powerpc64
	Just like on s390x with g++ 11.2.1, ppc64le with g++ 11.3.1 produces a
	spurious warning for stringop-overread in debuginfod_is_enabled
	for url_view. Also suppress it on powerpc64.

	 gdb/ChangeLog:

	    * debuginfod-support.c (debuginfod_is_enabled): Use
	      DIAGNOSTIC_IGNORE_STRINGOP_OVERREAD on powerpc64.

2022-05-12  Luis Machado  <luis.machado@arm.com>

	Make gdb.ada/float-bits.exp more generic
	There are assumptions in the test about the long double format
	being used. While the results are OK for i387 128-bit long doubles, it
	is not correct for IEEE quad 128-bit long doubles.

	Also, depending on the target (64-bit/32-bit), long doubles may not
	be available at all. And it may be the case that the compiler for a 64-bit
	target doesn't support 128-bit long doubles, but GDB might still support it
	internally.

	Lastly, not every long double format has invalid values. Some formats
	consider all values as valid floating point numbers.

	These divergences cause the following FAIL's on aarch64/arm:

	FAIL: gdb.ada/float-bits.exp: print val_long_double
	FAIL: gdb.ada/float-bits.exp: print val_long_double after assignment

	With the above in mind, extend the test a little so it behaves well on
	different architectures and so it works with different long double
	formats.

	Main changes:

	- Use long double values appropriate for the long double format.
	- Test long double assignment to compiler-generated long
	  double variables.
	- Test long double assignment to GDB internal variables.

	Tested on x86_64 (16 PASS), i686 (16 PASS), aarch64 (12 PASS) and arm (9 PASS).

2022-05-12  Tom de Vries  <tdevries@suse.de>

	[gdb/tdep] Improve gdb/syscalls/update-linux.sh
	Fix two things in update-linux.sh:
	- remove use of unnecessary tmp file
	- inline gen-header.py into update-linux.sh

	Tested on x86_64-linux.

2022-05-12  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.dwarf2/dw2-out-of-range-end-of-seq.exp on aarch64
	On aarch64-linux, with test-case gdb.dwarf2/dw2-out-of-range-end-of-seq.exp I
	run into:
	...
	(gdb) run ^M
	Starting program: dw2-out-of-range-end-of-seq ^M
	^M
	Program received signal SIGILL, Illegal instruction.^M
	main () at src/gdb/testsuite/gdb.dwarf2/main.c:1^M
	1       /* This testcase is part of GDB, the GNU debugger.^M
	(gdb) FAIL: gdb.dwarf2/dw2-out-of-range-end-of-seq.exp: runto: run to main
	...

	There are two problems here:
	- the test-case contains a hardcoded "DW_LNS_advance_pc 1" which causes the
	  breakpoint pointing in the middle of an insn
	- the FAIL triggers on aarch64-linux, but not on x86_64-linux, because the
	  test-case uses 'main_label' as the address of the first and only valid entry
	  in the line table, and:
	  - on aarch64-linux, there's no prologue, so main_label and main coincide,
	    while
	  - on x86_64-linux, there's a prologue, so main_label is different from main.

	Fix these problems by:
	- eliminating the use of "DW_LNS_advance_pc 1", and using
	  "DW_LNE_set_address $main_end" instead, and
	- eliminating the use of main_label, using "DW_LNE_set_address $main_start"
	  instead.

	Tested on both x86_64-linux and aarch64-linux.

2022-05-12  Alan Modra  <amodra@gmail.com>

	cgen: increase buffer for hash_insn_list
	As was done for hash_insn_array in commit d3d1cc7b13b4.

		* cgen-dis.c (hash_insn_list): Increase size of buf.  Assert
		size is large enough.

2022-05-12  Alan Modra  <amodra@gmail.com>

	PR29142, segv in ar with empty archive and libdeps specified
		PR 29142
		* ar.c (main): Properly handle libdeps for zero file_count.

2022-05-12  Alan Modra  <amodra@gmail.com>

	Re: IBM zSystems: Accept (. - 0x100000000) PCRel32 operands
	The new test failed on s390-linux due to bfd_sprintf_vma trimming
	output to 32 bits for 32-bit targets.  The test was faulty anyway,
	expecting zero as the min end of the range is plainly wrong, but
	that's what you get if you cast min to int.

		* config/tc-s390.c (s390_insert_operand): Print range error using
		PRId64.
		* testsuite/gas/s390/zarch-z900-err.l: Correct expected output.

2022-05-12  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-11  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/catch-syscall.exp with --with-expat=no
	When doing a gdb build with --with-expat=no, I run into:
	...
	(gdb) PASS: gdb.base/catch-syscall.exp: determine pipe syscall: \
	  continue to breakpoint: before pipe call
	catch syscall pipe^M
	Unknown syscall name 'pipe'.^M
	(gdb) PASS: gdb.base/catch-syscall.exp: determine pipe syscall: \
	  catch syscall pipe
	catch syscall pipe2^M
	Unknown syscall name 'pipe2'.^M
	(gdb) PASS: gdb.base/catch-syscall.exp: determine pipe syscall: \
	  catch syscall pipe2
	continue^M
	Continuing.^M
	[Detaching after vfork from child process 18538]^M
	[Inferior 1 (process 18537) exited normally]^M
	(gdb) FAIL: gdb.base/catch-syscall.exp: determine pipe syscall: continue
	...

	This is a regression since recent commit 5463a15c18b ("[gdb/testsuite] Handle
	pipe2 syscall in gdb.base/catch-syscall.exp").

	Fix this by using pipe/pipe2 syscall numbers instead.

	Tested on x86_64-linux.

2022-05-11  Nick Clifton  <nickc@redhat.com>

	nm: use -U as an alias for --defines-only, in line with llvm-nm

2022-05-11  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/catch-syscall.exp without --enable-targets
	When doing a gdb build without --enable-targets, I run into:
	...
	(gdb) UNSUPPORTED: gdb.base/catch-syscall.exp: multiple targets: \
	  s390:31-bit vs s390:64-bit: set architecture s390:64-bit
	delete breakpoints^M
	(gdb) info breakpoints^M
	No breakpoints or watchpoints.^M
	(gdb) break -qualified main^M
	No symbol table is loaded.  Use the "file" command.^M
	Make breakpoint pending on future shared library load? (y or [n]) n^M
	(gdb) FAIL: gdb.base/catch-syscall.exp: gdb_breakpoint: set breakpoint at main
	...

	The problem is that due to recent commit e21d8399303 ("[gdb/testsuite] Remove
	target limits in gdb.base/catch-syscall.exp") "clean_restart $binfile" no
	longer is called at the end of test_catch_syscall_multi_arch.

	Fix this by moving "clean_restart $binfile" back to
	test_catch_syscall_multi_arch.

	Tested on x86_64-linux.

2022-05-11  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/maint.exp on powerpc64le
	On powerpc64le-linux, I ran into:
	...
	FAIL: gdb.base/maint.exp: maint print objfiles: symtabs
	...

	The problem is that:
	- the "Cooked index in use" line occurs twice in the gdb output:
	  - once for exec maint, and
	  - once for "Object file system-supplied DSO".
	- the matching of the second "Cooked index in use" also consumes
	  the "Symtabs:" string, and consequently the corresponding
	  clause does not trigger and $symtabs remains 0.

	Fix this by limiting the output of the command to the exec.

	Tested on x86_64-linux and powerpcle-linux.

2022-05-11  Tom de Vries  <tdevries@suse.de>

	[gdb/tdep] Update syscalls/{ppc64,ppc}-linux.xml
	Regenerate syscalls/{ppc64,ppc}-linux.xml on a system with 5.14 kernel.

2022-05-11  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Remove target limits in gdb.base/catch-syscall.exp
	In test-case gdb.base/catch-syscall.exp, proc test_catch_syscall_multi_arch we
	test for supported targets using istarget, like so:
	...
	    if { [istarget "i*86-*-*"] || [istarget "x86_64-*-*"] } {
	        ...
	    } elseif { [istarget "powerpc-*-linux*"] \
	                  || [istarget "powerpc64*-linux*"] } {
	        ...
	...
	but the tests excercised there can all be executed if gdb is configured with
	--enable-targets=all.

	Rewrite the proc to iterate over all cases, and check if the test is supported
	by trying "set arch $arch1" and "set arch $arch2".

	Tested on x86_64-linux, with:
	- a gdb build with --enable-targets=all, and
	- a gdb build build with my usual --enable-targets setting (too long to
	  include here) which means the sparc vs sparc:v9 case is unsupported.

2022-05-11  Tom de Vries  <tdevries@suse.de>

	[gdb/record] Handle statx system call
	When running test-case gdb.reverse/fstatat-reverse.exp with target board
	unix/-m32 on openSUSE Tumbleweed, I run into:
	...
	(gdb) PASS: gdb.reverse/fstatat-reverse.exp: set breakpoint at marker2
	continue^M
	Continuing.^M
	Process record and replay target doesn't support syscall number 383^M
	Process record: failed to record execution log.^M
	^M
	Program stopped.^M
	0xf7fc5555 in __kernel_vsyscall ()^M
	(gdb) FAIL: gdb.reverse/fstatat-reverse.exp: continue to breakpoint: marker2
	...

	The problems is that while with native we're trying to record these syscalls
	(showing strace output):
	...
	openat(AT_FDCWD, "/", O_RDONLY|O_PATH)  = 3
	newfstatat(3, ".", {st_mode=S_IFDIR|0755, st_size=146, ...}, 0) = 0
	...
	with unix/-m32 we have instead:
	...
	openat(AT_FDCWD, "/", O_RDONLY|O_PATH)  = 3
	statx(3, ".", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT, STATX_BASIC_STATS, \
	  {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=STATX_ATTR_MOUNT_ROOT, \
	  stx_mode=S_IFDIR|0755, stx_size=146, ...}) = 0
	...
	and statx is not supported.

	Fix this by adding support for recording syscall statx.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28461

2022-05-11  Alan Modra  <amodra@gmail.com>

	opcodes cgen: remove use of PTR
	Note that opcodes is regenerated with cgen commit d1dd5fcc38e reverted,
	due to failure of bpf to compile with that patch applied.

	.../opcodes/bpf-opc.c:57:11: error: conversion from ‘long unsigned int’ to ‘unsigned int’ changes value from ‘18446744073709486335’ to ‘4294902015’ [-Werror=overflow]
	   57 |   64, 64, 0xffffffffffff00ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
	plus other similar errors.

	cpu/
		* mep.opc (print_tpreg, print_spreg): Delete unnecessary
		forward declarations.  Replace PTR with void *.
		* mt.opc (print_dollarhex, print_pcrel): Delete forward decls.
	opcodes/
		* bpf-desc.c, * bpf-dis.c, * cris-desc.c,
		* epiphany-desc.c, * epiphany-dis.c,
		* fr30-desc.c, * fr30-dis.c, * frv-desc.c, * frv-dis.c,
		* ip2k-desc.c, * ip2k-dis.c, * iq2000-desc.c, * iq2000-dis.c,
		* lm32-desc.c, * lm32-dis.c, * m32c-desc.c, * m32c-dis.c,
		* m32r-desc.c, * m32r-dis.c, * mep-desc.c, * mep-dis.c,
		* mt-desc.c, * mt-dis.c, * or1k-desc.c, * or1k-dis.c,
		* xc16x-desc.c, * xc16x-dis.c,
		* xstormy16-desc.c, * xstormy16-dis.c: Regenerate.

2022-05-11  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-10  Youling Tang  <tangyouling@loongson.cn>

	gdb: mips: Fix large-frame.exp test case failure
	$ objdump -d outputs/gdb.base/large-frame/large-frame-O2
	0000000120000b20 <func>:
	   120000b20:   67bdbff0        daddiu  sp,sp,-16400
	   120000b24:   ffbc4000        sd      gp,16384(sp)
	   120000b28:   3c1c0002        lui     gp,0x2
	   120000b2c:   679c8210        daddiu  gp,gp,-32240
	   120000b30:   0399e02d        daddu   gp,gp,t9
	   120000b34:   df998058        ld      t9,-32680(gp)
	   120000b38:   ffbf4008        sd      ra,16392(sp)
	   120000b3c:   0411ffd8        bal     120000aa0 <blah>
	...

	The disassembly of the above func function shows that we may use
	instructions such as daddiu/daddu, so add "daddiu $gp,$gp,n",
	"daddu $gp,$gp,$t9" and "daddu $gp,$t9,$gp" to the mips32_scan_prologue
	function to fix the large-frame.exp test case.

	Before applying the patch:

	 backtrace
	 #0  blah (a=0xfffffee220) at .../gdb/testsuite/gdb.base/large-frame-1.c:24
	 #1  0x0000000120000b44 in func ()
	 Backtrace stopped: frame did not save the PC
	 (gdb) FAIL: gdb.base/large-frame.exp: optimize=-O2: backtrace

	 # of expected passes            5
	 # of unexpected failures        1

	After applying the patch:

	 # of expected passes            6

2022-05-10  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: LoongArch: Use GDB style to check readbuf and writebuf
	The GDB style is to write 'if (readbuf != nullptr)', and the same for
	writebuf.

2022-05-10  Tom Tromey  <tromey@adacore.com>

	Fix --disable-threading build
	PR build/29110 points out that GDB fails to build on mingw when the
	"win32" thread model is in use.  It turns out that the Fedora cross
	tools using the "posix" thread model, which somehow manages to support
	std::future, whereas the win32 model does not.

	While looking into this, I found that the configuring with
	--disable-threading will also cause a build failure.

	This patch fixes this build by introducing a compatibility wrapper for
	std::future.

	I am not able to test the win32 thread model build, but I'm going to
	ask the reporter to try this patch.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29110

2022-05-10  Pedro Alves  <pedro@palves.net>

	Fix "b f(std::string)" when current language is C
	If you try to set a breakpoint at a function such as "b
	f(std::string)", and the current language is C, the breakpoint fails
	to be set, like so:

	  (gdb) set language c
	  break f(std::string)
	  Function "f(std::string)" not defined.
	  Make breakpoint pending on future shared library load? (y or [n]) n
	  (gdb)

	The problem is that the code in GDB that expands the std::string
	typedef hits this in c-typeprint.c:

	      /* If we have "typedef struct foo {. . .} bar;" do we want to
		 print it as "struct foo" or as "bar"?  Pick the latter for
		 C++, because C++ folk tend to expect things like "class5
		 *foo" rather than "struct class5 *foo".  We rather
		 arbitrarily choose to make language_minimal work in a C-like
		 way. */
	      if (language == language_c || language == language_minimal)
		{
		  if (type->code () == TYPE_CODE_UNION)
		    gdb_printf (stream, "union ");
		  else if (type->code () == TYPE_CODE_STRUCT)
		    {
		      if (type->is_declared_class ())
			gdb_printf (stream, "class ");
		      else
			gdb_printf (stream, "struct ");
		    }
		  else if (type->code () == TYPE_CODE_ENUM)
		    gdb_printf (stream, "enum ");
		}

	I.e., std::string is expanded to "class std::..." instead of just
	"std::...", and then the "f(class std::..." symbol doesn't exist.

	Fix this by making cp-support.c:inspect_type print the expanded
	typedef type using the language of the symbol whose type we're
	expanding the typedefs for -- in the example in question, the
	"std::string" typedef symbol, which is a C++ symbol.

	Use type_print_raw_options as it seems to me that in this scenario we
	always want raw types, to match the real symbol names.

	Adjust the gdb.cp/break-f-std-string.exp testcase to try setting a
	breakpoint at "f(std::string)" in both C and C++.

	Change-Id: Ib54fab4cf0fd307bfd55bf1dd5056830096a653b

2022-05-10  Pedro Alves  <pedro@palves.net>

	Always pass an explicit language down to c_type_print
	The next patch will want to do language->print_type(type, ...), to
	print a type in a given language, avoiding a dependency on the current
	language.  That doesn't work correctly currently, however, because
	most language implementations of language_defn::print_type call
	c_print_type without passing down the language.  There are two
	overloads of c_print_type, one that takes a language, and one that
	does not.  The one that does not uses the current language, defeating
	the point of calling language->print_type()...

	This commit removes the c_print_type overload that does not take a
	language, and adjusts the codebase throughout to always pass down a
	language.  In most places, there's already an enum language handy.
	language_defn::print_type implementations naturally pass down
	this->la_language.  In a couple spots, like in ada-typeprint.c and
	rust-lang.c there's no enum language handy, but the code is written
	for a specific language, so we just hardcode the language.

	In gnuv3_print_method_ptr, I wasn't sure whether we could hardcode C++
	here, and we don't have an enum language handy, so I made it use the
	current language, just like today.  Can always be improved later.

	Change-Id: Ib54fab4cf0fd307bfd55bf1dd5056830096a653b

2022-05-10  Pedro Alves  <pedro@palves.net>

	Fix "b f(std::string)", always use DMGL_VERBOSE
	Currently, on any remotely modern GNU/Linux system,
	gdb.cp/no-dmgl-verbose.exp fails like so:

	  break 'f(std::string)'
	  Function "f(std::string)" not defined.
	  (gdb) FAIL: gdb.cp/no-dmgl-verbose.exp: gdb_breakpoint: set breakpoint at 'f(std::string)'
	  break 'f(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
	  Function "f(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)" not defined.
	  (gdb) PASS: gdb.cp/no-dmgl-verbose.exp: DMGL_VERBOSE-demangled f(std::string) is not defined

	This testcase was added back in 2011, here:

	  [patch] Remove DMGL_VERBOSE
	  https://sourceware.org/pipermail/gdb-patches/2011-June/083081.html

	Back then, the testcase would pass cleanly.  It turns out that the
	reason it fails today is that the testcase is exercising something in
	GDB that only makes sense if the program is built for the pre-C++11
	libstc++ ABI.  Back then the C++11 ABI didn't exist yet, but nowadays,
	you need to compile with -D_GLIBCXX_USE_CXX11_ABI=0 to use the old
	ABI.  See "Dual ABI" in the libstdc++ manual, at
	<https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html>.

	If we tweak the gdb.cp/no-dmgl-verbose.exp testcase to force the old
	ABI with -D_GLIBCXX_USE_CXX11_ABI=0, then it passes cleanly.

	So why is it that setting a breakpoint at "f(std::string)" fails with
	modern ABI, but passes with old ABI?

	This is where libiberty demangler's DMGL_VERBOSE option comes in.  The
	Itanium ABI mangling scheme has a shorthand form for std::string (and
	some other types).  See
	<https://itanium-cxx-abi.github.io/cxx-abi/abi.html>:

	  "In addition, the following catalog of abbreviations of the form "Sx" are used:

	     <substitution> ::= St # ::std::
	     <substitution> ::= Sa # ::std::allocator
	     <substitution> ::= Sb # ::std::basic_string
	     <substitution> ::= Ss # ::std::basic_string < char,
							   ::std::char_traits<char>,
							   ::std::allocator<char> >
	     <substitution> ::= Si # ::std::basic_istream<char,  std::char_traits<char> >
	     <substitution> ::= So # ::std::basic_ostream<char,  std::char_traits<char> >
	     <substitution> ::= Sd # ::std::basic_iostream<char, std::char_traits<char> >
	  "

	When the libiberty demangler encounters such a abbreviation, by
	default, it expands it to the user-friendly typedef "std::string",
	"std::iostream", etc..  If OTOH DMGL_VERBOSE is specified, the
	abbreviation is expanded to the underlying, non-typedefed fullname
	"std::basic_string<char, std::char_traits<char>, std::allocator<char> >"
	etc. as documented in the Itanium ABI, and pasted above.  You can see
	the standard abbreviations/substitutions in
	libiberty/cp-demangle.c:standard_subs.

	Back before Jan's patch in 2011, there were parts of GDB that used
	DMGL_VERBOSE, and others that did not, leading to mismatches.  The
	solution back then was to stop using DMGL_VERBOSE throughout.

	GDB has code in place to let users set a breakpoint at a function with
	typedefs in its parameters, like "b f(uint32_t)".  Demangled function
	names as they appear in the symbol tables almost (more on this is in a
	bit) never have typedefs in them, so when processing "b f(uint32_t)"
	GDB first replaces "uint32_t" for its underlying type, and then sets a
	breakpoint on the resulting prototype, in this case "f(unsigned int)".

	Now, if DMGL_VERBOSE is _not_ used, then the demangler demangles the
	mangled name of a function such as "void f(std::string)" that was
	mangled using the standard abbreviations mentioned above really as:

	  "void f(std::string)".

	For example, the mangled name of "void f(std::string)" if you compile
	with old pre-C++11 ABI is "_Z1fSs".  That uses the abbreviation "Ss",
	so if you demangle that without DMGL_VERBOSE, you get:

	  $ echo "_Z1fSs" | c++filt --no-verbose
	  f(std::string)

	while with DMGL_VERBOSE you'd get:

	  $ echo "_Z1fSs" | c++filt
	  f(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)

	If, when the user sets a breakpoint at "f(std::string)", GDB would
	replace the std::string typedef for its underlying type using the same
	mechanism I mentioned for the "f(uint32_t)" example above, then GDB
	would really try to set a breakpoint at "f(std::basic_string<char,
	std::char_traits<char>, std::allocator<char> >)", and that would fail,
	as the function symbol GDB knows about for that function, given no
	DMGL_VERBOSE, is "f(std::string)".

	For this reason, the code that expands typedefs in function parameter
	names has an exception for std::string (and other standard
	abbreviation types), such that "std::string" is never
	typedef-expanded.

	And here lies the problem when you try to do "b f(std::string)" with a
	program compiled with the C++11 ABI.  In that case, std::string
	expands to a different underlying type, like so:

	  f(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

	and this symbol naturally mangles differently, as:

	  _Z1fNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE

	and then because this doesn't use the shorthand mangling abbreviation
	for "std::string" anymore, it always demangles as:

	  f(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

	Now, when using the C++11 ABI, and you set a breakpoint at
	"f(std::string)", GDB's typedefs-in-parameters expansion code hits the
	exception for "std::string" and doesn't expand it, so the breakpoint
	fails to be inserted, because the symbol that exists is really the

	  f(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

	one, not "f(std::string)".

	So to fix things for C++11 ABI, clearly we need to remove the
	"std::string" exception from the typedef-in-parameters expansion
	logic.  If we do just that, then "b f(std::string)" starts working
	with the C++11 ABI.

	However, if we do _just_ that, and nothing else, then we break
	pre-C++11 ABI...

	The solution is then to in addition switch GDB to always use
	DMGL_VERBOSE.  If we do this, then pre-C++11 ABI symbols works the
	same as C++11 ABI symbols overall -- the demangler expands the
	standard abbreviation for "std::string" as "std::basic_string<char,
	std::char_traits<char>, std::allocator<char> >" and letting GDB expand
	the "std::string" typedef (etc.) too is no longer a problem.

	To avoid getting in the situation where some parts of GDB use
	DMGL_VERBOSE and others not, this patch adds wrappers around the
	demangler's entry points that GDB uses, and makes those force
	DMGL_VERBOSE.

	The point of the gdb.cp/no-dmgl-verbose.exp testcase was to try to
	ensure that DMGL_VERBOSE doesn't creep back in:

	 gdb_test {break 'f(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'} \
		  {Function ".*" not defined\.} \
		  "DMGL_VERBOSE-demangled f(std::string) is not defined"

	This obviously no longer makes sense to have, since we now depend on
	DMGL_VERBOSE.  So the patch replaces gdb.cp/no-dmgl-verbose.exp with a
	new gdb.cp/break-f-std-string.exp testcase whose purpose is to make
	sure that setting a breakpoint at "f(std::string)" works.  It
	exercises both pre-C++11 ABI and C++11 ABI.

	Change-Id: Ib54fab4cf0fd307bfd55bf1dd5056830096a653b

2022-05-10  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	gdb/testsuite: fix testsuite regressions for unix/-m32 board
	This commit fixes two regressions introduced by
	891e4190ba705373eec7b374209478215fff5401.

	Reason for the failures was, that on a 32 bit machine the maximum
	array length as well as the maximum allocatable memory for arrays
	(in bytes) both seem to be limited by the maximum value of a 4
	byte (signed) Fortran integer.  This lead to compiler errors/unexpected
	behavior when compiling/running the test with the -m32 board.  This
	behavior is compiler dependent and can differ for different compiler
	implementations, but generally, it seemed like a good idea to simply
	avoid such situations.

	The affected tests check for GDB's overflow behavior when using KIND
	parameters with GDB implemented Fortran intrinsic functions.  If these
	KIND parameters are too small to fit the actual intrinsic function's
	result, an overflow is expected.  This was done for 1, 2, and 4
	byte overflows.  The last one caused problems, as it tried to allocate
	arrays of length/byte-size bigger than the 4 byte signed integers which
	would then be used with the LBOUND/UBOUND/SIZE intrinsics.

	The tests were adapted to only execute the 4 byte overflow tests when
	running on targets with 64 bit.  For this, the compiled tests evaluate the
	byte size of a C_NULL_PTR via C_SIZEOF, both defined in the ISO_C_BINDING
	module.  The ISO_C_BINDING constant C_NULL_PTR is a Fortran 2003, the
	C_SIZEOF a Fortran 2008 extension.  Both have been implemented in their
	respective compilers for while (e.g. C_SIZEOF is available since
	gfortran 4.6).  If this byte size evaluates to less than 8 we skip the
	4 byte overflow tests in the compiled tests of size.f90 and
	lbound-ubound.f90.  Similarly, in the lbound-ubound.exp testsfile we skip
	the 4 byte overflow tests if the procedure is_64_target evaluates to false.

	In size.f90, additionally, the to-be-allocated amount of bytes did not
	fit into 4 byte signed integers for some of the arrays, as it was
	approximately 4 times the maximum size of a 4 byte signed integer.  We
	adapted the dimensions of the arrays in question as the meaningfulness
	of the test does not suffer from this.

	With this patch both test run fine with the unix/-m32 board and
	gcc/gfortran (9.4) as well as the standard board file.

	We also thought about completely removing the affected test from the
	testsuite.  We decided against this as the 32 bit identification comes
	with Fortran 2008 and removing tests would have decreased coverage.

	A last change that happened with this patch was due to gfortran's and
	ifx's type resolution when assigning big constants to Fortran Integer*8
	variables.  Before the above changes this happened in a parameter
	statement.  Here, both compilers happily accepted a line like

	  integer*8, parameter :: var = 2147483647 + 5.

	After this change the assignment is not done as a parameter
	anymore, as this triggered compile time overflow errors.  Instead,
	the assignment is done dynamically, depending on the kind of machine one
	is on.  Sadly, just changing this line to

	  integer*8 :: var
	  var = 2147483647 + 5

	does not work with ifx (or flang for that matter, they behave similarly
	here).  It will create an integer overflow in the addition as ifx deduces
	the type the additon is done in as Integer*4.  So var will actually
	contain the value -2147483644 after this.  The lines

	  integer*8 :: var
	  var = 2147483652

	on the other hand fail to compile with gfortran (9.4.0) as the compiler
	identifies an Integer overflow here.  Finally, to make this work with
	all three compilers an additional parameter has been introduced

	  integer*8, parameter :: helper = 2147483647
	  integer*8 :: var
	  var = helper + 5.

	This works on all 3 compilers as expected.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29053
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29054

2022-05-10  Pedro Alves  <pedro@palves.net>

	Move non-dependent gdb::observers::observable::visit_state outside template
	The other day, while looking at the symbols that end up in a GDB
	index, I noticed that the gdb::observers::observable::visit_state enum
	class appears a number of times:

	 $ grep VISIT gdb-index-symbol-names.txt
	 gdb::observers::observable<bpstat*, int>::visit_state::NOT_VISITED
	 gdb::observers::observable<bpstat*, int>::visit_state::VISITED
	 gdb::observers::observable<bpstat*, int>::visit_state::VISITING
	 gdb::observers::observable<breakpoint*>::visit_state::NOT_VISITED
	 gdb::observers::observable<breakpoint*>::visit_state::VISITED
	 gdb::observers::observable<breakpoint*>::visit_state::VISITING
	 gdb::observers::observable<char const*, char const*>::visit_state::NOT_VISITED
	 gdb::observers::observable<char const*, char const*>::visit_state::VISITED
	 gdb::observers::observable<char const*, char const*>::visit_state::VISITING
	 gdb::observers::observable<char const*>::visit_state::NOT_VISITED
	 gdb::observers::observable<char const*>::visit_state::VISITED
	 gdb::observers::observable<char const*>::visit_state::VISITING
	 gdb::observers::observable<enum_flags<user_selected_what_flag> >::visit_state::NOT_VISITED
	 gdb::observers::observable<enum_flags<user_selected_what_flag> >::visit_state::VISITED
	 gdb::observers::observable<enum_flags<user_selected_what_flag> >::visit_state::VISITING
	 gdb::observers::observable<frame_info*, int>::visit_state::NOT_VISITED
	 gdb::observers::observable<frame_info*, int>::visit_state::VISITED
	 gdb::observers::observable<frame_info*, int>::visit_state::VISITING
	 gdb::observers::observable<gdbarch*>::visit_state::NOT_VISITED
	 gdb::observers::observable<gdbarch*>::visit_state::VISITED
	 gdb::observers::observable<gdbarch*>::visit_state::VISITING
	 gdb::observers::observable<gdb_signal>::visit_state::NOT_VISITED
	 gdb::observers::observable<gdb_signal>::visit_state::VISITED
	 gdb::observers::observable<gdb_signal>::visit_state::VISITING
	 [... snip ...]

	 $ grep VISIT gdb-index-symbol-names.txt | wc -l
	 72

	enum class visit_state is defined inside the class template
	observable, but it doesn't have to be, as it does not depend on the
	template parameters.  This commit moves it out, so that only one such
	type exists.  This reduces the size of a -O0 -g3 build for me by
	around 0.6%, like so:

	 $ du -b gdb.before gdb.after
	 164685280       gdb.before
	 163707424       gdb.fixed

	and codesize by some 0.5%.

	Change-Id: I405f4ef27b8358fdd22158245b145d849b45658e

2022-05-10  Nick Clifton  <nickc@redhat.com>

	Fix compiling binutils/resbin.c with Clang version 14

2022-05-10  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: include percentages in default metrics list
	gprofng/ChangeLog
	2022-05-09  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		* src/gprofng.rc: Include percentages in default metrics list.

2022-05-10  Alan Modra  <amodra@gmail.com>

	gprof: remove use of PTR
		* basic_blocks.c: Replace uses of PTR with void * throughout.
		* cg_arcs.c: Likewise.
		* cg_print.c: Likewise.
		* hist.c: Likewise.
		* source.h: Likewise.
		* symtab.c: Likewise.

	gas: remove use of PTR
		* config/obj-evax.c (evax_symbol_new_hook): Don't cast to PTR.

2022-05-10  Alan Modra  <amodra@gmail.com>

	opcodes: remove use of PTR
	The non-cgen parts of opcodes.

		* cr16-dis.c (print_arg): Replace PTR with void *.
		* crx-dis.c (print_arg): Likewise.
		* rl78-dis.c (print_insn_rl78_common): Don't use PTR cast.
		* rx-dis.c (print_insn_rx): Likewise.
		* visium-dis.c (print_insn_visium): Likewise.
		* z8k-dis.c (print_insn_z8k): Likewise.

2022-05-10  Alan Modra  <amodra@gmail.com>

	bfd: remove use of PTR
		* coffcode.h (coff_write_object_contents): Don't cast to PTR.
		* elf32-csky.c (csky_elf_link_hash_traverse): Remove use of PTR
		and PARAMS.
		(csky_allocate_dynrelocs): Don't use PTR cast.
		* elf32-nios2.c (adjust_dynrelocs, allocate_dynrelocs): Replace
		PTR with void *.
		* elf32-visium.c (visium_elf_howto_parity_reloc): Likewise.
		* elfxx-ia64.c (ia64_elf_reloc): Likewise.
		* plugin.c (bfd_plugin_bfd_print_private_bfd_data): Likewise.

	include: remove use of PTR
		* hashtab.h (HTAB_EMPTY_ENTRY): Replace PTR with void *.
		(HTAB_DELETED_ENTRY): Likewise.

2022-05-10  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-09  Ilya Leoshkevich  <iii@linux.ibm.com>

	IBM zSystems: Accept (. - 0x100000000) PCRel32 operands
	as does not accept instructions like brasl %r0,.-0x100000000, because
	of two problems with the generic overflow check:

	1. PCRel32 operands are signed, but are treated as unsigned.

	2. The allowed range for these operands is [-(1 << 32), (1 << 32) - 1],
	   and not [-(1 << 31), (1 << 31) - 1].

	Fix both by disabling the generic overflow check - it's not needed,
	because s390_insert_operand () performs its own.

	gas/

	        * config/tc-s390.c (md_gather_operands): Set fx_no_overflow.
	        * testsuite/gas/s390/s390.exp: Add zarch-z900-err.
	        * testsuite/gas/s390/esa-z900.d: New test.
	        * testsuite/gas/s390/esa-z900.s: New test.
	        * testsuite/gas/s390/zarch-z900-err.l: New test.
	        * testsuite/gas/s390/zarch-z900-err.s: New test.

2022-05-09  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: fix occasional failure in gdb.mi/mi-multi-commands.exp
	In bug PR gdb/29036, another failure was reported for the test
	gdb.mi/mi-multi-commands.exp.  This test sends two commands to GDB as
	a single write, and then checks that both commands are executed.

	The problem that was encountered here is that the output of the first
	command, which looks like this:

	  ^done,value="\"FIRST COMMAND\""

	Is actually produced in parts, first the '^done' is printed, then the
	',value="\"FIRST COMMAND\"" is printed.

	What was happening is that some characters from the second command
	were being echoed after the '^done' had been printed, but before the
	value part had been printed.  To avoid this issue I've relaxed the
	pattern that checks for the first command a little.  With this fix in
	place the occasional failure in this test is no longer showing up.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29036

2022-05-09  Tom de Vries  <tdevries@suse.de>

	[gdb] Update syscalls/{amd64,i386}-linux.xml
	- Add a script syscalls/gen-header.py, based on syscalls/arm-linux.py.
	- Add a script syscalls/update-linux.sh (alongside update-freebsd.sh and
	  update-netbsd.sh).
	- Use syscalls/update-linux.sh to update syscalls/{amd64,i386}-linux.xml.in.
	- Regenerate syscalls/{amd64,i386}-linux.xml using syscalls/Makefile.

	In gdb/syscalls/i386-linux.xml.in, updating has the following notable effect:
	...
	-  <syscall name="madvise1" number="220"/>
	-  <syscall name="getdents64" number="221"/>
	-  <syscall name="fcntl64" number="222"/>
	+  <syscall name="getdents64" number="220"/>
	+  <syscall name="fcntl64" number="221"/>
	...

	I've verified in ./arch/x86/entry/syscalls/syscall_32.tbl that the numbers are
	correct.

	Tested on x86_64-linux.

2022-05-09  Tom de Vries  <tdevries@suse.de>

	[gdb] Add gdb/syscalls/Makefile
	Add a Makefile in gdb/syscalls that can be used to translate
	gdb/syscalls/*.xml.in into gdb/syscalls/*.xml.

	Calling make reveals that bfin-linux.xml is missing, so add it.

	Tested on x86_64-linux.

2022-05-09  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: LoongArch: Implement the return_value gdbarch method
	When execute the following command on LoongArch:

	  make check-gdb TESTS="gdb.base/async.exp"

	there exist the following failed testcases:

	  FAIL: gdb.base/async.exp: finish& (timeout)
	  FAIL: gdb.base/async.exp: jump& (timeout)
	  FAIL: gdb.base/async.exp: until& (timeout)
	  FAIL: gdb.base/async.exp: set exec-done-display off (GDB internal error)

	we can see the following messages in gdb/testsuite/gdb.log:

	  finish&
	  Run till exit from #0  foo () at /home/loongson/gdb.git/gdb/testsuite/gdb.base/async.c:9
	  (gdb) /home/loongson/gdb.git/gdb/gdbarch.c:2646: internal-error: gdbarch_return_value: Assertion `gdbarch->return_value != NULL' failed.
	  A problem internal to GDB has been detected,
	  further debugging may prove unreliable.

	In order to fix the above failed testcases, implement the return_value
	gdbarch method on LoongArch.

2022-05-09  Andrew Burgess  <aburgess@redhat.com>

	gdb: fix for gdb.base/eof-exit.exp test failures
	This fix relates to PR gdb/29032, this makes the test more stable by
	ensuring that the Ctrl-D is only sent once the prompt has been
	displayed.  This issue was also discussed on the mailing list here:

	  https://sourceware.org/pipermail/gdb-patches/2022-April/187670.html

	The problem identified in the bug report is that sometimes the Ctrl-D
	(that the test sends to GDB) arrives while GDB is processing a
	command.  When this happens the Ctrl-D is handled differently than if
	the Ctrl-D is sent while GDB is waiting for input at a prompt.

	The original intent of the test was that the Ctrl-D be sent while GDB
	was waiting at a prompt, and that is the case the occurs most often,
	but, when the Ctrl-D arrives during command processing, then GDB will
	ignore the Ctrl-D, and the test will fail.

	This commit ensures the Ctrl-D is always sent while GDB is waiting at
	a prompt, which makes this test stable.

	But, that still leaves an open question, what should happen when the
	Ctrl-D arrives while GDB is processing a command?  This commit doesn't
	attempt to answer that question, which is while bug PR gdb/29032 will
	not be closed once this commit is merged.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29032

2022-05-09  Tom de Vries  <tdevries@suse.de>

	[gdb] Make btrace maintainer entry more clear
	Do:
	...
	-record btrace          <name>       <email>
	+record
	+  btrace               <name>       <email>
	...
	to clarify that the listed maintainer is only maintainer of the btrace part of
	record.

2022-05-09  Martin Liska  <mliska@suse.cz>

	ansidecl.h: sync from GCC
	include/ChangeLog:

		* ansidecl.h: Sync from GCC.

2022-05-09  Tom de Vries  <tdevries@suse.de>

	[gdb/tdep] Support catch syscall pipe2 for i386
	With test-case gdb.base/catch-syscall.exp and target board unix/-m32, we run
	into:
	...
	(gdb) catch syscall pipe2^M
	Unknown syscall name 'pipe2'.^M
	(gdb) FAIL: gdb.base/catch-syscall.exp: determine pipe syscall: catch syscall pipe2
	...

	Fix this by:
	- adding a pipe2 entry in gdb/syscalls/i386-linux.xml.in, and
	- regenerating gdb/syscalls/i386-linux.xml using
	  "xsltproc --output i386-linux.xml apply-defaults.xsl i386-linux.xml.in".

	Tested on x86_64-linux with native and unix/-m32.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29056

2022-05-09  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Handle pipe2 syscall in gdb.base/catch-syscall.exp
	When running test-case gdb.reverse/pipe-reverse.exp on openSUSE Tumbleweed,
	I run into:
	...
	(gdb) continue^M
	Continuing.^M
	^M
	Catchpoint 2 (returned from syscall pipe2), in pipe () from /lib64/libc.so.6^M
	(gdb) FAIL: gdb.base/catch-syscall.exp: without arguments: \
	  syscall pipe has returned
	...

	The current glibc on Tumbleweed is 2.35, which contains commit
	"linux: Implement pipe in terms of __NR_pipe2", and consequently syscall pipe2
	is used instead of syscall pipe.

	Fix this by detecting whether syscall pipe or pipe2 is used before running the
	tests.

	Tested on x86_64-linux, specifically on:
	- openSUSE Tumbleweed (with glibc 2.35), and
	- openSUSE Leap 15.3 (with glibc 2.31).

	On openSUSE Tumbleweed + target board unix/-m32, this exposes:
	...
	(gdb) catch syscall pipe2^M
	Unknown syscall name 'pipe2'.^M
	...
	which will be fixed in a folllow-up patch.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29056

2022-05-09  Tom de Vries  <tdevries@suse.de>

	[gdb/tdep] Handle pipe2 syscall for amd64
	When running test-case gdb.reverse/pipe-reverse.exp on openSUSE Tumbleweed,
	I run into:
	...
	(gdb) continue^M
	Continuing.^M
	Process record and replay target doesn't support syscall number 293^M
	Process record: failed to record execution log.^M
	^M
	Program stopped.^M
	0x00007ffff7daabdb in pipe () from /lib64/libc.so.6^M
	(gdb) FAIL: gdb.reverse/pipe-reverse.exp: continue to breakpoint: marker2
	...

	The current glibc on Tumbleweed is 2.35, which contains commit
	"linux: Implement pipe in terms of __NR_pipe2", and consequently syscall pipe2
	is used in stead of syscall pipe.

	There is already support added for syscall pipe2 for aarch64 (which only has
	syscall pipe2, not syscall pipe), so enable the same for amd64, by:
	- adding amd64_sys_pipe2 in enum amd64_syscall
	- translating amd64_sys_pipe2 to gdb_sys_pipe2 in amd64_canonicalize_syscall

	Tested on x86_64-linux, specifically on:
	- openSUSE Tumbleweed (with glibc 2.35), and
	- openSUSE Leap 15.3 (with glibc 2.31).

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29056

2022-05-09  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-08  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.tui/scroll.exp with read1
	When running test-case gdb.tui/scroll.exp, I get:
	...
	Box Dump (80 x 8) @ (0, 0):
	    0 $17 = 16
	    1 (gdb) p 17
	    2 $18 = 17
	    3 (gdb) p 18
	    4 $19 = 18
	    5 (gdb) p 19
	    6 $20 = 19
	    7 (gdb)
	PASS: gdb.tui/scroll.exp: check cmd window in flip layout
	...
	but with check-read1 I get instead:
	...
	Box Dump (80 x 8) @ (0, 0):
	    0 (gdb) 15
	    1 (gdb) p 16
	    2 $17 = 16
	    3 (gdb) p 17
	    4 $18 = 17
	    5 (gdb) p 18
	    6 $19 = 18
	    7 (gdb) p 19
	FAIL: gdb.tui/scroll.exp: check cmd window in flip layout
	...

	The "p 19" command is handled by Term::command, which sends the command and then
	does Term::wait_for "^$gdb_prompt [string_to_regexp $cmd]", which:
	- matches the line with "(gdb) p 19", and
	- tries to match the following prompt "(gdb) "

	The problem is that scrolling results in reissuing output before the "(gdb) p
	19", and the second matching triggers on that.  Consequently, wait_for no
	longer translates gdb output into screen actions, and the screen does not
	reflect the result of "p 19".

	Fix this by using a new proc wait_for_region_contents, which in contrast to
	wait_for can handle a multi-line regexp.

	Tested on x86_64-linux with make targets check and check-read1.

2022-05-08  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.cp/casts.exp with -m32
	When running test-case gdb.cp/casts.exp with target board unix/-m32, I run
	into:
	...
	(gdb) print (unsigned long long) &gd == gd_value^M
	$31 = false^M
	(gdb) FAIL: gdb.cp/casts.exp: print (unsigned long long) &gd == gd_value
	...

	With some additional printing, we can see in more detail why the comparison
	fails:
	...
	(gdb) print /x &gd^M
	$31 = 0xffffc5c8^M
	(gdb) PASS: gdb.cp/casts.exp: print /x &gd
	print /x (unsigned long long)&gd^M
	$32 = 0xffffc5c8^M
	(gdb) PASS: gdb.cp/casts.exp: print /x (unsigned long long)&gd
	print /x gd_value^M
	$33 = 0xffffffffffffc5c8^M
	(gdb) PASS: gdb.cp/casts.exp: print /x gd_value
	print (unsigned long long) &gd == gd_value^M
	$34 = false^M
	(gdb) FAIL: gdb.cp/casts.exp: print (unsigned long long) &gd == gd_value
	...

	The gd_value is set by this assignment:
	...
	  unsigned long long gd_value = (unsigned long long) &gd;
	...

	The problem here is directly casting from a pointer to a non-pointer-sized
	integer.

	Fix this by adding an intermediate cast to std::uintptr_t.

	Tested on x86_64-linux with native and target board unix/-m32.

2022-05-08  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Handle init errors in gdb.mi/user-selected-context-sync.exp
	In OBS, on aarch64-linux, with a gdb 11.1 based package, I run into:
	...
	(gdb) builtin_spawn -pty^M
	new-ui mi /dev/pts/5^M
	New UI allocated^M
	(gdb) =thread-group-added,id="i1"^M
	(gdb) ERROR: MI channel failed
	warning: Error detected on fd 11^M
	thread 1.1^M
	Unknown thread 1.1.^M
	(gdb) UNRESOLVED: gdb.mi/user-selected-context-sync.exp: mode=non-stop: \
	  test_cli_inferior: reset selection to thread 1.1
	...
	with many more UNRESOLVED following.

	The ERROR is a common problem, filed as
	https://sourceware.org/bugzilla/show_bug.cgi?id=28561 .

	But the many UNRESOLVEDs are due to not checking whether the setup as done in
	the test_setup function succeeds or not.

	Fix this by:
	- making test_setup return an error upon failure
	- handling test_setup error at the call site
	- adding a "setup done" pass/fail to be turned into an unresolved
	  in case of error during setup.

	Tested on x86_64-linux, by manually triggering the error in
	mi_gdb_start_separate_mi_tty.

2022-05-08  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.ada/catch_ex_std.exp with remote-gdbserver-on-localhost
	When running test-case gdb.ada/catch_ex_std.exp on target board
	remote-gdbserver-on-localhost, I run into:
	...
	(gdb) continue^M
	Continuing.^M
	[Inferior 1 (process 15656) exited with code 0177]^M
	(gdb) FAIL: gdb.ada/catch_ex_std.exp: runto: run to main
	Remote debugging from host ::1, port 49780^M
	/home/vries/foo: error while loading shared libraries: libsome_package.so: \
	  cannot open shared object file: No such file or directory^M
	...

	Fix this by adding the usual shared-library + remote-target helper
	"gdb_load_shlib $sofile".

	Tested on x86_64-linux with native and target board
	remote-gdbserver-on-localhost.

2022-05-08  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.threads/fork-plus-threads.exp with check-readmore
	When running test-case gdb.threads/fork-plus-threads.exp with check-readmore,
	I run into:
	...
	[Inferior 11 (process 7029) exited normally]^M
	[Inferior 1 (process 6956) exited normally]^M
	FAIL: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: \
	  inferior 1 exited (timeout)
	...

	The problem is that the regexp consuming the "Inferior exited normally"
	messages:
	- consumes more than one of those messages at a time, but
	- counts only one of those messages.

	Fix this by adopting a line-by-line approach, which deals with those messages
	one at a time.

	Tested on x86_64-linux with native, check-read1 and check-readmore.

2022-05-08  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-07  Tom Tromey  <tom@tromey.com>

	Fix "catch syscall"
	Simon pointed out that some recent patches of mine broke "catch
	syscall".  Apparently I forgot to finish the conversion of this code
	when removing init_catchpoint.  This patch completes the conversion
	and fixes the bug.

2022-05-07  Andrew Burgess  <aburgess@redhat.com>

	gdb/readline: fix extra 'quit' message problem
	After these two commits:

	  commit 4fb7bc4b147fd30b781ea2dad533956d0362295a
	  Date:   Mon Mar 7 13:49:21 2022 +0000

	      readline: back-port changes needed to properly detect EOF

	  commit 91395d97d905c31ac38513e4aaedecb3b25e818f
	  Date:   Tue Feb 15 17:28:03 2022 +0000

	      gdb: handle bracketed-paste-mode and EOF correctly

	It was observed that, if a previous command is selected at the
	readline prompt using the up arrow key, then when the command is
	accepted (by pressing return) an unexpected 'quit' message will be
	printed by GDB.  Here's an example session:

	  (gdb) p 123
	  $1 = 123
	  (gdb) p 123
	  quit
	  $2 = 123
	  (gdb)

	In this session the second 'p 123' was entered not by typing 'p 123',
	but by pressing the up arrow key to select the previous command.  It
	is important that the up arrow key is used, typing Ctrl-p will not
	trigger the bug.

	The problem here appears to be readline's EOF detection when handling
	multi-character input sequences.  I have raised this issue on the
	readline mailing list here:

	  https://lists.gnu.org/archive/html/bug-readline/2022-04/msg00012.html

	a solution has been proposed here:

	  https://lists.gnu.org/archive/html/bug-readline/2022-04/msg00016.html

	This patch includes a test for this issue as well as a back-port of
	(the important bits of) readline commit:

	  commit 2ef9cec8c48ab1ae3a16b1874a49bd1f58eaaca1
	  Date:   Wed May 4 11:18:04 2022 -0400

	      fix for setting RL_STATE_EOF in callback mode

	That commit also includes some updates to the readline documentation
	and tests that I have not included in this commit.

	With this commit in place the unexpected 'quit' messages are resolved.

2022-05-07  Alan Modra  <amodra@gmail.com>

	Fix multiple ubsan warnings in i386-dis.c
	Commit 39fb369834a3 "opcodes: Make i386-dis.c thread-safe" introduced
	a number of casts to bfd_signed_vma that cause undefined behaviour
	with a 32-bit libbfd.  Revert those changes.

		* i386-dis.c (OP_E_memory): Do not cast disp to bfd_signed_vma
		for negation.
		(get32, get32s): Don't use bfd_signed_vma here.

2022-05-07  Alan Modra  <amodra@gmail.com>

	Re: Fix new linker testsuite failures due to rwx segment test problems
	Fix it some more.

	bfd/
		* elfnn-loongarch.c: Remove commented out elf_backend_* defines.
	ld/
		* testsuite/ld-elf/elf.exp (target_defaults_to_execstack): Match
		arm*.  Delete loongarch.

2022-05-07  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-07  Carl Love  <cel@us.ibm.com>

	PowerPC fix for gdb.server/sysroot.exp
	On PowerPC, the stop in the printf function is of the form:

	Breakpoint 2, 0x00007ffff7c6ab08 in printf@@GLIBC_2.17 () from /lib64/libc.so.6

	On other architectures the output looks like:

	Breakpoint 2, 0x0000007fb7ea29ac in printf () from /lib/aarch64-linux-gnu/libc.so.6

	The following patch modifies the printf test by matchine any character
	starting immediately after the printf.  The test now works for PowerPC
	output as well as the output from other architectures.

	The test has been run on a Power 10 system and and Intel x86_64 system.

2022-05-06  Nick Clifton  <nickc@redhat.com>

	Fix new linker testsuite failures due to rwx segment test problems

2022-05-06  Tom Tromey  <tom@tromey.com>

	Introduce catchpoint class
	This introduces a catchpoint class that is used as the base class for
	all catchpoints.  init_catchpoint is rewritten to be a constructor
	instead.

	This changes the hierarchy a little -- some catchpoints now inherit
	from base_breakpoint whereas previously they did not.  This isn't a
	problem, as long as re_set is redefined in catchpoint.

2022-05-06  Tom Tromey  <tom@tromey.com>

	Add initializers to tracepoint
	This adds some initializers to tracepoint.  I think right now these
	may not be needed, due to obscure rules about zero initialization.
	However, this will change in the next patch, and anyway it is clearer
	to be explicit.

	Remove init_raw_breakpoint_without_location
	This removes init_raw_breakpoint_without_location, replacing it with a
	constructor on 'breakpoint' itself.  The subclasses and callers are
	all updated.

	Disable copying for breakpoint
	It seems to me that breakpoint should use DISABLE_COPY_AND_ASSIGN.
	This patch does this.

	Add constructor to exception_catchpoint
	This adds a constructor to exception_catchpoint and simplifies the
	caller.

	Add constructor to syscall_catchpoint
	This adds a constructor to syscall_catchpoint and simplifies the
	caller.

	Add constructor to signal_catchpoint
	This adds a constructor to signal_catchpoint and simplifies the
	caller.

	Add constructor to solib_catchpoint
	This adds a constructor to solib_catchpoint and simplifies the caller.

	Add constructor to fork_catchpoint
	This adds a constructor to fork_catchpoint and simplifies the caller.

	Remove unnecessary line from catch_exec_command_1
	catch_exec_command_1 clears the new catchpoint's "exec_pathname"
	field, but this is already done by virtue of calling "new".

	Constify breakpoint::print_recreate
	This constifies breakpoint::print_recreate.

	Constify breakpoint::print_mention
	This constifies breakpoint::print_mention.

	Constify breakpoint::print_one
	This constifies breakpoint::print_one.

	Constify breakpoint::print_it
	This constifies breakpoint::print_it.  Doing this pointed out some
	code in ada-lang.c that can be simplified a little as well.

	Move works_in_software_mode to watchpoint
	works_in_software_mode is only useful for watchpoints.  This patch
	moves it from breakpoint to watchpoint, and changes it to return bool.

	Boolify breakpoint::explains_signal
	This changes breakpoint::explains_signal to return bool.

	Remove breakpoint::ops
	The breakpoint::ops field is set but never used.  This removes it.

	Change print_recreate_thread to a method
	This changes print_recreate_thread to be a method on breakpoint.  This
	function is only used as a helper by print_recreate methods, so I
	thought this transformation made sense.

2022-05-06  Carl Love  <cel@us.ibm.com>

	PowerPC: bp-permanent.exp, kill-after-signal fix
	The break point after the stepi on Intel is the entry point of the user
	signal handler function test_signal_handler.  The code at the break point
	looks like:

	     0x<hex address> <test_signal_handler>: endbr64

	On PowerPC with a Linux 5.9 kernel or latter, the address where gdb stops
	after the stepi is in the vdso code inserted by the kernel.  The code at the
	breakpoint looks like:

	  0x<hex address>  <__kernel_start_sigtramp_rt64>:	bctrl

	This is different from other architectures.  As discussed below, recent
	kernel changes involving the vdso for PowerPC have been made changes to the
	signal handler code flow.  PowerPC is now stopping in function
	__kernel_start_sigtramp_rt64.  PowerPC now requires an additional stepi to
	reach the user signal handler unlike other architectures.

	The bp-permanent.exp and kill-after-signal tests run fine on PowerPC with an
	kernel that is older than Linux 5.9.

	The PowerPC 64 signal handler was updated by the Linux kernel 5.9-rc1:

	    commit id: 0138ba5783ae0dcc799ad401a1e8ac8333790df9
	    powerpc/64/signal: Balance return predictor stack in signal trampoline

	An additional change to the PowerPC 64 signal handler was made in Linux
	kernel version 5.11-rc7 :

	     commit id: 24321ac668e452a4942598533d267805f291fdc9
	     powerpc/64/signal: Fix regression in __kernel_sigtramp_rt64() semantics

	The first kernel change, puts code into the user space signal handler (in
	the vdso) as a performance optimization to prevent the call/return stack
	from getting out of balance.  The patch ensures that the entire
	user/kernel/vdso cycle is balanced with the addition of the "brctl"
	instruction.

	The second patch, fixes the semantics of __kernel_sigtramp_rt64().  A new
	symbol is introduced to serve as the jump target from the kernel to the
	trampoline which now consists of two parts.

	The above changes for PowerPC signal handler, causes gdb to stop in the
	kernel code not the user signal handler as expected.  The kernel dispatches
	to the vdso code which in turn calls into the signal handler.  PowerPC is
	special in that the kernel is using a vdso instruction (bctrl) to enter the
	signal handler.

	I do not have access to a system with the first patch but not the second.  I did
	test on Power 9 with the Linux 5.15.0-27-generic kernel.  Both tests fail on
	this Power 9 system.  The two tests also fail on Power 10 with the Linux
	5.14.0-70.9.1.el9_0.ppc64le kernel.

	The following patch fixes the issue by checking if gdb stopped at "signal
	handler called".  If gdb stopped there, the tests verifies gdb is in the kernel
	function __kernel_start_sigtramp_rt64 then does an additional stepi to reach the
	user signal handler.  With the patch below, the tests run without errors on both
	the Power 9 and Power 10 systems with out any failures.

2022-05-06  Alan Modra  <amodra@gmail.com>

	bfd targmatch.h makefile rule
	I hit this just now with a make -j build after touching config.bfd.
	mv: cannot stat 'targmatch.new': No such file or directory
	make[2]: *** [Makefile:2336: targmatch.h] Error 1
	make[2]: *** Waiting for unfinished jobs....

	Fix that by not removing the target of the rule, a practice that seems
	likely to cause parallel running of the rule recipe.  The bug goes
	back to 1997, the initial c0734708814c commit.

		* Makefile.am (targmatch.h): rm the temp file, not targmatch.h.
		* Makefile.in: Regenerate.

2022-05-06  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.dwarf2/locexpr-data-member-location.exp with nopie
	When running test-case gdb.dwarf2/locexpr-data-member-location.exp with
	target board unix/-fno-PIE/-no-pie/-m32 I run into:
	...
	(gdb) step^M
	26        return 0;^M
	(gdb) FAIL: gdb.dwarf2/locexpr-data-member-location.exp: step into foo
	...

	The problem is that the test-case tries to mimic some gdb_compile_shlib
	behaviour using:
	...
	set flags {additional_flags=-fpic debug}
	get_func_info foo $flags
	...
	but this doesn't work with the target board setting, because we end up doing:
	...
	gcc locexpr-data-member-location-lib.c -fpic -g -lm -fno-PIE -no-pie -m32 \
	  -o func_addr23029.x
	...
	while gdb_compile_shlib properly filters out the -fno-PIE -no-pie.

	Consequently, the address for foo determined by get_func_info doesn't match
	the actual address of foo.

	Fix this by printing the address of foo using the result of gdb_compile_shlib.

2022-05-06  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-05  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: use gdb::function_view for gdbarch_iterate_over_objfiles_in_search_order callback
	A rather straightforward patch to change an instance of callback +
	void pointer to gdb::function_view, allowing pasing lambdas that
	capture, and eliminating the need for the untyped pointer.

	Change-Id: I73ed644e7849945265a2c763f79f5456695b0037

2022-05-05  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: use $host instead $target
	By mistake, $target was used instead of $host to configure the gprogng build.

	gprofng/ChangeLog
	2022-04-28  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		PR gprofng/29113
		PR gprofng/29116
		* configure.ac: Use $host instead $target.
		* libcollector/configure.ac: Likewise.
		* configure: Rebuild.
		* libcollector/configure: Rebuild.

2022-05-05  Simon Marchi  <simon.marchi@efficios.com>

	gdb: make regcache's cooked_write_test selftest work with native-extended-gdbserver board
	Running

	    $ make check TESTS="gdb.gdb/unittest.exp" RUNTESTFLAGS="--target_board=native-extended-gdbserver"

	I get some failures:

	    Running selftest regcache::cooked_write_test::i386.^M
	    Self test failed: target already pushed^M
	    Running selftest regcache::cooked_write_test::i386:intel.^M
	    Self test failed: target already pushed^M
	    Running selftest regcache::cooked_write_test::i386:x64-32.^M
	    Self test failed: target already pushed^M
	    Running selftest regcache::cooked_write_test::i386:x64-32:intel.^M
	    Self test failed: target already pushed^M
	    Running selftest regcache::cooked_write_test::i386:x86-64.^M
	    Self test failed: target already pushed^M
	    Running selftest regcache::cooked_write_test::i386:x86-64:intel.^M
	    Self test failed: target already pushed^M
	    Running selftest regcache::cooked_write_test::i8086.^M
	    Self test failed: target already pushed^M

	This is because the native-extended-gdbserver automatically connects GDB
	to a GDBserver on startup, and therefore pushes a remote target on the
	initial inferior.  cooked_write_test is currently written in a way that
	errors out if the current inferior has a process_stratum_target pushed.

	Rewrite it to use scoped_mock_context, so it doesn't depend on the
	current inferior (the current one upon entering the function).

	Change-Id: I0357f989eacbdecc4bf88b043754451b476052ad

2022-05-05  Luis Machado  <luis.machado@arm.com>

	Move TILE-Gx files to TARGET64_LIBOPCODES_CFILES
	TILE-Gx is a 64-bit core, so we should include those files in the
	TARGET64_LIBOPCODES_CFILES as opposed to TARGET32_LIBOPCODES_CFILES.

	Don't define ARCH_cris for BFD64
	I believe it is a mistake to define ARCH_cris when BFD64 is defined. It is
	a 32-bit architecture, so should be placed outside of the BFD64 block.

2022-05-05  Xi Ruoyao  <xry111@mengyan1223.wang>

	loongarch: Don't check ABI flags if no code section
	Various packages (glib and gtk4 for example) produces data-only objects
	using `ld -r -b binary` or `objcopy`, with no elf header flags set.  But
	these files also have no code sections, so they should be compatible
	with all ABIs.

	bfd/
		* elfnn-loongarch.c (elfNN_loongarch_merge_private_bfd_data):
		Skip ABI checks if the input has no code sections.

	Reported-by: Wu Xiaotian <yetist@gmail.com>
	Suggested-by: Wang Xuerui <i@xen0n.name>

2022-05-05  Andreas Krebbel  <krebbel@linux.ibm.com>

	IBM zSystems: mgrk, mg first operand requires register pair
	opcodes/

		* s390-opc.c (INSTR_RRF_R0RER): New instruction type.
		(MASK_RRF_R0RER): Define mask for new instruction type.
		* s390-opc.txt: Use RRF_R0RER for mgrk and RXY_RERRD for mg.

2022-05-05  H.J. Lu  <hjl.tools@gmail.com>

	bfd: Check NULL pointer before setting ref_real
		PR ld/29086
		* linker.c (bfd_wrapped_link_hash_lookup): Check NULL pointer
		before setting ref_real.

2022-05-05  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-05  H.J. Lu  <hjl.tools@gmail.com>

	LTO: Handle __real_SYM reference in IR
	When an IR symbol SYM is referenced in IR via __real_SYM, its resolution
	should be LDPR_PREVAILING_DEF, not PREVAILING_DEF_IRONLY, since LTO
	doesn't know that __real_SYM should be resolved by SYM.

	bfd/

		PR ld/29086
		* linker.c (bfd_wrapped_link_hash_lookup): Mark SYM is referenced
		via __real_SYM.

	include/

		PR ld/29086
		* bfdlink.h (bfd_link_hash_entry): Add ref_real.

	ld/

		PR ld/29086
		* plugin.c (get_symbols): Resolve SYM definition to
		LDPR_PREVAILING_DEF for __real_SYM reference.
		* testsuite/ld-plugin/lto.exp: Run PR ld/29086 test.
		* testsuite/ld-plugin/pr29086.c: New file.

2022-05-04  Alan Modra  <amodra@gmail.com>

	cris bfd config
	cris support will be built into a 32-bit bfd if using --enable-targets=all
	on a 32-bit host, so we may as well make targmatch.h include cris.

		* config.bfd (cris): Remove #idef BFD64.

2022-05-04  Alan Modra  <amodra@gmail.com>

	PowerPC64 check_relocs
	Tidy the dynamic reloc handling code in check_relocs, removing
	leftover comments and code from when check_relocs was called as each
	object file was read in.

		* elf64-ppc.c (ppc64_elf_check_relocs): Tidy dynamic reloc
		handling code.
		(dec_dynrel_count): Do the same here.

2022-05-04  Tom Tromey  <tromey@adacore.com>

	Fix crash when creating index from index
	My patches yesterday to unify the DWARF index base classes had a bug
	-- namely, I did the wholesale dynamic_cast-to-static_cast too hastily
	and introduced a crash.  This can be seen by trying to add an index to
	a file that has an index, or by running a test like gdb-index-cxx.exp
	using the cc-with-debug-names.exp target board.

	This patch fixes the crash by introducing a new virtual method and
	removing some of the static casts.

2022-05-04  Luis Machado  <luis.machado@arm.com>

	Fix build failure for aarch64 gdbserver
	We're missing an argument.

2022-05-04  Mark Wielaard  <mark@klomp.org>

	gdb: Workaround stringop-overread warning in debuginfod-support.c on s390x
	For some reason g++ 11.2.1 on s390x produces a spurious warning for
	stringop-overread in debuginfod_is_enabled for url_view. Add a new
	DIAGNOSTIC_IGNORE_STRINGOP_OVERREAD macro to suppress this warning.

	include/ChangeLog:

		* diagnostics.h (DIAGNOSTIC_IGNORE_STRINGOP_OVERREAD): New
		macro.

	gdb/ChangeLog:

		* debuginfod-support.c (debuginfod_is_enabled): Use
		DIAGNOSTIC_IGNORE_STRINGOP_OVERREAD on s390x.

2022-05-04  Pedro Alves  <pedro@palves.net>

	Fix GDBserver Aarch64 Linux regression
	Luis noticed that the recent changes to gdbserver to make it track
	process and threads independently regressed a few gdb.multi/*.exp
	tests for aarch64-linux.

	We started seeing the following internal error for
	gdb.multi/multi-target-continue.exp for example:

	 Starting program: binutils-gdb/gdb/testsuite/outputs/gdb.multi/multi-target-continue/multi-target-continue ^M
	 Error in re-setting breakpoint 2: Remote connection closed^M
	 ../../../repos/binutils-gdb/gdb/thread.c:85: internal-error: inferior_thread: Assertion `current_thread_ != nullptr' failed.^M
	 A problem internal to GDB has been detected,^M
	 further debugging may prove unreliable.

	A backtrace looks like:

	 #0  thread_regcache_data (thread=thread@entry=0x0) at ../../../repos/binutils-gdb/gdbserver/inferiors.cc:120
	 #1  0x0000aaaaaaabf0e8 in get_thread_regcache (thread=0x0, fetch=fetch@entry=0) at ../../../repos/binutils-gdb/gdbserver/regcache.cc:31
	 #2  0x0000aaaaaaad785c in is_64bit_tdesc () at ../../../repos/binutils-gdb/gdbserver/linux-aarch64-low.cc:194
	 #3  0x0000aaaaaaad8a48 in aarch64_target::sw_breakpoint_from_kind (this=<optimized out>, kind=4, size=0xffffffffef04) at ../../../repos/binutils-gdb/gdbserver/linux-aarch64-low.cc:3226
	 #4  0x0000aaaaaaabe220 in bp_size (bp=0xaaaaaab6f3d0) at ../../../repos/binutils-gdb/gdbserver/mem-break.cc:226
	 #5  check_mem_read (mem_addr=187649984471104, buf=buf@entry=0xaaaaaab625d0 "\006", mem_len=mem_len@entry=56) at ../../../repos/binutils-gdb/gdbserver/mem-break.cc:1862
	 #6  0x0000aaaaaaacc660 in read_inferior_memory (memaddr=<optimized out>, myaddr=0xaaaaaab625d0 "\006", len=56) at ../../../repos/binutils-gdb/gdbserver/target.cc:93
	 #7  0x0000aaaaaaac3d9c in gdb_read_memory (len=56, myaddr=0xaaaaaab625d0 "\006", memaddr=187649984471104) at ../../../repos/binutils-gdb/gdbserver/server.cc:1071
	 #8  gdb_read_memory (memaddr=187649984471104, myaddr=0xaaaaaab625d0 "\006", len=56) at ../../../repos/binutils-gdb/gdbserver/server.cc:1048
	 #9  0x0000aaaaaaac82a4 in process_serial_event () at ../../../repos/binutils-gdb/gdbserver/server.cc:4307
	 #10 handle_serial_event (err=<optimized out>, client_data=<optimized out>) at ../../../repos/binutils-gdb/gdbserver/server.cc:4520
	 #11 0x0000aaaaaaafbcd0 in gdb_wait_for_event (block=block@entry=1) at ../../../repos/binutils-gdb/gdbsupport/event-loop.cc:700
	 #12 0x0000aaaaaaafc0b0 in gdb_wait_for_event (block=1) at ../../../repos/binutils-gdb/gdbsupport/event-loop.cc:596
	 #13 gdb_do_one_event () at ../../../repos/binutils-gdb/gdbsupport/event-loop.cc:237
	 #14 0x0000aaaaaaacacb0 in start_event_loop () at ../../../repos/binutils-gdb/gdbserver/server.cc:3518
	 #15 captured_main (argc=4, argv=<optimized out>) at ../../../repos/binutils-gdb/gdbserver/server.cc:3998
	 #16 0x0000aaaaaaab66dc in main (argc=<optimized out>, argv=<optimized out>) at ../../../repos/binutils-gdb/gdbserver/server.cc:4084

	This sequence of functions is invoked due to a series of conditions:

	 1 - The probe-based breakpoint mechanism failed (for some reason) so ...

	 2 - ... gdbserver has to know what type of architecture it is dealing
	     with so it can pick the right breakpoint kind, so it wants to
	     check if we have a 64-bit target.

	 3 - To determine the size of a register, we currently fetch the
	     current thread's register cache, and the current thread pointer
	     is now nullptr.

	In #3, the current thread is nullptr because gdb_read_memory clears it
	on purpose, via set_desired_process, exactly to expose code relying on
	the current thread when it shouldn't.  It was always possible to end
	up in this situation (when the current thread exits), but it was
	harder to reproduce before.

	This commit fixes it by tweaking is_64bit_tdesc to look at the current
	process's tdesc instead of the current thread's tdesc.

	Note that the thread's tdesc is itself filled from the process's
	tdesc, so this should be equivalent:

	 struct regcache *
	 get_thread_regcache (struct thread_info *thread, int fetch)
	 {
	   struct regcache *regcache;

	   regcache = thread_regcache_data (thread);

	 ...
	   if (regcache == NULL)
	     {
	       struct process_info *proc = get_thread_process (thread);

	       gdb_assert (proc->tdesc != NULL);

	       regcache = new_register_cache (proc->tdesc);
	       set_thread_regcache_data (thread, regcache);
	     }
	 ...

	Change-Id: Ibc809d7345e70a2f058b522bdc5cdbdca97e2cdc

2022-05-04  Simon Marchi  <simon.marchi@efficios.com>

	gdb/remote: send qSymbol to all inferiors on startup
	start_remote_1 calls remote_check_symbols after things are set up to
	give the remote side a chance to look up symbols.  One call to
	remote_check_symbols sets the "general thread", if needed, and sends one
	qSymbol packet.  However, a remote target could have more than one
	process on initial connection, and this would send a qSymbol for only
	one of these processes.

	Change it to iterate on all the target's inferiors and send a qSymbol
	packet for each one.

	I tested this by changing gdbserver to spawn two processes on startup:

	    diff --git a/gdbserver/server.cc b/gdbserver/server.cc
	    index 33c42714e72..9b682e9f85f 100644
	    --- a/gdbserver/server.cc
	    +++ b/gdbserver/server.cc
	    @@ -3939,6 +3939,7 @@ captured_main (int argc, char *argv[])

	           /* Wait till we are at first instruction in program.  */
	           target_create_inferior (program_path.get (), program_args);
	    +      target_create_inferior (program_path.get (), program_args);

	           /* We are now (hopefully) stopped at the first instruction of
	             the target process.  This assumes that the target process was

	Instead of hacking GDBserver, it should also be possible to test this by
	starting manually two inferiors on an "extended-remote" connection,
	disconnecting from GDBserver (with the disconnect command), and
	re-connecting.

	I was able to see qSymbol being sent for each inferior:

	      [remote] Sending packet: $Hgp828dc.828dc#1f
	      [remote] Packet received: OK
	      [remote] Sending packet: $qSymbol::#5b
	      [remote] Packet received: qSymbol:6764625f6167656e745f6764625f74705f686561705f627566666572
	      [remote] Sending packet: $qSymbol::6764625f6167656e745f6764625f74705f686561705f627566666572#1e
	      [remote] Packet received: qSymbol:6e70746c5f76657273696f6e
	      [remote] Sending packet: $qSymbol::6e70746c5f76657273696f6e#4d
	      [remote] Packet received: OK
	      [remote] Sending packet: $Hgp828dd.828dd#21
	      [remote] Packet received: OK
	      [remote] Sending packet: $qSymbol::#5b
	      [remote] Packet received: qSymbol:6764625f6167656e745f6764625f74705f686561705f627566666572
	      [remote] Sending packet: $qSymbol::6764625f6167656e745f6764625f74705f686561705f627566666572#1e
	      [remote] Packet received: qSymbol:6e70746c5f76657273696f6e
	      [remote] Sending packet: $qSymbol::6e70746c5f76657273696f6e#4d
	      [remote] Packet received: OK

	Note that there would probably be more work to be done to fully support
	this scenario, more things that need to be done for each discovered
	inferior instead of just for one.

	Change-Id: I21c4ecf6367391e2e389b560f0b4bd906cf6472f

2022-05-04  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/remote: iterate on pspace inferiors in remote_new_objfile
	Commit 152a17495663 ("gdb: prune inferiors at end of
	fetch_inferior_event, fix intermittent failure of
	gdb.threads/fork-plus-threads.exp") broke some tests with the
	native-gdbserver board, such as:

	    (gdb) PASS: gdb.base/step-over-syscall.exp: detach-on-fork=off: follow-fork=child: break cond on target : vfork: break marker
	    continue^M
	    Continuing.^M
	    terminate called after throwing an instance of 'gdb_exception_error'^M

	I can manually reproduce the issue by running (just the commands that
	the test does as a one liner):

	    $ ./gdb -q --data-directory=data-directory \
	          testsuite/outputs/gdb.base/step-over-syscall/step-over-vfork \
		  -ex "tar rem | ../gdbserver/gdbserver - testsuite/outputs/gdb.base/step-over-syscall/step-over-vfork" \
		  -ex "b main" \
		  -ex c \
		  -ex "d 1" \
		  -ex "set displaced-stepping off" \
		  -ex "b *0x7ffff7d7ac5a if main == 0" \
		  -ex "set detach-on-fork off" \
		  -ex "set follow-fork-mode child" \
		  -ex c \
		  -ex "inferior 1" \
		  -ex "b marker" \
		  -ex c

	... where 0x7ffff7d7ac5a is the exact address of the vfork syscall
	(which can be found by looking at gdb.log).

	The important part of the above is that a vfork syscall creates inferior
	2, then inferior 2 executes until exit, then we switch back to inferior
	1 and try to resume it.

	The uncaught exception happens here:

	    #4  0x00005596969d81a9 in error (fmt=0x559692da9e40 "Cannot execute this command while the target is running.\nUse the \"interrupt\" command to stop the target\nand then try again.")
	        at /home/simark/src/binutils-gdb/gdbsupport/errors.cc:43
	    #5  0x0000559695af6f66 in remote_target::putpkt_binary (this=0x617000038080, buf=0x559692da4380 "qSymbol::", cnt=9) at /home/simark/src/binutils-gdb/gdb/remote.c:9560
	    #6  0x0000559695af6aaf in remote_target::putpkt (this=0x617000038080, buf=0x559692da4380 "qSymbol::") at /home/simark/src/binutils-gdb/gdb/remote.c:9518
	    #7  0x0000559695ab50dc in remote_target::remote_check_symbols (this=0x617000038080) at /home/simark/src/binutils-gdb/gdb/remote.c:5141
	    #8  0x0000559695b3cccf in remote_new_objfile (objfile=0x0) at /home/simark/src/binutils-gdb/gdb/remote.c:14600
	    #9  0x0000559693bc52a9 in std::__invoke_impl<void, void (*&)(objfile*), objfile*> (__f=@0x61b0000167f8: 0x559695b3cb1d <remote_new_objfile(objfile*)>) at /usr/include/c++/11.2.0/bits/invoke.h:61
	    #10 0x0000559693bb2848 in std::__invoke_r<void, void (*&)(objfile*), objfile*> (__fn=@0x61b0000167f8: 0x559695b3cb1d <remote_new_objfile(objfile*)>) at /usr/include/c++/11.2.0/bits/invoke.h:111
	    #11 0x0000559693b8dddf in std::_Function_handler<void (objfile*), void (*)(objfile*)>::_M_invoke(std::_Any_data const&, objfile*&&) (__functor=..., __args#0=@0x7ffe0bae0590: 0x0) at /usr/include/c++/11.2.0/bits/std_function.h:291
	    #12 0x00005596956374b2 in std::function<void (objfile*)>::operator()(objfile*) const (this=0x61b0000167f8, __args#0=0x0) at /usr/include/c++/11.2.0/bits/std_function.h:560
	    #13 0x0000559695633c64 in gdb::observers::observable<objfile*>::notify (this=0x55969ef5c480 <gdb::observers::new_objfile>, args#0=0x0) at /home/simark/src/binutils-gdb/gdb/../gdbsupport/observable.h:150
	    #14 0x0000559695df6cc2 in clear_symtab_users (add_flags=...) at /home/simark/src/binutils-gdb/gdb/symfile.c:2873
	    #15 0x000055969574c263 in program_space::~program_space (this=0x6120000c8a40, __in_chrg=<optimized out>) at /home/simark/src/binutils-gdb/gdb/progspace.c:154
	    #16 0x0000559694fc086b in delete_inferior (inf=0x61700003bf80) at /home/simark/src/binutils-gdb/gdb/inferior.c:205
	    #17 0x0000559694fc341f in prune_inferiors () at /home/simark/src/binutils-gdb/gdb/inferior.c:390
	    #18 0x0000559695017ada in fetch_inferior_event () at /home/simark/src/binutils-gdb/gdb/infrun.c:4293
	    #19 0x0000559694f629e6 in inferior_event_handler (event_type=INF_REG_EVENT) at /home/simark/src/binutils-gdb/gdb/inf-loop.c:41
	    #20 0x0000559695b3b0e3 in remote_async_serial_handler (scb=0x6250001ef100, context=0x6170000380a8) at /home/simark/src/binutils-gdb/gdb/remote.c:14466
	    #21 0x0000559695c59eb7 in run_async_handler_and_reschedule (scb=0x6250001ef100) at /home/simark/src/binutils-gdb/gdb/ser-base.c:138
	    #22 0x0000559695c5a42a in fd_event (error=0, context=0x6250001ef100) at /home/simark/src/binutils-gdb/gdb/ser-base.c:189
	    #23 0x00005596969d9ebf in handle_file_event (file_ptr=0x60700005af40, ready_mask=1) at /home/simark/src/binutils-gdb/gdbsupport/event-loop.cc:574
	    #24 0x00005596969da7fa in gdb_wait_for_event (block=0) at /home/simark/src/binutils-gdb/gdbsupport/event-loop.cc:700
	    #25 0x00005596969d8539 in gdb_do_one_event () at /home/simark/src/binutils-gdb/gdbsupport/event-loop.cc:212

	If I enable "set debug infrun" just before the last continue, we see:

	    (gdb) continue
	    Continuing.
	    [infrun] clear_proceed_status_thread: 965604.965604.0
	    [infrun] proceed: enter
	      [infrun] proceed: addr=0xffffffffffffffff, signal=GDB_SIGNAL_DEFAULT
	      [infrun] scoped_disable_commit_resumed: reason=proceeding
	      [infrun] start_step_over: enter
	        [infrun] start_step_over: stealing global queue of threads to step, length = 0
	        [infrun] operator(): step-over queue now empty
	      [infrun] start_step_over: exit
	      [infrun] resume_1: step=0, signal=GDB_SIGNAL_0, trap_expected=0, current thread [965604.965604.0] at 0x7ffff7d7ac5c
	      [infrun] do_target_resume: resume_ptid=965604.0.0, step=0, sig=GDB_SIGNAL_0
	      [infrun] prepare_to_wait: prepare_to_wait
	      [infrun] reset: reason=proceeding
	      [infrun] maybe_set_commit_resumed_all_targets: enabling commit-resumed for target remote
	      [infrun] maybe_call_commit_resumed_all_targets: calling commit_resumed for target remote
	    [infrun] proceed: exit
	    [infrun] fetch_inferior_event: enter
	      [infrun] scoped_disable_commit_resumed: reason=handling event
	      [infrun] do_target_wait: Found 2 inferiors, starting at #1
	      [infrun] random_pending_event_thread: None found.
	      [infrun] print_target_wait_results: target_wait (-1.0.0 [process -1], status) =
	      [infrun] print_target_wait_results:   965604.965604.0 [Thread 965604.965604],
	      [infrun] print_target_wait_results:   status->kind = VFORK_DONE
	      [infrun] handle_inferior_event: status->kind = VFORK_DONE
	      [infrun] context_switch: Switching context from 0.0.0 to 965604.965604.0
	      [infrun] handle_vfork_done: not waiting for a vfork-done event
	      [infrun] start_step_over: enter
	        [infrun] start_step_over: stealing global queue of threads to step, length = 0
	        [infrun] operator(): step-over queue now empty
	      [infrun] start_step_over: exit
	      [infrun] resume_1: step=0, signal=GDB_SIGNAL_0, trap_expected=0, current thread [965604.965604.0] at 0x7ffff7d7ac5c
	      [infrun] do_target_resume: resume_ptid=965604.0.0, step=0, sig=GDB_SIGNAL_0
	      [infrun] prepare_to_wait: prepare_to_wait
	      [infrun] reset: reason=handling event
	      [infrun] maybe_set_commit_resumed_all_targets: enabling commit-resumed for target remote
	      [infrun] maybe_call_commit_resumed_all_targets: calling commit_resumed for target remote
	    terminate called after throwing an instance of 'gdb_exception_error'

	What happens is:

	 - After doing the "continue" on inferior 1, the remote target gives us
	   a VFORK_DONE event.  The core ignores it and resumes inferior 1.
	 - Since prune_inferiors is now called after each handled event, in
	   fetch_inferior_event, it is called after we handled that VFORK_DONE
	   event and resumed inferior 1.
	 - Inferior 2 is pruned, which (see backtrace above) causes its program
	   space to be deleted, which clears the symtabs for that program space,
	   which calls the new_objfile observable and remote_new_objfile
	   observer (with a nullptr objfile, to indicate that the previously
	   loaded symbols have been discarded), which calls
	   remote_check_symbols.

	remote_check_symbols is the function that sends the qSymbol packet, to
	let the remote side ask for symbol addresses.  The problem is that the
	remote target is working in all-stop / sync mode and is currently
	resumed.  It has sent a vCont packet to resume the target and is waiting
	for a stop reply.  It can't send any packets in the mean time.  That
	causes the exception to be thrown.

	This wasn't a problem before, when prune_inferiors was called in
	normal_stop, because it was always called at a time the target was not
	resumed.

	An important observation here is that the new_objfile observable is
	invoked for a change in inferior 2's program space (inferior 2's program
	space is the current program space).  Inferior 2 isn't bound to any
	process on the remote side (it has exited, that's why it's being
	pruned).  It doesn't make sense to try to send a qSymbol packet for a
	process that doesn't exist on the remote side.  remote_check_symbols
	actually attempts to avoid that:

	   /* The remote side has no concept of inferiors that aren't running
	     yet, it only knows about running processes.  If we're connected
	     but our current inferior is not running, we should not invite the
	     remote target to request symbol lookups related to its
	     (unrelated) current process.  */
	  if (!target_has_execution ())
	    return;

	The problem here is that while inferior 2's program space is the current
	program space, inferior 1 is the current inferior.  So the check above
	passes, since inferior has execution.  We therefore try to send a
	qSymbol packet for inferior 1 in reaction to a change in inferior 2's
	program space, that's wrong.

	This exposes a conceptual flaw in remote_new_objfile.  The "new_objfile"
	event concerns a specific program space, which can concern multiple
	inferiors, as inferiors can share a program space.  We shouldn't
	consider the current inferior at all, but instead all inferiors bound to
	the affected program space.  Especially since the current inferior can
	be unrelated to the current program space at that point.

	To be clear, we are in this state because ~program_space sets itself as
	the current program space, but there is no more inferior having that
	program space to switch to, inferior 2 has already been unlinked.

	To fix this, make remote_new_objfile iterate on all inferiors bound to
	the affected program space.  Remove the target_has_execution check from
	remote_check_symbols, replace it with an assert.  All callers must
	ensure that the current inferior has execution before calling it.

	Change-Id: Ica643145bcc03115248290fd310cadab8ec8371c

2022-05-04  Jan Beulich  <jbeulich@suse.com>

	Dwarf: rename yet another instance of "index"
	As before, on sufficiently old glibc this conflicts with a global
	identifier in the library headers. While there also zap the unusual
	padding by blanks.

2022-05-04  Martin Liska  <mliska@suse.cz>

	LTO plugin: sync header file with GCC
	include/ChangeLog:

		* plugin-api.h (enum ld_plugin_tag): Sync with GCC.

2022-05-04  Alan Modra  <amodra@gmail.com>

	PowerPC32 treatment of absolute symbols
	As already done for PowerPC64, fix dynamic relocs for absolute symbols.
	The patch also tidies the dynamic reloc handling code in check_relocs,
	removing leftover comments and code from when check_relocs was called
	as each object file was read in.

	bfd/
		* elf32-ppc.c (ppc_elf_check_relocs): Set isym and ifunc earlier.
		Rearrange tests for dynamic relocs, handling absolute symbols.
		(allocate_dynrelocs): Don't allocate dynamic relocs for locally
		defined absolute symbols.
		(ppc_elf_size_dynamic_sections): Similarly.
		(ppc_elf_relocate_section): Similarly.
	ld/
		* testsuite/ld-powerpc/abs32-pie.d,
		* testsuite/ld-powerpc/abs32-pie.r,
		* testsuite/ld-powerpc/abs32-reloc.s,
		* testsuite/ld-powerpc/abs32-shared.d,
		* testsuite/ld-powerpc/abs32-shared.r,
		* testsuite/ld-powerpc/abs32-static.d,
		* testsuite/ld-powerpc/abs32-static.r: New tests.
		* testsuite/ld-powerpc/powerpc.exp: Run them.

2022-05-04  John Baldwin  <jhb@FreeBSD.org>

	gdbserver: Fix build after adding tls feature to arm tdesc.

2022-05-04  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-04  John Baldwin  <jhb@FreeBSD.org>

	NEWS: Add a note for TLS support on FreeBSD/arm and FreeBSD/Aarch64.

	Read the tpidr register from NT_ARM_TLS on Linux.

	gdbserver: Read the tpidr register from NT_ARM_TLS on Linux.

	Read the tpidr register from NT_ARM_TLS core dump notes on Linux Aarch64.

	Fetch the NT_ARM_TLS register set for native FreeBSD/Aarch64 processes.
	This permits resolving TLS variables.

	Support TLS variables on FreeBSD/Aarch64.
	Derive the pointer to the DTV array from the tpidr register.

	Read the tpidr register from NT_ARM_TLS core dump notes on FreeBSD/Aarch64.

	Add an aarch64-tls feature which includes the tpidr register.

	Fetch the NT_ARM_TLS register set for native FreeBSD/arm processes.
	This permits resolving TLS variables.

	Support TLS variables on FreeBSD/arm.
	Derive the pointer to the DTV array from the tpidruro register.

	Read the tpidruro register from NT_ARM_TLS core dump notes on FreeBSD/arm.

	Add an arm-tls feature which includes the tpidruro register from CP15.

	fbsd-nat: Add helper routines for register sets using PT_[G]SETREGSET.
	FreeBSD's kernel has recently added PT_GETREGSET and PT_SETREGSET
	operations to fetch a register set named by an ELF note type.  These
	helper routines provide helpers to check for a register set's
	existence, fetch registers for a register set, and store registers to
	a register set.

2022-05-03  H.J. Lu  <hjl.tools@gmail.com>

	ld: Regenerate aclocal.m4 with automake 1.15.1
		* aclocal.m4: Regenerate with automake 1.15.1.

2022-05-03  Pedro Alves  <pedro@palves.net>

	gdbserver: track current process as well as current thread
	The recent commit 421490af33bf ("gdbserver/linux: Access memory even
	if threads are running") caused a regression in
	gdb.threads/access-mem-running-thread-exit.exp with gdbserver, which I
	somehow missed.  Like so:

	 (gdb) print global_var
	 Cannot access memory at address 0x555555558010
	 (gdb) FAIL: gdb.threads/access-mem-running-thread-exit.exp: non-stop: access mem (print global_var after writing, inf=2, iter=1)

	The problem starts with GDB telling GDBserver to select a thread, via
	the Hg packet, which GDBserver complies with, then that thread exits,
	and GDB, without knowing the thread is gone, tries to write to memory,
	through the context of the previously selected Hg thread.

	GDBserver's GDB-facing memory access routines, gdb_read_memory and
	gdb_write_memory, call set_desired_thread to make GDBserver re-select
	the thread that GDB has selected with the Hg packet.  Since the thread
	is gone, set_desired_thread returns false, and the memory access
	fails.

	Now, to access memory, it doesn't really matter which thread is
	selected.  All we should need is the target process.  Even if the
	thread that GDB previously selected is gone, and GDB does not yet know
	about that exit, it shouldn't matter, GDBserver should still know
	which process that thread belonged to.

	Fix this by making GDBserver track the current process separately,
	like GDB also does.  Add a new set_desired_process routine that is
	similar to set_desired_thread, but just sets the current process,
	leaving the current thread as NULL.  Use it in the GDB-facing memory
	read and write routines, to avoid failing if the selected thread is
	gone, but the process is still around.

	Change-Id: I4ff97cb6f42558efbed224b30d5c71f6112d44cd

2022-05-03  Pedro Alves  <pedro@palves.net>

	Fix gdb.threads/access-mem-running-thread-exit.exp w/ native-extended-gdbserver
	When testing gdb.threads/access-mem-running-thread-exit.exp with
	--target_board=native-extended-gdbserver, we get:

	  Running gdb.threads/access-mem-running-thread-exit.exp ...
	  FAIL: gdb.threads/access-mem-running-thread-exit.exp: non-stop: second inferior: runto: run to main
	  WARNING: Timed out waiting for EOF in server after monitor exit

			  === gdb Summary ===

	  # of expected passes            3
	  # of unexpected failures        1
	  # of unsupported tests          1

	The problem is that the testcase spawns a second inferior with
	-no-connection, and then runto_main does "run", which fails like so:

	 (gdb) run
	 Don't know how to run.  Try "help target".
	 (gdb) FAIL: gdb.threads/access-mem-running-thread-exit.exp: non-stop: second inferior: runto: run to main

	That "run" above failed because native-extended-gdbserver forces "set
	auto-connect-native-target off", to prevent testcases from mistakenly
	running programs with the native target, which would exactly be the
	case here.

	Fix this by letting the second inferior share the first inferior's
	connection everywhere except on targets that do reload on run (e.g.,
	--target_board=native-gdbserver).

	Change-Id: Ib57105a238cbc69c57220e71261219fa55d329ed

2022-05-03  Andrew Burgess  <aburgess@redhat.com>

	gdb: add some additional thread status debug output
	While working on this patch:

	  https://sourceware.org/pipermail/gdb-patches/2022-January/185109.html

	I found it really useful to print the executing/resumed status of all
	threads (or all threads in a particular inferior) at various
	places (e.g. when a new inferior is started, when GDB attaches, etc).

	This debug was originally part of the above patch, but I wanted to
	rewrite this as a separate patch and move the code into a new function
	in infrun.h, which is what this patch does.

	Unless 'set debug infrun on' is in effect, then there should be no
	user visible changes after this commit.

2022-05-03  Nick Clifton  <nickc@redhat.com>

	Add a linker warning when creating potentially dangerous executable segments.  Add tests, options to disabke and configure switches to choose defaults.

	Fix potential arithmetic overflow in the linker's plugin handling code.
		PR 29101
		* libdep_plugin.c (get_libdeps): Check for overflow when computing
		amount of memory to allocate.

2022-05-03  Andrew Burgess  <aburgess@redhat.com>

	objdump: fix styled printing of addresses
	Previous work to add styled disassembler output missed a case in
	objdump_print_addr, which is fixed in this commit.

2022-05-03  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: small cleanup in mi-break-qualified.exp
	It is not necessary to pass an empty string to mi_gdb_start, passing
	the empty string is equivalent to passing no arguments, which is what
	we do everywhere else (that we don't need to specify an actual
	argument).

	The only place we use 'mi_gdb_start ""' is in
	gdb.mi/mi-break-qualified.exp, so in this commit I just replace that
	with a call to 'mi_gdb_start' - just for consistency.

	There should be no change in what is tested after this commit.

2022-05-03  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: change mi_gdb_start to take a list of flags
	After this previous commit I was thinking about the API of
	mi_gdb_start.  I felt that the idea of passing flags as separate
	arguments and using 'args' to gather these into a list, though clever,
	was not an intuitive API.

	In this commit I modify mi_gdb_start so that it expects a single
	argument, which should be a list of flags.  Thus, where we previously
	would have said:

	  mi_gdb_start separate-mi-tty separate-inferior-tty

	We would now say:

	  mi_gdb_start { separate-mi-tty separate-inferior-tty }

	However, it turns out we never actually call mi_gdb_start passing two
	arguments in this way at all.  We do in some places do this:

	  mi_gdb_start separate-inferior-tty

	But that's fine, a single string like this works equally well as a
	single item list, so this will not need updating.

	There is also one place where we do this:

	  eval mi_gdb_start $start_ops

	where $start_ops is a list that might contains 0, 1, or 2 items.  The
	eval here is used to expand the $start_ops list so mi_gdb_start sees
	the list contents as separate arguments.  In this case we just need to
	drop the use of eval.

	I think that the new API is more intuitive, but others might
	disagree, in which case I can drop this change.

	There should be no change in what is tested after this commit.

2022-05-03  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: fix mi-exec-run.exp with native-extended-gdbserver board
	When running with the native-extended-gdbserver board, I currently see
	one failure in gdb.mi/mi-exec-run.exp:

	    FAIL: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=separate: force-fail=0: breakpoint hit reported on console (timeout)

	In this test the MI interface should be started in a separate tty,
	which means we should have a CLI tty and an MI tty, however, this is
	not happening.  Instead GDB is just started in MI mode and there is no
	CLI tty.

	The test script tries to switch between the CLI an MI terminals and
	look for some expected output on each, however, as there is no CLI
	terminal the expected output never arrives, and the test times out.

	It turns out that this is not a GDB problem, rather, this is an issue
	with argument passing within the test script.

	The proc default_mi_gdb_start expects to take a set of flags (strings)
	as arguments, each of flag is expected to be a separate argument.  The
	default_mi_gdb_start proc collects all its arguments into a list using
	the special 'args' parameter name, and then iterates over this list to
	see which flags were passed.

	In mi_gdb_start, which forwards to default_mi_gdb_start, the arguments
	are also gathered into the 'args' parameter list, but are then
	expanded back to be separate arguments using the eval trick, i.e.:

	  proc mi_gdb_start { args } {
	    return [eval default_mi_gdb_start $args]
	  }

	This ensures that when we arrive in default_mi_gdb_start each flag is
	a separate argument, rather than appearing as a single list containing
	all arguments.

	When using the native-extended-gdbserver board however, the file
	boards/native-extended-gdbserver.exp is loaded, and this file replaces
	the default mi_gdb_start with its own version.

	This new mi_gdb_start also gathers the arguments into an 'args' list,
	but forgets to expand the arguments out using the eval trick.

	As a result, when using the native-extended-gdbserver board, by the
	time we get to default_mi_gdb_start, we end up with the args list
	containing a single item, which is a list containing all the arguments
	the user passed.

	What this means is that if the user passes two arguments, then, in
	default_mi_gdb_start, instead of seeing two separate arguments, we see
	a single argument made by concatenating the two arguments together.

	The only place this is a problem is in the test mi-exec-run.exp,
	which (as far as I can see) is the only test where we might try to
	pass both arguments at the same time.  Currently we think we passed
	both arguments to mi_gdb_start, but mi_gdb_start behaves as if no
	arguments were passed.

	This commit fixes the problem by making use of the eval trick within
	the native-extended-gdbserver version of mi_gdb_start.  After this,
	the FAIL listed at the top of this message is resolved.

2022-05-03  Andrew Burgess  <aburgess@redhat.com>

	gdb: fix failures in gdb.mi/mi-exec-run.exp with native-extended-gdbserver
	When running the gdb.mi/mi-exec-run.exp test using the
	native-extended-gdbserver I see failures like this:

	  FAIL: gdb.mi/mi-exec-run.exp: inferior-tty=main: mi=main: force-fail=1: run failure detected
	  FAIL: gdb.mi/mi-exec-run.exp: inferior-tty=main: mi=separate: force-fail=1: run failure detected
	  FAIL: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=separate: force-fail=1: run failure detected

	There's a race condition here, so you might see a slightly different
	set of failures, but I always see some from the 'run failure detected'
	test.

	NOTE: I also see an additional test failure:

	 FAIL: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=separate: force-fail=0: breakpoint hit reported on console (timeout)

	but that is a completely different issue, and is not being addressed
	in this commit.

	The problem for the 'run failure detected' test is that we end up
	in gdb_expect looking for output from two spawn-ids, one from
	gdbserver, and one from gdb.  We're looking for one output pattern
	from each spawn-id, and for the test to pass we need to see both
	patterns.

	Now, if gdb exits then this is a test failure (this would indicate gdb
	crashing, which is bad), so we have an eof pattern associated with
	the gdb spawn-id.

	However, in this particular test we expect gdbserver to fail to
	execute the binary (the test binary is set non-executable), and so we
	get an error message from gdbserver (which matches the pattern), and
	then gdbserver exits, this is expected.

	The problem is that after spotting the pattern from gdbserver, we
	often see the eof from gdbserver before we see the pattern from gdb.
	If this happens then we drop out of the gdb_expect without ever seeing
	the pattern from gdb, and fail the test.

	In this commit, I place the spawn-id of gdbserver into a global
	variable, and then use this global variable as the -i option within
	the gdb_expect.

	Now, once we have seen the expected pattern on the gdbserver spawn-id,
	the global variable is cleared.  After this the gdb_expect no longer
	checks the gdbserver spawn-id for additional output, and so never sees
	the eof event.  This leaves the gdb_expect running, which allows the
	pattern from gdb to be seen, and for the test to pass.

	I now see no failures relating to 'run failure detected'.

2022-05-03  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-02  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.cp/align.exp with gcc 12.1 / 11.3
	Starting with gcc 12.1 / gcc 11.3, for test-case gdb.cp/align.exp we run into:
	...
	align.cc:29:23: error: invalid application of 'alignof' to a void type^M
	   29 |     unsigned a_void = alignof (void);^M
	      |                       ^~~~~~~~~~~~~~^M
	...

	Fix this by using __alignof__ instead.

	Tested on x86_64-linux, with gcc 7.5.0, gcc 12.1 and clang 12.0.1.

2022-05-02  Aaron Merey  <amerey@redhat.com>

	gdb/debuginfod: Whitespace-only URL should disable debuginfod
	Currently debuginfod is disabled when the string of server URLs
	is unset or set to be the empty string (via the $DEBUGINFOD_URLS
	environment variable or the 'set debuginfod urls' gdb command).

	Extend this functionality so that a whitespace-only URL also disables
	debuginfod.

	Modify a testcase to verify that a whitespace-only URL disables
	debuginfod.

2022-05-02  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove type_wanted parameter from a few functions
	The type_wanted value, passed down to the create_sals_from_location
	callback, is never used.  Remove it.

	Change-Id: Ic363ee13f6af593a3e875ff7fe46de130cdc190c

2022-05-02  Simon Marchi  <simon.marchi@efficios.com>

	gnulib: update to bd11400942d6
	Update the gnulib import to fixes these issues:

	  - GDB build with clang + glibc < 2.33.

	      https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=d6a07b4dc21b3118727743142c678858df442853
	      https://lists.gnu.org/archive/html/bug-gnulib/2022-04/msg00072.html

	    With glibc < 2.33, gnulib (since relatively recently) enables a
	    replacement for free (see gnulib/import/m4/free.m4).  In that path,
	    clang shows this error:

	        make[2]: Entering directory '/home/smarchi/build/binutils-gdb-clang/gdbsupport'
	          CXX      agent.o
	        In file included from /home/smarchi/src/binutils-gdb/gdbsupport/agent.cc:20:
	        In file included from /home/smarchi/src/binutils-gdb/gdbsupport/common-defs.h:95:
	        ../gnulib/import/string.h:636:19: error: exception specification in declaration does not match previous declaration
	        _GL_EXTERN_C void free (void *) throw ();
	                          ^
	        ../gnulib/import/stdlib.h:737:17: note: expanded from macro 'free'
	        #   define free rpl_free
	                        ^
	        ../gnulib/import/stdlib.h:739:1: note: previous declaration is here
	        _GL_FUNCDECL_RPL (free, void, (void *ptr));
	        ^
	        ../gnulib/import/sys/select.h:251:23: note: expanded from macro '_GL_FUNCDECL_RPL'
	          _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
	                              ^
	        <scratch space>:139:1: note: expanded from here
	        rpl_free
	        ^

	    The gnulib commit mentioned fixes the exception specification of `free`.

	 - GDB build on RHEL 7:

	      CC       libgnu_a-openat-proc.o
	    In file included from /usr/include/string.h:633,
	                     from ./string.h:41,
	                     from ../../../binutils-gdb/gnulib/import/openat-proc.c:30:
	    ./string.h:1105:1: error: expected identifier or '(' before '__extension__'
	     1105 | _GL_FUNCDECL_SYS (strndup, char *,
	          | ^~~~~~~~~~~~~~~~

	     https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=84863a1c4dc8cca8fb0f6f670f67779cdd2d543b
	     https://lists.gnu.org/archive/html/bug-gnulib/2022-04/msg00075.html

	Change-Id: Ibd51302feece6f385d0c53e0d08921b5d95e2776

2022-05-02  Tom Tromey  <tromey@adacore.com>

	Fix Ada catchpoint regression
	The breakpoint C++-ification series introduced a regression for Ada
	catchpoints.  Specifically, commit 2b5ab5b8 ("Convert base breakpoints
	to vtable ops") caused these to start failing.  I didn't notice this
	because testing Ada using a Linux distro compiler requires installing
	the GNAT debuginfo, which I hadn't done.

	This patch fixes the problem.  I'm checking it in.

2022-05-02  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-05-01  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.multi/attach-no-multi-process.exp with check-readmore
	When running test-case gdb.multi/attach-no-multi-process.exp with
	check-readmore, I get:
	...
	(gdb) attach 13411^M
	Attaching to Remote target^M
	No unwaited-for children left.^M
	(gdb) Reading symbols from attach-no-multi-process...^M
	Reading symbols from /lib64/libm.so.6...^M
	(No debugging symbols found in /lib64/libm.so.6)^M
	Reading symbols from /lib64/libc.so.6...^M
	(No debugging symbols found in /lib64/libc.so.6)^M
	Reading symbols from /lib64/ld-linux-x86-64.so.2...^M
	(No debugging symbols found in /lib64/ld-linux-x86-64.so.2)^M
	0x00007f5df1fffc8a in clock_nanosleep@GLIBC_2.2.5 () from /lib64/libc.so.6^M
	FAIL: gdb.multi/attach-no-multi-process.exp: target_non_stop=off: \
	  attach to the program via remote (timeout)
	...

	The problem is that the attach output is matched using gdb_test, which uses
	the '$gdb_prompt $' regexp, and this does not handle the case that '(gdb) ' is
	not the last available output.

	Fix this by using a gdb_test_multiple instead with a '$gdb_prompt ' regexp, so
	without the '$' anchor.

	Tested on x86_64-linux with native, check-read1 and check-readmore.

2022-05-01  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-30  Thomas Hebb  <tommyhebb@gmail.com>

	opcodes: don't assume ELF in riscv, csky, rl78, mep disassemblers
	Currently, the get_disassembler() implementations for riscv, csky, and
	rl78--and mep_print_insn() for mep--access ELF variants of union fields
	without first checking that the bfd actually represents an ELF.  This
	causes undefined behavior and crashes when disassembling non-ELF files
	(the "binary" BFD, for example).  Fix that.

2022-04-30  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-29  Tom Tromey  <tom@tromey.com>

	Remove create_breakpoints_sal_default
	create_breakpoints_sal_default is just a simple wrapper, so remove it.

	Remove allocate_bp_location
	allocate_bp_location is just a small wrapper for a method call, so
	inline it everywhere.

	Constify breakpoint_ops
	Now that all breakpoint_ops are statically initialized, they can all
	be made const.

	Remove breakpoint ops initialization
	initialize_breakpoint_ops does not do much any more, so remove it in
	favor of statically-initialize objects.

	Remove vtable_breakpoint_ops
	There's no need to have vtable_breakpoint_ops any more, so remove it
	in favor of base_breakpoint_ops.

	Remove most fields from breakpoint_ops
	At this point, all implementations of breakpoints use the vtable.  So,
	we can now remove most function pointers from breakpoint_ops and
	switch to using methods directly in the callers.  Only the two "static
	virtual" methods remain in breakpoint_ops.

	Remove breakpoint_ops from init_catchpoint
	init_catchpoint is only ever passed a single breakpoint_ops pointer,
	so remove the parameter.

	Remove breakpoint_ops from init_ada_exception_breakpoint
	init_ada_exception_breakpoint is only ever passed a single
	breakpoint_ops structure, so remove the parameter.

2022-04-29  Tom Tromey  <tom@tromey.com>

	Merge probe and ordinary tracepoints
	Right now, probe tracepoints are handled by a separate ops object.
	However, they differ only in a small way from ordinary tracepoints,
	and furthermore can be distinguished by their event location.

	This patch merges the two cases, just as was done for breakpoints.

2022-04-29  Tom Tromey  <tom@tromey.com>

	Merge probe and ordinary breakpoints
	Right now, probe breakpoints are handled by a separate ops object.
	However, they differ only in a small way from ordinary breakpoints,
	and furthermore can be distinguished by their "probe" object.

	This patch merges the two cases.  This avoids having to introduce a
	new bp_ constant (which can be quite subtle to do correctly) and a new
	subclass.

2022-04-29  Tom Tromey  <tom@tromey.com>

	Remove bkpt_base_breakpoint_ops
	An earlier patch removed the last use of bkpt_base_breakpoint_ops, so
	remove the object entirely.

	Convert static marker tracepoints to vtable ops
	This converts static marker tracepoints to use vtable_breakpoint_ops.

	Add bp_static_marker_tracepoint
	Because the actual construction of a breakpoint is buried deep in
	create_breakpoint, at present it's necessary to have a new bp_
	enumerator constant any time a new subclass is needed.  Static marker
	tracepoints are one such case, so this patch introduces
	bp_static_marker_tracepoint and updates various spots to recognize it.

	Convert ranged breakpoints to vtable ops
	This converts ranged breakpoints to use vtable_breakpoint_ops.  This
	requires introducing a new ranged_breakpoint type, but this is
	relatively simple because ranged breakpoints can only be created by
	break_range_command.

	Convert dprintf to vtable ops
	This converts dprintf to use vtable_breakpoint_ops.

	Convert Ada catchpoints to vtable ops
	This converts Ada catchpoints to use vtable_breakpoint_ops.

	Convert ordinary breakpoints to vtable ops
	This converts "ordinary" breakpoint to use vtable_breakpoint_ops.
	Recall that an ordinary breakpoint is both the kind normally created
	by users, and also a base class used by other classes.

	Change inheritance of dprintf
	The dprintf breakpoint ops is mostly a copy of bpkt_breakpoint_ops,
	except it's written out explicitly -- and, importantly, there's
	nothing that bpkt_breakpoint_ops overrides that dprintf does not.
	This changes dprintf to simply inherit directly, and updates struct
	dprintf_breakpoint to reflect the change as well.

	Convert momentary breakpoints to vtable ops
	This converts momentary breakpoints to use vtable_breakpoint_ops.

	Convert internal breakpoints to vtable ops
	This converts internal breakpoints to use vtable_breakpoint_ops.

	Convert break-catch-throw to vtable ops
	This converts break-catch-throw.c to use vtable_breakpoint_ops.

	Convert base breakpoints to vtable ops
	This converts base breakpoints to use vtable_breakpoint_ops.

2022-04-29  Tom Tromey  <tom@tromey.com>

	Add some new subclasses of breakpoint
	This adds a few new subclasses of breakpoint.  The inheritance
	hierarchy is chosen to reflect what's already present in
	initialize_breakpoint_ops -- it mirrors the way that the _ops
	structures are filled in.

	This patch also changes new_breakpoint_from_type to create the correct
	sublcass based on bptype.  This is important due to the somewhat
	inverted way in which create_breakpoint works; and in particular later
	patches will change some of these entries.

2022-04-29  Tom Tromey  <tom@tromey.com>

	Convert tracepoints to vtable ops
	This converts tracepoints to use vtable_breakpoint_ops.

	Convert watchpoints to vtable ops
	This converts watchpoints and masked watchpoints. to use
	vtable_breakpoint_ops.  For masked watchpoints, a new subclass must be
	introduced, and watch_command_1 is changed to create one.

	Convert break-catch-load to vtable ops
	This converts break-catch-load.c to use vtable_breakpoint_ops.

	Convert break-catch-fork to vtable ops
	This converts break-catch-fork.c to use vtable_breakpoint_ops.

	Convert break-catch-exec to vtable ops
	This converts break-catch-exec.c to use vtable_breakpoint_ops.

	Convert break-catch-syscall to vtable ops
	This converts break-catch-syscall.c to use vtable_breakpoint_ops.

	Convert break-catch-sig to use vtable ops
	This converts break-catch-sig.c to use vtable_breakpoint_ops.

2022-04-29  Tom Tromey  <tom@tromey.com>

	Add a vtable-based breakpoint ops
	This adds methods to struct breakpoint.  Each method has a similar
	signature to a corresponding function in breakpoint_ops, with the
	exceptions of create_sals_from_location and create_breakpoints_sal,
	which can't be virtual methods on breakpoint -- they are only used
	during the construction of breakpoints.

	Then, this adds a new vtable_breakpoint_ops structure and populates it
	with functions that simply forward a call from breakpoint_ops to the
	corresponding virtual method.  These are all done with lambdas,
	because they are just a stepping stone -- by the end of the series,
	this structure will be deleted.

2022-04-29  Tom Tromey  <tom@tromey.com>

	Return bool from breakpoint_ops::print_one
	This changes breakpoint_ops::print_one to return bool, and updates all
	the implementations and the caller.  The caller is changed so that a
	NULL check is no longer needed -- something that will be impossible
	with a real method.

	Delete some unnecessary wrapper functions
	This patch deletes a few unnecessary wrapper functions from
	breakpoint.c.

	Add an assertion to clone_momentary_breakpoint
	This adds an assertion to clone_momentary_breakpoint.  This will
	eventually be removed, but in the meantime is is useful for helping
	convince oneself that momentary breakpoints will always use
	momentary_breakpoint_ops.  This understanding will help when cleaning
	up the code later.

	Boolify print_solib_event
	Change print_solib_event to accept a bool parameter and update the
	callers.

	Move "catch load" to a new file
	The "catch load" code is reasonably self-contained, and so this patch
	moves it out of breakpoint.c and into a new file, break-catch-load.c.
	One function from breakpoint.c, print_solib_event, now has to be
	exposed, but this seems pretty reasonable.

2022-04-29  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: assertion in gprofng/src/Expression.cc:139
	gprofng/ChangeLog
	2022-04-28  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		PR gprofng/29102
		* src/Expression.h: Remove fixupValues.
		* src/Expression.cc (Expression::copy): Fix a bug.

2022-04-29  Tom Tromey  <tromey@adacore.com>

	De-duplicate .gdb_index
	This de-duplicates variables and types in .gdb_index, making the new
	index closer to what gdb generated before the new DWARF scanner
	series.  Spot-checking the resulting index for gdb itself, it seems
	that the new scanner picks up some extra symbols not detected by the
	old one.  I tested both the new and old versions of gdb on both new
	and old versions of the index, and startup time in all cases is
	roughly the same (it's worth noting that, for gdb itself, the index no
	longer provides any benefit over the DWARF scanner).  So, I think this
	fixes the size issue with the new index writer.

	Regression tested on x86-64 Fedora 34.

2022-04-29  Tom Tromey  <tromey@adacore.com>

	Fix .debug_names regression with new indexer
	At AdaCore, we run the internal gdb test suite in several modes,
	including one using the .debug_names index.  This caught a regression
	caused by the new DWARF indexer.

	First, the psymtabs-based .debug_names generator was completely wrong.
	However, to avoid making the rewrite series even bigger (fixing the
	writer will also require rewriting the .debug_names reader), it
	attempted to preserve the weirdness.

	However, this was not done properly.  For example the old writer did
	this:

	-      case STRUCT_DOMAIN:
	-	return DW_TAG_structure_type;

	The new code, instead, simply preserves the actual DWARF tag -- but
	this makes future lookups fail, because the .debug_names reader only
	looks for DW_TAG_structure_type.

	This patch attempts to revert to the old behavior in the writer.

2022-04-29  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/infrun: make fetch_inferior_event restore thread if exited or signalled
	Commit 152a1749566 ("gdb: prune inferiors at end of
	fetch_inferior_event, fix intermittent failure of
	gdb.threads/fork-plus-threads.exp") introduced some follow-fork-related
	test failures, such as:

	    info inferiors^M
	      Num  Description       Connection           Executable        ^M
	    * 1    process 634972    1 (native)           /home/simark/build/binutils-gdb-one-target/gdb/testsuite/outputs/gdb.base/foll-fork/foll-fork ^M
	      2    process 634975    1 (native)           /home/simark/build/binutils-gdb-one-target/gdb/testsuite/outputs/gdb.base/foll-fork/foll-fork ^M
	    (gdb) PASS: gdb.base/foll-fork.exp: follow-fork-mode=parent: detach-on-fork=off: cmd=next 2: test_follow_fork: info inferiors
	    inferior 2^M
	    [Switching to inferior 2 [process 634975] (/home/simark/build/binutils-gdb-one-target/gdb/testsuite/outputs/gdb.base/foll-fork/foll-fork)]^M
	    [Switching to thread 2.1 (Thread 0x7ffff7c9a740 (LWP 634975))]^M
	    #0  0x00007ffff7d7abf7 in _Fork () from /usr/lib/libc.so.6^M
	    (gdb) PASS: gdb.base/foll-fork.exp: follow-fork-mode=parent: detach-on-fork=off: cmd=next 2: test_follow_fork: inferior 2
	    continue^M
	    Continuing.^M
	    [Inferior 2 (process 634975) exited normally]^M
	    [Switching to Thread 0x7ffff7c9a740 (LWP 634972)]^M
	    (gdb) PASS: gdb.base/foll-fork.exp: follow-fork-mode=parent: detach-on-fork=off: cmd=next 2: test_follow_fork: continue until exit at continue unfollowed inferior to end
	    break callee^M
	    Breakpoint 2 at 0x555555555160: file /home/simark/src/binutils-gdb/gdb/testsuite/gdb.base/foll-fork.c, line 9.^M
	    (gdb) FAIL: gdb.base/foll-fork.exp: follow-fork-mode=parent: detach-on-fork=off: cmd=next 2: test_follow_fork: break callee

	What happens here is:

	 - inferior 2 is selected
	 - we continue, leading to inferior 2's exit
	 - we set breakpoint, expect 2 locations, but only one location is
	   resolved

	Reading between the lines, we understand that inferior 2 got pruned,
	when it shouldn't have been.

	The issue can be reproduced by hand with:

	    $ ./gdb -q --data-directory=data-directory testsuite/outputs/gdb.base/foll-fork/foll-fork -ex "set detach-on-fork off" -ex start -ex "next 2" -ex "inferior 2" -ex "set debug infrun"
	    ...
	    Temporary breakpoint 1, main () at /home/simark/src/binutils-gdb/gdb/testsuite/gdb.base/foll-fork.c:14
	    14        int  v = 5;
	    [New inferior 2 (process 637627)]
	    [Thread debugging using libthread_db enabled]
	    Using host libthread_db library "/usr/lib/../lib/libthread_db.so.1".
	    17        if (pid == 0) /* set breakpoint here */
	    [Switching to inferior 2 [process 637627] (/home/simark/build/binutils-gdb-one-target/gdb/testsuite/outputs/gdb.base/foll-fork/foll-fork)]
	    [Switching to thread 2.1 (Thread 0x7ffff7c9a740 (LWP 637627))]
	    #0  0x00007ffff7d7abf7 in _Fork () from /usr/lib/libc.so.6
	    (gdb) continue
	    Continuing.
	    [infrun] clear_proceed_status_thread: 637627.637627.0
	    [infrun] proceed: enter
	      [infrun] proceed: addr=0xffffffffffffffff, signal=GDB_SIGNAL_DEFAULT
	      [infrun] scoped_disable_commit_resumed: reason=proceeding
	      [infrun] start_step_over: enter
	        [infrun] start_step_over: stealing global queue of threads to step, length = 0
	        [infrun] operator(): step-over queue now empty
	      [infrun] start_step_over: exit
	      [infrun] proceed: start: resuming threads, all-stop-on-top-of-non-stop
	        [infrun] proceed: resuming 637627.637627.0
	        [infrun] resume_1: step=0, signal=GDB_SIGNAL_0, trap_expected=0, current thread [637627.637627.0] at 0x7ffff7d7abf7
	        [infrun] do_target_resume: resume_ptid=637627.637627.0, step=0, sig=GDB_SIGNAL_0
	        [infrun] infrun_async: enable=1
	        [infrun] prepare_to_wait: prepare_to_wait
	      [infrun] proceed: end: resuming threads, all-stop-on-top-of-non-stop
	      [infrun] reset: reason=proceeding
	      [infrun] maybe_set_commit_resumed_all_targets: enabling commit-resumed for target native
	      [infrun] maybe_call_commit_resumed_all_targets: calling commit_resumed for target native
	      [infrun] maybe_call_commit_resumed_all_targets: calling commit_resumed for target native
	    [infrun] proceed: exit
	    [infrun] fetch_inferior_event: enter
	      [infrun] scoped_disable_commit_resumed: reason=handling event
	      [infrun] do_target_wait: Found 2 inferiors, starting at #1
	      [infrun] random_pending_event_thread: None found.
	      [infrun] print_target_wait_results: target_wait (-1.0.0 [process -1], status) =
	      [infrun] print_target_wait_results:   637627.637627.0 [process 637627],
	      [infrun] print_target_wait_results:   status->kind = EXITED, exit_status = 0
	      [infrun] handle_inferior_event: status->kind = EXITED, exit_status = 0
	    [Inferior 2 (process 637627) exited normally]
	      [infrun] stop_waiting: stop_waiting
	      [infrun] stop_all_threads: start: reason=presenting stop to user in all-stop, inf=-1
	        [infrun] stop_all_threads: pass=0, iterations=0
	        [infrun] stop_all_threads:   637624.637624.0 not executing
	        [infrun] stop_all_threads: pass=1, iterations=1
	        [infrun] stop_all_threads:   637624.637624.0 not executing
	        [infrun] stop_all_threads: done
	      [infrun] stop_all_threads: end: reason=presenting stop to user in all-stop, inf=-1
	    [Switching to Thread 0x7ffff7c9a740 (LWP 637624)]
	      [infrun] infrun_async: enable=0
	      [infrun] reset: reason=handling event
	      [infrun] maybe_set_commit_resumed_all_targets: not requesting commit-resumed for target native, no resumed threads
	    (gdb) [infrun] fetch_inferior_event: exit
	    (gdb) info inferiors
	      Num  Description       Connection           Executable
	    * 1    process 637624    1 (native)           /home/simark/build/binutils-gdb-one-target/gdb/testsuite/outputs/gdb.base/foll-fork/foll-fork
	    (gdb) i th
	      Id   Target Id                                      Frame
	    * 1    Thread 0x7ffff7c9a740 (LWP 637624) "foll-fork" main () at /home/simark/src/binutils-gdb/gdb/testsuite/gdb.base/foll-fork.c:17

	After handling the EXITED event for inferior 2, inferior 2 should have
	stayed the current inferior, which should have prevented it from getting
	pruned.  When debugging, we find that when getting at the
	prune_inferiors call, the current inferior is inferior 1.  Further
	debugging shows that prior to the call to
	clean_up_just_stopped_threads_fsms, the current inferior is inferior 2,
	and after, it's inferior 1.  Then, back in fetch_inferior_event, the
	restore_thread object is disabled, due to:

		    /* If we got a TARGET_WAITKIND_NO_RESUMED event, then the
		       previously selected thread is gone.  We have two
		       choices - switch to no thread selected, or restore the
		       previously selected thread (now exited).  We chose the
		       later, just because that's what GDB used to do.  After
		       this, "info threads" says "The current thread <Thread
		       ID 2> has terminated." instead of "No thread
		       selected.".  */
		    if (!non_stop
			&& cmd_done
			&& ecs->ws.kind () != TARGET_WAITKIND_NO_RESUMED)
		      restore_thread.dont_restore ();

	So in the end, inferior 1 stays current, and inferior 2 gets wrongfully
	pruned.

	I'd say clean_up_just_stopped_threads_fsms is the culprit here.  It
	actually attempts to restore the event_thread to be current at the end,
	after the loop (I presume the current thread on entry is always supposed
	to be the event thread).  But in this case, the event is of kind EXITED,
	and ecs->event_thread is not set, so the current inferior isn't
	restored.

	Fix that by using scoped_restore_current_thread.  If there is no current
	thread, scoped_restore_current_thread will still restore the current
	inferior, and that's what we want.

	Random note: the thread_info object for inferior 2's thread is never
	freed.  It is held (by refcount) by the restore_thread object in
	fetch_inferior_event, while the inferior's thread list gets cleared, in
	the exit event processing.  When the refcount reaches 0 (when the
	restore_thread object is destroyed), there's nothing that actually
	deletes the thread_info object.  And I think that nothing in GDB points
	to it anymore, so it leaks.  I don't want to fix that in this patch, but
	thought it would be good to mention it, in case somebody has an idea for
	how to fix that.

	Change-Id: Ibc7df543e2c46aad5f3b9250b28c3fb5912be4e8

2022-04-29  Pedro Alves  <pedro@palves.net>

	Slightly tweak and clarify target_resume's interface
	The current target_resume interface is a bit odd & non-intuitive.
	I've found myself explaining it a couple times the recent past, while
	reviewing patches that assumed STEP/SIGNAL always applied to the
	passed in PTID.  It goes like this today:

	  - if the passed in PTID is a thread, then the step/signal request is
	    for that thread.

	  - otherwise, if PTID is a wildcard (all threads or all threads of
	    process), the step/signal request is for inferior_ptid, and PTID
	    indicates which set of threads run free.

	Because GDB always switches the current thread to "leader" thread
	being resumed/stepped/signalled, we can simplify this a bit to:

	  - step/signal are always for inferior_ptid.

	  - PTID indicates the set of threads that run free.

	Still not ideal, but it's a minimal change and at least there are no
	special cases this way.

	That's what this patch does.  It renames the PTID parameter to
	SCOPE_PTID, adds some assertions to target_resume, and tweaks
	target_resume's description.  In addition, it also renames PTID to
	SCOPE_PTID in the remote and linux-nat targets, and simplifies their
	implementation a little bit.  Other targets could do the same, but
	they don't have to.

	Change-Id: I02a2ec2ab3a3e9b191de1e9a84f55c17cab7daaf

2022-04-29  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-28  Tom Tromey  <tromey@adacore.com>

	Fix libinproctrace.so build on PPC
	The recent gnulib import caused a build failure of libinproctrace.so
	on PPC:

	    alloc.c:(.text+0x20): undefined reference to `rpl_malloc'
	    alloc.c:(.text+0x70): undefined reference to `rpl_realloc'

	This patch fixes the problem using the same workaround that was
	previously used for free.

2022-04-28  H.J. Lu  <hjl.tools@gmail.com>

	x86: Properly handle function pointer reference
	Update

	commit ebb191adac4ab45498dec0bfaac62f0a33537ba4
	Author: H.J. Lu <hjl.tools@gmail.com>
	Date:   Wed Feb 9 15:51:22 2022 -0800

	    x86: Disallow invalid relocation against protected symbol

	to allow function pointer reference and make sure that PLT entry isn't
	used for function reference due to function pointer reference.

	bfd/

		PR ld/29087
		* elf32-i386.c (elf_i386_scan_relocs): Don't set
		pointer_equality_needed nor check non-canonical reference for
		function pointer reference.
		* elf64-x86-64.c (elf_x86_64_scan_relocs): Likewise.

	ld/

		PR ld/29087
		* testsuite/ld-x86-64/x86-64.exp: Run PR ld/29087 tests.
		* testsuite/ld-x86-64/protected-func-3.c: New file.

2022-04-28  Tom Tromey  <tom@tromey.com>

	Check OBJF_NOT_FILENAME in DWARF index code
	The DWARF index code currently uses 'stat' to see if an objfile
	represents a real file.  However, I think it's more correct to check
	OBJF_NOT_FILENAME instead.

	Regression tested on x86-64 Fedora 34.

2022-04-28  Tom Tromey  <tromey@adacore.com>

	Remove "typedef enum ..."
	I noticed a few spots in GDB that use "typedef enum".  However, in C++
	this isn't as useful, as the tag is automatically entered as a
	typedef.  This patch removes most uses of "typedef enum" -- the
	exceptions being in some nat-* code I can't compile, and
	glibc_thread_db.h, which I think is more or less a copy of some C code
	from elsewhere.

	Tested by rebuilding.

2022-04-28  Andrew Burgess  <aburgess@redhat.com>

	gdb: fix nullptr dereference in block::ranges()
	This commit:

	  commit f5cb8afdd297dd68273d98a10fbfd350dff918d8
	  Date:   Sun Feb 6 22:27:53 2022 -0500

	      gdb: remove BLOCK_RANGES macro

	introduces a potential nullptr dereference in block::ranges, this is
	breaking most tests, e.g. gdb.base/break.exp is failing for me.

	In the above patch BLOCK_CONTIGUOUS_P is changed from this:

	  #define BLOCK_CONTIGUOUS_P(bl)  (BLOCK_RANGES (bl) == nullptr \
	                                   || BLOCK_NRANGES (bl) <= 1)

	to this:

	  #define BLOCK_CONTIGUOUS_P(bl)  ((bl)->ranges ().size () == 0 \
	                                   || (bl)->ranges ().size () == 1)

	So, before the commit we checked for the block ranges being nullptr,
	but afterwards we just call block::ranges() in all cases.

	The problem is that block::ranges() looks like this:

	  /* Return a view on this block's ranges.  */
	  gdb::array_view<blockrange> ranges ()
	  { return gdb::make_array_view (m_ranges->range, m_ranges->nranges); }

	where m_ranges is:

	  struct blockranges *m_ranges;

	And so, we see that the nullptr check has been lost, and we might end
	up dereferencing a nullptr.

	My proposed fix is to move the nullptr check into block::ranges, and
	return an explicit empty array_view if m_ranges is nullptr.

	After this, everything seems fine again.

2022-04-28  Stefan Liebler  <stli@linux.ibm.com>

	s390: Add DT_JMPREL pointing to .rela.[i]plt with static-pie
	In static-pie case, there are IRELATIVE-relocs in
	.rela.iplt (htab->irelplt), which will later be grouped
	to .rela.plt.  On s390, the IRELATIVE relocations are
	always located in .rela.iplt - even for non-static case.
	Ensure that DT_JMPREL, DT_PLTRELA, DT_PLTRELASZ is added
	to the dynamic section even if htab->srelplt->size == 0.
	See _bfd_elf_add_dynamic_tags in bfd/elflink.c.

	bfd/
		elf64-s390.c (elf_s390_size_dynamic_sections):
		Enforce DT_JMPREL via htab->elf.dt_jmprel_required.

2022-04-28  Stefan Liebler  <stli@linux.ibm.com>

	s390: Avoid dynamic TLS relocs in PIE
	No dynamic relocs are needed for TLS defined in an executable, the
	TP relative offset is known at link time.

	Fixes
	FAIL: Build pr22263-1

	bfd/
		PR ld/22263
		* elf64-s390.c (elf_s390_tls_transition): Use bfd_link_dll
		instead of bfd_link_pic for TLS.
		(elf_s390_check_relocs): Likewise.
		(allocate_dynrelocs): Likewise.
		(elf_s390_relocate_section): Likewise.

2022-04-28  Nick Alcock  <nick.alcock@oracle.com>

	libctf: impose an ordering on conflicting types
	When two types conflict and they are not types which can have forwards
	(say, two arrays of different sizes with the same name in two different
	TUs) the CTF deduplicator uses a popularity contest to decide what to
	do: the type cited by the most other types ends up put into the shared
	dict, while the others are relegated to per-CU child dicts.

	This works well as long as one type *is* most popular -- but what if
	there is a tie?  If several types have the same popularity count,
	we end up picking the first we run across and promoting it, and
	unfortunately since we are working over a dynhash in essentially
	arbitrary order, this means we promote a random one.  So multiple
	runs of ld with the same inputs can produce different outputs!
	All the outputs are valid, but this is still undesirable.

	Adjust things to use the same strategy used to sort types on the output:
	when there is a tie, always put the type that appears in a CU that
	appeared earlier on the link line (and if there is somehow still a tie,
	which should be impossible, pick the type with the lowest type ID).

	Add a testcase -- and since this emerged when trying out extern arrays,
	check that those work as well (this requires a newer GCC, but since all
	GCCs that can emit CTF at all are unreleased this is probably OK as
	well).

	Fix up one testcase that has slight type ordering changes as a result
	of this change.

	libctf/ChangeLog:

		* ctf-dedup.c (ctf_dedup_detect_name_ambiguity): Use
		cd_output_first_gid to break ties.

	ld/ChangeLog:

		* testsuite/ld-ctf/array-conflicted-ordering.d: New test, using...
		* testsuite/ld-ctf/array-char-conflicting-1.c: ... this...
		* testsuite/ld-ctf/array-char-conflicting-2.c: ... and this.
		* testsuite/ld-ctf/array-extern.d: New test, using...
		* testsuite/ld-ctf/array-extern.c: ... this.
		* testsuite/ld-ctf/conflicting-typedefs.d: Adjust for ordering
		changes.

2022-04-28  Nick Alcock  <nick.alcock@oracle.com>

	libctf: add a comment explaining how to use ctf_*open
	Specifically, tell users what to pass to those functions that accept raw
	section content, since it's fairly involved and easy to get wrong.
	(.dynsym / .dynstr when CTF_F_DYNSTR is set, otherwise .symtab / .strtab).

	include/ChangeLog:

		* ctf-api.h (ctf_*open): Improve comment.

2022-04-28  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: test suite problems
	gprofng/ChangeLog
	2022-04-27  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		PR gprofng/29065
		* testsuite/lib/Makefile.skel: Search parent dir for libs too.

2022-04-28  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove BLOCKVECTOR_MAP macro
	Replace with equivalent methods.

	Change-Id: I4e56c76dfc363c1447686fb29c4212ea18b4dba0

2022-04-28  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: constify addrmap_find
	addrmap_find shouldn't need to modify the addrmap, so constify the
	addrmap parameter.  This helps for the following patch, where getting
	the map of a const blockvector will return a const addrmap.

	Change-Id: If670e425ed013724a3a77aab7961db50366dccb2

2022-04-28  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove BLOCKVECTOR_BLOCK and BLOCKVECTOR_NBLOCKS macros
	Replace with calls to blockvector::blocks, and the appropriate method
	call on the returned array_view.

	Change-Id: I04d1f39603e4d4c21c96822421431d9a029d8ddd

2022-04-28  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove BLOCK_ENTRY_PC macro
	Replace with equivalent method.

	Change-Id: I0e033095e7358799930775e61028b48246971a7d

2022-04-28  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove BLOCK_CONTIGUOUS_P macro
	Replace with an equivalent method.

	Change-Id: I60fd3be7b4c2601c2a74328f635fa48ed80eb7f5

2022-04-28  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove BLOCK_RANGE macro
	Replace with access through the block::ranges method.

	Change-Id: I50f3ed433b997c9f354e49bc6583f540ae4b6121

2022-04-28  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove BLOCK_NRANGES macro
	Replace with range for loops.

	Change-Id: Icbe04f9b6f9e6ddae2e15b2409c61f7a336bc3e3

2022-04-28  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove BLOCK_RANGES macro
	Replace with an equivalent method on struct block.

	Change-Id: I6dcf13e9464ba8a08ade85c89e7329c300fd6c2a

2022-04-28  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove BLOCK_RANGE_{START,END} macros
	Replace with equivalent methods on blockrange.

	Change-Id: I20fd8f624e0129782c36768291891e7582d77c74

2022-04-28  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove BLOCK_NAMESPACE macro
	Replace with equivalent methods.

	Change-Id: If86b8cbdfb0f52e22c929614cd53e73358bab76a

2022-04-28  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove BLOCK_MULTIDICT macro
	Replace with equivalent methods.

	Change-Id: If9a239c511a664f2a59fecb6d1cd579881b23dc2

2022-04-28  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove BLOCK_SUPERBLOCK macro
	Replace with equivalent methods.

	Change-Id: I334a319909a50b5cc5570a45c38c70e10dc00630

2022-04-28  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove BLOCK_FUNCTION macro
	Replace with equivalent methods.

	Change-Id: I31ec00f5bf85335c8b23d306ca0fe0b84d489101

2022-04-28  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove BLOCK_{START,END} macros
	Replace with equivalent methods.

	Change-Id: I10a6c8a2a86462d9d4a6a6409a3f07a6bea66310

2022-04-28  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-27  H.J. Lu  <hjl.tools@gmail.com>

	x86: Disable 2 tests with large memory requirement
	gas/

		* testsuite/gas/i386/i386.exp: Disable rept.

	ld/

		* testsuite/ld-x86-64/x86-64.exp: Disable pr17618.

2022-04-27  Pedro Alves  <pedro@palves.net>

	Make gdb.base/parse_number.exp test all architectures
	There are some subtle differences between architectures, like the size
	of a "long" type, and this isn't currently accounted for in
	gdb.base/parse_number.exp.

	For example, on aarch64 a long type is 8 bytes, whereas a long type is
	4 bytes for x86_64.  This causes the following FAIL's:

	 FAIL: gdb.base/parse_number.exp: lang=asm: ptype 0xffffffffffffffff
	 FAIL: gdb.base/parse_number.exp: lang=auto: ptype 0xffffffffffffffff
	 FAIL: gdb.base/parse_number.exp: lang=c: ptype 0xffffffffffffffff
	 FAIL: gdb.base/parse_number.exp: lang=c++: ptype 0xffffffffffffffff
	 FAIL: gdb.base/parse_number.exp: lang=fortran: p/x 0xffffffffffffffff
	 FAIL: gdb.base/parse_number.exp: lang=fortran: ptype 0xffffffffffffffff
	 FAIL: gdb.base/parse_number.exp: lang=go: ptype 0xffffffffffffffff
	 FAIL: gdb.base/parse_number.exp: lang=local: ptype 0xffffffffffffffff
	 FAIL: gdb.base/parse_number.exp: lang=minimal: ptype 0xffffffffffffffff
	 FAIL: gdb.base/parse_number.exp: lang=objective-c: ptype 0xffffffffffffffff
	 FAIL: gdb.base/parse_number.exp: lang=opencl: ptype 0xffffffffffffffff
	 FAIL: gdb.base/parse_number.exp: lang=pascal: ptype 0xffffffffffffffff

	There are some fortran-specific divergences as well, where 32-bit
	architectures show "unsigned int" for both 32-bit and 64-bit integers
	and 64-bit architectures show "unsigned int" and "unsigned long" for
	32-bit and 64-bit integers.

	There might be a bug that 32-bit fortran truncates 64-bit values to
	32-bit, given "p/x 0xffffffffffffffff" returns "0xffffffff".

	Here's what we get for aarch64:

	 (gdb) ptype 0xffffffff
	 type = unsigned int
	 (gdb) ptype 0xffffffffffffffff
	 type = unsigned long
	 (gdb) p sizeof (0xffffffff)
	 $1 = 4
	 (gdb) p sizeof (0xffffffffffffffff)
	 quit
	 $2 = 8
	 (gdb) ptype 0xffffffff
	 type = unsigned int
	 (gdb) ptype 0xffffffffffffffff
	 type = unsigned long

	And for arm:

	 (gdb) ptype 0xffffffff
	 type = unsigned int
	 (gdb) ptype 0xffffffffffffffff
	 quit
	 type = unsigned long long
	 (gdb) p sizeof (0xffffffff)
	 quit
	 $1 = 4
	 (gdb) p sizeof (0xffffffffffffffff)
	 quit
	 $2 = 8
	 (gdb) ptype 0xffffffff
	 type = unsigned int
	 (gdb) ptype 0xffffffffffffffff
	 type = unsigned long

	This patch...

	* Makes the testcase iterate over all architectures, thus covering all
	  the different combinations of types/sizes every time.

	* Adjusts the expected values and types based on the sizes of long
	  long, long and int.

	A particularly curious architecture is s12z, which has 32-bit long
	long, and thus no way to represent 64-bit integers in C-like
	languages.

	Co-Authored-By: Luis Machado <luis.machado@arm.com>
	Change-Id: Ifc0ccd33e7fd3c7585112ff6bebe7d266136768b

2022-04-27  Tom Tromey  <tromey@adacore.com>

	Fix gdbserver build for x86-64 Windows
	I broke the gdbserver build on x86-64 Windows a little while back.
	Previously, I could not build this configuration, but today I found
	out that if I configure with:

	    --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32

	using the Fedora 34 tools, it will in fact build.  I'm not certain,
	but maybe the gnulib update helped with this.

	This patch fixes the build.  I'm checking it in.

2022-04-27  John Baldwin  <jhb@FreeBSD.org>

	Create pseudo sections for NT_ARM_TLS notes on FreeBSD.
	bfd/ChangeLog:

		* elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_TLS notes.

2022-04-27  Christophe Lyon  <christophe.lyon@arm.com>

	gdb/arm: Extend arm_m_addr_is_magic to support FNC_RETURN, add unwind-secure-frames command
	This patch makes use of the support for several stack pointers
	introduced by the previous patch to switch between them as needed
	during unwinding.

	It introduces a new 'unwind-secure-frames' arm command to enable/disable
	mode switching during unwinding. It is enabled by default.

	It has been tested using an STM32L5 board (with cortex-m33) and the
	sample applications shipped with the STM32Cube development
	environment: GTZC_TZSC_MPCBB_TrustZone in
	STM32CubeL5/Projects/NUCLEO-L552ZE-Q/Examples/GTZC.

	The test consisted in setting breakpoints in various places and check
	that the backtrace is correct: SecureFault_Callback (Non-secure mode),
	__gnu_cmse_nonsecure_call (before and after the vpush instruction),
	SecureFault_Handler (Secure mode).

	This implies that we tested only some parts of this patch (only MSP*
	were used), but remaining parts seem reasonable.

2022-04-27  Christophe Lyon  <christophe.lyon@arm.com>

	gdb/arm: Add support for multiple stack pointers on Cortex-M
	Armv8-M architecture with Security extension features four stack pointers
	to handle Secure and Non-secure modes.

	This patch adds support to switch between them as needed during
	unwinding, and replaces all updates of cache->prev_sp with calls to
	arm_cache_set_prev_sp.

2022-04-27  Christophe Lyon  <christophe.lyon@arm.com>

	gdb/arm: Introduce arm_cache_init
	This patch is a preparation for the rest of the series and adds two
	arm_cache_init helper functions. It updates every place that updates
	cache->saved_regs to call the helper instead.

	gdb/arm: Define MSP and PSP registers for M-Profile
	This patch removes the hardcoded access to PSP in
	arm_m_exception_cache() and relies on the definition with the XML
	descriptions.

2022-04-27  Christophe Lyon  <christophe.lyon@arm.com>

	gdb/arm: Fix prologue analysis to support vpush
	While working on adding support for Non-secure/Secure modes unwinding,
	I noticed that the prologue analysis lacked support for vpush, which
	is used for instance in the CMSE stub routine.

	This patch updates thumb_analyze_prologue accordingly, adding support
	for vpush of D-registers.

2022-04-27  Enze Li  <lienze2010@hotmail.com>

	gdb/testsuite: fix FAIL in gdb.base/clear_non_user_bp.exp
	Tom and Simon feedback that there is a test failing in this commit:

	  commit a5c69b1e49bae4d0dcb20f324cebb310c63495c6
	  Date:   Sun Apr 17 15:09:46 2022 +0800

	    gdb: fix using clear command to delete non-user breakpoints(PR cli/7161)

	Then, I reproduced the same fail with Ubuntu 20.04 as Simon said, and I
	fixed the nit in this patch.  The root of the problem is not correctly
	matching the presentation of internal breakpoints.

	In addition, as Pedro pointed out, the original testcase is not portable
	in some methods, so this patch fixes this issue and some other
	improvements.

	Tested on x86_64 ubuntu 20.04.4 and openSUSE Tumbleweed(VERSION_ID="20220425").

2022-04-27  Jan Beulich  <jbeulich@suse.com>

	x86: VFPCLASSSH is Evex.LLIG
	This also was mistakenly flagged as Evex.128.

2022-04-27  Nick Clifton  <nickc@redhat.com>

	Fix potential buffer overruns when creating DLLs.
		PR 29006
		* pe-dll.c (make_head): Use asprintf to allocate and populate a
		buffer containing the temporary name.
		(make_tail, make_one, make_singleton_name_thunk): Likewise.
		(make_import_fixup_mark, make_import_fixup_entry): Likewise.
		(make_runtime_pseudo_reloc): Likewise.
		(pe_create_runtime_relocator_reference): Likewise.

2022-04-27  Alan Modra  <amodra@gmail.com>

	Revert pr29072 lto test changes
	Revert commit 65daf5bed6 testsuite changes in ld-plugin/.  -z isn't
	supported for non-ELF targets, and isn't needed since we now prune the
	exec stack warning (commit 333cd559ba).

		PR 29072

2022-04-27  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: use with_cwd where possible
	I learned about with_cwd today.  I spotted a few spots that could use
	it, to make the code more robust.

	Change-Id: Ia23664cb827f25e79d31948e0c006a8dc61c33e1

2022-04-27  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-26  Carl Love  <cel@us.ibm.com>

	GDB PowerPC record test cases for ISA 2.06 and ISA 3.1
	This patch adds PowerPC specific tests to verify recording of various
	instructions.  The first test case checks the ISA 2.06 lxvd2x instruction.
	The second test case tests several of the ISA 3.01 instructions.  Specifically,
	it checks the word and prefixed instructions and some of the Matrix
	Multiply Assist (MMA) instructions.

	The patch has been run on both Power 10 and Power 9 to verify the ISA
	2.06 test case runs on both platforms without errors.  The ISA 3.1 test
	runs without errors on Power 10 and is skipped as expected on Power 9.

2022-04-26  Carl Love  <cel@us.ibm.com>

	Add recording support for the ISA 3.1 PowerPC instructions.
	This patch adds support for the PowerPC ISA 3.1 instructions to the PowerPC
	gdb instruction recording routines.  Case statement entries are added to a
	number of the existing routines for recording the 32-bit word instructions.
	A few new functions were added to handle the new word instructions.  The 64-bit
	prefix instructions are all handled by a set of new routines.  The function
	ppc_process_prefix_instruction() is the primary function to handle the
	prefixed instructions. It calls additional functions to handle specific
	sets of prefixed instructions.  These new functions are:
	  ppc_process_record_prefix_vsx_d_form(),
	  ppc_process_record_prefix_store_vsx_ds_form(),
	  ppc_process_record_prefix_op34(),
	  ppc_process_record_prefix_op33(),
	  ppc_process_record_prefix_op32(),
	  ppc_process_record_prefix_store(),
	  ppc_process_record_prefix_op59_XX3(),
	  ppc_process_record_prefix_op42().

2022-04-26  Tom Tromey  <tromey@adacore.com>

	Handle encoding failures in Windows thread names
	Internally at AdaCore, we noticed that the new Windows thread name
	code could fail.  First, it might return a zero-length string, but in
	gdb conventions it should return nullptr instead.  Second, an encoding
	failure could wind up showing replacement characters to the user; this
	is confusing and not useful; it's better to recognize such errors and
	simply discard the name.  This patch makes both of these changes.

2022-04-26  H.J. Lu  <hjl.tools@gmail.com>

	i386: Pass -z noexecstack to linker tests
		PR ld/29072
		* testsuite/ld-i386/i386.exp: Pass -z noexecstack to gotpc1
		and property-6.

2022-04-26  John Baldwin  <jhb@FreeBSD.org>

	bsd-kvm: Fix build after recent changes to path handling functions.
	Convert bsd_kvm_corefile and the local filename in bsd_kvm_open to
	std::string rather than simple char * pointers freed by xfree.

2022-04-26  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: make some random Python files Python 3-compatible
	I noticed that these files failed to format with Black, because they use
	print without parenthesis (which isn't Python 3 compatible).

	I don't know if these files are still relevant, but the change is
	trivial, so here it is.

	Change-Id: I116445c2b463486016f824d32effffc915b60766

2022-04-26  Carl Love  <cel@us.ibm.com>

	PowerPC: Update expected floating point output for gdb.arch/altivec-regs.exp and gdb.arch/vsx-regs.exp
	The format for printing the floating point values was changed by commit:

	   commit 56262a931b7ca8ee3ec9104bc7e9e0b40cf3d64e
	   Author: Tom Tromey <tromey@adacore.com>
	   Date:   Thu Feb 17 13:43:59 2022 -0700

	       Change how "print/x" displays floating-point value

	       Currently, "print/x" will display a floating-point value by first
	       casting it to an integer type.  This yields weird results like:

	           (gdb) print/x 1.5
	           $1 = 0x1
	        ...
	        Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=16242

	The above change results in 417 regression test failures since the expected
	Power vector register output no longer match.

	This patch updates the expected Altivec floating point register prints to
	the hexadecimal format for both big endian and little endian systems.  The
	patch also fixes a formatting isue with the decimal_vector expected value
	assign statements.

	The expected VSX vector_register1, vector_register1_vr, vector_register2,
	vector_register2_vr variables are updated to include the new float128 entry.
	Additionally, the comment in the vsx expect file about the initialization
	of the vs registers is updated.

	The patch has been tested on Power 10, Power 8 LE and Power 8 BE.

2022-04-26  John Baldwin  <jhb@FreeBSD.org>

	gdbsupport/pathstuff.h: #include <array> explicitly for std::array<>
	This fixes build breakage using clang with libc++ on FreeBSD where
	std::array<> is not yet declared when used by the path_join variadic
	function template.

2022-04-26  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-25  Tom Tromey  <tromey@adacore.com>

	Do not put linkage names into .gdb_index
	This changes the .gdb_index writer to skip linkage names.  This was
	always done historically (though somewhat implicitly).

2022-04-25  Nick Clifton  <nickc@redhat.com>

	Emit a note warning the user that creating an executable stack because of a missing .note.GNU-stack section is deprecated.
		PR 29072
	bfd	* elflink.c (bfd_elf_size_dynamic_sections): Display a note to the
		user that the current ehaviour of creating an executable stack
		because of a missing .note.GNU-stack section is deprecated and
		will be changed in a future release.

	binutils* testsuite/lib/binutils-common.exp (prune_warnings_extra): Filter
		out notes about the executable stacjk behaviour beign deprecated.

	ld	* testsuite/ld-elf/pr29072.b.warn: Update to include the note
		about the linker's behaviour being depreccated.

2022-04-25  rupothar  <rupesh.potharla@amd.com>

	gdb/fortran: Support for assumed rank zero
	If a variable is passed to function in FORTRAN as an argument the
	variable is treated as an array with rank zero.  GDB currently does
	not support the case for assumed rank 0.  This patch provides support
	for assumed rank 0 and updates the testcase as well.

	Without patch:
	Breakpoint 1, arank::sub1 (a=<error reading variable:
	  failed to resolve dynamic array rank>) at assumedrank.f90:11
	11       PRINT *, RANK(a)
	(gdb) p a
	failed to resolve dynamic array rank
	(gdb) p rank(a)
	failed to resolve dynamic array rank

	With patch:
	Breakpoint 1, arank::sub1 (a=0) at assumedrank.f90:11
	11       PRINT *, RANK(a)
	(gdb) p a
	$1 = 0
	(gdb) p rank(a)
	$2 = 0

2022-04-25  Lancelot SIX  <lancelot.six@amd.com>

	gdb/infrun: assert !step_over_info_valid_p in restart_threads
	While working in gdb/infrun.c:restart_threads, I was wondering what are
	the preconditions to call the function.  It seems to me that
	!step_over_info_valid_p should be a precondition (i.e. if we are doing
	an inline step over breakpoint, we do not want to resume non stepping
	threads as one of them might miss the breakpoint which is temporally
	disabled).

	To convince myself that this is true, I have added an assertion to
	enforce this, and got one regression in the testsuite:

	    FAIL: gdb.base/step-over-syscall.exp: vfork: displaced=off: single step over vfork (GDB internal error)

	This call to restart_threads originates from handle_vfork_done which
	does not check if a step over is active when restarting other threads:

	    if (target_is_non_stop_p ())
	      {
	        scoped_restore_current_thread restore_thread;

	        insert_breakpoints ();
	        restart_threads (event_thread, event_thread->inf);
	        start_step_over ();
	      }

	In this patch, I propose to:
	- Call start_step_over before restart_threads.  If a step over is already
	  in progress (as it is the case in the failing testcase),
	  start_step_over return immediately, and there is no point in restarting
	  all threads just to stop them right away for a step over breakpoint.
	- Only call restart_threads if no step over is in progress at this
	  point.

	In this patch, I also propose to keep the assertion in restart_threads
	to help enforce this precondition, and state it explicitly.

	I have also checked all other places which call restart_threads, and
	they all seem to check that there is no step over currently active
	before doing the call.

	As for infrun-related things, I am never completely sure I did not miss
	something.  So as usual, all feedback and thoughts are very welcome.

	Tested on x86_64-linux-gnu.

	Change-Id: If5f5f98ec4cf9aaeaabb5e3aa88ae6ffd70d4f37

2022-04-25  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-24  Andrew Burgess  <aburgess@redhat.com>

	gdb: move setbuf calls out of gdb_readline_no_editing_callback
	After this commit:

	  commit d08cbc5d3203118da5583296e49273cf82378042
	  Date:   Wed Dec 22 12:57:44 2021 +0000

	      gdb: unbuffer all input streams when not using readline

	Issues were reported with some MS-Windows hosts, see the thread
	starting here:

	  https://sourceware.org/pipermail/gdb-patches/2022-March/187004.html

	Filed in bugzilla as: PR mi/29002

	The problem seems to be that calling setbuf on terminal file handles
	is not always acceptable, see this mail for more details:

	  https://sourceware.org/pipermail/gdb-patches/2022-April/187310.html

	This commit does two things, first moving the setbuf calls out of
	gdb_readline_no_editing_callback so that we don't end up calling
	setbuf so often.

	Then, for MS-Windows hosts, we don't call setbuf for terminals, this
	appears to resolve the issues that have been reported.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29002

2022-04-24  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-23  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-22  Simon Marchi  <simon.marchi@efficios.com>

	gdb: handle_no_resumed: only update thread list of event target
	When running:

	    $ make check TESTS="gdb.multi/multi-re-run.exp" RUNTESTFLAGS="--target_board=native-gdbserver"

	I get:

	    target remote localhost:2347^M
	    Remote debugging using localhost:2347^M
	    Reading symbols from /lib64/ld-linux-x86-64.so.2...^M
	    Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/ld-2.31.so...^M
	    0x00007ffff7fd0100 in _start () from /lib64/ld-linux-x86-64.so.2^M
	    (gdb) continue^M
	    Continuing.^M
	    Cannot execute this command while the target is running.^M
	    Use the "interrupt" command to stop the target^M
	    and then try again.^M
	    (gdb) FAIL: gdb.multi/multi-re-run.exp: re_run_inf=1: iter=1: runto: run to all_started

	The test does:

	 - Connect to a remote target with inferior 2, continue and stop on the
	   all_started function
	 - Connect to a separate remote target / GDBserver instance with inferior 1,
	   continue and (expect to) stop on the all_started function

	The failure seen above happens when trying to continue inferior 1.

	What happens is:

	 - GDB tells inferior 1's remote target to continue
	 - We go into fetch_inferior_event, try to get an event at random from
	   the targets
	 - do_target_wait happens to pick inferior 2's target
	 - That target return TARGET_WAITKIND_NO_RESUMED, which makes sense:
	   inferior 2 is stopped, that target has no resumed thread
	 - handle_no_resumed tries to update the thread list of all targets:

	   for (auto *target : all_non_exited_process_targets ())
	     {
	       switch_to_target_no_thread (target);
	       update_thread_list ();
	     }

	 - When trying to update the thread list of inferior 1's target, it hits
	   the "Cannot execute this command while the target is running" error.
	   This target is working in "remote all-stop" mode, and it is currently
	   waiting for a stop reply, so it can't send packets to update the
	   thread list at this time.

	To handle the problem described in the comment in handle_no_resumed, I
	don't think it is necessary to update the thread list of all targets,
	but only the event target.  That comment describes a kind of race
	condition where some target reports a breakpoint hit for a thread and
	then its last remaining resumed thread exits, so sends a "no resumed"
	event.  If we ended up resuming the thread that hit a breakpoint, we
	want to ignore the "no resumed" and carry on.

	But I don't really see why we need to update the thread list on the
	other targets.  I can't really articulate this, it's more a gut feeling,
	maybe I just fail to imagine the situation where this is needed.  But
	here is the patch anyway, so we can discuss it.  The patch changes
	handle_no_resumed to only update the thread list of the event target.
	This fixes the test run shown above.

	The way I originally tried to fix this was to make
	remote_target::update_thread_list return early if the target is
	currently awaiting a stop reply, since there's no way it can update the
	thread list at that time.  But that felt more like papering over the
	problem.  I then thought that we probably shouldn't be asking the target
	to update the thread list unnecessarily.

	Change-Id: Ide3df22b4f556478e155ad1c67ad4b4fe7c26a58

2022-04-22  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbserver/linux: free process_info_private and arch_process_info when failing to attach
	Running

	  $ ../gdbserver/gdbserver --once --attach :1234 539436

	with ASan while /proc/sys/kernel/yama/ptrace_scope is set to 1 (prevents
	attaching) shows that we fail to free some platform-specific objects
	tied to the process_info (process_info_private and arch_process_info):

	    Direct leak of 32 byte(s) in 1 object(s) allocated from:
	        #0 0x7f6b558b3fb9 in __interceptor_calloc /usr/src/debug/gcc/libsanitizer/asan/asan_malloc_linux.cpp:154
	        #1 0x562eaf15d04a in xcalloc /home/simark/src/binutils-gdb/gdbserver/../gdb/alloc.c:100
	        #2 0x562eaf251548 in xcnew<process_info_private> /home/simark/src/binutils-gdb/gdbserver/../gdbsupport/poison.h:122
	        #3 0x562eaf22810c in linux_process_target::add_linux_process_no_mem_file(int, int) /home/simark/src/binutils-gdb/gdbserver/linux-low.cc:426
	        #4 0x562eaf22d33f in linux_process_target::attach(unsigned long) /home/simark/src/binutils-gdb/gdbserver/linux-low.cc:1132
	        #5 0x562eaf1a7222 in attach_inferior /home/simark/src/binutils-gdb/gdbserver/server.cc:308
	        #6 0x562eaf1c1016 in captured_main /home/simark/src/binutils-gdb/gdbserver/server.cc:3949
	        #7 0x562eaf1c1d60 in main /home/simark/src/binutils-gdb/gdbserver/server.cc:4084
	        #8 0x7f6b552f630f in __libc_start_call_main (/usr/lib/libc.so.6+0x2d30f)

	    Indirect leak of 56 byte(s) in 1 object(s) allocated from:
	        #0 0x7f6b558b3fb9 in __interceptor_calloc /usr/src/debug/gcc/libsanitizer/asan/asan_malloc_linux.cpp:154
	        #1 0x562eaf15d04a in xcalloc /home/simark/src/binutils-gdb/gdbserver/../gdb/alloc.c:100
	        #2 0x562eaf2a0d79 in xcnew<arch_process_info> /home/simark/src/binutils-gdb/gdbserver/../gdbsupport/poison.h:122
	        #3 0x562eaf295e2c in x86_target::low_new_process() /home/simark/src/binutils-gdb/gdbserver/linux-x86-low.cc:723
	        #4 0x562eaf22819b in linux_process_target::add_linux_process_no_mem_file(int, int) /home/simark/src/binutils-gdb/gdbserver/linux-low.cc:428
	        #5 0x562eaf22d33f in linux_process_target::attach(unsigned long) /home/simark/src/binutils-gdb/gdbserver/linux-low.cc:1132
	        #6 0x562eaf1a7222 in attach_inferior /home/simark/src/binutils-gdb/gdbserver/server.cc:308
	        #7 0x562eaf1c1016 in captured_main /home/simark/src/binutils-gdb/gdbserver/server.cc:3949
	        #8 0x562eaf1c1d60 in main /home/simark/src/binutils-gdb/gdbserver/server.cc:4084
	        #9 0x7f6b552f630f in __libc_start_call_main (/usr/lib/libc.so.6+0x2d30f)

	Those objects are deleted by linux_process_target::mourn, but that is
	not called if we fail to attach, we only call remove_process.  I
	initially fixed this by making linux_process_target::attach call
	linux_process_target::mourn on failure (before calling error).  But this
	isn't done anywhere else (including in GDB) so it would just be
	confusing to do things differently here.

	Instead, add a linux_process_target::remove_linux_process helper method
	(which calls remove_process), and call that instead of remove_process in
	the Linux target.  Move the free-ing of the extra data from the mourn
	method to that new method.

	Change-Id: I277059a69d5f08087a7f3ef0b8f1792a1fcf7a85

2022-04-22  Andrew Burgess  <aburgess@redhat.com>

	gdb: handle bracketed-paste-mode and EOF correctly
	This commit replaces an earlier commit that worked around the issues
	reported in bug PR gdb/28833.

	The previous commit just implemented a work around in order to avoid
	the worst results of the bug, but was not a complete solution.  The
	full solution was considered too risky to merge close to branching GDB
	12.  This improved fix has been applied after GDB 12 branched.  See
	this thread for more details:

	  https://sourceware.org/pipermail/gdb-patches/2022-March/186391.html

	This commit replaces this earlier commit:

	  commit 74a159a420d4b466cc81061c16d444568e36740c
	  Date:   Fri Mar 11 14:44:03 2022 +0000

	      gdb: work around prompt corruption caused by bracketed-paste-mode

	Please read that commit for a full description of the bug, and why is
	occurs.

	In this commit I extend GDB to use readline's rl_deprep_term_function
	hook to call a new function gdb_rl_deprep_term_function.  From this
	new function we can now print the 'quit' message, this replaces the
	old printing of 'quit' in command_line_handler.  Of course, we only
	print 'quit' in gdb_rl_deprep_term_function when we are handling EOF,
	but thanks to the previous commit (to readline) we now know when this
	is.

	There are two aspects of this commit that are worth further
	discussion, the first is in the new gdb_rl_deprep_term_function
	function.  In here I have used a scoped_restore_tmpl to disable the
	readline global variable rl_eof_found.

	The reason for this is that, in rl_deprep_terminal, readline will
	print an extra '\n' character before printing the escape sequence to
	leave bracketed paste mode.  You might then think that in the
	gdb_rl_deprep_term_function function, we could simply print "quit" and
	rely on rl_deprep_terminal to print the trailing '\n'.  However,
	rl_deprep_terminal only prints the '\n' when bracketed paste mode is
	on.  If the user has turned this feature off, no '\n' is printed.
	This means that in gdb_rl_deprep_term_function we need to print
	"quit" when bracketed paste mode is on, and "quit\n" when bracketed
	paste mode is off.

	We could absolutely do that, no problem, but given we know how
	rl_deprep_terminal is implemented, it's easier (I think) to just
	temporarily clear rl_eof_found, this prevents the '\n' being printed
	from rl_deprep_terminal, and so in gdb_rl_deprep_term_function, we can
	now always print "quit\n" and this works for all cases.

	The second issue that should be discussed is backwards compatibility
	with older versions of readline.  GDB can be built against the system
	readline, which might be older than the version contained within GDB's
	tree.  If this is the case then the system readline might not contain
	the fixes needed to support correctly printing the 'quit' string.

	To handle this situation I have retained the existing code in
	command_line_handler for printing 'quit', however, this code is only
	used now if the version of readline we are using doesn't not include
	the required fixes.  And so, if a user is using an older version of
	readline, and they have bracketed paste mode on, then they will see
	the 'quit' sting printed on the line below the prompt, like this:

	  (gdb)
	  quit

	I think this is the best we can do when someone builds GDB against an
	older version of readline.

	Using a newer version of readline, or the patched version of readline
	that is in-tree, will now give a result like this in all cases:

	  (gdb) quit

	Which is what we want.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28833

2022-04-22  Andrew Burgess  <aburgess@redhat.com>

	readline: back-port changes needed to properly detect EOF
	This commit is a partial back-port of this upstream readline commit:

	  commit 002d31aa5f5929eb32d0e0e2e8b8d35d99e59961
	  Author: Chet Ramey <chet.ramey@case.edu>
	  Date:   Thu Mar 3 11:11:47 2022 -0500

	      add rl_eof_found to public API; fix pointer aliasing problems  \
	            with history-search-backward; fix a display problem with \
	            runs of invisible characters at the end of a physical    \
	            screen line

	I have only pulled in the parts of this commit that relate to the new
	rl_eof_found global, and the RL_STATE_EOF state flag.  These changes
	are needed in order to fix PR cli/28833, and are discussed in this
	thread to the bug-readline mailing list:

	  https://lists.gnu.org/archive/html/bug-readline/2022-02/msg00021.html

	The above commit is not yet in any official readline release, but my
	hope is that now it has been merged into the readline tree it should
	be safe enough to back port this fix to GDB's tree.

	At some point in the future we will inevitably want to roll forward
	the version of readline that we maintain in the binutils-gdb
	repository.  When that day comes the changes in this commit can be
	replaced with the latest upstream readline code, as I have not changed
	the meaning of this code at all from what is in upstream readline.

	This commit alone does not fix the PR cli/28833 issue, for that see
	the next commit, which changes GDB itself.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28833

2022-04-22  Andrew Burgess  <aburgess@redhat.com>

	gdb: improved EOF handling when using readline 7
	In this commit:

	  commit a6b413d24ccc5d76179bab866834e11fd6fec294
	  Date:   Fri Mar 11 14:44:03 2022 +0000

	      gdb: work around prompt corruption caused by bracketed-paste-mode

	a change was made to GDB to work around bug PR gdb/28833.  The
	consequence of this work around is that, when bracketed paste mode is
	enabled in readline, and GDB is quit by sending EOF, then the output
	will look like this:

	  (gdb)
	  quit

	The ideal output, which is what we get when bracketed paste mode is
	off, is this:

	  (gdb) quit

	The reason we need to make this change is explained in the original
	commit referenced above.  What isn't mentioned in the above commit, is
	that the change that motivated this work around was only added in
	readline 8, older versions of readline don't require the change.

	In later commits in this series I will add a fix to GDB's in-tree copy
	of readline (this fix is back-ported from upstream readline), and then
	I will change GDB so that, when using the (patched) in-tree readline,
	we can have the ideal output in all cases.

	However, GDB can be built against the system readline.  When this is
	done, and the system readline is version 8, then we will still have to
	use the work around (two line) style output.

	But, if GDB is built against the system readline, and the system
	readline is an older version 7 readline, then there's no reason why we
	can't have the ideal output, after all, readline 7 doesn't include the
	change that we need to work around.

	This commit changes GDB so that, when using readline 7 we get the
	ideal output in all cases.  This change is trivial (a simple check
	against the readline version number) so I think this should be fine to
	include.

	For testing this commit, you need to configure GDB including the
	'--with-system-readline' flag, and build GDB on a system that uses
	readline 7, for example 'Ubuntu 18.04'.  Then run the test
	'gdb.base/eof-exit.exp', you should expect everything to PASS.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28833

2022-04-22  Simon Marchi  <simon.marchi@efficios.com>

	gdb: prune inferiors at end of fetch_inferior_event, fix intermittent failure of gdb.threads/fork-plus-threads.exp
	This test sometimes fail like this:

	    info threads^M
	      Id   Target Id         Frame ^M
	      11.12 process 2270719   Couldn't get registers: No such process.^M
	    (gdb) FAIL: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: no threads left
	    [Inferior 11 (process 2270719) exited normally]^M
	    info inferiors^M
	      Num  Description       Connection           Executable        ^M
	    * 1    <null>                                 /home/smarchi/build/binutils-gdb/gdb/testsuite/outputs/gdb.threads/fork-plus-threads/fork-plus-threads ^M
	      11   <null>                                 /home/smarchi/build/binutils-gdb/gdb/testsuite/outputs/gdb.threads/fork-plus-threads/fork-plus-threads ^M
	    (gdb) FAIL: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: only inferior 1 left (the program exited)

	I can get it to fail quite reliably by pinning it to a core:

	  $ taskset -c 5 make check TESTS="gdb.threads/fork-plus-threads.exp"

	The previous attempt at fixing this was:

	  https://sourceware.org/pipermail/gdb-patches/2021-October/182846.html

	What we see is part due to a possible unfortunate ordering of events
	given by the kernel, and what could be considered a bug in GDB.

	The test program makes a number of forks, waits them all, then exits.
	Most of the time, GDB will get and process the exit event for inferior 1
	after the exit events of all the children.  But this is not guaranteed.
	After the last child exits and is waited by the parent, the parent can
	exit quickly, such that GDB collects from the kernel the exit events for
	the parent and that child at the same time.  It then chooses one event
	at random, which can be the event for the parent.  This will result in
	the parent appearing to exit before its child.  There's not much we can
	do about it, so I think we have to adjust the test to cope.

	After expect has seen the "exited normally" notification for inferior 1,
	it immediately does an "info thread" that it expects to come back empty.
	But at this point, GDB might not have processed inferior 11's (the last
	child) exit event, so it will look like there is still a thread.  Of
	course that thread is dead, we just don't know it yet.  But that makes
	the "no thread" test fail.  If the test waited just a bit more for the
	"exited normally" notification for inferior 11, then the list of threads
	would be empty.

	So, first change, make the test collect all the "exited normally"
	notifications for all inferiors before proceeding, that should ensure we
	see an empty thread list.  That would fix the first FAIL above.

	However, we would still have the second FAIL, as we expect inferior 11
	to not be there, it should have been deleted automatically.  Inferior 11
	is normally deleted when prune_inferiors is called.  That is called by
	normal_stop, which is only called by fetch_inferior_event only if the
	event thread completed an execution command FSM (thread_fsm).  But the
	FSM for the continue command completed when inferior 1 exited.  At that
	point inferior 11 was not prunable, as it still had a thread.  When
	inferior 11 exits, prune_inferiors is not called.

	I think that can be considered a GDB bug.  From the user point of view,
	there's no reason why in one case inferior 11 would be deleted and not
	in the other case.

	This patch makes the somewhat naive change to call prune_inferiors in
	fetch_inferior_event, so that it is called in this case.  It is placed
	at this particular point in the function so that it is called after the
	user inferior / thread selection is restored.  If it was called before
	that, inferior 11 wouldn't be pruned, because it would still be the
	current inferior.

	Change-Id: I48a15d118f30b1c72c528a9f805ed4974170484a
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=26272

2022-04-22  Tom Tromey  <tromey@adacore.com>

	Un-break the coff-pe-read.c build
	This fixes a build breakage in my recent coff-pe-read.c change.

	I'm sorry about this.  I don't understand how it happened, because I
	definitely built and tested the series on Windows, and I didn't change
	it before pushing.  Something must have gone wrong on the Windows
	build, but I don't know what.  I'll investigate and and re-test to be
	sure.

2022-04-22  Tom Tromey  <tromey@adacore.com>

	More const use and alloca avoidance in coff-pe-read.c
	This changes another function in coff-pe-read.c to use 'const' more,
	and to avoid the use of alloca by instead using std::string.

	Use std::string in coff-pe-read.c
	coff-pe-read.c uses xsnprintf and alloca, but using std::string is
	better, and just as easy.  In general I think alloca is something to
	be avoided, and unbounded uses especially so.

	Remove a const-removing cast from coff-pe-read.c
	coff-pe-read.c casts away const at one spot, but this is easily
	replaced by calling bfd_get_filename directly in a couple of debugging
	prints.

	Simplify BFD section iteration in coff-pe-read.c
	coff-pe-read.c iterates over BFD sections using bfd_map_over_sections,
	but it's much simpler to use a for-each loop.  This allows for the
	removal of helper functions and types.

2022-04-22  Tom Tromey  <tromey@adacore.com>

	Fix method naming bug in new DWARF indexer
	Pedro pointed out that gdb-add-index is much slower with the new DWARF
	indexer.  He also noticed that, in some cases, the generated
	.gdb_index would have the wrong fully-qualified name for a method.

	I tracked this down to a bug in the indexer.  If a type could have
	methods but was marked as a declaration, the indexer was ignoring it.
	However, this meant that the internal map to find the qualified name
	was not updated for this container.

2022-04-22  Christoph Muellner  <cmuellner@gcc.gnu.org>

	RISC-V: Add missing DECLARE_INSNs for Zicbo{m,p,z}
	The recently added support for the Zicbo{m,p,z} extensions did not
	include DECLARE_INSN() declarations for the instructions.
	These declarations are needed by GDB's instruction detection code.
	This patch adds them.

2022-04-22  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-21  Carl Love  <cel@us.ibm.com>

	Fix for gdb.base/solib-search.exp test.
	The variable right_lib_flags is not being set correctly to define RIGHT.
	The value RIGHT is needed to force the address of the library functions
	lib1_func3 and lib2_func4 to occur at different address in the wrong and
	right libraries.

	With RIGHT defined correctly, functions lib1_func3 and lib2_func4 occur
	at different addresses the test runs correctly on Powerpc.

	The test needs the lib2 addresses to be different in the right and
	wrong cases.  That is the point of introducing function lib2_spacer
	with the ifdef RIGHT compiler directive.

	On Intel, the ARRAY_SIZE of 1 versus 8192 is sufficient to get the
	dynamic linker to move the addresses of the library.  You can also get
	the same effect on PowerPC but you must use a value much larger than
	8192.

	The key thing is that the test was not properly setting RIGHT to
	defined to get the lib2_spacer function on Intel and Powerpc.

	Without the patch, we have the Intel backtrace for the bad libraries:

	backtrace
	#0  break_here () at /home/ ... /gdb/testsuite/gdb.base/solib-search.c:30
	#1  0x00007ffff7fae156 in ?? ()
	#2  0x00007fffffffc150 in ?? ()
	#3  0x00007ffff7fbb156 in ?? ()
	#4  0x00007fffffffc160 in ?? ()
	#5  0x00007ffff7fae146 in ?? ()
	#6  0x00007fffffffc170 in ?? ()
	#7  0x00007ffff7fbb146 in ?? ()
	#8  0x00007fffffffc180 in ?? ()
	#9  0x0000555555555156 in main () at /home/ ... /binutils-gdb/gdb/testsuite/gdb.base/solib-search.c:23
	Backtrace stopped: previous frame inner to this frame (corrupt stack?)
	(gdb) PASS: gdb.base/solib-search.exp: backtrace (with wrong libs) (data collection)

	The backtrace on Intel with the good libraries is:

	backtrace
	#0  break_here () at /.../binutils-gdb/gdb/testsuite/gdb.base/solib-search.c:30
	#1  0x00007ffff7fae156 in lib2_func4 () at /.../binutils-gdb/gdb/testsuite/gdb.base/solib-search-lib2.c:49
	#2  0x00007ffff7fbb156 in lib1_func3 () at /.../gdb.base/solib-search-lib1.c:49
	#3  0x00007ffff7fae146 in lib2_func2 () at /.../testsuite/gdb.base/solib-search-lib2.c:30
	#4  0x00007ffff7fbb146 in lib1_func1 () at /.../gdb.base/solib-search-lib1.c:30
	#5  0x0000555555555156 in main () at /...solib-search.c:23
	(gdb) PASS: gdb.base/solib-search.exp: backtrace (with right libs) (data collection)
	PASS: gdb.base/solib-search.exp: backtrace (with right libs)

	In one case the backtrace is correct and the other it
	is wrong on Intel.  This is due to the fact that the ARRAY_SIZE caused
	the dynamic linker to move the library function addresses around.  I
	believe it has to do with the default size of the data and code
	sections used by the dynamic linker.

	So without the patch the backtrace on PowerPC looks like:

	 backtrace
	#0  break_here () at /.../solib-search.c:30
	#1  0x00007ffff7f007f4 in lib2_func4 () at /.../solib-search-lib2.c:49
	#2  0x00007ffff7f307f4 in lib1_func3 () at /.../solib-search-lib1.c:49
	#3  0x00007ffff7f007ac in lib2_func2 () at /.../solib-search-lib2.c:30
	#4  0x00007ffff7f307ac in lib1_func1 () at /.../solib-search-lib1.c:30
	#5  0x000000001000074c in main () at /.../solib-search.c:23

	for both the good and bad libraries.

	The patch fixes defining RIGHT in solib-search-lib1.c and solib-search-
	lib2.c.  Note, without the patch the lib1_spacer and lib2_spacer
	functions do not show up in the object dump of the Intel or Powerpc
	libraries as it should.  The patch fixes that by making sure RIGHT gets
	defined.

	Now with the patch the backtrace for the bad library on PowerPC looks
	like:

	backtrace
	#0  break_here () at /.../solib-search.c:30
	#1  0x00007ffff7f0083c in __glink_PLTresolve () from /.../solib-search-lib2.so
	Backtrace stopped: frame did not save the PC

	And the backtrace for the good libraries on PowerPC looks like:

	backtrace
	#0  break_here () at /.../solib-search.c:30
	#1  0x00007ffff7f0083c in lib2_func4 () at /.../solib-search-lib2.c:49
	#2  0x00007ffff7f3083c in lib1_func3 () at /.../solib-search-lib1.c:49
	#3  0x00007ffff7f007cc in lib2_func2 () at /.../solib-search-lib2.c:30
	#4  0x00007ffff7f307cc in lib1_func1 () at /.../solib-search-lib1.c:30
	#5  0x000000001000074c in main () at /.../solib-search.c:23
	(gdb) PASS: gdb.base/solib-search.exp: backtrace (with right libs) (data collection)
	PASS: gdb.base/solib-search.exp: backtrace (with right libs)

	The issue then is on Power where the ARRAY_SIZE of 1 versus 8192 is not
	sufficient to cause the dymanic linker to allocate the libraries at
	different addresses.  I don't claim to understand the specifics of how
	the dynamic linker works and what the default size is for the data and
	code sections are.  My guess is by default PowerPC allocates a larger
	data size by default, which is large enough to hold array[8192].  The
	default size of the data section allocated by the dynamic linker on
	Intel is not large enough to hold array[8192] thus causing the code
	section on Intel to have to move when the large array is defined.

	Note on PowerPC, if you make ARRAY_SIZE big enough, then you will cause
	the library addresses to occur at different addresses as the larger
	data section forces the code section to a different address.  That was
	actually my original fix for the program until I spoke with Doug Evans
	who originally wrote the test.  Doug noticed that RIGHT was not getting
	defined as he originally intended in the test.

	With the patch to fix the definition of RIGHT, PowerPC has a bad and a
	good backtrace because the address of lib1_func3 and lib2_func4 both
	move because lib1_spacer and lib2_spacer are now defined
	before lib1_func3 and lib2_func4.

	Without the patch, the lib1_spacer and lib2_spacer function doesn't show
	up in the binary for the correct or incorrect library on Intel or PowerPC.
	With the patch, RIGHT gets defined as originally intended for the test on
	both architectures and lib1_spacer and lib2_spacer function show up in the
	binaries on both architectures changing the other function addresses as
	intended thus causing the test work as intended on PowerPC.

2022-04-21  Simon Marchi  <simon.marchi@efficios.com>

	gdb/dwarf: remove line_header::header_length field
	This can be a local in dwarf_decode_line_header.

	Change-Id: I2ecf4616d1a3197bd1e81ded9f999a2da9a685af

2022-04-21  Simon Marchi  <simon.marchi@efficios.com>

	gdb/dwarf: remove line_header::total_length field
	This doesn' have to be a field, it can simply be a local variable in
	dwarf_decode_line_header.  Name the local variable "unit_length", since
	that's what the field in called in DWARF 4 and 5.  It's always easier to
	follow the code with the standard on the side when we use the same
	terminology.

	Change-Id: I3ad1022afd9410b193ea11b9b5437686c1e4e633

2022-04-21  Simon Marchi  <simon.marchi@efficios.com>

	gdb/testsuite: fix "set temporary breakpoint" DUPLICATEs
	Commit c67f4e538 ("gdb/testsuite: make gdb.ada/mi_prot.exp stop at
	expected location") introduced some DUPLICATEs in MI tests using
	mi_continue_to_line, for example:

	    DUPLICATE: gdb.ada/mi_ref_changeable.exp: mi_continue_to_line: set temporary breakpoint

	These test names were previously differentiated by the location passed
	to mi_continue_to_line.  Since the location can contain a path, that
	commit removed the location from the test name, in favor of a hardcoded
	string "set temporary breakpoint", hence removing the differentiator.

	mi_continue_to_line receives a "test" parameter, containing a test
	name.  Add a "with_test_prefix" with that name, so that all tests
	recorded during mi_continue_to_line have this in their name.

	mi_continue_to_line passes that "test" string to mi_get_stop_line, that
	is a bit superfluous.  mi_get_stop_line only uses that string in case of
	failures (it doesn't record a pass if everything goes fine).  Since it's
	not crucial, just remove it, and adjust all callers.

	Adjust three gdb.mi/mi-var-*.exp tests to use prefixes to differentiate
	the multiple calls to mi_run_inline_test (which calls
	mi_continue_to_line).

	Change-Id: I511c6caa70499f8657b1cde37d71068d74d56a74

2022-04-21  Tom Tromey  <tromey@adacore.com>

	Always use dwarf2_initialize_objfile
	Internally we noticed that some tests would fail like so on Windows:

	warning: Section .debug_aranges in [...] has duplicate debug_info_offset 0x0, ignoring .debug_aranges.

	Debugging showed that, in fact, a second CU was being created at this
	offset.  We tracked this down to the fact that, while the ELF reader
	is careful to re-use the per-BFD data, other readers are not, and
	could re-read the DWARF data multiple times.

	However, since the change to allow an objfile to have multiple "quick
	symbol" implementations, there's no reason for this approach -- it's
	safe and easy for all symbol readers to reuse the per-BFD data when
	reading DWARF.

	This patch implements this idea, simplifying dwarf2_build_psymtabs and
	making it private, and then switching to dwarf2_initialize_objfile as
	the sole way to start the DWARF reader.

	Note that, while I think the call to dwarf2_build_frame_info in
	machoread.c is also obsolete, I haven't attempted to remove it here.

2022-04-21  Andrew Burgess  <aburgess@redhat.com>

	gdb: fix 'remote show FOO-packet' aliases
	The following behaviour was observed in GDB:

	  (gdb) show remote X-packet
	  Support for the `p' packet is auto-detected, currently unknown.

	Note the message mentions the 'p' packet.  This is a regression since
	this commit:

	  commit 8579fd136a614985bd27f20539c7bb7c5a51287d
	  Date:   Mon Nov 8 14:58:46 2021 +0000

	      gdb/gdbsupport: make xstrprintf and xstrvprintf return a unique_ptr

	Before this commit the behaviour was:

	  (gdb) show remote X-packet
	  Support for the `X' packet is auto-detected, currently unknown.

	The problem was caused by a failed attempt to ensure that some
	allocated strings were deleted when GDB exits.  The code in the above
	commit attempted to make use of 'static' to solve this problem,
	however, the solution was just wrong.

	In this new commit I instead allocate a static vector into which all
	the allocated strings are stored, this ensures the strings are
	released when GDB exits (which makes output from tools like valgrind
	cleaner), but each string within the vector can be unique, which fixes
	the regression.

2022-04-21  Simon Marchi  <simon.marchi@efficios.com>

	gdbsupport: add path_join function
	In this review [1], Eli pointed out that we should be careful when
	concatenating file names to avoid duplicated slashes.  On Windows, a
	double slash at the beginning of a file path has a special meaning.  So
	naively concatenating "/"  and "foo/bar" would give "//foo/bar", which
	would not give the desired results.  We already have a few spots doing:

	  if (first_path ends with a slash)
	    path = first_path + second_path
	  else
	    path = first_path + slash + second_path

	In general, I think it's nice to avoid superfluous slashes in file
	paths, since they might end up visible to the user and look a bit
	unprofessional.

	Introduce the path_join function that can be used to join multiple path
	components together (along with unit tests).

	I initially wanted to make it possible to join two absolute paths, to
	support the use case of prepending a sysroot path to a target file path,
	or the prepending the debug-file-directory to a target file path.  But
	the code in solib_find_1 shows that it is more complex than this anyway
	(for example, when the right hand side is a Windows path with a drive
	letter).  So I don't think we need to support that case in path_join.
	That also keeps the implementation simpler.

	Change a few spots to use path_join to show how it can be used.  I
	believe that all the spots I changed are guarded by some checks that
	ensure the right hand side operand is not an absolute path.

	Regression-tested on Ubuntu 18.04.  Built-tested on Windows, and I also
	ran the new unit-test there.

	[1] https://sourceware.org/pipermail/gdb-patches/2022-April/187559.html

	Change-Id: I0df889f7e3f644e045f42ff429277b732eb6c752

2022-04-21  Lancelot SIX  <lancelot.six@amd.com>

	gdb_spawn_attach_cmdline: use unsupported instead of untested
	In a previous commit (b750766ac96: gdb/testsuite: Introduce and use
	gdb_spawn_attach_cmdline), if gdb_spawn_attach_cmdline cannot have GDB
	attach to the process because of ptrace restrictions (operation not
	permitted), the proc issues UNTESTED.  This should really be
	UNSUPPORTED, as it is done in gdb_attach.

	This patch fixes this oversight.

	Change-Id: Ib87e33b9230f3fa7a85e06220ef4c63814b71f7d

2022-04-21  Enze Li  <lienze2010@hotmail.com>

	gdb/testsuite: add binary testcases to py-format-string.exp
	We currently only test decimal and hexadecimal for the
	gdb.Value.format_string() interface, this patch adds testcases for
	binary format.

	Tested on x86_64 openSUSE Tumbleweed(VERSION_ID="20220413").

2022-04-21  Pedro Alves  <pedro@palves.net>

	gdb.debuginfod/fetch_src_and_symbols.exp: Fix "notice empty URL" test
	The gdb_test_multiple pattern for the "notice empty URL" test in
	gdb.debuginfod/fetch_src_and_symbols.exp misses expecting the prompt.
	Fix it by using -re -wrap.

	Also, by using "confirm off", the message GDB prints if Debuginfod
	downloading is available doesn't contain "Enable debuginfod" any
	longer.  E.g.:

	~~~
	  (gdb) file testsuite/outputs/gdb.debuginfod/fetch_src_and_symbols/fetch_src_and_symbols
	  Reading symbols from testsuite/outputs/gdb.debuginfod/fetch_src_and_symbols/fetch_src_and_symbols...

	  This GDB supports auto-downloading debuginfo from the following URLs:
	    <http://localhost:123>
	  Enable debuginfod for this session? (y or [n])
	~~~

	~~~
	  (gdb) with confirm off -- file testsuite/outputs/gdb.debuginfod/fetch_src_and_symbols/fetch_src_and_symbols
	  Reading symbols from testsuite/outputs/gdb.debuginfod/fetch_src_and_symbols/fetch_src_and_symbols...

	  This GDB supports auto-downloading debuginfo from the following URLs:
	    <http://127.0.0.1:8000>
	    <127.0.0.1:8000>
	  Debuginfod has been disabled.
	  To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit.
	  (No debugging symbols found in testsuite/outputs/gdb.debuginfod/fetch_src_and_symbols/fetch_src_and_symbols)
	  (gdb)
	~~~

	I handled that correctly in the other tests that use test_urls, but
	had forgotten to update the "notice empty URL" one.

	Change-Id: I00040c83466e1494b3875574eb009c571a1504bf

2022-04-21  Alan Modra  <amodra@gmail.com>

	prune .note.GNU-stack warning from testsuite
	binutils/
		* testsuite/lib/binutils-common.exp (prune_warnings_extra): Remove
		.note.GNU-stack warning.
		(run_dump_test): Call prune_warnings for ld and objcopy output.
	ld/
		* testsuite/ld-elf/elf.exp: Disable prune_warnings_extra temporarily
		around test for absent .note.GNU-stack
		* testsuite/ld-cris/globsymw2.s,
		* testsuite/ld-cris/warn3.d: Modify "is not implemented" message
		to avoid dejagnu prune_warnings.

	ld testsuite xcoff XPASS
		* testsuite/ld-scripts/defined5.d: Don't xfail xcoff targets.

	Delete unused COFF gas macro
		* config/obj-coff.h (sy_obj): Don't define.
		(OBJ_SYMFIELD_TYPE): Revise comments.

2022-04-21  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-20  Aaron Merey  <amerey@redhat.com>

	gdb/debuginfod: Prevent out_of_range exception
	Trailing whitespace in the string of debuginfod URLs causes an
	out_of_range exception during the printing of URLs for the first
	use notice.

	To fix this, stop printing URLs when the substring to be printed
	consists only of whitespace.

	Also add first use notice testcases.

	Co-Authored-By: Pedro Alves <pedro@palves.net>

2022-04-20  Lancelot SIX  <lancelot.six@amd.com>

	gdb/testsuite: Introduce and use gdb_spawn_attach_cmdline
	Following a7e6a19e87f3d719ea23c65b580a6d9bca4ccab3 "gdb: testsuite: add
	new gdb_attach to check "attach" command", this commit proposes to
	introduce the gdb_spawn_attach_cmdline helper and use it in
	gdb.base/attach.exp.

	This helper starts GDB and adds the "--pid=$PID" argument.

	Also note that both the original and new implementation use
	gdb_spawn_with_cmdline_opts, which in the end uses default_gdb_spawn.
	This makes sure that we use $INTERNAL_GDBFLAGS, which by default already
	contain "-iex \"set height 0\" -iex \"set width 0\"".  To avoid
	repetition of those arguments, gdb_spawn_attach_cmdline does not repeat
	those arguments.

	To maintain a behavior similat to what gdb.base/attach.exp used to do,
	gdb_spawn_attach_cmdline keeps the -quiet flag.

	Tested on x86_64-gnu-linux

	Change-Id: I1fdcdb71c86d9c5d34bb28fc86fac68bcec37358

2022-04-20  Tom Tromey  <tom@tromey.com>

	Replace symbol_symtab with symbol::symtab
	This turns symbol_symtab into a method on symbol.  It also replaces
	symbol_set_symtab with a method.

	Replace symbol_arch with symbol::arch
	This turns symbol_arch into a method on symbol.

	Replace symbol_objfile with symbol::objfile
	This turns symbol_objfile into a method on symbol.

	Remove symbol::aclass_index
	Symbols have an aclass_index method, but this isn't needed, because
	the aclass index isn't useful outside of the symbol implementation.

	Use array_view for symbol_impls
	It seemed to me that using array_view for symbol_impls would give a
	bit more error checking, at least when gdb is built in libstdc++ debug
	mode.

	Add accessors for symbol's artificial field
	For a series I'm experimenting with, it was handy to hide a symbol's
	"artificial" field behind accessors.  This patch is the result.

	Unify the DWARF index holders
	The dwarf2_per_bfd object has a separate field for each possible kind
	of index.  Until an earlier patch in this series, two of these were
	even derived from a common base class, but still had separate slots.
	This patch unifies all the index fields using the common base class
	that was introduced earlier in this series.  This makes it more
	obvious that only a single index can be active at a time, and also
	removes some code from dwarf2_initialize_objfile.

	Add an ad hoc version check to dwarf_scanner_base
	Some generic code in the DWARF reader has a special case for older
	versions of .gdb_index.  This patch adds an ad hoc version check
	method so that these spots can work without specific knowledge of
	which index is in use.

	Simplify version check in dw2_symtab_iter_next
	This simplifies the index versio check in dw2_symtab_iter_next, by
	passing a reference to the index object to this function.  This avoids
	an indirection via the per_bfd object.

	Introduce and use dwarf_scanner_base
	This introduces dwarf_scanner_base, a base class for all the index
	readers in the DWARF code.  Then, it changes both mapped_index_base
	and cooked_index_vector to derive from this new base class.

	Introduce readnow_functions
	This introduces readnow_functions, a new subclass of
	dwarf2_base_index_functions, and changes the DWARF reader to use it.
	This lets us drop the "index is NULL" hack from the gdb index code.

	Remove some "OBJF_READNOW" code from dwarf2_debug_names_index
	The dwarf2_debug_names_index code treats a NULL debug_names_table as
	if it were from OBJF_READNOW.  However, this trick is only done for
	gdb_index, never for debug_names -- see dwarf2_initialize_objfile.

	Let mapped index classes create the quick_symbol_functions object
	This changes the mapped index classes to create the
	quick_symbol_functions objects.  This is a step toward having a more
	abstract interface to mapped indices.

	Give mapped_index_base a virtual destructor
	This changes mapped_index_base to have a virtual destructor, so it can
	be destroyed via its base class.

	Move mapped_index_base to new header file
	This moves mapped_index_base and the helper struct name_component to a
	new header file in gdb/dwarf2/.

2022-04-20  Jan Beulich  <jbeulich@suse.com>

	x86: reject all invalid SAE variants
	So far an SAE-only specifier was accepted for static-rounding insns,
	while SAE-only insns didn't accept static rounding specifiers. If
	anything it would make sense the other way around, allowing SAE-only
	insns to have the (ignored) rounding mode specified individually rather
	than globally via -mevexrcig=. But for now make things match the SDM.

2022-04-20  Alan Modra  <amodra@gmail.com>

	Re: xcoff: implement linker relaxation
		* xcofflink.c (xcoff_stub_csect_name): Increase buffer size.
		(xcoff_stub_get_csect_in_range, xcoff_build_one_stub): Whitespace.
		(bfd_xcoff_size_stubs): Cast PRIx64 arg to required type.
		Don't use freed stub_name.

	Revert "as: Reject unknown -gXXX option" testsuite
	This reverts the test committed as part of 6ea673e2d6.

2022-04-20  Cl?ment Chigot  <clement.chigot@atos.net>

	xcoff: implement linker relaxation
	bfd/ChangeLog:

		* coff-rs6000.c (xcoff_reloc_type_noop): Add info argument.
		(xcoff_reloc_type_fail): Likewise.
		(xcoff_reloc_type_pos): Likewise.
		(xcoff_reloc_type_neg): Likewise.
		(xcoff_reloc_type_rel): Likewise.
		(xcoff_reloc_type_toc): Likewise.
		(xcoff_reloc_type_ba): Likewise.
		(xcoff_reloc_type_crel): Likewise.
		(xcoff_reloc_type_tls): Likewise.
		(xcoff_reloc_type_br): Add stub handler.
		(xcoff_ppc_relocate_section): Add info to
		xcoff_calculate_relocation.
		(xcoff_stub_indirect_call_code): New constant.
		(xcoff_stub_shared_call_code): Likewise.
		(bfd_xcoff_backend_data): Add stub code fields.
		(bfd_pmac_xcoff_backend_data): Likewise.
		* coff64-rs6000.c (xcoff64_reloc_type_br): Add stub handler.
		(xcoff64_ppc_relocate_section): Add info to
		xcoff64_calculate_relocation.
		(xcoff64_stub_indirect_call_code): New constant.
		(xcoff64_stub_shared_call_code): Likewise.
		(bfd_xcoff_backend_data): Add stub code fields.
		(bfd_xcoff_aix5_backend_data): Likewise.
		* libxcoff.h (struct xcoff_backend_data_rec): Add stub fields.
		(bfd_xcoff_stub_indirect_call_code): New define.
		(bfd_xcoff_stub_indirect_call_size): New define.
		(bfd_xcoff_stub_shared_call_code): New define.
		(bfd_xcoff_stub_shared_call_size): New define.
		(xcoff_reloc_function): Add info argument.
		(enum xcoff_stub_type): New enum.
		(struct xcoff_stub_hash_entry): New structure.
		* xcofflink.c (struct xcoff_link_hash_table): Add stub hash
		table and params fields.
		(xcoff_stub_hash_entry): New define.
		(xcoff_stub_hash_lookup): New define.
		(stub_hash_newfunc): New function.
		(_bfd_xcoff_bfd_link_hash_table_free): Free the new stub hash
		table.
		(_bfd_xcoff_bfd_link_hash_table_create): Create the new stub
		hash table.
		(xcoff_link_add_symbols): Save rawsize for XTY_SD.
		(bfd_xcoff_link_init): New function.
		(xcoff_stub_csect_name): New function.
		(xcoff_stub_get_csect_in_range): New function.
		(xcoff_stub_name): New function.
		(bfd_xcoff_get_stub_entry): New function.
		(bfd_xcoff_type_of_stub): New function.
		(xcoff_add_stub): New function.
		(xcoff_build_one_stub): New function.
		(bfd_xcoff_size_stubs): New function.
		(bfd_xcoff_build_stubs): New function.
		(xcoff_stub_create_relocations): New function.
		(xcoff_link_input_bfd): Adapt relocations to stub.
		(xcoff_write_global_symbol): Adapt to new TOC entries generated
		for stubs.
		(_bfd_xcoff_bfd_final_link): Handle stub file.
		* xcofflink.h (struct bfd_xcoff_link_params): New structure.

	ld/ChangeLog:

		* emultempl/aix.em (params): New variable.
		(stub_file): New variable.
		(xcoff_add_stub_section): New function.
		(xcoff_layout_sections_again): New function
		(hook_in_stub): New function.
		(_after_allocation): Add stub creation.
		(_create_output_section_statements): Allocate stub file and
		pass params to backend.

2022-04-20  Cl?ment Chigot  <clement.chigot@atos.net>

	Stubs (added in a later patch) will generate new .loader symbols, once the allocations have been done. Thus, the .loader section cannot be layout before that.
	bfd/ChangeLog:

		* coff-rs6000.c (_bfd_xcoff_put_ldsymbol_name): Write len in
		  ldinfo->strings instead of directly in the output_bfd.
		* coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
		* xcofflink.c (struct xcoff_link_hash_table): Remove ldrel_count
		  field. Add ldinfo field.
		(xcoff_mark_symbol): Adjust to new ldinfo field.
		(xcoff_mark): Likewise.
		(bfd_xcoff_link_count_reloc): Likewise.
		(xcoff_build_loader_section): Split into two functions: one that
		build the loader section (this function) and one that only size
		it...
		(xcoff_size_loader_section): ... (this function).
		(bfd_xcoff_size_dynamic_sections): Adapt to new ldinfo field.
		Move the part where the dynamic sections are build to ...
		(bfd_xcoff_build_dynamic_sections): ... this function.
		* xcofflink.h: Add bfd_xcoff_build_dynamic_sections prototype.

	include/ChangeLog:

		* coff/xcoff.h (struct xcoff_loader_info): Add ldrel_count and
		libpath fields.

	ld/ChangeLog:

		* emultempl/aix.em (_after_allocation): New function.

2022-04-20  Tom Tromey  <tom@tromey.com>

	Use symbol_symtab accessor in compile-object-load.c
	I noticed that compile-object-load.c directly references owner.symtab
	of a symbol.  However, I think it's better for all users to call
	symbol_symtab.  This patch makes this change.

2022-04-20  Nick Clifton  <nickc@redhat.com>

	Add linker warning for when it creates an executable stack.
	   PR 29072

2022-04-20  Tom Tromey  <tom@tromey.com>

	Micro-optimize cooked_index_entry::full_name
	I noticed that cooked_index_entry::full_name can return the canonical
	string when there is no parent entry.

	Regression tested on x86-64 Fedora 34.

2022-04-20  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: LoongArch: Implement loongarch_scan_prologue()
	If can't determine prologue from the symbol table, need to examine
	instructions. Implement loongarch_scan_prologue() to analyze the
	function prologue from START_PC to LIMIT_PC, return the address of
	the first instruction past the prologue.

2022-04-20  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-19  H.J. Lu  <hjl.tools@gmail.com>

	as: Reject unknown -gXXX option
		* as.c (parse_args): Reject unknown -gXXX option.
		* testsuite/gas/all/empty.s: New file.
		* testsuite/gas/all/pr29067.d: Likewise.
		* testsuite/gas/all/pr29067.err: Likewise.
		* testsuite/gas/all/gas.exp: Run pr29067.

2022-04-19  Lancelot SIX  <lancelot.six@amd.com>

	gdb/selftest-arch: Make register_test_foreach_arch generate arch tests lazily
	The register_test_foreach_arch is used to instantiate a given selftest
	for all architectures supported by GDB.  It is used in many _initialize_*
	functions (under initialize_all_files, called by gdb_init).

	Because the call is done during GDB's initialization, and because there
	is no guaranty about the order in which all the _initialize_* functions
	are executed, when register_test_foreach_arch is called, GDB is not
	fully initialized.  Specifically, when a particular initialize function
	is executed, only the architectures registered at that point are listed
	by gdbarch_printable_names.

	As a consequence, the list of selftest effectively executed depends on
	the order the _initialize_* functions are called.  This can be observed
	with the following:

	    $ ./gdb/gdb \
	        -data-directory ./gdb/data-directory \
	        -quiet -batch -ex "maint selftest" 2>&1 \
	        | grep -E "Ran [0-9]+ unit tests"
	    Ran 145 unit tests, 0 failed
	    $ GDB_REVERSE_INIT_FUNCTIONS=1 ./gdb/gdb \
	        -data-directory ./gdb/data-directory \
	        -quiet -batch -ex "maint selftest" 2>&1 \
	        | grep -E "Ran [0-9]+ unit tests"
	    Ran 82 unit tests, 0 failed

	To fix this, make register_test_foreach_arch register a lazy selftest
	generator.  This way when the test generator is eventually executed, all
	architectures are registered and we do not have a dependency on the
	order the initialize functions are executed in.

	Tested on x86_64-linux

	Change-Id: I88eefebf7d372ad672f42d3a103e89354bc8a925

2022-04-19  Lancelot SIX  <lancelot.six@amd.com>

	gdbsupport/selftest: Allow lazy registration
	This patch adds a way to delay the registration of tests until the
	latest possible moment.  This is intended for situations where GDB needs
	to be fully initialized in order to decide if a particular selftest can
	be executed or not.

	This mechanism will be used in the next patch.

	Change-Id: I7f6b061f4c0a6832226c7080ab4e3a2523e1b0b0

2022-04-19  Lancelot SIX  <lancelot.six@amd.com>

	gdbsupport/selftest: Replace for_each_selftest with an iterator_range
	Remove the callback-based selftests::for_each_selftest function and use
	an iterator_range instead.

	Also use this iterator range in run_tests so all iterations over the
	selftests are done in a consistent way.  This will become useful in a
	later commit.

	Change-Id: I0b3a5349a7987fbcb0071f11c394e353df986583

2022-04-19  Jan Beulich  <jbeulich@suse.com>

	x86: don't mistake ordinary immediates for SAE / rounding control
	The way SAE templates are constructed was always puzzling me (including
	the need for separate templates in the first place), and expressing the
	extzra attribute via Imm8 actually has a bad effect: Ordinary immediates
	would also be accepted, leading to an extra byte being added after the
	instruction (i.e. generating bad code). Before re-working this (in
	particular to accept proper Intel syntax there), fix the immediate issue
	by adding the so far missing check.

	x86: VCMPSH is Evex.LLIG
	These were mistakenly flagged as Evex.128. Getting the LLIG status right
	for insns allowing for SAE is a prereq for planned further work.

	x86: drop stray CheckRegSize from VFPCLASSPH
	Like VFPCLASSP{S,D} it has only a single operand allowing multiple
	sizes, hence there are no pairs of operands to check for consistent
	size.

	x86/Intel: test non-legacy VCVT{,U}SI2SH insn forms
	For an unclear reason corresponding AVX512F tests were apparently not
	cloned or used as reference here, and instead the bogus legacy forms of
	the insns (with the embedded rounding specifier not last) were used.

2022-04-19  Jan Beulich  <jbeulich@suse.com>

	x86: correct and simplify NOP disassembly
	It's not just REX.W which is ignored with opcode 0x90. The same goes for
	REX.R and REX.X as well as empty REX. None of these are forms of
	"xchg %eax,%eax" (which would mean zero-extending %eax to %rax), so they
	also shouldn't be disassembled this way.

	While there simplify things: A single hook function suffices, thus
	making it unnecessary to keep two expressions in sync. And checking
	ins->address_mode for mode_64bit also is unnecessary, as "rex" can be
	non-zero only in that case anyway.

2022-04-19  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-18  Simon Marchi  <simon.marchi@efficios.com>

	gdb/testsuite/dwarf: don't automatically add directory and file entry for DWARF 5
	To support DWARF 5 in the DWARF assembler line tables, we currently copy
	the first user-provided directory and the first user-provided files and
	make them elements at indices 0 in the directory and file name tables.
	That was a sufficient behavior at the time (see commit 44fda089397a
	("[gdb/testsuite] Support .debug_line v5 in dwarf assembler")), but in
	the following patches, I would need to have finer grained control on
	what is generated exactly.  For example, I'd like to generate a DWARF 5 line
	table with just a single file and a single directory.

	Get rid of this behavior, and implement what is suggested in
	44fda089397a: make include_dir return the directory index that can be
	used to refer to that directory entry (based on the DWARF version), and
	use it afterwards.

	Adjust dw2-lines.exp and dw2-prologue-end.exp accordingly.  Their produced
	DWARF5 binaries will change a bit, in that they will now have a single
	directory and file, where they had two before.  But it doesn't change
	the expected GDB behavior.

	Change-Id: I5459b16ac9b7f28c34c9693c35c9afd2ebb3aa3b

2022-04-18  Simon Marchi  <simon.marchi@efficios.com>

	gdb: use gdb_tilde_expand instead of gdb_tilde_expand_up in source_script_with_search
	Since this is the latest use of gdb_tilde_expand_up, remove it.

	Change-Id: I964c812ce55fe087876abf91e7a3577ad79c0425

2022-04-18  Simon Marchi  <simon.marchi@efficios.com>

	gdbsupport: make gdb_realpath_keepfile return an std::string
	I'm trying to switch these functions to use std::string instead of char
	arrays, as much as possible.  Some callers benefit from it (can avoid
	doing a copy of the result), while others suffer (have to make one more
	copy).

	Change-Id: I793aab17baaef8345488f4c40b9094e2695425bc

2022-04-18  Simon Marchi  <simon.marchi@efficios.com>

	gdbsupport: make gdb_abspath return an std::string
	I'm trying to switch these functions to use std::string instead of char
	arrays, as much as possible.  Some callers benefit from it (can avoid
	doing a copy of the result), while others suffer (have to make one more
	copy).

	Change-Id: Iced49b8ee2f189744c5072a3b217aab5af17a993

2022-04-18  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: call gdb_tilde_expand instead of gdb_tilde_expand_up in source_script_with_search
	This removes a use of gdb_tilde_expand_up, which is removed later in
	this series.

	Change-Id: I5887d526cea987103e4ca24514a982b0a28e992a

2022-04-18  Tom Tromey  <tromey@adacore.com>

	Update gnulib
	This updates gnulib to a relatively recent commit.  Most of this was
	done by the gnulib import script; the only change I made was to
	update-gnulib.sh.

	Tested on x86-64 Fedora 34.  I also did a mingw cross build.

2022-04-18  Tom Tromey  <tom@tromey.com>

	Fix C++ cast of derived class to base class
	PR c++/28907 points out that casting from a derived class to a base
	class fails in some situations.  The problem turned out to be a
	missing use of value_embedded_offset.  One peculiarity here is that,
	if you managed to construct a pointer-to-derived with an embedded
	offset of 0, the cast would work -- for example, one of the two new
	tests here passes without the patch.

	This embedded offset stuff is an endless source of bugs.  I wonder if
	it's possible to get rid of it somehow.

	Regression tested on x86-64 Fedora 34.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28907

2022-04-18  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: make gdb.ada/mi_prot.exp stop at expected location
	This test attempts to run until the line marked "STOP", which is at
	prot.adb:34.  It first runs until the "main" symbol, then tries to place
	a breakpoint by line at line 34, without specifying the source file.  When looking at the logs:

	    -break-insert -t 34^M
	    ^done,bkpt={number="2",type="breakpoint",disp="del",enabled="y",addr="0x0000555555558a6c",func="adafinal",file="/home/simark/build/binutils-gdb-one-target/gdb/testsuite/outputs/gdb.ada/mi_pro    t/b~prot.adb",fullname="/home/simark/build/binutils-gdb-one-target/gdb/testsuite/outputs/gdb.ada/mi_prot/b~prot.adb",line="44",thread-groups=["i1"],times="0",original-location="/home/simark/b    uild/binutils-gdb-one-target/gdb/testsuite/outputs/gdb.ada/mi_prot/b~prot.adb:34"}^M
	    ... continues ...
	     *stopped,reason="breakpoint-hit",disp="del",bkptno="2",frame={addr="0x0000555555558a6c",func="adafinal",args=[],file="/home/simark/build/binutils-gdb-one-target/gdb/testsuite/outputs/gdb.ada/    mi_prot/b~prot.adb",fullname="/home/simark/build/binutils-gdb-one-target/gdb/testsuite/outputs/gdb.ada/mi_prot/b~prot.adb",line="44",arch="i386:x86-64"},thread-id="1",stopped-threads="all",co    re="8"^M

	... we see that the breakpoint is placed in some generated file, not in
	the test source file as we expect.  The problem is that "b main" in Ada
	does not place a breakpoint on the "Ada main", but on some symbol in a
	generated source file.  So when stopped at the "main" symbol, we are not
	stopped in the file that contains the STOP marker at line 34.

	The test passes anyway today, so it doesn't seem to matter that we are
	stopped at an unexpected location.  But it starts failing with this
	patch [1], because b~prot.adb:34 happens to be between two functions, so
	the breakpoint doesn't resolve.

	Fix this by placing the breakpoint at "$srcfile:$line", which works
	regardless of what is the current source file.

	However, this ends up introducing a path in the test name.  Modify
	mi_tbreak and mi_continue_to_line to avoid that.

	[1] https://sourceware.org/pipermail/gdb-patches/2022-April/187686.html

	Change-Id: I742e2a9993046dcb5e30c64fe2ad920a363baf75

2022-04-18  Vignesh Balasubramanian  <Vignesh.Balasubrmanian@amd.com>

	gdb/testsuite: add text_segment option to gdb_compile
	LLVM's lld linker doesn't have the "-Ttext-segment" option, but
	"--image-base" can be used instead.

	To centralize the logic of checking which option is supported, add the
	text_segment option to gdb_compile.  Change tests that are currently
	using -Ttext-segment to use that new option instead.

	This patch fixes only compilation error, for example:

	Before:

	    $ make check TESTS="gdb.base/jit-elf.exp" RUNTESTFLAGS="CC_FOR_TARGET=clang LDFLAGS_FOR_TARGET=-fuse-ld=ld"
	    Running /home/simark/src/binutils-gdb/gdb/testsuite/gdb.base/jit-elf.exp ...
	    gdb compile failed, clang-13: warning: -Xlinker -Ttext-segment=0x7000000: 'linker' input unused [-Wunused-command-line-argument]

	After:

	    $ make check TESTS="gdb.base/jit-elf.exp" RUNTESTFLAGS="CC_FOR_TARGET=clang LDFLAGS_FOR_TARGET=-fuse-ld=ld"
	    Running /home/simark/src/binutils-gdb/gdb/testsuite/gdb.base/jit-elf.exp ...
	    FAIL: gdb.base/jit-elf.exp: one_jit_test-1: continue to breakpoint: break here 1
	    FAIL: gdb.base/jit-elf.exp: one_jit_test-1: continue to breakpoint: break here 2
	    FAIL: gdb.base/jit-elf.exp: one_jit_test-2: continue to breakpoint: break here 1
	    FAIL: gdb.base/jit-elf.exp: one_jit_test-2: info function ^jit_function
	    FAIL: gdb.base/jit-elf.exp: one_jit_test-2: continue to breakpoint: break here 2
	    FAIL: gdb.base/jit-elf.exp: attach: one_jit_test-2: continue to breakpoint: break here 1
	    FAIL: gdb.base/jit-elf.exp: attach: one_jit_test-2: break here 1: attach
	    FAIL: gdb.base/jit-elf.exp: PIE: one_jit_test-1: continue to breakpoint: break here 1
	    FAIL: gdb.base/jit-elf.exp: PIE: one_jit_test-1: continue to breakpoint: break here 2

	                    === gdb Summary ===

	    # of expected passes            26
	    # of unexpected failures        9

	Change-Id: I3678c5c9bbfc2f80671698e28a038e6b3d14e635

2022-04-18  Enze Li  <lienze2010@hotmail.com>

	gdb: fix using clear command to delete non-user breakpoints(PR cli/7161)
	The clear command shouldn't delete momentary and internal breakpoints,
	nor internal breakpoints created via Python's gdb.Breakpoint.

	This patch fixes this issue and adds a testcase.

	Regression tested on x86_64 openSUSE Tumbleweed(VERSION_ID="20220413").

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=7161

2022-04-18  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-17  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-16  Tom Tromey  <tom@tromey.com>

	Add comments to dwarf2/abbrev-cache.h
	This patch started when I noticed that the unordered_set include
	wasn't needed in abbrev-cache.h.  (That was probably leftover from
	some earlier implementation of the class.)  Then, I noticed that the
	class itself was under-commented.  This patch fixes both issues.

2022-04-16  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-15  Tom Tromey  <tom@tromey.com>

	Return void from gdb_putc
	I don't think it's very useful to return the character from gdb_putc,
	so this patch changes it to return void.

2022-04-15  Tom Tromey  <tom@tromey.com>

	Handle "set height 1"
	PR cli/17151 points out that "set height 1" has pathological behavior
	in gdb.  What I see is that gdb will endlessly print the pagination
	prompt.  This patch takes a simple and expedient approach to a fix:
	pretend that the height is really 2.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=17151

2022-04-15  Tom Tromey  <tom@tromey.com>

	Allow word wrapping even when paging is disabled
	PR cli/20741 points out that when pagination is disabled, this also
	disabled word wrapping.  However, the manual documents that these
	settings are separate -- if you intend to disable the wrapping, you
	must use "set width unlimited".

	This patch fixes the bug by letting the pagination-disabled case fall
	through to the code that also handles word-wrapping.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=20741

2022-04-15  Tom Tromey  <tom@tromey.com>

	Implement value_print for Rust
	This adds an implementation of the value_print method to Rust.  As
	described in PR rust/22254, this removes a bit of weird-looking output
	from some "print"s -- because c_value_print is bypassed.  I don't have
	a test for the bug that inspired this patch, because I only know how
	to reproduce it when using a relatively old Rust compiler.  However,
	the new "cast-printing" code in value_print is required, because
	omitting this causes some existing tests to fail.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22254

2022-04-15  Tom Tromey  <tom@tromey.com>

	Reimplement Rust slice printing
	The current nightly Rust compiler (aka 1.61) added better DWARF
	representation for unsized types.  Fixing this is PR rust/21466; but
	the code is actually the same as what is required to make slice
	printing more useful, which is PR rust/23871.  This patch implements
	this.  I tested this against various Rust compilers: 1.48, current
	stable, current beta, and current nightly.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=21466
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=23871

2022-04-15  Tom Tromey  <tom@tromey.com>

	Remove some dead code from the Rust value printer
	This removes a bit of dead code from the Rust value printer.  This
	code wasn't always dead -- it fixed a real bug, and a test case was
	added for it.  However, once val_print was removed, it became
	unnecessary.

2022-04-15  Tom Tromey  <tom@tromey.com>

	Match rustc beta versions
	The rust_compiler_version proc extracts the Rust compiler version from
	the "rustc --version" output.  For a beta compiler, the output looks
	like:

	    rustc 1.60.0-beta.6 (7bccde197 2022-03-22)

	This patch slightly relaxes the regexp -- removing a space -- so that
	this can be understood by this proc.

2022-04-15  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.ada/float-bits.exp with -m32
	With test-case gdb.ada/float-bits.exp and native we get:
	...
	(gdb) print 16llf#7FFFF7FF4054A56FA5B99019A5C8#^M
	$9 = 5.0e+25^M
	(gdb) PASS: gdb.ada/float-bits.exp: print 16llf#7FFFF7FF4054A56FA5B99019A5C8#
	...
	but with target board unix/-m32 we have instead:
	...
	(gdb) print 16llf#7FFFF7FF4054A56FA5B99019A5C8#^M
	Cannot export value 2596145952482202326224873165792712 as 96-bits \
	  unsigned integer (must be between 0 and 79228162514264337593543950335)^M
	(gdb) FAIL: gdb.ada/float-bits.exp: print 16llf#7FFFF7FF4054A56FA5B99019A5C8#
	...

	Fix this by testing whether 16llf is supported by doing ptype long_long_float
	which gets us either:
	...
	type = <16-byte float>^M
	...
	or:
	...
	type = <12-byte float>^M
	...

	Tested on x86_64-linux with native and unix/-m32.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29041

2022-04-15  Tom Tromey  <tom@tromey.com>

	Remove WITH_SIM define
	Since score-tdep.c was removed, the WITH_SIM define is not used in
	gdb.  This patch removes it.

	Note that re-running autoheader shows a separate change that was
	missed.  I've kept it in this patch to avoid extra work.

2022-04-15  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.go/methods.exp with check-readmore
	When running test-case gdb.go/methods.exp with make check we have:
	...
	(gdb) break main.T.Foo^M
	Function "main.T.Foo" not defined.^M
	Make breakpoint pending on future shared library load? (y or [n]) n^M
	(gdb) XFAIL: gdb.go/methods.exp: gdb_breakpoint: set breakpoint at main.T.Foo
	...
	but with make check-readmore the XFAIL fails to trigger:
	...
	(gdb) break main.T.Foo^M
	Function "main.T.Foo" not defined.^M
	Make breakpoint pending on future shared library load? (y or [n]) n^M
	(gdb) FAIL: gdb.go/methods.exp: gdb_breakpoint: set breakpoint at main.T.Foo
	...

	This happens because this gdb_test_multiple "maintenance print symbols"
	regexp:
	...
	    -re "\r\n$gdb_prompt $" {
	...
	matches the entire command output.

	Fix this by adding the missing ^ at the regexp start.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29064

2022-04-15  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-14  Pedro Alves  <pedro@palves.net>

	gdbserver: Eliminate prepare_to_access_memory
	Given:

	 - The prepare_to_access_memory machinery was added for non-stop mode.

	 - Only Linux supports non-stop.

	 - Linux no longer needs the prepare_to_access_memory machinery.  In
	   fact, after the previous patch,
	   linux_process_target::prepare_to_access_memory became a nop.

	Thus, prepare_to_access_memory can go away, simplifying core GDBserver
	code.

	Change-Id: I93ac8bfe66bd61c3d1c4a0e7d419335163120ecf

2022-04-14  Pedro Alves  <pedro@palves.net>

	gdbserver/linux: Access memory even if threads are running
	Similarly to how the native Linux target was changed
	and subsequently reworked in these commits:

	 05c06f318fd9 Linux: Access memory even if threads are running
	 8a89ddbda2ec Avoid /proc/pid/mem races (PR 28065)

	... teach GDBserver to access memory even when the current thread is
	running, by always accessing memory via /proc/PID/mem.

	The existing comment:

	  /* Neither ptrace nor /proc/PID/mem allow accessing memory through a
	     running LWP.  */

	... is incorrect for /proc/PID/mem does allow that.

	Actually, from GDB's perspective, GDBserver could already access
	memory while threads were running, but at the expense of pausing all
	threads for the duration of the memory access, via
	prepare_to_access_memory.  This new implementation does not require
	pausing any thread, thus
	linux_process_target::prepare_to_access_memory /
	linux_process_target::done_accessing_memory become nops.  A subsequent
	patch will remove the whole prepare_to_access_memory infrastructure
	completely.

	The GDBserver linux-low.cc implementation is simpler than GDB's
	linux-nat.c's, because GDBserver always adds the unfollowed vfork/fork
	children to the process list immediately when the fork/vfork event is
	seen out of ptrace.  I.e., there's no need to keep the file descriptor
	stored on a side map, we can store it directly in the process
	structure.

	Change-Id: I0abfd782ceaa4ddce8d3e5f3e2dfc5928862ef61

2022-04-14  Pedro Alves  <pedro@palves.net>

	gdbserver: special case target_write_memory len==0
	The next patch in this series adds a common helper routine for both
	memory reads and writes, like this:

	 static int
	 proc_xfer_memory (CORE_ADDR memaddr, unsigned char *readbuf,
			  const gdb_byte *writebuf, int len)
	 {
	   gdb_assert ((readbuf == nullptr) != (writebuf == nullptr));
	   ...
	 }

	 int
	 linux_process_target::read_memory (CORE_ADDR memaddr,
	                                    unsigned char *myaddr, int len)
	 {
	   return proc_xfer_memory (memaddr, myaddr, nullptr, len);
	 }

	 linux_process_target::write_memory (CORE_ADDR memaddr,
	                                    const unsigned char *myaddr, int len)
	 {
	   return proc_xfer_memory (memaddr, nullptr, myaddr, len);
	 }

	Surprisingly, the assertion fails.  That happens because it can happen
	that target_write_memory is called with LEN==0, due to this in
	gdb/remote.c:

	 /* Determine whether the remote target supports binary downloading.
	    This is accomplished by sending a no-op memory write of zero length
	    to the target at the specified address. (...) */

	 void
	 remote_target::check_binary_download (CORE_ADDR addr)
	 {
	 ...
	       p = rs->buf.data ();
	       *p++ = 'X';
	       p += hexnumstr (p, (ULONGEST) addr);
	       *p++ = ',';
	       p += hexnumstr (p, (ULONGEST) 0);
	       *p++ = ':';
	       *p = '\0';

	In this scenario, in gdbserver's target_write_memory, the "myaddr"
	argument of the_target->write_memory is passed the data() of a local
	gdb::byte_vector (which is a specialized std::vector).  It's valid for
	std::vector::data() to return NULL when the vector is empty.

	This commit adds an early return to target_write_memory to avoid
	target backends having to care about this.  For good measure, do the
	same on the read side, in read_inferior_memory.

	Change-Id: Iac8f04fcf99014c624ef4036bd318ca1771ad491

2022-04-14  Pedro Alves  <pedro@palves.net>

	gdbserver/qXfer::threads, prepare_to_access_memory=>target_pause_all
	handle_qxfer_threads_proper needs to pause all threads even if the
	target can read memory when threads are running, so use
	target_pause_all instead, which is what the Linux implementation of
	prepare_to_access_memory uses.  (Only Linux implements this hook.)

	A following patch will make the Linux backend be able to access memory
	when threads are running, and thus will also make
	prepare_to_access_memory do nothing, which would cause testsuite
	regressions without this change.

	Change-Id: I127fec7246b7c45b60dfa7341e781606bf54b5da

2022-04-14  Tom Tromey  <tromey@adacore.com>

	Ignore 0,0 entries in .debug_aranges
	When running the internal AdaCore test suite against the new DWARF
	indexer, I found one regression on RISC-V.  The test in question uses
	--gc-sections, and winds up with an entry in the middle of a
	.debug_aranges that has both address and length of 0.  In this
	scenario, gdb assumes the entries are terminated and then proceeds to
	reject the section because it reads a subsequent entry as if it were a
	header.

	It seems to me that, because each header describes the size of each
	.debug_aranges CU, it's better to simply ignore 0,0 entries and simply
	read to the end.  That is what this patch does.

	I've patched an existing test to provide a regression test for this.

2022-04-14  Tom Tromey  <tromey@adacore.com>

	Use GetThreadDescription on Windows
	Windows 10 introduced SetThreadDescription and GetThreadDescription, a
	simpler way to set a thread's name.  This changes gdb and gdbserver to
	use this convention when it is available.

	This is part of PR win32/29050.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29050

2022-04-14  Tom Tromey  <tromey@adacore.com>

	Set the worker thread name on Windows
	This patch is a bit different from the rest of the series, in that it
	is a change to gdb's behavior on the host.  It changes gdb's thread
	pool to try to set the thread name on Windows, if SetThreadDescription
	is available.

	This is part of PR win32/29050.

	This patch isn't likely to be useful to many people in the short term,
	because the Windows port of the libstdc++ thread code is not upstream.
	(AdaCore uses it, and sent it upstream, but it did not land, I don't
	know why.)  However, if that patch does ever go in, or presumably if
	you build using some other C++ runtime library, then this will be
	useful.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29050

2022-04-14  Tom Tromey  <tromey@adacore.com>

	Implement thread_name for gdbserver
	This changes gdbserver to implement thread_name method.

	Share handle_ms_vc_exception with gdbserver
	Currently, gdb's native Windows target implements the exception-based
	approach for setting thread names, but gdbserver does not.  This patch
	moves handle_ms_vc_exception to the shared nat/windows-nat.c code, as
	preparation for adding this support to gdbserver.

	Move target_read_string to target/target.c
	This moves the two overloads of target_read_string to a new file,
	target/target.c, and updates both gdb and gdbserver to build this.

	Remove the byte order parameter to target_read_string
	target_read_string takes a byte order parameter, but only uses this to
	check whether a given character is zero.  This is readily done without
	requiring the parameter, so remove it.

	Rename read_string
	This renames read_string to be an overload of target_read_string.
	This makes it more consistent for the eventual merger with gdbserver.

	Don't call QUIT in read_string
	read_string does not need to call QUIT, because target_read_memory
	already does.  This change is needed to make string-reading usable by
	gdbserver.

	Fix possible Cygwin build problem
	I noticed that nat/windows-nat.c checks __USEWIDE, but nothing sets it
	there -- I forgot to copy over the definition when making this file.
	This patch tries to fix the problem.  I don't have a Cygwin setup, so
	I don't know whether this is sufficient, but it's probably necessary.

2022-04-14  Lancelot SIX  <lancelot.six@amd.com>
	    Pedro Alves  <pedro@palves.net>

	gdb/testsuite: Fix race in gdb.dwarf2/calling-convention.exp
	Pedro Alves warned me that there is a race in
	gdb.dwarf2/calling-convention.exp making the test sometimes fail on his
	setup.  This can be reliably reproduced using :

	    make check-read1 TESTS="gdb.dwarf2/calling-convention.exp"

	The relevant part of the gdb.log file is:

	    return 35
	    Function 'foo' does not follow the target calling convention.
	    If you continue, setting the return value will probably lead to unpredictable behaviors.
	    Make foo return now? (y or n) PASS: gdb.dwarf2/calling-convention.exp: return 35
	    n
	    Not confirmed
	    (gdb) FAIL: gdb.dwarf2/calling-convention.exp: finish

	The issue is that when doing the test for "return 35", the DejaGnu test
	sends "n" (to tell GDB not to perform the return action) but never
	consumes the "Not confirmed" acknowledgment sent by GDB.  Later, when
	trying to do the next test, DejaGnu tries to match the leftover output
	from the "return" test. As this output is not expected, the test fails.

	Fix by using gdb_test to send the "n" answer and match the confirmation
	and consume all output to the prompt.

	Also do minor adjustments to the main regex:
	  - Remove the leading ".*" which is not required.
	  - Ensure that the "?" from the question is properly escaped.

	Tested on x86_64-gnu-linux, using

	- make check TESTS="gdb.dwarf2/calling-convention.exp"
	- make check-read1 TESTS="gdb.dwarf2/calling-convention.exp"
	- make check-readmore TESTS="gdb.dwarf2/calling-convention.exp"

	Change-Id: I42858b13db2cbd623c5c1739de65ad423e0c0938

2022-04-14  Tom Tromey  <tromey@adacore.com>

	Silence -Wmaybe-uninitialized warning from target_waitstatus
	Currently, one use of target_waitstatus yields a warning:

	     target/waitstatus.h: In function 'void stop_all_threads()':
	     target/waitstatus.h:175:13: warning: 'ws.target_waitstatus::m_value' may be used uninitialized in this function [-Wmaybe-uninitialized]
	       175 |     m_value = other.m_value;
		   |     ~~~~~~~~^~~~~~~~~~~~~~~

	This patch silences the warning.  I tried the "volatile member"
	approach that was used for gdb::optional, but that didn't work, so
	this patch simply initializes the member.

2022-04-14  Tom Tromey  <tromey@adacore.com>

	Fix regression on Windows with WOW64
	Internally at AdaCore, we recently started testing a 64-bit gdb
	debugging 32-bit processes.  This failed with gdb head, but not with
	gdb 11.

	The tests fail like this:

	     Starting program: [...].exe
	     warning: Could not load shared library symbols for WOW64_IMAGE_SECTION.
	     Do you need "set solib-search-path" or "set sysroot"?
	     warning: Could not load shared library symbols for WOW64_IMAGE_SECTION.
	     Do you need "set solib-search-path" or "set sysroot"?
	     warning: Could not load shared library symbols for NOT_AN_IMAGE.
	     Do you need "set solib-search-path" or "set sysroot"?
	     warning: Could not load shared library symbols for NOT_AN_IMAGE.
	     Do you need "set solib-search-path" or "set sysroot"?

	After some debugging and bisecting, to my surprise the bug was
	introduced by commit 183be222 ("gdb, gdbserver: make target_waitstatus
	safe").

	The problem occurs in handle_exception.  Previously the code did:

	    -  ourstatus->kind = TARGET_WAITKIND_STOPPED;
	    [...]
		 case EXCEPTION_BREAKPOINT:
	    [...]
	    -	  ourstatus->kind = TARGET_WAITKIND_SPURIOUS;
	    [...]
		   /* FALLTHROUGH */
		 case STATUS_WX86_BREAKPOINT:
		   DEBUG_EXCEPTION_SIMPLE ("EXCEPTION_BREAKPOINT");
	    -      ourstatus->value.sig = GDB_SIGNAL_TRAP;
	    [...]
	    -  last_sig = ourstatus->value.sig;

	However, in the new code, the fallthrough case does:

	    +      ourstatus->set_stopped (GDB_SIGNAL_TRAP);

	... which changes the 'kind' in 'ourstatus' after falling through.

	This patch rearranges the 'last_sig' setting to more closely match
	what was done before (this is probably not strictly needed but also
	seemed harmless), and removes the fall-through in the
	'ignore_first_breakpoint' case when __x86_64__ is defined.

2022-04-14  Tom Tromey  <tromey@adacore.com>

	Reorganize Python events documentation
	This slightly reorganizes the Python events documentation.  It hoists
	the "ThreadEvent" text out of the list of events, where it seemed to
	be misplaced.  It tidies the formatting a little bit (adding some
	vertical space for easier reading in info), fixes a typo, adds some
	missing commas, and fixes an incorrect reference to NewInferiorEvent.

2022-04-14  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove move constructor and move assignment operator from cooked_index
	Building with clang++-14, I see:

	      CXX    dwarf2/cooked-index.o
	    In file included from /home/smarchi/src/binutils-gdb/gdb/dwarf2/cooked-index.c:21:
	    /home/smarchi/src/binutils-gdb/gdb/dwarf2/cooked-index.h:172:12: error: explicitly defaulted move constructor is implicitly deleted [-Werror,-Wdefaulted-function-deleted]
	      explicit cooked_index (cooked_index &&other) = default;
	               ^
	    /home/smarchi/src/binutils-gdb/gdb/dwarf2/cooked-index.h:225:16: note: move constructor of 'cooked_index' is implicitly deleted because field 'm_storage' has a deleted move constructor
	      auto_obstack m_storage;
	                   ^
	    /home/smarchi/src/binutils-gdb/gdb/../gdbsupport/gdb_obstack.h:128:28: note: 'auto_obstack' has been explicitly marked deleted here
	      DISABLE_COPY_AND_ASSIGN (auto_obstack);
	                               ^
	    In file included from /home/smarchi/src/binutils-gdb/gdb/dwarf2/cooked-index.c:21:
	    /home/smarchi/src/binutils-gdb/gdb/dwarf2/cooked-index.h:174:17: error: explicitly defaulted move assignment operator is implicitly deleted [-Werror,-Wdefaulted-function-deleted]
	      cooked_index &operator= (cooked_index &&other) = default;
	                    ^
	    /home/smarchi/src/binutils-gdb/gdb/dwarf2/cooked-index.h:225:16: note: move assignment operator of 'cooked_index' is implicitly deleted because field 'm_storage' has a deleted move assignment operator
	      auto_obstack m_storage;
	                   ^
	    /home/smarchi/src/binutils-gdb/gdb/../gdbsupport/gdb_obstack.h:128:3: note: 'operator=' has been explicitly marked deleted here
	      DISABLE_COPY_AND_ASSIGN (auto_obstack);
	      ^
	    /home/smarchi/src/binutils-gdb/gdb/../include/ansidecl.h:425:8: note: expanded from macro 'DISABLE_COPY_AND_ASSIGN'
	      void operator= (const TYPE &) = delete
	           ^

	We explicitly make cooked_index have a default move constructor and
	move assignment operator.  But it doesn't actually happen because
	cooked_index has a field of type auto_obstack, which isn't movable.
	We don't actually need cooked_index to be movable at the moment, so
	remove those lines.

	Change-Id: Ifc1fe3d7d67e3ae1a14363d6c1869936fe80b0a2

2022-04-14  Tom Tromey  <tromey@adacore.com>

	Let std::thread check pass even without pthreads
	Currently, the configure check for std::thread relies on pthreads
	existing.  However, this means that if std::thread is implemented for
	a non-pthreads host, then the check will yield the wrong answer.  This
	happened in AdaCore internal builds.  Here, we have this GCC patch:

	    https://gcc.gnu.org/legacy-ml/gcc-patches/2019-06/msg01840.html

	... which adds mingw support to GCC's gthreads implementation, and
	also to std::thread.

	This configure change fixes this problem and enables threading for
	gdb.

2022-04-14  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: fix build errors in gdbsupport/thread-pool.h used with old gcc
	When I build gdb with gcc 8.3, there exist the following build errors,
	rename the typedef to task_t to fix them.

	  CXX      thread-pool.o
	In file included from /home/loongson/gdb.git/gdbsupport/thread-pool.cc:21:
	/home/loongson/gdb.git/gdbsupport/../gdbsupport/thread-pool.h: In member function ‘std::future<void> gdb::thread_pool::post_task(std::function<void()>&&)’:
	/home/loongson/gdb.git/gdbsupport/../gdbsupport/thread-pool.h:69:44: error: declaration of ‘task’ shadows a previous local [-Werror=shadow=local]
	     std::packaged_task<void ()> task (std::move (func));
	                                            ^~~~
	/home/loongson/gdb.git/gdbsupport/../gdbsupport/thread-pool.h:102:39: note: shadowed declaration is here
	   typedef std::packaged_task<void ()> task;
	                                       ^~~~
	/home/loongson/gdb.git/gdbsupport/../gdbsupport/thread-pool.h: In member function ‘std::future<_Res> gdb::thread_pool::post_task(std::function<T()>&&)’:
	/home/loongson/gdb.git/gdbsupport/../gdbsupport/thread-pool.h:80:41: error: declaration of ‘task’ shadows a previous local [-Werror=shadow=local]
	     std::packaged_task<T ()> task (std::move (func));
	                                         ^~~~
	/home/loongson/gdb.git/gdbsupport/../gdbsupport/thread-pool.h:102:39: note: shadowed declaration is here
	   typedef std::packaged_task<void ()> task;
	                                       ^~~~

2022-04-14  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Detect 'No MPX support'
	On openSUSE Leap 15.3, mpx support has been disabled for m32, so I run into:
	...
	(gdb) run ^M
	Starting program: outputs/gdb.arch/i386-mpx/i386-mpx ^M
	[Thread debugging using libthread_db enabled]^M
	Using host libthread_db library "/lib64/libthread_db.so.1".^M
	No MPX support^M
	...
	and eventually into all sort of fails in this and other mpx test-cases.

	Fix this by detecting the "No MPX support" message in have_mpx.

	Tested on x86_64-linux with target boards unix and unix/-m32.

2022-04-14  Sergei Trofimovich  <siarheit@google.com>

	M68K: avoid quadratic slowdlow in label alignment check
	Before the change tc-m68k maintained a list of seen labels.
	Alignment check traversed label list to resolve symbol to label.
	This caused quadratic slowdown as each symbol was checked against
	each label. Worst affected files are the ones built with debugging
	enabled as DWARF generates many labels.

	The change embeds auxiliary label information right into symbol using
	TC_SYMFIELD_TYPE.

	Before the change test from PR 29058 did not finish in 10 minutes. After
	the change it finishes in 2 seconds.

	gas/ChangeLog:

		PR 29058
		* config/tc-m68k.h (TC_SYMFIELD_TYPE): define as m68k_tc_sy.
		* config/tc-m68k.c (m68k_frob_label): Use TC_SYMFIELD_TYPE to
		store label information.

2022-04-14  caiyinyu  <caiyinyu@loongson.cn>

	ld:LoongArch: Fix glibc fail: tst-audit25a/b.
	  bfd/

	  * elfnn-loongarch.c: Add new func elf_loongarch64_hash_symbol.

2022-04-14  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-13  Simon Marchi  <simon.marchi@efficios.com>

	gdb: add ATTRIBUTE_PRINTF to complaint_interceptor::issue_complaint
	Fix this error when building with clang++-14:

	      CXX    complaints.o
	    /home/smarchi/src/binutils-gdb/gdb/complaints.c:130:65: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
	      g_complaint_interceptor->m_complaints.insert (string_vprintf (fmt, args));
	                                                                    ^~~

	Change-Id: I0ef11f970510eb8638d1651fa0d5eeecd6a9d31a

2022-04-13  Simon Marchi  <simon.marchi@efficios.com>

	gdb: fix clang build failure in msymbol_is_mips
	Building with clang++-14, I see:

	      CXX    mips-tdep.o
	    /home/smarchi/src/binutils-gdb/gdb/mips-tdep.c:453:12: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
	      return !(MSYMBOL_TARGET_FLAG_MIPS16 (msym)
	              ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	    /home/smarchi/src/binutils-gdb/gdb/mips-tdep.h:54:2: note: expanded from macro 'MSYMBOL_TARGET_FLAG_MIPS16'
	            (sym)->target_flag_1 ()
	            ^
	    /home/smarchi/src/binutils-gdb/gdb/mips-tdep.c:453:12: note: cast one or both operands to int to silence this warning
	    /home/smarchi/src/binutils-gdb/gdb/mips-tdep.h:54:2: note: expanded from macro 'MSYMBOL_TARGET_FLAG_MIPS16'
	            (sym)->target_flag_1 ()
	            ^

	That's since commit e165fcef1e7 ("gdb: remove MSYMBOL_TARGET_FLAG_{1,2}
	macros").  Fix this by using the boolean || rather than the bitwise |,
	since the new methods return bool values.  No change in behavior
	expected.

	Change-Id: Ia82664135aa25db64c29c92f5c1141859d345bf7

2022-04-13  Alexander von Gluck IV  <kallisti5@unixzen.com>

	binutils: enable PE on 32bit haiku build
		* config.bfd (x86-haiku): Add i386_pei_vec as a selectable format.

2022-04-13  Pedro Alves  <pedro@palves.net>

	Make intrusive_list_node's next/prev private
	Tromey noticed that intrusive_list_node leaves its data members
	public, which seems sub-optimal.

	This commit makes intrusive_list_node's data fields private.
	intrusive_list_iterator, intrusive_list_reverse_iterator, and
	intrusive_list do need to access the fields, so they are made friends.

	Change-Id: Ia8b306b40344cc218d423c8dfb8355207a612ac5

2022-04-13  Pedro Alves  <pedro@palves.net>

	Tidy gdb.base/parse_number.exp
	Now that Ada is able to parse & print 0xffffffffffffffff (2^64-1) in
	hex, move it to the else branch like most other languages.

	Change-Id: Ib305f6bb2b6b230a1190ea783b245b865821094c

2022-04-13  Alan Modra  <amodra@gmail.com>

	ubsan: member access within null pointer of union
	Add some nonsense to cover "undefined behaviour".

		* ldlang.c (section_for_dot): Avoid UB.

2022-04-13  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-12  Tom Tromey  <tromey@adacore.com>

	Fix bug in Ada number lexing
	On irc, Pedro pointed out that Ada couldn't properly handle
	0xffffffffffffffff.  This used to work, but is a regression due to
	some patches I wrote in the Ada lexer.  This patch fixes the bug.

2022-04-12  Simon Marchi  <simon.marchi@efficios.com>

	gdb: fix "passing NULL to memcpy" UBsan error in dwarf2/cooked-index.c
	Reading a simple file compiled with :

	    $ gcc -DONE=1 -gdwarf-4 -g3  test.c
	    $ gcc --version
	    gcc (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0

	I get:

	    Reading symbols from /tmp/cwd/a.out...
	    /home/smarchi/src/binutils-gdb/gdb/dwarf2/cooked-index.c:332:11: runtime error: null pointer passed as argument 2, which is declared to never be null

	It looks like even if the size is 0 (the size of the `entries` vector is
	0), we shouldn't be passing a NULL pointer to memcpy.  And
	`entries.data ()` returns NULL.

	Fix that by using std::vector::insert to insert the items of entries
	into m_entries.  I haven't checked, but it should essentially compile
	down to a memcpy, since the vector elements are trivially copyiable.

	Change-Id: I75f1c901e9b522e42e89eb5936e2c70d68eb21e5

2022-04-12  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: change subfile::line_vector to an std::vector
	Change this field to an std::vector to facilitate memory management.
	Since the linetable_entry array is copied into the symtab resulting from
	the subfile, it is possible to change it without changing how symtab
	stores the linetable entries (which would be a much larger change).

	There is a small change in buildsym_compunit::record_line to avoid
	accessing a now invalid linetable_entry.  Before this patch, we keep a
	pointer to the last linetable entry, pop it from the vector, and then
	read last->line.  It works with the manually-maintained array, but since
	we now use std::vector::pop_back, I am afraid that it could be flagged
	as an invalid access by the various static / dynamic analysis tools to
	access the linetable_entry object after popping it from the vector.
	Instead, record just the line number in an optional and use it.

	There are substantial changes in xcoffread.c that simplify the code, but
	I can't test them.  I was hesitant to do this change because of that,
	but I decided to send it anyway.  I don't think that an almost dead
	platform should hold back improving the code in the common parts of GDB.

	The changes in xcoffread.c are:

	 - Make arrange_linetable "arrange" the linetable passed as a parameter,
	   instead of returning possibly a new one, possibly the same one.
	 - In the "Process main file's line numbers.", I'm not too sure what
	   happens.  We get the lintable from "main_subfile", "arrange" it, but
	   then assign the result to the current subfile, obtained with
	   get_current_subfile.  I assume that the current subfile is also the
	   main one, so now I just call arrange_linetable on the main subfile's
	   line table.
	 - Remove that weird "Useless if!!!" FIXME comment.  It's been there
	   forever, but the "if" is still there, so I guess the "if" can stay
	   there.

	Change-Id: I11799006fd85189e8cf5bd3a168f8f38c2c27a80

2022-04-12  Simon Marchi  <simon.marchi@efficios.com>

	gdb: use std::vector for temporary linetable_entry array in arrange_linetable
	Reduce manual memory management and make the code a bit easier to read.
	This helps me a bit in the following patch.

	I don't have a way to test this, it's best-effort.

	Change-Id: I64af9cd756311deabc6cd95e701dfb21234a40a5

2022-04-12  Simon Marchi  <simon.marchi@efficios.com>

	gdb: change subfile::name and buildsym_compunit::m_comp_dir to strings
	Change subfile::name to be a string, for easier memory management.
	Change buildsym_compunit::m_comp_dir as well, since we move one in to
	the other at some point in patch_subfile_names, so it's easier to do
	both at the same time.  There are various NULL checks for both fields
	currently, replace them with empty checks, I think it ends up
	equivalent.

	I can't test the change in xcoffread.c, it's best-effort.

	Change-Id: I62b5fb08b2089e096768a090627ac7617e90a016

2022-04-12  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: allocate subfile with new
	Allocate struct subfile with new, initialize its fields instead of
	memset-ing it to 0.  Use a unique_ptr for the window after a subfile has
	been allocated but before it is linked in the buildsym_compunit's list
	of subfile (and therefore owned by the buildsym_compunit.

	I can't test the change in xcoffread.c, it's best-effort.  I couldn't
	find where subfiles are freed in that file, I assume they were
	intentionally (or not) leaked.

	Change-Id: Ib3b6877de31b7e65bc466682f08dbf5840225f24

2022-04-12  Simon Marchi  <simon.marchi@efficios.com>

	gdb: use decltype instead of typeof in dwarf2/read.c
	When building with -std=c++11, I get:

	  CXX    dwarf2/read.o
	/home/smarchi/src/binutils-gdb/gdb/dwarf2/read.c: In function ‘void dwarf2_build_psymtabs_hard(dwarf2_per_objfile*)’:
	/home/smarchi/src/binutils-gdb/gdb/dwarf2/read.c:7130:23: error: expected type-specifier before ‘typeof’
	 7130 |     using iter_type = typeof (per_bfd->all_comp_units.begin ());
	      |                       ^~~~~~

	This is because typeof is a GNU extension.  Use C++'s decltype keyword
	instead.

	Change-Id: Ieca2e8d25e50f71dc6c615a405a972a54de3ef14

2022-04-12  Simon Marchi  <simon.marchi@efficios.com>

	gdbsupport: use result_of_t instead of result_of in parallel-for.h
	When building with -std=c++11, I get:

	In file included from /home/smarchi/src/binutils-gdb/gdb/unittests/parallel-for-selftests.c:22:                                                                             /home/smarchi/src/binutils-gdb/gdb/../gdbsupport/parallel-for.h:134:10: error: ‘result_of_t’ is not a member of ‘std’; did you mean ‘result_of’?
	  134 |     std::result_of_t<RangeFunction (RandomIt, RandomIt)>
	      |          ^~~~~~~~~~~
	      |          result_of

	This is because result_of_t has been introduced in C++14.  Use the
	equivalent result_of<...>::type instead.

	result_of and result_of_t have been removed in C++20 though, so I think
	we'll need some patches eventually to make the code use invoke_result
	instead, depending on the C++ version.

	Change-Id: I4817f361c0ebcdd4b32976898fc368bb302b61b9

2022-04-12  Tom Tromey  <tom@tromey.com>

	Remove dwarf2_per_cu_data::v
	Now that the psymtab reader has been removed, the
	dwarf2_per_cu_data::v union is no longer needed.  Instead, we can
	simply move the members from dwarf2_per_cu_quick_data into
	dwarf2_per_cu_data and remove the "quick" object entirely.

	Delete DWARF psymtab code
	This removes the DWARF psymtab reader.

2022-04-12  Tom Tromey  <tom@tromey.com>

	Enable the new DWARF indexer
	This patch finally enables the new indexer.  It is left until this
	point in the series to avoid any regressions; in particular, it has to
	come after the changes to the DWARF index writer to avoid this
	problem.

	However, if you experiment with the series, this patch can be moved
	anywhere from the patch to wire in the new reader to this point.
	Moving this patch around is how I got separate numbers for the
	parallelization and background finalization patches.

	In the ongoing performance example, this reduces the time from the
	baseline of 1.598869 to 0.903534.

2022-04-12  Tom Tromey  <tom@tromey.com>

	Adapt .debug_names writer to new DWARF scanner
	This updates the .debug_names writer to work with the new DWARF
	scanner.

2022-04-12  Tom Tromey  <tom@tromey.com>

	Adapt .gdb_index writer to new DWARF scanner
	This updates the .gdb_index writer to work with the new DWARF scanner.
	The .debug_names writer is deferred to another patch, to make review
	simpler.

	This introduces a small hack to psyms_seen_size, but is
	inconsequential because this function will be deleted in a subsequent
	patch.

2022-04-12  Tom Tromey  <tom@tromey.com>

	Genericize addrmap handling in the DWARF index writer
	This updates the DWARF index writing code to make the addrmap-writing
	a bit more generic.  Now, it can handle multiple maps, and it can work
	using the maps generated by the new indexer.

	Note that the new addrmap_index_data::using_index field will be
	deleted in a future patch, when the rest of the DWARF psymtab code is
	removed.

2022-04-12  Tom Tromey  <tom@tromey.com>

	Change parameters to write_address_map
	To support the removal of partial symtabs from the DWARF index writer,
	this makes a small change to have write_address_map accept the address
	map as a parameter, rather than assuming it always comes from the
	per-BFD object.

	Change the key type in psym_index_map
	In order to change the DWARF index writer to avoid partial symtabs,
	this patch changes the key type in psym_index_map (and renames that
	type as well).  Using the dwarf2_per_cu_data as the key makes it
	simpler to reuse this code with the new indexer.

	Rename write_psymtabs_to_index
	We'll be removing all the psymtab code from the DWARF reader.  As a
	preparatory step, this renames write_psymtabs_to_index to avoid the
	"psymtab" name.

2022-04-12  Tom Tromey  <tom@tromey.com>

	"Finalize" the DWARF index in the background
	After scanning the CUs, the DWARF indexer merges all the data into a
	single vector, canonicalizing C++ names as it proceeds.  While not
	necessarily single-threaded, this process is currently done in just
	one thread, to keep memory costs lower.

	However, this work is all done without reference to any data outside
	of the indexes.  This patch improves the apparent performance of GDB
	by moving it to the background.  All uses of the index are then made
	to wait for this process to complete.

	In our ongoing example, this reduces the scanning time on gdb itself
	to 0.173937 (wall).  Recall that before this patch, the time was
	0.668923; and psymbol reader does this in 1.598869.  That is, at the
	end of this series, we see about a 10x speedup.

2022-04-12  Tom Tromey  <tom@tromey.com>

	Parallelize DWARF indexing
	This parallelizes the new DWARF indexer.  The indexer's storage was
	designed so that each storage object and each indexer is fully
	independent.  This setup makes it simple to scan different CUs
	independently.

	This patch creates a new cooked index storage object per thread, and
	then scans a subset of all the CUs in each such thread, using gdb's
	existing thread pool.

	In the ongoing "gdb gdb" example, this patch reduces the wall time
	down to 0.668923, from 0.903534.  (Note that the 0.903534 is the time
	for the new index -- that is, when the "enable the new index" patch is
	rebased to before this one.  However, in the final series, that patch
	appears toward the end.  Hopefully this isn't too confusing.)

2022-04-12  Tom Tromey  <tom@tromey.com>

	Pre-read DWARF section data
	Because BFD is not thread-safe, we need to be sure that any section
	data that is needed is read before trying to do any DWARF indexing in
	the background.

	This patch takes a simple approach to this -- it pre-reads the
	"info"-related sections.  This is done for the main file, but also any
	auxiliary files as well, such as the DWO file.

	This patch could be perhaps enhanced by removing some now-redundant
	calls to dwarf2_section_info::read.

2022-04-12  Tom Tromey  <tom@tromey.com>

	Introduce thread-safe handling for complaints
	This introduces a new class that can be used to make the "complaint"
	code thread-safe.  Instantiating the class installs a new handler that
	collects complaints, and then prints them all when the object is
	destroyed.

	This approach requires some locks.  I couldn't think of a better way
	to handle this, though, because the I/O system is not thread-safe.

	It seemed to me that only GDB developers are likely to enable
	complaints, and because the complaint macro handle this case already
	(before any locks are required), I reasoned that any performance
	degradation that would result here would be fine.

	As an aside about complaints -- are they useful at all?  I just ignore
	them, myself, since mostly they seem to indicate compiler problems
	that can't be solved in the GDB world anyway.  I'd personally prefer
	them to be in a separate tool, like a hypothetical 'dwarflint'.

2022-04-12  Tom Tromey  <tom@tromey.com>

	Wire in the new DWARF indexer
	This wires the new DWARF indexer into the existing reader code.  That
	is, this patch makes the modification necessary to enable the new
	indexer.  It is not actually enabled by this patch -- that will be
	done later.

	I did a bit of performance testing for this patch and a few others.  I
	copied my built gdb to /tmp, so that each test would be done on the
	same executable.  Then, each time, I did:

	    $ ./gdb -nx
	    (gdb) maint time 1
	    (gdb) file /tmp/gdb

	This patch is the baseline and on one machine came in at 1.598869 wall
	time.

2022-04-12  Tom Tromey  <tom@tromey.com>

	Implement quick_symbol_functions for cooked DWARF index
	This implements quick_symbol_functions for the cooked DWARF index.
	This is the code that interfaces between the new index and the rest of
	gdb.  Cooked indexes still aren't created by anything.

	For the most part this is straightforward.  It shares some concepts
	with the existing DWARF indices.  However, because names are stored
	pre-split in the cooked index, name lookup here is necessarily
	different; see expand_symtabs_matching for the gory details.

2022-04-12  Tom Tromey  <tom@tromey.com>

	The new DWARF indexer
	This patch adds the code to index DWARF.  This is just the scanner; it
	reads the DWARF and constructs the index, but nothing calls it yet.

	The indexer is split into two parts: a storage object and an indexer
	object.  This is done to support the parallelization of this code -- a
	future patch will create a single storage object per thread.

2022-04-12  Tom Tromey  <tom@tromey.com>

	Introduce the new DWARF index class
	This patch introduces the new DWARF index class.  It is called
	"cooked" to contrast against a "raw" index, which is mapped from disk
	without extra effort.

	Nothing constructs a cooked index yet.  The essential idea here is
	that index entries are created via the "add" method; then when all the
	entries have been read, they are "finalize"d -- name canonicalization
	is performed and the entries are added to a sorted vector.

	Entries use the DWARF name (DW_AT_name) or linkage name, not the full
	name as is done for partial symbols.

	These two facets -- the short name and the deferred canonicalization
	-- help improve the performance of this approach.  This will become
	clear in later patches, when parallelization is added.

	Some special code is needed for Ada, because GNAT only emits mangled
	("encoded", in the Ada lingo) names, and so we reconstruct the
	hierarchical structure after the fact.  This is also done in the
	finalization phase.

	One other aspect worth noting is that the way the "main" function is
	found is different in the new code.  Currently gdb will notice
	DW_AT_main_subprogram, but won't recognize "main" during reading --
	this is done later, via explicit symbol lookup.  This is done
	differently in the new code so that finalization can be done in the
	background without then requiring a synchronization to look up the
	symbol.

2022-04-12  Tom Tromey  <tom@tromey.com>

	Update skip_one_die for new abbrev properties
	This updates skip_one_die to speed it up in the cases where either
	sibling_offset or size_if_constant are set.

2022-04-12  Tom Tromey  <tom@tromey.com>

	Statically examine abbrev properties
	The new DIE scanner works more or less along the lines indicated by
	the text for the .debug_names section, disregarding the bugs in the
	specification.

	While working on this, I noticed that whether a DIE is interesting is
	a static property of the DIE's abbrev.  It also turns out that many
	abbrevs imply a static size for the DIE data, and additionally that
	for many abbrevs, the sibling offset is stored at a constant offset
	from the start of the DIE.

	This patch changes the abbrev reader to analyze each abbrev and stash
	the results on the abbrev.  These combine to speed up the new indexer.
	If the "interesting" flag is false, GDB knows to skip the DIE
	immediately.  If the sibling offset is statically known, skipping can
	be done without reading any attributes; and in some other cases, the
	DIE can be skipped using simple arithmetic.

2022-04-12  Tom Tromey  <tom@tromey.com>

	Introduce DWARF abbrev cache
	The replacement for the DWARF psymbol reader works in a somewhat
	different way.  The current reader reads and stores all the DIEs that
	might be interesting.  Then, if it is missing a DIE, it re-scans the
	CU and reads them all.  This approach is used for both intra- and
	inter-CU references.

	I instrumented the partial DIE hash to see how frequently it was used:

	    [  0] -> 1538165
	    [  1] ->    4912
	    [  2] ->   96102
	    [  3] ->     175
	    [  4] ->     244

	That is, most DIEs are never used, and some are looked up twice -- but
	this is just an artifact of the implementation of
	partial_die_info::fixup, which may do two lookups.

	Based on this, the new implementation doesn't try to store any DIEs,
	but instead just re-scans them on demand.  In order to do this,
	though, it is convenient to have a cache of DWARF abbrevs.  This way,
	if a second CU is needed to resolve an inter-CU reference, the abbrevs
	for that CU need only be computed a single time.

2022-04-12  Tom Tromey  <tom@tromey.com>

	Add "fullname" handling to file_and_directory
	This changes the file_and_directory object to be able to compute and
	cache the "fullname" in the same way that is done by other code, like
	the psymtab reader.

	Specialize std::hash for gdb_exception
	This adds a std::hash specialization for gdb_exception.  This lets us
	store these objects in a hash table, which is used later in this
	series to de-duplicate the exception output from multiple threads.

	Return vector of results from parallel_for_each
	This changes gdb::parallel_for_each to return a vector of the results.
	However, if the passed-in function returns void, the return type
	remains 'void'.  This functionality is used later, to parallelize the
	new indexer.

	Add batching parameter to parallel_for_each
	parallel_for_each currently requires each thread to process at least
	10 elements.  However, when indexing, it's fine for a thread to handle
	just a single CU.  This patch parameterizes this, and updates the one
	user.

	Refactor build_type_psymtabs_reader
	The new DWARF scanner needs to save the entire cutu_reader object, not
	just parts of it.  In order to make this possible, this patch
	refactors build_type_psymtabs_reader.  This change is done separately
	because it is easy to review in isolation and it helps make the later
	patches smaller.

	Add new overload of dwarf5_djb_hash
	This adds a new overload of dwarf5_djb_hash.  This is used in
	subsequent patches.

2022-04-12  Tom Tromey  <tom@tromey.com>

	Add name splitting
	The new DWARF index code works by keeping names pre-split.  That is,
	rather than storing a symbol name like "a::b::c", the names "a", "b",
	and "c" will be stored separately.

	This patch introduces some helper code to split a full name into its
	components.

2022-04-12  Tom Tromey  <tom@tromey.com>

	Let skip_one_die not skip children
	This patch adds an option to skip_one_die that causes it not to skip
	child DIEs.  This is needed in the new scanner.

	Allow ada_decode not to decode operators
	The new DWARF scanner records names as they appear in DWARF.  However,
	because Ada is unusual, it also decodes the Ada names to synthesize
	package components for them.  In order for this to work out properly,
	gdb also needs a mode where ada_decode can be instructed not to decode
	Ada operator names.  That is what this patch implements.

	Refactor dwarf2_get_pc_bounds
	This changes dwarf2_get_pc_bounds so that it does not directly access
	a psymtab or psymtabs_addrmap.  Instead, both the addrmap and the
	desired payload are passed as parameters.  This makes it suitable to
	be used by the new indexer.

	Add dwarf2_per_cu_data::addresses_seen
	This adds a new member to dwarf2_per_cu_data that indicates whether
	addresses have been seen for this CU.  This is then set by the
	.debug_aranges reader.  The idea here is to detect when a CU does not
	have address information, so that the new indexer will know to do
	extra scanning in that case.

	Fix latent bug in read_addrmap_from_aranges
	Tom de Vries found a failure that we tracked down to a latent bug in
	read_addrmap_from_aranges (previously create_addrmap_from_aranges).
	The bug is that this code can erroneously reject .debug_aranges when
	dwz is in use, due to CUs at duplicate offsets.  Because aranges can't
	refer to a CU coming from the dwz file, the fix is to simply skip such
	CUs in the loop.

	Split create_addrmap_from_aranges
	This patch splits create_addrmap_from_aranges into a wrapper function
	and a worker function.  The worker function is then used in a later
	patch.

2022-04-12  Tom Tromey  <tom@tromey.com>

	Allow thread-pool.h to work without threads
	thread-pool.h requires CXX_STD_THREAD in order to even be included.
	However, there's no deep reason for this, and during review we found
	that one patch in the new DWARF indexer series unconditionally
	requires the thread pool.

	Because the thread pool already allows a task to be run in the calling
	thread (for example if it is configured to have no threads in the
	pool), it seemed straightforward to make this code ok to use when host
	threads aren't available at all.

	This patch implements this idea.  I built it on a thread-less host
	(mingw, before my recent configure patch) and verified that the result
	builds.

	After the thread-pool change, parallel-for.h no longer needs any
	CXX_STD_THREAD checks at all, so this patch removes these as well.

2022-04-12  Nick Clifton  <nickc@redhat.com>

	Rebase the zlib sources to the 1.2.12 release

2022-04-12  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/stap-probe.exp with read1
	When running test-case gdb.base/stap-probe.exp with make target check-read1, I
	run into this and similar:
	...
	FAIL: gdb.base/stap-probe.exp: without semaphore, not optimized: \
	  info probes stap (timeout)
	...

	Fix this by using gdb_test_lines instead of gdb_test.

	Tested on x86_64-linux.

2022-04-12  Tom Tromey  <tom@tromey.com>

	Add C++ "save gdb-index" test
	I found a bug in the new DWARF reader series, related to the handling
	of enumerator names.  This bug caused a crash, so this patch adds a
	regression test for this particular case.  I'm checking this in.

2022-04-12  Tom Tromey  <tromey@adacore.com>

	Remove "Ada Settings" node from the manual
	A while back, I sent a patch to unify the Ada varsize-limit setting
	with the more generic max-value-size:

	https://sourceware.org/pipermail/gdb-patches/2021-September/182004.html

	However, it turns out I somehow neglected to send part of the patch.
	Internally, I also removed the "Ada Settings" node from the manual, as
	it only documents the obsolete setting.

	This patch removes this text.

2022-04-12  Tom Tromey  <tromey@adacore.com>

	Require GNAT debug info for some Ada tests
	A few Ada tests require some debug info in the GNAT runtime.  When run
	without this info, these tests can't pass.  This patch changes these
	tests to detect this situation and stop with "untested".

2022-04-12  Nick Clifton  <nickc@redhat.com>

	Stop strip from removing debuglink sections.
		PR 28992
		* objcopy.c (is_strip_section_1): Do not delete debuglink sections
		when stripping debug information.

2022-04-12  Jan Beulich  <jbeulich@suse.com>

	gas: new_logical_line{,_flags}() can return "void"
	With the sole user of the return value gone, convert the return type to
	void. This in turn allows simplifying another construct, by moving it
	slightly later in the function.

	gas: drop .appfile and .appline
	These were used originally to represent "# <line> <file>" constructs
	inserted by (typically) compilers when pre-processing. Quite some time
	ago they were replaced by .linefile though. Since the original
	directives were never documented, we ought to be able to remove support
	for them. As a result in a number of case function parameter aren't used
	anymore and can hence be dropped.

2022-04-12  Jan Beulich  <jbeulich@suse.com>

	gas: further adjust file/line handling for .macro
	Commit 7992631e8c0b ("gas/Dwarf: improve debug info generation from .irp
	and alike blocks"), while dealing okay with actual assembly source files
	not using .file/.line and alike outside but not inside of .macro, has
	undue effects when the logical file/line pair was already overridden:
	Line numbers would continuously increment while processing the expanded
	macro, while the goal of the PR gas/16908 workaround is to keep the
	expansion associated with the line invoking the macro. However, as soon
	as enough state was overridden _inside_ the macro to cause as_where() to
	no longer fall back top as_where_physical(), honor this by resuming the
	bumping of the logical line number.

	Note that from_sb_is_expansion's initializer was 1 for an unknown
	reason. While renaming the variable and changing its type, also change
	the initializer to "expanding_none", which would have been "0" in the
	original code. Originally the initializer value itself wasn't ever used
	anyway (requiring sb_index != -1), as it necessarily had changed in
	input_scrub_include_sb() alongside setting sb_index to other than -1.

	Strictly speaking input_scrub_insert_line() perhaps shouldn't use
	expanding_none, yet none of the other enumerators fit there either. And
	then strictly speaking that function probably shouldn't exist in the
	first place. It's used only by tic54x.

2022-04-12  Jan Beulich  <jbeulich@suse.com>

	gas: further adjust file/line handling for .irp and alike
	Commit 7992631e8c0b ("gas/Dwarf: improve debug info generation from .irp
	and alike blocks"), while dealing okay with actual assembly source files
	not using .file/.line and alike outside but not inside of .irp et al,
	has undue effects when the logical file/line pair was already
	overridden: Line numbers would continuously increment upon every
	iteration, thus potentially getting far off. Furthermore it left it to
	the user to actually insert .file/.line inside such constructs. Note
	though that before aforementioned change things weren't pretty either:
	Diagnostics (and debug info) would be associated with the directive
	terminating the iteration construct, rather than with the actual lines.

	Handle this automatically by simply latching the present line and then
	re-instating coordinates first thing on every iteration; note that the
	file can't change from what was previously pushed on the scrubber's
	state stack, and hence can be taken from there by using a new flavor of
	.linefile (which is far better memory-footprint-wise than recording the
	full path in the inserted directive). (This then leaves undisturbed any
	file/line control occurring in the body of the construct, as these will
	only be seen and processed afterwards.)

2022-04-12  Jan Beulich  <jbeulich@suse.com>

	x86: make {disp16} work similarly to {disp32}
	In a few places {disp32} was handled specially when really {disp16}
	wants handling just the same.

2022-04-12  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng doesn't build with gcc 5.5
	gprofng/ChangeLog
	2022-04-07  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		PR gprofng/29026
		* configure.ac: Check version of bison.
		* src/Makefile.am (QLParser.yy): Run bison
		* src/QLParser.yy: Adapted for bison 3.04 or later.
		* src/DbeSession.cc: make some params const.
		* src/DbeSession.h: Likewise.
		* configure: Regenerate.
		* Makefile.in: Regenerate.
		* src/Makefile.in: Regenerate.
		* src/QLParser.tab.cc: Deleted.
		* src/QLParser.tab.hh: Deleted.
		* doc/Makefile.in: Regenerate.
		* gp-display-html/Makefile.in: Regenerate.
		* libcollector/configure: Regenerate.

2022-04-12  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-11  John Baldwin  <jhb@FreeBSD.org>

	i386-fbsd-nat: Remove two unused variables.
	Earlier versions of the change in
	1285ce8629b37f800bf21731ee7c7a8b1b8d0233 used this variable, but not
	the final version that landed.

2022-04-11  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove MSYMBOL_TARGET_FLAG_{1,2} macros
	Replace with equivalent getter/setter macros.

	Change-Id: I1042564dd47347337374762bd64ec31b5c573ee2

2022-04-11  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove minimal symbol size macros
	Remove MSYMBOL_HAS_SIZE, MSYMBOL_SIZE and SET_MSYMBOL_SIZE, replace them
	with equivalent methods.

	Change-Id: I6ee1cf82df37e58dff52ea6568ceb4649c7d7538

2022-04-11  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove MSYMBOL_TYPE macro
	Add a getter and a setter for a minimal symbol's type.  Remove the
	corresponding macro and adjust all callers.

	Change-Id: I89900df5ffa5687133fe1a16b2e0d4684e67a77d

2022-04-11  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove symbol value macros
	Remove all macros related to getting and setting some symbol value:

	    #define SYMBOL_VALUE(symbol)           (symbol)->value.ivalue
	    #define SYMBOL_VALUE_ADDRESS(symbol)                         \
	    #define SET_SYMBOL_VALUE_ADDRESS(symbol, new_value)    \
	    #define SYMBOL_VALUE_BYTES(symbol)     (symbol)->value.bytes
	    #define SYMBOL_VALUE_COMMON_BLOCK(symbol) (symbol)->value.common_block
	    #define SYMBOL_BLOCK_VALUE(symbol)     (symbol)->value.block
	    #define SYMBOL_VALUE_CHAIN(symbol)     (symbol)->value.chain
	    #define MSYMBOL_VALUE(symbol)          (symbol)->value.ivalue
	    #define MSYMBOL_VALUE_RAW_ADDRESS(symbol) ((symbol)->value.address + 0)
	    #define MSYMBOL_VALUE_ADDRESS(objfile, symbol)                         \
	    #define BMSYMBOL_VALUE_ADDRESS(symbol) \
	    #define SET_MSYMBOL_VALUE_ADDRESS(symbol, new_value)   \
	    #define MSYMBOL_VALUE_BYTES(symbol)    (symbol)->value.bytes
	    #define MSYMBOL_BLOCK_VALUE(symbol)    (symbol)->value.block

	Replace them with equivalent methods on the appropriate objects.

	Change-Id: Iafdab3b8eefc6dc2fd895aa955bf64fafc59ed50

2022-04-11  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	gdb/doc: add section about Fortran intrinsic functions and types
	The earlier version of this document had no sections about the
	available Fortran intrinsic functions or the Fortran builtin types.

	I added two sections 'Fortran intrinsics' and 'Fortran types' to
	document the available Fortran language features.  The subsection
	'Fortran Defaults' has been integrated into the Fortran subsection.

2022-04-11  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	gdb/fortran/testsuite: add complex from integers test
	When working on the files I noted that there was no actual test for a
	COMPLEX built from two INTEGERS.  I added that now for completion.

2022-04-11  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	gdb/fortran: rewrite intrinsic handling and add some missing overloads
	The operators FLOOR, CEILING, CMPLX, LBOUND, UBOUND, and SIZE accept
	(some only with Fortran 2003) the optional parameter KIND.  This
	parameter determines the kind of the associated return value.  So far,
	implementation of this kind parameter has been missing in GDB.
	Additionally, the one argument overload for the CMPLX intrinsic function
	was not yet available.

	This patch adds overloads for all above mentioned functions to the
	Fortran intrinsics handling in GDB.

	It re-writes the intrinsic function handling section to use the helper
	methods wrap_unop_intrinsic/wrap_binop_intrinsic/wrap_triop_intrinsic.
	These methods define the action taken when a Fortran intrinsic function
	is called with a certain amount of arguments (1/2/3). The helper methods
	fortran_wrap2_kind and fortran_wrap3_kind have been added as equivalents
	to the existing wrap and wrap2 methods.

	After adding more overloads to the intrinsics handling, some of the
	operation names were no longer accurate.  E.g. UNOP_FORTRAN_CEILING
	has been renamed to FORTRAN_CEILING as it is no longer a purely unary
	intrinsic function.  This patch also introduces intrinsic functions with
	one, two, or three arguments to the Fortran parser and the
	UNOP_OR_BINOP_OR_TERNOP_INTRINSIC token has been added.

2022-04-11  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	gdb/fortran: rename f77_keywords to f_keywords
	Rename f77_keywords to f_keywords since some of the introduced keywords
	in the array are f90 only.

2022-04-11  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	gdb/fortran: Change GDB print for fortran default types
	Currently, when asking GDB to print the type of a Fortran default type
	such as INTEGER or REAL, GDB will return the default name of that type,
	e.g. "integer"/"real":

	   (gdb) ptype integer
	   type = integer
	   (gdb) ptype real
	   type = real

	For LOGICAL and COMPLEX it would return the actual underlying types

	   (gdb) ptype logical
	   type = logical*4
	   (gdb) ptype complex
	   type = complex*4

	Similarly, GDB would print the default integer type for the underlying
	default type:

	   (gdb) ptype integer*4
	   type = integer
	   (gdb) ptype real*4
	   type = real
	   (gdb) ptype logical
	   type = logical*4
	   (gdb) ptype complex*4
	   type = complex*4

	This is inconsistent and a bit confusing.  Both options somehow indicate
	what the internal underlying type for the default type is - but I think
	the logical/complex version is a bit clearer.

	Consider again:

	   (gdb) ptype integer
	   type = integer

	This indicates to a user that the type of "integer" is Fortran's default
	integer type.  Without examining "ptype integer*4" I would expect, that
	any variable declared integer in the actual code would also fit into a
	GDB integer.  But, since we cannot adapt out internal types to the
	compiler flags used at compile time of a debugged binary, this might be
	wrong.  Consider debugging Fortran code compiled with GNU and e.g. the
	"-fdefault-integer-8" flag.  In this case the gfortran default integer
	would be integer*8 while GDB internally still would use a builtin_integer,
	so an integer of the size of an integer*4 type.  On the other hand having
	GDB print

	   (gdb) ptype integer
	   type = integer*4

	makes this clearer.  I would still be tempted to fit a variable declared
	integer in the code into a GDB integer - but at least ptype would
	directly tell me what is going on.  Note, that when debugging a binary
	compiled with "-fdefault-integer-8" a user will always see the actual
	underlying type of any variable declared "integer" in the Fortran code.
	So having the code

	   program test
	     integer :: a = 5
	     print *, a ! breakpt
	   end program test

	will, when breaking at breakpt print

	   (gdb) ptype var
	   type = integer(kind=4)

	or

	   (gdb) ptype var
	   type = integer(kind=8)

	depending on the compiler flag.

	This patch changes the outputs for the REAL and INTEGER default types to
	actually print the internally used type over the default type name.

	The new behavior for the above examples is:

	   (gdb) ptype integer
	   type = integer*4
	   (gdb) ptype integer*4
	   type = integer*4

	Existing testcases have been adapted to reflect the new behavior.

2022-04-11  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	gdb/fortran: clean-up Fortran intrinsic types
	The currently implemented intrinsic type handling for Fortran missed some
	tokens and their parsing.  While still not all Fortran type kinds are
	implemented this patch at least makes the currently handled types
	consistent.  As an example for what this patch does, consider the
	intrinsic type INTEGER.  GDB implemented the handling of the
	keywords "integer" and "integer_2" but missed "integer_4" and "integer_8"
	even though their corresponding internal types were already available as
	the Fortran builtin types builtin_integer and builtin_integer_s8.
	Similar problems applied to LOGICAL, REAL, and COMPLEX.  This patch adds
	all missing tokens and their parsing.  Whenever a section containing the
	type handling was touched, it also was reordered to be in a more easy to
	grasp order.  All INTEGER/REAL/LOGICAL/COMPLEX types were grouped
	together and ordered ascending in their size making a missing one more
	easy to spot.

	Before this change GDB would print the following when tyring to use the
	INTEGER keywords:

	   (gdb) set language fortran
	   (gdb) ptype integer*1
	   unsupported kind 1 for type integer
	   (gdb) ptype integer_1
	   No symbol table is loaded.  Use the "file" command.
	   (gdb) ptype integer*2
	   type = integer*2
	   (gdb) ptype integer_2
	   type = integer*2
	   (gdb) ptype integer*4
	   type = integer
	   (gdb) ptype integer_4
	   No symbol table is loaded.  Use the "file" command.
	   (gdb) ptype integer*8
	   type = integer*8
	   (gdb) ptype integer_8
	   No symbol table is loaded.  Use the "file" command.
	   (gdb) ptype integer
	   type = integer

	With this patch all keywords are available and the GDB prints:

	   (gdb) set language fortran
	   (gdb) ptype integer*1
	   type = integer*1
	   (gdb) ptype integer_1
	   type = integer*1
	   (gdb) ptype integer*2
	   type = integer*2
	   (gdb) ptype integer_2
	   type = integer*2
	   (gdb) ptype integer*4
	   type = integer*4
	   (gdb) ptype integer_4
	   type = integer*4
	   (gdb) ptype integer*8
	   type = integer*8
	   (gdb) ptype integer_8
	   type = integer*8
	   (gdb) ptype integer
	   type = integer

	The described changes have been applied to INTEGER, REAL, COMPLEX,
	and LOGICAL. Existing testcases have been adapted to reflect the
	new behavior.  Tests for formerly missing types have been added.

2022-04-11  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	gdb/fortran: change default logical type to builtin_logical
	According to the Fortran standard, logical is of the size of a
	'single numeric storage unit' (just like real and integer). For
	gfortran, flang and ifx/ifort this storage unit (or the default
	logical type) is of size kind 4, actually occupying 4 bytes of
	storage, and so the default type for logical expressions in
	Fortran should probably also be Logical*4 and not Logical*2.  I
	adapted GDB's behavior to be in line with
	gfortran/ifort/ifx/flang.

	gdb/fortran: reformat build_fortran_types in f-lang.c
	Add a few newlines after the type definitions and remove some
	unnecessary linebreaks.

2022-04-11  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	gdb/fortran: fix complex type in Fortran builtin types
	Before this patch things like

	  (gdb) ptype complex*8
	  complex*16
	  (gdb) ptype complex*4
	  complex*8

	were possible in GDB, which seems confusing for a user.  The reason
	is a mixup in the implementation of the Fortran COMPLEX type.  In
	Fortran the "*X" after a type would normally (I don't think this
	is language required) specify the type's size in memory.  For the
	COMPLEX type the kind parameters usually (at least for GNU, Intel, Flang)
	specify not the size of the whole type but the size of the individual
	two REALs used to form the COMPLEX.  Thus, a COMPLEX*4 will usually
	consist of two REAL*4s.  Internally this type was represented by a
	builtin_complex_s8 - but here I think the s8 actually meant the raw
	size of the type.  This is confusing and I renamed the types (e.g.
	builting_complex_s8 became builtin_complex_s4 according to its most
	common useage) and their printed names to their language equivalent.
	Additionally, I added the default COMPLEX type "COMPLEX" being the same
	as a COMPLEX*4 (as is normally the case) and removed the latter.  I added
	a few tests for this new behavior as well.

	The new behavior is

	  (gdb) ptype complex*8
	  complex*8
	  (gdb) ptype complex*4
	  complex*4

2022-04-11  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	gdb/f-lang: remove hidden ^L characters

	gdb/f-lang: add Integer*1 to Fortran builtin types
	Add builtin_integer_s1 of size TARGET_CHAR_BIT to Fortran builtin types.

2022-04-11  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/annota1.exp with pie
	Since commit 359efc2d894 ("[gdb/testsuite] Make gdb.base/annota1.exp more
	robust") we see this fail with target board unix/-fPIE/-pie:
	...
	FAIL: gdb.base/annota1.exp: run until main breakpoint (timeout)
	...

	The problem is that the commit makes the number and order of matched
	annotations fixed, while between target boards unix and unix/-fPIE/-pie there
	is a difference:
	...
	 \032\032post-prompt
	 Starting program: outputs/gdb.base/annota1/annota1

	+\032\032breakpoints-invalid
	+
	 \032\032starting

	 \032\032frames-invalid
	...

	Fix this by optionally matching the additional annotation.

	Tested on x86_64-linux.

2022-04-11  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.dwarf2/dw2-lines.exp for m32 pie
	As reported in PR29043, when running test-case gdb.dwarf2/dw2-lines.exp with
	target board unix/-m32/-fPIE/-pie, we run into:
	...
	Breakpoint 2, 0x56555540 in bar ()^M
	(gdb) PASS: gdb.dwarf2/dw2-lines.exp: cv=2: cdw=32: lv=2: ldw=32: \
	  continue to breakpoint: foo \(1\)
	next^M
	Single stepping until exit from function bar,^M
	which has no line number information.^M
	0x56555587 in main ()^M
	(gdb) FAIL: gdb.dwarf2/dw2-lines.exp: cv=2: cdw=32: lv=2: ldw=32: \
	  next to foo (2)
	...

	The problem is that the bar breakpoint ends up at an unexpected location
	because:
	- the synthetic debug info is incomplete and doesn't provide line info
	  for the prologue part of the function, so consequently gdb uses the i386
	  port prologue skipper to get past the prologue
	- the i386 port prologue skipper doesn't get past a get_pc_thunk call.

	Work around this in the test-case by breaking on bar_label instead.

	Tested on x86_64-linux with target boards unix, unix/-m32, unix/-fPIE/-pie and
	unix/-m32/-fPIE/-pie.

2022-04-11  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-10  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-09  Tom Tromey  <tom@tromey.com>

	Remove MSYMBOL_VALUE_CHAIN
	I noticed that MSYMBOL_VALUE_CHAIN is unused, so this patch removes it.

2022-04-09  Alan Modra  <amodra@gmail.com>

	Rearrange struct bfd_section a little
	For better packing on 64-bit hosts.

		* section.c (struct bfd_section): Move next and prev field earlier.
		Move alignment_power later.
		(BFD_FAKE_SECTION): Adjust to suit.
		* bfd-in2.h: Regenerate.

2022-04-09  Alan Modra  <amodra@gmail.com>

	Don't run pr27228 test for hppa
	As the comment says, hppa doesn't support use of BFD_RELOC_* in
	.reloc directives.  Using xfail can result in a spurious XPASS result
	as BFD_RELOC values change.

		* testsuite/gas/elf/pr27228.d: Change xfail to notarget for hppa.

2022-04-09  Alan Modra  <amodra@gmail.com>

	Correct nds32 readelf reloc numbers
		* readelf.c (is_32bit_abs_reloc, is_16bit_abs_reloc): Comment fixes.
		(is_none_reloc): Correct nds32 reloc numbers.

2022-04-09  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-08  Fangrui Song  <i@maskray.me>

	gas: Port "copy st_size only if unset" to aarch64 and riscv
	And disable the new test gas/elf/size.s for alpha which uses its own
	.set, for hppa*-*-hpux* which does not allow .size before declaration.

2022-04-08  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: fprintf_styled_func not inizialized for disassembler
	gprofng/ChangeLog
	2022-04-07  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		* libcollector/unwind.c: inizialize fprintf_styled_func.
		* src/Disasm.cc: Likewise.

2022-04-08  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: zlib handling
	gprofng/ChangeLog
	2022-04-06  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		* configure.ac: Add AM_ZLIB.
		* src/Makefile.am: Add $(ZLIBINC) and $(ZLIB).
		* gprofng/src/DbeSession.h: Likewise.
		* configure: Regenerate.
		* Makefile.in: Regenerate.
		* doc/Makefile.in: Regenerate.
		* gp-display-html/Makefile.in: Regenerate.
		* src/Makefile.in: Regenerate.

2022-04-08  Pedro Alves  <pedro@palves.net>

	gdb: Avoid undefined shifts, fix Go shifts
	I noticed that a build of GDB with GCC + --enable-ubsan, testing
	against GDBserver showed this GDB crash:

	  (gdb) PASS: gdb.trace/trace-condition.exp: trace: 0x00abababcdcdcdcd << 46 == 0x7373400000000000: advance to trace begin
	  tstart
	  ../../src/gdb/valarith.c:1365:15: runtime error: left shift of 48320975398096333 by 46 places cannot be represented in type 'long int'
	  ERROR: GDB process no longer exists
	  GDB process exited with wait status 269549 exp9 0 1
	  UNRESOLVED: gdb.trace/trace-condition.exp: trace: 0x00abababcdcdcdcd << 46 == 0x7373400000000000: start trace experiment

	The problem is that, "0x00abababcdcdcdcd << 46" is an undefined signed
	left shift, because the result is not representable in the type of the
	lhs, which is signed.  This actually became defined in C++20, and if
	you compile with "g++ -std=c++20 -Wall", you'll see that GCC no longer
	warns about it, while it warns if you specify prior language versions.

	While at it, there are a couple other situations that are undefined
	(and are still undefined in C++20) and result in GDB dying: shifting
	by a negative ammount, or by >= than the bit size of the promoted lhs.
	For the latter, GDB shifts using (U)LONGEST internally, so you have to
	shift by >= 64 bits to see it:

	 $ gdb --batch -q -ex "p 1 << -1"
	 ../../src/gdb/valarith.c:1365:15: runtime error: shift exponent -1 is negative
	 $ # gdb exited

	 $ gdb --batch -q -ex "p 1 << 64"
	 ../../src/gdb/valarith.c:1365:15: runtime error: shift exponent 64 is too large for 64-bit type 'long int'
	 $ # gdb exited

	Also, right shifting a negative value is implementation-defined
	(before C++20, after which it is defined).  For this, I chose to
	change nothing in GDB other than adding tests, as I don't really know
	whether we need to do anything.  AFAIK, most implementations do an
	arithmetic right shift, and it may be we don't support any host or
	target that behaves differently.  Plus, this becomes defined in C++20
	exactly as arithmetic right shift.

	Compilers don't error out on such shifts, at best they warn, so I
	think GDB should just continue doing the shifts anyhow too.

	Thus:

	- Adjust scalar_binop to avoid the undefined paths, either by adding
	  explicit result paths, or by casting the lhs of the left shift to
	  unsigned, as appropriate.

	  For the shifts by a too-large count, I made the result be what you'd
	  get if you split the large count in a series of smaller shifts.
	  Thus:

	     Left shift, positive or negative lhs:

	       V << 64
		 =>  V << 16 << 16 << 16 << 16
		   => 0

	     Right shift, positive lhs:

	       Vpos >> 64
		 =>  Vpos >> 16 >> 16 >> 16 >> 16
		   => 0

	     Right shift, negative lhs:

	       Vneg >> 64
		 =>  Vneg >> 16 >> 16 >> 16 >> 16
		   => -1

	  This is actually Go's semantics (the compiler really emits
	  instructions to make it so that you get 0 or -1 if you have a
	  too-large shift).  So for that language GDB does the shift and
	  nothing else.  For other C-like languages where such a shift is
	  undefined, GDB warns in addition to performing the shift.

	  For shift by a negative count, for Go, this is a hard error.  For
	  other languages, since their compilers only warn, I made GDB warn
	  too.  The semantics I chose (we're free to pick them since this is
	  undefined behavior) is as-if you had shifted by the count cast to
	  unsigned, thus as if you had shifted by a too-large count, thus the
	  same as the previous scenario illustrated above.

	  Examples:

	    (gdb) set language go
	    (gdb) p 1 << 100
	    $1 = 0
	    (gdb) p -1 << 100
	    $2 = 0
	    (gdb) p 1 >> 100
	    $3 = 0
	    (gdb) p -1 >> 100
	    $4 = -1
	    (gdb) p -2 >> 100
	    $5 = -1
	    (gdb) p 1 << -1
	    left shift count is negative

	    (gdb) set language c
	    (gdb) p -2 >> 100
	    warning: right shift count >= width of type
	    $6 = -1
	    (gdb) p -2 << 100
	    warning: left shift count >= width of type
	    $7 = 0
	    (gdb) p 1 << -1
	    warning: left shift count is negative
	    $8 = 0
	    (gdb) p -1 >> -1
	    warning: right shift count is negative
	    $9 = -1

	- The warnings' texts are the same as what GCC prints.

	- Add comprehensive tests in a new gdb.base/bitshift.exp testcase, so
	  that we exercise all these scenarios.

	Change-Id: I8bcd5fa02de3114b7ababc03e65702d86ec8d45d

2022-04-08  Pedro Alves  <pedro@palves.net>

	Fix undefined behavior in the Fortran, Go and Pascal number parsers
	This commit ports these two fixes to the C parser:

	  commit ebf13736b42af47c9907b5157c8e80c78dbe00e1
	  CommitDate: Thu Sep 4 21:46:28 2014 +0100

	      parse_number("0") reads uninitialized memory

	  commit 20562150d8a894bc91657c843ee88c508188e32e
	  CommitDate: Wed Oct 3 15:19:06 2018 -0600

	      Avoid undefined behavior in parse_number

	... to the Fortran, Go, and Fortran number parsers, fixing the same
	problems there.

	Also add a new testcase that exercises printing 0xffffffffffffffff
	(max 64-bit) in all languages, which crashes a GDB built with UBsan
	without the fix.

	I moved get_set_option_choices out of all-architectures.exp.tcl to
	common code to be able to extract all the supported languages.  I did
	a tweak to it to generalize it a bit -- you now have to pass down the
	"set" part of the command as well.  This is so that the proc can be
	used with "maintenance set" commands as well in future.

	Change-Id: I8e8f2fdc1e8407f63d923c26fd55d98148b9e16a

2022-04-08  Nick Clifton  <nickc@redhat.com>

	Debug info for function in Windows PE binary on wrong instruction
		PR 29038
		* coffgen.c (coff_find_nearest_line_with_names): Fix typo
		retrieving saved bias.

2022-04-08  Simon Marchi  <simon.marchi@efficios.com>

	Pass PKG_CONFIG_PATH down from top-level Makefile
	[Sending to binutils, gdb-patches and gcc-patches, since it touches the
	top-level Makefile/configure]

	I have my debuginfod library installed in a non-standard location
	(/opt/debuginfod), which requires me to set
	PKG_CONFIG_PATH=/opt/debuginfod/lib/pkg-config.  If I just set it during
	configure:

	    $ PKG_CONFIG_PATH=/opt/debuginfod/lib/pkg-config ./configure --with-debuginfod
	    $ make

	or

	    $ ./configure --with-debuginfod PKG_CONFIG_PATH=/opt/debuginfod/lib/pkg-config
	    $ make

	Then PKG_CONFIG_PATH is only present (and ignored) during the top-level
	configure.  When running make (which runs gdb's and binutils'
	configure), PKG_CONFIG_PATH is not set, which results in their configure
	script not finding the library:

	    checking for libdebuginfod >= 0.179... no
	    configure: error: "--with-debuginfod was given, but libdebuginfod is missing or unusable."

	Change the top-level configure/Makefile system to capture the value
	passed when configuring the top-level and pass it down to
	subdirectories (similar to CFLAGS, LDFLAGS, etc).

	I don't know much about the top-level build system, so I really don't
	know if I did this correctly.  The changes are:

	 - Use AC_SUBST(PKG_CONFIG_PATH) in configure.ac, so that
	   @PKG_CONFIG_PATH@ gets replaced with the actual PKG_CONFIG_PATH value
	   in config files (i.e. Makefile)
	 - Add a PKG_CONFIG_PATH Makefile variable in Makefile.tpl, initialized
	   to @PKG_CONFIG_PATH@
	 - Add PKG_CONFIG_PATH to HOST_EXPORTS in Makefile.tpl, which are the
	   variables set when running the sub-configures

	I initially added PKG_CONFIG_PATH to flags_to_pass, in Makefile.def, but
	I don't think it's needed.  AFAIU, this defines the flags to pass down
	when calling "make" in subdirectories.  We only need PKG_CONFIG_PATH to
	be passed down during configure.  After that, it's captured in
	gdb/config.status, so even if a "make" causes a re-configure later
	(because gdb/configure has changed, for example), the PKG_CONFIG_PATH
	value will be remembered.

	ChangeLog:

		* configure.ac: Add AC_SUBST(PKG_CONFIG_PATH).
		* configure: Re-generate.
		* Makefile.tpl (HOST_EXPORTS): Pass PKG_CONFIG_PATH.
		(PKG_CONFIG_PATH): New.
		* Makefile.in: Re-generate.

	Change-Id: I91138dfca41c43b05e53e445f62e4b27882536bf

2022-04-08  Simon Marchi  <simon.marchi@efficios.com>

	gdb/testsuite: use nopie in gdb.dwarf2/dw2-inline-param.exp
	I see this failure:

	    (gdb) run ^M
	    Starting program: /home/smarchi/build/binutils-gdb/gdb/testsuite/outputs/gdb.dwarf2/dw2-inline-param/dw2-inline-param ^M
	    Warning:^M
	    Cannot insert breakpoint 1.^M
	    Cannot access memory at address 0x113b^M
	    ^M
	    (gdb) FAIL: gdb.dwarf2/dw2-inline-param.exp: runto: run to *0x113b

	The test loads the binary in GDB, grabs the address of a symbol, strips
	the binary, reloads it in GDB, runs the program, and then tries to place
	a breakpoint at that address.  The problem is that the binary is built
	as position independent, so the address GDB grabs in the first place
	isn't where the code ends up after running.

	Fix this by linking the binary as non-position-independent.  The
	alternative would be to compute the relocated address where to place the
	breakpoint, but that's not very straightforward, unfortunately.

	I was confused for a while, I was trying to load the binary in GDB
	manually to get the symbol address, but GDB was telling me the symbol
	could not be found.  Meanwhile, it clearly worked in gdb.log.  The thing
	is that GDB strips the binary in-place, so we don't have access to the
	intermediary binary with symbols.  Change the test to output the
	stripped binary to a separate file instead.

	Change-Id: I66c56293df71b1ff49cf748d6784bd0e935211ba

2022-04-08  Alan Modra  <amodra@gmail.com>

	gdb maintainer commit rights
	Formalise what ought to be obvious.  The top level of the binutils-gdb
	repository isn't owned by binutils.

		* MAINTAINERS: Spelling fix.  GDB global maintainer rights.

2022-04-08  Bernhard Heckel  <bernhard.heckel@intel.com>
	    Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	gdb/fortran: print fortran extended types with ptype
	Add the print of the base-class of an extended type to the output of
	ptype.  This requires the Fortran compiler to emit DW_AT_inheritance
	for the extended type.

2022-04-08  Bernhard Heckel  <bernhard.heckel@intel.com>
	    Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	gdb/fortran: add support for accessing fields of extended types
	Fortran 2003 supports type extension.  This patch allows access
	to inherited members by using their fully qualified name as described
	in the Fortran standard.

	In doing so the patch also fixes a bug in GDB when trying to access the
	members of a base class in a derived class via the derived class' base
	class member.

	This patch fixes PR22497 and PR26373 on GDB side.

	Using the example Fortran program from PR22497

	program mvce
	  implicit none

	  type :: my_type
	     integer :: my_int
	  end type my_type

	  type, extends(my_type) :: extended_type
	  end type extended_type

	  type(my_type) :: foo
	  type(extended_type) :: bar

	  foo%my_int = 0
	  bar%my_int = 1

	  print*, foo, bar

	end program mvce

	and running this with GDB and setting a BP at 17:

	Before:
	(gdb) p bar%my_type
	A syntax error in expression, near `my_type'.
	(gdb) p bar%my_int
	There is no member named my_int.
	(gdb) p bar%my_type%my_int
	A syntax error in expression, near `my_type%my_int'.
	(gdb) p bar
	$1 = ( my_type = ( my_int = 1 ) )

	After:
	(gdb) p bar%my_type
	$1 = ( my_int = 1 )
	(gdb) p bar%my_int
	$2 = 1                 # this line requires DW_TAG_inheritance to work
	(gdb) p bar%my_type%my_int
	$3 = 1
	(gdb) p bar
	$4 = ( my_type = ( my_int = 1 ) )

	In the above example "p bar%my_int" requires the compiler to emit
	information about the inheritance relationship between extended_type
	and my_type which gfortran and flang currently do not de.  The
	respective issue gcc/49475 has been put as kfail.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=26373
	     https://sourceware.org/bugzilla/show_bug.cgi?id=22497

2022-04-08  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	gdb: add Nils-Christian Kempke to gdb/MAINTAINERS

2022-04-08  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: change file_file_name to return an std::string
	Straightforward change, return an std::string instead of a
	gdb::unique_xmalloc_ptr<char>.  No behavior change expected.

	Change-Id: Ia5e94c94221c35f978bb1b7bdffbff7209e0520e

2022-04-08  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-07  Andrew Burgess  <aburgess@redhat.com>

	gdb/fortran: fix fetching assumed rank array content
	Commit:

	  commit df7a7bdd9766adebc6b117c31bc617d81c1efd43
	  Date:   Thu Mar 17 18:56:23 2022 +0000

	      gdb: add support for Fortran's ASSUMED RANK arrays

	Added support for Fortran assumed rank arrays.  Unfortunately, this
	commit contained a bug that means though GDB can correctly calculate
	the rank of an assumed rank array, GDB can't fetch the contents of an
	assumed rank array.

	The history of this patch can be seen on the mailing list here:

	  https://sourceware.org/pipermail/gdb-patches/2022-January/185306.html

	The patches that were finally committed can be found here:

	  https://sourceware.org/pipermail/gdb-patches/2022-March/186906.html

	The original patches did support fetching the array contents, it was
	only the later series that introduced the regression.

	The problem is that when calculating the array rank the result is a
	count of the number of ranks, i.e. this is a 1 based result, 1, 2, 3,
	etc.

	In contrast, when computing the details of any particular rank the
	value passed to the DWARF expression evaluator should be a 0 based
	rank offset, i.e. a 0 based number, 0, 1, 2, etc.

	In the patches that were originally merged, this was not the case, and
	we were passing the 1 based rank number to the expression evaluator,
	e.g. passing 1 when we should pass 0, 2 when we should pass 1, etc.
	As a result the DWARF expression evaluator was reading the
	wrong (undefined) memory, and returning garbage results.

	In this commit I have extended the test case to cover checking the
	array contents, I've then ensured we make use of the correct rank
	value, and extended some comments, and added or adjusted some asserts
	as appropriate.

2022-04-07  Simon Marchi  <simon.marchi@efficios.com>

	gdb/testsuite: add "macros" option to gdb_compile
	Make gdb_compile handle a new "macros" option, which makes it pass the
	appropriate flag to make the compiler include macro information in the
	debug info.  This will help simplify tests using macros, reduce
	redundant code, and make it easier to add support for a new compiler.

	Right now it only handles clang specially (using -fdebug-macro) and
	falls back to -g3 otherwise (which works for gcc).  Other compilers can
	be added as needed.

	There are some tests that are currently skipped if the compiler is nor
	gcc nor clang.  After this patch, the tests will attempt to run (the -g3
	fall back will be used).  That gives a chance to people using other
	compilers to notice something is wrong and maybe add support for their
	compiler.  If it is needed to support a compiler that doesn't have a way
	to include macro information, then we can always introduce a
	"skip_macro_tests" that can be used to skip over them.

	Change-Id: I50cd6ab1bfbb478c1005486408e214b551364c9b

2022-04-07  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove subfile::buildsym_compunit field
	It is only set, never used.

	Change-Id: Ia46ed2f9da243b0ccfc4588c1b57be2a0f3939de

2022-04-07  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Make gdb.base/annota1.exp more robust
	On openSUSE Tumbleweed I run into:
	...
	FAIL: gdb.base/annota1.exp: run until main breakpoint (timeout)
	...

	The problem is that the libthread_db message occurs at a location where it's
	not expected:
	...
	Starting program: outputs/gdb.base/annota1/annota1 ^M
	^M
	^Z^Zstarting^M
	^M
	^Z^Zframes-invalid^M
	[Thread debugging using libthread_db enabled]^M
	Using host libthread_db library "/lib64/libthread_db.so.1".^M
	^M
	^Z^Zbreakpoints-invalid^M
	^M
	...

	Fix this by making the matching more robust:
	- rewrite the regexp such that each annotation is on a single line,
	  starting with \r\n\032\032 and ending with \r\n
	- add a regexp variable optional_re, that matches all possible optional
	  output, and use it as a separator in the first part of the regexp

	Tested on x86_64-linux.

2022-04-07  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite/dwarf: simplify line number program syntax
	By calling `uplevel $body` in the program proc (a pattern we use at many
	places), we can get rid of curly braces around each line number program
	directive.  That seems like a nice small improvement to me.

	Change-Id: Ib327edcbffbd4c23a08614adee56c12ea25ebc0b

2022-04-07  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite/dwarf: remove two unused variables
	These variables seem to be unused, remove them.

	Change-Id: I7d613d9d35735930ee78b2c348943c73a702afbb

2022-04-07  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove symtab::pspace
	Same idea as previous patch, but for symtab::pspace.

	Change-Id: I1023abe622bea75ef648c6a97a01b53775d4104d

2022-04-07  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove symtab::objfile
	Same idea as previous patch, but for symtab::objfile.  I find
	it clearer without this wrapper, as it shows that the objfile is
	common to all symtabs of a given compunit.  Otherwise, you could think
	that each symtab (of a given compunit) can have a specific objfile.

	Change-Id: Ifc0dbc7ec31a06eefa2787c921196949d5a6fcc6

2022-04-07  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove symtab::blockvector
	symtab::blockvector is a wrapper around compunit_symtab::blockvector.
	It is a bit misleadnig, as it gives the impression that a symtab has a
	blockvector.  Remove it, change all users to fetch the blockvector
	through the compunit instead.

	Change-Id: Ibd062cd7926112a60d52899dff9224591cbdeebf

2022-04-07  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove symtab::dirname
	I think the symtab::dirname method is bogus, or at least very
	misleading.  It makes you think that it returns the directory that was
	used to find that symtab's file during compilation (i.e. the directory
	the file refers to in the DWARF line header file table), or the
	directory part of the symtab's filename maybe.  In fact, it returns the
	compilation unit's directory, which is the CWD of the compiler, at
	compilation time.  At least for DWARF, if the symtab's filename is
	relative, it will be relative to that directory.  But if the symtab's
	filename is absolute, then the directory returned by symtab::dirname has
	nothing to do with the symtab's filename.

	Remove symtab::dirname to avoid this confusion, change all users to
	fetch the same information through the compunit.  At least, it will be
	clear that this is a compunit property, not a symtab property.

	Change-Id: I2894c3bf3789d7359a676db3c58be2c10763f5f0

2022-04-07  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: make gdb_breakpoint and runto take a linespec
	Change gdb_breakpoint to accept a linespec, not just a function.  In
	fact, no behavior changes are necessary, this only changes the parameter
	name and documentation.  Change runto as well, since the two are so
	close (runto forwards all its arguments to gdb_breakpoint).

	I wrote this for a downstrean GDB port,  but thought it could be
	useful upstream, eventually, even though not callers take advantage of
	it yet.

	Change-Id: I08175fd444d5a60df90fd9985e1b5dfd87c027cc

2022-04-07  Andrew Burgess  <aburgess@redhat.com>

	gdb: update comments throughout reggroups.{c,h} files
	This commit updates the comments in the gdb/reggroups.{c,h} files.
	Fill in some missing comments, correct a few comments that were not
	clear, and where we had comments duplicated between .c and .h files,
	update the .c to reference the .h.

	No user visible changes after this commit.

2022-04-07  Andrew Burgess  <aburgess@redhat.com>

	gdb: move struct reggroup into reggroups.h header
	Move 'struct reggroup' into the reggroups.h header.  Remove the
	reggroup_name and reggroup_type accessor functions, and just use the
	name/type member functions within 'struct reggroup', update all uses
	of these removed functions.

	There should be no user visible changes after this commit.

2022-04-07  Andrew Burgess  <aburgess@redhat.com>

	gdb: convert reggroup to a C++ class with constructor, etc
	Convert the 'struct reggroup' into a real class, with a constructor
	and getter methods.

	There should be no user visible changes after this commit.

2022-04-07  Andrew Burgess  <aburgess@redhat.com>

	gdb: make the pre-defined register groups const
	Convert the 7 global, pre-defined, register groups const, and fix the
	fall out (a minor tweak required in riscv-tdep.c).

	There should be no user visible changes after this commit.

2022-04-07  Andrew Burgess  <aburgess@redhat.com>

	gdb: more 'const' in gdb/reggroups.{c,h}
	Convert the reggroup_new and reggroup_gdbarch_new functions to return
	a 'const regggroup *', and fix up all the fallout.

	There should be no user visible changes after this commit.

2022-04-07  Andrew Burgess  <aburgess@redhat.com>

	gdb: remove reggroup_next and reggroup_prev
	Add a new function gdbarch_reggroups that returns a reference to a
	vector containing all the reggroups for an architecture.

	Make use of this function throughout GDB instead of the existing
	reggroup_next and reggroup_prev functions.

	Finally, delete the reggroup_next and reggroup_prev functions.

	Most of these changes are pretty straight forward, using range based
	for loops instead of the old style look using reggroup_next.  There
	are two places where the changes are less straight forward.

	In gdb/python/py-registers.c, the register group iterator needed to
	change slightly.  As the iterator is tightly coupled to the gdbarch, I
	just fetch the register group vector from the gdbarch when needed, and
	use an index counter to find the next item from the vector when
	needed.

	In gdb/tui/tui-regs.c the tui_reg_next and tui_reg_prev functions are
	just wrappers around reggroup_next and reggroup_prev respectively.
	I've just inlined the logic of the old functions into the tui
	functions.  As the tui function had its own special twist (wrap around
	behaviour) I think this is OK.

	There should be no user visible changes after this commit.

2022-04-07  Andrew Burgess  <aburgess@redhat.com>

	gdb: convert reggroups to use a std::vector
	Replace manual linked list with a std::vector.  This commit doesn't
	change the reggroup_next and reggroup_prev API, but that will change
	in a later commit.

	This commit is focused on the minimal changes needed to manage the
	reggroups using a std::vector, without changing the API exposed by the
	reggroup.c file.

	There should be no user visible changes after this commit.

2022-04-07  Andrew Burgess  <aburgess@redhat.com>

	gdb: always add the default register groups
	There's a set of 7 default register groups.  If we don't add any
	gdbarch specific register groups during gdbarch initialisation, then
	when we iterate over the register groups using reggroup_next and
	reggroup_prev we will make use of these 7 default groups.  See the use
	of default_groups in gdb/reggroups.c for details on this.

	However, if the gdbarch adds its own groups during gdbarch
	initialisation, then these groups will be used in preference to the
	default groups.

	A problem arises though if the particular architecture makes use of
	the target description mechanism.  If the default target
	description(s) (i.e. those internal to GDB that are used when the user
	doesn't provide their own) don't mention any additional register
	groups then the default register groups will be used.

	But if the target description does mention additional groups then the
	default groups are not used, and instead, the groups from the target
	description are used.

	The problem with this is that what usually happens is that the target
	description will mention additional groups, e.g. groups for special
	registers.  Most architectures that use target descriptions work
	around this by adding all (or most) of the default register groups in
	all cases.  See i386_add_reggroups, aarch64_add_reggroups,
	riscv_add_reggroups, xtensa_add_reggroups, and others.

	In this patch, my suggestion is that we should just add the default
	register groups for every architecture, always.  This change is in
	gdb/reggroups.c.

	All the remaining changes are me updating the various architectures to
	not add the default groups themselves.

	So, where will this change be visible to the user?  I think the
	following commands will possibly change:

	* info registers / info all-registers:

	  The user can provide a register group to these commands.  For example,
	  on csky, we previously never added the 'vector' group.  Now, as a
	  default group, this will be available, but (presumably) will not
	  contain any registers.  I don't think this is necessarily a bad
	  thing, there's something to be said for having some consistent
	  defaults available.  There are other architectures that didn't add
	  all 7 of the defaults, which will now have gained additional groups.

	* maint print reggroups

	  This prints the set of all available groups.  As a maintenance
	  command I'm less concerned with the output changing here.
	  Obviously, for the architectures that didn't previously add all the
	  defaults, this list just got bigger.

	* maint print register-groups

	  This prints all the registers, and the groups they are in.  If the
	  defaults were not previously being added then a register (obviously)
	  can't appear in one of the default groups.  Now the groups are
	  available then registers might be in more groups than previously.
	  However, this is again a maintenance command, so I'm less concerned
	  about this changing.

2022-04-07  Andrew Burgess  <aburgess@redhat.com>

	gdb/tui: fix 'tui reg next/prev' command when data window is hidden
	Start GDB like:

	  $ gdb -q executable
	  (gdb) start
	  (gdb) layout src
	  ... tui windows are now displayed ...
	  (gdb) tui reg next

	At this point the data (register) window should be displayed, but will
	contain the message 'Register Values Unavailable', and at the console
	you'll see the message "unknown register group 'next'".

	The same happens with 'tui reg prev' (but the error message is
	slightly different).

	At this point you can continue to use 'tui reg next' and/or 'tui reg
	prev' and you'll keep getting the error message.

	The problem is that when the data (register) window is first
	displayed, it's current register group is nullptr.  As a consequence
	tui_reg_next and tui_reg_prev (tui/tui-regs.c) will always just return
	nullptr, which triggers an error in tui_reg_command.

	In this commit I change tui_reg_next and tui_reg_prev so that they
	instead return the first and last register group respectively if the
	current register group is nullptr.

	So, after this, using 'tui reg next' will (in the above case) show the
	first register group, while 'tui reg prev' will display the last
	register group.

2022-04-07  Andrew Burgess  <aburgess@redhat.com>

	gdb/tui: avoid theoretical bug with 'tui reg' command
	While looking at the 'tui reg' command as part of another patch, I
	spotted a theoretical bug.

	The 'tui reg' command takes the name of a register group, but also
	handles partial register group matches, though the partial match has to
	be unique.  The current command logic goes:

	With the code as currently written, if a target description named a
	register group either 'prev' or 'next' then GDB would see this as an
	ambiguous register name, and refuse to switch groups.

	Naming a register group 'prev' or 'next' seems pretty unlikely, but,
	by adding a single else block we can prevent this problem.

	Now, if there's a 'prev' or 'next' register group, the user will not
	be able to select the group directly, the 'prev' and 'next' names will
	always iterate through the available groups instead.  But at least the
	user could select their groups by iteration, rather than direct
	selection.

2022-04-07  Andrew Burgess  <aburgess@redhat.com>

	gdb: have reggroup_find return a const
	Update reggroup_find to return a const reggroup *.

	There are other function in gdb/reggroup.{c,h} files that could
	benefit from returning const, these will be updated in later commits.

	There should be no user visible changes after this commit.

2022-04-07  Andrew Burgess  <aburgess@redhat.com>

	gdb: use 'const reggroup *' in python/py-registers.c file
	Convert uses of 'struct reggroup *' in python/py-registers.c to be
	'const'.

	There should be no user visible changes after this commit.

2022-04-07  Andrew Burgess  <aburgess@redhat.com>

	gdb: switch to using 'const reggroup *' in tui-regs.{c,h}
	Make uses of 'reggroup *' const throughout tui-regs.{c,h}.

	There should be no user visible changes after this commit.

2022-04-07  Andrew Burgess  <aburgess@redhat.com>

	gdb: make gdbarch_register_reggroup_p take a const reggroup *
	Change gdbarch_register_reggroup_p to take a 'const struct reggroup *'
	argument.  This requires a change to the gdb/gdbarch-components.py
	script, regeneration of gdbarch.{c,h}, and then updates to all the
	architectures that implement this method.

	There should be no user visible changes after this commit.

2022-04-07  Andrew Burgess  <aburgess@redhat.com>

	gdb: add some const in gdb/reggroups.c
	This commit makes the 'struct reggroup *' argument const for the
	following functions:

	  reggroup_next
	  reggroup_prev
	  reggroup_name
	  reggroup_type

	There are other places that could benefit from const in the
	reggroup.{c,h} files, but these will be changing in further commits.

	There should be no user visible changes after this commit.

2022-04-07  Andrew Burgess  <aburgess@redhat.com>

	gdb: don't try to use readline before it's initialized
	While working on a different patch, I triggered an assertion from the
	initialize_current_architecture code, specifically from one of
	the *_gdbarch_init functions in a *-tdep.c file.  This exposes a
	couple of issues with GDB.

	This is easy enough to reproduce by adding 'gdb_assert (false)' into a
	suitable function.  For example, I added a line into i386_gdbarch_init
	and can see the following issue.

	I start GDB and immediately hit the assert, the output is as you'd
	expect, except for the very last line:

	  $ ./gdb/gdb --data-directory ./gdb/data-directory/
	  ../../src.dev-1/gdb/i386-tdep.c:8455: internal-error: i386_gdbarch_init: Assertion `false' failed.
	  A problem internal to GDB has been detected,
	  further debugging may prove unreliable.
	  ----- Backtrace -----
	  ... snip ...
	  ---------------------
	  ../../src.dev-1/gdb/i386-tdep.c:8455: internal-error: i386_gdbarch_init: Assertion `false' failed.
	  A problem internal to GDB has been detected,
	  further debugging may prove unreliable.
	  Quit this debugging session? (y or n) ../../src.dev-1/gdb/ser-event.c:212:16: runtime error: member access within null pointer of type 'struct serial'

	Something goes wrong when we try to query the user.  Note, I
	configured GDB with --enable-ubsan, I suspect that without this the
	above "error" would actually just be a crash.

	The backtrace from ser-event.c:212 looks like this:

	  (gdb) bt 10
	  #0  serial_event_clear (event=0x675c020) at ../../src/gdb/ser-event.c:212
	  #1  0x0000000000769456 in invoke_async_signal_handlers () at ../../src/gdb/async-event.c:211
	  #2  0x000000000295049b in gdb_do_one_event () at ../../src/gdbsupport/event-loop.cc:194
	  #3  0x0000000001f015f8 in gdb_readline_wrapper (
	      prompt=0x67135c0 "../../src/gdb/i386-tdep.c:8455: internal-error: i386_gdbarch_init: Assertion `false' failed.\nA problem internal to GDB has been detected,\nfurther debugging may prove unreliable.\nQuit this debugg"...)
	      at ../../src/gdb/top.c:1141
	  #4  0x0000000002118b64 in defaulted_query(const char *, char, typedef __va_list_tag __va_list_tag *) (
	      ctlstr=0x2e4eb68 "%s\nQuit this debugging session? ", defchar=0 '\000', args=0x7fffffffa6e0)
	      at ../../src/gdb/utils.c:934
	  #5  0x0000000002118f72 in query (ctlstr=0x2e4eb68 "%s\nQuit this debugging session? ")
	      at ../../src/gdb/utils.c:1026
	  #6  0x00000000021170f6 in internal_vproblem(internal_problem *, const char *, int, const char *, typedef __va_list_tag __va_list_tag *) (problem=0x6107bc0 <internal_error_problem>, file=0x2b976c8 "../../src/gdb/i386-tdep.c",
	      line=8455, fmt=0x2b96d7f "%s: Assertion `%s' failed.", ap=0x7fffffffa8e8) at ../../src/gdb/utils.c:417
	  #7  0x00000000021175a0 in internal_verror (file=0x2b976c8 "../../src/gdb/i386-tdep.c", line=8455,
	      fmt=0x2b96d7f "%s: Assertion `%s' failed.", ap=0x7fffffffa8e8) at ../../src/gdb/utils.c:485
	  #8  0x00000000029503b3 in internal_error (file=0x2b976c8 "../../src/gdb/i386-tdep.c", line=8455,
	      fmt=0x2b96d7f "%s: Assertion `%s' failed.") at ../../src/gdbsupport/errors.cc:55
	  #9  0x000000000122d5b6 in i386_gdbarch_init (info=..., arches=0x0) at ../../src/gdb/i386-tdep.c:8455
	  (More stack frames follow...)

	It turns out that the problem is that the async event handler
	mechanism has been invoked, but this has not yet been initialized.

	If we look at gdb_init (in gdb/top.c) we can indeed see the call to
	gdb_init_signals is after the call to initialize_current_architecture.

	If I reorder the calls, moving gdb_init_signals earlier, then the
	initial error is resolved, however, things are still broken.  I now
	see the same "Quit this debugging session? (y or n)" prompt, but when
	I provide an answer and press return GDB immediately crashes.

	So what's going on now?  The next problem is that the call_readline
	field within the current_ui structure is not initialized, and this
	callback is invoked to process the reply I entered.

	The problem is that call_readline is setup as a result of calling
	set_top_level_interpreter, which is called from captured_main_1.
	Unfortunately, set_top_level_interpreter is called after gdb_init is
	called.

	I wondered how to solve this problem for a while, however, I don't
	know if there's an easy "just reorder some lines" solution here.
	Looking through captured_main_1 there seems to be a bunch of
	dependencies between printing various things, parsing config files,
	and setting up the interpreter.  I'm sure there is a solution hiding
	in there somewhere.... I'm just not sure I want to spend any longer
	looking for it.

	So.

	I propose a simpler solution, more of a hack/work-around.  In utils.c
	we already have a function filtered_printing_initialized, this is
	checked in a few places within internal_vproblem.  In some of these
	cases the call gates whether or not GDB will query the user.

	My proposal is to add a new readline_initialized function, which
	checks if the current_ui has had readline initialized yet.  If this is
	not the case then we should not attempt to query the user.

	After this change GDB prints the error message, the backtrace, and
	then aborts (including dumping core).  This actually seems pretty sane
	as, if GDB has not yet made it through the initialization then it
	doesn't make much sense to allow the user to say "no, I don't want to
	quit the debug session" (I think).

2022-04-07  Luis Machado  <luis.machado@arm.com>

	Recognize the NT_ARM_SYSTEM_CALL register set
	Update binutils to recognize the NT_ARM_SYSTEM_CALL set that is dumped by
	Linux to core files.

2022-04-07  Mark Harmstone  <mark@harmstone.com>

	Add support for COFF secidx relocations
	bfd	* coff-i386.c (in_reloc_p): Add R_SECTION.
		(howto_table): Add R_SECTION.
		(coff_pe_i386_relocation_section): Add support for R_SECTION.
		(coff_i386_reloc_type_lookup): Add support for
		BFD_RELOC_16_SECCIDX.
		* coff-x86_64.c (in_reloc_p): Add R_SECTION.
		(howto_table): Add R_SECTION.
		(coff_pe_amd64_relocation_section): Add support for R_SECTION.
		(coff_amd64_reloc_type_lookup): Add support for
		BFD_RELOC_16_SECCIDX.
		* reloc.c: Add BFD_RELOC_16_SECIDX.
		* bfd-in2.h: Regenerate.
		* libbfd.h: Regenerate.

	gas	* config/tc-i386.c (pe_directive_secidx): New function.
		(md_pseudo_table): Add support for secidx.
		(x86_cons_fix_new): Likewise.
		(tc_gen_reloc): Likewise.
		* expr.c (op_rank): Add O_secidx.
		* expr.h (operatorT): Likewise.
		* symbols.c (resolve_symbol_value): Add support for O_secidx.
		* testsuite/gas/i386/secidx.s: New test source file.
		* testsuite/gas/i386/secidx.d: New test driver file.
		* testsuite/gas/i386/i386.exp: Run new test.

	include	* coff/i386.h: Define R_SECTION.
		* coff/x86_64.h: Likewise.

	ld	* testsuite/ld-pe/secidx1.s: New test source file.
		* testsuite/ld-pe/secidx2.s: New test source file.
		* testsuite/ld-pe/secidx.d: New test driver file.
		* testsuite/ld-pe/secidx_64.d: New test driver file.
		* testsuite/ld-pe/pe.exp: Add new tests.

2022-04-07  Jan Beulich  <jbeulich@suse.com>

	gas/Dwarf: record functions
	To help tools like addr2line looking up function names, in particular
	when dealing with e.g. PE/COFF binaries (linked from ELF objects), where
	there's no ELF symbol table to fall back to, emit minimalistic
	information for functions marked as such and having their size
	specified.

	Notes regarding the restriction to (pure) ELF:
	- I realize this is a layering violation; I don't see how to deal with
	  that in a better way.
	- S_GET_SIZE(), when OBJ_MAYBE_ELF is defined, looks wrong: Unlike
	  S_SET_SIZE() it does not check whether the hook is NULL.
	- symbol_get_obj(), when OBJ_MAYBE_ELF is defined, looks unusable, as
	  its return type can only ever be one object format's type (and this
	  may then not be ELF's).

	The new testcases are limited to x86 because I wanted to include the
	case where function size can't be determined yet at the time Dwarf2 info
	is generated. As .nops gains support by further targets, they could also
	be added here then (with, as necessary, expecations suitably relaxed to
	cover for insn size differences).

2022-04-07  Jan Beulich  <jbeulich@suse.com>

	Arm64: arrange for line number emission for .inst
	Just like insns encoded the more conventional way these should have line
	number info associated with them.

	Arm32: arrange for line number emission for .inst
	Just like insns encoded the more conventional way these should have line
	number info associated with them.

	RISC-V: add testcase to check line number emission for .insn
	Since no such test looks to exist, derive one from insn.s.

2022-04-07  Andreas Krebbel  <krebbel@linux.ibm.com>

	IBM zSystems: Add support for z16 as CPU name.
	So far z16 was identified as arch14. After the machine has been
	announced we can now add the real name.

	gas/ChangeLog:

		* config/tc-s390.c (s390_parse_cpu): Add z16 as alternate CPU
		name.
		* doc/as.texi: Add z16 and arch14 to CPU string list.
		* doc/c-s390.texi: Add z16 to CPU string list.

	opcodes/ChangeLog:

		* s390-mkopc.c (main): Enable z16 as CPU string in the opcode
		table.

2022-04-07  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-06  Youling Tang  <tangyouling@loongson.cn>

	gdb: mips: Fix the handling of complex type of function return value
	$ objdump -d outputs/gdb.base/varargs/varargs
	00000001200012e8 <find_max_float_real>:
	...
	   1200013b8:   c7c10000        lwc1    $f1,0(s8)
	   1200013bc:   c7c00004        lwc1    $f0,4(s8)
	   1200013c0:   46000886        mov.s   $f2,$f1
	   1200013c4:   46000046        mov.s   $f1,$f0
	   1200013c8:   46001006        mov.s   $f0,$f2
	   1200013cc:   46000886        mov.s   $f2,$f1
	   1200013d0:   03c0e825        move    sp,s8
	   1200013d4:   dfbe0038        ld      s8,56(sp)
	   1200013d8:   67bd0080        daddiu  sp,sp,128
	   1200013dc:   03e00008        jr      ra
	   1200013e0:   00000000        nop

	From the above disassembly, we can see that when the return value of the
	function is a complex type and len <= 2 * MIPS64_REGSIZE, the return value
	will be passed through $f0 and $f2, so fix the corresponding processing
	in mips_n32n64_return_value().

	$ make check RUNTESTFLAGS='GDB=../gdb gdb.base/varargs.exp --outdir=test'

	Before applying the patch:
	 FAIL: gdb.base/varargs.exp: print find_max_float_real(4, fc1, fc2, fc3, fc4)
	 FAIL: gdb.base/varargs.exp: print find_max_double_real(4, dc1, dc2, dc3, dc4)

	 # of expected passes            9
	 # of unexpected failures        2

	After applying the patch:
	 # of expected passes            11

	This also fixes:
	 FAIL: gdb.base/callfuncs.exp: call inferior func with struct - returns float _Complex

	Co-Authored-By: Maciej W. Rozycki <macro@orcam.me.uk>

2022-04-06  Tom Tromey  <tom@tromey.com>

	Use new and delete in jit.c
	This changes jit.c to use new and delete, rather than XCNEW.  This
	simplifies the code a little.  This was useful for another patch I'm
	working on, and I thought it would make sense to send it separately.

	Regression tested on x86-64 Fedora 34.

2022-04-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: don't copy entirely optimized out values in value_copy
	Bug 28980 shows that trying to value_copy an entirely optimized out
	value causes an internal error.  The original bug report involves MI and
	some Python pretty printer, and is quite difficult to reproduce, but
	another easy way to reproduce (that is believed to be equivalent) was
	proposed:

	    $ ./gdb -q -nx --data-directory=data-directory -ex "py print(gdb.Value(gdb.Value(5).type.optimized_out()))"
	    /home/smarchi/src/binutils-gdb/gdb/value.c:1731: internal-error: value_copy: Assertion `arg->contents != nullptr' failed.

	This is caused by 5f8ab46bc691 ("gdb: constify parameter of
	value_copy").  It added an assertion that the contents buffer is
	allocated if the value is not lazy:

	  if (!value_lazy (val))
	    {
	      gdb_assert (arg->contents != nullptr);

	This was based on the comment on value::contents, which suggest that
	this is the case:

	  /* Actual contents of the value.  Target byte-order.  NULL or not
	     valid if lazy is nonzero.  */
	  gdb::unique_xmalloc_ptr<gdb_byte> contents;

	However, it turns out that it can also be nullptr also if the value is
	entirely optimized out, for example on exit of
	allocate_optimized_out_value.  That function creates a lazy value, marks
	the entire value as optimized out, and then clears the lazy flag.  But
	contents remains nullptr.

	This wasn't a problem for value_copy before, because it was calling
	value_contents_all_raw on the input value, which caused contents to be
	allocated before doing the copy.  This means that the input value to
	value_copy did not have its contents allocated on entry, but had it
	allocated on exit.  The result value had it allocated on exit.  And that
	we copied bytes for an entirely optimized out value (i.e. meaningless
	bytes).

	From here I see two choices:

	 1. respect the documented invariant that contents is nullptr only and
	    only if the value is lazy, which means making
	    allocate_optimized_out_value allocate contents
	 2. extend the cases where contents can be nullptr to also include
	    values that are entirely optimized out (note that you could still
	    have some entirely optimized out values that do have contents
	    allocated, it depends on how they were created) and adjust
	    value_copy accordingly

	Choice #1 is safe, but less efficient: it's not very useful to allocate
	a buffer for an entirely optimized out value.  It's even a bit less
	efficient than what we had initially, because values coming out of
	allocate_optimized_out_value would now always get their contents
	allocated.

	Choice #2 would be more efficient than what we had before: giving an
	optimized out value without allocated contents to value_copy would
	result in an optimized out value without allocated contents (and the
	input value would still be without allocated contents on exit).  But
	it's more risky, since it's difficult to ensure that all users of the
	contents (through the various_contents* accessors) are all fine with
	that new invariant.

	In this patch, I opt for choice #2, since I think it is a better
	direction than choice #1.  #1 would be a pessimization, and if we go
	this way, I doubt that it will ever be revisited, it will just stay that
	way forever.

	Add a selftest to test this.  I initially started to write it as a
	Python test (since the reproducer is in Python), but a selftest is more
	straightforward.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28980
	Change-Id: I6e2f5c0ea804fafa041fcc4345d47064b5900ed7

2022-04-06  Jeff Law  <jeffreyalaw@gmail.com>

	Fix for v850e divq instruction
	This is the last of the correctness fixes I've been carrying around for the
	v850.

	Like the other recent fixes, this is another case where we haven't been as
	careful as we should WRT host vs target types.   For the divq instruction
	both operands are 32 bit types.  Yet in the simulator code we convert them
	from unsigned int to signed long by assignment.  So 0xfffffffb (aka -5)
	turns into 4294967291 and naturally that changes the result of our division.

	The fix is simple, insert a cast to int32_t to force interpretation as a
	signed value.

	Testcase for the simulator is included.  It has a trivial dependency on the
	bins patch.

2022-04-06  Jeff Law  <jeffreyalaw@gmail.com>

	Fix "bins" simulation for v850e3v5
	I've been carrying this for a few years.   One test in the GCC testsuite is
	failing due to a bug in the handling of the v850e3v5 instruction "bins".

	When the "bins" instruction specifies a 32bit bitfield size, the simulator
	exhibits undefined behavior by trying to shift a 32 bit quantity by 32 bits.
	In the case of a 32 bit shift, we know what the resultant mask should be.  So
	we can just set it.

	That seemed better than using 1UL for the constant (on a 32bit host unsigned
	long might still just be 32 bits) or needlessly forcing everything to
	long long types.

	Thankfully the case where this shows up is only bins <src>, 0, 32, <dest>
	which would normally be encoded as a simple move.

		* testsuite/v850/allinsns.exp: Add v850e3v5.
		* testsuite/v850/bins.cgs: New test.
		* v850/simops.c (v850_bins): Avoid undefined behavior on left shift.

2022-04-06  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: LoongArch: prepend tramp frame unwinder for signal
	Implement the "init" method of struct tramp_frame to prepend tramp
	frame unwinder for signal on LoongArch.

	With this patch, the following failed testcases can be fixed:

	  FAIL: gdb.base/annota1.exp: backtrace @ signal handler (timeout)
	  FAIL: gdb.base/annota3.exp: backtrace @ signal handler (pattern 2)

2022-04-06  Andrew Burgess  <aburgess@redhat.com>

	gdb: make interp_add static
	Since this commit:

	  commit 8322445e0584be846f5873b9aab257dc9fbda05d
	  Date:   Tue Jun 21 01:11:45 2016 +0100

	      Introduce interpreter factories

	Interpreters should be registered with GDB, not by calling interp_add,
	but with a call to interp_factory_register.  I've checked the insight
	source, and it too has moved over to using interp_factory_register.

	In this commit I make interp_add static within interps.c.

	There should be no user visible change after this commit.

2022-04-06  Nick Clifton  <nickc@redhat.com>

	Add code to display the contents of .debug_loclists sections which contain offset entry tables.
		PR 28981
		* dwarf.c (fetch_indexed_value): Rename to fecth_indexed_addr and
		return the address, rather than a string.
		(fetch_indexed_value): New function - returns a value indexed by a
		DW_FORM_loclistx or DW_FORM_rnglistx form.
		(read_and_display_attr_value): Add support for DW_FORM_loclistx
		and DW_FORM_rnglistx.
		(process_debug_info): Load the loclists and rnglists sections.
		(display_loclists_list): Add support for DW_LLE_base_addressx,
		DW_LLE_startx_endx, DW_LLE_startx_length and
		DW_LLE_default_location.
		(display_offset_entry_loclists): New function.  Displays a
		.debug_loclists section that contains offset entry tables.
		(display_debug_loc): Call the new function.
		(display_debug_rnglists_list): Add support for
		DW_RLE_base_addressx, DW_RLE_startx_endx and DW_RLE_startx_length.
		(display_debug_ranges): Display the contents of the section's
		header.
		* dwarf.h (struct debug_info): Add loclists_base field.
		* testsuite/binutils-all/dw5.W: Update expected output.
		* testsuite/binutils-all/x86-64/pr26808.dump: Likewise.

2022-04-06  Luis Machado  <luis.machado@linaro.org>

	Enable ARMv8.1-m PACBTI support
	This set of changes enable support for the ARMv8.1-m PACBTI extensions [1].

	The goal of the PACBTI extensions is similar in scope to that of a-profile
	PAC/BTI (aarch64 only), but the underlying implementation is different.

	One important difference is that the pointer authentication code is stored
	in a separate register, thus we don't need to mask/unmask the return address
	from a function in order to produce a correct backtrace.

	The patch introduces the following modifications:

	- Extend the prologue analyser for 32-bit ARM to handle some instructions
	from ARMv8.1-m PACBTI: pac, aut, pacg, autg and bti. Also keep track of
	return address signing/authentication instructions.

	- Adds code to identify object file attributes that indicate the presence of
	ARMv8.1-m PACBTI (Tag_PAC_extension, Tag_BTI_extension, Tag_PACRET_use and
	Tag_BTI_use).

	- Adds support for DWARF pseudo-register RA_AUTH_CODE, as described in the
	aadwarf32 [2].

	- Extends the dwarf unwinder to track the value of RA_AUTH_CODE.

	- Decorates backtraces with the "[PAC]" identifier when a frame has signed
	the return address.

	- Makes GDB aware of a new XML feature "org.gnu.gdb.arm.m-profile-pacbti". This
	feature is not included as an XML file on GDB's side because it is only
	supported for bare metal targets.

	- Additional documentation.

	[1] https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/armv8-1-m-pointer-authentication-and-branch-target-identification-extension
	[2] https://github.com/ARM-software/abi-aa/blob/main/aadwarf32/aadwarf32.rst

2022-04-06  Andrew Burgess  <aburgess@redhat.com>

	gdb: move gdb_disassembly_flag into a new disasm-flags.h file
	While working on the disassembler I was getting frustrated.  Every
	time I touched disasm.h it seemed like every file in GDB would need to
	be rebuilt.  Surely the disassembler can't be required by that many
	parts of GDB, right?

	Turns out that disasm.h is included in target.h, so pretty much every
	file was being rebuilt!

	The only thing from disasm.h that target.h needed is the
	gdb_disassembly_flag enum, as this is part of the target_ops api.

	In this commit I move gdb_disassembly_flag into its own file.  This is
	then included in target.h and disasm.h, after which, the number of
	files that depend on disasm.h is much reduced.

	I also audited all the other includes of disasm.h and found that the
	includes in mep-tdep.c and python/py-registers.c are no longer needed,
	so I've removed these.

	Now, after changing disasm.h, GDB rebuilds much quicker.

	There should be no user visible changes after this commit.

2022-04-06  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-05  Tom Tromey  <tom@tromey.com>

	Introduce wrapped_file
	Simon pointed out that timestamped_file probably needed to implement a
	few more methods.  This patch introduces a new file-wrapping file that
	forwards most of its calls, making it simpler to implement new such
	files.  It also converts timestamped_file and pager_file to use it.

	Regression tested on x86-64 Fedora 34.

2022-04-05  Tom Tromey  <tromey@adacore.com>

	Don't call init_thread_list in windows-nat.c
	I don't think there's any need to call init_thread_list in
	windows-nat.c.  This patch removes it.  I tested this using the
	internal AdaCore test suite on Windows, which FWIW does include some
	multi-threaded inferiors.

2022-04-05  Simon Marchi  <simon.marchi@efficios.com>

	gdb/testsuite: fix intermittent failure in gdb.base/vfork-follow-parent.exp
	Tom de Vries reported some failures in this test:

	    continue
	    Continuing.
	    [New inferior 2 (process 14967)]

	    Thread 1.1 "vfork-follow-pa" hit Breakpoint 2, break_parent () at /home/vries/gdb_versions/devel/src/gdb/testsuite/gdb.base/vfork-follow-parent.c:23
	    23	}
	    (gdb) FAIL: gdb.base/vfork-follow-parent.exp: resolution_method=schedule-multiple: continue to end of inferior 2
	    inferior 1
	    [Switching to inferior 1 [process 14961] (/home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.base/vfork-follow-parent/vfork-follow-parent)]
	    [Switching to thread 1.1 (process 14961)]
	    #0  break_parent () at /home/vries/gdb_versions/devel/src/gdb/testsuite/gdb.base/vfork-follow-parent.c:23
	    23	}
	    (gdb) PASS: gdb.base/vfork-follow-parent.exp: resolution_method=schedule-multiple: inferior 1
	    continue
	    Continuing.
	    [Inferior 2 (process 14967) exited normally]
	    (gdb) FAIL: gdb.base/vfork-follow-parent.exp: resolution_method=schedule-multiple: continue to break_parent (the program exited)

	Here, we continue both the vfork parent and child, since
	schedule-multiple is on.  The child exits, which un-freezes the parent
	and makes an exit event available to GDB.  We expect GDB to consume this
	exit event and present it to the user.  Here, we see that GDB shows the
	parent hitting a breakpoint before showing the child exit.

	Because of the vfork, we know that chronologically, the child exiting
	must have happend before the parent hitting a breakpoint.  However,
	scheduling being what it is, it is possible for the parent to un-freeze
	and exit quickly, such that when GDB pulls events out of the kernel,
	exit events for both processes are available.  And then, GDB may chose
	at random to return the one for the parent first.  This is what I
	imagine what causes the failure shown above.

	We could change the test to expect both possible outcomes, but I wanted
	to avoid complicating the .exp file that way.  Instead, add a variable
	that the parent loops on that we set only after we confirmed the exit of
	the child.  That should ensure that the order is always the same.

	Note that I wasn't able to reproduce the failure, so I can't tell if
	this fix really fixes the problem.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29021
	Change-Id: Ibc8e527e0e00dac54b22021fe4d9d8ab0f3b28ad

2022-04-05  Simon Marchi  <simon.marchi@efficios.com>

	gdb/testsuite: fix intermittent failures in gdb.mi/mi-cmd-user-context.exp
	I got failures like this once on a CI:

	    frame^M
	    &"frame\n"^M
	    ~"#0  child_sub_function () at /home/jenkins/workspace/binutils-gdb_master_build/arch/amd64/target_board/unix/src/binutils-gdb/gdb/testsuite/gdb.mi/user-selected-context-sync.c:33\n"^M
	    ~"33\t    dummy = !dummy; /* thread loop line */\n"^M
	    ^done^M
	    (gdb) ^M
	    FAIL: gdb.mi/mi-cmd-user-context.exp: frame 1 (unexpected output)

	The problem is that the test expects the following regexp:

	  ".*#0  0x.*"

	And that typically works, when the output of the frame command looks
	like:

	  #0  0x00005555555551bb in child_sub_function () at ...

	Note the lack of hexadecimal address in the failing case.  Whether or
	not the hexadecimal address is printed (roughly) depends on whether the
	current PC is at the beginning of a line.  So depending on where thread
	2 was when GDB stopped it (after thread 1 hit its breakpoint), we can
	get either output.  Adjust the regexps to not expect an hexadecimal
	prefix (0x) but a function name instead (either child_sub_function or
	child_function).  That one is always printed, and is also a good check
	that we are in the frame we expect.

	Note that for test "frame 5", we are showing a pthread frame (on my
	system), so the function name is internal to pthread, not something we
	can rely on.  In that case, it's almost certain that we are not at the
	beginning of a line, or that we don't have debug info, so I think it's
	fine to expect the hex prefix.

	And for test "frame 6", it's ok to _not_ expect a hex prefix (what the
	test currently does), since we are showing thread 1, which has hit a
	breakpoint placed at the beginning of a line.

	When testing this, Tom de Vries pointed out that the current test code
	doesn't ensure that the child threads are in child_sub_function when
	they are stopped.  If the scheduler chooses so, it is possible for the
	child threads to be still in the pthread_barrier_wait or child_function
	functions when they get stopped.  So that would be another racy failure
	waiting to happen.

	The only way I can think of to ensure the child threads are in the
	child_sub_function function when they get stopped is to synchronize the
	threads using some variables instead of pthread_barrier_wait.  So,
	replace the barrier with an array of flags (one per child thread).  Each
	child thread flips its flag in child_sub_function to allow the main
	thread to make progress and eventually hit the breakpoint.

	I copied user-selected-context-sync.c to a new mi-cmd-user-context.c and
	made modifications to that, to avoid interfering with
	user-selected-context-sync.exp.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29025
	Change-Id: I919673bbf9927158beb0e8b7e9e980b8d65eca90

2022-04-05  Luis Machado  <luis.machado@arm.com>

	Fix qRcmd error code parsing
	Someone at IRC spotted a bug in qRcmd handling. This looks like an oversight
	or it is that way for historical reasons.

	The code in gdb/remote.c:remote_target::rcmd uses isdigit instead of
	isxdigit. One could argue that we are expecting decimal numbers, but further
	below we use fromhex ().

	Update the function to use isxdigit instead and also update the documentation.

	I see there are lots of other cases of undocumented number format for error
	messages, mostly described as NN instead of nn. For now I'll just update
	this particular function.

2022-04-05  Simon Marchi  <simon.marchi@efficios.com>

	gdb: resume ongoing step after handling fork or vfork
	The test introduced by this patch would fail in this configuration, with
	the native-gdbserver or native-extended-gdbserver boards:

	    FAIL: gdb.threads/next-fork-other-thread.exp: fork_func=fork: target-non-stop=auto: non-stop=off: displaced-stepping=auto: i=2: next to for loop

	The problem is that the step operation is forgotten when handling the
	fork/vfork.  With "debug infrun" and "debug remote", it looks like this
	(some lines omitted for brevity).  We do the next:

	    [infrun] proceed: enter
	      [infrun] proceed: addr=0xffffffffffffffff, signal=GDB_SIGNAL_DEFAULT
	      [infrun] resume_1: step=1, signal=GDB_SIGNAL_0, trap_expected=0, current thread [4154304.4154304.0] at 0x5555555553bf
	      [infrun] do_target_resume: resume_ptid=4154304.0.0, step=1, sig=GDB_SIGNAL_0
	      [remote] Sending packet: $vCont;r5555555553bf,5555555553c4:p3f63c0.3f63c0;c:p3f63c0.-1#cd
	    [infrun] proceed: exit

	We then handle a fork event:

	    [infrun] fetch_inferior_event: enter
	      [remote] wait: enter
	        [remote] Packet received: T05fork:p3f63ee.3f63ee;06:0100000000000000;07:b08e59f6ff7f0000;10:bf60e8f7ff7f0000;thread:p3f63c0.3f63c6;core:17;
	      [remote] wait: exit
	      [infrun] print_target_wait_results: target_wait (-1.0.0 [process -1], status) =
	      [infrun] print_target_wait_results:   4154304.4154310.0 [Thread 4154304.4154310],
	      [infrun] print_target_wait_results:   status->kind = FORKED, child_ptid = 4154350.4154350.0
	      [infrun] handle_inferior_event: status->kind = FORKED, child_ptid = 4154350.4154350.0
	      [remote] Sending packet: $D;3f63ee#4b
	      [infrun] resume_1: step=0, signal=GDB_SIGNAL_0, trap_expected=0, current thread [4154304.4154310.0] at 0x7ffff7e860bf
	      [infrun] do_target_resume: resume_ptid=4154304.0.0, step=0, sig=GDB_SIGNAL_0
	      [remote] Sending packet: $vCont;c:p3f63c0.-1#73
	    [infrun] fetch_inferior_event: exit

	In the first snippet, we resume the stepping thread with the range-stepping (r)
	vCont command.  But after handling the fork (detaching the fork child), we
	resumed the whole process freely.  The stepping thread, which was paused by
	GDBserver while reporting the fork event, was therefore resumed freely, instead
	of confined to the addresses of the stepped line.  Note that since this
	is a "next", it could be that we have entered a function, installed a
	step-resume breakpoint, and it's ok to continue freely the stepping
	thread, but that's not the case here.  The two snippets shown above were
	next to each other in the logs.

	For the fork case, we can resume stepping right after handling the
	event.

	However, for the vfork case, where we are waiting for the
	external child process to exec or exit, we only resume the thread that
	called vfork, and keep the others stopped (see patch "gdb: fix handling of
	vfork by multi-threaded program" prior in this series).  So we can't
	resume the stepping thread right now.  Instead, do it after handling the
	vfork-done event.

	Change-Id: I92539c970397ce880110e039fe92b87480f816bd

2022-04-05  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/remote: remove_new_fork_children don't access target_waitstatus::child_ptid if kind == TARGET_WAITKIND_THREAD_EXITED
	Following the previous patch, running
	gdb.threads/forking-threads-plus-breakpoints.exp continuously eventually
	gives me an internal error.

	    gdb/target/waitstatus.h:372: internal-error: child_ptid: Assertion `m_kind == TARGET_WAITKIND_FORKED || m_kind == TARGET_WAITKIND_VFORKED' failed.^M
	    FAIL: gdb.threads/forking-threads-plus-breakpoint.exp: cond_bp_target=0: detach_on_fork=on: displaced=off: inferior 1 exited (GDB internal error)

	The backtrace is:

	    0x55925b679c85 internal_error(char const*, int, char const*, ...)
	    	/home/simark/src/binutils-gdb/gdbsupport/errors.cc:55
	    0x559258deadd2 target_waitstatus::child_ptid() const
	    	/home/simark/src/binutils-gdb/gdb/target/waitstatus.h:372
	    0x55925a7cbac9 remote_target::remove_new_fork_children(threads_listing_context*)
	    	/home/simark/src/binutils-gdb/gdb/remote.c:7311
	    0x55925a79dfdb remote_target::update_thread_list()
	    	/home/simark/src/binutils-gdb/gdb/remote.c:3981
	    0x55925ad79b83 target_update_thread_list()
	    	/home/simark/src/binutils-gdb/gdb/target.c:3793
	    0x55925addbb15 update_thread_list()
	    	/home/simark/src/binutils-gdb/gdb/thread.c:2031
	    0x559259d64838 stop_all_threads(char const*, inferior*)
	    	/home/simark/src/binutils-gdb/gdb/infrun.c:5104
	    0x559259d88b45 keep_going_pass_signal
	    	/home/simark/src/binutils-gdb/gdb/infrun.c:8215
	    0x559259d8951b keep_going
	    	/home/simark/src/binutils-gdb/gdb/infrun.c:8251
	    0x559259d78835 process_event_stop_test
	    	/home/simark/src/binutils-gdb/gdb/infrun.c:6858
	    0x559259d750e9 handle_signal_stop
	    	/home/simark/src/binutils-gdb/gdb/infrun.c:6580
	    0x559259d6c07b handle_inferior_event
	    	/home/simark/src/binutils-gdb/gdb/infrun.c:5832
	    0x559259d57db8 fetch_inferior_event()
	    	/home/simark/src/binutils-gdb/gdb/infrun.c:4222

	Indeed, the code accesses target_waitstatus::child_ptid when the kind
	is TARGET_WAITKIND_THREAD_EXITED, which is not right.  A
	TARGET_WAITKIND_THREAD_EXITED event does not have a child_ptid value
	associated, it has an exit status, which we are not interested in.  The
	intent is to remove from the thread list the thread that has exited.
	Its ptid is found in the stop reply event, get it from there.

	Change-Id: Icb298cbb80b8779fdf0c660dde9a5314d5591535

2022-04-05  Simon Marchi  <simon.marchi@efficios.com>

	gdbserver: report correct status in thread stop race condition
	The test introduced by the following patch would sometimes fail in this
	configuration:

	    FAIL: gdb.threads/next-fork-other-thread.exp: fork_func=vfork: target-non-stop=on: non-stop=off: displaced-stepping=auto: i=14: next to for loop

	The test has multiple threads constantly forking or vforking while the
	main thread keep doing "next"s.

	(After writing the commit message, I realized this also fixes a similar
	failure in gdb.threads/forking-threads-plus-breakpoint.exp with the
	native-gdbserver and native-extended-gdbserver boards.)

	As stop_all_threads is called, because the main thread finished its
	"next", it inevitably happens at some point that we ask the remote
	target to stop a thread and wait() reports that this thread stopped with
	a fork or vfork event, instead of the SIGSTOP we sent to try to stop it.

	While running this test, I attached to GDBserver and stopped at
	linux-low.cc:3626.  We can see that the status pulled from the kernel
	for 2742805 is indeed a vfork event:

	    (gdb) p/x w
	    $3 = 0x2057f
	    (gdb) p WIFSTOPPED(w)
	    $4 = true
	    (gdb) p WSTOPSIG(w)
	    $5 = 5
	    (gdb) p/x (w >> 8) & (PTRACE_EVENT_VFORK << 8)
	    $6 = 0x200

	However, the statement at line 3626 overrides that:

	    ourstatus->set_stopped (gdb_signal_from_host (WSTOPSIG (w)));

	OURSTATUS becomes "stopped by a SIGTRAP".  The information about the
	fork or vfork is lost.

	It's then all downhill from there, stop_all_threads eventually asks for
	a thread list update.  That thread list includes the child of that
	forgotten fork or vfork, the remote target goes "oh cool, a new process,
	let's attach to it!", when in fact that vfork child's destiny was to be
	detached.

	My reverse-engineered understanding of the code around there is that the
	if/else between lines 3562 and 3583 (in the original code) makes sure
	OURSTATUS is always initialized (not "ignore").  Either the details are
	already in event_child->waitstatus (in the case of fork/vfork, for
	example), in which case we just copy event_child->waitstatus to
	ourstatus.  Or, if the event is a plain "stopped by a signal" or a
	syscall event, OURSTATUS is set to "stopped", but without a signal
	number.  Lines 3601 to 3629 (in the original code) serve to fill in that
	last bit of information.

	The problem is that when `w` holds the vfork status, the code wrongfully
	takes this branch, because WSTOPSIG(w) returns SIGTRAP:

	  else if (current_thread->last_resume_kind == resume_stop
	       && WSTOPSIG (w) != SIGSTOP)

	The intent of this branch is, for example, when we sent SIGSTOP to try
	to stop a thread, but wait() reports that it stopped with another signal
	(that it must have received from somewhere else simultaneously), say
	SIGWINCH.  In that case, we want to report the SIGWINCH.  But in our
	fork/vfork case, we don't want to take this branch, as the thread didn't
	really stop because it received a signal.  For the non "stopped by a
	signal" and non "syscall signal" cases, we would ideally skip over all
	that snippet that fills in the signal or syscall number.

	The fix I propose is to move this snipppet of the else branch of the
	if/else above.  In addition to moving the code, the last two "else if"
	branches:

	  else if (current_thread->last_resume_kind == resume_stop
		   && WSTOPSIG (w) != SIGSTOP)
	    {
	      /* A thread that has been requested to stop by GDB with vCont;t,
		 but, it stopped for other reasons.  */
	      ourstatus->set_stopped (gdb_signal_from_host (WSTOPSIG (w)));
	    }
	  else if (ourstatus->kind () == TARGET_WAITKIND_STOPPED)
	    ourstatus->set_stopped (gdb_signal_from_host (WSTOPSIG (w)));

	are changed into a single else:

	  else
	    ourstatus->set_stopped (gdb_signal_from_host (WSTOPSIG (w)));

	This is the default path we take if:

	 - W is not a syscall status
	 - W does not represent a SIGSTOP that have sent to stop the thread and
	   therefore want to suppress it

	Change-Id: If2dc1f0537a549c293f7fa3c53efd00e3e194e79

2022-04-05  Simon Marchi  <simon.marchi@efficios.com>

	gdb: fix handling of vfork by multi-threaded program (follow-fork-mode=parent, detach-on-fork=on)
	There is a problem with how GDB handles a vfork happening in a
	multi-threaded program.  This problem was reported to me by somebody not
	using vfork directly, but using system(3) in a multi-threaded program,
	which may be implemented using vfork.

	This patch only deals about the follow-fork-mode=parent,
	detach-on-fork=on case, because it would be too much to chew at once to
	fix the bugs in the other cases as well (I tried).

	The problem
	-----------

	When a program vforks, the parent thread is suspended by the kernel
	until the child process exits or execs.  Specifically, in a
	multi-threaded program, only the thread that called vfork is suspended,
	other threads keep running freely. This is documented in the vfork(2)
	man page ("Caveats" section).

	Let's suppose GDB is handling a vfork and the user's desire is to detach
	from the child. Before detaching the child, GDB must remove the software
	breakpoints inserted in the shared parent/child address space, in case
	there's a breakpoint in the path the child is going to take before
	exec'ing or exit'ing (unlikely, but possible). Otherwise the child could
	hit a breakpoint instruction while running outside the control of GDB,
	which would make it crash.  GDB must also avoid re-inserting breakpoints
	in the parent as long as it didn't receive the "vfork done" event (that
	is, when the child has exited or execed): since the address space is
	shared with the child, that would re-insert breakpoints in the child
	process also. So what GDB does is:

	  1. Receive "vfork" event for the parent
	  2. Remove breakpoints from the (shared) address space and set
	     program_space::breakpoints_not_allowed to avoid re-inserting them
	  3. Detach from the child thread
	  4. Resume the parent
	  5. Wait for and receive "vfork done" event for the parent
	  6. Clean program_space::breakpoints_not_allowed and re-insert
	     breakpoints
	  7. Resume the parent

	Resuming the parent at step 4 is necessary in order for the kernel to
	report the "vfork done" event.  The kernel won't report a ptrace event
	for a thread that is ptrace-stopped.  But the theory behind this is that
	between steps 4 and 5, the parent won't actually do any progress even
	though it is ptrace-resumed, because the kernel keeps it suspended,
	waiting for the child to exec or exit.  So it doesn't matter for that
	thread if breakpoints are not inserted.

	The problem is when the program is multi-threaded.  In step 4, GDB
	resumes all threads of the parent. The thread that did the vfork stays
	suspended by the kernel, so that's fine. But other threads are running
	freely while breakpoints are removed, which is a problem because they
	could miss a breakpoint that they should have hit.

	The problem is present with all-stop and non-stop targets.  The only
	difference is that with an all-stop targets, the other threads are
	stopped by the target when it reports the vfork event and are resumed by
	the target when GDB resumes the parent.  With a non-stop target, the
	other threads are simply never stopped.

	The fix
	-------

	There many combinations of settings to consider (all-stop/non-stop,
	target-non-stop on/off, follow-fork-mode parent/child, detach-on-fork
	on/off, schedule-multiple on/off), but for this patch I restrict the
	scope to follow-fork-mode=parent, detach-on-fork=on.  That's the
	"default" case, where we detach the child and keep debugging the
	parent.  I tried to fix them all, but it's just too much to do at once.
	The code paths and behaviors for when we don't detach the child are
	completely different.

	The guiding principle for this patch is that all threads of the vforking
	inferior should be stopped as long as breakpoints are removed.  This is
	similar to handling in-line step-overs, in a way.

	For non-stop targets (the default on Linux native), this is what
	happens:

	 - In follow_fork, we call stop_all_threads to stop all threads of the
	   inferior
	 - In follow_fork_inferior, we record the vfork parent thread in
	   inferior::thread_waiting_for_vfork_done
	 - Back in handle_inferior_event, we call keep_going, which resumes only
	   the event thread (this is already the case, with a non-stop target).
	   This is the thread that will be waiting for vfork-done.
	 - When we get the vfork-done event, we go in the (new) handle_vfork_done
	   function to restart the previously stopped threads.

	In the same scenario, but with an all-stop target:

	 - In follow_fork, no need to stop all threads of the inferior, the
	   target has stopped all threads of all its inferiors before returning
	   the event.
	 - In follow_fork_inferior, we record the vfork parent thread in
	   inferior::thread_waiting_for_vfork_done.
	 - Back in handle_inferior_event, we also call keep_going.  However, we
	   only want to resume the event thread here, not all inferior threads.
	   In internal_resume_ptid (called by resume_1), we therefore now check
	   whether one of the inferiors we are about to resume has
	   thread_waiting_for_vfork_done set.  If so, we only resume that
	   thread.

	   Note that when resuming multiple inferiors, one vforking and one not
	   non-vforking, we could resume the vforking thread from the vforking
	   inferior plus all threads from the non-vforking inferior.  However,
	   this is not implemented, it would require more work.
	 - When we get the vfork-done event, the existing call to keep_going
	   naturally resumes all threads.

	Testing-wise, add a test that tries to make the main thread hit a
	breakpoint while a secondary thread calls vfork.  Without the fix, the
	main thread keeps going while breakpoints are removed, resulting in a
	missed breakpoint and the program exiting.

	Change-Id: I20eb78e17ca91f93c19c2b89a7e12c382ee814a1

2022-04-05  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/infrun: add logging statement to do_target_resume
	This helped me, it shows which ptid we actually call target_resume with.

	Change-Id: I2dfd771e83df8c25f39371a13e3e91dc7882b73d

2022-04-05  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/infrun: add inferior parameters to stop_all_threads and restart_threads
	A following patch will want to stop all threads of a given inferior (as
	opposed to all threads of all inferiors) while handling a vfork, and
	restart them after.  To help with this, add inferior parameters to
	stop_all_threads and restart_threads.  This is done as a separate patch
	to make sure this doesn't cause regressions on its own, and to keep the
	following patches more concise.

	No visible changes are expected here, since all calls sites pass
	nullptr, which should keep the existing behavior.

	Change-Id: I4d9ba886ce842042075b4e346cfa64bbe2580dbf

2022-04-05  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: replace inferior::waiting_for_vfork_done with inferior::thread_waiting_for_vfork_done
	The inferior::waiting_for_vfork_done flag indicates that some thread in
	that inferior is waiting for a vfork-done event.  Subsequent patches
	will need to know which thread precisely is waiting for that event.

	Replace the boolean flag (waiting_for_vfork_done) with a thread_info
	pointer (thread_waiting_for_vfork_done).

	I think there is a latent buglet in that waiting_for_vfork_done is
	currently not reset on inferior exec or exit.  I could imagine that if a
	thread in the parent process calls exec or exit while another thread of
	the parent process is waiting for its vfork child to exec or exit, we
	could end up with inferior::waiting_for_vfork_done without a thread
	actually waiting for a vfork-done event anymore.  And since that flag is
	checked in resume_1, things could misbehave there.

	Since the new field points to a thread_info object, and those are
	destroyed on exec or exit, it could be worse now since we could try to
	access freed memory, if thread_waiting_for_vfork_done were to point to a
	stale thread_info.  To avoid this, clear the field in
	infrun_inferior_exit and infrun_inferior_execd.

	Change-Id: I31b847278613a49ba03fc4915f74d9ceb228fdce

2022-04-05  Simon Marchi  <simon.marchi@efficios.com>

	gdb: make timestamped_file implement write_async_safe
	Trying to use "set debug linux-nat 1", I get an internal error:

	    /home/smarchi/src/binutils-gdb/gdb/ui-file.h:70: internal-error: write_async_safe: write_async_safe

	The problem is that timestamped_file doesn't implement write_async_safe,
	which linux-nat's sigchld_handler uses.  Implement it.

	Change-Id: I830981010c6119f13ae673605ed015cced0f5ee8

2022-04-05  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-04  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: fix timeout in server-pipe.exp test
	I noticed that the gdb.server/server-pipe.exp test would sometimes
	timeout when my machine was more heavily loaded.  Turns out the test
	is reading all the shared libraries over GDB's remote protocol, which
	can be slow.

	We avoid this in other tests by setting the sysroot in GDBFLAGS,
	something which is missing from the gdb.server/server-pipe.exp test.

	Fix the timeouts by setting sysroot in GDBFLAGS, after this the shared
	libraries are no longer copied over the remote protocol, and I no
	longer see the test timeout.

2022-04-04  John Baldwin  <jhb@FreeBSD.org>

	Handle TLS variable lookups when using separate debug files.
	Commit df22c1e5d53c38f38bce6072bb46de240f9e0e2b handled the case that
	a separate debug file was passed as the objfile for a shared library
	to svr4_fetch_objfile_link_map.  However, a separate debug file can
	also be passed for TLS variables in the main executable.  In addition,
	frv_fetch_objfile_link_map also expects to be passed the original
	objfile rather than a separate debug file, so pull the code to resolve
	a separate debug file to the main objfile up into
	target_translate_tls_address.

2022-04-04  Lancelot SIX  <lancelot.six@amd.com>

	gdb: Add maint set ignore-prologue-end-flag
	The previous patch added support for the DWARF prologue-end flag in line
	table. This flag can be used by DWARF producers to indicate where to
	place breakpoints past a function prologue.  However, this takes
	precedence over prologue analyzers. So if we have to debug a program
	with erroneous debug information, the overall debugging experience will
	be degraded.

	This commit proposes to add a maintenance command to instruct GDB to
	ignore the prologue_end flag.

	Tested on x86_64-gnu-linux.

	Change-Id: Idda6d1b96ba887f4af555b43d9923261b9cc6f82

2022-04-04  Lancelot SIX  <lancelot.six@amd.com>

	gdb: Add support for DW_LNS_set_prologue_end in line-table
	Add support for DW_LNS_set_prologue_end when building line-tables.  This
	attribute can be set by the compiler to indicate that an instruction is
	an adequate place to set a breakpoint just after the prologue of a
	function.

	The compiler might set multiple prologue_end, but considering how
	current skip_prologue_using_sal works, this commit modifies it to accept
	the first instruction with this marker (if any) to be the place where a
	breakpoint should be placed to be at the end of the prologue.

	The need for this support came from a problematic usecase generated by
	hipcc (i.e. clang).  The problem is as follows:  There's a function
	(lets call it foo) which covers PC from 0xa800 to 0xa950.  The body of
	foo begins with a call to an inlined function, covering from 0xa800 to
	0xa94c.   The issue is that when placing a breakpoint at 'foo', GDB
	inserts the breakpoint at 0xa818.  The 0x18 offset is what GDB thinks is
	foo's first address past the prologue.

	Later, when hitting the breakpoint, GDB reports the stop within the
	inlined function because the PC falls in its range while the user
	expects to stop in FOO.

	Looking at the line-table for this location, we have:

	    INDEX  LINE   ADDRESS            IS-STMT
	    [...]
	    14     293    0x000000000000a66c Y
	    15     END    0x000000000000a6e0 Y
	    16     287    0x000000000000a800 Y
	    17     END    0x000000000000a818 Y
	    18     287    0x000000000000a824 Y
	    [...]

	For comparison, let's look at llvm-dwarfdump's output for this CU:

	    Address            Line   Column File   ISA Discriminator Flags
	    ------------------ ------ ------ ------ --- ------------- -------------
	    [...]
	    0x000000000000a66c    293     12      2   0             0  is_stmt
	    0x000000000000a6e0     96     43     82   0             0  is_stmt
	    0x000000000000a6f8    102     18     82   0             0  is_stmt
	    0x000000000000a70c    102     24     82   0             0
	    0x000000000000a710    102     18     82   0             0
	    0x000000000000a72c    101     16     82   0             0  is_stmt
	    0x000000000000a73c   2915     50     83   0             0  is_stmt
	    0x000000000000a74c    110      1      1   0             0  is_stmt
	    0x000000000000a750    110      1      1   0             0  is_stmt end_sequence
	    0x000000000000a800    107      0      1   0             0  is_stmt
	    0x000000000000a800    287     12      2   0             0  is_stmt prologue_end
	    0x000000000000a818    114     59     81   0             0  is_stmt
	    0x000000000000a824    287     12      2   0             0  is_stmt
	    0x000000000000a828    100     58     82   0             0  is_stmt
	    [...]

	The main difference we are interested in here is that llvm-dwarfdump's
	output tells us that 0xa800 is an adequate place to place a breakpoint
	past a function prologue.  Since we know that foo covers from 0xa800 to
	0xa94c, 0xa800 is the address at which the breakpoint should be placed
	if the user wants to break in foo.

	This commit proposes to add support for the prologue_end flag in the
	line-program processing.

	The processing of this prologue_end flag is made in skip_prologue_sal,
	before it calls gdbarch_skip_prologue_noexcept.  The intent is that if
	the compiler gave information on where the prologue ends, we should use
	this information and not try to rely on architecture dependent logic to
	guess it.

	The testsuite have been executed using this patch on GNU/Linux x86_64.
	Testcases have been compiled with both gcc/g++ (verison 9.4.0) and
	clang/clang++ (version 10.0.0) since at the time of writing GCC does not
	set the prologue_end marker.  Tests done with GCC 11.2.0 (not over the
	entire testsuite) show that it does not emit this flag either.

	No regression have been observed with GCC or Clang.  Note that when
	using Clang, this patch fixes a failure in
	gdb.opt/inline-small-func.exp.

	Change-Id: I720449a8a9b2e1fb45b54c6095d3b1e9da9152f8

2022-04-04  Lancelot SIX  <lancelot.six@amd.com>

	gdb/buildsym: Line record use a record flag
	Currently when recording a line entry (with
	buildsym_compunit::record_line), a boolean argument argument is used to
	indicate that the is_stmt flag should be set for this particular record.
	As a later commit will add support for new flags, instead of adding a
	parameter to record_line for each possible flag, transform the current
	is_stmt parameter into a enum flag.  This flags parameter will allow
	greater flexibility in future commits.

	This enum flags type is not propagated into the linetable_entry type as
	this would require a lot of changes across the codebase for no practical
	gain (it currently uses a bitfield where each interesting flag only
	occupy 1 bit in the structure).

	Tested on x86_64-linux, no regression observed.

	Change-Id: I5d061fa67bdb34918742505ff983d37453839d6a

2022-04-04  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: make timestamped_file implement can_emit_style_escape
	In our AMDGPU downstream port, we use styling in some logging output.
	We noticed it stopped working after the gdb_printf changes.  Making
	timestamped_file implement can_emit_style_escape (returning the value of
	the stream it wraps) fixes it.  To show that it works, modify some
	logging statements in auto-load.c to output style filenames.  You can
	see it in action by setting "set debug auto-load 1" and running a
	program.  We can incrementally add styling to other debug statements
	throughout GDB, as needed.

	Change-Id: I78a2fd1e078f80f2263251cf6bc53b3a9de9c17a

2022-04-04  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove assertion in psymbol_functions::expand_symtabs_matching
	psymtab_to_symtab is documented as possibly returning nullptr, if the
	primary symtab of the partial symtab has no symbols.  However,
	psymbol_functions::expand_symtabs_matching asserts that the result of
	psymtab_to_symtab as non-nullptr.

	I caught this assert by trying the CTF symbol reader on a library I
	built with -gctf:

	    $ ./gdb --data-directory=data-directory /tmp/babeltrace-ctf/src/lib/.libs/libbabeltrace2.so.0.0.0
	    ...
	    Reading symbols from /tmp/babeltrace-ctf/src/lib/.libs/libbabeltrace2.so.0.0.0...
	    (gdb) maintenance expand-symtabs
	    /home/simark/src/binutils-gdb/gdb/psymtab.c:1142: internal-error: expand_symtabs_matching: Assertion `symtab != nullptr' failed.

	The "symtab" in question is:

	    $  readelf --ctf=.ctf /tmp/babeltrace-ctf/src/lib/.libs/libbabeltrace2.so.0.0.0
	    ...
	    CTF archive member: /home/simark/src/babeltrace/src/lib/graph/component-descriptor-set.c:

	      Header:
	        Magic number: 0xdff2
	        Version: 4 (CTF_VERSION_3)
	        Flags: 0xe (CTF_F_NEWFUNCINFO, CTF_F_IDXSORTED, CTF_F_DYNSTR)
	        Parent name: .ctf
	        Compilation unit name: /home/simark/src/babeltrace/src/lib/graph/component-descriptor-set.c
	        Type section:       0x0 -- 0x13 (0x14 bytes)
	        String section:     0x14 -- 0x5f (0x4c bytes)

	      Labels:

	      Data objects:

	      Function objects:

	      Variables:

	      Types:
	        0x80000001: (kind 5) bt_bool (*) (const bt_value *) (aligned at 0x8)

	      Strings:
	        0x0:
	        0x1: .ctf
	        0x6: /home/simark/src/babeltrace/src/lib/graph/component-descriptor-set.c

	It contains a single type, and it is skipped by ctf_add_type_cb, because
	an identical type was already seen earlier in this objfile.  As a
	result, no compunit_symtab is created.

	Change psymbol_functions::expand_symtabs_matching to expect that
	psymtab_to_symtab can return nullptr.

	Another possibility would be to make the CTF symbol reader always create
	a compunit_symtab, even if there are no symbols in it (like the DWARF
	parser does), but so far I don't see any advantage in doing so.

	Change-Id: Ic43c38202c838a5eb87630ed1fd61d33528164f4

2022-04-04  Andrew Burgess  <aburgess@redhat.com>

	sim: fixes for libopcodes styled disassembler
	In commit:

	  commit 60a3da00bd5407f07d64dff82a4dae98230dfaac
	  Date:   Sat Jan 22 11:38:18 2022 +0000

	      objdump/opcodes: add syntax highlighting to disassembler output

	I broke several sim/ targets by forgetting to update their uses of the
	libopcodes disassembler to take account of the new styled printing.

	These should all be fixed by this commit.

	I've not tried to add actual styled output to the simulator traces,
	instead, the styled print routines just ignore the style and print the
	output unstyled.

2022-04-04  Tom Tromey  <tromey@adacore.com>

	Remove some globals from nat/windows-nat.c
	nat/windows-nat.c has a number of globals that it uses to communicate
	with its clients (gdb and gdbserver).  However, if we ever want the
	Windows ports to be multi-inferior, globals won't work.

	This patch takes a step toward that by moving most nat/windows-nat.c
	globals into a new struct windows_process_info.  Many functions are
	converted to be methods on this object.

	A couple of globals remain, as they are needed to truly be global due
	to the way that the Windows debugging APIs work.

	The clients still have a global for the current process.  That is,
	this patch is a step toward the end goal, but doesn't implement the
	goal itself.

2022-04-04  Tom Tromey  <tromey@adacore.com>

	Remove windows_thread_info destructor
	windows_thread_info declares and defines a destructor, but this
	doesn't need to be explicit.

	Use unique_ptr in the Windows thread list
	windows-nat.c uses some manual memory management when manipulating the
	thread_list global.  Changing this to use unique_ptr simplifies the
	code, in particular windows_init_thread_list.  (Note that, while I
	think the the call to init_thread_list in there is wrong, I haven't
	removed it in this patch.)

	Use auto_obstack in windows-nat.c
	One spot in windows-nat.c can use auto_obstack, removing some manual
	memory management.

2022-04-04  Tom Tromey  <tromey@adacore.com>

	Simplify windows-nat.c solib handling
	Currently windows-nat.c uses struct so_list to record its local idea
	of which shared libraries have been loaded.  However, many fields in
	this are not needed, and furthermore I found this quite confusing at
	first -- Windows actually uses solib-target and so the use of so_list
	here is weird.

	This patch simplifies this code by changing it to use a std::vector
	and a new type that holds exactly what's needed for the Windows code.

2022-04-04  Pedro Alves  <pedro@palves.net>

	Avoid undefined behavior in gdbscm_make_breakpoint
	Running gdb.guile/scm-breakpoint.exp against an --enable-ubsan build,
	we see:

	 UNRESOLVED: gdb.guile/scm-breakpoint.exp: test_watchpoints: create a breakpoint with an invalid type number
	 ...
	 guile (define wp2 (make-breakpoint "result" #:wp-class WP_WRITE #:type 999))
	 ../../src/gdb/guile/scm-breakpoint.c:377:11: runtime error: load of value 999, which is not a valid value for type 'bptype'
	 ERROR: GDB process no longer exists

	Fix this by parsing the user/guile input as plain int, and cast to
	internal type only after we know we have a number that would be valid.

	Change-Id: I03578d07db00be01b610a8f5ce72e5521aea6a4b

2022-04-04  Tom Tromey  <tromey@adacore.com>

	Add context-sensitive field name completion to Ada parser
	This updates the Ada expression parser to implement context-sensitive
	field name completion.  This is PR ada/28727.

	This is somewhat complicated due to some choices in the Ada lexer --
	it chooses to represent a sequence of "."-separated identifiers as a
	single token, so the parser must partially recreate the completer's
	logic to find the completion word boundaries.

	Despite the minor warts in this patch, though, it is a decent
	improvement.  It's possible that the DWARF reader rewrite will help
	fix the package completion problem pointed out in this patch as well.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28727

2022-04-04  Tom Tromey  <tromey@adacore.com>

	Consolidate single-char tokens in ada-lex.l
	There are two rules in ada-lex.l that match single-character tokens.
	This merges them.

	Also, this removes '.' from the list of such tokens.  '.' is not used
	in any production in ada-exp.y, and removing it here helps the
	subsequent completion patches.

2022-04-04  Tom Tromey  <tromey@adacore.com>

	Remove the Ada DOT_ALL token
	The Ada parser has a DOT_ALL token to represent ".all", and another
	token to represent other ".<identifier>" forms.  However, for
	completion it is a bit more convenient to unify these cases, so this
	patch removes DOT_ALL.

	Refactor ada-lex.l:processId
	processId in ada-lex.l is a bit funny -- it uses an "if" and a
	"switch", and a nested loop.  This patch cleans it up a bit, changing
	it to use a boolean flag and a simpler "if".

	Implement completion for Ada attributes
	This adds a completer for Ada attributes.  Some work in the lexer is
	required in order to match end-of-input correctly, as flex does not
	have a general-purpose way of doing this.  (The approach taken here is
	recommended in the flex manual.)

2022-04-04  Tom Tromey  <tromey@adacore.com>

	Refactor expression completion
	This refactors the gdb expression completion code to make it easier to
	add more types of completers.

	In the old approach, just two kinds of completers were supported:
	field names for some sub-expression, or tag names (like "enum
	something").  The data for each kind was combined in single structure,
	"expr_completion_state", and handled explicitly by
	complete_expression.

	In the new approach, the parser state just holds an object that is
	responsible for implementing completion.  This way, new completion
	types can be added by subclassing this base object.

	The structop completer is moved into structop_base_operation, and new
	objects are defined for use by the completion code.  This moves much
	of the logic of expression completion out of completer.c as well.

2022-04-04  Tom Tromey  <tromey@adacore.com>

	Enable "set debug parser" for Ada
	I noticed that "set debug parser 1" did not affect Ada parsing.  This
	patch fixes the problem.

	Because this is rarely useful, and pretty much only for maintainers, I
	didn't write a test case.

2022-04-04  Tom Tromey  <tromey@adacore.com>

	Fix bug in Ada attributes lexing
	The Ada lexer allows whitespace between the apostrophe and the
	attribute text, but processAttribute does not handle this.  This patch
	fixes the problem and introduces a regression test.

	Remove null sentinel from 'attributes'
	In a subsequent patch, it's handy if the 'attributes' array in
	ada-lex.l does not have a NULL sentinel at the end.  In C++, this is
	easy to avoid.

	Handle ghost entities in symbol lookup
	Normally, SPARK ghost entities are removed from the executable.
	However, with -gnata, they will be preserved.  In this situation, it's
	handy to be able to inspect them.  This patch allows this by removing
	the "___ghost_" prefix in the appropriate places.

2022-04-04  Simon Marchi  <simon.marchi@efficios.com>

	gdb: rename start_symtab/end_symtab to start_compunit_symtab/end_compunit_symtab
	It's a bit confusing because we have both "compunit_symtab" and "symtab"
	types, and many methods and functions containing "start_symtab" or
	"end_symtab", which actually deal with compunit_symtabs.  I believe this
	comes from the time before compunit_symtab was introduced, where
	symtab did the job of both.

	Rename everything I found containing start_symtab or end_symtab to use
	start_compunit_symtab or end_compunit_symtab.

	Change-Id: If3849b156f6433640173085ad479b6a0b085ade2

2022-04-04  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove some unused buildsym-legacy functions
	Pretty much self-explanatory.

	Change-Id: I5b658d017cd891ecdd1df61075eacb0f44316935

2022-04-04  Fangrui Song  <i@maskray.me>

	gas: copy st_size only if unset
	For
	```
	.size foo1, 1
	foo1:

	.set bar1, foo1
	.size bar1, 2
	.size bar2, 2
	.set bar2, foo1

	.set bar3, foo2
	.size bar3, 2
	.size bar4, 2
	.set bar4, foo2

	.size foo2, 1
	foo2:
	```

	bar1's size is 2 while bar2, bar3, bar4's is 1. The behavior of bar1 makes sense
	(generally directives on the new symbol should win) and is relied upon by glibc
	stdio-common/errlist.c:

	```
	        .hidden _sys_errlist_internal
	        .globl  _sys_errlist_internal
	        .type   _sys_errlist_internal, @object
	        .size   _sys_errlist_internal, 1072
	_sys_errlist_internal:

	        .globl __GLIBC_2_1_sys_errlist
	        .set __GLIBC_2_1_sys_errlist, _sys_errlist_internal
	        .type __GLIBC_2_1_sys_errlist, %object
	        .size __GLIBC_2_1_sys_errlist, 125 * (64 / 8)

	// glibc expects that .size __GLIBC_2_1_sys_errlist, 125 * (64 / 8) wins.
	```

	The behavior of bar2/bar3/bar4 seems brittle. To avoid the reordering of the two
	code blocks which will result in the bar3 situation, glibc compiles errlist.c
	with gcc -fno-toplevel-reorder (previously -fno-unit-at-a-time).

	To fix the inconsistency and improve robustness, make bar2/bar3/bar4 match bar1,
	removing the directive order sensitivity.

	There is a pity that `.size dest, 0` is indistinguishable from the case where
	dest is unset, but the compromise seems fine.

	    PR gas/29012
	    * config/obj-elf.c (elf_copy_symbol_attributes): don't copy if src's size
	      has been set.
	    * testsuite/gas/elf/elf.exp: New test.
	    * testsuite/gas/elf/size.d: New file.
	    * testsuite/gas/elf/size.s: Likewise.

2022-04-04  Andrew Burgess  <aburgess@redhat.com>

	gdb: remove use of vfprintf_filtered
	Commit:

	  commit 60a3da00bd5407f07d64dff82a4dae98230dfaac
	  Date:   Sat Jan 22 11:38:18 2022 +0000

	      objdump/opcodes: add syntax highlighting to disassembler output

	Introduced a new use of vfprintf_filtered, which has been deprecated.
	This commit replaces this with gdb_vprintf instead.

2022-04-04  Andrew Burgess  <aburgess@redhat.com>

	opcodes/i386: partially implement disassembler style support
	This commit adds partial support for disassembler styling in the i386
	disassembler.

	The i386 disassembler collects the instruction arguments into an array
	of strings, and then loops over the array printing the arguments out
	later on.  The problem is that by the time we print the arguments out
	it's not obvious what the type of each argument is.

	Obviously this can be fixed, but I'd like to not do that as part of
	this commit, rather, I'd prefer to keep this commit as small as
	possible to get the basic infrastructure in place, then we can improve
	on this, to add additional styling, in later commits.

	For now then, I think this commit should correctly style mnemonics,
	some immediates, and comments.  Everything else will be printed as
	plain text, which will include most instruction arguments, unless the
	argument is printed as a symbol, by calling the print_address_func
	callback.

	Ignoring colours, there should be no other user visible changes in the
	output of the disassembler in either objdump or gdb.

	opcodes/ChangeLog:

		* disassembler.c (disassemble_init_for_target): Set
		created_styled_output for i386 based targets.
		* i386-dis.c: Changed throughout to use fprintf_styled_func
		instead of fprintf_func.

2022-04-04  Andrew Burgess  <aburgess@redhat.com>

	opcodes/riscv: implement style support in the disassembler
	Update the RISC-V disassembler to supply style information.  This
	allows objdump to apply syntax highlighting to the disassembler
	output (when the appropriate command line flag is used).

	Ignoring colours, there should be no other user visible changes in the
	output of the disassembler in either objdump or gdb.

	opcodes/ChangeLog:

		* disassembler.c (disassemble_init_for_target): Set
		created_styled_output for riscv.
		* riscv-dis.c: Changed throughout to use fprintf_styled_func
		instead of fprintf_func.

2022-04-04  Andrew Burgess  <aburgess@redhat.com>

	objdump/opcodes: add syntax highlighting to disassembler output
	This commit adds the _option_ of having disassembler output syntax
	highlighted in objdump.  This option is _off_ by default.  The new
	command line options are:

	  --disassembler-color=off		# The default.
	  --disassembler-color=color
	  --disassembler-color=extended-color

	I have implemented two colour modes, using the same option names as we
	use of --visualize-jumps, a basic 8-color mode ("color"), and an
	extended 8bit color mode ("extended-color").

	The syntax highlighting requires that each targets disassembler be
	updated; each time the disassembler produces some output we now pass
	through an additional parameter indicating what style should be
	applied to the text.

	As updating all target disassemblers is a large task, the old API is
	maintained.  And so, a user of the disassembler (i.e. objdump, gdb)
	must provide two functions, the current non-styled print function, and
	a new, styled print function.

	I don't currently have a plan for converting every single target
	disassembler, my hope is that interested folk will update the
	disassemblers they are interested in.  But it is possible some might
	never get updated.

	In this initial series I intend to convert the RISC-V disassembler
	completely, and also do a partial conversion of the x86 disassembler.
	Hopefully having the x86 disassembler at least partial converted will
	allow more people to try this out easily and provide feedback.

	In this commit I have focused on objdump.  The changes to GDB at this
	point are the bare minimum required to get things compiling, GDB makes
	no use of the styling information to provide any colors, that will
	come later, if this commit is accepted.

	This first commit in the series doesn't convert any target
	disassemblers at all (the next two commits will update some targets),
	so after this commit, the only color you will see in the disassembler
	output, is that produced from objdump itself, e.g. from
	objdump_print_addr_with_sym, where we print an address and a symbol
	name, these are now printed with styling information, and so will have
	colors applied (if the option is on).

	Finally, my ability to pick "good" colors is ... well, terrible.  I'm
	in no way committed to the colors I've picked here, so I encourage
	people to suggest new colors, or wait for this commit to land, and
	then patch the choice of colors.

	I do have an idea about using possibly an environment variable to
	allow the objdump colors to be customised, but I haven't done anything
	like that in this commit, the color choices are just fixed in the code
	for now.

	binutils/ChangeLog:

		* NEWS: Mention new feature.
		* doc/binutils.texi (objdump): Describe --disassembler-color
		option.
		* objdump.c (disassembler_color): New global.
		(disassembler_extended_color): Likewise.
		(disassembler_in_comment): Likewise.
		(usage): Mention --disassembler-color option.
		(long_options): Add --disassembler-color option.
		(objdump_print_value): Use fprintf_styled_func instead of
		fprintf_func.
		(objdump_print_symname): Likewise.
		(objdump_print_addr_with_sym): Likewise.
		(objdump_color_for_disassembler_style): New function.
		(objdump_styled_sprintf): New function.
		(fprintf_styled): New function.
		(disassemble_jumps): Use disassemble_set_printf, and reset
		disassembler_in_comment.
		(null_styled_print): New function.
		(disassemble_bytes): Use disassemble_set_printf, and reset
		disassembler_in_comment.
		(disassemble_data): Update init_disassemble_info call.
		(main): Handle --disassembler-color option.

	include/ChangeLog:

		* dis-asm.h (enum disassembler_style): New enum.
		(struct disassemble_info): Add fprintf_styled_func field, and
		created_styled_output field.
		(disassemble_set_printf): Declare.
		(init_disassemble_info): Add additional parameter.
		(INIT_DISASSEMBLE_INFO): Add additional parameter.

	opcodes/ChangeLog:

		* dis-init.c (init_disassemble_info): Take extra parameter,
		initialize the new fprintf_styled_func and created_styled_output
		fields.
		* disassembler.c (disassemble_set_printf): New function definition.

2022-04-04  Tom Tromey  <tom@tromey.com>

	Remove more Python 2 code
	I found another more place that still had a workaround for Python 2.
	This patch removes it.

2022-04-04  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix KPASS in gdb.ada/arrayptr.exp
	On openSUSE Leap 15.3 I run into:
	...
	KPASS: gdb.ada/arrayptr.exp: scenario=minimal: print pa_ptr.all \
	  (PRMS minimal encodings)
	KPASS: gdb.ada/arrayptr.exp: scenario=minimal: print pa_ptr(3) \
	  (PRMS minimal encodings)
	KPASS: gdb.ada/arrayptr.exp: scenario=minimal: print pa_ptr.all(3) \
	  (PRMS minimal encodings)
	...

	The test-case KFAILs some tests.  However, the analysis in the corresponding
	PR talks of a compiler problem, so it should use XFAILs instead.

	The KFAILs are setup for pre-gcc-12, but apparantly the fix has been
	backported to system compiler 7.5.0, hence the KPASS.

	Fix this by:
	- using an XFAIL instead of a KFAIL
	- matching the specific gdb output that corresponds to the XFAILs
	  (reproduced on Fedora 34).

	Tested on x86_64-linux, specifically openSUSE Leap 15.3 and Fedora 34.

2022-04-04  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-03  rupothar  <rupesh.potharla@amd.com>

	gdb: add support for Fortran's ASSUMED RANK arrays
	This patch adds a new dynamic property DYN_PROP_RANK, this property is
	read from the DW_AT_rank attribute and stored within the type just
	like other dynamic properties.

	As arrays with dynamic ranks make use of a single
	DW_TAG_generic_subrange to represent all ranks of the array, support
	for this tag has been added to dwarf2/read.c.

	The final piece of this puzzle is to add support in gdbtypes.c so that
	we can resolve an array type with dynamic rank.  To do this the
	existing resolve_dynamic_array_or_string function is split into two,
	there's a new resolve_dynamic_array_or_string_1 core that is
	responsible for resolving each rank of the array, while the now outer
	resolve_dynamic_array_or_string is responsible for figuring out the
	array rank (which might require resolving a dynamic property) and then
	calling the inner core.

	The resolve_dynamic_range function now takes a rank, which is passed
	on to the dwarf expression evaluator.  This rank will only be used in
	the case where the array itself has dynamic rank, but we now pass the
	rank in all cases, this should be harmless if the rank is not needed.

	The only small nit is that resolve_dynamic_type_internal actually
	handles resolving dynamic ranges itself, which now obviously requires
	us to pass a rank value.  But what rank value to use?  In the end I
	just passed '1' through here as a sane default, my thinking is that if
	we are in resolve_dynamic_type_internal to resolve a range, then the
	range isn't part of an array with dynamic rank, and so the range
	should actually be using the rank value at all.

	An alternative approach would be to make the rank value a
	gdb::optional, however, this ends up adding a bunch of complexity to
	the code (e.g. having to conditionally build the array to pass to
	dwarf2_evaluate_property, and handling the 'rank - 1' in
	resolve_dynamic_array_or_string_1) so I haven't done that, but could,
	if people think that would be a better approach.

	Finally, support for assumed rank arrays was only fixed very recently
	in gcc, so you'll need the latest gcc in order to run the tests for
	this.

	Here's an example test program:

	  PROGRAM arank
	    REAL :: a1(10)
	    CALL sub1(a1)

	  CONTAINS

	    SUBROUTINE sub1(a)
	      REAL :: a(..)
	      PRINT *, RANK(a)
	    END SUBROUTINE sub1
	  END PROGRAM arank

	Compiler Version:
	gcc (GCC) 12.0.0 20211122 (experimental)

	Compilation command:
	gfortran assumedrank.f90 -gdwarf-5 -o assumedrank

	Without Patch:

	  gdb -q assumedrank
	  Reading symbols from assumedrank...
	  (gdb) break sub1
	  Breakpoint 1 at 0x4006ff: file assumedrank.f90, line 10.
	  (gdb) run
	  Starting program: /home/rupesh/STAGING-BUILD-2787/bin/assumedrank

	  Breakpoint 1, arank::sub1 (a=<unknown type in /home/rupesh/STAGING-BUILD-2787
	  /bin/assumedrank, CU 0x0, DIE 0xd5>) at assumedrank.f90:10
	  10       PRINT *, RANK(a)
	  (gdb) print RANK(a)
	  'a' has unknown type; cast it to its declared type

	With patch:

	  gdb -q assumedrank
	  Reading symbols from assumedrank...
	  (gdb) break sub1
	  Breakpoint 1 at 0x4006ff: file assumedrank.f90, line 10.
	  (gdb) run
	  Starting program: /home/rupesh/STAGING-BUILD-2787/bin/assumedrank

	  Breakpoint 1, arank::sub1 (a=...) at assumedrank.f90:10
	  10       PRINT *, RANK(a)
	  (gdb) print RANK(a)
	  $1 = 1
	  (gdb) ptype a
	  type = real(kind=4) (10)
	  (gdb)

	Co-Authored-By: Andrew Burgess <aburgess@redhat.com>

2022-04-03  Andrew Burgess  <aburgess@redhat.com>

	gdb/dwarf: pass an array of values to the dwarf evaluator
	When we need to evaluate a DWARF expression in order to resolve some
	dynamic property of a type we call the dwarf2_evaluate_property
	function, which is declared in gdb/dwarf/loc.h and defined in
	gdb/dwarf/loc.c.

	Currently, this function takes (amongst other things) an argument of
	type property_addr_info called addr_stack and a boolean called
	push_initial_value.  When push_initial_value then the top value of
	addr_stack is pushed onto the dwarf expression evaluation stack before
	the expression is evaluated.

	So far this has worked fine, as the only two cases we needed to handle
	are the case the DWARF expression doesn't require the object
	address (what the top of addr_stack represents), and the case where
	the DWARF expression does require the address.

	In the next commit this is going to change.  As we add support for
	Fortran assumed rank arrays, we need to start resolving the dynamic
	properties of arrays.  To do this, we need to push the array rank onto
	the dwarf expression evaluation stack before the expression is
	evaluated.

	This commit is a refactoring commit aimed at making it easier to
	support Fortran assumed rank arrays.  Instead of passing a boolean,
	and using this to decide if we should push the object address or not,
	we instead pass an array (view) of values that should be pushed to the
	dwarf expression evaluation stack.

	In the couple of places where we previously passed push_initial_value
	as true (mostly this was defaulting to false), we now have to pass the
	address from the addr_stack as an item in the array view.

	In the next commit, when we want to handle passing the array rank,
	this will easily be supported too.

	There should be no user visible changes after this commit.

2022-04-03  Andrew Burgess  <aburgess@redhat.com>

	gdb: small simplification in dwarf2_locexpr_baton_eval
	While examining the dwarf expression evaluator, I noticed that in
	dwarf2_locexpr_baton_eval, whenever push_initial_value is true, the
	addr_stack will never be nullptr.

	This allows for a small cleanup, replacing an if/then/else with an
	assertion.

	There should be no user visible changes after this commit.

2022-04-03  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: resolve some duplicate test names in gdb.base
	This commit resolves all the duplicate test names that I see in the
	script:

	  gdb.base/attach-pie-misread.exp

	The duplicate names all come from a second call to
	build_executable_own_libs, so in this commit I've places the second
	call inside a with_test_prefix block.

	While I was making this change I've also modified the value being
	passed as the testname for the second build_executable_own_libs call.
	Previously we used ${test}, however, I think this was likely a
	mistake, the 'test' variable is setup for the previous test.  I
	suspect that ${testfile} is a better choice - especially now we have a
	testname prefix.

	As the testname is only used (after various calls) from within
	build_executable_from_specs should the build fail, I don't think this
	change really makes much difference though.

	There should be no change in what is tested after this commit.

2022-04-03  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: resolve a duplicate test name in a gdb.mi test
	Solve two duplicate test names in the test script:

	  gdb.mi/mi-catch-cpp-exceptions.exp

	by moving the call to restart_for_test inside the with_test_prefix
	block.  There should be no difference in what is tested after this
	commit.

2022-04-03  Andrew Burgess  <aburgess@redhat.com>

	gdb/Makefile.in: move ALLDEPFILES earlier in Makefile.in
	If I do 'make tags' in the gdb build directory, the tags target does
	complete, but I see these warnings:

	  ../../src/gdb/arm.c: No such file or directory
	  ../../src/gdb/arm-get-next-pcs.c: No such file or directory
	  ../../src/gdb/arm-linux.c: No such file or directory

	The reason for this is the ordering of build rules and make variables
	in gdb/Makefile.in, specifically, the placement of the tags related
	rules, and the ALLDEPFILES variable.  The ordering is like this:

	  TAGFILES_NO_SRCDIR = .... $(ALLDEPFILES) ....

	  TAGS: $(TAGFILES_NO_SRCDIR) ....
	          # Recipe uses $(TAGFILES_NO_SRCDIR)

	  tags: TAGS

	  ALLDEPFILES = .....

	When the TAGS rule is parsed TAGFILES_NO_SRCDIR is expanded, which
	then expands ALLDEPFILES, which, at that point in the Makefile is
	undefined, and so expands to the empty string.  As a result TAGS does
	not depend on any file listed in ALLDEPFILES.

	However, when the TAGS recipe is invoked ALLDEPFILES is now defined.
	As a result, all the files in ALLDEPFILES are passed to the etags
	program.

	The ALLDEPFILES references three files, arm.c, arm-get-next-pcs.c, and
	arm-linux.c, which are actually in the gdb/arch/ directory, but, in
	ALLDEPFILES these files don't include the arch/ prefix.  As a result,
	the etags program ends up looking for these files in the wrong
	location.

	As ALLDEPFILES is only used by the TAGS rule, this mistake was not
	previously noticed (the TAGS rule itself was broken until a recent
	commit).

	In this commit I make two changes, first, I move ALLDEPFILES to be
	defined before TAGFILES_NO_SRCDIR, this means that the TAGS rule will
	depend on all the files in ALLDEPFILES.  With this change the TAGS
	rule now breaks complaining that there's no rule to build the 3 files
	mentioned above.

	Next, I have added all *.c files in gdb/arch/ to ALLDEPFILES,
	including their arch/ prefix, and removed the incorrect (missing arch/
	prefix) references.

	With these two changes the TAGS (or tags if you prefer) target now
	builds without any errors or warnings.

2022-04-03  Reuben Thomas  <rrt@sc3d.org>

	gdb/Makefile.in: fix 'make tags' build target
	The gdb_select.h file was moved to the gdbsupport directory long ago,
	but a reference was accident left in gdb/Makefile.in (in the
	HFILES_NO_SRCDIR variable), this commit removes that reference.

	Before this commit, if I use 'make tags' here's what I see:

	  $ make tags
	  make: *** No rule to make target 'gdb_select.h', needed by 'TAGS'.  Stop.

	After this commit 'make tags' completes, but I still see these
	warnings:

	  ../../src/gdb/arm.c: No such file or directory
	  ../../src/gdb/arm-get-next-pcs.c: No such file or directory
	  ../../src/gdb/arm-linux.c: No such file or directory

	These are caused by a separate issue, and will be addressed in the
	next commit.

2022-04-03  Andrew Burgess  <aburgess@redhat.com>

	gdb/Makefile.in: remove SOURCES variable
	The SOURCES variable was added to gdb/Makefile.in as part of commit:

	  commit fb40c20903110ed8af9701ce7c2635abd3770d52
	  Date:   Wed Feb 23 00:25:43 2000 +0000

	      Add mi/ and testsuite/gdb.mi/ subdirectories.

	But as far as I can tell was not used at the time it was added, and is
	not used today.

	Lets remove it.

2022-04-03  Andrew Burgess  <aburgess@redhat.com>

	gdb/tui: fair split of delta after a resize
	Currently, in master gdb, when a tui window is changed in size, the
	screen delta is mostly just added to the next available window.  We
	do take care to respect the min/max size, but in most cases, these
	limits are just "the terminal size", and so, we end up placing the
	whole delta on the next window.

	Consider these steps in an 80 column, 24 line terminal:

	  (gdb) tui enable
	  (gdb) layout src
	  (gdb) layout split
	  (gdb) info win
	  Name       Lines Columns Focus
	  src            8      80 (has focus)
	  asm            8      80
	  status         1      80
	  cmd            8      80
	  (gdb) winheight cmd +2
	  (gdb) info win
	  Name       Lines Columns Focus
	  src            6      80 (has focus)
	  asm            8      80
	  status         1      80
	  cmd           10      80

	Notice that initially, the windows were balanced, 8 lines each for the
	major windows.  Then, when the cmd window was adjusted, the extra two
	lines were given to the asm window.

	I think it would be nicer if the delta was spread more evenly over the
	available windows.  In the example above, after the adjustment the
	layout now looks like:

	  (gdb) info win
	  Name       Lines Columns Focus
	  src            7      80 (has focus)
	  asm            7      80
	  status         1      80
	  cmd           10      80

	This is achieved within tui_layout_split::set_size, by just handing
	out the delta in increments of 1 to each window (except for the window
	the user adjusted), until there's no more delta left.  Of course, we
	continue to respect the min/max window sizes.

2022-04-03  Andrew Burgess  <aburgess@redhat.com>

	gdb/tui: relax restrictions on window max height and width
	This commit removes some arbitrary adjustments made in
	tui_cmd_window::max_height, tui_win_info::max_height, and
	tui_win_info::max_width.

	These member functions all subtract some constant from the theoretical
	maximum height or width.  I've looked back through the history a
	little and can see no real reason why these adjustments should be
	needed, with these adjustments removed all the existing tui tests
	still pass.

	However, retaining these restrictions causes some bugs, consider:

	  (gdb) tui new-layout hsrc {-horizontal src 1 cmd 1} 1

	When this layout is selected with current master, gdb will leave a 4
	line gap at the bottom of the terminal.

	The problem is that the maximum height is restricted, for the cmd
	window, to 4 less than the terminal height.

	By removing this restriction gdb is able to size the windows to the
	complete terminal height, and the layout is done correctly.

	This 4 line restriction is also what prevents this layout from working
	correctly:

	  (gdb) tui new-layout conly cmd 1

	Previously, this layout would present a cmd window only, but there
	would be a 4 line gap at the bottom of the terminal.  This issue was
	mentioned in an earlier commit in this series (when a different bug
	was fixed), but with this commit, the above layout now correctly fills
	the terminal.  The associated test is updated.

	After removing the adjustment in tui_cmd_window::max_height, the
	implementation is now the same as the implementation in the parent
	class tui_win_info, so I've completely removed the max_height call
	from tui_cmd_window.

2022-04-03  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: some additional tests in gdb.tui/scroll.exp
	This commit just adds an extra check of the src window size prior to
	sending all the commands to gdb.  We also set the cmd window height to
	its existing height, this (obviously) shouldn't change the window
	layout, which we check.

	My main motivation was adding the initial window layout check, the
	winheight and recheck are just extras.  All of these test pass both
	before and after this commit.

2022-04-03  Andrew Burgess  <aburgess@redhat.com>

	gdb/tui: support placing the cmd window into a horizontal layout
	This commit allows the user to place the cmd window within horizontal
	tui layouts.  Consider this set of steps, carried out in an 80 columns
	by 24 lines terminal, using current master gdb:

	  (gdb) tui new-layout hsrc { -horizontal src 1 cmd 1 } 1 status 1
	  (gdb) tui layout hsrc

	What you end up with is a full width cmd window with the status bar
	beneath.  Where's the src window gone?  We then try:

	  (gdb) info win
	  Name       Lines Columns Focus
	  src           23       3 (has focus)
	  cmd           23      80
	  status         1      80
	  (gdb)

	Something weird has gone on, gdb has overlapped the cmd window with
	the src window.  If we trigger the src window to redraw is content,
	for example, 'list main', then we see corruption in the cmd window as
	the src window overwrites it.

	So, what's going on?

	The problem is some code in tui_layout_split::apply, in tui-layout.c.
	Within 'Step 1', there is a loop that calculates the min/max window
	sizes for all windows within a tui_layout_split.  However, there's a
	special case for the cmd window.

	This special case is trying to have the cmd window retain its current
	size when a layout is re-applied, or a new layout is applied.  This
	makes sense, consider moving from the 'src' layout to the 'asm'
	layout, this looks something like this (status window removed):

	    .-------.         .-------.
	    |  src  |         |  asm  |
	    |-------|  ====>  |-------|
	    |  cmd  |         |  cmd  |
	    '-------'         '-------'

	If the user has gone to the effort of adjusting the cmd window size,
	then, the thinking goes, we shouldn't reset the cmd window size when
	switching layouts like this.

	The problem though, is that when we do a switch more like this:

	    .-----------.         .-----------.
	    |    src    |         |     |     |
	    |-----------|  ====>  | asm | cmd |
	    |    cmd    |         |     |     |
	    '-----------'         '-----------'

	Now retaining the cmd window width makes no sense; the new layout has
	a completely different placement for the cmd window, instead of sizing
	by height, we're now sizing by width.  The existing code doesn't
	understand this though, and tried to retain the full width for the cmd
	window.

	To solve this problem, I propose we introduce the idea of a layout
	"fingerprint".  The fingerprint tries to capture, in an abstract way,
	where the cmd window lives within the layout.

	Only when two layouts have the same fingerprint will we attempt to
	retain the cmd window size.

	The fingerprint for a layout is represented as a string, the string is
	a series of 'V' or 'H' characters, ending with a single 'C'
	character.  The series of 'V' and 'H' characters represent the
	vertical or horizontal layouts that must be passed through to find the
	cmd window.

	Here are a few examples:

	  # This layout is equivalent to the builtin 'src' layout.
	  # Fingerprint: VC
	  tui new-layout example1 src 2 status 0 cmd 1

	  # This layout is equivalent to the builtin 'split' layout.
	  # Fingerprint: VC
	  tui new-layout example2 src 1 asm 1 status 0 cmd 1

	  # This is the same layout that was given at the top.
	  # Fingerprint: VHC
	  tui new-layout hsrc { -horizontal src 1 cmd 1 } 1 status 1

	And so, when switching between example1 and example2, gdb knows that
	the cmd window is, basically, in the same sort of position within the
	layout, and will retain the cmd window size.

	In contrast, when switching to the hsrc layout, gdb understands that
	the position of the cmd window is different, and does not try to
	retain the cmd window size.

2022-04-03  Andrew Burgess  <aburgess@redhat.com>

	gdb/tui: allow cmd window to change size in tui_layout_split::apply
	When we switch layouts we call the tui_layout_split::apply member
	function to reapply the layout, and recalculate all the window sizes.

	One special case is the cmd window, which we try to keep at its
	existing size.

	However, in some cases it is not appropriate to keep the cmd window at
	its existing size.  I will describe two such cases here, in one, we
	want the cmd window to reduce in size, and in the other, we want the
	cmd window to grow in size.

	Try these steps in a 80 columns, by 24 lines terminal:

	  (gdb) tui enable
	  (gdb) layout src
	  (gdb) winheight cmd 20
	  (gdb) layout split

	You should see that the status window is missing from the new layout,
	and that the cmd window has been placed over the border of the asm
	window.  The 'info win' output is:

	  (gdb) info win
	  Name       Lines Columns Focus
	  src            3      80 (has focus)
	  asm            3      80
	  status         1      80
	  cmd           20      80

	Notice that gdb has assigned 27 lines of screen space, even with the
	border overlap between the src and asm windows, this is still 2 lines
	too many.

	The problem here is that after switching layouts, gdb has forced the
	cmd window to retain its 20 line height.  Really, we want the cmd
	window to reduce in height so that the src and asm windows can occupy
	their minimum required space.

	This commit allows this (details on how are below).  After this
	commit, in the above situation, we now see the status window displayed
	correctly, and the 'info win' output is:

	  (gdb) info win
	  Name       Lines Columns Focus
	  src            3      80 (has focus)
	  asm            3      80
	  status         1      80
	  cmd           18      80

	The cmd window has been reduced in size by 2 lines so that everything
	can fit on the screen.

	The second example is one which was discussed in a recent commit,
	consider this case (still in the 80 column, 24 line terminal):

	  (gdb) tui enable
	  (gdb) tui new-layout conly cmd 1
	  (gdb) layout conly
	  (gdb) info win
	  Name       Lines Columns Focus
	  cmd            8      80 (has focus)
	  (gdb)

	This layout only contains a cmd window, which we would expect to
	occupy the entire terminal.  But instead, the cmd window only occupies
	the first 8 lines, and the rest of the terminal is unused!

	The reason is, again, that the cmd window is keeping its previous
	size (8 lines).

	After this commit things are slightly different, the 'info win' output
	is now:

	  (gdb) info win
	  Name       Lines Columns Focus
	  cmd           20      80 (has focus)

	Which is a little better, but why only 20 lines?  Turns out there's
	yet another bug hitting this case.  That bug will be addressed in a
	later commit, so, for now, we're accepting the 20 lines.

	What this commit does is modify the phase of tui_layout_split::apply
	that handles any left over space.  Usually, in "Step 2", each
	sub-layout has a size calculated.  As the size is an integer, then,
	when all sizes are calculated we may have some space left over.

	This extra space is then distributed between all the windows fairly
	until all the space is used up.

	When we consider windows minimum size, or fixed size windows, then it
	is possible that we might try to use more space than is available,
	this was our first example above.  The same code that added extra
	space to the windows, can also be used to reclaim space (in the over
	allocation case) to allow all windows to fit.

	The problem then is the cmd window, which we often force to a fixed
	size.  Inside the loop that handles the allocation of excess space, if
	we find that we have tried every window, and still have space either
	left to give, or we need to claim back more space, then, if the cmd
	window was changed to a fixed size, we can change the cmd window back
	to a non-fixed-size window, and proceed to either give, or take space
	from the cmd window as needed.

2022-04-03  Andrew Burgess  <aburgess@redhat.com>

	gdb/tui: fairer distribution of excess space during apply
	When applying layouts gdb computes the size of each window (or rather,
	each sub-layout within a layout) using integer arithmetic.  As this
	rounds down the results, then, when all sub-layouts are sized, there
	is the possibility that we have some space left over.

	Currently, this space is just assigned to an arbitrary sub-layout.

	This can result in some unbalanced results.  Consider this set of
	steps with current master:

	  (gdb) tui enable
	  (gdb) layout regs
	  (gdb) info win
	  Name       Lines Columns Focus
	  regs           7      80
	  src            9      80 (has focus)
	  status         1      80
	  cmd            8      80

	Notice the weird split between the src and regs windows, the original
	layout specification has these windows given equal weight.  The
	problem is that, with rounding, both the regs and src windows are
	initially sized to 7, the extra 2 lines are then arbitrarily added to
	the src window.

	In this commit, rather than add all the extra space to one single
	window, I instead hand out the extra space 1 line at a time, looping
	over all the sub-layouts.  We take care to respect the min/max sizes,
	and so, we now get this result:

	  (gdb) tui enable
	  (gdb) layout regs
	  (gdb) info win
	  Name       Lines Columns Focus
	  regs           8      80
	  src            8      80 (has focus)
	  status         1      80
	  cmd            8      80

	This looks more natural to me.

	This is obviously a change in behaviour, and so, lots of the existing
	tests need to be updated to take this into account.  None of the
	changes are huge, it's just a line or two (or column for width) moved
	between windows.

2022-04-03  Andrew Burgess  <aburgess@redhat.com>

	gdb/tui: avoid fp exception when applying layouts
	Consider:

	  (gdb) tui enable
	  (gdb) layout src
	  (gdb) tui new-layout conly cmd 1
	  (gdb) layout conly

	After this, with current master, gdb crashes with a floating-point
	exception.

	The problem is that in tui_layout_split::apply, when we switch from
	'src' to 'conly', we will try to retain the cmd window height.  As
	such, the cmd window will become a fixed size window, which decreases
	the available_size, but doesn't count towards the total_weight.

	As the cmd window is the only window, the total_weight stays at zero,
	and, when we move into step 2, where we attempt to size the windows,
	we perform a divide by zero, and crash.

	After this commit we avoid the divide by zero, and just directly set
	the window size based on the fixed size.

	There is still a problem after this commit, when the conly layout is
	selected the cmd window retains its original height, which will only
	be part of the terminal.  The rest of the terminal is left unused.
	This issue will be addressed in a later commit, this commit is just
	about the floating-point exception.

2022-04-03  Andrew Burgess  <aburgess@redhat.com>

	gdb/tui/testsuite: refactor new-layout.exp test
	This commit changes the gdb.tui/new-layout.exp test to make use of a
	list of test descriptions, and a loop to check each description in
	turn.  There's no change to what is actually tested after this commit.

	In future commits I plan to add additional tests to this file, and
	this will be easier now that all I have to do is add a new test
	description to the list.

2022-04-03  Andrew Burgess  <aburgess@redhat.com>

	gdb/tui: add left_boxed_p and right_boxed_p member functions
	When I initially saw this code in tui_layout_split::apply, I assumed
	that this must be a bug:

	    /* Two adjacent boxed windows will share a border, making a bit
	       more size available.  */
	    if (i > 0
	        && m_splits[i - 1].layout->bottom_boxed_p ()
	        && m_splits[i].layout->top_boxed_p ())
	      ...

	After all, the apply might be laying out a horizontal layout, right?
	So checking bottom_boxed_p and top_boxed_p is clearly wrong.

	Well, it turns on, that due to the implementations of these things,
	bottom_boxed_p is equivalent to an imagined right_boxed_p, and
	top_boxed_p is equivalent to an imagined left_boxed_p.

	In this commit I've renamed both top_boxed_p and bottom_boxed_p to
	first_edge_has_border_p and last_edge_has_border_p respectively, and
	extended the comments in tui_layout_base to mention that these methods
	handle both horizontal and vertical layouts.

	Now, hopefully, the code shouldn't look like it only applies for
	vertical layouts.

	There should be no user visible changes after this commit.

2022-04-03  Andrew Burgess  <aburgess@redhat.com>

	gdb/tui: add a tui debugging flag
	This commit adds 'set debug tui on|off' and 'show debug tui'.  This
	commit adds the control variable, and the printing macros in
	tui/tui.h.  I've then added some uses of these in tui.c and
	tui-layout.c.

	To help produce more useful debug output in tui-layout.c, I've added
	some helper member functions in the class tui_layout_split, and also
	moved the size_info struct out of tui_layout_split::apply into the
	tui_layout_split class.

	If tui debug is not turned on, then there should be no user visible
	changes after this commit.

	One thing to note is that, due to the way that the tui terminal is
	often cleared, the only way I've found this useful is when I do:

	  (gdb) tui enable
	  (gdb) set logging file /path/to/file
	  (gdb) set logging debugredirect on
	  (gdb) set logging enable on

	Additionally, gdb has some quirks when it comes to setting up logging
	redirect and switching interpreters.  Thus, the above only really
	works if the logging is enabled after the tui is enabled, and disabled
	again before the tui is disabled.

	Enabling logging and switching interpreters can cause undefined
	results, including crashes.  This is an existing bug in gdb[1], and
	has nothing directly to do with tui debug, but it is worth mentioning
	here I think.

	[1] https://sourceware.org/bugzilla/show_bug.cgi?id=28948

2022-04-03  Andrew Burgess  <aburgess@redhat.com>

	gdb/tui: add new 'tui window width' command and 'winwidth' alias
	This commit adds a new command 'tui window width', and an alias
	'winwidth'.  This command is equivalent to the old 'winheight'
	command (which was recently renamed 'tui window height').

	Even though I recently moved the old tui commands under the tui
	namespace, and I would strongly encourage all new tui commands to be
	added as 'tui ....' only (users can create their own top-level aliases
	if they want), I'm breaking that suggestion here, and adding a
	'winwidth' alias.

	Given that we already have 'winheight' and have done for years, it
	just didn't seem right to no have the matching 'winwidth'.

	You might notice in the test that the window resizing doesn't quite
	work right.  I setup a horizontal layout, then grow and shrink the
	windows.  At the end of the test the windows should be back to their
	original size...

	... they are not.  This isn't my fault, honest!  GDB's window resizing
	is a little ... temperamental, and is prone to getting things slightly
	wrong during resizes, off by 1 type things.  This is true for height
	resizing, as well as the new width resizing.

	Later patches in this series will rework the resizing algorithm, which
	should improve things in this area.  For now, I'm happy that the width
	resizing is as good as the height resizing, given the existing quirks.

	For the docs side I include a paragraph that explains how multiple
	windows are required before the width can be adjusted.  For
	completeness, I've added the same paragraph to the winheight
	description.  With the predefined layouts this extra paragraph is not
	really needed for winheight, as there are always multiple windows on
	the screen.  However, with custom layouts, this might not be true, so
	adding the paragraph seems like a good idea.

	As for the changes in gdb itself, I've mostly just taken the existing
	height adjustment code, changed the name to make it generic 'size'
	adjustment, and added a boolean flag to indicate if we are adjusting
	the width or the height.

2022-04-03  Andrew Burgess  <aburgess@redhat.com>

	gdb/tui: rename tui_layout_split:set_weights_from_heights
	In a following commit I'm going to add the ability to change the width
	of a tui window (when in a horizontal layout).  As a result, some of
	the places where we currently hard-code references to height need to
	be changed to handle either height, or width, based on whether we are
	in a vertical, or horizontal layout.

	This commit renames set_weights_from_heights to
	set_weights_from_sizes, and makes the function use either the height,
	or width as appropriate.

	Currently, the only place that we call this function is from the
	tui_layout_split::set_height function, in a part of the code we will
	only reach for vertical layouts, so the new code is not actually being
	used, but, this small change will help make later patches smaller, so
	I'm proposing this as a stand alone change.

	There should be no user visible changes after this commit.

2022-04-03  Andrew Burgess  <aburgess@redhat.com>

	gdb/tui: rename tui_layout_base::adjust_size to ::set_height
	Rename tui_layout_base::adjust_size to tui_layout_base::set_height,
	the new name more accurately reflects what this member function does,
	and makes it easier for a later commit to add a new
	tui_layout_base::set_width member function.

	There should be no user visible changes after this commit.

2022-04-03  Andrew Burgess  <aburgess@redhat.com>

	gdb: move some commands into the tui namespace
	There are a lot of tui related commands that live in the top-level
	command name space, e.g. layout, focus, refresh, winheight.

	Having them at the top level means less typing for the user, which is
	good, but, I think, makes command discovery harder.

	In this commit, I propose moving all of the above mentioned commands
	into the tui namespace, so 'layout' becomes 'tui layout', etc.  But I
	will then add aliases so that the old commands will still work,
	e.g. I'll make 'layout' an alias for 'tui layout'.

	The benefit I see in this work is that tui related commands can be
	more easily discovered by typing 'tui ' and then tab-completing.  Also
	the "official" command is now a tui-sub-command, this is visible in,
	for example, the help output, e.g.:

	  (gdb) help layout
	  tui layout, layout
	  Change the layout of windows.
	  Usage: tui layout prev | next | LAYOUT-NAME

	  List of tui layout subcommands:

	  tui layout asm -- Apply the "asm" layout.
	  tui layout next -- Apply the next TUI layout.
	  tui layout prev -- Apply the previous TUI layout.
	  tui layout regs -- Apply the TUI register layout.
	  tui layout split -- Apply the "split" layout.
	  tui layout src -- Apply the "src" layout.

	Which I think is a good thing, it makes it clearer that this is a tui
	command.

	I've added a NEWS entry and updated the docs to mention the new and
	old command names, with the new name being mentioned first.

2022-04-03  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: fix gdb_print -> gdb_printf typo
	This caused a build failure with !CXX_STD_THREAD.

	Change-Id: I30f0c89c43a76f85c0db34809192644fa64a9d18

2022-04-03  Alan Modra  <amodra@gmail.com>

	Move microblaze relax info to target specific data
	Target specific data shouldn't be put in struct bfd_section.

		* section.c (struct bfd_section): Delete relax and relax_count.
		(BFD_FAKE_SECTION): Adjust to suit.
		(struct relax_table): Move to..
		* elf32-microblaze.c (struct relax_table): ..here.
		(struct _microblaze_elf_section_data): New.
		(microblaze_elf_section_data): Define.
		(microblaze_elf_new_section_hook): New function.
		(bfd_elf32_new_section_hook): Define.
		(calc_fixup): Return a size_t.  Adjust to suit new location of
		relax and relax_count.
		(microblaze_elf_relax_section): Adjust to suit new location of
		relax and relax_count.  Make some variables size_t.
		* bfd-in2.h: Regenerate.

2022-04-03  Alan Modra  <amodra@gmail.com>

	Revert commit 240d6706c6a2
		PR 28592
		PR 15994
		PR 15935
		* dwarf2.c (lookup_address_in_line_info_table): Return bool rather
		than a range.
		(comp_unit_find_nearest_line): Likewise.  Return true if function
		info found without line info.
		(_bfd_dwarf2_find_nearest_line): Revert range handling code.

	Regen bfd po/SRC-POTFILES.in

2022-04-03  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-02  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: rename floatformats_ia64_quad to floatformats_ieee_quad
	It is better to rename floatformats_ia64_quad to floatformats_ieee_quad
	to reflect the reality, and then we can clean up the related code.

	As Tom Tromey said [1]:

	  These files are maintained in gcc and then imported into the
	  binutils-gdb repository, so any changes to them will have to
	  be proposed there first.

	the related changes have been merged into gcc master now [2], it is time
	to do it for gdb.

	[1] https://sourceware.org/pipermail/gdb-patches/2022-March/186569.html
	[2] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=b2dff6b2d9d6

2022-04-02  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-04-01  John Baldwin  <jhb@FreeBSD.org>

	Remove unused variable.

2022-04-01  Aaron Merey  <amerey@redhat.com>

	gdb/debuginfod-support.c: Always display debuginfod errors
	Errors encountered when downloading files from debuginfod servers
	are not displayed if debuginfod verbosity is set to 0 (via
	'set debuginfod verbose 0').

	Tom recommended that these errors always be displayed, regardless
	of the verbosity setting [1]. Fix this.

	[1] https://sourceware.org/pipermail/gdb-patches/2022-March/186350.html

2022-04-01  John Baldwin  <jhb@FreeBSD.org>

	Use I386_GSBASE_REGNUM in i386fbsd_get_thread_local_address.
	32-bit x86 arches always the I386_*BASE_REGNUM values.  Only code that
	needs to support both 64-bit and 32-bit arches needs to use
	tdep->fsbase_regnum to compute a segment base register number.

	FreeBSD/x86: Read segment base registers from NT_X86_SEGBASES.
	FreeBSD kernels recently grew a new register core dump note containing
	the base addresses of the %fs and %gs segments (corresponding to the
	%fsbase and %gsbase registers).  Parse this note to permit inspecting
	TLS variables in core dumps.  Native processes already supported TLS
	via older ptrace() operations.

2022-04-01  John Baldwin  <jhb@FreeBSD.org>

	Use pseudosections for NT_FREEBSD_X86_SEGBASES core dump notes.
	This includes adding pseudosections when reading a core dump as well
	as support for writing out a core dump note from a pseudosection.

	bfd/ChangeLog:

		* elf-bfd.h (elfcore_write_x86_segbases): New.
		* elf.c (elfcore_grok_freebsd_note): Add pseudosections for
		NT_FREEBSD_X86_SEGBASES register notes.
		(elfcore_write_x86_segbases): New.
		(elfcore_write_register_note): Write NT_FREEBSD_X86_SEGBASES
		register notes.

2022-04-01  John Baldwin  <jhb@FreeBSD.org>

	Recognize FreeBSD core dump note for x86 segment base registers.
	This core dump note contains the value of the base address of the %fs
	and %gs segments for both i386 and amd64 core dumps.  It is primarily
	useful in resolving the address of TLS variables in core dumps.

	binutils/ChangeLog:

		* readelf.c (get_freebsd_elfcore_note_type): Handle
		NT_FREEBSD_X86_SEGBASES.

	include/ChangeLog:

		* elf/common.h (NT_FREEBSD_X86_SEGBASES): Define.

2022-04-01  John Baldwin  <jhb@FreeBSD.org>

	elfcore_grok_freebsd_note: Remove checks of note->namesz.
	This function is only called if the note name is "FreeBSD", so
	checking the name size is unnecessary.

	bfd/ChangeLog:

		* elf.c (elfcore_grok_freebsd_note): Remove checks for namesz.

2022-04-01  Andrew Burgess  <aburgess@redhat.com>

	gdb/testing/tui: add new _csi_{L,S,T}
	This patch was original part of this series:

	  https://sourceware.org/pipermail/gdb-patches/2022-March/186429.html
	  https://sourceware.org/pipermail/gdb-patches/2022-March/186433.html

	I've pulled this out as it might be useful ahead of the bigger series
	being merged.

	This commit adds:

	  _csi_L - insert line
	  _csi_S - pan down
	  _csi_T - pan up

2022-04-01  H.J. Lu  <hjl.tools@gmail.com>

	x86: Remove bfd_arch_l1om and bfd_arch_k1om
	Remove bfd_arch_l1om and bfd_arch_k1om since L1OM/K1OM support has been
	removed from gas, ld and opcodes.

	bfd/

		* Makefile.am (ALL_MACHINES): Remove cpu-l1om.lo and cpu-k1om.lo.
		(ALL_MACHINES_CFILES): Remove cpu-l1om.c and cpu-k1om.c.
		* archures.c (bfd_mach_l1om): Removed.
		(bfd_mach_l1om_intel_syntax): Likewise.
		(bfd_mach_k1om): Likewise.
		(bfd_mach_k1om_intel_syntax): Likewise.
		(bfd_k1om_arch): Likewise.
		(bfd_l1om_arch): Likewise.
		(bfd_archures_list): Remove bfd_k1om_arch and bfd_l1om_arch
		references.
		* config.bfd (targ_selvecs): Remove l1om_elf64_vec.
		l1om_elf64_fbsd_vec, k1om_elf64_vec and k1om_elf64_fbsd_vec.
		(targ_archs): Remove bfd_l1om_arch and bfd_k1om_arch.
		* configure.ac (k1om_elf64_vec): Removed.
		(k1om_elf64_fbsd_vec): Likewise.
		(l1om_elf64_vec): Likewise.
		(l1om_elf64_fbsd_vec): Likewise.
		* cpu-k1om.c: Removed.
		* cpu-l1om.c: Likewise.
		* elf64-x86-64.c (elf64_l1om_elf_object_p): Removed.
		(elf64_k1om_elf_object_p): Likewise.
		(l1om_elf64_vec): Removed.
		(l1om_elf64_fbsd_vec): Likewise.
		(k1om_elf64_vec): Likewise.
		(k1om_elf64_fbsd_vec): Likewise.
		(ELF_TARGET_OS): Undefine.
		* targets.c (_bfd_target_vector): Remove k1om_elf64_vec,
		k1om_elf64_fbsd_vec, l1om_elf64_vec and l1om_elf64_fbsd_vec.
		* Makefile.in: Regenerate.
		* bfd-in2.h: Likewise.
		* configure: Likewise.

	opcodes/

		* configure.ac: Remove bfd_arch_l1om/bfd_arch_k1om references.
		* disassemble.c (disassembler): Likewise.
		* configure: Regenerate.

2022-04-01  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/ctf: pass partial symtab's filename to buildsym_compunit
	I noticed that the CTF symbol reader passes the objfile's name to all
	buildsym_compunit instances it creates.  The result is that all
	compunit_symtabs created have the same name, that of the objfile:

	    { objfile /tmp/babeltrace-ctf/src/lib/.libs/libbabeltrace2.so.0.0.0 ((struct objfile *) 0x613000005d00)
	      { ((struct compunit_symtab *) 0x621000286760)
	        debugformat ctf
	        producer (null)
	        name libbabeltrace2.so.0.0.0
	        dirname (null)
	        blockvector ((struct blockvector *) 0x6210003911d0)
	        user ((struct compunit_symtab *) (null))
	            { symtab /tmp/babeltrace-ctf/src/lib/.libs/libbabeltrace2.so.0.0.0 ((struct symtab *) 0x6210003911f0)
	              fullname (null)
	              linetable ((struct linetable *) 0x0)
	            }
	      }
	      { ((struct compunit_symtab *) 0x621000275c10)
	        debugformat ctf
	        producer (null)
	        name libbabeltrace2.so.0.0.0
	        dirname (null)
	        blockvector ((struct blockvector *) 0x621000286710)
	        user ((struct compunit_symtab *) (null))
	            { symtab /tmp/babeltrace-ctf/src/lib/.libs/libbabeltrace2.so.0.0.0 ((struct symtab *) 0x621000286730)
	              fullname (null)
	              linetable ((struct linetable *) 0x0)
	            }
	      }

	Notice the two "name libbabeltrace2.so.0.0.0".

	Change it to pass the partial_symtab's filename instead.  The output
	becomes:

	    { objfile /tmp/babeltrace-ctf/src/lib/.libs/libbabeltrace2.so.0.0.0 ((struct objfile *) 0x613000005d00)
	      { ((struct compunit_symtab *) 0x621000295610)
	        debugformat ctf
	        producer (null)
	        name libbabeltrace2.so.0.0.0
	        dirname (null)
	        blockvector ((struct blockvector *) 0x6210003a15d0)
	        user ((struct compunit_symtab *) (null))
	            { symtab /tmp/babeltrace-ctf/src/lib/.libs/libbabeltrace2.so.0.0.0 ((struct symtab *) 0x6210003a15f0)
	              fullname (null)
	              linetable ((struct linetable *) 0x0)
	            }
	      }
	      { ((struct compunit_symtab *) 0x621000288700)
	        debugformat ctf
	        producer (null)
	        name current-thread.c
	        dirname (null)
	        blockvector ((struct blockvector *) 0x6210002955c0)
	        user ((struct compunit_symtab *) (null))
	            { symtab /home/simark/src/babeltrace/src/lib/current-thread.c ((struct symtab *) 0x6210002955e0)
	              fullname (null)
	              linetable ((struct linetable *) 0x0)
	            }
	      }

	Note that the first compunit_symtab still has libbabeltrace2.so.0.0.0 as
	its name.  This is because the CTF symbol reader really creates a
	partial symtab named like this.  It appears to be because the debug info
	contains information that has been factored out of all CUs and is at the
	"top-level" of the objfile, outside any real CU.  So it creates a
	partial symtab and an artificial CU that's named after the objfile.

	Change-Id: I576316bab2a3668adf87b4e6cebda900a8159b1b

2022-04-01  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: print compunit_symtab name in "maint info symtabs"
	I think it would make sense to print a compunit_symtab's name in "maint
	info symtabs".  If you are looking for a given CU in the list, that's
	probably the field you will be looking at.  As the doc of
	compunit_symtab::name says, it is not meant to be a reliable file name,
	it is for debugging purposes (and "maint info symtabs" exists for
	debugging purposes).

	Sample output with the new field:

	    (gdb) maintenance info symtabs
	    { objfile /home/simark/build/binutils-gdb-one-target/gdb/a.out ((struct objfile *) 0x613000005d00)
	      { ((struct compunit_symtab *) 0x621000131630)
	        debugformat DWARF 5
	        producer GNU C17 11.2.0 -mtune=generic -march=x86-64 -g3 -O0
	        name test.c
	        dirname /home/simark/build/binutils-gdb-one-target/gdb
	        blockvector ((struct blockvector *) 0x621000131d10)
	        user ((struct compunit_symtab *) (null))
	            { symtab test.c ((struct symtab *) 0x6210001316b0)
	              fullname (null)
	              linetable ((struct linetable *) 0x621000131d40)
	            }
	            { symtab /home/simark/build/binutils-gdb-one-target/gdb/test.h ((struct symtab *) 0x6210001316e0)
	              fullname (null)
	              linetable ((struct linetable *) 0x0)
	            }
	            { symtab /usr/include/stdc-predef.h ((struct symtab *) 0x621000131710)
	              fullname (null)
	              linetable ((struct linetable *) 0x0)
	            }
	      }
	      { ((struct compunit_symtab *) 0x6210001170a0)
	        debugformat DWARF 5
	        producer GNU C17 11.2.0 -mtune=generic -march=x86-64 -g3 -O0
	        name foo.c
	        dirname /home/simark/build/binutils-gdb-one-target/gdb
	        blockvector ((struct blockvector *) 0x621000131580)
	        user ((struct compunit_symtab *) (null))
	            { symtab foo.c ((struct symtab *) 0x621000117120)
	              fullname (null)
	              linetable ((struct linetable *) 0x6210001315b0)
	            }
	            { symtab /usr/include/stdc-predef.h ((struct symtab *) 0x621000117150)
	              fullname (null)
	              linetable ((struct linetable *) 0x0)
	            }
	      }
	    }

	Change-Id: I17b87adfac2f6551cb5bda30d59f6c6882789211

2022-04-01  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/ctf: don't create a buildsym_compunit when building partial symbols
	I am trying to do some changes to buildsym_compunit, so I am auditing
	the current uses.  Something seems odd with this use of
	buildsym_compunit (that this patch removes).

	A buildsym_compunit is normally used when building a compunit_symtab.
	That is, when expanding a partial symtab into a full compunit symtab.
	In ctfread.c, a buildsym_compunit is created in ctf_start_archive, which
	is only used when creating partial symtabs.  At this moment, I don't
	see how that's useful.  ctf_start_archive creates a new
	buildsym_compunit and starts a subfile.  But that buildsym_compunit is
	never used again.  It's just overriden in ctf_start_symtab, which means
	we leak the old buildsym_compunit, I suppose.

	Remove ctf_start_archive completely.  Add an assert in
	ctf_start_symtab to verify that we are not overwriting an existing
	buildsym_compunit (meaning we'd leak the existing one).  This assert
	triggers without the other part of the fix.  When doing:

	  $ ./gdb --data-directory=data-directory /tmp/babeltrace-ctf/src/lib/.libs/libbabeltrace2.so.0.0.0
	  ...
	  (gdb) maintenance expand-symtabs
	  /home/simark/src/binutils-gdb/gdb/ctfread.c:1255: internal-error: ctf_start_symtab: Assertion `!ccp->builder' failed.

	Change-Id: I666d146454a019f08e7305f3a1c4a974d27b4592

2022-04-01  Tom Tromey  <tom@tromey.com>

	Style URLs in GDB output
	I noticed that GDB will display URLs in a few spots.  This changes
	them to be styled.  Originally I thought I'd introduce a new "url"
	style, but there aren't many places to use this, so I just reused
	filename styling instead.  This patch also changes the debuginfod URL
	list to be printed one URL per line.  I think this is probably a bit
	easier to read.

2022-04-01  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-31  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: initialize ctf_context::builder in create_partial_symtab
	I built a random project with -gctf, in order to test the CTF support in
	GDB.  With my ASan/UBSan/etc-enabled build of GDB, I get:

	    $ ./gdb --data-directory=data-directory /tmp/babeltrace-ctf/src/lib/.libs/libbabeltrace2.so.0.0.0
	    ...
	    Reading symbols from /tmp/babeltrace-ctf/src/lib/.libs/libbabeltrace2.so.0.0.0...
	    /home/simark/src/binutils-gdb/gdb/ctfread.c:1545:31: runtime error: member call on misaligned address 0xbebebebebebebebe for type 'struct buildsym_compunit', which requires 8 byte alignment
	    0xbebebebebebebebe: note: pointer points here

	The 0xbebebebebebebebe value is a sign that the ctf_context::builder
	field is uninitialized.  The problem probably goes under the radar if
	the field happens to be zero-initialized, because ctf_start_archive
	contains this code:

	  if (ccx->builder == nullptr)
	    {
	      ccx->builder = new buildsym_compunit (of,
			      of->original_name, nullptr, language_c, 0);

	If the field was zero-initialized (by chance), this will create a new
	buildsym_compunit.  But if the field was purposely filled with random
	bytes by one of the sanitizers, we won't create a buildsym_compunit here
	and we'll continue with ccx->builder equal to 0xbebebebebebebebe.

	Fix this the easy way by initializing ccx->builder where the other
	ctf_context fields are initialized (yeah, this code could be made nicer
	C++, but I am going for the obvious fix here).

	With this patch, this passes cleanly on my system:

	  $ make check TESTS="gdb.ctf/*.exp" RUNTESTFLAGS="CC_FOR_TARGET=/opt/gcc/git/bin/gcc"
	  # of expected passes            40

	... where /opt/gcc/git/bin/gcc is a gcc with CTF support, given my
	system gcc does not have it.

	Change-Id: Idea1b0cf3e3708b72ecb16b1b60222439160f9b9

2022-03-31  Tom Tromey  <tromey@adacore.com>

	Remove dbx mode
	This patch removes gdb's dbx mode.  Regression tested on x86-64 Fedora
	34.

2022-03-31  H.J. Lu  <hjl.tools@gmail.com>

	gdb: Consolidate 32bit-pkeys.xml and 64bit-pkeys.xml
	1. Since 32bit-pkeys.xml and 64bit-pkeys.xml are identical, consolidate
	them into a single keys.xml.
	2. Enable PKU for x32 to fix:

	$ gdbserver :123456 x32-program
	...
	.../gdbserver/regcache.cc:255: A problem internal to GDBserver has been detected
	.
	Unknown register pkru requested

	on Tiger Lake.

2022-03-31  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/linux-nat: remove check based on current_inferior in linux_handle_extended_wait
	The check removed by this patch, using current_inferior, looks wrong.
	When debugging multiple inferiors with the Linux native target and
	linux_handle_extended_wait is called, there's no guarantee about which
	is the current inferior.  The vfork-done event we receive could be for
	any inferior.  If the vfork-done event is for a non-current inferior, we
	end up wrongfully ignoring it.  As a result, the core never processes a
	TARGET_WAITKIND_VFORK_DONE event, program_space::breakpoints_not_allowed
	is never cleared, and breakpoints are never reinserted.  However,
	because the Linux native target decided to ignore the event, it resumed
	the thread - while breakpoints out.  And that's bad.

	The proposed fix is to remove this check.  Always report vfork-done
	events and let infrun's logic decide if it should be ignored.  We don't
	save much cycles by filtering the event here.

	Add a test that replicates the situation described above.  See comments
	in the test for more details.

	Change-Id: Ibe33c1716c3602e847be6c2093120696f2286fbf

2022-03-31  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbserver/linux: set lwp !stopped when failing to resume
	I see some failures, at least in gdb.multi/multi-re-run.exp and
	gdb.threads/interrupted-hand-call.exp.  Running `stress -C $(nproc)` at
	the same time as the test makes those tests relatively frequent.

	Let's take gdb.multi/multi-re-run.exp as an example.  The failure looks
	like this, an unexpected "no resumed":

	    continue
	    Continuing.
	    No unwaited-for children left.
	    (gdb) FAIL: gdb.multi/multi-re-run.exp: re_run_inf=2: iter=1: continue until exit

	The situation is:

	 - Inferior 1 is stopped somewhere, it won't really play a role here.
	 - Inferior 2 has 2 threads, both stopped.
	 - We resume inferior 2, the leader thread is expected to exit, making
	   the process exit.

	From GDB's perspective, a failing run looks like this:

	    [infrun] fetch_inferior_event: enter
	      [infrun] scoped_disable_commit_resumed: reason=handling event
	      [infrun] do_target_wait: Found 2 inferiors, starting at #1
	      [infrun] random_pending_event_thread: None found.
	      [remote] wait: enter
	        [remote] Packet received: T0506:20dcffffff7f0000;07:20dcffffff7f0000;10:9551555555550000;thread:pae4cd.ae4cd;core:e;
	      [remote] wait: exit
	      [infrun] print_target_wait_results: target_wait (-1.0.0 [process -1], status) =
	      [infrun] print_target_wait_results:   713933.713933.0 [Thread 713933.713933],
	      [infrun] print_target_wait_results:   status->kind = STOPPED, sig = GDB_SIGNAL_TRAP
	      [infrun] handle_inferior_event: status->kind = STOPPED, sig = GDB_SIGNAL_TRAP
	      [infrun] clear_step_over_info: clearing step over info
	      [infrun] context_switch: Switching context from 0.0.0 to 713933.713933.0
	      [infrun] handle_signal_stop: stop_pc=0x555555555195
	      [infrun] start_step_over: enter
	        [infrun] start_step_over: stealing global queue of threads to step, length = 0
	        [infrun] operator(): step-over queue now empty
	      [infrun] start_step_over: exit
	      [infrun] process_event_stop_test: no stepping, continue
	      [remote] Sending packet: $Z0,555555555194,1#8e
	      [remote] Packet received: OK
	      [infrun] resume_1: step=0, signal=GDB_SIGNAL_0, trap_expected=0, current thread [713933.713933.0] at 0x555555555195
	      [remote] Sending packet: $QPassSignals:e;10;14;17;1a;1b;1c;21;24;25;2c;4c;97;#0a
	      [remote] Packet received: OK
	      [remote] Sending packet: $vCont;c:pae4cd.-1#9f
	      [infrun] prepare_to_wait: prepare_to_wait
	      [infrun] reset: reason=handling event
	      [infrun] maybe_set_commit_resumed_all_targets: enabling commit-resumed for target extended-remote
	      [infrun] maybe_call_commit_resumed_all_targets: calling commit_resumed for target extended-remote
	      [infrun] maybe_call_commit_resumed_all_targets: calling commit_resumed for target extended-remote
	    [infrun] fetch_inferior_event: exit
	    [infrun] fetch_inferior_event: enter
	      [infrun] scoped_disable_commit_resumed: reason=handling event
	      [infrun] do_target_wait: Found 2 inferiors, starting at #0
	      [infrun] random_pending_event_thread: None found.
	      [remote] wait: enter
	        [remote] Packet received: N
	      [remote] wait: exit
	      [infrun] print_target_wait_results: target_wait (-1.0.0 [process -1], status) =
	      [infrun] print_target_wait_results:   -1.0.0 [process -1],
	      [infrun] print_target_wait_results:   status->kind = NO_RESUMED
	      [infrun] handle_inferior_event: status->kind = NO_RESUMED
	      [remote] Sending packet: $Hgp0.0#ad
	      [remote] Packet received: OK
	      [remote] Sending packet: $qXfer:threads:read::0,1000#92
	      [remote] Packet received: l<threads>\n<thread id="pae4cb.ae4cb" core="3" name="multi-re-run-1" handle="40c7c6f7ff7f0000"/>\n<thread id="pae4cb.ae4cc" core="2" name="multi-re-run-1" handle="40b6c6f7ff7f0000"/>\n<thread id="pae4cd.ae4ce" core="1" name="multi-re-run-2" handle="40b6c6f7ff7f0000"/>\n</threads>\n
	      [infrun] stop_waiting: stop_waiting
	      [remote] Sending packet: $qXfer:threads:read::0,1000#92
	      [remote] Packet received: l<threads>\n<thread id="pae4cb.ae4cb" core="3" name="multi-re-run-1" handle="40c7c6f7ff7f0000"/>\n<thread id="pae4cb.ae4cc" core="2" name="multi-re-run-1" handle="40b6c6f7ff7f0000"/>\n<thread id="pae4cd.ae4ce" core="1" name="multi-re-run-2" handle="40b6c6f7ff7f0000"/>\n</threads>\n
	      [infrun] infrun_async: enable=0
	      [infrun] reset: reason=handling event
	      [infrun] maybe_set_commit_resumed_all_targets: enabling commit-resumed for target extended-remote
	      [infrun] maybe_call_commit_resumed_all_targets: calling commit_resumed for target extended-remote
	      [infrun] maybe_call_commit_resumed_all_targets: calling commit_resumed for target extended-remote
	    [infrun] fetch_inferior_event: exit

	We can see that we resume the inferior with vCont;c, but got NO_RESUMED.
	When the test passes, we get an EXITED status to indicate the process
	has exited.

	From GDBserver's point of view, it looks like this.  The logs contain
	some logging I added and that are part of this patch.

	    [remote] getpkt: getpkt ("vCont;c:pae4cf.-1");  [no ack sent]
	    [threads] resume: enter
	      [threads] thread_needs_step_over: Need step over [LWP 713931]? Ignoring, should remain stopped
	      [threads] thread_needs_step_over: Need step over [LWP 713932]? Ignoring, should remain stopped
	      [threads] get_pc: pc is 0x555555555195
	      [threads] thread_needs_step_over: Need step over [LWP 713935]? No, no breakpoint found at 0x555555555195
	      [threads] get_pc: pc is 0x7ffff7d35a95
	      [threads] thread_needs_step_over: Need step over [LWP 713936]? No, no breakpoint found at 0x7ffff7d35a95
	      [threads] resume: Resuming, no pending status or step over needed
	      [threads] resume_one_thread: resuming LWP 713935
	      [threads] proceed_one_lwp: lwp 713935
	      [threads] resume_one_lwp_throw:   continue from pc 0x555555555195
	      [threads] resume_one_lwp_throw: Resuming lwp 713935 (continue, signal 0, stop not expected)
	      [threads] resume_one_lwp_throw: NOW ptid=713935.713935.0 stopped=0 resumed=0
	      [threads] resume_one_thread: resuming LWP 713936
	      [threads] proceed_one_lwp: lwp 713936
	      [threads] resume_one_lwp_throw:   continue from pc 0x7ffff7d35a95
	      [threads] resume_one_lwp_throw: Resuming lwp 713936 (continue, signal 0, stop not expected)
	      [threads] resume_one_lwp_throw: ptrace errno = 3 (No such process)
	    [threads] resume: exit
	    [threads] wait_1: enter
	      [threads] wait_1: [<all threads>]
	      [threads] wait_for_event_filtered: waitpid(-1, ...) returned 0, ERRNO-OK
	      [threads] resume_stopped_resumed_lwps: resuming stopped-resumed LWP LWP 713935.713936 at 7ffff7d35a95: step=0
	      [threads] resume_one_lwp_throw:   continue from pc 0x7ffff7d35a95
	      [threads] resume_one_lwp_throw: Resuming lwp 713936 (continue, signal 0, stop not expected)
	      [threads] resume_one_lwp_throw: ptrace errno = 3 (No such process)
	      [threads] operator(): check_zombie_leaders: leader_pid=713931, leader_lp!=NULL=1, num_lwps=2, zombie=0
	      [threads] operator(): check_zombie_leaders: leader_pid=713935, leader_lp!=NULL=1, num_lwps=2, zombie=1
	      [threads] operator(): Thread group leader 713935 zombie (it exited, or another thread execd).
	      [threads] delete_lwp: deleting 713935
	      [threads] wait_for_event_filtered: exit (no unwaited-for LWP)
	    sigchld_handler
	      [threads] wait_1: ret = null_ptid, TARGET_WAITKIND_NO_RESUMED
	    [threads] wait_1: exit

	What happens is:

	 - We resume the leader (713935) successfully.
	 - The leader exits.
	 - We resume the secondary thread (713936), we get ESRCH.  This is
	   expected this the leader has exited.
	 - resume_one_lwp_throw throws, it's caught by resume_one_lwp.
	 - resume_one_lwp checks with check_ptrace_stopped_lwp_gone that the
	   failure can be explained by the LWP becoming zombie, and swallows the
	   error.
	 - Note that this means that the secondary lwp still has stopped==1.
	 - wait_1 is called, probably because linux_process_target::resume marks
	   the async pipe at the end.
	 - The exit event isn't ready yet, probably because the machine is under
	   load, so waitpid returns nothing.
	 - check_zombie_leaders detects that the leader is zombie and deletes
	 - We try to find a resumed (non-stopped) LWP to get an event from,
	   there's none since the leader (that was resumed) is now deleted, and
	   the secondary thread is still marked stopped.
	   wait_for_event_filtered returns -1, causing wait_1 to return
	   NO_RESUMED.

	What I notice here is that there is some kind of race between the
	availability of the process' exit notification and the call to wait_1
	that results from marking the async pipe at the end of resume.

	I think what we want from this wait_1 invocation is to keep waiting, as
	we will eventually get thread exit notifications for both of our
	threads.

	The fix I came up with is to mark the secondary thread as !stopped (or
	resumed) when we fail to resume it.  This makes wait_1 see that there is
	at least one resume lwp, so it won't return NO_RESUMED.  I think this
	makes sense to consider it resumed, because we are going to receive an
	exit event for it.  Here's the GDBserver logs with the fix applied:

	    [threads] resume: enter
	      [threads] thread_needs_step_over: Need step over [LWP 724595]? Ignoring, should remain stopped
	      [threads] thread_needs_step_over: Need step over [LWP 724596]? Ignoring, should remain stopped
	      [threads] get_pc: pc is 0x555555555195
	      [threads] thread_needs_step_over: Need step over [LWP 724597]? No, no breakpoint found at 0x555555555195
	      [threads] get_pc: pc is 0x7ffff7d35a95
	      [threads] thread_needs_step_over: Need step over [LWP 724598]? No, no breakpoint found at 0x7ffff7d35a95
	      [threads] resume: Resuming, no pending status or step over needed
	      [threads] resume_one_thread: resuming LWP 724597
	      [threads] proceed_one_lwp: lwp 724597
	      [threads] resume_one_lwp_throw:   continue from pc 0x555555555195
	      [threads] resume_one_lwp_throw: Resuming lwp 724597 (continue, signal 0, stop not expected)
	      [threads] resume_one_lwp_throw: NOW ptid=724597.724597.0 stopped=0 resumed=0
	      [threads] resume_one_thread: resuming LWP 724598
	      [threads] proceed_one_lwp: lwp 724598
	      [threads] resume_one_lwp_throw:   continue from pc 0x7ffff7d35a95
	      [threads] resume_one_lwp_throw: Resuming lwp 724598 (continue, signal 0, stop not expected)
	      [threads] resume_one_lwp_throw: ptrace errno = 3 (No such process)
	    [threads] resume: exit
	    [threads] wait_1: enter
	      [threads] wait_1: [<all threads>]
	    sigchld_handler
	      [threads] wait_for_event_filtered: waitpid(-1, ...) returned 0, ERRNO-OK
	      [threads] operator(): check_zombie_leaders: leader_pid=724595, leader_lp!=NULL=1, num_lwps=2, zombie=0
	      [threads] operator(): check_zombie_leaders: leader_pid=724597, leader_lp!=NULL=1, num_lwps=2, zombie=1
	      [threads] operator(): Thread group leader 724597 zombie (it exited, or another thread execd).
	      [threads] delete_lwp: deleting 724597
	      [threads] wait_for_event_filtered: sigsuspend'ing
	    sigchld_handler
	      [threads] wait_for_event_filtered: waitpid(-1, ...) returned 724598, ERRNO-OK
	      [threads] wait_for_event_filtered: waitpid 724598 received 0 (exited)
	      [threads] filter_event: 724598 exited
	      [threads] wait_for_event_filtered: waitpid(-1, ...) returned 724597, ERRNO-OK
	      [threads] wait_for_event_filtered: waitpid 724597 received 0 (exited)
	      [threads] wait_for_event_filtered: waitpid(-1, ...) returned 0, ERRNO-OK
	    sigchld_handler
	      [threads] wait_1: ret = LWP 724597.724598, exited with retcode 0
	    [threads] wait_1: exit

	Change-Id: Idf0bdb4cb0313f1b49e4864071650cc83fb3c100

2022-03-31  Simon Marchi  <simon.marchi@efficios.com>

	gdb/testsuite/tui: implement _csi_P proc
	Since commit 3cd522938792 ("Change the pager to a ui_file"), I see these
	errors when running gdb.tui/scroll.exp:

	    ERROR: invalid command name "_csi_P"
	        while executing
	    "::gdb_tcl_unknown _csi_P 2"
	        ("uplevel" body line 1)
	        invoked from within
	    "uplevel 1 ::gdb_tcl_unknown $args"
	        (procedure "::unknown" line 5)
	        invoked from within
	    "_csi_P 2"
	        ("eval" body line 1)
	        invoked from within
	    "eval _csi_$cmd $params"

	It looks like GDB is emitting a CSI that it did not emit before, the
	"Delete character" one:

	  https://vt100.net/docs/vt510-rm/DCH.html

	Implement it.

	Co-Authored-By: Andrew Burgess <aburgess@redhat.com>
	Change-Id: I5bf86b6104d51b0623a26a69df83d1ca9a4851b7

2022-03-31  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: fix use of fprintf_filtered in top.c
	A race condition in how patches were pushed causes this build failure:

	      CXX    top.o
	    /home/simark/src/binutils-gdb/gdb/top.c: In function ‘void print_gdb_configuration(ui_file*)’:
	    /home/simark/src/binutils-gdb/gdb/top.c:1622:3: error: ‘fprintf_filtered’ was not declared in this scope; did you mean ‘printf_unfiltered’?
	     1622 |   fprintf_filtered (stream, _("\
	          |   ^~~~~~~~~~~~~~~~

	fprintf_filtered has been removed, gdb_printf must be used now.  Fix
	this.

	Change-Id: I6a172ba0d53dab2e7cc43ed0ed2696c82925245b

2022-03-31  Richard Sandiford  <richard.sandiford@arm.com>

	aarch64: Relax check for RNG system registers
	FEAT_RNG is an optional Armv8.5-A extension, but it can be backported
	to earlier architectures as well.  GAS previously made the RNG registers
	conditional on having both armv8.5-a and +rng, but only +rng should be
	required.

	This seems to be the only feature that was handled like this.

	opcodes/
		* aarch64-opc.c (SR_RNG): Don't require V8_5.

	gas/
		* testsuite/gas/aarch64/rng-1.s, testsuite/gas/aarch64/rng-1.d: New
		test.

2022-03-31  Eli Zaretskii  <eliz@gnu.org>

	* gdb/top.c (print_gdb_configuration): Announce --enable-threading.
	This includes the reporting of --enable/disable-threading as part of
	the GDB configuration description.

2022-03-31  Simon Marchi  <simon.marchi@efficios.com>

	gdb/infrun: add reason parameter to stop_all_threads
	Add a "reason" parameter, only used to show in debug messages what is
	the reason for stopping all threads.  This helped me understand the
	debug logs while adding some new uses of stop_all_threads, so I am
	proposing to merge it.

	Change-Id: I66c8c335ebf41836a7bc3d5fe1db92c195f65e55

2022-03-31  Simon Marchi  <simon.marchi@efficios.com>

	gdb/testsuite: update copyright years in gdb.base/vfork-follow-parent.*
	I forgot to do this before pushing the previous commit.

	Change-Id: Ia343f702e8357d0fd109e9ddd778973e91862805

2022-03-31  Simon Marchi  <simon.marchi@efficios.com>

	gdb: test vfork + follow-fork-mode=parent + detach-on-fork=off
	The particular behavior we have when using that combination of settings
	doesn't seem tested at all (at least, I don't find it if I grep for "Can
	not resume the parent process").  Add a simple test for that.

	Change-Id: Ib9454a615abba661b42f1b15056df73ed1bcd4c5

2022-03-31  Nick Clifton  <nickc@redhat.com>

	Accept the + character as part of filenames for MRI scripts.

2022-03-31  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	Fix procfs.c compilation
	procfs.c doesn't compile on Solaris:

	/vol/src/gnu/gdb/hg/master/local/gdb/procfs.c: In member function ‘virtual bool procfs_target::info_proc(const char*, info_proc_what)’:
	/vol/src/gnu/gdb/hg/master/local/gdb/procfs.c:3302:3: error: ‘gdb_argv’ was not declared in this scope
	 3302 |   gdb_argv built_argv (args);
	      |   ^~~~~~~~
	/vol/src/gnu/gdb/hg/master/local/gdb/procfs.c:3303:20: error: ‘built_argv’ was not declared in this scope; did you mean ‘buildargv’?
	 3303 |   for (char *arg : built_argv)
	      |                    ^~~~~~~~~~
	      |                    buildargv

	Fixed by including  "gdbsupport/buildargv.h".

	Tested on amd64-pc-solaris2.11, sparcv9-sun-solaris2.11.

2022-03-31  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-30  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: add tests for Term
	While trying to review Andrew's patch here [1], I thought I spotted a
	bug in the handling of a CSI, but I had no way to know for sure.  So I
	thought it would be useful to have unit tests for the handling of
	control characters and control sequences of our toy terminal
	implementation.  It might help avoid chasing bugs in the GDB TUI when in
	reality it's a problem with the testsuite's terminal implementation.

	Add the gdb.tui/tuiterm.exp file to do that.  All currently supported
	control sequences and characters are tested, except _csi_m (the one that
	handles colors and stuff).  _csi_m should probably be tested too, but it
	will require more work.

	Fix a few issues that the tests spotted:

	 - backspace: according to [3] (table 4-1), a backspace when the cursor
	   is at the beginning of a line should have no effect.  Our
	   implementation did wrap to the end of the previous line.  Change our
	   implementation to match the doc (and the test).
	 - insert character: this control sequence is supposed to insert blank
	   characters, shifting all the rest of the line right.  The current
	   implementation moves N characters right, but it overwrites the
	   characters on the right instead of shifting them.  It also doesn't
	   insert blank characters at the cursor.
	 - Cursor down, forward, next line: off-by-one error when reaching the
	   end of the display.
	 - erase in display, line: off-by-one errors.
	 - vertical line position absolute: allowed setting the cursor outside
	   the display, when it should clamp it to the display size.

	I found that this web page [2] gave some good clues on the expected
	behavior of some control characters or sequences that some other pages
	didn't.

	[1] https://sourceware.org/pipermail/gdb-patches/2022-March/186433.html
	[2] https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences
	[3] https://vt100.net/docs/vt510-rm/chapter4.html#S4.3.3

	Change-Id: Iab4141fdcfb7459d1b7c45cc63bd1fcb50a78d5d

2022-03-30  Tom Tromey  <tom@tromey.com>

	Only allow QUIT on the main thread
	Pedro pointed out that gdb worker threads should not react to quits.
	While I don't think that the new DWARF reader can call QUIT from a
	worker thread (and I don't think the existing minsym threading code
	can either), it seems safest to address this before checking in the
	new code.  This patch arranges for the QUIT macro to only work on the
	main thread.

2022-03-30  Tom Tromey  <tromey@adacore.com>

	Use gdb_printf and gdb_vprintf in more places
	Luis pointed out that I missed a spot in the gdb_printf conversion --
	namely aarch64-nat.c.  While looking at this, I found another spot in
	darwin-nat.c that I also missed.  I can't build either of these, but I
	think this patch should fix the problems.

	Consolidate definition of current_directory
	I noticed that both gdbserver and gdb define current_directory.
	However, as it is referenced by gdbsupport, it seemed better to define
	it there as well.  This patch also moves the declaration to
	pathstuff.h.  Tested by rebuilding.

2022-03-30  Tom Tromey  <tromey@adacore.com>

	Decode "dynamic" interface types in Ada
	In Ada, if a class implements an interface and has a dynamic
	superclass, then the "offset to top" -- the offset that says how to
	turn a pointer to the interface into a pointer to the whole object --
	is stored in the object itself.  This patch changes GDB to understand
	this.

	Because this only touches Ada code, and because Joel already reviewed
	it internally, I am checking it in.

2022-03-30  Jeff Law  <jeffreyalaw@gmail.com>

	Fix for MUL instruction on the v850
		* sim/v850/simops.c (Multiply64): Properly test if we need to
		negate either of the operands.

		* sim/testsuite/v850/mul.cgs: New test.

2022-03-30  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-29  Tom Tromey  <tom@tromey.com>

	Remove two unused hooks
	I noticed that a couple of deprecated hooks aren't ever called, so
	they can't really be used by Insight.  This patch removes them
	entirely.  I checked the Insight sources, and these aren't mentioned
	there, either.

2022-03-29  Tom Tromey  <tom@tromey.com>

	Remove unnecessary calls to wrap_here and gdb_flush
	Various spots in gdb currently know about the wrap buffer, and so are
	careful to call wrap_here to be certain that all output has been
	flushed.

	Now that the pager is just an ordinary stream, this isn't needed, and
	a simple call to gdb_flush is enough.

	Similarly, there are places where gdb prints to gdb_stderr, but first
	flushes gdb_stdout.  stderr_file already flushes gdb_stdout, so these
	aren't needed.

2022-03-29  Tom Tromey  <tom@tromey.com>

	Minor comment updates in utils.h
	This patch updates some comments in utils.h to more closely reflect
	the new reality.

	Remove vfprintf_styled
	Nothing calls vfprintf_styled any more, so remove it.

	Remove ui_out_flag::unfiltered_output
	There is no longer any need for ui_out_flag::unfiltered_output --
	nothing ever sets this flag.  This used to be needed to make the
	_unfiltered output work, but now only printf_unfiltered can be used,
	and it uses the puts_unfiltered method.  This patch removes the flag
	and the dead code.

	Rename fprintf_symbol_filtered
	fprintf_symbol_filtered is misnamed, because whether filtering happens
	is now up to the stream.  This renames it to fprintf_symbol, which
	isn't a great name (the first "f" doesn't mean much and the second one
	is truly meaningless here), but "print_symbol" was already taken.

	Rename puts_filtered_tabular
	puts_filtered_tabular is now misnamed, because whether filtering
	happens is now up to the stream.  So, rename it.  (This function is
	pretty weird, and should probably be rewritten to avoid using the
	chars_printed global, and moved into objc-lang.c.  However, I haven't
	done so.)

	Rename print_spaces_filtered
	print_spaces_filtered is now misnamed, because whether filtering
	happens is up to the stream.  So, rename it.

	Unify gdb printf functions
	Now that filtered and unfiltered output can be treated identically, we
	can unify the printf family of functions.  This is done under the name
	"gdb_printf".  Most of this patch was written by script.

	Unify gdb putc functions
	Now that filtered and unfiltered output can be treated identically, we
	can unify the putc family of functions.  This is done under the name
	"gdb_putc".  Most of this patch was written by script.

	Unify gdb puts functions
	Now that filtered and unfiltered output can be treated identically, we
	can unify the puts family of functions.  This is done under the name
	"gdb_puts".  Most of this patch was written by script.

	Unify vprintf functions
	Now that filtered and unfiltered output can be treated identically, we
	can unify the vprintf family of functions: vprintf_filtered,
	vprintf_unfiltered, vfprintf_filtered and vfprintf_unfiltered.  (For
	the gdb_stdout variants, recall that only printf_unfiltered gets truly
	unfiltered output at this point.)  This removes one such function and
	renames the remaining two to "gdb_vprintf".  All callers are updated.
	Much of this patch was written by script.

	Remove fputs_styled_unfiltered
	fputs_styled_unfiltered is only called from cli_ui_out, so remove it.
	This area will be further simplified in future patches.

2022-03-29  Tom Tromey  <tom@tromey.com>

	Change the pager to a ui_file
	This rewrites the output pager as a ui_file implementation.

	A new header is introduced to declare the pager class.  The
	implementation remains in utils.c for the time being, because there
	are some static globals there that must be used by this code.  (This
	could be cleaned up at some future date.)

	I went through all the text output in gdb to ensure that this change
	should be ok.  There are a few cases:

	* Any existing call to printf_unfiltered is required to be avoid the
	  pager.  This is ensured directly in the implementation.

	* All remaining calls to the f*_unfiltered functions -- the ones that
	  take an explicit ui_file -- either send to an unfiltered stream
	  (e.g., gdb_stderr), which is obviously ok; or conditionally send to
	  gdb_stdout

	  I investigated all such calls by searching for:

	    grep -e '\bf[a-z0-9_]*_unfiltered' *.[chyl] */*.[ch] | grep -v gdb_stdlog | grep -v gdb_stderr

	  This yields a number of candidates to check.

	  * The breakpoint _print_recreate family, and
	    save_trace_state_variables.  These are used for "save" commands
	    and so are fine.

	  * Things printing to a temporary stream.  Obviously ok.

	  * Disassembly selftests.

	  * print_gdb_help - this is non-obvious, but ok because paging isn't
	    yet enabled at this point during startup.

	  * serial.c - doens't use gdb_stdout

	  * The code in compile/.  This is all printing to a file.

	  * DWARF DIE dumping - doesn't reference gdb_stdout.

	* Calls to the _filtered form -- these are all clearly ok, because if
	  they are using gdb_stdout, then filtering will still apply; and if
	  not, then filtering never applied and still will not.

	Therefore, at this point, there is no longer any distinction between
	all the other _filtered and _unfiltered calls, and they can be
	unified.

	In this patch, take special note of the vfprintf_maybe_filtered and
	ui_file::vprintf change.  This is one instance of the above idea,
	erasing the distinction between filtered and unfiltered -- in this
	part of the change, the "unfiltered_output" flag is never passe to
	cli_ui_out.  Subsequent patches will go much further in this
	direction.

	Also note the can_emit_style_escape changes in ui-file.c.  Checking
	against gdb_stdout or gdb_stderr was always a bit of a hack; and now
	it is no longer needed, because this is decision can be more fully
	delegated to the particular ui_file implementation.

	ui_file::can_page is removed, because this patch removed the only call
	to it.

	I think this is the main part of fixing PR cli/7234.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=7234

2022-03-29  Tom Tromey  <tom@tromey.com>

	Remove vfprintf_styled_no_gdbfmt
	This removes vfprintf_styled_no_gdbfmt, inlining it at the sole point
	of call.

	Add style-escape methods to ui_file
	This adds emit_style_escape and reset_style methods to ui_file.  These
	aren't used yet, but they will be once the pager is converted to be a
	ui_file subclass.

	Add puts_unfiltered method to ui_file
	When the pager is rewritten as a ui_file, gdb will still need a way to
	bypass the filtering.  After examining a few approaches, I chose this
	patch, which adds a puts_unfiltered method to ui_file.  For most
	implementations of ui_file, this will just delegate to puts.  This
	patch also switches printf_unfiltered to use the new method.

	Only have one API for unfiltered output
	At the end of this series, the use of unfiltered output will be very
	restricted -- only places that definitely need it will use it.  To
	this end, I thought it would be good to reduce the number of
	_unfiltered APIs that are exposed.  This patch changes gdb so that
	only printf_unfiltered exists.  (After this patch, the f* variants
	still exist as well, but those will be removed later.)

2022-03-29  Tom Tromey  <tom@tromey.com>

	Remove some uses of printf_unfiltered
	A number of spots call printf_unfiltered only because they are in code
	that should not be interrupted by the pager.  However, I believe these
	cases are all handled by infrun's blanket ban on paging, and so can be
	converted to the default (_filtered) API.

	After this patch, I think all the remaining _unfiltered calls are ones
	that really ought to be.  A few -- namely in complete_command -- could
	be replaced by a scoped assignment to pagination_enabled, but for the
	remainder, the code seems simple enough like this.

2022-03-29  Tom Tromey  <tom@tromey.com>

	Use unfiltered output in annotate.c
	It seems to me that annotations should not be filtered.  While it
	might be weird for an annotation-based UI to use the pager, it's not,
	I think, out of the question.  This patch makes this change.

2022-03-29  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>
	    Aleksandar Paunovic  <aleksandar.paunovic@intel.com>

	gdb/remote: use current_inferior in read_ptid if multi-process not supported
	When parsing the ptid out of a reply package, if the multi-process
	extensions are not supported, use current_inferior's pid as the pid of
	the reported thread, instead of inferior_ptid.  This is needed because
	the inferior_ptid may be null_ptid although a legit context exists,
	due to a prior context switch via switch_to_inferior_no_thread.

	Below is a scenario that illustrates what could go wrong.  First,
	setup a multi-target scenario.  This is needed, because in a
	multi-target setting, the inferior_ptid is cleared out before waiting
	on targets.  The second inferior below sits on top of a remote target.
	Multi-process packets are disabled.

	  $ # First, spawn a process with PID 26253 to attach to later.
	  $ gdb-up a.out
	  Reading symbols from a.out...
	  (gdb) maint set target-non-stop on
	  (gdb) set remote multiprocess-feature-packet off
	  (gdb) start
	  ...
	  (gdb) add-inferior -no-connection
	  [New inferior 2]
	  Added inferior 2
	  (gdb) inferior 2
	  [Switching to inferior 2 [<null>] (<noexec>)]
	  (gdb) target extended-remote | gdbserver --multi -
	  Remote debugging using | gdbserver --multi -
	  Remote debugging using stdio
	  (gdb) attach 26253
	  Attaching to Remote target
	  Attached; pid = 26253
	  [New Thread 26253]
	  [New inferior 3]
	  Reading /tmp/a.out from remote target...
	  ...
	  [New Thread 26253]
	  ...
	  Reading /usr/local/lib/debug/....debug from remote target...
	  >>> GDB seems to hang here.

	After attaching to a process and reading some library files, GDB
	seems to hang.  One interesting thing to note is that

	  [New Thread 26253]

	appears twice.  We also see

	  [New inferior 3]

	Running the same scenario with "debug infrun on" reveals more details.

	  ...
	  (gdb) attach 26253
	  [infrun] scoped_disable_commit_resumed: reason=attaching
	  Attaching to Remote target
	  Attached; pid = 26253
	  [New Thread 26253]
	  [infrun] infrun_async: enable=1
	  [infrun] attach_command: immediately after attach:
	  [infrun] attach_command:   thread 26253.26253.0, executing = 1, resumed = 0, state = RUNNING
	  [infrun] clear_proceed_status_thread: 26253.26253.0
	  [infrun] reset: reason=attaching
	  [infrun] maybe_set_commit_resumed_all_targets: not requesting commit-resumed for target native, no resumed threads
	  [infrun] maybe_set_commit_resumed_all_targets: enabling commit-resumed for target extended-remote
	  [infrun] fetch_inferior_event: enter
	    [infrun] scoped_disable_commit_resumed: reason=handling event
	    [infrun] do_target_wait: Found 2 inferiors, starting at #1
	    [infrun] random_pending_event_thread: None found.
	    [infrun] print_target_wait_results: target_wait (-1.0.0 [Thread 0], status) =
	    [infrun] print_target_wait_results:   26253.26253.0 [Thread 26253],
	    [infrun] print_target_wait_results:   status->kind = STOPPED, sig = GDB_SIGNAL_0
	    [infrun] handle_inferior_event: status->kind = STOPPED, sig = GDB_SIGNAL_0
	    [infrun] start_step_over: enter
	      [infrun] start_step_over: stealing global queue of threads to step, length = 0
	      [infrun] operator(): step-over queue now empty
	    [infrun] start_step_over: exit
	    [infrun] context_switch: Switching context from 0.0.0 to 26253.26253.0
	    [infrun] handle_signal_stop: stop_pc=0x7f849d8cf151
	    [infrun] stop_waiting: stop_waiting
	    [infrun] stop_all_threads: starting
	    [infrun] stop_all_threads: pass=0, iterations=0
	  [New inferior 3]
	  Reading /tmp/a.out from remote target...
	  warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.
	  Reading /tmp/a.out from remote target...
	  Reading symbols from target:/tmp/a.out...
	  [New Thread 26253]
	    [infrun] stop_all_threads:   4723.4723.0 not executing
	    [infrun] stop_all_threads:   26253.26253.0 not executing
	    [infrun] stop_all_threads:   42000.26253.0 executing, need stop
	    [infrun] print_target_wait_results: target_wait (-1.0.0 [Thread 0], status) =
	    [infrun] print_target_wait_results:   -1.0.0 [Thread 0],
	    [infrun] print_target_wait_results:   status->kind = IGNORE
	    [infrun] print_target_wait_results: target_wait (-1.0.0 [Thread 0], status) =
	    [infrun] print_target_wait_results:   -1.0.0 [Thread 0],
	    [infrun] print_target_wait_results:   status->kind = IGNORE

	GDB tried to stop Thread 42000.26253.0, which does not exist, and we
	are waiting for a stop event that will never happen.  The PID in
	'42000.26253.0', namely 42000, is the PID of magic_null_ptid.
	It comes from gdb/remote.c:read_ptid:

	  /* Since the stub is not sending a process id, then default to
	     what's in inferior_ptid, unless it's null at this point.  If so,
	     then since there's no way to know the pid of the reported
	     threads, use the magic number.  */
	  if (inferior_ptid == null_ptid)
	    pid = magic_null_ptid.pid ();
	  else
	    pid = inferior_ptid.pid ();

	  if (obuf)
	    *obuf = pp;
	  return ptid_t (pid, tid);

	Because multi-process was turned off, GDB did not parse an explicitly
	specified PID.  Furthermore, inferior_ptid == null_ptid, and
	eventually GDB picked the PID from magic_null_ptid.

	If target-non-stop is not turned on at the beginning, the same bug
	reveals itself as a duplicated thread as shown below.

	  # Same setup as above, without 'maint set target-non-stop on'.
	  ...
	  (gdb) attach 26253
	  Attaching to Remote target
	  Attached; pid = 26253
	  [New inferior 3]
	  ...
	  [New Thread 26253]
	  ...
	  (gdb) info threads
	    Id   Target Id             Frame
	    1.1  process 13517 "a.out" main () at test.c:3
	  * 2.1  Thread 26253 "a.out"  0x00007f12750c5151 in read () from target:/lib/x86_64-linux-gnu/libc.so.6
	    3.1  Thread 26253 "a.out"  Remote 'g' packet reply is too long (expected 560 bytes, got 2496 bytes): 00feffffffffffff000a3a75127f000051510c75127f0000000400000000000060d24ef6af5500000000000000000000680d000000000000b85b31e3fc7f0000c0283a75127f000000e55b75127f000010d04ef6af550000460200000000000060c73975127f0000a0d23975127f0000000a3a75127f0000000000000000000051510c75127f000046020000330000002b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007f03000000000000ffff0000000000000000000000000000000000000000000080143a75127f000080143a75127f000040143a75127f000040143a75127f00007d0000007e0000007f00000080000000300c3a75127f0000300c3a75127f00000e000000000000000e0000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff0400000004000000040000000400000020143a75127f000020143a75127f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000801f0000000000000000000000e55b75127f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
	  (gdb)

	Fix the problem by preferring current_inferior()'s pid instead of
	magic_null_ptid.

	Regression-tested on X86-64 Linux.

2022-03-29  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: fix test failure when building against readline v7
	The test added in the commit:

	  commit a6b413d24ccc5d76179bab866834e11fd6fec294
	  Date:   Fri Mar 11 14:44:03 2022 +0000

	      gdb: work around prompt corruption caused by bracketed-paste-mode

	Was not written with readline 7 in mind, only readline 8+.  Between
	readline 7 and 8 the escape sequence used to disable bracketed paste
	mode changed, an additional '\r' character was added to the end.  In
	fact, it was the addition of this '\r' character that triggered the
	issue for which the above commit is part of the solution.

	Anyway, the test tries to spot the case where the output from GDB is
	not perfect, but does have the above work around applied.  However,
	the pattern in the test assumes that the problematic '\r' will be
	present, and this is only true for readline 8+.  With readline 7 the
	test was failing.

	In this commit I generalise the pattern a little so that the test will
	still KFAIL with readline 7.

	It's a little unfortunate that the test is KFAILing with readline 7,
	as without the problematic '\r' there's actually no reason that GDB
	couldn't "do the right thing" in this case, in which case, the test
	would PASS, but that would require changes within GDB itself.

	My preference then is that initially we patch the test to get it
	KFAILing, then in a separate commit I can modify GDB so that it can
	PASS with readline 7.

2022-03-29  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: fix copy & paste error in gdb.python/py-format-address.exp
	The test gdb.python/py-format-address.exp, added in commit:

	  commit 25209e2c6979c3838e14e099f0333609810db280
	  Date:   Sat Oct 23 09:59:25 2021 +0100

	      gdb/python: add gdb.format_address function

	included 3 copy & paste errors where the wrong address was used in the
	expected output patterns.

	The test compiles two almost identical test binaries (one function
	changes its name, that's the only difference), two inferiors are
	created, each inferior using one of the test binaries.

	We then take the address of the name changing function in both
	inferiors ('foo' in inferior 1 and 'bar' in inferior 2) and the tests
	are carried out using these addresses.

	What we're checking for is that symbols 'foo' and 'bar' show up in the
	correct inferior, and that (as this test is for a Python API feature),
	the user can have one inferior selected, but ask about the other
	inferior, and see the correct symbol in the result.

	The hope is that the two binaries will be laid out identically by the
	compiler, and that 'foo' and 'bar' will be at the same address.  This
	is fine, unless the executable is compiled as PIE (position
	independent executable), in which case there is a problem.

	The problem is that though inferior 1 is set running, the inferior 2
	never is.  If the executables are compiled as PIE, then the address in
	the inferior 2 will not have been resolved, while the address in the
	inferior 1 will have been, and so the two addresses we use in the
	tests will be different.

	This issue was reported here:

	  https://sourceware.org/pipermail/gdb-patches/2022-March/186911.html

	The first part of the fix is to use the correct address variable in
	the expected output patterns, with this change the tests pass even
	when the executables are compiled as PIE.

	A second part of this fix is to pass the 'nopie' option when we
	compile the tests, this should ensure that the address obtained in
	inferior 2 is the same as the address from inferior 1, which makes the
	test more useful.

2022-03-29  Andrew Burgess  <aburgess@redhat.com>

	gdb/mi: fix use after free of frame_info causing spurious notifications
	In commit:

	  commit a2757c4ed693cef4ecc4dcdcb2518353eb6b3c3f
	  Date:   Wed Mar 16 15:08:22 2022 +0000

	      gdb/mi: consistently notify user when GDB/MI client uses -thread-select

	Changes were made to GDB to address some inconsistencies in when
	notifications are sent from a MI terminal to a CLI terminal (when
	multiple terminals are in use, see new-ui command).

	Unfortunately, in order to track when the currently selected frame has
	changed, that commit grabs a frame_info pointer before and after an MI
	command has executed, and compares the pointers to see if the frame
	has changed.

	This is not safe.

	If the frame cache is deleted for any reason then the frame_info
	pointer captured before the command started, is no longer valid, and
	any comparisons based on that pointer are undefined.

	This was leading to random test failures for some folk, see:

	  https://sourceware.org/pipermail/gdb-patches/2022-March/186867.html

	This commit changes GDB so we no longer hold frame_info pointers, but
	instead store the frame_id and frame_level, this is safe even when the
	frame cache is flushed.

2022-03-29  Jan Beulich  <jbeulich@suse.com>

	bfd/Dwarf2: gas doesn't mangle names
	Include the language identifier emitted by gas in the set of ones where
	no mangled names are expected. Even if there could be "hand-mangled"
	names, gas doesn't emit DW_AT_linkage_name in the first place.

	bfd/Dwarf2: make find-nearest-line returned function name consistent
	Prior to entering the enclosing "else if()" the earlier associated if()
	checks function->is_linkage and, if set, uses function->name. The
	comment in patch context precedes (and explains) the setting
	function->is_linkage. Yet with the flag set, we should then also return
	the function name, just like said earlier if() would do when we came
	here a 2nd time for the same "addr". And indeed passing the same address
	twice on addr2line's command line would resolve the function for the 2nd
	instance, but not for the 1st (if this code path is taken). (This,
	obviously, is particularly relevant when there's no ELF symbol table in
	the first place, like would be the case - naturally - in PE/COFF
	binaries, for example.)

	gas/Dwarf: special-case .linefile only for macros
	Restrict the PR gas/16908 workaround to just macros, matching the
	original intention as well as the comment there. For constructs like
	.irp or .rept the reasoning doesn't apply, as there's no separate
	"invocation" point which may be of interest to record (for, as said
	there, short macros).

2022-03-29  Jan Beulich  <jbeulich@suse.com>

	RISC-V: correct FCVT.Q.L[U]
	While the spec isn't explicit about this, it pointing out the similarity
	with the D extension ought to extend to the ignoring of a meaningless
	rounding mode: "Note FCVT.D.W[U] always produces an exact result and is
	unaffected by rounding mode." Hence the chosen encodings also ought to
	match.

	Note that to avoid breaking existing code the forms with a 3rd operand
	are not removed, which means there continues to be a difference to
	FCVT.D.W[U].

2022-03-29  Mike Frysinger  <vapier@gentoo.org>

	sim: add arch/.gdbinit stub scripts
	Make it easy to load the common gdbinit script even when running in
	the arch/ subdir instead of the top-level sim dir.

2022-03-29  Alan Modra  <amodra@gmail.com>

	asan: heap buffer overflow in pa_chk_field_selector
	The buffer overflow showed up running the gas "all macro" test.

		PR 29005
		* config/tc-hppa.c (pa_chk_field_selector): Don't read past end
		of line.

2022-03-29  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-28  Tom Tromey  <tom@tromey.com>

	Add Rust parser check for end of expression
	I noticed that "print 5," passed in Rust -- the parser wasn't checking
	that the entire input was used.  This patch fixes the problem.  This
	in turn pointed out another bug in the parser, namely that it didn't
	lex the next token after handling a string token.  This is also fixed
	here.

2022-03-28  Tom Tromey  <tom@tromey.com>

	Switch gdb_stdlog to use timestamped_file
	Currently, timestamps for logging are done by looking for the use of
	gdb_stdlog in vfprintf_unfiltered.  This seems potentially buggy, in
	that during logging or other redirects (like execute_fn_to_ui_file) we
	might have gdb_stdout==gdb_stdlog and so, conceivably, wind up with
	timestamps in a log when they were not desired.

	It seems better, instead, for timestamps to be a property of the
	ui_file itself.

	This patch changes gdb to use the new timestamped_file for gdb_stdlog
	where appropriate, and removes the special case from
	vfprintf_unfiltered.

	Note that this may somewhat change the output in some cases -- in
	particular, when going through execute_fn_to_ui_file (or the _string
	variant), timestamps won't be emitted.  This could be fixed in those
	functions, but it wasn't clear to me whether this is really desirable.

	Note also that this changes the TUI to send gdb_stdlog to gdb_stderr.
	I imagine that the previous use of gdb_stdout here was inadvertent.
	(And in any case it probably doesn't matter.)

2022-03-28  Tom Tromey  <tom@tromey.com>

	Add new timestamped_file class
	This adds a "timestamped_file" subclass of ui_file.  This class adds a
	timestamp to its output when appropriate.  That is, it follows the
	rule already used in vfprintf_unfiltered of adding a timestamp at most
	once per write.

	The new class is not yet used.

2022-03-28  Tom Tromey  <tom@tromey.com>

	Use unique_ptr in CLI logging code
	This changes the CLI logging code to avoid manual memory management
	(to the extent possible) by using unique_ptr in a couple of spots.
	This will come in handy in a later patch.

2022-03-28  Tom Tromey  <tom@tromey.com>

	Simplify the CLI set_logging logic
	The CLI's set_logging logic seemed unnecessarily complicated to me.
	This patch simplifies it, with an eye toward changing it to use RAII
	objects in a subsequent patch.

	I did not touch the corresponding MI code.  That code seems incorrect
	(nothing ever uses raw_stdlog, and nothing ever sets
	saved_raw_stdlog).  I didn't attempt to fix this, because I question
	whether this is even useful for MI.

2022-03-28  Tom Tromey  <tromey@adacore.com>

	Handle multiple addresses in call_site_target
	A large customer program has a function that is partitioned into hot
	and cold parts.  A variable in a callee of this function is described
	using DW_OP_GNU_entry_value, but gdb gets confused when trying to find
	the caller.  I tracked this down to dwarf2_get_pc_bounds interpreting
	the function's changes so that the returned low PC is the "wrong"
	function.

	Intead, when processing DW_TAG_call_site, the low PC of each range in
	DW_AT_ranges should be preserved in the call_site_target.  This fixes
	the variable lookup in the test case I have.

	I didn't write a standalone test for this as it seemed excessively
	complicated.

2022-03-28  Tom Tromey  <tromey@adacore.com>

	Change call_site_target to iterate over addresses
	In order to handle the case where a call site target might refer to
	multiple addresses, we change the code to use a callback style.  Any
	spot using call_site_target::address now passes in a callback function
	that may be called multiple times.

2022-03-28  Tom Tromey  <tromey@adacore.com>

	Change call_site_find_chain_1 to work recursively
	call_site_find_chain_1 has a comment claiming that recursive calls
	would be too expensive.  However, I doubt this is so expensive; and
	furthermore the explicit state management approach here is difficult
	both to understand and to modify.  This patch changes this code to use
	explicit recursion, so that a subsequent patch can generalize this
	code without undue trauma.

	Additionally, I think this patch detects a latent bug in the recursion
	code.  (It's hard for me to be completely certain.)  The bug is that
	when a new target_call_site is entered, the code does:

		  if (target_call_site)
		    {
		      if (addr_hash.insert (target_call_site->pc ()).second)
			{
			  /* Successfully entered TARGET_CALL_SITE.  */

			  chain.push_back (target_call_site);
			  break;
			}
		    }

	Here, if entering the target_call_site fails, then any tail_call_next
	elements in this call site are not visited.  However, if this code
	does happen to enter a call site, then the tail_call_next elements
	will be visited during backtracking.  This applies when doing the
	backtracking as well -- it will only continue through a given chain as
	long as each element in the chain can successfully be visited.

	I'd appreciate some review of this.  If this behavior is intentional,
	it can be added to the new implementation.

2022-03-28  Tom Tromey  <tromey@adacore.com>

	Constify chain_candidate
	While investigating this bug, I wasn't sure if chain_candidate might
	update 'chain'.  I changed it to accept a const reference, making it
	clear that it cannot.  This simplifies the code a tiny bit as well.

	Make call_site_target members private
	This makes the data members of call_site_target 'private'.  This lets
	us remove most of its public API.  call_site_to_target_addr is changed
	to be a method of this type.  This is a preparatory refactoring for
	the fix at the end of this series.

	Change call_site_target to use custom type and enum
	call_site_target reuses field_loc_kind and field_location.  However,
	it has never used the full range of the field_loc_kind enum.  In a
	subsequent patch, I plan to add a new 'kind' here, so it seemed best
	to avoid this reuse and instead introduce new types here.

2022-03-28  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-27  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-26  Tom Tromey  <tom@tromey.com>

	Remove an unused declaration from value.h
	value.h has a declaration of value_print_array_elements that is
	incorrect.  In C, this would have been an error, but in C++ this is a
	declaration of an overload that is neither defined nor used.  This
	patch removes the declaration.

2022-03-26  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-25  Nick Alcock  <nick.alcock@oracle.com>

	libtool.m4: fix the NM="/nm/over/here -B/option/with/path" case
	My previous nm patch handled all cases but one -- if the user set NM in
	the environment to a path which contained an option, libtool's nm
	detection tries to run nm against a copy of nm with the options in it:
	e.g. if NM was set to "nm --blargle", and nm was found in /usr/bin, the
	test would try to run "/usr/bin/nm --blargle /usr/bin/nm --blargle".
	This is unlikely to be desirable: in this case we should run
	"/usr/bin/nm --blargle /usr/bin/nm".

	Furthermore, as part of this nm has to detect when the passed-in $NM
	contains a path, and in that case avoid doing a path search itself.
	This too was thrown off if an option contained something that looked
	like a path, e.g. NM="nm -B../prev-gcc"; libtool then tries to run
	"nm -B../prev-gcc nm" which rarely works well (and indeed it looks
	to see whether that nm exists, finds it doesn't, and wrongly concludes
	that nm -p or whatever does not work).

	Fix all of these by clipping all options (defined as everything
	including and after the first " -") before deciding whether nm
	contains a path (but not using the clipped value for anything else),
	and then removing all options from the path-modified nm before
	looking to see whether that nm existed.

	NM=my-nm now does a path search and runs e.g.
	  /usr/bin/my-nm -B /usr/bin/my-nm

	NM=/usr/bin/my-nm now avoids a path search and runs e.g.
	  /usr/bin/my-nm -B /usr/bin/my-nm

	NM="my-nm -p../wombat" now does a path search and runs e.g.
	  /usr/bin/my-nm -p../wombat -B /usr/bin/my-nm

	NM="../prev-binutils/new-nm -B../prev-gcc" now avoids a path search:
	  ../prev-binutils/my-nm -B../prev-gcc -B ../prev-binutils/my-nm

	This seems to be all combinations, including those used by GCC bootstrap
	(which, before this commit, fails to bootstrap when configured
	--with-build-config=bootstrap-lto, because the lto plugin is now using
	--export-symbols-regex, which requires libtool to find a working nm,
	while also using -B../prev-gcc to point at the lto plugin associated
	with the GCC just built.)

	Regenerate all affected configure scripts.

		* libtool.m4 (LT_PATH_NM): Handle user-specified NM with
		options, including options containing paths.

2022-03-25  Alan Modra  <amodra@gmail.com>

	Re: gas/Dwarf: improve debug info generation from .irp and alike blocks
	am33_2.0-linux is a mn10300 target.

		* testsuite/gas/elf/dwarf-5-irp.d: xfail am33.

2022-03-25  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-24  Aaron Merey  <amerey@redhat.com>

	Remove download size from debuginfod progress messages if unavailable
	Currently debuginfod progress update messages include the size of
	each download:

	  Downloading 7.5 MB separate debug info for /lib/libxyz.so.0

	This value originates from the Content-Length HTTP header of the
	transfer.  However this header is not guaranteed to be present for
	each download.  This can happen when debuginfod servers compress files
	on-the-fly at the time of transfer.  In this case gdb wrongly prints
	"-0.00 MB" as the size.

	This patch removes download sizes from progress messages when they are
	not available.  It also removes usage of the progress bar until
	a more thorough reworking of progress updating is implemented. [1]

	[1] https://sourceware.org/pipermail/gdb-patches/2022-February/185798.html

2022-03-24  Reuben Thomas  <rrt@sc3d.org>

	sim: fix a comment typo in sim-load.c
	Fix a typo where the documentation refers to a function parameter by the
	wrong name.

	Change-Id: I99494efe62cd4aa76fb78a0bd5da438d35740ebe

2022-03-24  Reuben Thomas  <rrt@sc3d.org>

	sim: fix “alligned” typos
	Change-Id: Ifd574e38524dd4f1cf0fc003e0c5c7499abc84a0

2022-03-24  Jan Beulich  <jbeulich@suse.com>

	x86: mention dropped L1OM/K1OM support in ld/ as well
	This amends e961c696dcb2 ("x86: drop L1OM/K1OM support from ld"). Also
	remove the marker that I mistakenly added in c085ab00c7b2 ("x86: drop
	L1OM/K1OM support from gas").

2022-03-24  Simon Marchi  <simon.marchi@efficios.com>

	gdb/testsuite: remove gdb.python/pretty-print-call-by-hand.exp
	This test was added without a corresponding fix, with some setup_kfails.
	However, it results in UNRESOLVED results when GDB is built with ASan.

	  ERROR: GDB process no longer exists
	  GDB process exited with wait status 1946871 exp7 0 1
	  UNRESOLVED: gdb.python/pretty-print-call-by-hand.exp: frame print: backtrace test (PRMS gdb/28856)

	Remove the test from the tree, I'll attach it to the Bugzilla bug
	instead [1].

	[1] https://sourceware.org/bugzilla/show_bug.cgi?id=28856

	Change-Id: Id95d8949fb8742874bd12aeac758aa4d7564d678

2022-03-24  Jan Beulich  <jbeulich@suse.com>

	x86: drop L1OM/K1OM support from ld
	This was only rudimentary support anyway; none of the sub-architecture
	specific insns were ever supported.

	x86: drop L1OM special case from disassembler
	There wasn't any real support anyway: None of the sub-architecture
	specific insns were ever supported.

2022-03-24  Jan Beulich  <jbeulich@suse.com>

	MAINTAINERS: add myself
	I much appreciate Nick offering this role to me. Nevertheless there's
	still a lot for me to learn here.

	At this occasion also update my email address in the pre-existing, much
	more narrow entry.

2022-03-24  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-23  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: address test failures in gdb.mi/mi-multi-commands.exp
	The gdb.mi/mi-multi-commands.exp test was added in commit:

	  commit d08cbc5d3203118da5583296e49273cf82378042
	  Date:   Wed Dec 22 12:57:44 2021 +0000

	      gdb: unbuffer all input streams when not using readline

	And then tweaked in commit:

	  commit 144459531dd68a1287905079aaa131b777a8cc82
	  Date:   Mon Feb 7 20:35:58 2022 +0000

	      gdb/testsuite: relax pattern in new gdb.mi/mi-multi-commands.exp test

	The second of these commits was intended to address periodic test
	failures that I was seeing, and this change did fix some problems,
	but, unfortunately, introduced other issues.

	The problem is that the test relies on sending two commands to GDB in
	a single write.  As the characters that make these two commands arrive
	they are echoed to GDB's console.  However, there is a race between
	how quickly the characters are echoed and how quickly GDB decides to
	act on the incoming commands.

	Usually, both commands are echoed in full before GDB acts on the first
	command, but sometimes this is not the case, and GDB can execute the
	first command before both commands are fully echoed to the console.
	In this case, the output of the first command will be mixed in with
	the echoing of the second command.

	This mixing of the command echoing and the first command output is
	what was causing failures in the original version of the test.

	The second commit relaxed the expected output pattern a little, but
	was still susceptible to failures, so this commit further relaxes the
	pattern.

	Now, we look for the first command output with no regard to what is
	before, or after the command.  Then we look for the first mi prompt to
	indicate that the first command has completed.

	I believe that this change should make the test more stable than it
	was before.

2022-03-23  Nick Alcock  <nick.alcock@oracle.com>

	libctf: add LIBCTF_WRITE_FOREIGN_ENDIAN debugging option
	libctf has always handled endianness differences by detecting
	foreign-endian CTF dicts on the input and endian-flipping them: dicts
	are always written in native endianness.  This makes endian-awareness
	very low overhead, but it means that the foreign-endian code paths
	almost never get routinely tested, since "make check" usually reads in
	dicts ld has just written out: only a few corrupted-CTF tests are
	actually in fixed endianness, and even they only test the foreign-
	endian code paths when you run make check on a big-endian machine.
	(And the fix is surely not to add more .s-based tests like that, because
	they are a nightmare to maintain compared to the C-code-based ones.)

	To improve on this, add a new environment variable,
	LIBCTF_WRITE_FOREIGN_ENDIAN, which causes libctf to unconditionally
	endian-flip at ctf_write time, so the output is always in the wrong
	endianness.  This then tests the foreign-endian read paths properly
	at open time.

	Make this easier by restructuring the writeout code in ctf-serialize.c,
	which duplicates the maybe-gzip-and-write-out code three times (once
	for ctf_write_mem, with thresholding, and once each for
	ctf_compress_write and ctf_write just so those can avoid thresholding
	and/or compression).  Instead, have the latter two call the former
	with thresholds of 0 or (size_t) -1, respectively.

	The endian-flipping code itself gains a bit of complexity, because
	one single endian-flipper (flip_types) was assuming the input to be
	in foreign-endian form and assuming it could pull things out of the
	input once they had been flipped and make sense of them. At the
	cost of a few lines of duplicated initializations, teach it to
	read before flipping if we're flipping to foreign-endianness instead
	of away from it.

	libctf/
		* ctf-impl.h (ctf_flip_header): No longer static.
		(ctf_flip): Likewise.
		* ctf-open.c (flip_header): Rename to...
		(ctf_flip_header): ... this, now it is not private to one file.
		(flip_ctf): Rename...
		(ctf_flip): ... this too.  Add FOREIGN_ENDIAN arg.
		(flip_types): Likewise.  Use it.
		(ctf_bufopen_internal): Adjust calls.
		* ctf-serialize.c (ctf_write_mem): Add flip_endian path via
		a newly-allocated bounce buffer.
		(ctf_compress_write): Move below ctf_write_mem and reimplement
		in terms of it.
		(ctf_write): Likewise.
		(ctf_gzwrite): Note that this obscure writeout function does not
		support endian-flipping.

2022-03-23  Nick Alcock  <nick.alcock@oracle.com>

	libctf, ld: diagnose corrupted CTF header cth_strlen
	The last section in a CTF dict is the string table, at an offset
	represented by the cth_stroff header field.  Its length is recorded in
	the next field, cth_strlen, and the two added together are taken as the
	size of the CTF dict.  Upon opening a dict, we check that none of the
	header offsets exceed this size, and we check when uncompressing a
	compressed dict that the result of the uncompression is the same length:
	but CTF dicts need not be compressed, and short ones are not.
	Uncompressed dicts just use the ctf_size without checking it.  This
	field is thankfully almost unused: it is mostly used when reserializing
	a dict, which can't be done to dicts read off disk since they're
	read-only.

	However, when opening an uncompressed foreign-endian dict we have to
	copy it out of the mmaped region it is stored in so we can endian-
	swap it, and we use ctf_size when doing that.  When the cth_strlen is
	corrupt, this can overrun.

	Fix this by checking the ctf_size in all uncompressed cases, just as we
	already do in the compressed case.  Add a new test.

	This came to light because various corrupted-CTF raw-asm tests had an
	incorrect cth_strlen: fix all of them so they produce the expected
	error again.

	libctf/
		PR libctf/28933
		* ctf-open.c (ctf_bufopen_internal): Always check uncompressed
		CTF dict sizes against the section size in case the cth_strlen is
		corrupt.

	ld/
		PR libctf/28933
		* testsuite/ld-ctf/diag-strlen-invalid.*: New test,
		derived from diag-cttname-invalid.s.
		* testsuite/ld-ctf/diag-cttname-invalid.s: Fix incorrect cth_strlen.
		* testsuite/ld-ctf/diag-cttname-null.s: Likewise.
		* testsuite/ld-ctf/diag-cuname.s: Likewise.
		* testsuite/ld-ctf/diag-parlabel.s: Likewise.
		* testsuite/ld-ctf/diag-parname.s: Likewise.

2022-03-23  Nick Alcock  <nick.alcock@oracle.com>

	include, libctf, ld: extend variable section to contain functions too
	The CTF variable section is an optional (usually-not-present) section in
	the CTF dict which contains name -> type mappings corresponding to data
	symbols that are present in the linker input but not in the output
	symbol table: the idea is that programs that use their own symbol-
	resolution mechanisms can use this section to look up the types of
	symbols they have found using their own mechanism.

	Because these removed symbols (mostly static variables, functions, etc)
	all have names that are unlikely to appear in the ELF symtab and because
	very few programs have their own symbol-resolution mechanisms, a special
	linker flag (--ctf-variables) is needed to emit this section.

	Historically, we emitted only removed data symbols into the variable
	section.  This seemed to make sense at the time, but in hindsight it
	really doesn't: functions are symbols too, and a C program can look them
	up just like any other type.  So extend the variable section so that it
	contains all static function symbols too (if it is emitted at all), with
	types of kind CTF_K_FUNCTION.

	This is a little fiddly.  We relied on compiler assistance for data
	symbols: the compiler simply emits all data symbols twice, once into the
	symtypetab as an indexed symbol and once into the variable section.

	Rather than wait for a suitably adjusted compiler that does the same for
	function symbols, we can pluck unreported function symbols out of the
	symtab and add them to the variable section ourselves.  While we're at
	it, we do the same with data symbols: this is redundant right now
	because the compiler does it, but it costs very little time and lets the
	compiler drop this kludge and save a little space in .o files.

	include/
		* ctf.h: Mention the new things we can see in the variable
		section.

	ld/
		* testsuite/ld-ctf/data-func-conflicted-vars.d: New test.

	libctf/
		* ctf-link.c (ctf_link_deduplicating_variables): Duplicate
		symbols into the variable section too.
		* ctf-serialize.c (symtypetab_delete_nonstatic_vars): Rename
		to...
		(symtypetab_delete_nonstatics): ... this.  Check the funchash
		when pruning redundant variables.
		(ctf_symtypetab_sect_sizes): Adjust accordingly.
		* NEWS: Describe this change.

2022-03-23  Nick Alcock  <nick.alcock@oracle.com>

	ld, testsuite: improve CTF-availability test
	The test for -gctf support in the compiler is used to determine when to
	run the ld-ctf tests and most of those in libctf.  Unfortunately,
	because it uses check_compiler_available and compile_one_cc, it will
	fail whenever the compiler emits anything on stderr, even if it
	actually does support CTF perfectly well.

	So, instead, ask the compiler to emit assembler output and grep it for
	references to ".ctf": this is highly unlikely to be present if the
	compiler does not support CTF.  (This will need adjusting when CTF grows
	support for non-ELF platforms that don't dot-prepend their section
	names, but right now the linker doesn't link CTF on any such platforms
	in any case.)

	With this in place we can do things like run all the libctf tests under
	leak sanitizers etc even if those spray warnings on simple CTF
	compilations, rather than being blocked from doing so just when we would
	most like to.

	ld/
		* testsuite/lib/ld-lib.exp (check_ctf_available): detect CTF
		even if a CTF-capable compiler emits warnings.

2022-03-23  Simon Marchi  <simon.marchi@efficios.com>

	gdb/python: remove Python 2/3 compatibility macros
	New in this version:

	 - Rebase on master, fix a few more issues that appeared.

	python-internal.h contains a number of macros that helped make the code
	work with both Python 2 and 3.  Remove them and adjust the code to use
	the Python 3 functions.

	Change-Id: I99a3d80067fb2d65de4f69f6473ba6ffd16efb2d

2022-03-23  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/python: remove Python 2 support
	New in this version:

	 - Add a PY_MAJOR_VERSION check in configure.ac / AC_TRY_LIBPYTHON.  If
	   the user passes --with-python=python2, this will cause a configure
	   failure saying that GDB only supports Python 3.

	Support for Python 2 is a maintenance burden for any patches touching
	Python support.  Among others, the differences between Python 2 and 3
	string and integer types are subtle.  It requires a lot of effort and
	thinking to get something that behaves correctly on both.  And that's if
	the author and reviewer of the patch even remember to test with Python
	2.

	See this thread for an example:

	  https://sourceware.org/pipermail/gdb-patches/2021-December/184260.html

	So, remove Python 2 support.  Update the documentation to state that GDB
	can be built against Python 3 (as opposed to Python 2 or 3).

	Update all the spots that use:

	 - sys.version_info
	 - IS_PY3K
	 - PY_MAJOR_VERSION
	 - gdb_py_is_py3k

	... to only keep the Python 3 portions and drop the use of some
	now-removed compatibility macros.

	I did not update the configure script more than just removing the
	explicit references to Python 2.  We could maybe do more there, like
	check the Python version and reject it if that version is not
	supported.  Otherwise (with this patch), things will only fail at
	compile time, so it won't really be clear to the user that they are
	trying to use an unsupported Python version.  But I'm a bit lost in the
	configure code that checks for Python, so I kept that for later.

	Change-Id: I75b0f79c148afbe3c07ac664cfa9cade052c0c62

2022-03-23  Jan Beulich  <jbeulich@suse.com>

	x86: reject relocations involving registers
	To prevent fatal or even internal errors, add a simple check to
	i386_validate_fix(), rejecting relocations when their target symbol is
	an equate of a register (or resolved to reg_section for any other
	reason).

	x86: improve resolution of register equates
	Allow transitive (or recursive) equates to work in addition to direct
	ones. The only requirements are that
	- the equate being straight of a register, i.e. no expressions involved
	  (albeit I'm afraid something like "%eax + 0" will be viewed as %eax),
	- at the point of use there's no forward ref left which cannot be
	  resolved, yet.

	Revert "PR28977 tc-i386.c internal error in parse_register"
	This reverts commit 5fac3f02edacfca458f7eeaaaa33a87e26e0e332,
	which was superceeded / replaced by 4faaa10f3fab.

2022-03-23  Jan Beulich  <jbeulich@suse.com>

	x86: don't attempt to resolve equates and alike from i386_parse_name()
	PR gas/28977

	Perhaps right from its introduction in 4d1bb7955a8b it was wrong for
	i386_parse_name() to call parse_register(). This being a hook from the
	expression parser, it shouldn't be resolving e.g. equated symbols.
	That's relevant only for all other callers of parse_register().

	To compensate, in Intel syntax mode check_register() needs calling;
	perhaps not doing so was an oversight right when the function was
	introduced. This is necessary in particular to force EVEX encoding when
	VRex registers are used (but of course also to reject bad uses of
	registers, i.e. fully matching what parse_register() needs it for).

2022-03-23  Luis Machado  <luis.machado@arm.com>

	Update the list of recognized m-profile TAG_CPU_ARCH_*
	Check 3 additional variants previously not recognized:

	- TAG_CPU_ARCH_V7E_M
	- TAG_CPU_ARCH_V8M_BASE
	- TAG_CPU_ARCH_V8M_MAIN

2022-03-23  Jan Beulich  <jbeulich@suse.com>

	gas/Dwarf5: re-use file 0 line string table entry when faking file 0
	No need to emit the same string a 2nd time for file 1 in this case.

	gas/Dwarf5: adjust .debug_line file 0 checking
	First of all when a table entry has a NULL filename, the two inner if()s
	are better done the other way around: The 2nd doesn't depend on what the
	first does. This then renders redundant half of the conditions of the
	other if() and clarifies that subsequently only entry 0 is dealt with
	(indicating that part of the comment was wrong). Finally for there to be
	a usable name in slot 1, files_in_use needs to be larger than 1 and slot
	1's (rather than slot 0's) name needs to be non-NULL.

2022-03-23  Jan Beulich  <jbeulich@suse.com>

	gas/Dwarf5: drop dead code
	Commit 3417bfca676f ("GAS: DWARF-5: Ensure that the 0'th entry in the
	directory table contains the current... ") added a "dwarf_level < 5"
	check to out_dir_and_file_list(). This rendered dead that branch of the
	construct, due to the enclosing if()'s "DWARF2_LINE_VERSION >= 5".
	Delete that code as well as the corresponding part of the comment.

	While there also drop a redundant "dirs != NULL": "dirs" will always be
	non-NULL when dirs_in_use is not zero.

2022-03-23  Jan Beulich  <jbeulich@suse.com>

	gas/Dwarf: improve debug info generation from .irp and alike blocks
	Tying the bumping of the logical line number to reading from the
	original source file looks wrong: Upon finishing of the processing of an
	sb the original values will be restored anyway. Yet without bumping the
	line counter uses of .line inside e.g. an .irp construct won't have the
	intended effect: Such uses may be necessary to ensure proper debug info
	is emitted in particular when switching sections inside the .irp body,
	as dwarf2_gen_line_info() would bail without doing anything when it
	finds the line number unchanged from what it saw last.

2022-03-23  Jan Beulich  <jbeulich@suse.com>

	ELF32: don't silently truncate relocation addends
	At least x86-64's x32 sub-mode and RISC-V's 32-bit mode calculate
	addends as 64-bit values, but store them in signed 32-bit fields when
	generating the file without encountering any earlier error. When the
	relocated field is a 64-bit one, the value resulting after processing
	the relocation record when linking (or the latest when loading) may
	thus be wrong due to the truncation.

	With the code change in place, one x32 testcase actually triggers the
	new diagnostic. That one case of too large a (negative) addend is being
	adjusted alongside the addition of a new testcase to actually trigger
	the new error. (Note that due to internal BFD behavior the relocation in
	.data doesn't get processed anymore after the errors in .text.)

	Note that in principle it is possible to express 64-bit relocations in
	ELF32, but this would require .rel relocations, i.e. with the addend
	stored in the 64-bit field being relocated. But I guess it would be a
	lot of effort for little gain to actually support this.

2022-03-23  Jan Beulich  <jbeulich@suse.com>

	gas: retain whitespace between strings
	Macro arguments may be separated by commas or just whitespace. Macro
	arguments may also be quoted (where one level of quotes is removed in
	the course of determining the values for the respective formal
	parameters). Furthermore this quote removal knows _two_ somewhat odd
	escaping mechanisms: One, apparently in existence forever, is that a
	pair of quotes counts as the escaping of a quote, with the pair being
	transformed to a single quote in the course of quote removal. The other
	(introduced by c06ae4f232e6) looks more usual on the surface in that it
	deals with \" sequences, but it _retains_ the escaping \. Hence only the
	former mechanism is suitable when the value to be used by the macro body
	is to contain a quote. Yet this results in ambiguity of what "a""b" is
	intended to mean; elsewhere (e.g. for .ascii) it represents two
	successive string literals. However, in any event is the above different
	from "a" "b": I don't think this can be viewed the same as "a""b" when
	processing macro arguments.

	Change the scrubber to retain such whitespace, by making the processing
	of strings more similar to that of symbols. And indeed this appears to
	make sense when taking into account that for quite a while gas has been
	supporting quoted symbol names.

	Taking a more general view, however, the change doesn't go quite far
	enough. There are further cases where significant whitespace is removed
	by the scrubber. The new testcase enumerates a few in its ".if 0"
	section. I'm afraid the only way that I see to deal with this would be
	to significantly simplify the scrubber, such that it wouldn't do much
	more than collapse sequences of unquoted whitespace into a single blank.
	To be honest problems in this area aren't really surprising when seeing
	that there's hardly any checking of .macro use throughout the testsuite
	(and in particular in the [relatively] generic tests under all/).

2022-03-23  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	Only .so files are used in libcollector. Remove the other files.
		* libcollector/Makefile.am (install-data-local): Remove the *.la
		and *.a libraries.
		* libcollector/Makefile.in: Regenerate.

2022-03-23  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: testsuite: use gdb_attach to fix jit-elf.exp
	If /proc/sys/kernel/yama/ptrace_scope is 1, when execute the following
	command without superuser:

	  make check-gdb TESTS="gdb.base/jit-elf.exp"

	we can see the following messages in gdb/testsuite/gdb.log:

	  (gdb) attach 1650108
	  Attaching to program: /home/yangtiezhu/build/gdb/testsuite/outputs/gdb.base/jit-elf/jit-elf-main, process 1650108
	  ptrace: Operation not permitted.
	  (gdb) FAIL: gdb.base/jit-elf.exp: attach: one_jit_test-2: break here 1: attach

	use gdb_attach to fix the above issue, at the same time, the clean_reattach
	proc should return a value to indicate whether it worked, and the callers
	should return early as well on failure.

2022-03-23  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: testsuite: use gdb_attach to fix attach-pie-noexec.exp
	If /proc/sys/kernel/yama/ptrace_scope is 1, when execute the following
	command without superuser:

	  make check-gdb TESTS="gdb.base/attach-pie-noexec.exp"

	we can see the following messages in gdb/testsuite/gdb.log:

	  (gdb) attach 6500
	  Attaching to process 6500
	  ptrace: Operation not permitted.
	  (gdb) PASS: gdb.base/attach-pie-noexec.exp: attach

	It is obviously wrong, the expected result should be UNSUPPORTED in such
	a case.

	With this patch, we can see "Operation not permitted" in the log info,
	and then we can do the following processes to test:
	(1) set ptrace_scope as 0
	    $ echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
	    $ make check-gdb TESTS="gdb.base/attach-pie-noexec.exp"
	(2) use sudo
	    $ sudo make check-gdb TESTS="gdb.base/attach-pie-noexec.exp"

2022-03-23  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: testsuite: add new gdb_attach to check "attach" command
	This commit adds new gdb_attach to centralize the failure checking of
	"attach" command. Return 0 if attach failed, otherwise return 1.

2022-03-23  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: testsuite: remove attach test from can_spawn_for_attach
	As Pedro Alves said, caching procs should not issue pass/fail [1],
	this commit removes attach test from can_spawn_for_attach, at the
	same time, use "verbose -log" instead of "unsupported" to get a
	trace about why a test run doesn't support spawning for attach.

	[1] https://sourceware.org/pipermail/gdb-patches/2022-March/186311.html

2022-03-23  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-22  John Baldwin  <jhb@FreeBSD.org>

	Add support for hardware breakpoints/watchpoints on FreeBSD/Aarch64.
	This shares aarch64-nat.c and nat/aarch64-hw-point.c with the Linux
	native target.  Since FreeBSD writes all of the debug registers in one
	ptrace op, use an unordered_set<> to track the "dirty" state for
	threads rather than bitmasks of modified registers.

	fbsd-nat: Add a low_prepare_to_resume virtual method.
	This method can be overridden by architecture-specific targets to
	perform additional work before a thread is resumed.

2022-03-22  John Baldwin  <jhb@FreeBSD.org>

	fbsd-nat: Add a low_delete_thread virtual method.
	This method can be overridden by architecture-specific targets to
	perform additional work when a thread is deleted.

	Note that this method is only invoked on systems supporting LWP
	events, but the pending use case (aarch64 debug registers) is not
	supported on older kernels that do not support LWP events.

2022-03-22  John Baldwin  <jhb@FreeBSD.org>

	fbsd-nat: Add helper routine to fetch siginfo_t for a ptid.

2022-03-22  John Baldwin  <jhb@FreeBSD.org>

	aarch64: Add an aarch64_nat_target mixin class.
	This class includes platform-independent target methods for hardware
	breakpoints and watchpoints using routines from
	nat/aarch64-hw-point.c.

	stopped_data_address is not platform-independent since the FAR
	register holding the address for a breakpoint hit must be fetched in a
	platform-specific manner.  However, aarch64_stopped_data_address is
	provided as a helper routine which performs platform-independent
	validation given the value of the FAR register.

	For tracking the per-process debug register mirror state, use an
	unordered_map indexed by pid as recently adopted in x86-nat.c rather
	than a manual linked-list.

2022-03-22  John Baldwin  <jhb@FreeBSD.org>

	nat: Split out platform-independent aarch64 debug register support.
	Move non-Linux-specific support for hardware break/watchpoints from
	nat/aarch64-linux-hw-point.c to nat/aarch64-hw-point.c.  Changes
	beyond a simple split of the code are:

	- aarch64_linux_region_ok_for_watchpoint and
	  aarch64_linux_any_set_debug_regs_state renamed to drop linux_ as
	  they are not platform specific.

	- Platforms must implement the aarch64_notify_debug_reg_change
	  function which is invoked from the platform-independent code when a
	  debug register changes for a given debug register state.  This does
	  not use the indirection of a 'low' structure as is done for x86.

	- The handling for kernel_supports_any_contiguous_range is not
	  pristine.  For non-Linux it is simply defined to true.  Some uses of
	  this could perhaps be implemented as new 'low' routines for the
	  various places that check it instead?

	- Pass down ptid into aarch64_handle_breakpoint and
	  aarch64_handle_watchpoint rather than using current_lwp_ptid which
	  is only defined on Linux.  In addition, pass the ptid on to
	  aarch64_notify_debug_reg_change instead of the unused state
	  argument.

2022-03-22  John Baldwin  <jhb@FreeBSD.org>

	x86-fbsd-nat: Copy debug register state on fork.
	Use the FreeBSD native target low_new_fork hook to copy the
	per-process debug state from the parent to the child on fork.

	fbsd-nat: Add a low_new_fork virtual method.
	This method can be overridden by architecture-specific targets to
	perform additional work when a new child process is forked.

2022-03-22  John Baldwin  <jhb@FreeBSD.org>

	Add an x86_fbsd_nat_target mixin class for FreeBSD x86 native targets.
	This class implements debug register support common between the i386
	and amd64 native targets.

	While here, remove #ifdef's for HAVE_PT_GETDBREGS in FreeBSD-specific
	code.  The ptrace request has been present on FreeBSD x86
	architectures since 4.0 (released in March 2000).  The last FreeBSD
	release without this support is 3.5 released in June 2000.

2022-03-22  John Baldwin  <jhb@FreeBSD.org>

	x86-nat: Add x86_lookup_debug_reg_state.
	This function returns nullptr if debug register state does not yet
	exist for a given process rather than creating new state.

	x86-nat: Use an unordered_map to store per-pid debug reg state.
	This replaces a manual linked list which used O(n) lookup and removal.

	Remove USE_SIGTRAP_SIGINFO condition for FreeBSD/x86 debug regs support.
	For BSD x86 targets, stopped_by_hw_breakpoint doesn't check siginfo_t
	but inspects the DR6 register directly via PT_GETDBREGS.

2022-03-22  Tom Tromey  <tom@tromey.com>

	Remove two unused variables
	I found a couple of spots that declare a symtab_and_line but don't
	actually use it.  I think this probably isn't detected as unused
	because it has a constructor.

2022-03-22  Steiner H Gunderson  <steinar+sourceware@gunderson.no>

	Fix return code in _bfd_dwarf2_find_nearest_line().
		* dwarf2.c (_bfd_dwarf2_find_nearest_line): if a function name is
		found, but no line number info, then return a result of 2.

2022-03-22  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb/python: add gdb.format_address function
	Add a new function, gdb.format_address, which is a wrapper around
	GDB's print_address function.

	This method takes an address, and returns a string with the format:

	  ADDRESS <SYMBOL+OFFSET>

	Where, ADDRESS is the original address, formatted as hexadecimal,
	SYMBOL is a symbol with an address lower than ADDRESS, and OFFSET is
	the offset from SYMBOL to ADDRESS in decimal.

	If there's no SYMBOL suitably close to ADDRESS then the
	<SYMBOL+OFFSET> part is not included.

	This is useful if a user wants to write a Python script that
	pretty-prints addresses, the user no longer needs to do manual symbol
	lookup, or worry about correctly formatting addresses.

	Additionally, there are some settings that effect how GDB picks
	SYMBOL, and whether the file name and line number should be included
	with the SYMBOL name, the gdb.format_address function ensures that the
	users Python script also benefits from these settings.

	The gdb.format_address by default selects SYMBOL from the current
	inferiors program space, and address is formatted using the
	architecture for the current inferior.  However, a user can also
	explicitly pass a program space and architecture like this:

	  gdb.format_address(ADDRESS, PROGRAM_SPACE, ARCHITECTURE)

	In order to format an address for a different inferior.

	Notes on the implementation:

	In py-arch.c I extended arch_object_to_gdbarch to add an assertion for
	the type of the PyObject being worked on.  Prior to this commit all
	uses of arch_object_to_gdbarch were guaranteed to pass this function a
	gdb.Architecture object, but, with this commit, this might not be the
	case.

	So, with this commit I've made it a requirement that the PyObject be a
	gdb.Architecture, and this is checked with the assert.  And in order
	that callers from other files can check if they have a
	gdb.Architecture object, I've added the new function
	gdbpy_is_architecture.

	In py-progspace.c I've added two new function, the first
	progspace_object_to_program_space, converts a PyObject of type
	gdb.Progspace to the associated program_space pointer, and
	gdbpy_is_progspace checks if a PyObject is a gdb.Progspace or not.

2022-03-22  Luis Machado  <luis.machado@arm.com>

	Fix some stale header names from dwarf files
	Some of these references were not updated when they were moved to a separate
	directory.

2022-03-22  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	Install gprofng libraries under $(pkglibdir)
	gprofng/ChangeLog
	2022-03-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	        PR gprofng/28972
		* gprofng/libcollector/Makefile.am: Rename lib_LTLIBRARIES to
		pkglib_LTLIBRARIES. Add install-data-local.
		* gprofng/src/Makefile.am: Likewise.
		* gprofng/src/envsets.cc (putenv_libcollector_ld_misc): New location of
		the gprofng libraries.
		* gprofng/configure.ac: Removed an unused GPROFNG_LIBDIR.
		* gprofng/Makefile.am: Removed an unused GPROFNG_LIBDIR.  Add
		install-data-local.
		* gprofng/configure: Regenerate.
		* gprofng/Makefile.in: Likewise.
		* gprofng/doc/Makefile.in: Likewise.
		* gprofng/gp-display-htmllibcollector/Makefile.in: Likewise.
		* gprofng/libcollector/Makefile.in: Likewise.
		* gprofng/src/Makefile.in: Likewise.

2022-03-22  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-21  Roland McGrath  <mcgrathr@google.com>

	gdb: Add missing #include in solib.h
	The gdb_bfd_ref_ptr type is used in solib.h declarations.

2022-03-21  Aaron Merey  <amerey@redhat.com>

	PR gdb/27570: missing support for debuginfod in core_target::build_file_mappings
	Add debuginfod support to core_target::build_file_mappings and
	locate_exec_from_corefile_build_id to enable the downloading of
	missing executables and shared libraries referenced in core files.

	Also add debuginfod support to solib_map_sections so that previously
	downloaded shared libraries can be retrieved from the local debuginfod
	cache.

	When core file shared libraries are found locally, verify that their
	build-ids match the corresponding build-ids found in the core file.
	If there is a mismatch, attempt to query debuginfod for the correct
	build and print a warning if unsuccessful:

	  warning: Build-id of /lib64/libc.so.6 does not match core file.

	Also disable debuginfod when gcore invokes gdb.  Debuginfo is not
	needed for core file generation so debuginfod queries will slow down
	gcore unnecessarily.

2022-03-21  Aaron Merey  <amerey@redhat.com>

	gdb: Add soname to build-id mapping for core files
	Since commit aa2d5a422 gdb has been able to read executable and shared
	library build-ids within core files.

	Expand this functionality so that each core file bfd maintains a map of
	soname to build-id for each shared library referenced in the core file.

	This feature may be used to verify that gdb has found the correct shared
	libraries for core files and to facilitate downloading shared libaries via
	debuginfod.

2022-03-21  Pedro Alves  <pedro@palves.net>

	Watchpoint followed by catchpoint misreports watchpoint (PR gdb/28621)
	If GDB reports a watchpoint hit, and then the next event is not
	TARGET_WAITKIND_STOPPED, but instead some event for which there's a
	catchpoint, such that GDB calls bpstat_stop_status, GDB mistakenly
	thinks the watchpoint triggered.  Vis, using foll-fork.c:

	  (gdb) awatch v
	  Hardware access (read/write) watchpoint 2: v
	  (gdb) catch fork
	  Catchpoint 3 (fork)
	  (gdb) c
	  Continuing.

	  Hardware access (read/write) watchpoint 2: v

	  Old value = 0
	  New value = 5
	  main () at gdb.base/foll-fork.c:16
	  16        pid = fork ();
	  (gdb)
	  Continuing.

	  Hardware access (read/write) watchpoint 2: v      <<<<
	                                                    <<<< these lines are spurious
	  Value = 5                                         <<<<

	  Catchpoint 3 (forked process 1712369), arch_fork (ctid=0x7ffff7fa4810) at arch-fork.h:49
	  49      arch-fork.h: No such file or directory.
	  (gdb)

	The problem is that when we handle the fork event, nothing called
	watchpoints_triggered before calling bpstat_stop_status.  Thus, each
	watchpoint's watchpoint_triggered field was still set to
	watch_triggered_yes from the previous (real) watchpoint stop.
	watchpoint_triggered is only current called in the handle_signal_stop
	path, when handling TARGET_WAITKIND_STOPPED.

	This fixes it by adding watchpoint_triggered calls in the other events
	paths that call bpstat_stop_status.  But instead of adding them
	explicitly, it adds a new function bpstat_stop_status_nowatch that
	wraps bpstat_stop_status and calls watchpoint_triggered, and then
	replaces most calls to bpstat_stop_status with calls to
	bpstat_stop_status_nowatch.

	This required constifying watchpoints_triggered.

	New test included, which fails without the fix.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28621

	Change-Id: I282b38c2eee428d25319af3bc842f9feafed461c

2022-03-21  Pedro Alves  <pedro@palves.net>

	gdbserver: Fixup previous patch
	The previous prepare_resume_reply change missed updating the 'buf'
	reference that overwrites the 'T', so if 'buf' was advanced, we'd
	still overwrite the wrong character.  This fixes it.

	Change-Id: Ia8ce433366b85af4e268c1c49e7b447da3130a4d

2022-03-21  Pedro Alves  <pedro@palves.net>

	gdbserver: Fix incorrect assertion
	While playing with adding a new event kind, I noticed that
	prepare_resume_reply TARGET_WAITKIND_FORKED, etc. advance 'buf', so if
	we force-disable the T packet, we'd fail the *buf == 'T' assertion.

	Fix it by tweaking the assertion to always look at the beginning of
	the buffer.

	Change-Id: I8c38e32353db115edcde418b3b1e8ba12343c22b

2022-03-21  Simon Marchi  <simon.marchi@efficios.com>

	gdb: re-generate config.in
	I'm getting this diff when running `autoreconf -vf`.

	Change-Id: Id5f009d0f0481935c1ee9df5332cb4bf45fbd32d

2022-03-21  Andrew Burgess  <aburgess@redhat.com>

	gdb/x86: handle stap probe arguments in xmm registers
	On x86 machines with xmm register, and with recent versions of
	systemtap (and gcc?), it can occur that stap probe arguments will be
	placed into xmm registers.

	I notice this happening on a current Fedora Rawhide install with the
	following package versions installed:

	  $ rpm -q glibc systemtap gcc
	  glibc-2.35.9000-10.fc37.x86_64
	  systemtap-4.7~pre16468670g9f253544-1.fc37.x86_64
	  gcc-12.0.1-0.12.fc37.x86_64

	If I check the probe data in libc, I see this:

	  $ readelf -n /lib64/libc.so.6
	  ...
	  stapsdt              0x0000004d       NT_STAPSDT (SystemTap probe descriptors)
	    Provider: libc
	    Name: pthread_start
	    Location: 0x0000000000090ac3, Base: 0x00000000001c65c4, Semaphore: 0x0000000000000000
	    Arguments: 8@%xmm1 8@1600(%rbx) 8@1608(%rbx)
	  stapsdt              0x00000050       NT_STAPSDT (SystemTap probe descriptors)
	    Provider: libc
	    Name: pthread_create
	    Location: 0x00000000000912f1, Base: 0x00000000001c65c4, Semaphore: 0x0000000000000000
	    Arguments: 8@%xmm1 8@%r13 8@8(%rsp) 8@16(%rsp)
	  ...

	Notice that for both of these probes, the first argument is a uint64_t
	stored in the xmm1 register.

	Unfortunately, if I try to use this probe within GDB, then I can't
	view the first argument.  Here's an example session:

	  $ gdb $(which gdb)
	  (gdb) start
	  ...
	  (gdb) info probes stap  libc pthread_create
	  ...
	  (gdb) break *0x00007ffff729e2f1       # Use address of probe.
	  (gdb) continue
	  ...
	  (gdb) p $_probe_arg0
	  Invalid cast.

	What's going wrong?  If I re-run my session, but this time use 'set
	debug stap-expression 1', this is what I see:

	  (gdb) set debug stap-expression 1
	  (gdb) p $_probe_arg0
	  Operation: UNOP_CAST
	   Operation: OP_REGISTER
	    String: xmm1
	   Type: uint64_t
	  Operation: UNOP_CAST
	   Operation: OP_REGISTER
	    String: r13
	   Type: uint64_t
	  Operation: UNOP_CAST
	   Operation: UNOP_IND
	    Operation: UNOP_CAST
	     Operation: BINOP_ADD
	      Operation: OP_LONG
	       Type: long
	       Constant: 0x0000000000000008
	      Operation: OP_REGISTER
	       String: rsp
	     Type: uint64_t *
	   Type: uint64_t
	  Operation: UNOP_CAST
	   Operation: UNOP_IND
	    Operation: UNOP_CAST
	     Operation: BINOP_ADD
	      Operation: OP_LONG
	       Type: long
	       Constant: 0x0000000000000010
	      Operation: OP_REGISTER
	       String: rsp
	     Type: uint64_t *
	   Type: uint64_t
	  Invalid cast.
	  (gdb)

	The important bit is this:

	  Operation: UNOP_CAST
	   Operation: OP_REGISTER
	    String: xmm1
	   Type: uint64_t

	Which is where we cast the xmm1 register to uint64_t.  And the final
	piece of the puzzle is:

	  (gdb) ptype $xmm1
	  type = union vec128 {
	      v8bf16 v8_bfloat16;
	      v4f v4_float;
	      v2d v2_double;
	      v16i8 v16_int8;
	      v8i16 v8_int16;
	      v4i32 v4_int32;
	      v2i64 v2_int64;
	      uint128_t uint128;
	  }

	So, we are attempting to cast a union type to a scalar type, which is
	not supporting in C/C++, and as a consequence GDB's expression
	evaluator throws an error when we attempt to do this.

	The first approach I considered for solving this problem was to try
	and make use of gdbarch_stap_adjust_register.  We already have a
	gdbarch method (gdbarch_stap_adjust_register) that allows us to tweak
	the name of the register that we access.  Currently only x86
	architectures use this to transform things like ax to eax in some
	cases.

	I wondered, what if we change gdbarch_stap_adjust_register to do more
	than just change the register names?  What if this method instead
	became gdbarch_stap_read_register.  This new method would return a
	operation_up, and would take the register name, and the type we are
	trying to read from the register, and return the operation that
	actually reads the register.

	The default implementation of this method would just use
	user_reg_map_name_to_regnum, and then create a register_operation,
	like we already do in stap_parse_register_operand.  But, for x86
	architectures this method would fist possibly adjust the register
	name, then do the default action to read the register.  Finally, for
	x86 this method would spot when we were accessing an xmm register,
	and, based on the type being pulled from the register, would extract
	the correct field from the union.

	The benefit of this approach is that it would work with the expression
	types that GDB currently supports.  The draw back would be that this
	approach would not be very generic.  We'd need code to handle each
	sub-field size with an xmm register.  If other architectures started
	using vector registers for probe arguments, those architectures would
	have to create their own gdbarch_stap_read_register method.  And
	finally, the type of the xmm registers comes from the type defined in
	the target description, there's a risk that GDB might end up
	hard-coding the names of type sub-fields, then if a target uses a
	different target description, with different field names for xmm
	registers, the stap probes would stop working.

	And so, based on all the above draw backs, I rejected this first
	approach.

	My second plan involves adding a new expression type to GDB called
	unop_extract_operation.  This new expression takes a value and a type,
	during evaluation the value contents are fetched, and then a new value
	is extracted from the value contents (based on type).  This is similar
	to the following C expression:

	  result_value = *((output_type *) &input_value);

	Obviously we can't actually build this expression in this case, as the
	input_value is in a register, but hopefully the above makes it clearer
	what I'm trying to do.

	The benefit of the new expression approach is that this code can be
	shared across all architectures, and it doesn't care about sub-field
	names within the union type.

	The draw-backs that I see are potential future problems if arguments
	are not stored within the least significant bytes of the register.
	However if/when that becomes an issue we can adapt the
	gdbarch_stap_read_register approach to allow architectures to control
	how a value is extracted.

	For testing, I've extended the existing gdb.base/stap-probe.exp test
	to include a function that tries to force an argument into an xmm
	register.  Obviously, that will only work on a x86 target, so I've
	guarded the new function with an appropriate GCC define.  In the exp
	script we use readelf to check if the probe exists, and is using the
	xmm register.

	If the probe doesn't exist then the associated tests are skipped.

	If the probe exists, put isn't using the xmm register (which will
	depend on systemtap/gcc versions), then again, the tests are skipped.

	Otherwise, we can run the test.  I think the cost of running readelf
	is pretty low, so I don't feel too bad making all the non-xmm targets
	running this step.

	I found that on a Fedora 35 install, with these packages installed, I
	was able to run this test and have the probe argument be placed in an
	xmm register:

	  $ rpm -q systemtap gcc glibc
	  systemtap-4.6-4.fc35.x86_64
	  gcc-11.2.1-9.fc35.x86_64
	  glibc-2.34-7.fc35.x86_64

	Finally, as this patch adds a new operation type, then I need to
	consider how to generate an agent expression for the new operation
	type.

	I have kicked the can down the road a bit on this.  In the function
	stap_parse_register_operand, I only create a unop_extract_operation in
	the case where the register type is non-scalar, this means that in
	most cases I don't need to worry about generating an agent expression
	at all.

	In the xmm register case, when an unop_extract_operation will be
	created, I have sketched out how the agent expression could be
	handled, however, this code is currently not reached.  When we try to
	generate the agent expression to place the xmm register on the stack,
	GDB hits this error:

	  (gdb) trace -probe-stap test:xmmreg
	  Tracepoint 1 at 0x401166
	  (gdb) actions
	  Enter actions for tracepoint 1, one per line.
	  End with a line saying just "end".
	  >collect $_probe_arg0
	  Value not scalar: cannot be an rvalue.

	This is because GDB doesn't currently support placing non-scalar types
	on the agent expression evaluation stack.  Solving this is clearly
	related to the original problem, but feels a bit like a second
	problem.  I'd like to get feedback on whether my approach to solving
	the original problem is acceptable or not before I start looking at
	how to handle xmm registers within agent expressions.

2022-03-21  Steiner H Gunderson  <steinar+sourceware@gunderson.no>

	Reduce O(n2) performance overhead when parsing DWARF unit information.
		PR 28978
		* dwarf2.c (scan_unit_for_symbols): When performing second pass,
		check to see if the function or variable being processed is the
		same as the previous one.

2022-03-21  Jan Beulich  <jbeulich@suse.com>

	x86: don't suppress overflow diagnostics in x32 mode
	Unlike in 64-bit mode, where values wrap at the 64-bit boundary anyway,
	there's no wrapping at the 32-bit boundary here, and hence overflow
	detection shouldn't be suppressed just because rela relocations are
	going to be used.

	The extra check against NO_RELOC is actually a result of an ilp32 test
	otherwise failing. But thinking about it, reporting overflows for
	not-really-relocations (typically because of earlier errors) makes
	little sense in general. Perhaps this should even be extended to non-
	64-bit modes.

2022-03-21  Simon Marchi  <simon.marchi@efficios.com>

	gdb/testsuite: reformat gdb.python/pretty-print-call-by-hand.py
	Run black on the file.

	Change-Id: Ifb576137fb7158a0227173f61c1202f0695b3685

2022-03-21  Bruno Larsen  <blarsen@redhat.com>

	[gdb/testsuite] test a function call by hand from pretty printer
	The test case added here is testing the bug gdb/28856, where calling a
	function by hand from a pretty printer makes GDB crash. There are 6
	mechanisms to trigger this crash in the current test, using the commands
	backtrace, up, down, finish, step and continue. Since the failure happens
	because of use-after-free (more details below) the tests will always
	have a chance of passing through sheer luck, but anecdotally they seem
	to fail all of the time.

	The reason GDB is crashing is a use-after-free problem. The above
	mentioned functions save a pointer to the current frame's information,
	then calls the pretty printer, and uses the saved pointer for different
	reasons, depending on the function. The issue happens because
	call_function_by_hand needs to reset the obstack to get the current
	frame, invalidating the saved pointer.

2022-03-21  Pedro Alves  <pedro@palves.net>

	gdb/testsuite: Installed-GDB testing & data-directory
	In testsuite/README, we suggest that you can run the testsuite against
	some other GDB binary by using:

	    make check RUNTESTFLAGS=GDB=/usr/bin/gdb

	However, that example isn't fully correct, because with that command
	line, the testsuite will still pass

	  -data-directory=[pwd]/../data-directory

	to /usr/bin/gdb, like e.g.:

	  ...
	  builtin_spawn /usr/bin/gdb -nw -nx -data-directory /home/pedro/gdb/build/gdb/testsuite/../data-directory -iex set height 0 -iex set width 0
	  ...

	while if you're testing an installed GDB (the system GDB being the
	most usual scenario), then you should normally let it use its own
	configured directory, not the just-built GDB's data directory.

	This commit improves the status quo with the following two changes:

	 - if the user specifies GDB on the command line, then by default,
	   don't start GDB with the -data-directory command line option.
	   I.e., let the tested GDB use its own configured data directory.

	 - let the user override the data directory, via a new
	   GDB_DATA_DIRECTORY global.  This replaces the existing
	   BUILD_DATA_DIRECTORY variable in testsuite/lib/gdb.exp, which
	   wasn't overridable, and was a bit misnamed for the new purpose.

	So after this, the following commands I believe behave intuitively:

	 # Test the non-installed GDB in some build dir:

	    make check \
	      RUNTESTFLAGS="GDB=/path/to/other/build/gdb \
	                    GDB_DATA_DIRECTORY=/path/to/other/build/gdb/data-directory"

	 # Test the GDB installed in some prefix:

	    make check \
	      RUNTESTFLAGS="GDB=/opt/gdb/bin/gdb"

	 # Test the built GDB with some alternative data directory, e.g., the
	   system GDB's data directory:

	    make check \
	      RUNTESTFLAGS="GDB_DATA_DIRECTORY=/usr/share/gdb"

	Change-Id: Icdc21c85219155d9564a9900961997e6624b78fb

2022-03-21  Nick Clifton  <nickc@redhat.com>

	z80 assembler: Fix new unexpected overflow warning in v2.37
		PR 28791
		* config/tc-z80.c (emit_data_val): Do not warn about overlarge
		constants generated by bit manipulation operators.
		* testsuite/gas/z80/pr28791.s: New test source file.
		* testsuite/gas/z80/pr28791.d: New test driver file.

2022-03-21  Andreas Schwab  <schwab@linux-m68k.org>

	Add support for readline 8.2
	In readline 8.2 the type of rl_completer_word_break_characters changed to
	include const.

2022-03-21  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-20  Andreas Schwab  <schwab@linux-m68k.org>

	RISC-V: Fix misplaced @end table
	Move the csr-check and arch items inside the table for the .option directive.

2022-03-20  Alan Modra  <amodra@gmail.com>

	PR28979, internal error in demand_empty_rest_of_line
	The change in read_a_source_file prevents the particular testcase in
	the PR from triggering the assertion in demand_empty_rest_of_line.
	I've also removed the assertion.  Nothing much goes wrong with gas if
	something else triggers it, so it's not worthy of an abort.

	I've also changed my previous patch to ignore_rest_of_line to allow
	that function to increment input_line_pointer past buffer_limit, like
	demand_empty_rest_of_line:  The two functions ought to behave the
	same in that respect.  Finally, demand_empty_rest_of_line gets a
	little hardening to prevent accesses past buffer_limit plus one.

		PR 28979
		* read.c (read_a_source_file): Calculate known size for sbuf
		rather than calling strlen.
		(demand_empty_rest_of_line): Remove "know" check.  Expand comment.
		Don't dereference input_line_pointer when past buffer_limit.
		(ignore_rest_of_line): Allow input_line_pointer to increment to
		buffer_limit plus one.  Expand comment.

2022-03-20  Joel Brobecker  <brobecker@adacore.com>

	Update gdb/NEWS after GDB 12 branch creation.
	This commit a new section for the next release branch, and renames
	the section of the current branch, now that it has been cut.

2022-03-20  Joel Brobecker  <brobecker@adacore.com>

	Bump version to 13.0.50.DATE-git.
	Now that the GDB 12 branch has been created,
	this commit bumps the version number in gdb/version.in to
	13.0.50.DATE-git

	For the record, the GDB 12 branch was created
	from commit 2be64de603f8b3ae359d2d3fbf5db0e79869f32b.

	Also, as a result of the version bump, the following changes
	have been made in gdb/testsuite:

		* gdb.base/default.exp: Change $_gdb_major to 13.

2022-03-20  liuzhensong  <liuzhensong@loongson.cn>

	ld:LoongArch: Add test cases to adapt to LoongArch32 and LoongArch64
	  ld/testsuite/ld-loongarch-elf

	  *  ld-loongarch-elf.exp:  Test LoongArch32 and LoongArch64 testcases respectively.
	  *  jmp_op.d: Fix bug in test LoongArch32.
	  *  disas-jirl-32.d: New test case for LoongArch32.
	  *  disas-jirl-32.s: New test case for LoongArch32.
	  *  disas-jirl.d: Skip test case LoongArch32.
	  *  macro_op_32.d: New test case for LoongArch32.
	  *  macro_op_32.s: New test case for LoongArch32.
	  *  macro_op.d: Skip test case LoongArch32.

2022-03-20  liuzhensong  <liuzhensong@loongson.cn>

	gas:LoongArch: Fix "make check" pr21884 fail in LoongArch32.
	  gas/config/
	    * tc-loongarch.c: Add function to select target mach.
	    * tc-loongarch.h: Define macro TARGET_MACH.

	ld: loongarch: Skip unsupport test cases.
	  ld/testsuite/ld-elf/
	    * eh5.d		Skip loongarch64 target.
	    * pr21884.d		Skip loongarch* targets.
	    * pr26936.d		Skip loongarch* targets.

2022-03-20  liuzhensong  <liuzhensong@loongson.cn>

	LoongArch: Fix LD check fails.
	  Some test cases about ifunc.

	  bfd/
	    * elfnn-loongarch.c
	    * elfxx-loongarch.h

	   === ld Summary ===
	  of expected passes             1430
	  of expected failures           11
	  of untested testcases          1
	  of unsupported tests           154

2022-03-20  liuzhensong  <liuzhensong@loongson.cn>

	LoongArch: Update ABI eflag in elf header.
	  Update LoongArch ABI eflag in elf header.
	    ilp32s  0x5
	    ilp32f  0x6
	    ilp32d  0x7
	    lp64s   0x1
	    lp64f   0x2
	    lp64d   0x3

	  bfd/
	    * elfnn-loongarch.c Check object flags while ld.

	  gas/
	    * tc-loongarch.c Write eflag to elf header.

	  include/elf
	        * loongarch.h Define ABI number.

2022-03-20  liuzhensong  <liuzhensong@loongson.cn>

	gas:LoongArch: Fix wrong line number in .debug_line
	  The dwarf2_emit_insn() can create debuginfo of line. But it is called
	  too late in append_fixp_and_insn. It causes extra offs when debuginfo
	  of line sets address.

	  gas/config/
	    * tc-loongarch.c

2022-03-20  liuzhensong  <liuzhensong@loongson.cn>

	gas:LoongArch: Fix segment error in compilation due to too long symbol name.
	  Change "char buffer[8192];" into "char *buffer =
	  (char *) malloc(1000 +  6 * len_str);" in function
	  loongarch_expand_macro_with_format_map.

	  gas/
	    * config/tc-loongarch.c

	  include/
	    * opcode/loongarch.h

	  opcodes/
	    * loongarch-coder.c

2022-03-20  liuzhensong  <liuzhensong@loongson.cn>

	LoongArch: Use functions instead of magic numbers.
	  Replace the magic numbers in gas(tc-loongarch.c) and
	  bfd(elfnn-loongarch.c) with the functions defined in
	  the howto table(elfxx-loongarch.c).

	  gas/
	    * config/tc-loongarch.c: use functions.

	  bfd/
	    * elfnn-loongarch.c: use functions.
	    * elfxx-loongarch.c: define functions.
	    * elfxx-loongarch.h

2022-03-20  liuzhensong  <liuzhensong@loongson.cn>

	ubsan: loongarch : signed integer shift overflow.
	   opcodes/
		* loongarch-coder.c :
		  int32_t ret = 0;
		  ret <<= sizeof (ret) * 8 - len;
		  ret >>= sizeof (ret) * 8 - len;
		  ...
		  Avoid ubsan warning.

2022-03-20  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-19  Simon Marchi  <simon.marchi@efficios.com>

	gdb/python: remove gdb._mi_commands dict
	The motivation for this patch is the fact that py-micmd.c doesn't build
	with Python 2, due to PyDict_GetItemWithError being a Python 3-only
	function:

	      CXX    python/py-micmd.o
	    /home/smarchi/src/binutils-gdb/gdb/python/py-micmd.c: In function ‘int micmdpy_uninstall_command(micmdpy_object*)’:
	    /home/smarchi/src/binutils-gdb/gdb/python/py-micmd.c:430:20: error: ‘PyDict_GetItemWithError’ was not declared in this scope; did you mean ‘PyDict_GetItemString’?
	      430 |   PyObject *curr = PyDict_GetItemWithError (mi_cmd_dict.get (),
	          |                    ^~~~~~~~~~~~~~~~~~~~~~~
	          |                    PyDict_GetItemString

	A first solution to fix this would be to try to replace
	PyDict_GetItemWithError equivalent Python 2 code.  But I looked at why
	we are doing this in the first place: it is to maintain the
	`gdb._mi_commands` Python dictionary that we use as a `name ->
	gdb.MICommand object` map.  Since the `gdb._mi_commands` dictionary is
	never actually used in Python, it seems like a lot of trouble to use a
	Python object for this.

	My first idea was to replace it with a C++ map
	(std::unordered_map<std::string, gdbpy_ref<micmdpy_object>>).  While
	implementing this, I realized we don't really need this map at all.  The
	mi_command_py objects registered in the main MI command table can own
	their backing micmdpy_object (that's a gdb.MICommand, but seen from the
	C++ code).  To know whether an mi_command is an mi_command_py, we can
	use a dynamic cast.  Since there's one less data structure to maintain,
	there are less chances of messing things up.

	 - Change mi_command_py::m_pyobj to a gdbpy_ref, the mi_command_py is
	   now what keeps the MICommand alive.
	 - Set micmdpy_object::mi_command in the constructor of mi_command_py.
	   If mi_command_py manages setting/clearing that field in
	   swap_python_object, I think it makes sense that it also takes care of
	   setting it initially.
	 - Move a bunch of checks from micmdpy_install_command to
	   swap_python_object, and make them gdb_asserts.
	 - In micmdpy_install_command, start by doing an mi_cmd_lookup.  This is
	   needed to know whether there's a Python MI command already registered
	   with that name.  But we can already tell if there's a non-Python
	   command registered with that name.  Return an error if that happens,
	   rather than waiting for insert_mi_cmd_entry to fail.  Change the
	   error message to "name is already in use" rather than "may already be
	   in use", since it's more precise.

	I asked Andrew about the original intent of using a Python dictionary
	object to hold the command objects.  The reason was to make sure the
	objects get destroyed when the Python runtime gets finalized, not later.
	Holding the objects in global C++ data structures and not doing anything
	more means that the held Python objects will be decref'd after the
	Python interpreter has been finalized.  That's not desirable.  I tried
	it and it indeed segfaults.

	Handle this by adding a gdbpy_finalize_micommands function called in
	finalize_python.  This is the mirror of gdbpy_initialize_micommands
	called in do_start_initialization.  In there, delete all Python MI
	commands.  I think it makes sense to do it this way: if it was somehow
	possible to unload Python support from GDB in the middle of a session
	we'd want to unregister any Python MI command.  Otherwise, these MI
	commands would be backed with a stale PyObject or simply nothing.

	Delete tests that were related to `gdb._mi_commands`.

	Co-Authored-By: Andrew Burgess <aburgess@redhat.com>
	Change-Id: I060d5ebc7a096c67487998a8a4ca1e8e56f12cd3

2022-03-19  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-18  Pedro Alves  <pedro@palves.net>

	Fix crash with stepi, no debug info, and "set debug infrun 1"
	A stepi in a function without debug info with "set debug infrun 1"
	crashes GDB since commit c8353d682f69 (gdb/infrun: some extra infrun
	debug print statements), due to a reference to
	"tp->current_symtab->filename" when tp->current_symtab is null.

	This commit adds the missing null check.  The output in this case
	becomes:

	  [infrun] set_step_info: symtab = <null>, line = 0, step_frame_id = {stack=0x7fffffffd980,code=0x0000000000456c30,!special}, step_stack_frame_id = {stack=0x7fffffffd980,code=0x0000000000456c30,!special}

	Change-Id: I5171a9d222bc7e15b9dba2feaba7d55c7acd99f8

2022-03-18  Tom Tromey  <tromey@adacore.com>

	Implement gdbarch_stack_frame_destroyed_p for aarch64
	The internal AdaCore testsuite has a test that checks that an
	out-of-scope watchpoint is deleted.  This fails on some aarch64
	configurations, reporting an extra stop:

	    (gdb) continue
	    Continuing.

	    Thread 3 hit Watchpoint 2: result

	    Old value = 64
	    New value = 0
	    0x0000000040021648 in pck.get_val (seed=0, off_by_one=false) at [...]/pck.adb:13
	    13	   end Get_Val;

	I believe what is happening here is that the variable is stored at:

	    <efa>   DW_AT_location    : 2 byte block: 91 7c 	(DW_OP_fbreg: -4)

	and the extra stop is reported just before a return, when the ldp
	instruction is executed:

	   0x0000000040021644 <+204>:	ldp	x29, x30, [sp], #48
	   0x0000000040021648 <+208>:	ret

	This instruction modifies the frame base calculation, and so the test
	picks up whatever memory is pointed to in the callee frame.

	Implementing the gdbarch hook gdbarch_stack_frame_destroyed_p fixes
	this problem.

	As usual with this sort of patch, it has passed internal testing, but
	I don't have a good way to try it with dejagnu.  So, I don't know
	whether some existing test covers this.  I suspect there must be one,
	but it's also worth noting that this test passes for aarch64 in some
	configurations -- I don't know what causes one to fail and another to
	succeed.

2022-03-18  Nick Clifton  <nickc@redhat.com>

	Fix Build issues due to patch "gprofng: a new GNU profiler"
	  Find and fix more places where clock_gettime() and CLOCK_MONOTONIC_RAW are used.

2022-03-18  Simon Marchi  <simon.marchi@efficios.com>

	gdb: run black to format some Python files
	Seems like some leftovers from previous commits.

	Change-Id: I7155ccdf7a4fef83bcb3d60320252c3628efdb83

2022-03-18  Viorel Preoteasa  <viorel.preoteasa@gmail.com>

	Fix ld-arm bug in encoding of blx calls jumping from thumb to arm instructions
		PR 28924
		* elf32-arm.c (THM_MAX_FWD_BRANCH_OFFSET): Fix definition.
		(THM2_MAX_FWD_BRANCH_OFFSET): Likewise.

2022-03-18  Jan Beulich  <jbeulich@suse.com>

	x86: also fold remaining multi-vector-size shift insns
	By slightly relaxing the checking in operand_type_register_match() we
	can fold the vector shift insns with an XMM source as well. While
	strictly speaking an overlap in just one size (see the code comment) is
	not enough (both operands could have multiple sizes with just a single
	common one), this is good enough for all templates we have, or which
	could sensibly / usefully appear (within the scope of the present
	operand matching model).

	Tightening this a little would be possible, but would require broadcast
	related information to be passed into the function.

2022-03-18  Jan Beulich  <jbeulich@suse.com>

	x86: drop stray CheckRegSize from VEXTRACT{F,I}32X4
	They have only a single operand allowing multiple sizes, hence there are
	no pairs of operands to check for consistent size.

	x86: fold certain AVX2 templates into their AVX counterparts
	Like for AVX512VL we can make the handling of operand sizes a little
	more flexible to allow reducing the number of templates we have.

2022-03-18  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Cache management instructions
	This commit adds 'Zicbom' / 'Zicboz' instructions.

	bfd/ChangeLog:

		* elfxx-riscv.c (riscv_multi_subset_supports): Add handling for
		new instruction classes.

	include/ChangeLog:

		* opcode/riscv-opc.h (MATCH_CBO_CLEAN, MASK_CBO_CLEAN,
		MATCH_CBO_FLUSH, MASK_CBO_FLUSH, MATCH_CBO_INVAL,
		MASK_CBO_INVAL, MATCH_CBO_ZERO, MASK_CBO_ZERO): New macros.
		* opcode/riscv.h (enum riscv_insn_class): Add new instruction
		classes INSN_CLASS_ZICBOM and INSN_CLASS_ZICBOZ.

	opcodes/ChangeLog:

		* riscv-opc.c (riscv_opcodes): Add cache-block management
		instructions.

2022-03-18  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Prefetch hint instructions and operand set
	This commit adds 'Zicbop' hint instructions.

	bfd/ChangeLog:

		* elfxx-riscv.c (riscv_multi_subset_supports): Add handling for
		new instruction class.

	gas/ChangeLog:

		* config/tc-riscv.c (riscv_ip): Add handling for new operand
		type 'f' (32-byte aligned pseudo S-type immediate for prefetch
		hints).
		(validate_riscv_insn): Likewise.

	include/ChangeLog:

		* opcode/riscv-opc.h (MATCH_PREFETCH_I, MASK_PREFETCH_I,
		MATCH_PREFETCH_R, MASK_PREFETCH_R, MATCH_PREFETCH_W,
		MASK_PREFETCH_W): New macros.
		* opcode/riscv.h (enum riscv_insn_class): Add new instruction
		class INSN_CLASS_ZICBOP.

	opcodes/ChangeLog:

		* riscv-dis.c (print_insn_args): Add handling for new operand
		type.
		* riscv-opc.c (riscv_opcodes): Add prefetch hint instructions.

2022-03-18  Alan Modra  <amodra@gmail.com>

	PR28977 tc-i386.c internal error in parse_register
		PR 28977
		* config/tc-i386.c (parse_register): Handle X_op not O_register
		as for a non-reg_section symbol.  Simplify array bounds check.

2022-03-18  Alan Modra  <amodra@gmail.com>

	Tidy gas current_frame before exit
	Releases some obstack memory on an error path.

		* cond.c (cond_finish_check): Call cond_exit_macro.

2022-03-18  Alan Modra  <amodra@gmail.com>

	ubsan: logical_input_line signed integer overflow
	To avoid a completely useless fuzzing ubsan "bug" report, I decided to
	make logical_input_line unsigned.

		* input-scrub.c (logical_input_line): Make unsigned.
		(struct input_save): Here too.
		(input_scrub_reinit, input_scrub_close, bump_line_counters),
		(as_where): Adjust to suit.

2022-03-18  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-17  H.J. Lu  <hjl.tools@gmail.com>

	gprofng: Skip jsynprog with a broken javac
	On CET enabled Linux/x86-64 machines, one can get

	$ javac simple.java
	Error: dl failure on line 894
	Error: failed /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-6.fc35.x86_64/jre/lib/amd64/server/libjvm.so, because /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-6.fc35.x86_64/jre/lib/amd64/server/libjvm.so: rebuild shared object with SHSTK support enabled

	Set GPROFNG_BROKEN_JAVAC to "yes" only with a broken javac and skip the
	jsynprog test with a broken javac.

		PR gprofng/28965
		* Makefile.am (GPROFNG_BROKEN_JAVAC): New.
		(check-DEJAGNU): Pass GPROFNG_BROKEN_JAVAC to runtest.
		* configure.ac (GPROFNG_BROKEN_JAVAC): New AC_SUBST.  Set to yes
		with a broken javac.
		* Makefile.in: Regenerate.
		* configure: Likewise.
		* testsuite/gprofng.display/display.exp: Skip jsynprog with a
		broken javac.

2022-03-17  John Baldwin  <jhb@FreeBSD.org>

	Remove fall throughs in core_target::xfer_partial.
	The cases for TARGET_OBJECT_LIBRARIES and TARGET_OBJECT_LIBRARIES_AIX
	can try to fetch different data objects (such as
	TARGET_OBJECT_SIGNAL_INFO) if gdbarch methods for the requested data
	aren't present.  Return with TARGET_XFER_E_IO if the gdbarch method
	isn't present instead.

2022-03-17  Pedro Alves  <pedro@palves.net>

	gdb: Remove support for S+core
	GCC removed support for score back in 2014 already.  Back then, we
	basically agreed about removing it from GDB too, but it ended up being
	forgotten.  See:

	 https://sourceware.org/pipermail/gdb/2014-October/044643.html

	Following through this time around.

	Change-Id: I5b25a1ff7bce7b150d6f90f4c34047fae4b1f8b4

2022-03-17  Tom Tromey  <tromey@adacore.com>

	Add another test for Ada Wide_Wide_String
	In an earlier patch, I had written that I wanted to add this test:

	      ptype Wide_Wide_String'("literal")

	... but that it failed with the distro GNAT.  Further investigation
	showed that it could be made to work by adding a function using
	Wide_Wide_String to the program -- this caused the type to end up in
	the debug info.

	This patch adds the test.  I'm checking this in.

2022-03-17  Alan Modra  <amodra@gmail.com>

	ubsan: Null dereference in parse_module
		* vms-alpha.c (parse_module): Sanity check that DST__K_RTNBEG
		has set module->func_table for DST__K_RTNEND.  Check return
		of bfd_zalloc.

2022-03-17  Alan Modra  <amodra@gmail.com>

	asan: Buffer overflow in evax_bfd_print_dst
	With "name" a char*, the length at name[0] might be negative, escaping
	buffer limit checks.

		* vms-alpha.c (evax_bfd_print_dst): Make name an unsigned char*.
		(evax_bfd_print_emh): Likewise.

2022-03-17  Alan Modra  <amodra@gmail.com>

	asan: Buffer overflow in som_set_reloc_info
		* som.c (som_set_reloc_info): Add symcount parameter.  Don't
		access symbols past symcount.  Don't access fixup past end_fixups.
		(som_slurp_reloc_table): Adjust som_set_reloc_info calls.

2022-03-17  Alan Modra  <amodra@gmail.com>

	asan: use of uninitialized value in buffer_and_nest
	More occurences of the same as commit d12b8d620c6a.

		* macro.c (buffer_and_nest): Sanity check length in buffer
		before calling strncasecmp.

2022-03-17  Alan Modra  <amodra@gmail.com>

	gprofng configure target tests
	${target} in configure.ac should be the canonical target, so that for
	example, someone configuring with --target=x86_64-linux will match
	x86_64-*-linux*.

		* configure.ac: Invoke AC_CANONICAL_TARGET.
		* libcollector/configure.ac: Likewise.
		* Makefile.in: Regenerate.
		* configure: Regenerate.
		* doc/Makefile.in: Regenerate.
		* gp-display-html/Makefile.in: Regenerate.
		* libcollector/Makefile.in: Regenerate.
		* libcollector/configure: Regenerate.
		* src/Makefile.in: Regenerate.

2022-03-17  Alan Modra  <amodra@gmail.com>

	Re: asan: buffer overflow in peXXigen.c
	In the process of fixing a buffer overflow in commit fe69d4fcf0194a,
	I managed to introduce a fairly obvious NULL pointer dereference..

		* peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Don't
		segfault on not finding section.  Wrap overlong lines.

2022-03-17  Alan Modra  <amodra@gmail.com>

	asan: buffer overflows after calling ignore_rest_of_line
	operand() is not a place that should be calling ignore_rest_of_line.
	ignore_rest_of_line shouldn't increment input_line_pointer if already
	at buffer limit.

		* expr.c (operand): Don't call ignore_rest_of_line.
		* read.c (s_mri_common): Likewise.
		(ignore_rest_of_line): Don't increment input_line_pointer if
		already at buffer_limit.

2022-03-17  Alan Modra  <amodra@gmail.com>

	Re: bfd: add AMDGCN architecture
		* po/SRC-POTFILES.in: Regenerate.

2022-03-17  Jan Beulich  <jbeulich@suse.com>

	x86: don't accept base architectures as extensions
	The -march= intentions are quite clear: A base architecture may be
	followed by any number of extensions. Accepting a base architecture in
	place of an extension will at best result in confusion, as the first of
	the two (or more) items specified simply would not take effect, due to
	being overridden by the later one(s).

2022-03-17  Jan Beulich  <jbeulich@suse.com>

	x86: never set i386_cpu_flags' "unused" field
	Setting this field risks cpu_flags_all_zero() mistakenly returning
	"false" when the object passed in was e.g. the result of ANDing together
	two objects which had the bit set, or ANDNing together an object with
	the field set and one with the field clear.

	While there also avoid setting CpuNo64: Like Cpu64 this is driven
	differently anyway and hence shouldn't be set anywhere by default.

	Note that the moving of the two items in i386-gen.c's cpu_flags[] is
	only for documentation purposes (and slight reducing of overhead), as
	the fields are sorted anyway upon program start.

2022-03-17  Jan Beulich  <jbeulich@suse.com>

	x86: unify CPU flag on/off processing
	There's no need for the arbitrary special "unknown" token: Simply
	recognize the leading ~ and process everything else the same, merely
	recording whether to set individual fields to 1 or 0.

	While there exclude CpuIAMCU from CPU_UNKNOWN_FLAGS - CPU_IAMCU_FLAGS
	override cpu_arch_flags anyway when -march=iamcu is passed, and there's
	no reason to have the stray flag set even if no insn actually is keyed
	to it.

2022-03-17  Jan Beulich  <jbeulich@suse.com>

	x86: add another IAMCU testcase
	Now that {L,K}1OM support is gone, and with it the brokenness in
	check_cpu_arch_compatible(), put in place a test making sure that only
	extensions can be enabled via .arch for IAMCU, and that the base
	architecture cannot be changed.

	x86: drop L1OM/K1OM support from gas
	This was only rudimentary support anyway; none of the sub-architecture
	specific insns were ever supported.

	x86: assorted IAMCU CPU checking fixes
	The checks done by check_cpu_arch_compatible() were halfway sensible
	only at the time where only L1OM support was there. The purpose,
	however, has always been to prevent bad uses of .arch (turning off the
	base CPU "feature" flag) while at the same time permitting extensions to
	be enabled / disabled. In order to achieve this (and to prevent
	regressions when L1OM and K1OM support are removed)
	- set CpuIAMCU in CPU_IAMCU_FLAGS,
	- adjust the IAMCU check in the function itself (the other two similarly
	  broken checks aren't adjusted as they're slated to be removed anyway),
	- avoid calling the function for extentions (which would never have the
	  base "feature" flag set),
	- add a new testcase actually exercising ".arch iamcu" (which would also
	  regress with the planned removal).

2022-03-17  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-16  Andrew Burgess  <aburgess@redhat.com>

	gdb: work around prompt corruption caused by bracketed-paste-mode
	In this commit:

	  commit b4f26d541aa7224b70d363932e816e6e1a857633
	  Date:   Tue Mar 2 13:42:37 2021 -0700

	      Import GNU Readline 8.1

	We imported readline 8.1 into GDB.  As a consequence bug PR cli/28833
	was reported.  This bug spotted that, when the user terminated GDB by
	sending EOF (usually bound to Ctrl+d), the last prompt would become
	corrupted.  Here's what happens, the user is sat at a prompt like
	this:

	  (gdb)

	And then the user sends EOF (Ctrl+d), we now see this:

	  quit)
	  ... gdb terminates, and we return to the shell ...

	Notice the 'quit' was printed over the prompt.

	This problem is a result of readline 8.1 enabling bracketed paste mode
	by default.  This problem is present in readline 8.0 too, but in that
	version of readline bracketed paste mode is off by default, so a user
	will not see the bug unless they specifically enable the feature.

	Bracketed paste mode is available in readline 7.0 too, but the bug
	is not present in this version of readline, see below for why.

	What causes this problem is how readline disables bracketed paste
	mode.  Bracketed paste mode is a terminal feature that is enabled and
	disabled by readline emitting a specific escape sequence.  The problem
	for GDB is that the escape sequence to disable bracketed paste mode
	includes a '\r' character at the end, see this thread for more
	details:

	  https://lists.gnu.org/archive/html/bug-bash/2018-01/msg00097.html

	The change to add the '\r' character to the escape sequence used to
	disable bracketed paste mode was introduced between readline 7.0 and
	readline 8.0, this is why the bug would not occur when using older
	versions of readline (note: I don't know if its even possible to build
	GDB using readline 7.0.  That really isn't important, I'm just
	documenting the history of this issue).

	So, the escape sequence to disable bracketed paste mode is emitted
	from the readline function rl_deprep_terminal, this is called after
	the user has entered a complete command and pressed return, or, if the
	user sends EOF.

	However, these two cases are slightly different.  In the first case,
	when the user has entered a command and pressed return, the cursor
	will have moved to the next, empty, line, before readline emits the
	escape sequence to leave bracketed paste mode.  The final '\r'
	character moves the cursor back to the beginning of this empty line,
	which is harmless.

	For the EOF case though, this is not what happens.  Instead, the
	escape sequence to leave bracketed paste mode is emitted on the same
	line as the prompt.  The final '\r' moves the cursor back to the start
	of the prompt line.  This leaves us ready to override the prompt.

	It is worth noting, that this is not the intended behaviour of
	readline, in rl_deprep_terminal, readline should emit a '\n' character
	when EOF is seen.  However, due to a bug in readline this does not
	happen (the _rl_eof_found flag is never set).  This is the first
	readline bug that effects GDB.

	GDB prints the 'quit' message from command_line_handler (in
	event-top.c), this function is called (indirectly) from readline to
	process the complete command line, but also in the EOF case (in which
	case the command line is set to nullptr).  As this is part of the
	callback to process a complete command, this is called after readline
	has disabled bracketed paste mode (by calling rl_deprep_terminal).

	And so, when bracketed paste mode is in use, rl_deprep_terminal leaves
	the cursor at the start of the prompt line (in the EOF case), and
	command_line_handler then prints 'quit', which overwrites the prompt.

	The solution to this problem is to print the 'quit' message earlier,
	before rl_deprep_terminal is called.  This is easy to do by using the
	rl_deprep_term_function hook.  It is this hook that usually calls
	rl_deprep_terminal, however, if we replace this with a new function,
	we can print the 'quit' string, and then call rl_deprep_terminal
	ourselves.  This allows the 'quit' to be printed before
	rl_deprep_terminal is called.

	The problem here is that there is no way in rl_deprep_terminal to know
	if readline is processing EOF or not, and as a result, we don't know
	when we should print 'quit'.  This is the second readline bug that
	effects GDB.

	Both of these readline issues are discussed in this thread:

	  https://lists.gnu.org/archive/html/bug-readline/2022-02/msg00021.html

	The result of that thread was that readline was patched to address
	both of these issues.

	Now it should be easy to backport the readline fix to GDB's in tree
	copy of readline, and then change GDB to make use of these fixes to
	correctly print the 'quit' string.

	However, we are just about to branch GDB 12, and there is concern from
	some that changing readline this close to a new release is a risky
	idea, see this thread:

	  https://sourceware.org/pipermail/gdb-patches/2022-March/186391.html

	So, this commit doesn't change readline at all.  Instead, this commit
	is the smallest possible GDB change in order to avoid the prompt
	corruption.

	In this commit I change GDB to print the 'quit' string on the line
	after the prompt, but only when bracketed paste mode is on.  This
	avoids the overwriting issue, the user sees this:

	  (gdb)
	  quit
	  ... gdb terminates, and returns to the shell ...

	This isn't ideal, but is better than the existing behaviour.  After
	GDB 12 has branched, we can backport the readline fix, and apply a
	real fix to GDB.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28833

2022-03-16  Fangrui Song  <i@maskray.me>

	objcopy --weaken-symbol: apply to STB_GNU_UNIQUE symbols
	    PR binutils/28926
	    * objcopy.c (filter_symbols): Apply weaken to STB_GNU_UNIQUE symbols
	    * NEWS: Mention feature.
	    * testsuite/binutils-all/objcopy.exp (objcopy_test_symbol_manipulation): New test.
	    * testsuite/binutils-all/weaken-gnu-unique.s: New.

2022-03-16  Tom Tromey  <tromey@adacore.com>

	Reimplement array concatenation for Ada and D
	This started as a patch to implement string concatenation for Ada.
	However, while working on this, I looked at how this code could
	possibly be called.  It turns out there are only two users of
	concat_operation: Ada and D.  So, in addition to implementing this for
	Ada, this patch rewrites value_concat, removing the odd "concatenate
	or repeat" semantics, which were completely unused.  As Ada and D both
	seem to represent strings using TYPE_CODE_ARRAY, this removes the
	TYPE_CODE_STRING code from there as well.

	Remove eval_op_concat
	eval_op_concat has code to search for an operator overload of
	BINOP_CONCAT.  However, the operator overloading code is specific to
	C++, which does not have this operator.  And,
	binop_types_user_defined_p rejects this case right at the start, and
	value_x_binop does not handle this case.  I think this code has been
	dead for a very long time.  This patch removes it and hoists the
	remaining call into concatenation::evaluate, removing eval_op_concat
	entirely.

2022-03-16  Tom Tromey  <tromey@adacore.com>

	Ada support for wide strings
	This adds some basic support for Wide_String and Wide_Wide_String to
	the Ada expression evaluator.  In particular, a string literal may be
	converted to a wide or wide-wide string depending on context.

	The patch updates an existing test case.  Note that another test,
	namely something like:

	    ptype Wide_Wide_String'("literal")

	... would be nice to add, but when tested against a distro GNAT, this
	did not work (probably due to lack of debuginfo); so, I haven't
	included it here.

2022-03-16  Tom Tromey  <tromey@adacore.com>

	Remove eval_op_string
	eval_op_string is only used in a single place -- the implementation of
	string_operation.  This patch turns it into the
	string_operation::evaluate method, removing a bit of extraneous code.

2022-03-16  Carl Love  <cel@us.ibm.com>

	Powerpc fix for gdb.base/ending-run.exp
	The last two tests in gdb.base/ending-run.exp case fail on Powerpc when the
	system does not have the needed glibc debug-info files loaded.  In this
	case, gdb is not able to determine where execution stopped.  This behavior
	looks as follows for the test case:

	The next to the last test does a next command when the program is stopped
	at the closing bracket for main.  The message printed is:

	0x00007ffff7d01524 in ?? () from /lib/powerpc64le-linux-gnu/libc.so.6

	which fails to match any of the test_multiple options.

	The test then does another next command.  On Powerpc, the
	message printed it:

	Cannot find bounds of current function

	The test fails as the output does not match any of the options for the
	gdb_test_multiple.

	I checked the behavior on Powerpc to see if this is typical.
	I ran gdb on the following simple program as shown below.

	#include <stdio.h>
	int
	main(void)
	{
	  printf("Hello, world!\n");
	  return 0;
	}

	gdb ./hello_world
	<snip the gdb start info>

	Type "apropos word" to search for commands related to "word"...
	Reading symbols from ./hello_world...
	(No debugging symbols found in ./hello_world)
	(gdb) break main
	Breakpoint 1 at 0x818
	(gdb) r

	Starting program: /home/carll/hello_world
	[Thread debugging using libthread_db enabled]
	Using host libthread_db library "/lib/powerpc64le-linux-gnu/libthread_db.so.1".

	Breakpoint 1, 0x0000000100000818 in main ()
	(gdb) n
	Single stepping until exit from function main,
	which has no line number information.
	Hello, world!
	0x00007ffff7d01524 in ?? () from /lib/powerpc64le-linux-gnu/libc.so.6
	(gdb) n
	Cannot find bounds of current function

	So it would seem that the messages seen from the test case are
	"normal" output for Powerpc when the debug-info is not available.

	The following patch adds the output from Powerpc as an option
	to the gdb_test_multiple statement, identifying the output as the expected
	output on Powerpc without the needed debug-info files installed.

	The patch has been tested on a Power 10 system and an Intel
	64-bit system.  No additional regression failures were seen on
	either platform.

2022-03-16  Martin Storsj?  <martin@martin.st>

	dlltool: Use the output name as basis for deterministic temp prefixes
		PR 28885
		* dlltool.c (main): use imp_name rather than dll_name when
		generating a temporary file name.

2022-03-16  Jan Vrany  <jan.vrany@labware.com>
	    Andrew Burgess  <aburgess@redhat.com>

	gdb/mi: consistently notify user when GDB/MI client uses -thread-select
	GDB notifies users about user selected thread changes somewhat
	inconsistently as mentioned on gdb-patches mailing list here:

	  https://sourceware.org/pipermail/gdb-patches/2022-February/185989.html

	Consider GDB debugging a multi-threaded inferior with both CLI and GDB/MI
	interfaces connected to separate terminals.

	Assuming inferior is stopped and thread 1 is selected, when a thread
	2 is selected using '-thread-select 2' command on GDB/MI terminal:

	    -thread-select 2
	    ^done,new-thread-id="2",frame={level="0",addr="0x00005555555551cd",func="child_sub_function",args=[],file="/home/jv/Projects/gdb/users_jv_patches/gdb/testsuite/gdb.mi/user-selected-context-sync.c",fullname="/home/uuu/gdb/gdb/testsuite/gdb.mi/user-selected-context-sync.c",line="30",arch="i386:x86-64"}
	    (gdb)

	and on CLI terminal we get the notification (as expected):

	    [Switching to thread 2 (Thread 0x7ffff7daa640 (LWP 389659))]
	    #0  child_sub_function () at /home/uuu/gdb/gdb/testsuite/gdb.mi/user-selected-context-sync.c:30
	    30        volatile int dummy = 0;

	However, now that thread 2 is selected, if thread 1 is selected
	using 'thread-select --thread 1 1' command on GDB/MI terminal
	terminal:

	   -thread-select --thread 1 1
	   ^done,new-thread-id="1",frame={level="0",addr="0x0000555555555294",func="main",args=[],file="/home/jv/Projects/gdb/users_jv_patches/gdb/testsuite/gdb.mi/user-selected-context-sync.c",fullname="/home/jv/Projects/gdb/users_jv_patches/gdb/testsuite/gdb.mi/user-selected-context-sync.c",line="66",arch="i386:x86-64"}
	   (gdb)

	but no notification is printed on CLI terminal, despite the fact
	that user selected thread has changed.

	The problem is that when `-thread-select --thread 1 1` is executed
	then thread is switched to thread 1 before mi_cmd_thread_select () is
	called, therefore the condition "inferior_ptid != previous_ptid"
	there does not hold.

	To address this problem, we have to move notification logic up to
	mi_cmd_execute () where --thread option is processed and notify
	user selected contents observers there if context changes.

	However, this in itself breaks GDB/MI because it would cause context
	notification to be sent on MI channel. This is because by the time
	we notify, MI notification suppression is already restored (done in
	mi_command::invoke(). Therefore we had to lift notification suppression
	logic also up to mi_cmd_execute (). This change in made distinction
	between mi_command::invoke() and mi_command::do_invoke() unnecessary
	as all mi_command::invoke() did (after the change) was to call
	do_invoke(). So this patches removes do_invoke() and moves the command
	execution logic directly to invoke().

	With this change, all gdb.mi tests pass, tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=20631

2022-03-16  H.J. Lu  <hjl.tools@gmail.com>

	gprofng: Use symver attribute if available
	Use symver attribute if available, instead of asm statement, to support
	LTO build.

		PR gprof/28962
		* libcollector/dispatcher.c (timer_create@@GLIBC_2.3.3): Use
		SYMVER_ATTRIBUTE.
		(timer_create@GLIBC_2.2): Likewise.
		(timer_create@GLIBC_2.2.5): Likewise.
		(pthread_create@@GLIBC_2.1): Likewise.
		(pthread_create@GLIBC_2.0): Likewise.
		* libcollector/iotrace.c (open64@@GLIBC_2.2): Likewise.
		(open64@GLIBC_2.1): Likewise.
		(fopen@@GLIBC_2.1): Likewise.
		(fopen@GLIBC_2.0): Likewise.
		(fclose@@GLIBC_2.1): Likewise.
		(fclose@GLIBC_2.0): Likewise.
		(fdopen@@GLIBC_2.1): Likewise.
		(fdopen@GLIBC_2.0): Likewise.
		(pread@@GLIBC_2.2): Likewise.
		(pread@GLIBC_2.1): Likewise.
		(pwrite@@GLIBC_2.2): Likewise.
		(pwrite@GLIBC_2.1): Likewise.
		(pwrite64@@GLIBC_2.2): Likewise.
		(pwrite64@GLIBC_2.1): Likewise.
		(fgetpos@@GLIBC_2.2): Likewise.
		(fgetpos@GLIBC_2.0): Likewise.
		(fgetpos64@@GLIBC_2.2): Likewise.
		(fgetpos64@GLIBC_2.1): Likewise.
		(fsetpos@@GLIBC_2.2): Likewise.
		(fsetpos@GLIBC_2.0): Likewise.
		(fsetpos64@@GLIBC_2.2): Likewise.
		(fsetpos64@GLIBC_2.1): Likewise.
		* libcollector/linetrace.c (posix_spawn@@GLIBC_2.15): Likewise.
		(posix_spawn@GLIBC_2.2): Likewise.
		(posix_spawn@GLIBC_2.2.5): Likewise.
		(posix_spawnp@@GLIBC_2.15): Likewise.
		(posix_spawnp@GLIBC_2.2): Likewise.
		(posix_spawnp@GLIBC_2.2.5): Likewise.
		(popen@@GLIBC_2.1): Likewise.
		(popen@GLIBC_2.0): Likewise.
		(_popen@@GLIBC_2.1): Likewise.
		(_popen@GLIBC_2.0): Likewise.
		* libcollector/mmaptrace.c (dlopen@@GLIBC_2.1): Likewise.
		(dlopen@GLIBC_2.0): Likewise.
		* libcollector/synctrace.c (pthread_cond_wait@@GLIBC_2.3.2):
		Likewise.
		(pthread_cond_wait@GLIBC_2.0): Likewise.
		(pthread_cond_wait@GLIBC_2.2.5): Likewise.
		(pthread_cond_wait@GLIBC_2.2): Likewise.
		(pthread_cond_timedwait@@GLIBC_2.3.2): Likewise.
		(pthread_cond_timedwait@GLIBC_2.0): Likewise.
		(pthread_cond_timedwait@GLIBC_2.2.5): Likewise.
		(pthread_cond_timedwait@GLIBC_2.2): Likewise.
		(sem_wait@@GLIBC_2.1): Likewise.
		(sem_wait@GLIBC_2.0): Likewise.
		* src/collector_module.h (SYMVER_ATTRIBUTE): New.

2022-03-16  H.J. Lu  <hjl.tools@gmail.com>

	gprofng: Don't hardcode -Wno-format-truncation/-Wno-switch
	Use -Wno-format-truncation and -Wno-switch only if they are supported.

		PR gprof/28969
		* configure.ac (GPROFNG_NO_FORMAT_TRUNCATION_CFLAGS): New
		AC_SUBST for -Wno-format-truncation.
		(GPROFNG_NO_SWITCH_CFLAGS): New AC_SUBST for -Wno-switch.
		* Makefile.in: Regenerate.
		* configure: Likewise.
		* src/Makefile.am (AM_CFLAGS): Replace -Wno-format-truncation
		and -Wno-switch with GPROFNG_NO_FORMAT_TRUNCATION_CFLAGS and
		GPROFNG_NO_SWITCH_CFLAGS.
		* src/Makefile.in: Regenerate.

2022-03-16  H.J. Lu  <hjl.tools@gmail.com>

	gprofng: Don't hardcode -Wno-nonnull-compare
	Use -Wno-nonnull-compare only if it is supported.

		PR gprof/28969
		* libcollector/Makefile.am (AM_CFLAGS): Replace
		-Wno-nonnull-compare with GPROFNG_NO_NONNULL_COMPARE_CFLAGS.
		* libcollector/configure.ac (GPROFNG_NO_NONNULL_COMPARE_CFLAGS):
		New AC_SUBST for -Wno-nonnull-compare.
		* libcollector/Makefile.in: Regenerate.
		* libcollector/aclocal.m4: Likewise.
		* libcollector/configure: Likewise.

2022-03-16  H.J. Lu  <hjl.tools@gmail.com>

	gprofng: Define ATTRIBUTE_FALLTHROUGH
	Define ATTRIBUTE_FALLTHROUGH to __attribute__ ((fallthrough)) only for
	GCC 7 or above.

		PR gprof/28969
		* common/gp-defs.h (ATTRIBUTE_FALLTHROUGH): New.
		* src/gp-collect-app.cc (collect::check_args): Replace
		/* FALLTHROUGH */ with ATTRIBUTE_FALLTHROUGH.

2022-03-16  Simon Marchi  <simon.marchi@efficios.com>

	binutils/readelf: handle AMDGPU relocation types
	Make readelf recognize AMDGPU relocation types, as documented here:

	  https://llvm.org/docs/AMDGPUUsage.html#amdgpu-relocation-records

	The user-visible change looks like:

	    -000000000004  000400000001 unrecognized: 1       0000000000000000 SCRATCH_RSRC_DWORD0
	    -00000000000c  000500000001 unrecognized: 1       0000000000000000 SCRATCH_RSRC_DWORD1
	    -000000000014  000600000007 unrecognized: 7       0000000000000000 global_var0
	    -00000000001c  000700000008 unrecognized: 8       0000000000000000 global_var1
	    -000000000024  000800000009 unrecognized: 9       0000000000000000 global_var2
	    -00000000002c  00090000000a unrecognized: a       0000000000000000 global_var3
	    -000000000034  000a0000000b unrecognized: b       0000000000000000 global_var4
	    +000000000004  000400000001 R_AMDGPU_ABS32_LO 0000000000000000 SCRATCH_RSRC_DWORD0
	    +00000000000c  000500000001 R_AMDGPU_ABS32_LO 0000000000000000 SCRATCH_RSRC_DWORD1
	    +000000000014  000600000007 R_AMDGPU_GOTPCREL 0000000000000000 global_var0
	    +00000000001c  000700000008 R_AMDGPU_GOTPCREL 0000000000000000 global_var1
	    +000000000024  000800000009 R_AMDGPU_GOTPCREL 0000000000000000 global_var2
	    +00000000002c  00090000000a R_AMDGPU_REL32_LO 0000000000000000 global_var3
	    +000000000034  000a0000000b R_AMDGPU_REL32_HI 0000000000000000 global_var4

	binutils/ChangeLog:

		* readelf.c (dump_relocations): Handle EM_AMDGPU.

	include/ChangeLog:

		* elf/amdgpu.h: Add relocation values.

	Change-Id: I2ed4589f4cd37ea11ad2e0cb38d4b682271e1334

2022-03-16  Simon Marchi  <simon.marchi@efficios.com>

	binutils/readelf: build against msgpack, dump NT_AMDGPU_METADATA note contents
	The AMDGPU HSA OS ABI (code object v3 and above) defines the
	NT_AMDGPU_METADATA ELF note [1].  The content is a msgpack object
	describing, among other things, the kernels present in the code object
	and how to call them.

	I think it would be useful for readelf to be able to display the content
	of those notes.  msgpack is a structured format, a bit like JSON, except
	not text-based.  It is therefore possible to dump the contents in
	human-readable form without knowledge of the specific layout of the
	note.

	Add configury to binutils to optionally check for the msgpack C library
	[2].  Add There is a new --with{,out}-msgpack configure flag, and the actual
	library lookup is done using pkg-config.

	If msgpack support is enabled, dumping a NT_AMDGPU_METADATA note looks
	like:

	    $ readelf --notes amdgpu-code-object
	    Displaying notes found in: .note
	      Owner                Data size        Description
	      AMDGPU               0x0000040d       NT_AMDGPU_METADATA (code object metadata)
	        {
	          "amdhsa.kernels": [
	            {
	              ".args": [
	                {
	                  ".address_space": "global",
	                  ".name": "out.coerce",
	                  ".offset": 0,
	                  ".size": 8,
	                  ".value_kind": "global_buffer",
	                },
	      <snip>

	If msgpack support is disabled, dump the contents as hex, as is done
	with notes that are not handled in a special way.  This allows one to
	decode the contents manually (maybe using a command-line msgpack
	decoder) if really needed.

	[1] https://llvm.org/docs/AMDGPUUsage.html#code-object-metadata
	[2] https://github.com/msgpack/msgpack-c/tree/c_master

	binutils/ChangeLog:

		* Makefile.am (readelf_CFLAGS): New.
		(readelf_LDADD): Add MSGPACK_LIBS.
		* Makefile.in: Re-generate.
		* config.in: Re-generate.
		* configure: Re-generate.
		* configure.ac: Add --with-msgpack flag and check for msgpack
		using pkg-config.
		* readelf.c: Include msgpack.h if HAVE_MSGPACK.
		(print_note_contents_hex): New.
		(print_indents): New.
		(dump_msgpack_obj): New.
		(dump_msgpack): New.
		(print_amdgpu_note): New.
		(process_note): Handle NT_AMDGPU_METADATA note contents.
		Use print_note_contents_hex.

	Change-Id: Ia60a654e620bc32dfdb1bccd845594e2af328b84

2022-03-16  Simon Marchi  <simon.marchi@efficios.com>

	binutils/readelf: handle NT_AMDGPU_METADATA note name
	Handle the NT_AMDGPU_METADATA note, which is described here:

	  https://llvm.org/docs/AMDGPUUsage.html#code-object-v3-note-records

	As of this patch, just print out the name, not the contents, which is in
	the msgpack format.

	binutils/ChangeLog:

		* readelf.c (get_amdgpu_elf_note_type): New.
		(process_note): Handle "AMDGPU" notes.

	include/ChangeLog:

		* elf/amdgcn.h (NT_AMDGPU_METADATA): New.

	Change-Id: Id2dba2e2aeaa55ef7464fb35aee9c7d5f96ddb23

2022-03-16  Simon Marchi  <simon.marchi@efficios.com>

	binutils/readelf: decode AMDGPU-specific e_flags
	Decode and print the AMDGPU-specific fields of e_flags, as documented
	here:

	  https://llvm.org/docs/AMDGPUUsage.html#header

	That is:

	 - The specific GPU model
	 - Whether the xnack and sramecc features are enabled

	The result looks like:

	-  Flags:                             0x52f
	+  Flags:                             0x52f, gfx906, xnack any, sramecc any

	The flags for the "HSA" OS ABI are properly versioned and documented on
	that page.  But the NONE, PAL and MESA3D OS ABIs are not well documented
	nor versioned.  Taking a peek at the LLVM source code, we see that they
	encode their flags the same way as HSA v3.  For example, for PAL:

	  https://github.com/llvm/llvm-project/blob/c8b614cd74a92d85936aed5ac7c642af75ffdc29/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp#L601

	So for those other OS ABIs, we read them the same as HSA v3.

	binutils/ChangeLog:

		* readelf.c: Include elf/amdgcn.h.
		(decode_AMDGPU_machine_flags): New.
		(get_machine_flags): Handle flags for EM_AMDGPU machine type.

	include/ChangeLog:

		* elf/amdgcn.h: Add EF_AMDGPU_MACH_AMDGCN_* and
		EF_AMDGPU_FEATURE_* defines.

	Change-Id: Ib5b94df7cae0719a22cf4e4fd0629330e9485c12

2022-03-16  Simon Marchi  <simon.marchi@efficios.com>

	binutils/readelf: handle AMDGPU OS ABIs
	When the machine is EM_AMDGPU, handle the various OS ABIs described
	here:

	  https://llvm.org/docs/AMDGPUUsage.html#header

	For a binary with the HSA OS ABI, the change looks like:

	-  OS/ABI:                            <unknown: 40>
	+  OS/ABI:                            AMD HSA

	binutils/ChangeLog:

		* readelf.c (get_osabi_name): Handle EM_AMDGPU OS ABIs.

	include/ChangeLog:

		* elf/common.h (ELFOSABI_AMDGPU_PAL, ELFOSABI_AMDGPU_MESA3D):
		New.

	Change-Id: I383590c390f7dc2fe0f902f50038735626d71863

2022-03-16  Simon Marchi  <simon.marchi@efficios.com>

	opcodes: handle bfd_amdgcn_arch in configure script
	There isn't an actual opcodes implementation for the AMDGCN arch (yet),
	this is just the bare minimum to get

	  $ ./configure --target=amdgcn-hsa-amdhsa --disable-gas
	  $ make all-binutils

	working later in this series.

	opcodes/ChangeLog:

		* configure.ac: Handle bfd_amdgcn_arch.
		* configure: Re-generate.

	Change-Id: Ib7d7c5533a803ed8b2a293e9275f667ed781ce79

2022-03-16  Simon Marchi  <simon.marchi@efficios.com>

	bfd: add AMDGCN architecture
	Add support for the AMDGCN architecture to BFD.

	This is the bare minimum to get

	  $ ./configure --target=amdgcn-hsa-amdhsa --disable-gas
	  $ make all-binutils

	working later in this series.

	The specific AMDGCN models added here are a bit arbitrary, based on
	what we intend to initially support in GDB.  This list will need to be
	updated in the future anyway.  The complete up-to-date list of existing
	AMDGPU models can be found here:

	  https://llvm.org/docs/AMDGPUUsage.html#processors

	The ELF format for this architecture is documented here:

	  https://llvm.org/docs/AMDGPUUsage.html#elf-code-object

	The flags for the "HSA" OS ABI are properly versioned and documented on
	that page.  But the NONE, PAL and MESA3D OS ABIs are not well documented
	nor versioned.  Taking a peek at the LLVM source code, we see that they
	encode their flags the same way as HSA v3.  For example, for PAL:

	  https://github.com/llvm/llvm-project/blob/c8b614cd74a92d85936aed5ac7c642af75ffdc29/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp#L601

	So at least, we know that all AMDGPU objects (of which AMDGCN objects
	are a subset of) at the time of writing encode the specific GPU model in
	the EF_AMDGPU_MACH field of e_flags.

	bfd/ChangeLog:

		* Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES):
		Add cpu-amdgcn.c.
		(BFD64_BACKENDS): Add elf64-amdgcn.lo.
		(BFD64_BACKENDS_CFILES): Add elf64-amdgcn.c.
		* Makefile.in: Re-generate.
		* cpu-amdgcn.c: New.
		* elf64-amdgcn.c: New.
		* archures.c (bfd_architecture): Add bfd_arch_amdgcn and related
		mach defines.
		(bfd_amdgcn_arch): New.
		(bfd_archures_list): Add bfd_amdgcn_arch.
		* bfd-in2.h: Re-generate.
		* config.bfd: Handle amdgcn* target.
		* configure.ac: Handle amdgcn_elf64_le_vec.
		* configure: Re-generate.
		* elf-bfd.h (elf_target_id): Add AMDGCN_ELF_DATA.
		* targets.c (amdgcn_elf64_le_vec): New.
		(_bfd_target_vector): Add amdgcn_elf64_le_vec.

	include/ChangeLog:

		* elf/amdgpu.h: New.
		* elf/common.h (ELFOSABI_AMDGPU_HSA): Add.

	Change-Id: I969f7b14960797e88891c308749a6e341eece5b2

2022-03-16  Nick Clifton  <nickc@redhat.com>

	Updated Serbian (for binutils/) and Russian (for gprof/) translations

2022-03-16  Pedro Alves  <pedro@palves.net>

	Make gdb.fortran/{array-slices,lbound-ubound} work against gdbserver
	gdb.fortran/array-slices.exp and gdb.fortran/lbound-ubound.exp were
	recently disabled unless testing with the native target, because they
	rely on inferior I/O.  However, when testing against gdbserver using
	the native-gdbserver/native-extended-gdbserver boards, we do have
	access to inferior I/O.

	The right way to check whether the board can do I/O, is via checking
	the gdb,noinferiorio board variable.  Switch to using that.

	And then, tweak the testcases to expect output to appear in
	inferior_spawn_id, instead of gdb_spawn_id.  When testing against the
	native target, inferior_spawn_id is the same as gdb_spawn_id.  When
	testing against gdbserver, it maps to gdbserver_spawn_id.

	This exposed a buglet in gdb.fortran/array-slices.f90's show_1d
	subroutine -- it was missing printing newline at the end of the
	"Expected GDB Output" text, leading to a test timeout.  All other
	subroutines end with advance=yes, except this one.  Fix it by using
	advance=yes here too.

	Change-Id: I4640729f334431cfc24b0917e7d3977b677c6ca5

2022-03-16  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-15  Alan Modra  <amodra@gmail.com>

	Delete PowerPC macro insn support
	Let's hope this stays dead, but it's here as a patch separate from
	those that removed use of powerpc_macros just in case it needs to be
	resurrected.

	include/
		* opcode/ppc.h (struct powerpc_macro): Delete declaration.
		(powerpc_macros, powerpc_num_macros): Likewise..
	opcodes/
		* ppc-opc.c (powerpc_macros, powerpc_num_macros): Delete.
	gas/
		* config/tc-ppc.c (ppc_macro): Delete function.
		(ppc_macro_hash): Delete.
		(ppc_setup_opcodes, md_assemble): Delete macro support.

2022-03-15  Alan Modra  <amodra@gmail.com>

	PowerPC SPE/SPE2 aliases in powerpc_macros
		* ppc-opc.c (powerpc_macros): Move "evsadd", "evssub", "evsabs",
		"evsnabs", "evsneg", "evsmul", "evsdiv", "evscmpgt", "evsgmplt",
		"evsgmpeq", "evscfui", "evscfsi", "evscfuf", "evscfsf", "evsctui",
		"evsctsi", "evsctuf", "evsctsf", "evsctuiz", "evsctsiz",
		"evststgt", "evststlt", "evststeq"..
		(powerpc_opcodes): ..to here.
		(powerpc_macros): Move "evdotphsssi", "evdotphsssia", "evdotpwsssi",
		and "evdotpwsssia"..
		(spe2_opcodes): ..to here.

2022-03-15  Alan Modra  <amodra@gmail.com>

	PowerPC VLE extended instructions in powerpc_macros
	This moves VLE insn out of the macro table.  "e_slwi" and "e_srwi"
	already exist in vle_opcodes as distinct instructions rather than
	encodings of e_rlwinm.

	opcodes/
		* ppc-opc.c (vle_opcodes): Typo fix e_rlwinm operand.
		Add "e_inslwi", "e_insrwi", "e_rotlwi", "e_rotrwi", "e_clrlwi",
		"e_clrrwi", "e_extlwi", "e_extrwi", and "e_clrlslwi".
		(powerpc_macros): Delete same.  Delete "e_slwi" and "e_srwi" too.
	gas/
		* testsuite/gas/ppc/vle-simple-5.d: Update.

2022-03-15  Alan Modra  <amodra@gmail.com>

	PowerPC32 extended instructions in powerpc_macros
	As for PowerPC64, move instructions to the main opcode table.

	opcodes/
		* ppc-opc.c (insert_crwn, extract_crwn, insert_elwn, extract_elwn),
		(insert_erwn, extract_erwn, insert_erwb, extract_erwb),
		(insert_cslwn, extract_cslwb, insert_ilwb, extract_ilwn),
		(insert_irwb, extract_irwn, insert_rrwn, extract_rrwn),
		(insert_slwn, extract_slwn, insert_srwn, extract_srwn): New functions.
		(CRWn, ELWn, ERWn, ERWb, CSLWb, CSLWn, ILWn, ILWb, IRWn, IRWb),
		(RRWn, SLWn, SRWn): Define and add powerpc_operands entries.
		(MMB_MASK, MME_MASK, MSHMB_MASK): Define.
		(powerpc_opcodes): Add "inslwi", "insrwi", "rotrwi", "clrrwi",
		"slwi", "srwi", "extlwi", "extrwi", "sli", "sri" and corresponding
		record (ie. dot suffix) forms.
		(powerpc_macros): Delete same.
	gas/
		* testsuite/gas/ppc/476.d: Update.
		* testsuite/gas/ppc/simpshft.d: Update.

2022-03-15  Alan Modra  <amodra@gmail.com>

	PowerPC64 extended instructions in powerpc_macros
	The extended instructions implemented in powerpc_macros aren't used by
	the disassembler.  That means instructions like "sldi r3,r3,2" appear
	in disassembly as "rldicr r3,r3,2,61", which is annoying since many
	other extended instructions are shown.

	Note that some of the instructions moved out of the macro table to the
	opcode table won't appear in disassembly, because they are aliases
	rather than a subset of the underlying raw instruction.  If enabled,
	rotrdi, extrdi, extldi, clrlsldi, and insrdi would replace all
	occurrences of rotldi, rldicl, rldicr, rldic and rldimi.  (Or many
	occurrences in the case of clrlsldi if n <= b was added to the extract
	functions.)

	The patch also fixes a small bug in opcode sanity checking.

	include/
		* opcode/ppc.h (PPC_OPSHIFT_SH6): Define.
	opcodes/
		* ppc-opc.c (insert_erdn, extract_erdn, insert_eldn, extract_eldn),
		(insert_crdn, extract_crdn, insert_rrdn, extract_rrdn),
		(insert_sldn, extract_sldn, insert_srdn, extract_srdn),
		(insert_erdb, extract_erdb, insert_csldn, extract_csldb),
		(insert_irdb, extract_irdn): New functions.
		(ELDn, ERDn, ERDn, RRDn, SRDn, ERDb, CSLDn, CSLDb, IRDn, IRDb):
		Define and add associated powerpc_operands entries.
		(powerpc_opcodes): Add "rotrdi", "srdi", "extrdi", "clrrdi",
		"sldi", "extldi", "clrlsldi", "insrdi" and corresponding record
		(ie. dot suffix) forms.
		(powerpc_macros): Delete same from here.
	gas/
		* config/tc-ppc.c (insn_validate): Don't modify value passed
		to operand->insert for PPC_OPERAND_PLUS1 when calculating mask.
		Handle PPC_OPSHIFT_SH6.
		* testsuite/gas/ppc/prefix-reloc.d: Update.
		* testsuite/gas/ppc/simpshft.d: Update.
	ld/
		* testsuite/ld-powerpc/elfv2so.d: Update.
		* testsuite/ld-powerpc/notoc.d: Update.
		* testsuite/ld-powerpc/notoc3.d: Update.
		* testsuite/ld-powerpc/tlsdesc2.d: Update.
		* testsuite/ld-powerpc/tlsget.d: Update.
		* testsuite/ld-powerpc/tlsget2.d: Update.
		* testsuite/ld-powerpc/tlsopt5.d: Update.
		* testsuite/ld-powerpc/tlsopt6.d: Update.

2022-03-15  Tom Tromey  <tom@tromey.com>

	Do not capture updated 'pc' in add_local_symbols
	Simon pointed out that commit 13835d88 ("Use function view when
	iterating over block symbols") caused a regression.  The bug is that
	the new closure captures 'pc' by reference, but later code updates
	this variable -- but the earlier code did not update the callback
	structure with the new value.

	This patch restores the old behavior by using a new varible name in an
	inner scope.

2022-03-15  Jose E. Marchesi  <jose.marchesi@oracle.com>

	gprofng: avoid using `fallthrough' attributes
	gprofng didn't build with gcc 6.3 due to the usage of __attribute__
	((fallthrough)).  This patch uses /* FALLTHROUGH */ instead.

	2022-03-15  Jose E. Marchesi  <jose.marchesi@oracle.com>

		* gprofng/src/gp-collect-app.cc (collect::check_args): Use
		fallthrough comment instead of attribute.

2022-03-15  Tom Tromey  <tromey@adacore.com>

	Fix bug in dwarf-mode.el
	I noticed that, occasionally, dwarf-mode would think that the objdump
	subprocess was still running after it had clearly exited.  I managed
	to reliably reproduce this today and learned that a process sentinel
	is not guaranteed to be run with the current buffer set to the process
	buffer.  This patch fixes the problem.

	I've bumped the version number of dwarf-mode.el to make it easier to
	install for users who already have an earlier one installed.

	I'm checking this in.

	2022-03-15  Tom Tromey  <tromey@adacore.com>

		* dwarf-mode.el: Now 1.7.
		(dwarf--sentinel): Switch to the process buffer.

2022-03-15  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: rename a proc and fix a typo
	Rename a proc in gdb.mi/user-selected-context-sync.exp, I think the
	old name was most likely a typo.  The old name
	match_re_or_ensure_not_output seems (to me) to imply we're in some way
	checking that the regexp was not output.  But that's not what we are
	doing, we're checking either for the regexp, or for no output, hence
	the new name match_re_or_ensure_no_output.

	Additionally, I found a definite typo in one of the comments that I've
	also fixed.

	I also updated some test names.  These tests (probably due to copy &
	paste errors) has 'on MI' on their name, when they were actually
	checking CLI output.  For these test I changed the name to use 'on
	CLI'.

	There should be no change in what is tested after this commit.

2022-03-15  Nick Clifton  <nickc@redhat.com>

	gprofng: Add a configure test for clock_gettime and a use of the test in getthrtime.c

2022-03-15  H.J. Lu  <hjl.tools@gmail.com>

	gprofng: Don't generate gprofng.info in source
	Add info-in-builddir to AUTOMAKE_OPTIONS.

		PR gprof/28967
		* doc/Makefile.am (AUTOMAKE_OPTIONS): Add info-in-builddir.
		* doc/Makefile.in: Regenerate.

2022-03-15  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: LoongArch: fix failed testcases in gdb.base/align-c.exp
	When execute the following command on LoongArch:

	  make check-gdb TESTS="gdb.base/align-c.exp"

	there exist some failed testcases:

	  ...
	  FAIL: gdb.base/align-c.exp: print _Alignof(struct align_pair_long_double_x_float)
	  FAIL: gdb.base/align-c.exp: print _Alignof(struct align_pair_long_double_x_double)
	  FAIL: gdb.base/align-c.exp: print _Alignof(struct align_pair_long_double_x_long_double)
	  ...

	According to LoongArch ELF ABI specification [1], set the target data types
	of floating-point to fix the above failed testcases.

	[1] https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html

2022-03-15  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-14  Andrew Burgess  <aburgess@redhat.com>

	gdb/python/mi: create MI commands using python
	This commit allows a user to create custom MI commands using Python
	similarly to what is possible for Python CLI commands.

	A new subclass of mi_command is defined for Python MI commands,
	mi_command_py. A new file, gdb/python/py-micmd.c contains the logic
	for Python MI commands.

	This commit is based on work linked too from this mailing list thread:

	  https://sourceware.org/pipermail/gdb/2021-November/049774.html

	Which has also been previously posted to the mailing list here:

	  https://sourceware.org/pipermail/gdb-patches/2019-May/158010.html

	And was recently reposted here:

	  https://sourceware.org/pipermail/gdb-patches/2022-January/185190.html

	The version in this patch takes some core code from the previously
	posted patches, but also has some significant differences, especially
	after the feedback given here:

	  https://sourceware.org/pipermail/gdb-patches/2022-February/185767.html

	A new MI command can be implemented in Python like this:

	  class echo_args(gdb.MICommand):
	      def invoke(self, args):
	          return { 'args': args }

	  echo_args("-echo-args")

	The 'args' parameter (to the invoke method) is a list
	containing (almost) all command line arguments passed to the MI
	command (--thread and --frame are handled before the Python code is
	called, and removed from the args list).  This list can be empty if
	the MI command was passed no arguments.

	When used within gdb the above command produced output like this:

	  (gdb)
	  -echo-args a b c
	  ^done,args=["a","b","c"]
	  (gdb)

	The 'invoke' method of the new command must return a dictionary.  The
	keys of this dictionary are then used as the field names in the mi
	command output (e.g. 'args' in the above).

	The values of the result returned by invoke can be dictionaries,
	lists, iterators, or an object that can be converted to a string.
	These are processed recursively to create the mi output.  And so, this
	is valid:

	  class new_command(gdb.MICommand):
	      def invoke(self,args):
	          return { 'result_one': { 'abc': 123, 'def': 'Hello' },
	                   'result_two': [ { 'a': 1, 'b': 2 },
	                                   { 'c': 3, 'd': 4 } ] }

	Which produces output like:

	  (gdb)
	  -new-command
	  ^done,result_one={abc="123",def="Hello"},result_two=[{a="1",b="2"},{c="3",d="4"}]
	  (gdb)

	I have required that the fields names used in mi result output must
	match the regexp: "^[a-zA-Z][-_a-zA-Z0-9]*$" (without the quotes).
	This restriction was never written down anywhere before, but seems
	sensible to me, and we can always loosen this rule later if it proves
	to be a problem.  Much harder to try and add a restriction later, once
	people are already using the API.

	What follows are some details about how this implementation differs
	from the original patch that was posted to the mailing list.

	In this patch, I have changed how the lifetime of the Python
	gdb.MICommand objects is managed.  In the original patch, these object
	were kept alive by an owned reference within the mi_command_py object.
	As such, the Python object would not be deleted until the
	mi_command_py object itself was deleted.

	This caused a problem, the mi_command_py were held in the global mi
	command table (in mi/mi-cmds.c), which, as a global, was not cleared
	until program shutdown.  By this point the Python interpreter has
	already been shutdown.  Attempting to delete the mi_command_py object
	at this point was causing GDB to try and invoke Python code after
	finalising the Python interpreter, and we would crash.

	To work around this problem, the original patch added code in
	python/python.c that would search the mi command table, and delete the
	mi_command_py objects before the Python environment was finalised.

	In contrast, in this patch, I have added a new global dictionary to
	the gdb module, gdb._mi_commands.  We already have several such global
	data stores related to pretty printers, and frame unwinders.

	The MICommand objects are placed into the new gdb.mi_commands
	dictionary, and it is this reference that keeps the objects alive.
	When GDB's Python interpreter is shut down gdb._mi_commands is deleted,
	and any MICommand objects within it are deleted at this point.

	This change avoids having to make the mi_cmd_table global, and walk
	over it from within GDB's python related code.

	This patch handles command redefinition entirely within GDB's python
	code, though this does impose one small restriction which is not
	present in the original code (detailed below), I don't think this is a
	big issue.  However, the original patch relied on being able to
	finish executing the mi_command::do_invoke member function after the
	mi_command object had been deleted.  Though continuing to execute a
	member function after an object is deleted is well defined, it is
	also (IMHO) risky, its too easy for someone to later add a use of the
	object without realising that the object might sometimes, have been
	deleted.  The new patch avoids this issue.

	The one restriction that is added to avoid this, is that an MICommand
	object can't be reinitialised with a different command name, so:

	  (gdb) python cmd = MyMICommand("-abc")
	  (gdb) python cmd.__init__("-def")
	  can't reinitialize object with a different command name

	This feels like a pretty weird edge case, and I'm happy to live with
	this restriction.

	I have also changed how the memory is managed for the command name.
	In the most recently posted patch series, the command name is moved
	into a subclass of mi_command, the python mi_command_py, which
	inherits from mi_command is then free to use a smart pointer to manage
	the memory for the name.

	In this patch, I leave the mi_command class unchanged, and instead
	hold the memory for the name within the Python object, as the lifetime
	of the Python object always exceeds the c++ object stored in the
	mi_cmd_table.  This adds a little more complexity in py-micmd.c, but
	leaves the mi_command class nice and simple.

	Next, this patch adds some extra functionality, there's a
	MICommand.name read-only attribute containing the name of the command,
	and a read-write MICommand.installed attribute that can be used to
	install (make the command available for use) and uninstall (remove the
	command from the mi_cmd_table so it can't be used) the command.  This
	attribute will be automatically updated if a second command replaces
	an earlier command.

	This patch adds additional error handling, and makes more use the
	gdbpy_handle_exception function.

	Co-Authored-By: Jan Vrany <jan.vrany@labware.com>

2022-03-14  Andrew Burgess  <aburgess@redhat.com>

	gdb/gdbarch: compare some fields against 0 verify_gdbarch
	After the previous commit, which removes the predicate function
	gdbarch_register_type_p, I noticed that the gdbarch->register_type
	field was not checked at in the verify_gdbarch function.

	More than not being checked, the field wasn't mentioned at all.

	I find this strange, I would expect that every field would at least be
	mentioned - we already generate comments for some fields saying that
	this field is _not_ being checked, so the fact that this field isn't
	being checked looks (to me), like this field is somehow slipping
	through the cracks.

	The comment at the top of gdbarch-components.py tries to explain how
	the validation is done.  I didn't understand this comment completely,
	but, I think this final sentence:

	  "Otherwise, the check is done against 0 (really NULL for function
	  pointers, but same idea)."

	Means that, if non of the other cases apply, then the field should be
	checked against 0, with 0 indicating that the field is invalid (was
	not set by the tdep code).  However, this is clearly not being done.

	Looking in gdbarch.py at the code to generate verify_gdbarch we do
	find that there is a case that is not handled, the case where the
	'invalid' field is set true True, but non of the other cases apply.

	In this commit I propose two changes:

	 1. Handle the case where the 'invalid' field of a property is set to
	 True, this should perform a check for the field of gdbarch still
	 being set to 0, and

	 2. If the if/else series that generates verify_gdbarch doesn't handle
	 a property then we should raise an exception.  This means that if a
	 property is added which isn't handled, we should no longer silently
	 ignore it.

	After doing this, I re-generated the gdbarch files and saw that the
	following gdbarch fields now had new validation checks:

	  register_type
	  believe_pcc_promotion
	  register_to_value
	  value_to_register
	  frame_red_zone_size
	  displaced_step_restore_all_in_ptid
	  solib_symbols_extension

	Looking at how these are currently set in the various -tdep.c files, I
	believe the only one of these that is required to be set for all
	architectures is the register_type field.

	And so, for all of the other fields, I've changed the property
	definition on gdbarch-components.py, setting the 'invalid' field to
	False.

	Now, after re-generation, the register_type field is checked against
	0, thus an architecture that doesn't set_gdbarch_register_type will
	now fail during validation.  For all the other fields we skip the
	validation, in which case, it is find for an architecture to not set
	this field.

	My expectation is that there should be no user visible changes after
	this commit.  Certainly for all fields except register_type, all I've
	really done is cause some extra comments to be generated, so I think
	that's clearly fine.

	For the register_type field, my claim is that any architecture that
	didn't provide this would fail when creating its register cache, and I
	couldn't spot an architecture that doesn't provide this hook.  As
	such, I think this change should be fine too.

2022-03-14  Andrew Burgess  <aburgess@redhat.com>

	gdb/gdbarch: remove the predicate function for gdbarch_register_type
	I don't believe that the gdbarch_register_type_p predicate is called
	anywhere in GDB, and the gdbarch_register_type function is called
	without checking the gdbarch_register_type_p predicate function
	everywhere it is used, for example in
	init_regcache_descr (regcache.c).

	My claim is that the gdbarch_register_type function is required for
	every architecture, and GDB will not work if this function is not
	supplied.

	And so, in this commit, I remove the 'predicate=True' from
	gdbarch-components.py for the 'register_type' field, and regenerate
	the gdbarch files.

	There should be no user visible changes after this commit.

2022-03-14  Patrick Monnerat  <patrick@monnerat.net>

	Replace deprecated_target_wait_hook by observers
	Commit b60cea7 (Make target_wait options use enum flags) broke
	deprecated_target_wait_hook usage: there's a commit comment telling
	this hook has not been converted.

	Rather than trying to mend it, this patch replaces the hook by two
	target_wait observers:

	target_pre_wait (ptid_t ptid)
	target_post_wait (ptid_t event_ptid)

	Upon target_wait entry, target_pre_wait is notified with the ptid
	passed to target_wait. Upon exit, target_post_wait is notified with
	the event ptid returned by target_wait. Should an exception occur,
	event_ptid is null_ptid.

	This change benefits to Insight (out-of-tree): there's no real use of the
	late hook in gdb itself.

2022-03-14  Tom Tromey  <tromey@adacore.com>

	Correctly print subrange types in generic_value_print
	I noticed that generic_value_print assumes that a subrange type is
	always a subrange of an integer type.  However, this isn't necessarily
	the case.  In Ada, for example, one has subranges of character and
	enumeration types.

	This code isn't often exercised, I think, because languages with real
	subrange types tend to implement their own printers.  However, it
	still seemed worth fixing.

2022-03-14  Luis Machado  <luis.machado@arm.com>

	[aarch64/arm] Properly extract the return value returned in memory
	When running gdb.cp/non-trivial-retval.exp, the following shows up for
	both aarch64-linux and armhf-linux:

	Breakpoint 3, f1 (i1=23, i2=100) at src/gdb/testsuite/gdb.cp/non-trivial-retval.cc:35
	35        A a;
	(gdb) finish
	Run till exit from #0  f1 (i1=23, i2=100) at src/gdb/testsuite/gdb.cp/non-trivial-retval.cc:35
	main () at /src/gdb/testsuite/gdb.cp/non-trivial-retval.cc:163
	163       B b = f2 (i1, i2);
	Value returned is $6 = {a = -11952}
	(gdb)

	The return value should be {a = 123} instead. This happens because the
	backends don't extract the return value from the correct location. GDB should
	fetch a pointer to the memory location from X8 for aarch64 and r0 for armhf.

	With the patch, gdb.cp/non-trivial-retval.exp has full passes on
	aarch64-linux and armhf-linux on Ubuntu 20.04/18.04.

	The problem only shows up with the "finish" command. The "call" command
	works correctly and displays the correct return value.

	This is also related to PR gdb/28681
	(https://sourceware.org/bugzilla/show_bug.cgi?id=28681) and fixes FAIL's in
	gdb.ada/mi_var_array.exp.

	A new testcase is provided, and it exercises GDB's ability to "finish" a
	function that returns a large struct (> 16 bytes) and display the
	contents of this struct correctly. This has always been incorrect for
	these backends, but no testcase exercised this particular scenario.

2022-03-14  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-13  Alan Modra  <amodra@gmail.com>

	PR28959, obdump doesn't disassemble mftb instruction
	Without a -M cpu option given, powerpc objdump defaults currently to
	-Mpower10 but -Many is also given.  Commit 1ff6a3b8e562 regressed
	-Many disassembly of instructions that are encoded differently
	depending on cpu, such as mftb which has pre- and post-power4
	encodings.

		PR 28959
		* ppc-dis.c (lookup_powerpc): Revert 2021-05-28 change.  Instead
		only look at deprecated PPC_OPCODE_RAW bit when -Many.

2022-03-13  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-12  Tom Tromey  <tom@tromey.com>

	Relax regexp in gdb.rust/unsized.exp
	With nightly rustc, gdb.rust/unsized.exp fails:

	    (gdb) ptype *us
	    Structure has no component named operator*.

	rustc changed to emit a bit more debug info for unsized types.
	Because the original test is just to make sure that ptype of an
	unsized array looks right, this patch relaxes the regexp and changes
	the expression.  I think this keeps the original test meaning, but
	also works with nightly.  I also tested stable and 1.48.

2022-03-12  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-11  Tom Tromey  <tromey@adacore.com>

	Avoid crash with cross-linux core file
	An internal test case creates a core file using gcore, then restarts
	gdb with that core.  When run with a cross-linux gdb (in this case,
	x86-64 host with ppc64-linux target), the test fails:

	    | (gdb) core core
	    | [New LWP 18437]
	    | warning: `/lib64/libc.so.6': Shared library architecture unknown is not compatible with target architecture powerpc:common64.
	    | warning: Could not load shared library symbols for /lib64/ld64.so.1.
	    | Do you need "set solib-search-path" or "set sysroot"?
	    | ../../src/gdb/gdbarch.c:3388: internal-error: int gdbarch_elf_make_msymbol_special_p(gdbarch*): Assertion `gdbarch != NULL' failed.
	    | A problem internal to GDB has been detected,
	    | further debugging may prove unreliable.
	    | Quit this debugging session? (y or n) y

	What's happening here is that the core file lists some shared
	libraries.  These aren't available via the solib search path, and so
	gdb finds the local (x86-64) libraries.  This is not ideal, but on the
	other hand, it is what was asked for -- while the test does set
	solib-search-path, it does not set the sysroot.

	But, because gdb isn't configured to handle these libraries, it
	crashes.

	It seems to me that it's better to avoid the crash by having
	solib_bfd_open fail in the case where a library is incompatible.  That
	is what this patch does.  Now it looks like:

	    | [New LWP 15488]
	    | Error while mapping shared library sections:
	    | `/lib64/libc.so.6': Shared library architecture unknown is not compatible with target architecture powerpc:common64.

	... and does not crash gdb.

	I don't have a good setup for testing this using dejagnu, so I don't
	know whether an existing gdb test covers this scenario.

2022-03-11  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: remove duplicates from gdb.base/stap-probe.exp
	Remove the duplicate test names from gdb.base/stap-probe.exp, this is
	done by actually passing a unique test name in a couple of
	places (rather than using the command as the test name), and in
	another couple of places, a test has a duplicate name due to a cut &
	paste error, which I've fixed.

	There's no change in what is actually being tested after this commit.

2022-03-11  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	gprofng: a new GNU profiler
	top-level
		* Makefile.def: Add gprofng module.
		* configure.ac: Add --enable-gprofng option.
		* src-release.sh: Add gprofng.
		* Makefile.in: Regenerate.
		* configure: Regenerate.
		* gprofng: New directory.

	binutils
		* MAINTAINERS: Add gprofng maintainer.
		* README-how-to-make-a-release: Add gprofng.

	include.
		* collectorAPI.h: New file.
		* libcollector.h: New file.
		* libfcollector.h: New file.

2022-03-11  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-10  Aaron Merey  <amerey@redhat.com>

	gdb/auto-load: Remove repeating "auto-load" from debug message
	Remove "auto-load:" from a format string passed to auto_load_debug_printf.
	It is unnecessary since this function will prefix the string with "[auto-load]"
	when printing it.

2022-03-10  Tom Tromey  <tromey@adacore.com>

	Change how "print/x" displays floating-point value
	Currently, "print/x" will display a floating-point value by first
	casting it to an integer type.  This yields weird results like:

	    (gdb) print/x 1.5
	    $1 = 0x1

	This has confused users multiple times -- see PR gdb/16242, where
	there are several dups.  I've also seen some confusion from this
	internally at AdaCore.

	The manual says:

	    'x'
		 Regard the bits of the value as an integer, and print the integer
		 in hexadecimal.

	... which seems more useful.  So, perhaps what happened is that this
	was incorrectly implemented (or maybe correctly implemented and then
	regressed, as there don't seem to be any tests).

	This patch fixes the bug.

	There was a previous discussion where we agreed to preserve the old
	behavior:

	    https://sourceware.org/legacy-ml/gdb-patches/2017-06/msg00314.html

	However, I think it makes more sense to follow the manual.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=16242

2022-03-10  Tom Tromey  <tromey@adacore.com>

	Simplify the ui-out progress API
	I noticed that 'progress' is a method on ui-out, but it seems to me
	that it would be better if the only API were via the progress_meter
	class.  This patch makes this change, changing progress to be a method
	on the meter itself.

2022-03-10  Andrew Burgess  <aburgess@redhat.com>

	gdb/gdbarch: fix typo in gdbarch-components.py
	Fixes a minor typo, in a comment, in the gdbarch-components.py script.

	There should be no user visible changes after this commit.

2022-03-10  Lancelot SIX  <lancelot.six@amd.com>

	Process exit status is leader exit status testcase
	This adds a multi-threaded testcase that has all threads in the
	process exit with a different exit code, and ensures that GDB reports
	the thread group leader's exit status as the whole-process exit
	status.  Before this set of patches, this would randomly report the
	exit code of some other thread, and thus fail.

	Tested on Linux-x86_64, native and gdbserver.

	Co-Authored-By: Pedro Alves <pedro@palves.net>
	Change-Id: I30cba2ff4576fb01b5169cc72667f3268d919557

2022-03-10  Pedro Alves  <pedro@palves.net>

	Re-add zombie leader on exit, gdbserver/linux
	Same as the previous patch, but for GDBserver.

	In summary, the current zombie leader detection code in linux-low.cc
	has a race -- if a multi-threaded inferior exits just before
	check_zombie_leaders finds that the leader is now zombie via checking
	/proc/PID/status, check_zombie_leaders deletes the leader, assuming we
	won't get an event for that exit (which we won't in some scenarios,
	but not in this one), which is a false-positive scenario, where the
	whole process is simply exiting.  Later when we see the last LWP in
	our list exit, we report that LWP's exit status as exit code, even
	though for the (real) parent process, the exit code that counts is the
	child's leader thread's exit code.

	Like for GDB, the solution here is to:

	   - only report whole-process exit events for the leader.
	   - re-add the leader back to the LWP list when we finally see it
	     exit.

	Change-Id: Id2d7bbb51a415534e1294fff1d555b7ecaa87f1d

2022-03-10  Pedro Alves  <pedro@palves.net>

	Re-add zombie leader on exit, gdb/linux
	The current zombie leader detection code in linux-nat.c has a race --
	if a multi-threaded inferior exits just before check_zombie_leaders
	finds that the leader is now zombie via checking /proc/PID/status,
	check_zombie_leaders deletes the leader, assuming we won't get an
	event for that exit (which we won't in some scenarios, but not in this
	one).  That might seem mostly harmless, but it has some downsides:

	 - later when we continue pulling events out of the kernel, we will
	   collect the exit event of the non-leader threads, and once we see
	   the last lwp in our list exit, we return _that_ lwp's exit code as
	   whole-process exit code to infrun, instead of the leader's exit
	   code.

	 - this can cause a hang in stop_all_threads in infrun.c.  Say there
	   are 2 threads in the process.  stop_all_threads stops each of those
	   threads, and then waits for two stop or exit events, one for each
	   thread.  If the whole process exits, and check_zombie_leaders hits
	   the false-positive case, linux-nat.c will only return one event to
	   GDB (the whole-process exit returned when we see the last thread,
	   the non-leader thread, exit), making stop_all_threads hang forever
	   waiting for a second event that will never come.

	However, in this false-positive scenario, where the whole process is
	exiting, as opposed to just the leader (with pthread_exit(), for
	example), we _will_ get an exit event shortly for the leader, after we
	collect the exit event of all the other non-leader threads.  Or put
	another way, we _always_ get an event for the leader after we see it
	become zombie.

	I tried a number of approaches to fix this:

	#1 - My first thought to address the race was to make GDB always
	report the whole-process exit status for the leader thread, not for
	whatever is the last lwp in the list.  We _always_ get a final exit
	(or exec) event for the leader, and when the race triggers, we're not
	collecting it.

	#2 - My second thought was to try to plug the race in the first place.

	I thought of making GDB call waitpid/WNOHANG for all non-leader
	threads immediately when the zombie leader is detected, assuming there
	would be an exit event pending for each of them waiting to be
	collected.  Turns out that that doesn't work -- you can see the leader
	become zombie _before_ the kernel kills all other threads.  Waitpid in
	that small time window returns 0, indicating no-event.  Thankfully we
	hit that race window all the time, which avoided trading one race for
	another.  Looking at the non-leader thread's status in /proc doesn't
	help either, the threads are still in running state for a bit, for the
	same reason.

	#3 - My next attempt, which seemed promising, was to synchronously
	stop and wait for the stop for each of the non-leader threads.  For
	the scenario in question, this will collect all the exit statuses of
	the non-leader threads.  Then, if we are left with only the zombie
	leader in the lwp list, it means we either have a normal while-process
	exit or an exec, in which case we should not delete the leader.  If
	_only_ the leader exited, like in gdb.threads/leader-exit.exp, then
	after pausing threads, we will still have at least one live non-leader
	thread in the list, and so we delete the leader lwp.  I got this
	working and polished, and it was only after staring at the kernel code
	to convince myself that this would really work (and it would, for the
	scenario I considered), that I realized I had failed to account for
	one scenario -- if any non-leader thread is _already_ stopped when
	some thread triggers a group exit, like e.g., if you have some threads
	stopped and then resume just one thread with scheduler-locking or
	non-stop, and that thread exits the process.  I also played with
	PTRACE_EVENT_EXIT, see if it would help in any way to plug the race,
	and I couldn't find a way that it would result in any practical
	difference compared to looking at /proc/PID/status, with respect to
	having a race.

	So I concluded that there's no way to plug the race, we just have to
	deal with it.  Which means, going back to approach #1.  That is the
	approach taken by this patch.

	Change-Id: I6309fd4727da8c67951f9cea557724b77e8ee979

2022-03-10  Pedro Alves  <pedro@palves.net>

	gdbserver: Reindent check_zombie_leaders
	This fixes the indentation of
	linux_process_target::check_zombie_leaders, which will help with
	keeping its comments in sync with the gdb/linux-nat.c counterpart.

	Change-Id: I37332343bd80423d934249e3de2d04feefad1891

2022-03-10  Pedro Alves  <pedro@palves.net>

	gdbserver: Reorganize linux_process_target::filter_event
	Reorganize linux-low.cc:linux_process_target::filter_event such that
	all the handling for events for LWPs not in the LWP list is together.
	This helps make a following patch clearer.  The comments and debug
	messages have also been tweaked to have them synchronized with the GDB
	counterpart.

	Change-Id: If9019635f63a846607cfda44b454b4254a404019

2022-03-10  Pedro Alves  <pedro@palves.net>

	gdb: Reorganize linux_nat_filter_event
	Reorganize linux-nat.c:linux_nat_filter_event such that all the
	handling for events for LWPs not in the LWP list is together.  This
	helps make a following patch clearer.  The comments and debug messages
	have also been tweaked - the end goal is to have them synchronized
	with the gdbserver counterpart.

	Change-Id: I8586d8dcd76d8bd3795145e3056fc660e3b2cd22

2022-03-10  Pedro Alves  <pedro@palves.net>

	Fix gdb.threads/current-lwp-dead.exp race
	If we make GDB report the process EXIT event for the leader thread, as
	will be done in a latter patch of this series, then
	gdb.threads/current-lwp-dead.exp starts failing:

	 (gdb) break fn_return
	 Breakpoint 2 at 0x5555555551b5: file /home/pedro/rocm/gdb/build/gdb/testsuite/../../../src/gdb/testsuite/gdb.threads/current-lwp-dead.c, line 45.
	 (gdb) continue
	 Continuing.
	 [New LWP 2138466]
	 [Inferior 1 (process 2138459) exited normally]
	 (gdb) FAIL: gdb.threads/current-lwp-dead.exp: continue to breakpoint: fn_return (the program exited)

	The inferior exit reported is actually correct.  The main thread has
	indeed exited, and that's the thread that has the right exit code to
	report to the user, as that's the exit code that is reported to the
	program's parent.  In this case, GDB managed to collect the exit code
	for the leader thread before reaping the other thread, because in
	reality, the testcase isn't creating standard threads, it is using raw
	clone, and the new clones are put in their own thread group.

	Fix it by making the main "thread" not exit until the scenario we're
	exercising plays out.  Also, run the program to completion for
	completeness.

	The original program really wanted the leader thread to exit before
	the fn_return function was reached -- it was important that the
	current thread as pointed by inferior_ptid was gone when infrun got
	the breakpoint event.  I've tweaked the testcase to ensure that that
	condition is still held, though it is no longer the main thread that
	exits.  This required a bit of synchronization between the threads,
	which required using CLONE_VM unconditionally.  The #ifdef guards were
	added as a fix for
	https://sourceware.org/bugzilla/show_bug.cgi?id=11214, though I don't
	think they were necessary because the program is not using TLS.  If it
	turns out they were necessary, we can link the testcase with "-z now"
	instead, which was mentioned as an alternative workaround in that
	Bugzilla.

	Change-Id: I7be2f0da4c2fe8f80a60bdde5e6c623d8bd5a0aa

2022-03-10  Pedro Alves  <pedro@palves.net>

	Fix gdb.threads/clone-new-thread-event.exp race
	If we make GDB report the process EXIT event for the leader thread,
	instead of whatever is the last thread in the LWP list, as will be
	done in a latter patch of this series, then
	gdb.threads/current-lwp-dead.exp starts failing:

	 (gdb) FAIL: gdb.threads/clone-new-thread-event.exp: catch SIGUSR1 (the program exited)

	This is a testcase race -- the main thread does not wait for the
	spawned clone "thread" to finish before exiting, so the main program
	may exit before the second thread is scheduled and reports its
	SIGUSR1.  With the change to make GDB report the EXIT for the leader,
	the race is 100% reproducible by adding a sleep(), like so:

	 --- c/gdb/testsuite/gdb.threads/clone-new-thread-event.c
	 +++ w/gdb/testsuite/gdb.threads/clone-new-thread-event.c
	 @@ -51,6 +51,7 @@ local_gettid (void)
	  static int
	  fn (void *unused)
	  {
	 +  sleep (1);
	    tkill (local_gettid (), SIGUSR1);
	    return 0;
	  }

	Resulting in:

	 Breakpoint 1, main (argc=1, argv=0x7fffffffd418) at gdb.threads/clone-new-thread-event.c:65
	 65        stack = malloc (STACK_SIZE);
	 (gdb) continue
	 Continuing.
	 [New LWP 3715562]
	 [Inferior 1 (process 3715555) exited normally]
	 (gdb) FAIL: gdb.threads/clone-new-thread-event.exp: catch SIGUSR1 (the program exited)

	That inferior exit reported is actually correct.  The main thread has
	indeed exited, and that's the thread that has the right exit code to
	report to the user, as that's the exit code that is reported to the
	program's parent.  In this case, GDB managed to collect the exit code
	for the leader thread before reaping the other thread, because in
	reality, the testcase isn't creating standard threads, it is using raw
	clone, and the new clones are put in their own thread group.

	Fix it by making the main thread wait for the child to exit.  Also,
	run the program to completion for completeness.

	Change-Id: I315cd3dc2b9e860395dcab9658341ea868d7a6bf

2022-03-10  Pedro Alves  <pedro@palves.net>

	Fix gdbserver/linux target_waitstatus logging assert
	Turning on debug output in gdbserver leads to an assertion failure if
	gdbserver reports a non-signal event:

	    [threads] wait_1: LWP 3273770: extended event with waitstatus status->kind = EXECD, execd_pathname = gdb.threads/non-ldr-exc-1/non-ldr-exc-1
	    [threads] wait_1: Hit a non-gdbserver trap event.
	  ../../src/gdbserver/../gdb/target/waitstatus.h:365: A problem internal to GDBserver has been detected.
	  sig: Assertion `m_kind == TARGET_WAITKIND_STOPPED || m_kind == TARGET_WAITKIND_SIGNALLED' failed.

	Fix it in the obvious way, using target_waitstatus::to_string(),
	resulting in, for example:

	  [threads] wait_1: ret = LWP 1542412.1542412, status->kind = STOPPED, sig = GDB_SIGNAL_TRAP

	Change-Id: Ia4832f9b4fa39f4af67fcaf21fd4d909a285a645

2022-03-10  Nick Clifton  <nickc@redhat.com>

	Add option to objdump/readelf to disable access to debuginfod servers.
		* dwarf.c (use_debuginfod): New variable.  Set to 1.
		(load_separate_debug_info): Only call
		debuginfod_fetch_separate_debug_info is use_debuginfod is true.
		(dwarf_select_sections_by_names): Add do-not-use-debuginfod and
		use-debuginfod options.
		(dwarf_select_sections_by_letters): Add D and E options.
		* dwarf.h (use_debuginfod): New extern.
		* objdump.c (usage): Mention the new options.
		* readelf.c (usage): Likewise.
		* doc/binutils.texi: Document the new options.
		* doc/debug-options.texi: Describe the new options.
		* NEWS: Mention the new feature.
		* testsuite/binutils-all/debuginfod.exp: Add tests of the new
		options.

2022-03-10  Alan Modra  <amodra@gmail.com>

	Re: ld: Add a before_plugin_all_symbols_read hook
		* testsuite/ld-plugin/pr28849.d: Adjust for powerpc64 function
		descriptors.

2022-03-10  H.J. Lu  <hjl.tools@gmail.com>

	ld: Add a before_plugin_all_symbols_read hook
	Add a before_plugin_all_symbols_read hook to load symbol references from
	DT_NEEDED entries, included from --copy-dt-needed-entries, before reading
	plugin symbols to properly resolve plugin symbol references.

	bfd/

		PR ld/28849
		* elf-bfd.h (elf_link_hash_table): Add handling_dt_needed.
		* elflink.c (_bfd_elf_merge_symbol): Don't set non_ir_ref_dynamic
		before plugin 'all symbols read' hook is called.

	ld/

		PR ld/28849
		* ldelf.c (ldelf_handle_dt_needed): New function.
		(ldelf_before_plugin_all_symbols_read): Likewise.
		(ldelf_after_open): Call ldelf_handle_dt_needed.
		* ldelf.h (ldelf_before_plugin_all_symbols_read): New.
		* ldemul.c (ldemul_before_plugin_all_symbols_read): Likewise.
		* ldemul.h (ldemul_before_plugin_all_symbols_read): Likewise.
		(ld_emulation_xfer_struct): Add before_plugin_all_symbols_read.
		* ldlang.c (lang_process): Call
		ldemul_before_plugin_all_symbols_read before calling
		plugin_call_all_symbols_read.
		* emultempl/elf.em
		(gld${EMULATION_NAME}_before_plugin_all_symbols_read): New.
		(LDEMUL_BEFORE_PLUGIN_ALL_SYMBOLS_READ): New.
		* emultempl/emulation.em (ld_${EMULATION_NAME}_emulation):
		Initialize the before_plugin_all_symbols_read field.
		* testsuite/ld-plugin/lto.exp: Run PR ld/28849 tests.
		* testsuite/ld-plugin/pr28849.d: New file.
		* testsuite/ld-plugin/pr28849a.c: Likewise.
		* testsuite/ld-plugin/pr28849b.c: Likewise.

2022-03-10  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-09  Hans-Peter Nilsson  <hp@axis.com>

	toplevel: Makefile.def: Make configure-sim depend on all-readline
	Without this, a "make all-sim" without the equivalent of
	libreadline-dev installed on the build system, won't
	properly pick up the in-tree readline build, and you'll see:

	mkdir -p -- ./sim
	Configuring in ./sim
	configure: creating cache ./config.cache
	checking build system type... x86_64-pc-linux-gnu
	checking host system type... x86_64-pc-linux-gnu
	checking target system type... cris-axis-elf
	checking for x86_64-pc-linux-gnu-gcc... gcc
	checking whether the C compiler works... yes
	...
	checking for library containing tgetent... -ltermcap
	checking for readline in -lreadline... no
	configure: error: the required "readline" library is missing
	make[1]: *** [Makefile:11188: configure-sim] Error 1
	make[1]: Leaving directory '/home/hp/sim/b'

	The sim dependency on readline is apparently (nominally)
	valid as there's a readline call in sim/erc32/sis.c.

	2022-02-21  Hans-Peter Nilsson  <hp@axis.com>

		* Makefile.def (dependencies): Make configure-sim depend on
		all-readline.

2022-03-09  Maciej W. Rozycki  <macro@embecosm.com>

	GDB/testsuite: Fix a "displayed" typo in gdb.base/default.exp
	Fix a typo, s/dislayed/displayed/ in default.exp at the top level.

	GDB/testsuite: Remove a stray backslash from gdb.base/settings.exp
	Remove a stray trailing backslash from `test-integer' in settings.exp.
	It is harmless as only white space follows in the next line before the
	closing brace, so it merely swallows the newline character, but it may
	look confusing to the reader.

2022-03-09  Christina Schimpe  <christina.schimpe@intel.com>  (tiny change)

	* gdb/doc/gdb.texinfo (Requirements): Fix a typo.

2022-03-09  Alan Modra  <amodra@gmail.com>

	Constant fold view increment expressions
	The idea here is to replace expressions like v + 1 + 1 + 1 with v + 3.

		* dwarf2dbg.c (set_or_check_view): Remove useless assertion.
		Resolve multiple view increments.
		* testsuite/gas/elf/dwarf2-18.d: Don't xfail mep.

2022-03-09  Alan Modra  <amodra@gmail.com>

	Reduce duplicated symbol_clone_if_forward_ref work
		* symbol.c (struct symbol_flags): Add forward_resolved.
		(symbol_entry_find): Update needle initialisation.
		(symbol_clone_if_forward_ref): Do no work when forward_resolved
		is already set.  Set forward_resolved.

2022-03-09  Aaron Merey  <amerey@redhat.com>

	gdb: Try searching for auto-load script using .gnu_debuglink
	If an auto-load script cannot be found and objfile is a separate
	debuginfo whose filename does not match the name found in the parent
	file's .gnu_debuglink section, then repeat the search using the
	parent's filename where the last component is replaced with the
	.gnu_debuglink name.

	For example if the parent's filename is "/usr/lib/libxyz.so" and the
	name in its .gnu_debuglink section is "libxyz.so.debug", then
	if no auto-load script is otherwise found the search will be
	repeated with the filename "/usr/lib/libxyz.so.debug".

	This helps gdb locate auto-load scripts when debuginfo files do not have
	the expected filename, such as when they are aquired from debuginfod.

2022-03-09  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-08  Aaron Merey  <amerey@redhat.com>

	PR gdb/27876 - debuginfod-downloaded source files don't pass proper fullname across mi / (gdb)info source
	Source files downloaded from debuginfod currently use their original DWARF
	filename as their "fullname".  This causes a mismatch between the fullname
	and the actual location of the source file in the debuginfod client cache.

	MI consumers such as VSCode will fail to open debuginfod-downloaded
	source files due to this.  Also 'info source' will fail to include the
	true paths of these files.

	To fix this, use the debuginfod cache path as the fullname for debuginfod-
	downloaded source files.

2022-03-08  Jan Vrany  <jan.vrany@labware.com>

	gdb/mi: preserve user selected thread and frame when invoking MI commands
	Fix for PR gdb/20684.  When invoking MI commands with --thread and/or
	--frame, the user selected thread and frame was not preserved:

	  (gdb)
	  info thread
	  &"info thread\n"
	  ~"  Id   Target Id                                           Frame \n"
	  ~"* 1    Thread 0x7ffff7c30740 (LWP 19302) \"user-selected-c\" main () at /home/uuu/gdb/gdb/testsuite/gdb.mi/user-selected-context-sync.c:60\n"
	  ~"  2    Thread 0x7ffff7c2f700 (LWP 19306) \"user-selected-c\" child_sub_function () at /home/uuu/gdb/gdb/testsuite/gdb.mi/user-selected-context-sync.c:30\n"
	  ~"  3    Thread 0x7ffff742e700 (LWP 19307) \"user-selected-c\" child_sub_function () at /home/uuu/gdb/gdb/testsuite/gdb.mi/user-selected-context-sync.c:30\n"
	  ^done
	  (gdb)
	  info frame
	  &"info frame\n"
	  ~"Stack level 0, frame at 0x7fffffffdf90:\n"
	  ~" rip = 0x555555555207 in main (/home/uuu/gdb/gdb/testsuite/gdb.mi/user-selected-context-sync.c:60); saved rip = 0x7ffff7c5709b\n"
	  ~" source language c.\n"
	  ~" Arglist at 0x7fffffffdf80, args: \n"
	  ~" Locals at 0x7fffffffdf80, Previous frame's sp is 0x7fffffffdf90\n"
	  ~" Saved registers:\n "
	  ~" rbp at 0x7fffffffdf80, rip at 0x7fffffffdf88\n"
	  ^done
	  (gdb)
	  -stack-info-depth --thread 3
	  ^done,depth="4"
	  (gdb)
	  info thread
	  &"info thread\n"
	  ~"  Id   Target Id                                           Frame \n"
	  ~"  1    Thread 0x7ffff7c30740 (LWP 19302) \"user-selected-c\" main () at /home/uuu/gdb/gdb/testsuite/gdb.mi/user-selected-context-sync.c:60\n"
	  ~"  2    Thread 0x7ffff7c2f700 (LWP 19306) \"user-selected-c\" child_sub_function () at /home/uuu/gdb/gdb/testsuite/gdb.mi/user-selected-context-sync.c:30\n"
	  ~"* 3    Thread 0x7ffff742e700 (LWP 19307) \"user-selected-c\" child_sub_function () at /home/uuu/gdb/gdb/testsuite/gdb.mi/user-selected-context-sync.c:30\n"
	  ^done
	  (gdb)
	  info frame
	  &"info frame\n"
	  ~"Stack level 0, frame at 0x7ffff742dee0:\n"
	  ~" rip = 0x555555555169 in child_sub_function (/home/uuu/gdb/gdb/testsuite/gdb.mi/user-selected-context-sync.c:30); saved rip = 0x555555555188\n"
	  ~" called by frame at 0x7ffff742df00\n"
	  ~" source language c.\n"
	  ~" Arglist at 0x7ffff742ded0, args: \n"
	  ~" Locals at 0x7ffff742ded0, Previous frame's sp is 0x7ffff742dee0\n"
	  ~" Saved registers:\n "
	  ~" rbp at 0x7ffff742ded0, rip at 0x7ffff742ded8\n"
	  ^done
	  (gdb)

	This caused problems for frontends that provide access to CLI because UI
	may silently change the context for CLI commands (as demonstrated above).

	This commit fixes the problem by restoring thread and frame in
	mi_cmd_execute (). With this change, there are only two GDB/MI commands
	that can change user selected context: -thread-select and -stack-select-frame.
	This allows us to remove all and rather complicated logic of notifying
	about user selected context change from mi_execute_command (), leaving it
	to these two commands themselves to notify.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=20684

2022-03-08  Andrew Burgess  <aburgess@redhat.com>

	gdb: announce upcoming removal of Python 2 support from gdb
	As has been discussed here:

	  https://sourceware.org/pipermail/gdb-patches/2022-January/184910.html

	Python 2 support will be removed from GDB after GDB 12 has branched.
	This commit places an entry in the NEWS file to inform users of this
	decision.

2022-03-08  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-07  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: add new test for comparing char types in Python
	There's an interesting property of the 'char' type in C and C++, the
	three types 'char', 'unsigned char', and 'signed char', are all
	considered distinct.

	In contrast, and 'int' is signed by default, and so 'int' and 'signed
	int' are considered the same type.

	This commit adds a test to ensure that this edge case is visible to a
	user from Python.

	It is worth noting that for any particular compiler implementation (or
	the flags a compiler was invoked with), a 'char' will be either signed
	or unsigned; it has to be one or the other, and a user can access this
	information by using the Type.is_signed property.  However, for
	something like function overload resolution, the 'char' type is
	considered distinct from the signed and unsigned variants.

	There's no change to GDB with this commit, this is just adding a new
	test to guard some existing functionality.

2022-03-07  Andrew Burgess  <aburgess@redhat.com>

	gdb/python: add Type.is_signed property
	Add a new read-only property, Type.is_signed, which is True for signed
	types, and False otherwise.

	This property should only be read on types for which Type.is_scalar is
	true, attempting to read this property for non-scalar types will raise
	a ValueError.

	I chose 'is_signed' rather than 'is_unsigned' in order to match the
	existing Architecture.integer_type method, which takes a 'signed'
	parameter.  As far as I could find, that was the only existing
	signed/unsigned selector in the Python API, so it seemed reasonable to
	stay consistent.

2022-03-07  Andrew Burgess  <aburgess@redhat.com>

	gdb/python: add Type.is_scalar property
	Add a new read-only property which is True for scalar types,
	otherwise, it's False.

2022-03-07  Andrew Burgess  <aburgess@redhat.com>

	gdb/mi: add --no-connection to MI -add-inferior command
	Following on from the previous commit, where the -add-inferior command
	now uses the same connection as the current inferior, this commit adds
	a --no-connection option to -add-inferior.

	This new option matches the existing option of the same name for the
	CLI version of add-inferior; the new inferior is created with no
	connection.

	I've added a new 'connection' field to the MI output of -add-inferior,
	which includes the connection number and short name.  I haven't
	included the longer description field, this is the MI after all.  My
	expectation would be that if the frontend wanted to display all the
	connection details then this would be looked up from 'info
	connection' (or the MI equivalent if/when such a command is added).

	The existing -add-inferior tests are updated, as are the docs.

2022-03-07  Umair Sair  <umair_sair@hotmail.com>

	gdb/mi: fix regression in mi -add-inferior command
	Prior to the multi-target support commit:

	  commit 5b6d1e4fa4fc6827c7b3f0e99ff120dfa14d65d2
	  Date:   Fri Jan 10 20:06:08 2020 +0000

	      Multi-target support

	When a new inferior was added using the MI -add-inferior command, the
	new inferior would be using the same target as all the other
	inferiors.  This makes sense, GDB only supported a single target stack
	at a time.

	After the above commit, each inferior has its own target stack.

	To maintain backward compatibility, for the CLI add-inferior command,
	when a new inferior is added the above commit has the new inferior
	inherit a copy of the target stack from the current inferior.

	Unfortunately, this same backward compatibility is missing for the MI.

	This commit fixes this oversight.

	Now, when the -add-inferior MI command is used, the new inferior will
	inherit a copy of the target stack from the current inferior.

2022-03-07  Tom Tromey  <tromey@adacore.com>

	Deprecate dbx mode
	GDB has a dbx emulation mode that adds a few aliases and helper
	commands.  This mode is barely documented and is very superficial
	besides.  I suspect it is rarely used, and I would like to propose
	deprecating it for GDB 12, and then removing it in GDB 13.

2022-03-07  Pedro Alves  <pedro@palves.net>

	Remove unnecessary inferior lookup in infrun:handle_one
	infrun.c:handle_one calls find_inferior_ptid unnecessarily, since we
	already have a thread pointer handy, and the thread has a pointer to
	the inferior.  This commit removes the unnecessary lookup.

	Change-Id: I2ae18601dd75346c6c91068e9a4f9a6484fb3339

2022-03-07  Tom Tromey  <tromey@adacore.com>

	Fix bug in ada_print_floating
	ada_print_floating rewrites a floating-point string representation to
	conform to Ada syntax.  However, if you managed to get a floating
	point error, you might see:

	    (gdb) print whatever
	    $2 = <invalid float valu.0e>

	What's happening here is that ada_print_floating doesn't recognize
	this error case, and proceeds to modify the error text.

	This patch fixes this problem.

2022-03-07  Tom Tromey  <tromey@adacore.com>

	Implement real literal extension for Ada
	Sometimes it is convenient to be able to specify the exact bits of a
	floating-point literal.  For example, you may want to set a
	floating-point register to a denormalized value, or to a particular
	NaN.

	In C, you can do this by combining the "{}" cast with an array
	literal, like:

	    (gdb) p {double}{0x576488BDD2AE9FFE}
	    $1 = 9.8765449999999996e+112

	This patch adds a somewhat similar idea to Ada.  It extends the lexer
	to allow "l" and "f" suffixes in a based literal.  The "f" indicates a
	floating-point literal, and the "l"s control the size of the
	floating-point type.

	Note that this differs from Ada's based real literals.  I believe
	those can also be used to control the bits of a floating-point value,
	but they are a bit more cumbersome to use (simplest is binary but
	that's also very lengthy).  Also, these aren't implemented in GDB.

	I chose not to allow this extension to work with based integer
	literals with exponents.  That didn't seem very useful.

2022-03-07  Tom Tromey  <tromey@adacore.com>

	Fix Ada integer literals with exponents
	While working on another patch, I noticed that Ada integer literals
	with exponents did not work.  For example, with one form you get an
	error:

	    (gdb) print 8e2
	    Invalid digit `e' in based literal

	And with another form you get an incorrect value:

	    (gdb) print 16#8#e2
	    $2 = 8

	This patch fixes the bugs and adds tests.

2022-03-07  Tom Tromey  <tromey@adacore.com>

	Fix gdb.ada/arrayptr.exp results
	PR ada/28115 points out that gdb.ada/arrayptr.exp works with GNAT 12,
	but fails with minimal encodings in earlier versions.

	This patch updates the test to try to report the results correctly.  I
	tried this with the Fedora 34 system gcc (GCC 11) and with a GCC 12
	built from git trunk sometime relatively recently.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28115

2022-03-07  Tom Tromey  <tromey@adacore.com>

	Handle non-ASCII identifiers in Ada
	Ada allows non-ASCII identifiers, and GNAT supports several such
	encodings.  This patch adds the corresponding support to gdb.

	GNAT encodes non-ASCII characters using special symbol names.

	For character sets like Latin-1, where all characters are a single
	byte, it uses a "U" followed by the hex for the character.  So, for
	example, thorn would be encoded as "Ufe" (0xFE being lower case
	thorn).

	For wider characters, despite what the manual says (it claims
	Shift-JIS and EUC can be used), in practice recent versions only
	support Unicode.  Here, characters in the base plane are represented
	using "Wxxxx" and characters outside the base plane using
	"WWxxxxxxxx".

	GNAT has some further quirks here.  Ada is case-insensitive, and GNAT
	emits symbols that have been case-folded.  For characters in ASCII,
	and for all characters in non-Unicode character sets, lower case is
	used.  For Unicode, however, characters that fit in a single byte are
	converted to lower case, but all others are converted to upper case.

	Furthermore, there is a bug in GNAT where two symbols that differ only
	in the case of "Y WITH DIAERESIS" (and potentially others, I did not
	check exhaustively) can be used in one program.  I chose to omit
	handling this case from gdb, on the theory that it is hard to figure
	out the logic, and anyway if the bug is ever fixed, we'll regret
	having a heuristic.

	This patch introduces a new "ada source-charset" setting.  It defaults
	to Latin-1, as that is GNAT's default.  This setting controls how "U"
	characters are decoded -- W/WW are always handled as UTF-32.

	The ada_tag_name_from_tsd change is needed because this function will
	read memory from the inferior and interpret it -- and this caused an
	encoding failure on PPC when running a test that tries to read
	uninitialized memory.

	This patch implements its own UTF-32-based case folder.  This avoids
	host platform quirks, and is relatively simple.  A short Python
	program to generate the case-folding table is included.  It simply
	relies on whatever version of Unicode is used by the host Python,
	which seems basically acceptable.

	Test cases for UTF-8, Latin-1, and Latin-3 are included.  This
	exercises most of the new code paths, aside from Y WITH DIAERESIS as
	noted above.

2022-03-07  Tom Tromey  <tromey@adacore.com>

	Define HOST_UTF32 in charset.h
	rust-parse.c has a #define for the host-specific UTF-32 charset name.
	A later patch needs the same thing, so this patch moves the definition
	to charset.h for easier reuse.

2022-03-07  Tom Tromey  <tromey@adacore.com>

	Let phex and phex_nz handle sizeof_l==1
	Currently, neither phex nor phex_nz handle sizeof_l==1 -- they let
	this case fall through to the default case.  However, a subsequent
	patch in this series needs this case to work correctly.

	I looked at all calls to these functions that pass a 1 for the
	sizeof_l parameter.  The only such case seems to be correct with this
	change.

2022-03-07  Tom Tromey  <tromey@adacore.com>

	Don't pre-size result string in ada_decode
	Currently, ada_decode pre-sizes the output string, filling it with 'X'
	characters.  However, it's a bit simpler and more flexible to let
	std::string do the work here, and simply append characters to the
	string as we go.  This turns out to be useful for a subsequent patch.

	Simplify a regular expression in ada-lex.l
	ada-lex.l uses "%option case-insensitive", so there is no need for
	regular expressions to match upper case.

2022-03-07  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-06  Maciej W. Rozycki  <macro@orcam.me.uk>

	MIPS/opcodes: Fix alias annotation for branch instructions
	Correct issues with INSN2_ALIAS annotation for branch instructions:

	- regular MIPS BEQZ/L and BNEZ/L assembly instructions are idioms for
	  BEQ/L and BNE/L respectively with the `rs' operand equal to $0,

	- microMIPS 32-bit BEQZ and BNEZ assembly instructions are idioms for
	  BEQ and BNE respectively with the `rt' operand equal to $0,

	- regular MIPS BAL assembly instruction is an idiom for architecture
	  levels of up to the MIPSr5 ISA and a machine instruction on its own
	  from the MIPSr6 ISA up.

	Add missing annotation to BEQZ/L and BNEZ/L accordingly then and add a
	new entry for BAL for the MIPSr6 ISA, correcting a disassembly bug:

	$ mips-linux-gnu-objdump -m mips:isa64r6 -M no-aliases -d bal.o

	bal.o:     file format elf32-tradlittlemips

	Disassembly of section .text:

	00000000 <foo>:
	   0:	04110000 	0x4110000
		...
	$

	Add test cases accordingly.

	Parts for regular MIPS BEQZ/L and BNEZ/L instructions from Sagar Patel.

	2022-03-06  Maciej W. Rozycki  <macro@orcam.me.uk>

		binutils/
		* testsuite/binutils-all/mips/mips1-branch-alias.d: New test.
		* testsuite/binutils-all/mips/mips1-branch-noalias.d: New test.
		* testsuite/binutils-all/mips/mips2-branch-alias.d: New test.
		* testsuite/binutils-all/mips/mips2-branch-noalias.d: New test.
		* testsuite/binutils-all/mips/mips32r6-branch-alias.d: New test.
		* testsuite/binutils-all/mips/mips32r6-branch-noalias.d: New
		test.
		* testsuite/binutils-all/mips/micromips-branch-alias.d: New
		test.
		* testsuite/binutils-all/mips/micromips-branch-noalias.d: New
		test.
		* testsuite/binutils-all/mips/mips-branch-alias.s: New test
		source.
		* testsuite/binutils-all/mips/micromips-branch-alias.s: New test
		source.
		* testsuite/binutils-all/mips/mips.exp: Run the new tests.

	2022-03-06  Sagar Patel  <sagarmp@cs.unc.edu>
		    Maciej W. Rozycki  <macro@orcam.me.uk>

		opcodes/
		* mips-opc.c (mips_builtin_opcodes): Fix INSN2_ALIAS annotation
		for "bal", "beqz", "beqzl", "bnez" and "bnezl" instructions.
		* micromips-opc.c (micromips_opcodes): Likewise for "beqz" and
		"bnez" instructions.

2022-03-06  Tom Tromey  <tom@tromey.com>

	Use function view when iterating over block symbols
	This changes iterate_over_block_local_vars and
	iterate_over_block_arg_vars to take a gdb::function_view rather than a
	function pointer and a user-data.  In one spot, this allows us to
	remove a helper structure and helper function.  In another spot, this
	looked more complicated, so I changed the helper function to be an
	"operator()" -- also a simplification, just not as big.

2022-03-06  Tom Tromey  <tom@tromey.com>

	Simplify hppa-tdep.c use of objfile_key
	I happened to notice a couple of unnecessary casts in hppa-tdep.c, and
	then I saw that the use of objfile_key could be simplified -- removing
	some code and using the default deleter rather than noop_deleter.

	Tested by rebuilding.  Let me know what you think.

2022-03-06  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: constify parameter of value_copy
	In a following patch, I have a const value I want to copy using a
	value_copy.  However, value_copy takes a non-const source value, at the
	moment.  Change the paramter to be const,

	If the source value is not lazy, we currently call
	value_contents_all_raw, which calls allocate_value_contents, to get a
	view on the contents.  They both take a non-const value, that's a
	problem.  My first attempt at solving it was to add a const version of
	value_contents_all_raw, make allocate_value_contents take a const value,
	and either:

	 - make value::contents mutable
	 - make allocate_value_contents cast away the const

	The idea being that allocating the value contents buffer does modify the
	value at the bit level, but logically that doesn't change its state.

	That was getting a bit complicated, so what I ended up doing is make
	value_copy not call value_contents_all_raw.  We know at this point that
	the value is not lazy, so value::contents must have been allocate
	already.

	Change-Id: I3741ab362bce14315f712ec24064ccc17e3578d4

2022-03-06  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove internalvar_funcs::destroy
	No kind of internal var uses it remove it.  This makes the transition to
	using a variant easier, since we don't need to think about where this
	should be called (in a destructor or not), if it can throw, etc.

	Change-Id: Iebbc867d1ce6716480450d9790410d6684cbe4dd

2022-03-06  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-05  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-04  Tom Tromey  <tromey@adacore.com>

	Mark vDSO as not a file
	The vDSO objfile is not a real file, so mark it as such.  I noticed
	this because, when playing with debuginfod, I saw:

	Downloading 0.01 MB separate debug info for /tmp/system-supplied DSO at 0x7ffff7fc9000

	That "/tmp" is wrong -- it's just gdb's cwd.  This patch corrects the
	problem, resulting in:

	Downloading 0.01 MB separate debug info for system-supplied DSO at 0x7ffff7fc9000

	Regression tested on x86-64 Fedora 34.

2022-03-04  Simon Marchi  <simon.marchi@polymtl.ca>

	binutils/readelf: fix indentation in process_dynamic_section
	Clangd shows a warning about misleading indentation in this file, fix
	it.

	binutils/ChangeLog:

		* readelf.c (process_dynamic_section): Fix indentation.

	Change-Id: I43a7f4f4c75dd080af614222b980526f5debf297

2022-03-04  Christina Schimpe  <christina.schimpe@intel.com>

	gdb: Use a typedef's scoped type name to identify local typedefs
	GDB prints the wrong type for typedefs in case there is another typedef
	available for the same raw type (gdb/16040).  The reason is that the
	current hashmap based substitution mechanism always compares the target
	type of a typedef and not its scoped name.

	The original output of GDB for a program like

	~~~~
	namespace ns
	{
	  typedef double scoped_double;
	}

	typedef double global_double;

	class TypedefHolder
	{
	public:
	  double a;
	  ns::scoped_double b;
	  global_double c;

	private:
	  typedef double class_double;
	  class_double d;

	  double method1(ns::scoped_double) { return 24.0; }
	  double method2(global_double) { return 24.0; }
	};

	int main()
	{
	  TypedefHolder th;
	  return 0;
	}
	~~~~

	is
	~~~~

	(gdb) b 27
	Breakpoint 1 at 0x1131: file TypedefHolder.cc, line 27.
	(gdb) r
	Starting program: /tmp/typedefholder

	Breakpoint 1, main () at TypedefHolder.cc:27
	27	  return 0;
	(gdb) ptype th
	type = class TypedefHolder {
	  public:
	    class_double a;
	    class_double b;
	    class_double c;
	  private:
	    class_double d;

	    class_double method1(class_double);
	    class_double method2(class_double);

	    typedef double class_double;
	}
	~~~~

	Basically all attributes of a class which have the raw type "double" are
	substituted by "class_double".

	With the patch the output is the following

	~~~~
	type = class TypedefHolder {
	  public:
	    double a;
	    ns::scoped_double b;
	    global_double c;
	  private:
	    class_double d;

	    double method1(ns::scoped_double);
	    double method2(global_double);

	    typedef double class_double;
	}
	~~~~

2022-03-04  Jan Beulich  <jbeulich@suse.com>

	RISC-V: make .insn actually work for 64-bit insns
	Presently in this case, due to an undefined behavior shift, at least
	with x86 cross builds I'm observing:

	Error: value conflicts with instruction length `8,0x0000003f'

	Eliminate the UB and extend the respective testcase.

2022-03-04  Jan Beulich  <jbeulich@suse.com>

	x86: drop redundant x86-64-code16-2 test
	The code16-2 test is already meaningless enough as a gas test, identical
	to this one, and is run uniformly for all ELF targets anyway.

2022-03-04  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-03  Roland McGrath  <mcgrathr@google.com>

	Fix typo in last change.

2022-03-03  Roland McGrath  <mcgrathr@google.com>

	Avoid conflict with gnulib open/close macros.
	On some systems, the gnulib configuration will decide to define open
	and/or close as macros to replace the POSIX C functions.  This
	interferes with using those names in C++ class or namespace scopes.

	gdbsupport/
		* event-pipe.cc (event_pipe::open): Renamed to ...
		(event_pipe::open_pipe): ... this.
		(event_pipe::close): Renamed to ...
		(event_pipe::close_pipe): ... this.
		* event-pipe.h (class event_pipe): Updated.
	gdb/
		* inf-ptrace.h (async_file_open, async_file_close): Updated.
	gdbserver/
		* gdbserver/linux-low.cc (linux_process_target::async): Likewise.

2022-03-03  Alan Modra  <amodra@gmail.com>

	Adjust ld ctf test for 32-bit targets
	powerpc-linux, and I suspect other 32-bit targets, report "aligned at
	0x4" for this test.

		* testsuite/ld-ctf/nonrepresentable.d: Accept any alignment.

2022-03-03  Luis Machado  <luis.machado@arm.com>

	Update my e-mail address in the MAINTAINERS file
	Update the information accordingly.

2022-03-03  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: testsuite: fix failed testcases in gdb.base/gdb-caching-proc.exp
	When execute the following command:

	  make check-gdb TESTS="gdb.base/gdb-caching-proc.exp"

	we can see there exist some failed testcases:

	  FAIL: gdb.base/gdb-caching-proc.exp: can_spawn_for_attach: 0: can spawn for attach (got interactive prompt)
	  FAIL: gdb.base/gdb-caching-proc.exp: can_spawn_for_attach: 1: can spawn for attach (got interactive prompt)
	  FAIL: gdb.base/gdb-caching-proc.exp: can_spawn_for_attach: 2: can spawn for attach (got interactive prompt)
	  FAIL: gdb.base/gdb-caching-proc.exp: can_spawn_for_attach: 3: can spawn for attach (got interactive prompt)
	  FAIL: gdb.base/gdb-caching-proc.exp: can_spawn_for_attach: 4: can spawn for attach (got interactive prompt)
	  FAIL: gdb.base/gdb-caching-proc.exp: can_spawn_for_attach: 5: can spawn for attach (got interactive prompt)
	  FAIL: gdb.base/gdb-caching-proc.exp: can_spawn_for_attach: 6: can spawn for attach (got interactive prompt)
	  FAIL: gdb.base/gdb-caching-proc.exp: can_spawn_for_attach: 7: can spawn for attach (got interactive prompt)
	  FAIL: gdb.base/gdb-caching-proc.exp: can_spawn_for_attach: 8: can spawn for attach (got interactive prompt)
	  FAIL: gdb.base/gdb-caching-proc.exp: can_spawn_for_attach: 9: can spawn for attach (got interactive prompt)

	here are the detailed messages in gdb/testsuite/gdb.log:

	  attach 873776
	  A program is being debugged already.  Kill it? (y or n) n
	  Not killed.
	  (gdb) FAIL: gdb.base/gdb-caching-proc.exp: can_spawn_for_attach: 0: can spawn for attach (got interactive prompt)

	so handle the case "A program is being debugged already.  Kill it" in
	can_spawn_for_attach to fix the failed testcases.

2022-03-03  Alan Modra  <amodra@gmail.com>

	comment typo fix

2022-03-03  Alan Modra  <amodra@gmail.com>

	PowerPC64 DT_RELR relative reloc addresses
	Section addresses can change between ppc64_elf_size_stubs and
	ppc64_elf_build_stubs due to .eh_frame editing.  The idea of stashing
	r_offset final addresses calculated in ppc64_elf_size_stubs for use by
	ppc64_elf_build_stubs was never a good idea.  Instead, we need to keep
	section/offset pairs.

		* elf64-ppc.c (struct ppc_link_hash_table): Delete relr_addr.
		Add relr section/offset array.
		(append_relr_off): Rewrite.  Update all callers.
		(sort_relr): New function.
		(ppc64_elf_size_stubs): Adjust to suit new relative reloc stash.
		(ppc64_elf_build_stubs): Likewise.

2022-03-03  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-02  John Baldwin  <jhb@FreeBSD.org>

	configure: Stop checking for PT_GETXMMREGS.
	This request is present on all modern *BSD/i386 systems (those
	released since mid-2006), and the *BSD/i386 targets now assume it is
	present unconditionally.

	i386-bsd-nat: Assume PT_GETXMMREGS is present.
	NetBSD has included PT_GETXMMREGS since 1.6 released in September
	2002.  OpenBSD has included PT_GETXMMREGS since 3.8 released in
	November 2005.

	i386-fbsd-nat: Assume PT_GETXMMREGS is present.
	PT_GETXMMREGS was first added in FreeBSD 6.0 released in November 2005.
	The last FreeBSD release without support was 5.5 released in May 2006.

2022-03-02  John Baldwin  <jhb@FreeBSD.org>

	fbsd-tdep: Implement the vsyscall_range gdbarch hook.
	FreeBSD recently added a real vDSO in its shared page for the amd64
	architecture.  The vDSO is mapped at the address given by the
	AT_KPRELOAD ELF auxiliary vector entry.  To find the end of the
	mapping range, parse the list of virtual map entries used by 'info
	proc mappings' either from the NT_PROCSTAT_VMMAP core dump note, or
	via the kinfo_getvmmap function for native targets (fetched from the
	native target as the TARGET_OBJECT_FREEBSD_VMMAP object).

	This silences warnings on recent FreeBSD/amd64 kernels due to not
	finding symbols for the vdso:

	warning: Could not load shared library symbols for [vdso].
	Do you need "set solib-search-path" or "set sysroot"?

2022-03-02  Tom Tromey  <tromey@adacore.com>

	Rewrite make-target-delegates in Python
	I think gdb is probably better off having fewer languages involved
	when generating code.  'sh' is unavoidable for build-time generation,
	but for other things, let's use Python.

	This rewrites make-target-delegates in Python.  I've stuck pretty
	closely to the original code in this rewrite, so it may look slightly
	weird from a Python perspective.

	The only output difference is that a copyright header is now
	generated, using the code introduced in the previous patch.

	make-target-delegates.py is simpler to invoke, as it knows the correct
	input file to scan and it creates the output file itself.

2022-03-02  Tom Tromey  <tromey@adacore.com>

	Move copyright code from gdbarch.py to new file
	This moves the copyright code from gdbarch.py to a new Python source
	file, gdbcopyright.py.  The function in this file will find the
	copyright dates by scanning the calling script.  This will be reused
	in a future patch.

	This involved minor changes to the output of gdbarch.py.  Also, I've
	updated copyright.py to remove the reference to gdbarch.sh.  We don't
	need to mention gdbarch.py there, either.

2022-03-02  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-03-01  Tom Tromey  <tom@tromey.com>

	Some "distclean" fixes in gdb
	PR build/12440 points out that "make distclean" is broken in gdb.
	Most of the breakage comes from other projects in the tree, but we can
	fix some of the issues, which is what this patch does.

	Note that the yacc output files, like c-exp.c, are left alone.  In a
	source distribution, these are included in the tarball, and if the
	user builds in-tree, we would not want to remove them.

	While that seems a bit obscure, it seems to me that "distclean" is
	only really useful for in-tree builds anyway -- out-of-tree I simply
	delete the entire build directory and start over.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=12440

2022-03-01  Tom Tromey  <tom@tromey.com>

	Fix typo in the "alias" example
	PR cli/17332, filed around 8 years ago, points out a typo in the docs
	-- in one example, the command and its output are obviously out of
	sync.  This patch fixes it.  I'm checking this in as obvious.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=17332

2022-03-01  Nick Clifton  <nickc@redhat.com>

	Fix a typo in the previous delta to bfdio.c.
		PR 25713
		* bfdio.c (_bfd_real_fopen): Fix typo.

2022-03-01  Alan Modra  <amodra@gmail.com>

	Revert "Check thin archive element file size against archive header"
	This reverts commit 48e3e6aec8a4f37d00ea6c0da3ab45e76490e3db.

		PR 28929
		* archive.c (_bfd_get_elt_at_filepos): Don't check thin archive
		element file size.

2022-03-01  Nick Clifton  <nickc@redhat.com>

	Fix linker tests to compile with gcc-12.
		PR 21964
		* testsuite/ld-elf/pr21964-1a.c: Fix array comparisons.
		* testsuite/ld-elf/pr21964-1b.c: Likewise.
		* testsuite/ld-elf/pr21964-1c.c: Likewise.
		* testsuite/ld-elf/pr21964-2a.c: Likewise.
		* testsuite/ld-elf/pr21964-2b.c: Likewise.
		* testsuite/ld-elf/pr21964-3a.c: Likewise.

	Prevent an assertion from being triggered when linking an ARM object file with incorrectly set build attributes.
		PR 28848
		PR 28859
		* elf32-arm.c (elf32_arm_merge_eabi_attributes): If the first
		input bfd has a Tag_ABI_HardFP_use set to 3 but does not also have
		TAG_FP_arch set then reset the TAG_ABI_HardFP_use.

2022-03-01  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: testsuite: fix wrong expected result in attach-pie-noexec.exp
	If /proc/sys/kernel/yama/ptrace_scope is 1, when execute the test case
	gdb.base/attach-pie-noexec.exp without superuser, the gdb.log shows the
	following info:

	  (gdb) attach 6500
	  Attaching to process 6500
	  ptrace: Operation not permitted.
	  (gdb) PASS: gdb.base/attach-pie-noexec.exp: attach

	It is obviously wrong, the expected result should be UNSUPPORTED in such
	a case.

	It is better to make can_spawn_for_attach to return false for this case.
	It would have to setup a small test program, compile it to exec, spawn it
	and try to attach to it.

	With this patch, we can see "Operation not permitted" in the log info,
	and then we can do the following processes to test:
	(1) set ptrace_scope as 0
	    $ echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
	    $ make check-gdb TESTS="gdb.base/attach-pie-noexec.exp"
	(2) use sudo
	    $ sudo make check-gdb TESTS="gdb.base/attach-pie-noexec.exp"

	Additionally, handle the other cases when test with RUNTESTFLAGS=
	"--target_board=native-extended-gdbserver".

2022-03-01  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: testsuite: print explicit test result in can_spawn_for_attach
	In the current code, there is no test result when execute the following
	commands:

	  $ make check-gdb TESTS="gdb.base/attach-pie-noexec.exp" RUNTESTFLAGS="--target_board=remote-gdbserver-on-localhost"
	  $ make check-gdb TESTS="gdb.base/attach-pie-noexec.exp" RUNTESTFLAGS="--target_board=native-gdbserver"

	It is better to print explicit test result in can_spawn_for_attach.

2022-03-01  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: add Tiezhu Yang as LoongArch maintainer
	The patch series "gdb: Add basic support for LoongArch" has been
	merged into master, list Tiezhu Yang as LoongArch maintainer.

2022-03-01  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-02-28  Keith Seitz  <keiths@redhat.com>

	Fix "spawn id XYZ not open" errors in gdb.mi/mi-exec-run.exp
	Running mi-exec-run.exp on native-extended-gdbserver/-m{32,64}
	causes several Tcl errors to appear. For example,

	(gdb)
	ERROR: : spawn id exp20 not open
	    while executing
	"expect {
	-i exp11 -timeout 10
	                -i "$inferior_spawn_id"
	                -re ".*Cannot exec.*Permission denied" {
	                    set saw_perm_error 1
	                    verbose -log "saw..."
	    ("uplevel" body line 1)
	    invoked from within
	"uplevel $body" NONE : spawn id exp20 not open
	UNRESOLVED: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=separate: force-fail=1: run failure detected (eof)

	This is happening because of the way this test is implemented:

	        while {1} {
	            gdb_expect {
	                -i "$inferior_spawn_id"
	                -re ".*Cannot exec.*Permission denied" {
	                    set saw_perm_error 1
	                    verbose -log "saw mi error"
	                }
	                -i "$gdb_spawn_id"
	                -re "\\^error,msg=\"During startup program exited with code 127" {
	                    set saw_mi_error 1
	                    verbose -log "saw mi error"
	                }
	               # and so on
	            }
	        }

	The first time this loop is executed, `inferior_spawn_id' is valid. When the
	first branch of the expect statement is reached, gdbserver has exited, closing
	the spawn_id.  Since we haven't seen the gdb-side error yet, the loop is executed
	again.  The first branch now refers to a non-existent spawn_id, leading to the error.

	This can be fixed by using exp_continue to loop in expect instead of looping around
	expect, which is the approach I have used[1].  Note I've had to update the expected
	message for the "During startup..." error message when running with gdbserver.

	One other small change I've made is to add a log entry which spills the values of
	the two variables, saw_mi_error and saw_perm_error (and updated the log output
	for the later).  This should make the log output clearer about why the test failed.

	With this patch installed, all the ERRORs disappear, leaving previously masked
	FAILs (which I have not attempted to fix).

	[1] Anyone know why this test doesn't simply use gdb_test_multiple? I can only
	assume that it was intentionally written this way, and I've modified the code with
	that assumption. I have tested a version using gdb_test_multiple, and that appears
	to work fine, too, if that is preferred. [It still employs exp_continue to fix the
	spawn_id errors.]

2022-02-28  Tom Tromey  <tromey@adacore.com>

	Add more filename styling
	I found a few spots where filename styling ought to be applied, but is
	not.

2022-02-28  Tom Tromey  <tromey@adacore.com>

	Fix maybe-uninitialized warning in py-infthread.c
	I got this warning from py-infthread.c using the Fedora 34 system GCC:

	../../binutils-gdb/gdb/python/py-infthread.c:102:30: warning: ‘extra_info’ may be used uninitialized in this function [-Wmaybe-uninitialized]

	I think this happens because GDB_PY_HANDLE_EXCEPTION expands to an
	'if' whose condition is always true -- but GCC can't know this.  This
	patch avoids the warning by adding a harmless initialization.

2022-02-28  Tom Tromey  <tromey@adacore.com>

	Handle multi-byte bracket sequences in Ada lexer
	As noted in an earlier patch, the Ada lexer does not handle multi-byte
	bracket sequences.  This patch adds support for these for character
	literals.  gdb does not generally seem to handle the Ada wide string
	types, so for the time being these continue to be excluded -- but an
	explicit error is added to make this more clear.

2022-02-28  Tom Tromey  <tromey@adacore.com>

	Handle 'QWW' encoding case in Ada enums
	In Ada, an enum can contain character literals.  GNAT encodes these
	values in a special way.  For example, the Unicode character U+0178
	would be represented as 'QW0178' in the DWARF:

	 <3><112f>: Abbrev Number: 2 (DW_TAG_enumerator)
	    <1130>   DW_AT_name        : (indirect string, offset: 0x19ff): QW0178
	    <1134>   DW_AT_const_value : 2

	gdb handles this reasonably well, but failed to handle the 'QWW'
	encoding, which is used for characters outside the base plane.

	Also, while working on this, I noticed that gdb will print the decimal
	value for an enum character constant:

	    (gdb) print Char_X
	    $2 = 1 'x'

	This is a nice feature, IMO, because in this situation the 'x' enum
	constant does not have its usual decimal value -- it has the value
	that's assigned based on the enumeration type.

	However, gdb did not do this when it decided to print the constant
	using the bracket notation:

	    (gdb) print Char_Thorn
	    $3 = ["de"]

	This patch changes gdb to print the decimal value here as well, and to
	put the bracket notation in single quotes -- otherwise gdb will be
	printing something that it can't then read.  Now it looks like:

	    (gdb) print Char_Thorn
	    $3 = 4 '["de"]'

	Note that gdb can't read longer bracket notations, like the other ones
	printed in this test case:

	    (gdb) print Char_King
	    $4 = 3 '["01fa00"]'

	While I think this is a bug, I plan to fix it separately.

	Finally, in the new test case, the copyright dates are chosen this way
	because this all started as a copy of an existing test.

2022-02-28  Andrew Burgess  <aburgess@redhat.com>

	gdb/python: Add gdb.InferiorThread.details attribute
	This adds a new read-only attribute gdb.InferiorThread.details, this
	attribute contains a string, the results of target_extra_thread_info
	for the thread, or None, if target_extra_thread_info returns nullptr.

	As the string returned by target_extra_thread_info is unstructured,
	this attribute is only really useful for echoing straight through to
	the user, but, if a user wants to write a command that displays the
	same, or a similar 'Thread Id' to the one seen in 'info threads', then
	they need access to this string.

	Given that the string produced by target_extra_thread_info varies by
	target, there's only minimal testing of this attribute, I check that
	the attribute can be accessed, and that the return value is either
	None, or a string.

2022-02-28  Keith Seitz  <keiths@redhat.com>

	Error when gdb_is_target_1 is called without running gdb instance
	This is a snafu that I encountered while implementing the previous
	patch, which attempted to use gdb_is_target_native.  This proc and
	gdb_is_target_remote both rely on gdb_is_target_1, which actually
	cannot be called without gdb already running.

	This patch adds appropriate warning comments to these procs and
	causes gdb_is_target_1 to issue a Tcl error if it is called without a
	gdb instance already running.  This should prevent unwitting callers
	from using this at the wrong time.

2022-02-28  Keith Seitz  <keiths@redhat.com>

	Fix gdb.fortran "failed to extract expected results" errors
	When running the gdb.fortran tests array-slices.exp and lbound-ubound.exp,
	the test suite throws several ERRORs on native-gdbserver/-m{32,64},
	and native-extended-gdbsever/-m{32,64}:

	[on native-extended-gdbserver/-m64]
	Running /home/keiths/work/gdb/branches/testsuite-errors/linux/gdb/testsuite/../../../src/gdb/testsuite/gdb.fortran/array-slices.exp ...
	ERROR: failed to extract expected results
	ERROR: failed to extract expected results
	Running /home/keiths/work/gdb/branches/testsuite-errors/linux/gdb/testsuite/../../../src/gdb/testsuite/gdb.fortran/lbound-ubound.exp ...
	ERROR: failed to extract expected results for lbound

	This occurs because the tests require inferior I/O which we do not have
	access to while using these targets.

	This patch skips these tests when running on non-native targets.

2022-02-28  Torbj?rn Svensson  <torbjorn.svensson@st.com>

	Further correct the handling of long pathnames on Windows hosts.
		PR 25713
		* bfdio.c (_bfd_real_fopen): Fix handling of parhs longer than 260
		characters on Windows hosts.

2022-02-28  Nick Clifton  <nickc@redhat.com>

	Clarify the wording of the error message when an obsolete configuration is encountered.
		PR 28886
		* config.bfd: Update error message for obsolete configurations.

2022-02-28  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-02-27  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-02-26  Kevin Buettner  <kevinb@redhat.com>

	Handle recursive internal problem in gdb_internal_error_resync
	I came across this problem when testing gdb.base/gdb-sigterm.exp
	on a machine with a pre-release version of glib-2.34 installed:

	A problem internal to GDB has been detected,
	further debugging may prove unreliable.
	Quit this debugging session? (y or n) Recursive internal problem.
	FAIL: gdb.base/gdb-sigterm.exp: expect eof #0 (GDB internal error)
	Resyncing due to internal error.
	ERROR: : spawn id exp11 not open
	    while executing
	"expect {
	-i exp11 -timeout 10
		    -re "Quit this debugging session\\? \\(y or n\\) $" {
			send_gdb "n\n" answer
			incr count
		    }
		    -re "Create..."
	    ("uplevel" body line 1)
	    invoked from within
	"uplevel $body" NONE : spawn id exp11 not open
	ERROR: Could not resync from internal error (timeout)
	gdb.base/gdb-sigterm.exp: expect eof #0: stepped 9 times
	UNRESOLVED: gdb.base/gdb-sigterm.exp: 50 SIGTERM passes

	I don't have a problem with the latter ERROR nor the UNRESOLVED
	messages.  However the first ERROR regarding the exp11 spawn id
	not being open is not especially useful.

	This commit handles the "Recursive internal problem" case, avoiding
	the problematic ERROR shown above.

	With this commit in place, the log messages look like this instead:

	A problem internal to GDB has been detected,
	further debugging may prove unreliable.
	Quit this debugging session? (y or n) Recursive internal problem.
	FAIL: gdb.base/gdb-sigterm.exp: expect eof #15 (GDB internal error)
	Resyncing due to internal error.
	ERROR: Could not resync from internal error (recursive internal problem)
	gdb.base/gdb-sigterm.exp: expect eof #15: stepped 12 times
	UNRESOLVED: gdb.base/gdb-sigterm.exp: 50 SIGTERM passes

	gdb/testsuite/ChangeLog:

		* lib/gdb.exp (gdb_internal_error_resync): Handle "Recursive
		internal problem".

2022-02-26  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-02-25  Aaron Merey  <amerey@redhat.com>

	gdb-add-index: disable debuginfod
	gdb-add-index may trigger debuginfod's first-use notice.  The notice
	is misleading in this case.  It instructs the user to modify .gdbinit
	in order to permanently enable/disable debuginfod but gdb-add-index
	invokes gdb with -nx which ignores .gdbinit.

	Additionally debuginfod is not needed for gdb-add-index since the
	symbol file is given as an argument and should already be present
	locally.

	Fix this by disabling debuginfod when gdb-add-index invokes gdb.

2022-02-25  Andrew Burgess  <aburgess@redhat.com>

	gdb: add operator+= and operator+ overload for std::string
	This commit adds operator+= and operator+ overloads for adding
	gdb::unique_xmalloc_ptr<char> to a std::string.  I could only find 3
	places in GDB where this was useful right now, and these all make use
	of operator+=.

	I've also added a self test for gdb::unique_xmalloc_ptr<char>, which
	makes use of both operator+= and operator+, so they are both getting
	used/tested.

	There should be no user visible changes after this commit, except when
	running 'maint selftest', where the new self test is visible.

2022-02-25  Tom Tromey  <tromey@adacore.com>

	Print MI prompt on interrupted command
	Joel noticed that if the remote dies unexpectedly during a command --
	you can simulate this by using "continue" and then killing gdbserver
	-- then the CLI will print a new prompt, but MI will not.  Later, we
	found out that this was also filed in bugzilla as PR mi/23820.

	The output looks something like this:

	    | (gdb)
	    | cont
	    | &"cont\n"
	    | ~"Continuing.\n"
	    | ^running
	    | *running,thread-id="all"
	    | (gdb)
	    | [... some output from GDB during program startup...]
	    | =thread-exited,id="1",group-id="i1"
	    | =thread-group-exited,id="i1"
	    | &"Remote connection closed\n"

	Now, what about that "(gdb)" in the middle?

	That prompt comes from this questionable code in
	mi-interp.c:mi_on_resume_1:

	      /* This is what gdb used to do historically -- printing prompt
		 even if it cannot actually accept any input.  This will be
		 surely removed for MI3, and may be removed even earlier.  */
	      if (current_ui->prompt_state == PROMPT_BLOCKED)
		fputs_unfiltered ("(gdb) \n", mi->raw_stdout);

	... which seems like something to remove.  But maybe the intent here
	is that this prompt is sufficient, and MI clients must be ready to
	handle output coming after a prompt.  On the other hand, if this code
	*is* removed, then nothing would print a prompt in this scenario.

	Anyway, the CLI and the TUI handle emitting the prompt here by hooking
	into gdb::observers::command_error, but MI doesn't install an observer
	here.

	This patch adds the missing observer and arranges to show the MI
	prompt.  Regression tested on x86-64 Fedora 34.

	It seems like this area could be improved a bit, by having
	start_event_loop call the prompt-displaying code directly, rather than
	indirecting through an observer.  However, I haven't done this.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=23820

2022-02-25  Andrew Burgess  <aburgess@redhat.com>
	    Tom Tromey  <tromey@adacore.com>

	gdb/testsuite: fix list.exp test cases
	PR testsuite/7142 -- old enough to have been converted from Gnats --
	points out that test_list_filename_and_function in gdb.base/list.exp
	has "fails" that are unmatched with passes.  This patch cleans this up
	a little.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=7142

2022-02-25  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Remove a loop in the ISA parser
	Since commit e601909a3287bf541c6a7d82214bb387d2c76d82 ("RISC-V: Support
	to parse the multi-letter prefix in the architecture string.") changed
	so that all prefixed extensions are parsed in single
	riscv_parse_prefixed_ext call, a "while" loop on riscv_parse_subset
	is no longer required.

	bfd/ChangeLog:

		* elfxx-riscv.c (riscv_parse_subset): Remove unnecessary loop.

2022-02-25  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Fix mask for some fcvt instructions
	This commit fixes incorrect uses of mask values in 'fcvt' instruction
	family.

	opcodes/ChangeLog:

		* riscv-opc.c (riscv_opcodes): Fix incorrect uses of mask values
		in 'fcvt' instruction family.

2022-02-25  Keith Seitz  <keiths@redhat.com>

	Support template lookups in strncmp_iw_with_mode
	This patch adds support for wild template parameter list matches, similar
	to how ABI tags or function overloads are now handled.

	With this patch, users will be able to "gloss over" the details of matching
	template parameter lists.  This is accomplished by adding (yet more) logic
	to strncmp_iw_with_mode to skip parameter lists if none is explicitly given
	by the user.

	Here's a simple example using gdb.linespec/cpls-ops.exp:

	Before
	------
	(gdb) ptype test_op_call
	type = struct test_op_call {
	  public:
	    void operator()(void);
	    void operator()(int);
	    void operator()(long);
	    void operator()<int>(int *);
	}
	(gdb) b test_op_call::operator()
	Breakpoint 1 at 0x400583: test_op_call::operator(). (3 locations)
	(gdb) i b
	Num     Type           Disp Enb Address            What
	1       breakpoint     keep y   <MULTIPLE>
	1.1                         y     0x400583 in test_op_call::operator()(int)
	                                                   at cpls-ops.cc:43
	1.2                         y     0x40058e in test_op_call::operator()()
	                                                   at cpls-ops.cc:47
	1.3                         y     0x40059e in test_op_call::operator()(long)
	                                                   at cpls-ops.cc:51

	The breakpoint at test_op_call::operator()<int> was never set.

	After
	-----
	(gdb) b test_op_call::operator()
	Breakpoint 1 at 0x400583: test_op_call::operator(). (4 locations)
	(gdb) i b
	Num     Type           Disp Enb Address            What
	1       breakpoint     keep y   <MULTIPLE>
	1.1                         y     0x400583 in test_op_call::operator()(int)
	                                                   at cpls-ops.cc:43
	1.2                         y     0x40058e in test_op_call::operator()()
	                                                   at cpls-ops.cc:47
	1.3                         y     0x40059e in test_op_call::operator()(long)
	                                                   at cpls-ops.cc:51
	1.4                         y     0x4008d0 in test_op_call::operator()<int>(int*)
	                                                   at cpls-ops.cc:57

	Similar to how scope lookups work, passing "-qualified" to the break command
	will cause a literal lookup of the symbol.  In the example immediately above,
	this will cause GDB to only find the three non-template functions.

2022-02-25  Keith Seitz  <keiths@redhat.com>

	Unit tests for strncmp_iw_with_mode
	This patch attempts to make a start at adding unit tests for
	strncmp_iw_with_mode.  While there is quite a bit of testing
	of this function in other tests, these are currently end-to-end
	tests.

	This patch attempts to cover the basics of string matching, white
	space, C++ ABI tags, and several other topics. However, one area
	that is ostensibly missing is testing the `match_for_lcd' feature.
	This is otherwise tested as part of our end-to-end DejaGNU-based
	testing.

2022-02-25  Keith Seitz  <keiths@redhat.com>

	Move find_toplevel_char to cp-support.[ch]
	find_toplevel_char is being used more and more outside of linespec.c, so
	this patch moves it into cp-support.[ch].

2022-02-25  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-02-24  Tom Tromey  <tom@tromey.com>
	    Andrew Burgess  <aburgess@redhat.com>

	Fix crash in Fortran code
	PR fortran/28801 points out a gdb crash that can be provoked by
	certain Fortran code.  The bug is that f77_get_upperbound assumes the
	property is either a constant or undefined, but in this case it is
	PROP_LOCEXPR.

	This patch fixes the crash by making this function (and the
	lower-bound one as well) do the correct check before calling
	'const_val'.

	Thanks to Andrew for writing the test case.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28801

2022-02-24  John Baldwin  <jhb@FreeBSD.org>

	Revert "do_target_wait_1: Clear TARGET_WNOHANG if the target isn't async."
	Commit 14b3360508b1 ("do_target_wait_1: Clear
	TARGET_WNOHANG if the target isn't async.") broke some multi-target
	tests, such as gdb.multi/multi-target-info-inferiors.exp.  The symptom
	is that execution just hangs at some point.  What happens is:

	1. One remote inferior is started, and now sits stopped at a breakpoint.
	   It is not "async" at this point (but it "can async").

	2. We run a native inferior, the event loop gets woken up by the native
	   target's fd.

	3. In do_target_wait, we randomly choose an inferior to call target_wait
	   on first, it happens to be the remote inferior.

	4. Because the target is currently not "async", we clear
	   TARGET_WNOHANG, resulting in synchronous wait.  We therefore block
	   here:

	  #0  0x00007fe9540dbb4d in select () from /usr/lib/libc.so.6
	  #1  0x000055fc7e821da7 in gdb_select (n=15, readfds=0x7ffdb77c1fb0, writefds=0x0, exceptfds=0x7ffdb77c2050, timeout=0x7ffdb77c1f90) at /home/simark/src/binutils-gdb/gdb/posix-hdep.c:31
	  #2  0x000055fc7ddef905 in interruptible_select (n=15, readfds=0x7ffdb77c1fb0, writefds=0x0, exceptfds=0x7ffdb77c2050, timeout=0x7ffdb77c1f90) at /home/simark/src/binutils-gdb/gdb/event-top.c:1134
	  #3  0x000055fc7eda58e4 in ser_base_wait_for (scb=0x6250002e4100, timeout=1) at /home/simark/src/binutils-gdb/gdb/ser-base.c:240
	  #4  0x000055fc7eda66ba in do_ser_base_readchar (scb=0x6250002e4100, timeout=-1) at /home/simark/src/binutils-gdb/gdb/ser-base.c:365
	  #5  0x000055fc7eda6ff6 in generic_readchar (scb=0x6250002e4100, timeout=-1, do_readchar=0x55fc7eda663c <do_ser_base_readchar(serial*, int)>) at /home/simark/src/binutils-gdb/gdb/ser-base.c:444
	  #6  0x000055fc7eda718a in ser_base_readchar (scb=0x6250002e4100, timeout=-1) at /home/simark/src/binutils-gdb/gdb/ser-base.c:471
	  #7  0x000055fc7edb1ecd in serial_readchar (scb=0x6250002e4100, timeout=-1) at /home/simark/src/binutils-gdb/gdb/serial.c:393
	  #8  0x000055fc7ec48b8f in remote_target::readchar (this=0x617000038780, timeout=-1) at /home/simark/src/binutils-gdb/gdb/remote.c:9446
	  #9  0x000055fc7ec4da82 in remote_target::getpkt_or_notif_sane_1 (this=0x617000038780, buf=0x6170000387a8, forever=1, expecting_notif=1, is_notif=0x7ffdb77c24f0) at /home/simark/src/binutils-gdb/gdb/remote.c:9928
	  #10 0x000055fc7ec4f045 in remote_target::getpkt_or_notif_sane (this=0x617000038780, buf=0x6170000387a8, forever=1, is_notif=0x7ffdb77c24f0) at /home/simark/src/binutils-gdb/gdb/remote.c:10037
	  #11 0x000055fc7ec354d4 in remote_target::wait_ns (this=0x617000038780, ptid=..., status=0x7ffdb77c33c8, options=...) at /home/simark/src/binutils-gdb/gdb/remote.c:8147
	  #12 0x000055fc7ec38aa1 in remote_target::wait (this=0x617000038780, ptid=..., status=0x7ffdb77c33c8, options=...) at /home/simark/src/binutils-gdb/gdb/remote.c:8337
	  #13 0x000055fc7f1409ce in target_wait (ptid=..., status=0x7ffdb77c33c8, options=...) at /home/simark/src/binutils-gdb/gdb/target.c:2612
	  #14 0x000055fc7e19da98 in do_target_wait_1 (inf=0x617000038080, ptid=..., status=0x7ffdb77c33c8, options=...) at /home/simark/src/binutils-gdb/gdb/infrun.c:3636
	  #15 0x000055fc7e19e26b in operator() (__closure=0x7ffdb77c2f90, inf=0x617000038080) at /home/simark/src/binutils-gdb/gdb/infrun.c:3697
	  #16 0x000055fc7e19f0c4 in do_target_wait (ecs=0x7ffdb77c33a0, options=...) at /home/simark/src/binutils-gdb/gdb/infrun.c:3716
	  #17 0x000055fc7e1a31f7 in fetch_inferior_event () at /home/simark/src/binutils-gdb/gdb/infrun.c:4061

	Before the aforementioned commit, we would not have cleared
	TARGET_WNOHANG, the remote target's wait would have returned nothing,
	and we would have consumed the native target's event.

	After applying this revert, the testsuite state looks as good as before
	for me on Ubuntu 20.04 amd64.

	Change-Id: Ic17a1642935cabcc16c25cb6899d52e12c2f5c3f

2022-02-24  Andrew Burgess  <aburgess@redhat.com>

	gdb: use a range based for loop when iterating over an array
	Make use of a range based for loop to iterate over a static global
	array, removing the need to have a null entry at the end of the
	array.

	There should be no user visible changes after this commit.

2022-02-24  Dominique Quatravaux  <dominique.quatravaux@epfl.ch>
	    Louis-He  <1726110778@qq.com>
	    Philippe Blain  <levraiphilippeblain@gmail.com>

	gdb/darwin: skip over WIFSTOPPED wait4 status
	On modern Darwin's, there appears to be a new circumstance in which a
	MACH_NOTIFY_DEAD_NAME message can be received, and which was not
	previously accounted for: to signal the WIFSTOPPED condition in the
	debuggee. In that case the debuggee is not dead yet (and in fact,
	counting it as dead would cause a zombie leak - A process in such a
	state reparents to PID 1, but cannot be killed).

	 - Read and ignore such messages (counting on the next exception message
	   to let us know of the inferior's new state again)
	 - Refactor logging so as to clearly distinguish between the
	   MACH_NOTIFY_DEAD_NAME cases (WIFEXITED, WIFSTOPPED, signal, or
	   something else), and warn in the last case

	Change-Id: Ie86904a894e9bd154e6b674b1bfbfbaee7fde3e1

2022-02-24  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/linux-tdep: move "Perms" column right
	Commit 29ef4c0699e1 ("gdb/linux-tdep.c: Add Perms to the 'info proc
	mappings' output") has broken test gdb.base/info-proc.exp on Linux,
	because it changes the output of "info proc mappings" in a way that the
	test does not expect (my bad for not testing before pushing).

	I looked at how FreeBSD handles this, since I remembered it did show
	permission flags.  It looks like this:

	          Start Addr           End Addr       Size     Offset   Flags   File
	            0x200000           0x243000    0x43000        0x0  r-- CN-- /usr/local/bin/tmux

	(I think that `Flags` and the flags not being aligned is not
	intentional)

	The test passes on FreeBSD, because the test looks for four hex numbers
	in a row and ignores the rest:

	    ".*Mapped address spaces:.*${hex}${ws}${hex}${ws}${hex}${ws}${hex}.*"

	I suggest fixing it on Linux by moving the flags column to the same
	place as in the FreeBSD output.  It makes things a bit more consistent
	between OSes, and we don't have to touch the test.

	At the same time, make use of the actual length of the permission's
	string to specify the number of characters to print.

	Before this patch, the output looks like:

	          Start Addr           End Addr   Perms       Size     Offset objfile
	      0x55dd4b544000     0x55dd4b546000   r--p      0x2000        0x0 /usr/bin/sleep

	and after, it looks like:

	          Start Addr           End Addr       Size     Offset  Perms  objfile
	      0x5622ae662000     0x5622ae664000     0x2000        0x0  r--p   /usr/bin/sleep

	Change-Id: If0fc167b010b25f97a3c54e2f491df4973ccde8f

2022-02-24  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/linux-tdep: make read_mapping return a structure
	Change read_mapping to return a structure instead of taking many output
	parameters.  Change the string + length output parameters (permissions
	and device) to be gdb::string_view, since that's what string_view is
	for (a non-NULL terminated view on a string).  No changes in behavior
	expected.

	Change-Id: I86e627d84d3dda8c9b835592b0f4de8d90d12112

2022-02-24  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-02-23  Tom Tromey  <tromey@adacore.com>

	Fix bug in C++ overload resolution
	PR c++/28901 points out a bug in C++ overload resolution.  When
	comparing two overloads, one might be better than the other for
	certain parameters -- but, if that one also has some invalid
	conversion, then it should never be considered the better choice.
	Instead, a valid-but-not-apparently-quite-as-good overload should be
	preferred.

	This patch fixes this problem by changing how overload comparisons are
	done.  I don't believe it should affect any currently valid overload
	resolution; nor should it affect resolutions where all the choices are
	equally invalid.

2022-02-23  Dominik 'Disconnect3d' Czarnota  <dominik.b.czarnota@gmail.com>

	gdb/linux-tdep.c: Add Perms to the 'info proc mappings' output
	Fixes #28914 and so it adds a 'Perms' (permissions) column to the
	'info proc mappings' command output. This will allow users to know
	the memory pages permissions right away from GDB instead of having
	to fetch them from the /proc/$pid/maps file (which is also what GDB
	does internally, but it just did not print that column).

	Below I am also showing how an example output looks like before and
	after this commit in case someone wonders.

	On i386 targets - before this commit:
	```
	(gdb) info proc mappings
	process 3461464
	Mapped address spaces:

	    Start Addr   End Addr        Size     Offset objfile
	    0x56555000 0x56556000      0x1000        0x0 /home/dc/src/binutils-gdb/build/a.out
	    0x56556000 0x56557000      0x1000     0x1000 /home/dc/src/binutils-gdb/build/a.out
	    0x56557000 0x56558000      0x1000     0x2000 /home/dc/src/binutils-gdb/build/a.out
	    0x56558000 0x5655a000      0x2000     0x2000 /home/dc/src/binutils-gdb/build/a.out
	    0xf7fc4000 0xf7fc8000      0x4000        0x0 [vvar]
	    0xf7fc8000 0xf7fca000      0x2000        0x0 [vdso]
	    0xf7fca000 0xf7fcb000      0x1000        0x0 /usr/lib/i386-linux-gnu/ld-2.33.so
	    0xf7fcb000 0xf7fee000     0x23000     0x1000 /usr/lib/i386-linux-gnu/ld-2.33.so
	    0xf7fee000 0xf7ffb000      0xd000    0x24000 /usr/lib/i386-linux-gnu/ld-2.33.so
	    0xf7ffb000 0xf7ffe000      0x3000    0x30000 /usr/lib/i386-linux-gnu/ld-2.33.so
	    0xfffdc000 0xffffe000     0x22000        0x0 [stack]
	(gdb)
	```

	On i386 targets - after this commit:
	```
	(gdb) info proc mappings
	process 3461464
	Mapped address spaces:

	    Start Addr   End Addr   Perms       Size     Offset objfile
	    0x56555000 0x56556000   r--p      0x1000        0x0 /home/dc/src/binutils-gdb/build/a.out
	    0x56556000 0x56557000   r-xp      0x1000     0x1000 /home/dc/src/binutils-gdb/build/a.out
	    0x56557000 0x56558000   r--p      0x1000     0x2000 /home/dc/src/binutils-gdb/build/a.out
	    0x56558000 0x5655a000   rw-p      0x2000     0x2000 /home/dc/src/binutils-gdb/build/a.out
	    0xf7fc4000 0xf7fc8000   r--p      0x4000        0x0 [vvar]
	    0xf7fc8000 0xf7fca000   r-xp      0x2000        0x0 [vdso]
	    0xf7fca000 0xf7fcb000   r--p      0x1000        0x0 /usr/lib/i386-linux-gnu/ld-2.33.so
	    0xf7fcb000 0xf7fee000   r-xp     0x23000     0x1000 /usr/lib/i386-linux-gnu/ld-2.33.so
	    0xf7fee000 0xf7ffb000   r--p      0xd000    0x24000 /usr/lib/i386-linux-gnu/ld-2.33.so
	    0xf7ffb000 0xf7ffe000   rw-p      0x3000    0x30000 /usr/lib/i386-linux-gnu/ld-2.33.so
	    0xfffdc000 0xffffe000   rw-p     0x22000        0x0 [stack]
	(gdb)
	```

	On amd64 targets - after this commit:
	```
	(gdb) info proc mappings
	process 3461869
	Mapped address spaces:

	          Start Addr           End Addr   Perms       Size     Offset objfile
	      0x555555554000     0x555555555000   r--p      0x1000        0x0 /home/dc/src/binutils-gdb/build/a.out
	      0x555555555000     0x555555556000   r-xp      0x1000     0x1000 /home/dc/src/binutils-gdb/build/a.out
	      0x555555556000     0x555555557000   r--p      0x1000     0x2000 /home/dc/src/binutils-gdb/build/a.out
	      0x555555557000     0x555555559000   rw-p      0x2000     0x2000 /home/dc/src/binutils-gdb/build/a.out
	      0x7ffff7fc3000     0x7ffff7fc7000   r--p      0x4000        0x0 [vvar]
	      0x7ffff7fc7000     0x7ffff7fc9000   r-xp      0x2000        0x0 [vdso]
	      0x7ffff7fc9000     0x7ffff7fca000   r--p      0x1000        0x0 /usr/lib/x86_64-linux-gnu/ld-2.33.so
	      0x7ffff7fca000     0x7ffff7ff1000   r-xp     0x27000     0x1000 /usr/lib/x86_64-linux-gnu/ld-2.33.so
	      0x7ffff7ff1000     0x7ffff7ffb000   r--p      0xa000    0x28000 /usr/lib/x86_64-linux-gnu/ld-2.33.so
	      0x7ffff7ffb000     0x7ffff7fff000   rw-p      0x4000    0x31000 /usr/lib/x86_64-linux-gnu/ld-2.33.so
	      0x7ffffffdd000     0x7ffffffff000   rw-p     0x22000        0x0 [stack]
	  0xffffffffff600000 0xffffffffff601000   --xp      0x1000        0x0 [vsyscall]
	(gdb)
	```

	Change-Id: I4991f6cc758cd532eae3ae98c29d22e7bd9d9c36

2022-02-23  Patrick O'Neill  <patrick@rivosinc.com>

	RISC-V: PR28733, add missing extension info to 'unrecognized opcode' error
	Currently we report errors as "unrecognized opcode `fence.i'" when the
	opcode isn't part of the selected extensions.
	This patch expands that error message to include the missing extension
	information. For example, now the error message would be "unrecognized
	opcode `fence.i', extension `zifencei' required".
	If the opcode is not a part of any extension, the error message reverts
	to "unrecognized opcode `<op statement>'".


	bfd/
		pr 28733
		* elfxx-riscv.c (riscv_multi_subset_supports_ext): New function,
		used to return the extension string for each INSN_CLASS_*.
		* elfxx-riscv.h: Added extern riscv_multi_subset_supports_ext.
	gas/
		pr 28733
		* config/tc-riscv.c (struct riscv_ip_error): New structure,
		contains information about errors that occur within the riscv_ip.
		(riscv_ip): Use struct riscv_ip_error to report more detailed errors.
		* testsuite/gas/riscv/c-fld-fsd-fail.l: Updated.
		* testsuite/gas/riscv/march-imply-i2p1-01.: Likewise.

2022-02-23  Patrick O'Neill  <patrick@rivosinc.com>

	RISC-V: PR28733, add missing extension info to 'invalid CSR' error
	Currently we report errors as "invalid CSR 'fscr' for the current ISA"
	when the instruction isn't valid.

	This patch expands that error message to include the missing extension
	information. For example, now the error message would be "invalid CSR
	'fscr' for the current ISA, CSR 'fscr' needs 'f' extension".


	gas/
		pr 28733
		* config/tc-riscv.c (riscv_csr_address): Report more details
		when the CSR is invalid.
		* testsuite/gas/riscv/csr-version-1p10.l: Updated detailed errors.
		* testsuite/gas/riscv/csr-version-1p11.l: Likewise.
		* testsuite/gas/riscv/csr-version-1p12.l: Likewise.
		* testsuite/gas/riscv/csr-version-1p9p1.l: Likewise.

2022-02-23  Alan Modra  <amodra@gmail.com>

	binutils 2.38 vs. ppc32 linux kernel
	Commit b25f942e18d6 made .machine more strict.  Weaken it again.

		* config/tc-ppc.c (ppc_machine): Treat an early .machine specially,
		keeping sticky options to work around gcc bugs.

2022-02-23  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: Updated CSRs to privileged spec v1.12 and debug spec v1.0.
	* Removed N extension CSRs,
	ustatus, uie, utvec, uscratch, uepc, ucause, utval and uip.

	* Removed two supervisor CSRs,
	sedeleg and sideleg.

	* Changed debug CSR address of scontext from 0x7aa to 0x5a8.  We cannot support
	different versions of debug specs for now, so only supporting the latest one is
	the only way to move forward.

	* Added debug CSRs,
	mscontext (0x7aa), mcontrol6 (0x7a1, tdata1) and tmexttrigger ((0x7a1, tdata1).

	* Regarded hcontext as a debug CSR.

	include/
		* opcode/riscv-opc.h: Updated CSRs to privileged spec v1.12 and
		debug spec v1.0.
	gas/
		* testsuite/gas/riscv/csr.s: Updated CSRs to privileged spec v1.12
		and debug spec v1.0.
		* testsuite/gas/riscv/csr-dw-regnums.d: Likewise.
		* testsuite/gas/riscv/csr-version-1p10.d: Likewise.
		* testsuite/gas/riscv/csr-version-1p10.l: Likewise.
		* testsuite/gas/riscv/csr-version-1p11.d: Likewise.
		* testsuite/gas/riscv/csr-version-1p11.l: Likewise.
		* testsuite/gas/riscv/csr-version-1p12.d: Likewise.
		* testsuite/gas/riscv/csr-version-1p12.l: Likewise.
		* testsuite/gas/riscv/csr-version-1p9p1.d: Likewise.
		* testsuite/gas/riscv/csr-version-1p9p1.l: Likewise.
		* testsuite/gas/riscv/csr-dw-regnums.d: Likewise.
		* testsuite/gas/riscv/csr-dw-regnums.s: Likewise.

2022-02-23  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Add Privileged Architecture 1.12 CSRs
	This commit adds,

	* Most of CSRs as listed in the Privileged Architecture,
	version 1.12 (except scontext and mscontext).

	* Testcases for most CSRs added on the Privileged
	Architecture, version 1.12 (except moved "scontext" and
	new "mscontext").

	include/ChangeLog:

		* opcode/riscv-opc.h (CSR_SENVCFG, CSR_MCONFIGPTR, CSR_MENVCFG,
		CSR_MSTATUSH, CSR_MENVCFGH, CSR_MTINST, CSR_MTVAL2, CSR_MSECCFG,
		CSR_MSECCFGH, CSR_PMPCFG4, CSR_PMPCFG5, CSR_PMPCFG6,
		CSR_PMPCFG7, CSR_PMPCFG8, CSR_PMPCFG9, CSR_PMPCFG10,
		CSR_PMPCFG11, CSR_PMPCFG12, CSR_PMPCFG13, CSR_PMPCFG14,
		CSR_PMPCFG15, CSR_PMPADDR16, CSR_PMPADDR17, CSR_PMPADDR18,
		CSR_PMPADDR19, CSR_PMPADDR20, CSR_PMPADDR21, CSR_PMPADDR22,
		CSR_PMPADDR23, CSR_PMPADDR24, CSR_PMPADDR25, CSR_PMPADDR26,
		CSR_PMPADDR27, CSR_PMPADDR28, CSR_PMPADDR29, CSR_PMPADDR30,
		CSR_PMPADDR31, CSR_PMPADDR32, CSR_PMPADDR33, CSR_PMPADDR34,
		CSR_PMPADDR35, CSR_PMPADDR36, CSR_PMPADDR37, CSR_PMPADDR38,
		CSR_PMPADDR39, CSR_PMPADDR40, CSR_PMPADDR41, CSR_PMPADDR42,
		CSR_PMPADDR43, CSR_PMPADDR44, CSR_PMPADDR45, CSR_PMPADDR46,
		CSR_PMPADDR47, CSR_PMPADDR48, CSR_PMPADDR49, CSR_PMPADDR50,
		CSR_PMPADDR51, CSR_PMPADDR52, CSR_PMPADDR53, CSR_PMPADDR54,
		CSR_PMPADDR55, CSR_PMPADDR56, CSR_PMPADDR57, CSR_PMPADDR58,
		CSR_PMPADDR59, CSR_PMPADDR60, CSR_PMPADDR61, CSR_PMPADDR62,
		CSR_PMPADDR63): New CSR macros.

	gas/ChangeLog:

		* testsuite/gas/riscv/csr-dw-regnums.s: Add new CSRs.
		* testsuite/gas/riscv/csr-dw-regnums.d: Likewise.
		* testsuite/gas/riscv/csr.s: Add new CSRs.
		* testsuite/gas/riscv/csr-version-1p9p1.d: Likewise.
		* testsuite/gas/riscv/csr-version-1p9p1.l: Likewise.
		* testsuite/gas/riscv/csr-version-1p10.d: Likewise.
		* testsuite/gas/riscv/csr-version-1p10.l: Likewise.
		* testsuite/gas/riscv/csr-version-1p11.d: Likewise.
		* testsuite/gas/riscv/csr-version-1p11.l: Likewise.
		* testsuite/gas/riscv/csr-version-1p12.d: Likewise.
		* testsuite/gas/riscv/csr-version-1p12.l: Likewise.

2022-02-23  Tsukasa OI  <research_trasio@irq.a4lg.com>

	RISC-V: Reorganize testcases for CFI directives
	This commit reorganizes and adds some CSRs to csr-dw-regnums.[sd] to
	make it test the same CSRs as csr.s.

	gas/ChangeLog:

		* testsuite/gas/riscv/csr-dw-regnums.s: Reorganize and add
		defined CSRs tested in csr.s.
		* testsuite/gas/riscv/csr-dw-regnums.d: Likewise.

2022-02-23  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-02-22  John Baldwin  <jhb@FreeBSD.org>

	NEWS: Note that the FreeBSD async target supports async mode.

2022-02-22  John Baldwin  <jhb@FreeBSD.org>

	inf-ptrace: Add an event_pipe to be used for async mode in subclasses.
	Subclasses of inf_ptrace_target have to opt-in to using the event_pipe
	by implementing the can_async_p and async methods.  For subclasses
	which do this, inf_ptrace_target provides is_async_p, async_wait_fd
	and closes the pipe in the close target method.

	inf_ptrace_target also provides wrapper routines around the event pipe
	(async_file_open, async_file_close, async_file_flush, and
	async_file_mark) for use in target methods such as async.
	inf_ptrace_target also exports a static async_file_mark_if_open
	function which can be used in SIGCHLD signal handlers.

2022-02-22  John Baldwin  <jhb@FreeBSD.org>

	Enable async mode in the target in attach_cmd.
	If the attach target supports async mode, enable it after the
	attach target's ::attach method returns.

	fbsd-nat: Return nullptr rather than failing ::thread_name.
	ptrace on FreeBSD cannot be used against running processes and instead
	fails with EBUSY.  This meant that 'info threads' would fail if any of
	the threads were running (for example when using schedule-multiple=on
	in gdb.base/fork-running-state.exp).  Instead of throwing errors, just
	return nullptr as no thread name is better than causing info threads to
	fail completely.

2022-02-22  John Baldwin  <jhb@FreeBSD.org>

	fbsd-nat: Various cleanups to the ::resume entry debug message.
	Move the message from 'show debug fbsd-lwp' to 'show debug fbsd-nat'
	since it is helpful for debugging async target support and not just
	LWP support.

	Use target_pid_to_str to format the ptid and log the step and signo
	arguments.

2022-02-22  John Baldwin  <jhb@FreeBSD.org>

	fbsd-nat: Include ptrace operation in error messages.

2022-02-22  John Baldwin  <jhb@FreeBSD.org>

	fbsd-nat: Implement async target support.
	This is a fairly simple version of async target support.

	Synchronous mode still uses blocking waitpid() calls in
	inf_ptrace::wait() unlike the Linux native target which always uses
	WNOHANG and uses sigsuspend() for synchronous operation.

	Asynchronous mode registers an event pipe with the core as a file
	handle and writes to the pipe when SIGCHLD is raised.  TARGET_WNOHANG
	is handled by inf_ptrace::wait().

2022-02-22  John Baldwin  <jhb@FreeBSD.org>

	inf-ptrace: Support async targets in inf_ptrace_target::wait.
	- Handle TARGET_WNOHANG by passing WNOHANG to waitpid and returning
	  TARGET_WAITKIND_IGNORE if there are no events to report.

	- Handle a race in async mode where SIGCHLD might signal the event
	  pipe for an event that has already been reported.  If the event was
	  the exit of the last child process, waitpid() will fail with ECHILD
	  rather than returning a pid of 0.  For this case, return
	  TARGET_WAITKIND_NO_RESUMED.

2022-02-22  John Baldwin  <jhb@FreeBSD.org>

	inf-ptrace: Return an IGNORE event if waitpid() fails.
	Previously this returned a TARGET_WAITKIND_SIGNALLED event for
	inferior_ptid.  However, inferior_ptid is invalid during ::wait()
	methods after the multi-target changes, so this was triggering an
	assertion further up the stack.

	do_target_wait_1: Clear TARGET_WNOHANG if the target isn't async.
	Previously, TARGET_WNOHANG was cleared if a target supported async
	mode even if async mode wasn't currently enabled.  This change only
	permits TARGET_WNOHANG if async mode is enabled.

2022-02-22  John Baldwin  <jhb@FreeBSD.org>

	Don't enable async mode at the end of target ::resume methods.
	Now that target_resume always enables async mode after target::resume
	returns, these calls are redundant.

	The other place that target resume methods are invoked outside of
	target_resume are as the beneath target in record_full_wait_1.  In
	this case, async mode should already be enabled when supported by the
	target before the resume method is invoked due to the following:

	  In general, targets which support async mode run as async until
	  ::wait returns TARGET_WAITKIND_NO_RESUMED to indicate that there are
	  no unwaited for children (either they have exited or are stopped).
	  When that occurs, the loop in wait_one disables async mode.  Later
	  if a stopped child is resumed, async mode is re-enabled in
	  do_target_resume before waiting for the next event.

	  In the case of record_full_wait_1, this function is invoked from the
	  ::wait target method when fetching an event.  If the underlying
	  target supports async mode, then an earlier call to do_target_resume
	  to resume the child reporting an event in the loop in
	  record_full_wait_1 would have already enabled async mode before
	  ::wait was invoked.  In addition, nothing in the code executed in
	  the loop in record_full_wait_1 disables async mode.  Async mode is
	  only disabled higher in the call stack in wait_one after ::wait
	  returns.

	  It is also true that async mode can be disabled by an
	  INF_EXEC_COMPLETE event passed to inferior_event_handle, but all of
	  the places that invoke that are in the gdb core which is "above" a
	  target ::wait method.

	Note that there is an earlier call to enable async mode in
	linux_nat_target::resume.  That call also marks the async event pipe
	to report an existing event after enabling async mode, so it needs to
	stay.

2022-02-22  John Baldwin  <jhb@FreeBSD.org>

	Enable async mode on supported targets in target_resume.
	Enabling async mode above the target layer removes duplicate code in
	::resume methods of async-capable targets.  Commit 5b6d1e4fa4f
	("Multi-target support") enabled async mode in do_target_resume after
	target_resume returns which is a step in this direction.  However,
	other callers of target_resume such as target_continue do not enable
	async mode.  Rather than enabling async mode in each of the callers
	after target_resume returns, enable async mode at the end of
	target_resume.

	gdbserver linux-low: Convert linux_event_pipe to the event_pipe class.
	Use event_pipe from gdbsupport in place of the existing file
	descriptor array.

	gdb linux-nat: Convert linux_nat_event_pipe to the event_pipe class.
	Use event_pipe from gdbsupport in place of the existing file
	descriptor array.

2022-02-22  John Baldwin  <jhb@FreeBSD.org>

	gdbsupport: Add an event-pipe class.
	This pulls out the implementation of an event pipe used to implement
	target async support in both linux-low.cc (gdbserver) and linux-nat.c
	(gdb).

	This will be used to replace the existing event pipe in linux-low.cc
	and linux-nat.c in future commits.

	Co-Authored-By: Lancelot SIX <lsix@lancelotsix.com>

2022-02-22  Ruslan Kabatsayev  <b7.10110111@gmail.com>

	gdb: fix detection of compilation and linking flags for source-highlight
	Currently there are two problems with the detection of
	source-highlight via pkg-config in GDB's configure script:

	1. The LDFLAGS variable is used to pass the 'pkg-config --libs' output
	to AC_LINK_IFELSE, which results in the "-L/some/path
	-lsource-highlight" preceding the conftest.cpp, which can result in a
	failure to find symbols referenced in conftest.cpp, if the linker is
	using --as-needed by default.

	2. The CFLAGS variable is used to pass the 'pkg-config --cflags'
	output to AC_LINK_IFELSE.  However, as the current language is C++,
	AC_LINK_IFELSE will actuall use CXXFLAGS, not CFLAGS, so any flags
	returned from pkg-config will not be seen.

	This patch fixes both of these mistakes, allowing GDB to correctly
	configure and build using source-highlight installed into a custom
	prefix, e.g. ~/opt/gdb-git (because the system version of
	source-highlight is too old).

2022-02-22  Philippe Blain  <levraiphilippeblain@gmail.com>

	gdb/testsuite/README: point to default value of INTERNAL_GDBFLAGS
	The INTERNAL_GDBFLAGS runtest variable was updated in 55c3ad88013
	([gdb/testsuite] Prevent pagination in GDB_INTERNALFLAGS, 2020-10-26) to
	disable pagination, and in aae1c79a03a (PR python/12227..., 2010-12-07)
	to point to the data directory, but its default value mentioned in the
	testsuite's README was not kept up to date.

	To avoid it getting out of sync even more, point the reader to the
	definition of the variable in lib/gdb.exp, and move the explanation of
	the different flags there. Also adjust the example in the README
	so it follows the flags added in 55c3ad88013.

	Change-Id: I3533608a7d6ae5198af09c7dc7743bde24c19ed7

2022-02-22  Kito Cheng  <kito.cheng@sifive.com>

	RISC-V: Maintain a string to hold the canonical order
	Using dummy entry in riscv_supported_std_ext cause confusing and wrongly
	support `b` and `k` extensions.

	bfd/
		* elfxx-riscv.c (riscv_supported_std_ext): Drop unsupported
		extensions.
		(riscv_ext_canonical_order): New.
		(riscv_init_ext_order): Use riscv_ext_canonical_order rather
		than riscv_supported_std_ext to compute canonical order.

	V2 Changes:

	- Use `*ext` rather than `*ext != NULL` for checking is reach end of
	  string.

2022-02-22  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-02-21  Alan Modra  <amodra@gmail.com>

	Re: ld: Support customized output section type
	"DO NOT EDIT!" says the comment at the top of bfd-in2.h.  Move the new
	type field where it belongs.

		PR ld/28841
		* section.c (struct bfd_section): Add type.  Formatting.
		(BFD_FAKE_SECTION): Formatting.
		* bfd-in2.h: Regenerate.

2022-02-21  Mike Frysinger  <vapier@gentoo.org>

	sim: gdbinit: hoist setup to common code
	This was left in subdirs because of the dynamic cgen usage.  However,
	we can move this breakpoint call to runtime and let gdb detect whether
	the symbol exists.

2022-02-21  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: relax pattern in new gdb.mi/mi-multi-commands.exp test
	I saw some failures in the test gdb.mi/mi-multi-commands.exp that I
	added recently.  This test was added in commit:

	  commit d08cbc5d3203118da5583296e49273cf82378042
	  Date:   Wed Dec 22 12:57:44 2021 +0000

	      gdb: unbuffer all input streams when not using readline

	The failures I see only occurred when my machine was very heavily
	loaded.

	In this test I send multiple commands from dejagnu to gdb with a
	single send_gdb call.  In a well behaving world what I want to happen
	is that the gdb console sees both commands arrive and echos the text
	of those commands.  Then gdb starts processing the first command,
	prints the result, and then processes the second command, and prints
	the result.

	However, what I saw in my loaded environment was that only after
	sending the two commands, only the first command was echoed to gdb's
	terminal.  Then gdb started processing the first command, and started
	to write the output.  Now, mixed in with the first command output, the
	second command was echoed to gdb's terminal.  Finally, gdb would
	finish printing the first command output, and would read and handle
	the second command.

	This mixing of command echoing with the first command output was
	causing the test matching patterns to fail.

	In this commit I change the command I use in the test from a CLI
	command to an MI command, this reduces the number of lines of output
	that come from the test, CLI commands sent through the MI interpreter
	are echoed back like this:

	  (gdb)
	  set $a = "FIRST COMMAND"
	  &"set $a = \"FIRST COMMAND\"\n"
	  ^done
	  (gdb)

	While this is not the case for true MI command:

	  (gdb)
	  -data-evaluate-expression $a
	  ^done,value="\"FIRST COMMAND\""
	  (gdb)

	Less output makes for simpler patterns to match against.

	Next, when sending two command to gdb I was previously trying to spot
	the output of the first command followed by the prompt with nothing
	between.  This is not really needed, for the first command I can look
	for just the ^done,value="\"FIRST COMMAND\"" string, then I can start
	looking for the output of the second command.

	So long as the second pattern matches up to the gdb prompt, then I can
	be sure than nothing is left over in the expect buffer to muck up
	later matches.

	As to see the second command output gdb must have read in the second
	command, the second command output never suffers from the corruption
	that the first command output does.

	Since making this change, I've not seen a failure in this test.

2022-02-21  Andrew Burgess  <aburgess@redhat.com>

	gdb: avoid nullptr access in dbxread.c from read_dbx_symtab
	This fixes a GDB crash reported in bug pr/28900, related to reading in
	some stabs debug information.

	In this commit my goal is to stop GDB crashing.  I am not trying to
	ensure that GDB makes the best possible use of the available stabs
	debug information.  At this point I consider stabs a legacy debug
	format, with only limited support in GDB.

	So, the problem appears to be that, when reading in the stabs data, we
	need to find a N_SO entry, this is the entry that defines the start of
	a compilation unit (or at least the location of a corresponding source
	file).

	It is while handling an N_SO that GDB creates a psymtab to hold the
	incoming debug information (symbols, etc).

	The problem we hit in the bug is that we encounter some symbol
	information (an N_PC entry) outside of an N_SO entry - that is we find
	some symbol information that is not associated with any source file.

	We already have some protection for this case, look (in
	read_dbx_symtab) at the handling of N_PC entries of type 'F' and 'f',
	if we have no psymtab (the pst variable is nullptr) then we issue a
	complaint.  However, for whatever reason, in both 'f' and 'F'
	handling, there is one place where we assume that the pst
	variable (the psymtab) is not nullptr.  This is a mistake.

	In this commit, I guard these two locations (in 'f' and 'F' handling)
	so we no longer assume pst is not nullptr.

	While I was at it, I audited all the other uses of pst in
	read_dbx_symtab, and in every potentially dangerous case I added a
	nullptr check, and issue a suitable complaint if pst is found to be
	nullptr.

	It might well be true that we could/should do something smarter if we
	see a debug symbol outside of an N_SO entry, and if anyone wanted to
	do that work, they're welcome too.  But this commit is just about
	preventing the nullptr access, and the subsequent GDB crash.

	I don't have any tests for this change, I have no idea how to generate
	weird stabs data for testing.  The original binary from the bug report
	now loads just fine without GDB crashing.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28900

2022-02-21  Andrew Burgess  <aburgess@redhat.com>

	gdb: make use of std::string in dbxread.c and xcoffread.c
	While taking a look through dbxread.c I spotted a couple of places
	where making use of std::string would remove the need for manual
	memory allocation and memcpy.

	During review Simon pointed out that the same code exists in
	xcoffread.c, so I've applied the same fix there too.

	There should be no user visible changes after this commit.

2022-02-21  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-02-20  Lancelot SIX  <lancelot.six@amd.com>

	gdb: Only paginate for filtered output in fputs_maybe_filtered
	A have had situation where a unfiltered output (done using
	fputs_unfiltered) ended up triggering pagination.  The backtrace for this was:

	    ...
	    #24 0x000055839377ee4e in check_async_event_handlers () at ../../gdb/async-event.c:335
	    #25 0x0000558394b67b57 in gdb_do_one_event () at ../../gdbsupport/event-loop.cc:216
	    #26 0x0000558394587454 in gdb_readline_wrapper (prompt=0x7ffd907712d0 "--Type <RET> for more, q to quit, c to continue without paging--") at ../../gdb/top.c:1148
	    #27 0x0000558394707270 in prompt_for_continue () at ../../gdb/utils.c:1438
	    #28 0x00005583947088b3 in fputs_maybe_filtered (linebuffer=0x60c0000f4000 "   [...quite big message...]", stream=0x60300028e9d0, filter=0) at ../../gdb/utils.c:1752
	    #29 0x0000558394708e57 in fputs_unfiltered (linebuffer=0x60c0000f4000 "   [...quite big message...]", stream=0x60300028e9d0) at ../../gdb/utils.c:1811
	    ...

	This comes from what appears to be a oversight in fputs_maybe_filtered.  This
	function has a FILTER parameter which if true makes the function pause after
	every screenful (i.e. triggers pagination).

	The filter parameter is correctly used to guard the first place where
	prompt_for_continue.  There is a second place in the function which can call
	prompt_for_continue, but is currently unguarded.  I believe that this is an
	oversight, this patch fixes that.

	Tested on Linux-x86_64, no regression observed.

	Change-Id: Iad8ffd50a87cf20077500878e2564b5a7dc81ece

2022-02-20  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-02-19  Dominique Quatravaux  <dominique.quatravaux@epfl.ch>

	gdb/darwin: remove not-so-harmless spurious call to `wait4`
	As seen in https://sourceware.org/bugzilla/show_bug.cgi?id=24069 this
	code will typically wait4() a second time on the same process that was
	already wait4()'d a few lines above. While this used to be
	harmless/idempotent (when we assumed that the process already exited),
	this now causes a deadlock in the WIFSTOPPED case.

	The early (~2019) history of bug #24069 cautiously suggests to use
	WNOHANG instead of outright deleting the call. However, tests on the
	current version of Darwin (Big Sur) demonstrate that gdb runs just fine
	without a redundant call to wait4(), as would be expected.
	Notwithstanding the debatable value of conserving bug compatibility with
	an OS release that is more than a decade old, there is scant evidence of
	what that double-wait4() was supposed to achieve in the first place - A
	cursory investigation with `git blame` pinpoints commits bb00b29d7802
	and a80b95ba67e2 from the 2008-2009 era, but fails to answer the
	"why" question conclusively.

	Co-Authored-By: Philippe Blain <levraiphilippeblain@gmail.com>
	Change-Id: Id4e4415d66d6ff6b3552b60d761693f17015e4a0

2022-02-19  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-02-18  Tom Tromey  <tromey@adacore.com>

	Add constructor to bound_minimal_symbol
	This adds a constructor to bound_minimal_symbol, to avoid a build
	failure with clang that Simon pointed out.

	I also took the opportunity to remove some redundant initializations,
	and to change one use of push_back to emplace_back, as suggested by
	Simon.

2022-02-18  Roland McGrath  <mcgrathr@google.com>

	Fix typo in ld.texi
	ld/
		* ld.texi (Output Section Type): Fix typo in @code syntax.

2022-02-18  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove newlines from some linux_nat_debug_printf calls
	Change-Id: I80328fab7096221356864b5a4fb30858b48d2c10

2022-02-18  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-02-17  Nick Clifton  <nickc@redhat.com>

	Updated Serbian translations for the bfd, gold, ld and opcodes directories

2022-02-17  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-02-16  Fangrui Song  <maskray@google.com>

	ld: Support customized output section type
	bfd/
	    PR ld/28841
	    * bfd-in2.h (struct bfd_section): Add type.
	    (discarded_section): Add field.
	    * elf.c (elf_fake_sections): Handle bfd_section::type.
	    * section.c (BFD_FAKE_SECTION): Add field.
	    * mri.c (mri_draw_tree): Update function call.

	ld/
	    PR ld/28841
	    * ld.texi: Document new output section type.
	    * ldlex.l: Add new token TYPE.
	    * ldgram.y: Handle TYPE=exp.
	    * ldlang.h: Add type_section to list of section types.
	    * ldlang.c (lang_add_section): Handle type_section.
	    (map_input_to_output_sections): Handle type_section.
	    * testsuite/ld-scripts/output-section-types.t: Add tests.
	    * testsuite/ld-scripts/output-section-types.d: Update.

2022-02-16  Andrew Burgess  <aburgess@redhat.com>

	gdb/tui: add a missing white space character
	Just adds a missing space.  There should be no user visible changes
	after this commit.

	gdb: convert callback_handler_installed from int to bool
	Simple int to bool conversion on callback_handler_installed in
	event-top.c.  There should be no user visible changes after this
	commit.

2022-02-16  Alan Modra  <amodra@gmail.com>

	gas local label and dollar label handling
	Much of the gas source and older BFD source use "long" for function
	parameters and variables, when other types would be more appropriate.
	This patch fixes one of those cases.  Dollar labels and numeric local
	labels do not need large numbers.  Small positive itegers are usually
	all that is required.  Due to allowing longs, it was possible for
	fb_label_name and dollar_label_name to overflow their buffers.

		* symbols.c: Delete unnecessary forward declarations.
		(dollar_labels, dollar_label_instances): Use unsigned int.
		(dollar_label_defined, dollar_label_instance): Likewise.
		(define_dollar_label): Likewise.
		(fb_low_counter, fb_labels, fb_label_instances): Likewise.
		(fb_label_instance_inc, fb_label_instance): Likewise.
		(fb_label_count, fb_label_max): Make them size_t.
		(dollar_label_name, fb_label_name): Rewrite using sprintf.
		* symbols.h (dollar_label_defined): Update prototype.
		(define_dollar_label, dollar_label_name): Likewise.
		(fb_label_instance_inc, fb_label_name): Likewise.
		* config/bfin-lex.l (yylex): Remove unnecessary casts.
		* expr.c (integer_constant): Likewise.
		* read.c (read_a_source_file): Limit numeric label range to int.

2022-02-16  Alan Modra  <amodra@gmail.com>

	ubsan: s_app_line integer overflow
	There are quite a few ubsan warnings in gas.  This one disappears with
	a code tidy.

		* read.c (s_app_line): Rename 'l' to 'linenum'.  Avoid ubsan
		warning.

2022-02-16  Alan Modra  <amodra@gmail.com>

	pe_ILF_make_a_symbol_reloc segfault
	pei-aarch64-little apparently lacks support for BFD_RELOC_RVA.

		* peicode.h (pe_ILF_make_a_symbol_reloc): Don't segfault on
		NULL howto.

2022-02-16  Alan Modra  <amodra@gmail.com>

	What to do when sh_addralign isn't a power of two
	BFD generally doesn't handle anything but a power of two section
	alignment, and ELF sh_addralign is required to be an integral power of
	two (or zero) by the ELF spec.  Of course this is ignored by fuzzers,
	and because bfd_log2 rounds up, we can end up with alignment_power
	being 32 on a 32-bit object or 64 on a 64-bit object.  That then
	triggers ubsan warnings in places like bfd_update_compression_header
	where we want to convert from alignment_power back to an alignment.
	I suppose we could reject object files that have non-compliant
	sh_addralign, but I think it's also reasonable to use the greatest
	power of two divisor of sh_addralign, ie. the rightmost 1 bit.

		* elf.c (_bfd_elf_make_section_from_shdr): Use greatest power
		of two divisor of sh_addralign.
		(_bfd_elf_assign_file_position_for_section): Likewise.
		(assign_file_positions_for_non_load_sections): Likewise.

2022-02-16  Alan Modra  <amodra@gmail.com>

	asan: buffer overflow in vms-alpha.c
		* vms-alpha.c (evax_bfd_print_dst): Sanity check another place
		printing strings.

	asan : use of uninitialized value in buffer_and_nest
		* macro.c (buffer_and_nest): Don't read past end of string buffer.

	asan: buffer overflow in peXXigen.c
		* peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Properly
		sanity check DataDirectory[PE_DEBUG_DATA].Size.

2022-02-16  Hans-Peter Nilsson  <hp@axis.com>

	sim/common: Improve sim_dump_memory head comment
	As requested by Mike.

		* sim-memopt.c: Improve head comment.

2022-02-16  Hans-Peter Nilsson  <hp@axis.com>

	sim/testsuite/cris/c/stat3.c: Fix formatting nit
	* c/stat3.c (main): Fix formatting nit.

2022-02-16  Mike Frysinger  <vapier@gentoo.org>

	sim: testsuite: cleanup the istarget * logic
	Now that the multitarget testing has settled, clean up the cases where
	istarget * is used.  This ends up being mostly style unindenting.

2022-02-16  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-02-15  H.J. Lu  <hjl.tools@gmail.com>

	i386: Update I386_NEED_DYNAMIC_RELOC_TYPE_P for DT_TEXTREL
	Update I386_NEED_DYNAMIC_RELOC_TYPE_P to allow R_386_TLS_IE for relocation
	in read-only section.

	bfd/

		PR ld/28894
		* elfxx-x86.h (I386_NEED_DYNAMIC_RELOC_TYPE_P): Allow
		R_386_TLS_IE.

	ld/
		PR ld/28894
		* testsuite/ld-i386/i386.exp: Run pr28894.
		* testsuite/ld-i386/pr28894.d: New file.
		* testsuite/ld-i386/pr28894.s: Likewise.

2022-02-15  Hans-Peter Nilsson  <hp@axis.com>

	sim/testsuite: Default global_cc_os and global_cc_works properly
	There was an omission on 3e6dc39ed7a8 "sim/testsuite: Set
	global_cc_os also when no compiler is found"; global_cc_os
	wasn't set for other than the primary target, which means
	that the "unguarded" use of global_cc_os in
	testsuite/cris/c/c.exp caused the dreaded "ERROR: can't read
	"global_cc_os": no such variable" when e.g. configuring for
	pru-elf and doing "make check-sim".  Better initializing
	both variables at the top to default values, rather than
	adding another single 'set global_cc_os ""', to reduce the
	risk of not setting them properly if or when that
	if-statement-chain is made longer.

	sim/testsuite:
		* lib/sim-defs.exp (sim_init_toolchain): Default
		global_cc_os and global_cc_works properly, before if-chain.

2022-02-15  H.J. Lu  <hjl.tools@gmail.com>

	x86: Add has_sib to struct instr_info
	Add has_sib to struct instr_info and use SIB info only if ins->has_sib
	is true.

		PR binutils/28892
		* i386-dis.c (instr_info): Add has_sib.
		(get_sib): Set has_sib.
		(OP_E_memory): Replace havesib with ins->has_sib.
		(OP_VEX): Use ins->sib.index only if ins->has_sib is true.

2022-02-15  Lancelot SIX  <lancelot.six@amd.com>

	gdb: Respect the DW_CC_nocall attribute
	It is possible for a compiler to optimize a function in a such ways that
	the function does not follow the calling convention of the target.  In
	such situation, the compiler can use the DW_AT_calling_convention
	attribute with the value DW_CC_nocall to tell the debugger that it is
	unsafe to call the function.  The DWARF5 standard states, in 3.3.1.1:

	  > If the value of the calling convention attribute is the constant
	  > DW_CC_nocall, the subroutine does not obey standard calling
	  > conventions, and it may not be safe for the debugger to call this
	  > subroutine.

	Non standard calling convention can affect GDB's assumptions in multiple
	ways, including how arguments are passed to the function, how values are
	returned, and so on.  For this reason, it is unsafe for GDB to try to do
	the following operations on a function with marked with DW_CC_nocall:

	- call / print an expression requiring the function to be evaluated,
	- inspect the value a function returns using the 'finish' command,
	- force the value returned by a function using the 'return' command.

	This patch ensures that if a command which relies on GDB's knowledge of
	the target's calling convention is used on a function marked nocall, GDB
	prints an appropriate message to the user and does not proceed with the
	operation which is unreliable.

	Note that it is still possible for someone to use a vendor specific
	value for the DW_AT_calling_convention attribute for example to indicate
	the use of an alternative calling convention.  This commit does not
	prevent this, and target dependent code can be adjusted if one wanted to
	support multiple calling conventions.

	Tested on x86_64-Linux, with no regression observed.

	Change-Id: I72970dae68234cb83edbc0cf71aa3d6002a4a540

2022-02-15  Lancelot SIX  <lancelot.six@amd.com>
	    Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: add a symbol* argument to get_return_value
	Add an argument to the get_return_value function to indicate the symbol
	of the function the debuggee is returning from.  This will be used by
	the following patch.

	Since the function return type can be deduced from the symbol remove the
	value_type argument which becomes redundant.

	No user visible change after this patch.

	Tested on x86_64-linux.

	Change-Id: Idf1279f1f7199f5022738a6679e0fa63fbd22edc

2022-02-15  H.J. Lu  <hjl.tools@gmail.com>

	x86-64: Use MAXPAGESIZE for the relro segment alignment
	Adjust x86-64 linker tests after reverting

	commit 31b4d3a16f200bf04db8439a63b72bba7af4e1be
	Author: Alan Modra <amodra@gmail.com>
	Date:   Thu Feb 3 08:57:47 2022 +1030

	    PR28824, relro security issues, x86 keep COMMONPAGESIZE relro

	to use MAXPAGESIZE for the end of the relro segment alignment, like other
	ELF targets.

		* testsuite/ld-x86-64/plt-main-bnd.dd: Updated.
		* testsuite/ld-x86-64/plt-main-ibt-x32.dd: Likewise.
		* testsuite/ld-x86-64/plt-main-ibt.dd: Likewise.
		* testsuite/ld-x86-64/pr14207.d: Likewise.
		* testsuite/ld-x86-64/pr18176.d: Likewise.
		* testsuite/ld-x86-64/pr20830a-now.d: Likewise.
		* testsuite/ld-x86-64/pr20830a.d: Likewise.
		* testsuite/ld-x86-64/pr20830b-now.d: Likewise.
		* testsuite/ld-x86-64/pr20830b.d: Likewise.
		* testsuite/ld-x86-64/pr21038a-now.d: Likewise.
		* testsuite/ld-x86-64/pr21038a.d: Likewise.
		* testsuite/ld-x86-64/pr21038b-now.d: Likewise.
		* testsuite/ld-x86-64/pr21038b.d: Likewise.
		* testsuite/ld-x86-64/pr21038c-now.d: Likewise.
		* testsuite/ld-x86-64/pr21038c.d: Likewise.

2022-02-15  H.J. Lu  <hjl.tools@gmail.com>

	Revert "PR28824, relro security issues, x86 keep COMMONPAGESIZE relro"
	This reverts commit 31b4d3a16f200bf04db8439a63b72bba7af4e1be.

2022-02-15  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-02-14  Hans-Peter Nilsson  <hp@axis.com>

	sim/testsuite/cris: If failing compilation, mark C tests as errors
	...when we know we have a working compiler.  This will reduce
	the risk of faulty edits by exposing them rather than hiding
	them as "unresolved".  It also harmonizes behavior with that of
	run_sim_test.

		* c/c.exp: Mark C tests failing compilation test errors.

2022-02-14  Hans-Peter Nilsson  <hp@axis.com>

	sim/testsuite/cris: Remove faulty use of basename in C tests
	Calls to basename were added here as part of commit
	e1e1ae6e9b5e "sim: testsuite: fix objdir handling", but that
	commit missed adding "#include <libgen.h>" or the equivalent
	GNU extension, see basename(3).  Fixing that shows a logical
	error in the change to openpf1.c; the non-/-prefixed
	code-path was changed instead of the "/"-prefixed code-path,
	which is the one executed after that commit.

	For "newlib" these tests failed linking after that commit.
	Recent newlib has the (asm-renamed) GNU-extension-variant of
	basename, but we're better off not using it at all.

	Unfortunately, compilation failures for C tests run by the
	machinery in c.exp are currently just marked "unresolved",
	in contrast to C and assembler tests run by calling
	run_sim_test.

	The interaction of calling with the full program-path vs.
	use of --sysroot exposes a consistency problem: when
	--sysroot is used, argv[0] isn't the path by which the
	program can find itself.  It's undecided whether argv[0] for
	the program running in the simulator should be edited
	(related to the naked argument to the simulator before
	passing on to the simulated program) to remove a leading
	--sysroot.  Either way, such a change would be out of scope
	for this commit.

		* c/stat3.c (mybasename): New macro.  Use it instead of basename.
		* c/openpf1.c: Correct basename-related change and update related
		comment.

2022-02-14  Hans-Peter Nilsson  <hp@axis.com>

	sim: Add sim_dump_memory for debugging
	Intended to be called from the debugger tool.

	sim/common:
		* sim-memopt.c (sim_dump_memory): New function.

2022-02-14  Hans-Peter Nilsson  <hp@axis.com>

	sim: Fix use of out-of-tree assembler and linker when testing
	With commit 7a259895bb2d "sim: testsuite: expand arch specific
	toolchain settings", trying to use out-of-tree ld and as at test-time
	broke for the "primary target", like when testing a release-tarball.

	Subsequent to that commit, all assembler tests without in-tree-built
	tools FAIL, getting errors when trying to call
	$(abs_builddir)/../gas/as-new.  But, that isn't the actual culprint;
	it's actually it's its immediate predecessor, commit 8996c21067373
	"sim: testsuite: setup per-port toolchain settings for multitarget
	build", which hardcodes in-tree-paths to those tools instead of
	considering e.g. $(<X>_FOR_TARGET), the preferred overridable variable
	for single-target builds, as set up by the toplevel Makefile.

	This commit calls GCC_TARGET_TOOL (a deceptive name; gcc-specific
	features aren't used) from toplev/config/acx.m4, somewhat like calls
	in toplev/configure.ac but without the NCN_STRICT_CHECK_TARGET_TOOLS
	step, for each X to find a value for $(<X>_FOR_TARGET).  N.B.: in-tree
	tools still override any ${target}-${tool} found in $PATH, i.e. only
	previously broken builds are affected.

	The variables $(<X>_FOR_TARGET) are usually overridden by the toplevel
	Makefile to the same value or better, but has to be set here too, as
	automake "wants" Makefiles to be self-contained (you get an error
	pointing out that the variable may be empty).  If it hadn't been for
	that, SIM_AC_CHECK_TOOLCHAIN_FOR_PRIMARY_TARGET would not be needed.
	This detail should only (positively) affect users invoking "make
	check" in sim/ instead of "make check-sim" (or "make check") at the
	toplevel.  Now the output from "configure" matches the target tools
	actually used by sim at test-time, for the "primary target".

	Using $(CC) for "example-" targets CC_FOR_TARGET is not changed, as
	that appears to be a deliberate special-case.

	Note that all tools still have to be installed and present in
	$PATH at configure-time to be properly used at test-time.

	sim:
		* m4/sim_ac_toolchain.m4 (SIM_AC_CHECK_TOOLCHAIN_FOR_PRIMARY_TARGET):
		New defun.
		(SIM_TOOLCHAIN_VARS): Call it using AC_REQUIRE, and use variables
		AS_FOR_TARGET, LD_FOR_TARGET and CC_FOR_TARGET instead of hard-coded
		values.
		* Makefile.in, configure: Regenerate.

2022-02-14  Hans-Peter Nilsson  <hp@axis.com>

	sim cris: Unbreak --disable-sim-hardware builds
	With --disable-sim-hardware (--enable-sim-hardware=no),
	whose default was changed to --enable-sim-hardware(=yes) in
	commit 34cf51120683, building for cris-elf fails as
	sim_hw_parse then doesn't exist.

	A cris-elf simulator configured for --enable-sim-hardware
	(or the default after to the mentioned commit) runs about
	2.5x slower than one configured --disable-sim-hardware.
	A further 2-5% performance regression was not investigated.

	When sim_hw_parse doesn't exist, --cris-900000xx can't be
	supported.  The best action here is to remove it completely,
	so its absence can be identified through --help, but
	avoiding littering the code with "#if WITH_HW".

	sim/cris:
		* sim-if.c (cris_options) [WITH_HW]: Conditionalize
		support of option --cris-900000xx.
		(sim_open) [WITH_HW]: Conditionalize sim_hw_parse
		call.

2022-02-14  Hans-Peter Nilsson  <hp@axis.com>

	sim/testsuite/cris: As applicable, require simoption --cris-900000xx
	Apply the new run_sim_test option "require" as in "#require
	simoption --cris-900000xx" for all tests using that option.
	This allows a clean test-suite-run for a build with
	--disable-sim-hardware, where that option is not supported,
	by skipping those tests as "untested".

	sim/testsuite/cris:
		* asm/io1.ms, asm/io2.ms, asm/io3.ms, asm/io6.ms,
		asm/io7.ms: Call "#require: simoption --cris-900000xx".

2022-02-14  Hans-Peter Nilsson  <hp@axis.com>

	sim/testsuite: Support "requires: simoption <--name-of-option>"
	Simulator features can be present or not, typically
	depending on different-valued configure options, like
	--enable-sim-hardware[=off|=on].  To avoid failures in
	test-suite-runs when testing such configurations, a new
	predicate is needed, as neither "target", "progos" nor
	"mach" fits cleanly.

	The immediate need was to check for presence of a simulator
	option, but rather than a specialized "requires-simoption:"
	predicate I thought I'd handle the general (parametrized)
	need, so here's a generic predicate machinery and a (first)
	predicate to use together with it; checking whether a
	particular option is supported, by looking at "run --help"
	output.  This was inspired by the check_effective_target_
	machinery in the gcc test-suite.

	Multiple "requires: <requirement> <parameter>" form a list of
	predicates (with parameters), to be used as a conjunction.

	sim/testsuite:
		* lib/sim-defs.exp (sim_check_requires_simoption): New function.
		(run_sim_test): Support "requires: <requirement> <parameter>".

2022-02-14  Hans-Peter Nilsson  <hp@axis.com>

	sim/testsuite/cris/hw/rv-n-cris/irq1.ms: Disable due to randomness
	For reasons that remain largely to be investigated (besides
	the apparent lack of synchronization between two processes),
	this test fails randomly, with two different sets of common
	outputs.  Curiously, that doesn't happen for the other
	similar tests.  There's a comment that mentions this, though
	that doesn't make it a sustainable part of a test-suite.
	(Known-blinking tests should be disabled until fixed.)

	sim/testsuite/cris:
		* hw/rv-n-cris/irq1.ms: Disable by use of a never-matched
		"progos" value.

2022-02-14  Hans-Peter Nilsson  <hp@axis.com>

	sim/testsuite/cris/c: Use -sim3 but only for newlib targets
	Commit a39487c6685f "sim: cris: use -sim with C tests for cris-elf
	targets" caused " -sim" to be appended to CFLAGS_FOR_TARGET for
	cris*-*-elf, where testing had until then relied on
	"RUNTESTFLAGS=--target_board=cris-sim" being passed when running "make
	check-sim", adding the right options.  While "-sim" happens to work,
	the baseboard-file cris-sim.exp uses "-sim3" so for consistency use
	that instead.

	Then commit b42f20d2ac72 "sim: testsuite: drop most specific istarget
	checks" caused " -sim" to be appended for *all* targets, which just
	doesn't work.  For example, for crisv32-linux-gnu, that's not a
	recognized option and will cause a dejagnu error and further testing
	in c.exp will be aborted.

	While cris-sim.exp appends "-static" for *-linux-gnu, further changes
	in the test-suite have caused "linux"-specific tests to break, so that
	part will be tended to separately.

	But, save and restore CFLAGS_FOR_TARGET around the modification and
	use where needed, to not have the CRIS-specific modification affect a
	continuing test-run (possibly for other targets).

	sim/testsuite/cris:
		* c/c.exp (CFLAGS_FOR_TARGET): Replace appended option " -sim"
		with " -sim3", but do it conditionally for newlib targets.  Save
		and restore CFLAGS_FOR_TARGET in saved_CFLAGS_FOR_TARGET such
		that it doesn't affect the value of CFLAGS_FOR_TARGET outside
		c.exp.

2022-02-14  Hans-Peter Nilsson  <hp@axis.com>

	sim/testsuite: Set global_cc_os also when no compiler is found
	If we don't set this variable, it doesn't exist, and using "#progos:"
	in an assembler-file will cause an error rather than just skipping the
	test, viz:

	Running /src/sim/testsuite/cris/hw/rv-n-cris/rvc.exp ...
	ERROR: tcl error sourcing /src/sim/testsuite/cris/hw/rv-n-cris/rvc.exp.
	ERROR: can't read "global_cc_os": no such variable
	    while executing
	"if { $opts(progos) != "" && $opts(progos) != $global_cc_os } {
		untested $subdir/$name
		return
	    }"
	    (procedure "run_sim_test" line 102)

	Neither the commit introducing progos, nor the top comment
	in run_sim_test, mentions progos as intended only for C
	tests, or that its use must be gated on $global_cc_works !=
	0, so (not) setting it in the no-working-compiler path seems
	just overlooked.

	Allowing it to be used for assembler tests makes it usable
	for e.g. an always-false predicate and in expressions in
	.exp files without gating on $global_cc_works != 0.

	With this patch, global_cc_os is set to "", just as for "unknown OS".

	    sim/testsuite:
		* lib/sim-defs.exp (sim_init_toolchain): Set global_cc_os also when
		no working target C compiler is found.

2022-02-14  Hans-Peter Nilsson  <hp@axis.com>

	sim/testsuite/cris: Assembler testcase for PRIx32 usage bug
	Several C test-cases exposed the bug, but let's have one for
	people who test using just the assembler and linker.

		* asm/endmem1.ms: New test.

2022-02-14  Hans-Peter Nilsson  <hp@axis.com>

	sim cris: Correct PRIu32 to PRIx32
	In 5ee0bc23a68f "sim: clean up bfd_vma printing" there was
	an additional introduction of PRIx32 and PRIu32 but just in
	sim/cris/sim-if.c.  One type of bug was fixed in commit
	d16ce6e4d581 "sim: cris: fix memory setup typos" but one
	remained; the PRIu32 usage is wrong, as hex output is
	desired; note the 0x prefix.

	Without this fix, you'll see output like:
	 memory map 0:0x4000..0x5fff (8192 bytes) overlaps 0:0x0..0x16383 (91012 bytes)
	 program stopped with signal 6 (Aborted).
	for some C programs, like some of the ones in the sim/cris/c
	testsuite from where the example is taken (freopen2.c).

	The bug behavior was with memory allocation.  With an
	attempt to allocate memory using the brk syscall such that
	the room up to the next 8192-byte "page boundary" wasn't
	sufficient, the simulator memory allocation machinery horked
	on a consistency error when trying to allocate a memory
	block to raise the "end of the data segment": there was
	already memory allocated at that address.

	Unfortunately, none of the programs in sim/cris/asm exposed
	this bug at the time, but an assembler test-case is
	committed after this fix.

	sim/cris:
		* sim-if.c (sim_open): Correct PRIu32 to PRIx32.

2022-02-14  Sergei Trofimovich  <siarheit@google.com>

	microblaze: fix fsqrt collicion to build on glibc-2.35
		* microblaze-opcm.h: Renamed 'fsqrt' to 'microblaze_fsqrt'.
		* microblaze-opc.h: Follow 'fsqrt' rename.

2022-02-14  Tom Tromey  <tom@tromey.com>

	Remove LA_PRINT_STRING
	This removes the LA_PRINT_STRING macro, in favor of using ordinary
	method calls.

	Remove LA_PRINT_CHAR
	This removes the LA_PRINT_CHAR macro, in favor of using ordinary
	method calls.

	Remove LA_PRINT_TYPE
	This removes the LA_PRINT_TYPE macro, in favor of using ordinary
	method calls.

2022-02-14  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb/python: move styling support to gdb.styling
	This commit moves the two Python functions that are used for styling
	into a new module, gdb.styling, there's then a small update in
	python.c so GDB can find the functions in their new location.

	The motivation for this change is purely to try and reduce the clutter
	in the top-level gdb module, and encapsulate related functions into
	modules.  I did ponder documenting these functions as part of the
	Python API, however, doing so would effectively "fix" the API, and I'm
	still wondering if there's improvements that could be made, also, the
	colorize function is only called in some cases now that GDB prefers
	libsource-highlight, so it's not entirely sure how this would work as
	part of a user facing API.

	Still, despite these functions never having been part of a documented
	API, it is possible that a user out there has overridden these to, in
	some way, customize how GDB performs styling.  Moving the function as
	I propose in this patch could break things for that user, however,
	fixing this breakage is trivial, and, as these functions were never
	documented, I don't think we should be obliged to not break user code
	that relies on them.

2022-02-14  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: use python to colorize disassembler output
	This commit adds styling support to the disassembler output, as such
	two new commands are added to GDB:

	  set style disassembler enabled on|off
	  show style disassembler enabled

	In this commit I make use of the Python Pygments package to provide
	the styling.  I did investigate making use of libsource-highlight,
	however, I found the highlighting results to be inferior to those of
	Pygments; only some mnemonics were highlighted, and highlighting of
	register names such as r9d and r8d (on x86-64) was incorrect.

	To enable disassembler highlighting via Pygments, I've added a new
	extension language hook, which is then implemented for Python.  This
	hook is very similar to the existing hook for source code
	colorization.

	One possibly odd choice I made with the new hook is to pass a
	gdb.Architecture through, even though this is currently unused.  The
	reason this argument is not used is that, currently, styling is
	performed identically for all architectures.

	However, even though the Python function used to perform styling of
	disassembly output is not part of any documented API, I don't want
	to close the door on a user overriding this function to provide
	architecture specific styling.  To do this, the user would inevitably
	require access to the gdb.Architecture, and so I decided to add this
	field now.

	The styling is applied within gdb_disassembler::print_insn, to achieve
	this, gdb_disassembler now writes its output into a temporary buffer,
	styling is then applied to the contents of this buffer.  Finally the
	gdb_disassembler buffer is copied out to its final destination stream.

	There's a new test to check that the disassembler output includes some
	escape sequences, though I don't check for specific colours; the
	precise colors will depend on which instructions are in the
	disassembler output, and, I guess, how pygments is configured.

	The only negative change with this commit is how we currently style
	addresses in GDB.

	Currently, when the disassembler wants to print an address, we call
	back into GDB, and GDB prints the address value using the `address`
	styling, and the symbol name using `function` styling.  After this
	commit, if pygments is used, then all disassembler styling is done
	through pygments, and this include the address and symbol name parts
	of the disassembler output.

	I don't know how much of an issue this will be for people.  There's
	already some precedent for this in GDB when we look at source styling.
	For example, function names in styled source listings are not styled
	using the `function` style, but instead, either GNU Source Highlight,
	or pygments gets to decide how the function name should be styled.

	If the Python pygments library is not present then GDB will continue
	to behave as it always has, the disassembler output is mostly
	unstyled, but the address and symbols are styled using the `address`
	and `function` styles, as they are today.

	However, if the user does `set style disassembler enabled off`, then
	all disassembler styling is switched off.  This obviously covers the
	use of pygments, but also includes the minimal styling done by GDB
	when pygments is not available.

2022-02-14  H.J. Lu  <hjl.tools@gmail.com>

	ld: Keep indirect symbol from IR if referenced from shared object
	Don't change indirect symbol defined in IR to undefined if it is
	referenced from shared object.

	bfd/

		PR ld/28879
		* elflink.c (_bfd_elf_merge_symbol): Don't change indirect
		symbol defined in IR to undefined if it is referenced from
		shared object.

	ld/

		PR ld/28879
		* testsuite/ld-plugin/lto.exp: Run PR ld/28879 tests.
		* testsuite/ld-plugin/pr28879a.cc: New file.
		* testsuite/ld-plugin/pr28879b.cc: Likewise.

2022-02-14  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-02-13  Alan Modra  <amodra@gmail.com>

	PR28882, build failure with gcc-4.2 due to use of 0b literals
		PR 28882
		* elf/loongarch.h: Replace binary literals with hex.

2022-02-13  Alan Modra  <amodra@gmail.com>

	Don't pass around expld.dataseg pointer
	The better to see any code that accesses expld.dataseg.

		* ldexp.c (fold_segment_end): Remove seg parameter.  Adjust calls.
		(fold_segment_align, fold_segment_relro_end): Likewise.
		* ldlang.c (lang_size_segment): Likewise.
		(lang_size_relro_segment_1, lang_find_relro_sections_1): Likewise.

2022-02-13  Alan Modra  <amodra@gmail.com>

	Remove bfd ELF_RELROPAGESIZE
	Now that ld properly aligns the end of the relro segment, the hack to
	make relro work on powerpc can disappear.

	bfd/
		* bfd.c (bfd_emul_get_commonpagesize): Remove relro param.
		Don't return bed->relropagesize.
		* elf-bfd.h (struct elf_backend_data): Remove relropagesize.
		* elfxx-target.h (ELF_RELROPAGESIZE): Remove.
		* elf32-ppc.c (ELF_RELROPAGESIZE): Don't define.
		* elf64-ppc.c: Likewise.
		* bfd-in2.h: Regenerate.
	ld/
		* ldemul.c (after_parse_default): Adjust
		bfd_emul_get_commonpagesize call.

2022-02-13  Alan Modra  <amodra@gmail.com>

	PR28824, relro security issues, x86 keep COMMONPAGESIZE relro
	x86 treats MAXPAGESIZE as a memory optimisation parameter, actual
	hardware paging is always COMMPAGESIZE of 4k.  Use COMMONPAGESIZE for
	the end of the relro segment alignment.

	The previous patch regresses pr18176, increasing the testcase file
	size from 322208 to 2099872 bytes.  Fixing this on x86 will require
	introducing a gap after the end of the relro segment (of up to
	relropagesize-1 bytes).

		PR 28824
		PR 18176
		* ld.h (ld_config_type): Add relro_use_commonpagesize field.
		* ldexp.c (fold_segment_align): Set relropagesize depending on
		relro_use_commonpagesize.
		* emultempl/elf-x86.em (elf_x86_create_output_section_statements):
		Set relro_use_commonpagesize.
		* testsuite/ld-x86-64/pr18176.d: xfail.

2022-02-13  Alan Modra  <amodra@gmail.com>

	PR28824, relro security issues
	Background
	==========
	There are constraints on layout of binaries to meet demand paging and
	memory protection requirements.  Demand paged binaries must have file
	offset mod pagesize equal to vma mod pagesize.  Memory protection
	(executable, read, write status) can only change at page boundaries.
	The linker's MAXPAGESIZE variable gives the page size for these layout
	constraints.

	In a typical basic executable with two memory segments, text (RE) and
	data (RW), the data segment must start on a different page to the
	last text segment page.  For example, with 64k pages and a small
	executable of 48k text and 1k data, the text segment might start at
	address 0x10000 and data at 0x20000 for a total of two 64k memory
	pages.  Demand paging would require the image on disk to be 64k+1k
	in size.  We can do better than that.  If the data segment instead
	starts at 0x2c000 (the end of the text segment plus one 64k page) then
	there are still only two memory pages, but the disk image is now
	smaller, 48k+1k in size.  This is why the linker normally starts the
	data segment at the end of the text segment plus one page.  That
	simple heuristic isn't ideal in all cases.  Changing our simple
	example to one with 64k-1 text size, following that heuristic would
	result in data starting at 0x2ffff.  Now we have two 64k memory data
	pages for a data segment of 1k!  If the data segment instead started
	at 0x30000 we'd get a single data segment page at the cost of 1 byte
	extra in the disk image, which is likely a good trade-off.  So the
	linker does adjust the simple heuristic.  Just how much disk image
	size increase is allowed is controlled by the linker's COMMONPAGESIZE
	variable.

	A PT_GNU_RELRO segment overlays the initial part of the data segment,
	saying that those pages should be made read-only after relocation by
	the dynamic loader.  Page granularity for memory protection means that
	the end of the relro segment must be at a page boundary.

	The problem
	===========
	Unfortunately most targets currently only align the end of the relro
	segment to COMMONPAGESIZE.  That results in only partial relro
	protection if an executable is running with MAXPAGESIZE pages, since
	any part of the relro segment past the last MAXPAGESIZE boundary can't
	be made read-only without also affecting sections past the end of the
	relro segment.  I believe this problem arose because x86 always runs
	with 4k (COMMPAGESIZE) memory pages, and therefore using a larger
	MAXPAGESIZE on x86 is for reasons other than the demand paging and
	memory page protection boundary requirements.

	The solution
	============
	Always end the relro segment on a MAXPAGESIZE boundary, except for
	x86.  Note that the relro segment, comprising of sections at the start
	of the data segment, is sized according to how those sections are laid
	out.  That means the start of the relro segment is fixed relative to
	its end.  Which also means the start of the data segment must be at a
	fixed address mod MAXPAGESIZE.  So for relro the linker can't play
	games with the start of the data segment to save disk space.  At
	least, not without introducing gaps between the relro sections.  In
	fact, because the linker was starting layout using its simple
	heuristic of starting the data segment at the end of the text segment
	plus one page, it was sometimes introducing page gaps for no reason.
	See pr28743.

		PR 28824
		PR 28734
		* ldexp.c (fold_segment_align): When relro, don't adjust up by
		offset within page.  Set relropagesize.
		(fold_segment_relro_end): Align to relropagesize.
		* ldexp.h (seg_align_type): Rename pagesize to commonpagesize.
		Add relropagesize.  Comment.
		* ldlang.c (lang_size_segment): Adjust to suit field renaming.
		(lang_size_relro_segment_1): Align relro_end using relropagesize.

2022-02-13  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-02-12  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-02-11  H.J. Lu  <hjl.tools@gmail.com>

	x86: Disallow invalid relocation against protected symbol
	I am checking this into master and will backport it to 2.38 branch.

	H.J
	----
	On x86, GCC 12 supports -mno-direct-extern-access to enable canonical
	reference to protected function and disable copy relocation.  With
	-mno-direct-extern-access, the canonical protected function symbols must
	be accessed via canonical reference and the protected data symbols in
	shared libraries are non-copyable. Under glibc 2.35, non-canonical
	reference to the canonical protected function will get the run-time error:

	./y: internal_f: ./libfoo.so: non-canonical reference to canonical protected function

	and copy relocations against the non-copyable protected symbols will get
	the run-time error:

	./x: internal_i: ./libfoo.so: copy relocation against non-copyable protected symbol

	Update x86 linker to disallow non-canonical reference to the canonical
	protected function:

	ld: plt.o: non-canonical reference to canonical protected function `internal_f' in libfoo.so
	ld: failed to set dynamic section sizes: bad value

	and copy relocation against the non-copyable protected symbol:

	ld: main.o: copy relocation against non-copyable protected symbol `internal_i' in libfoo.so

	at link-time.

	bfd/

		PR ld/28875
		* elf-properties.c (_bfd_elf_parse_gnu_properties): Don't skip
		shared libraries for GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS.
		* elf32-i386.c (elf_i386_scan_relocs): Disallow non-canonical
		reference to canonical protected function.
		* elf64-x86-64.c (elf_x86_64_scan_relocs): Likewise.
		* elfxx-x86.c (elf_x86_allocate_dynrelocs): Don't allow copy
		relocation against non-copyable protected symbol.

	ld/

		PR ld/28875
		* testsuite/ld-i386/i386.exp: Check non-canonical reference to
		canonical protected function and check copy relocation against
		non-copyable protected symbol.
		* testsuite/ld-i386/pr21997-1.err: New file.
		* testsuite/ld-i386/pr28875.err: Likewise.
		* testsuite/ld-i386/pr28875a.c: Likewise.
		* testsuite/ld-i386/pr28875b.c: Likewise.
		* testsuite/ld-x86-64/pr21997-1a.err: Updated.
		* testsuite/ld-x86-64/pr21997-1b.err: Likewise.
		* testsuite/ld-x86-64/pr28875-data.err: New file.
		* testsuite/ld-x86-64/pr28875-func.err: Likewise.
		* testsuite/ld-x86-64/x86-64.exp: Check non-canonical reference
		to canonical protected function and check copy relocation against
		non-copyable protected symbol.

2022-02-11  Tom Tromey  <tromey@adacore.com>

	Add initializers to bound_minimal_symbol
	This adds initializers to bound_minimal_symbol, allowing for the
	removal of some calls to memset.

2022-02-11  Bhuvanendra Kumar N  <Bhuvanendra.KumarN@amd.com>

	gdb/fortran: support ptype and print commands for namelist variables
	Gfortran supports namelists (a Fortran feature); it emits
	DW_TAG_namelist and DW_TAG_namelist_item dies. But gdb does not
	process these dies and does not support 'print' or 'ptype' commands on
	namelist variables.

	An attempt to print namelist variables results in gdb bailing out with
	the error message as shown below.

	  (gdb) print nml
	  No symbol "nml" in current context.

	This commit is to make the print and ptype commands work for namelist
	variables and its items. Sample output of these commands is shared
	below, with fixed gdb.

	  (gdb) ptype nml
	  type = Type nml
	      integer(kind=4) :: a
	      integer(kind=4) :: b
	  End Type nml
	  (gdb) print nml
	  $1 = ( a = 10, b = 20 )

2022-02-11  Bruno Larsen  <blarsen@redhat.com>

	gdb: fix until behavior with trailing !is_stmt lines
	When using the command "until", it is expected that GDB will exit a
	loop if the current instruction is the last one related to that loop.
	However, if there were trailing non-statement instructions, "until"
	would just behave as "next".  This was noticeable in clang-compiled
	code, but might happen with gcc-compiled as well.  PR gdb/17315 relates
	to this problem, as running gdb.base/watchpoint.exp with clang
	would fail for this reason.

	To better understand this issue, consider the following source code,
	with line numbers marked on the left:

	  10:	for (i = 0; i < 10; ++i)
	  11:     loop_body ();
	  12:   other_stuff ();

	If we transform this to pseudo-assembler, and generate a line table,
	we could end up with something like this:

	  Address | Pseudo-Assembler | Line | Is-Statement?

	  0x100   | i = 0            | 10   | Yes
	  0x104   | loop_body ()     | 11   | Yes
	  0x108   | i = i + 1        | 10   | Yes
	  0x10c   | if (i < 10):     | 10   | No
	  0x110   |     goto 0x104   | 10   | No
	  0x114   | other_stuff ()   | 12   | Yes

	Notice the two non-statement instructions at the end of the loop.

	The problem is that when we reach address 0x108 and use 'until',
	hoping to leave the loop, GDB sets up a stepping range that runs from
	the start of the function (0x100 in our example) to the end of the
	current line table entry, that is 0x10c in our example.  GDB then
	starts stepping forward.

	When 0x10c is reached GDB spots that we have left the stepping range,
	that the new location is not a statement, and that the new location is
	associated with the same source line number as the previous stepping
	range.  GDB then sets up a new stepping range that runs from 0x10c to
	0x114, and continues stepping forward.

	Within that stepping range the inferior hits the goto (at 0x110) and
	loops back to address 0x104.

	At 0x104 GDB spots that we have left the previous stepping range, that
	the new address is marked as a statement, and that the new address is
	for a different source line.  As a result, GDB stops and returns
	control to the user.  This is not what the user was expecting, they
	expected GDB to exit the loop.

	The fix proposed in this patch, is that, when the user issues the
	'until' command, and GDB sets up the initial stepping range, GDB will
	check subsequent SALs (symtab_and_lines) to see if they are
	non-statements associated with the same line number.  If they are then
	the end of the initial stepping range is extended to the end of the
	non-statement SALs.

	In our example above, the user is at 0x108 and uses 'until', GDB now
	sets up a stepping range from the start of the function 0x100 to
	0x114, the first address associated with a different line.

	Now as GDB steps around the loop it never leaves the initial stepping
	range.  It is only when GDB exits the loop that we leave the stepping
	range, and the stepping finishes at address 0x114.

	This patch also adds a test case that can be run with gcc to test that
	this functionality is not broken in the future.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=17315

2022-02-11  Richard Sandiford  <richard.sandiford@arm.com>

	gas/doc: Fix "a true results" typo

2022-02-11  Jan Vrany  <jan.vrany@labware.com>

	gdb: extend the information printed by 'maint info jit'
	This commit updates the output of 'maint info jit' to print not just
	the jit_code_entry address, but also the symfile address, and the
	symfile size.

	The new information could be obtained by looking into target memory at
	the contents of the jit_code_entry, but, by storing this information
	within gdb at the time the jit object is loaded, it is now possible to
	check if the jit_code_entry has been modified in target memory behind
	gdb's back.

	Additionally, the symfile address is the same address that is now used
	in the objfile names after commit 4a620b7e.

	One test that relies on the output of 'maint info jit' was updated to
	allow for the new output format.

2022-02-11  Michael Forney  <mforney@mforney.org>

	bfd: Remove return with expression in void function
	      * bfd.c (bfd_set_gp_value): Remove return with expression
	        in void function.

2022-02-11  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: LoongArch: Add Makefile, configure and NEWS
	This commit adds Makefile, configure and NEWS for LoongArch.

	gdb: LoongArch: Add initial native Linux support
	This commit adds initial native Linux support for LoongArch.

	gdb: LoongArch: Add initial Linux target support
	This commit adds initial Linux target support for LoongArch.

	gdb: LoongArch: Add initial baremetal support
	This commit adds initial baremetal support for LoongArch.

	gdb: LoongArch: Add initial target description support
	This commit adds initial target description support for LoongArch.

2022-02-11  Mike Frysinger  <vapier@gentoo.org>

	libctf: delete unused libctf_TEXINFOS
	It's not clear what this was meant for, but it's not used by anything,
	and the info pages still generate fine without it.

2022-02-11  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/linux: remove ptrace support check for exec, fork, vfork, vforkdone, clone, sysgood
	I think it's safe to remove checking support for these ptrace features,
	they have all been added in what is now ancient times (around the
	beginning of Linux 2.6).  This allows removing a bit of complexity in
	linux-nat.c and nat/linux-ptrace.c.

	It also allows saving one extra fork every time we start debugging on
	Linux: linux_check_ptrace_features forks a child process to test if some
	ptrace features are supported.  That child process forks a grand-child,
	to test whether ptrace reports an event for the fork by the child.  This
	is no longer needed, if we assume the kernel supports reporting forks.

	PTRACE_O_TRACEVFORKDONE was introduced in Linux in this change, in 2003:

	  https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/commit/?id=45c1a159b85b3b30afd26a77b4be312226bba416

	PTRACE_O_TRACESYSGOOD was supported at least as of this change, in 2002:

	  https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/commit/?id=acc7088569c8eef04eeed0eff51d23bb5bcff964

	PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK, PTRACE_O_TRACEEXEC and
	PTRACE_O_TRACECLONE were introduced in this change, in 2002:

	  https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/commit/?id=a0691b116f6a4473f0fa264210ab9b95771a2b46

	Change-Id: Iffb906549a89cc6b619427f976ec044706ab1e8d

2022-02-11  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-02-10  Andrew Burgess  <aburgess@redhat.com>

	gdb/infrun: some extra infrun debug print statements
	While reviewing a different patch I wanted to know more about what was
	going on during GDB's stepping.  I added some extra infrun debug print
	calls, and I thought these might be useful to others.

2022-02-10  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-02-09  Nick Clifton  <nickc@redhat.com>

	Update the obsolete list and how-to-make-a-release documentation now that the 2.38 release is out.

2022-02-09  Alan Modra  <amodra@gmail.com>

	PR28763, SIGSEGV during processing of program headers via readelf
		PR 28763
		* readelf.c (process_file_header): Discard any cached program
		headers if there is an extension field for e_phnum in first
		section header.

2022-02-09  Alan Modra  <amodra@gmail.com>

	Work around gcc-4 warnings in elf64-ppc.c
	elf64-ppc.c: In function 'ppc64_elf_size_dynamic_sections':
	elf64-ppc.c:10309:45: error: value computed is not used [-Werror=unused-value]
	     ++lgot_ents, ++lgot_masks, isym != NULL && isym++)

	It is of course a silly warning, fixed in later versions of gcc.  I
	wrote "isym != NULL && isym++" rather than the simpler "isym++" to
	stop sanitisers complaining about incrementing a NULL pointer.  isym
	is of course unused in any code path where it might start off as
	NULL.  Sometimes you can't win.  So don't try to be clever in reading
	local symbols only when needed.  99 times out of 100 they will be
	cached anyway.

		* elf64-ppc.c (ppc64_elf_size_dynamic_sections): Avoid annoying
		warnings by always reading local syms.
		(ppc64_elf_layout_multitoc): Likewise.

2022-02-09  Peilin Ye  <peilin.ye@bytedance.com>

	Test --only-keep-debug on ELF relocatables
	Add a test for commit 7c4643efe7be, which fixed --only-keep-debug for ELF
	relocatables.

		* testsuite/binutils-all/objcopy.exp
		(keep_debug_symbols_for_elf_relocatable): New test.

2022-02-09  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-02-08  Palmer Dabbelt  <palmer@rivosinc.com>

	RISC-V: Stop reporting warnings for mismatched extension versions
	The extension version checking logic is really just too complicated to
	encode into the linker, trying to do so causes more harm than good.
	This removes the checks and the associated tests, leaving the logic to
	keep the largest version of each extension linked into the target.

	bfd/

		* elfnn-riscv.c (riscv_version_mismatch): Rename to
		riscv_update_subset_version, and stop reporting warnings on
		version mismatches.
		(riscv_merge_std_ext): Adjust calls to riscv_version_mismatch.
		(riscv_merge_multi_letter_ext): Likewise.

	ld/
		* testsuite/ld-riscv-elf/attr-merge-arch-failed-01.d: Remove
		* testsuite/ld-riscv-elf/attr-merge-arch-failed-01a.s: Likewise
		* testsuite/ld-riscv-elf/attr-merge-arch-failed-01b.s: Likewise
		* testsuite/ld-riscv-elf/attr-merge-arch-failed-02.d: Likewise
		* testsuite/ld-riscv-elf/attr-merge-arch-failed-02a.s: Likewise
		* testsuite/ld-riscv-elf/attr-merge-arch-failed-02b.s: Likewise
		* testsuite/ld-riscv-elf/attr-merge-arch-failed-02c.s: Likewise
		* testsuite/ld-riscv-elf/attr-merge-arch-failed-02d.s: Likewise
		* testsuite/ld-riscv-elf/attr-merge-user-ext-01.d: New test.
		* testsuite/ld-riscv-elf/attr-merge-user-ext-rv32i21_m2p0.s:
		Likewise.
		* testsuite/ld-riscv-elf/attr-merge-user-ext-rv32i21_m2p1.s:
		Likewise.
		* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Remove obselete
		attr-merge-arch-failed-{01,02}, replace with
		attr-merge-user-ext-01.

2022-02-08  Alan Modra  <amodra@gmail.com>

	PR28862, heap-buffer-overflow in parse_stab_string
	I have no info on the format of a "SUNPRO C++ Namespace" stab, so am
	relying on the previous code being correct in parsing these stabs.
	Just don't allow NULs anywhere in the stab.

		PR 28862
		* stabs.c (parse_stab_string): Don't overrun buffer when parsing
		'Y' stab.

2022-02-08  Alan Modra  <amodra@gmail.com>

	Re: elf: Check symbol version without any symbols
		* testsuite/ld-elf/pr24718-1.d: Don't xfail for hppa64.

2022-02-08  Andrew Burgess  <aburgess@redhat.com>

	gdb: remove tailing newlines from index_cache_debug calls
	I noticed that most of the calls to index_cache_debug include a
	trailing newline.  As the new debug mechanism already adds a newline,
	that means all of these debug calls result in a blank line being
	printed, which I think is a mistake.

	Remove all the trailing newlines.

	I also reformatted one of the index_cache_debug where a string will
	now fit onto a single line.

	Unless 'set debug index-cache on' is used, there should be no visible
	change in output after this commit.

2022-02-08  H.J. Lu  <hjl.tools@gmail.com>

	i386: Allow GOT32 relocations against ABS symbols
	GOT32 relocations are allowed since absolute value + addend is stored in
	the GOT slot.

	Tested on glibc 2.35 build with GCC 11.2 and -Os.

	bfd/

		PR ld/28870
		* elfxx-x86.c (_bfd_elf_x86_valid_reloc_p): Also allow GOT32
		relocations.

	ld/

		PR ld/28870
		* testsuite/ld-i386/i386.exp: Run pr28870.
		* testsuite/ld-i386/pr28870.d: New file.
		* testsuite/ld-i386/pr28870.s: Likewise.

2022-02-08  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-02-07  Andrew Burgess  <aburgess@redhat.com>

	gdb/python: allow Value.format_string to return styled output
	Add a new argument to the gdb.Value.format_string method, 'styling'.
	This argument is False by default.

	When this argument is True, then the returned string can contain output
	styling escape sequences.

	When this argument is False, then the returned string will not contain
	any styling escape sequences.

	If the returned string is going to be printed to the user, then it is
	often nice to retain the GDB styling.

	For the testing, we need to adjust the TERM environment variable, as
	we do for all the styling tests.  I'm now running all of the C tests
	in gdb.python/py-format-string.exp in an environment where styling
	could be generated, but only my new test should actually produce
	styled output, hopefully this will catch the case where a bug might
	cause format_string to always produce styled output.

2022-02-07  Lancelot SIX  <lancelot.six@amd.com>

	gdb: make thread_info::m_thread_fsm a std::unique_ptr
	While working on function calls, I realized that the thread_fsm member
	of struct thread_info is a raw pointer to a resource it owns.  This
	commit changes the type of the thread_fsm member to a std::unique_ptr in
	order to signify this ownership relationship and slightly ease resource
	management (no need to manually call delete).

	To ensure consistent use, the field is made a private member
	(m_thread_fsm).  The setter method (set_thread_fsm) can then check
	that it is incorrect to associate a FSM to a thread_info object if
	another one is already in place.  This is ensured by an assertion.

	The function run_inferior_call takes an argument as a pointer to a
	call_thread_fsm and installs it in it in a thread_info instance.  Also
	change this function's signature to accept a unique_ptr in order to
	signify that the ownership of the call_thread_fsm is transferred during
	the call.

	No user visible change expected after this commit.

	Tested on x86_64-linux with no regression observed.

	Change-Id: Ia1224f72a4afa247801ce6650ce82f90224a9ae8

2022-02-07  Andrew Burgess  <aburgess@redhat.com>

	gdb: unbuffer all input streams when not using readline
	This commit should fix PR gdb/28711.  What's actually going on is
	pretty involved, and there's still a bit of the story that I don't
	understand completely, however, from my observed results, I think that
	the change I propose making here (or something very similar) is going
	to be needed.

	The original bug report involves using eclipse to drive gdb using mi
	commands.  A separate tty is spun off in which to send gdb the mi
	commands, this tty is created using the new-ui command.

	The behaviour observed is that, given a particular set of mi commands
	being sent to gdb, we sometimes see an ESPIPE error from a lseek
	call, which ultimately results in gdb terminating.

	The problems all originate from gdb_readline_no_editing_callback in
	gdb/event-top.c, where we can (sometimes) perform calls to fgetc, and
	allow glibc to perform buffering on the FILE object being used.

	I say sometime, because, gdb_readline_no_editing_callback already
	includes a call to disable the glibc buffering, but this is only done
	if the input stream is not a tty.  In our case the input stream is a
	tty, so the buffering is left in place.

	The first step to understanding why this problem occurs is to
	understand that eclipse sends multiple commands to gdb very quickly
	without waiting for and answer to each command, eclipse plans to
	collect all of the command results after sending all the commands to
	gdb.  In fact, eclipse sends the commands to gdb that they appear to
	arrive in the gdb process as a single block of data.  When reproducing
	this issue within the testsuite I find it necessary to send multiple
	commands using a single write call.

	The next bit of the story gets a little involved, and this is where my
	understanding is not complete.  I can describe the behaviour that I
	observe, and (for me at least) I'm happy that what I'm seeing, if a
	little strange, is consistent.  In order to fully understand what's
	going on I think I would likely need to dive into kernel code, which
	currently seems unnecessary given that I'm happy with the solution I'm
	proposing.

	The following description all relates to input from a tty in which I'm
	not using readline.  I see the same problems either when using a
	new-ui tty, or with gdb's standard, non-readline, mi tty.

	Here's what I observe happening when I send multiple commands to gdb
	using a single write, if I send gdb this:

	  command_1\ncommand_2\ncommand_3

	then gdb's event loop will wake up (from its select) as it sees there
	is input available.  We call into gdb_readline_no_editing_callback,
	where we call fgetc, glibc will do a single big read, and get back
	just:

	  command_1\n

	that is, despite there being multiple lines of input available, I
	consistently get just a single line.  From glibc a single character is
	returned from the fgetc call, and within gdb we accumulate characters,
	one at a time, into our own buffer.  Eventually gdb sees the '\n'
	character, and dispatches the whole 'command_1' into gdb's command
	handler, which processes the command and prints the result.  We then
	return to gdb_readline_no_editing_callback, which in turn returns to
	gdb's event loop where we re-enter the select.

	Inside the select we immediately see that there is more input waiting
	on the input stream, drop out of the select, and call back into
	gdb_readline_no_editing_callback.  In this function we again call
	fgetc where glibc performs another big read.  This time glibc gets:

	  command_2\n

	that is, we once again get just a single line, despite there being a
	third line available.  Just like the first command we copy the whole
	string, character by character into gdb's buffer, then handle the
	command.  After handling the command we go to the event loop, enter,
	and then exit the select, and call back to the function
	gdb_readline_no_editing_callback.

	In gdb_readline_no_editing_callback we again call fgetc, this time
	glibc gets the string:

	  command_3\n

	like before, we copy this to gdb's buffer and handle the command, then
	we return to the event loop.  At this point the select blocks while we
	wait for more input to arrive.

	The important bit of this is that someone, somewhere is, it appears,
	taking care to split the incoming write into lines.

	My next experiment is to try something like:

	  this_is_a_very_long_command\nshort_command\n

	However, I actually make 'this_is_a_very_long_command' very long, as
	in many hundreds of characters long.  One way to do this is:

	  echo xxxxxx.....xxxxx

	and just adding more and more 'x' characters as needed.  What I'm
	aiming for is to have the first command be longer than glibc's
	internal read buffer, which, on my machine, is 1024 characters.

	However, for this discussion, lets imagine that glibc's buffer is just
	8 characters (we can create just this situation by adding a suitable
	setbuf call into gdb_readline_no_editing_callback).

	Now, if I send gdb this data:

	  abcdefghij\nkl\n

	The first read from glibc will get 'abcdefgh', that is a full 8
	character buffer.  Once gdb has copied these to its buffer we call
	fgetc again, and now glibc will get 'ij\n', that is, just like before,
	multiple lines are split at the '\n' character.  The full command,
	which is now in gdb's buffer can be handled 'abcdefghij', after which
	we go (via the event loop) back to gdb_readline_no_editing_callback.
	Now we call fgetc, and glibc will get 'kl\n', which is then handled in
	the normal way.

	So far, so good.  However, there is, apparently, one edge case where
	the above rules don't apply.

	If the '\n' character is the first character read from the kernel,
	then the incoming lines are not split up.  So, given glibc's 8
	character buffer, if I send gdb this:

	  abcdefgh\nkl\n

	that is the first command is 8 characters plus a newline, then, on the
	first read (from within glibc) we get 'abcdefgh' in a single buffer.
	As there's no newline gdb calls fgetc again, and glibc does another
	large read, now we get:

	  \nkl\n

	which doesn't follow the above pattern - the lines are not split into
	separate buffers!

	So, gdb reads the first character from glibc using fgetc, this is the
	newline.  Now gdb has a complete command, and so the command is
	handled.  We then return to the event loop and enter the select.

	The problem is that, as far as the kernel is concerned, there is no
	more input pending, it's all been read into glibc's buffer, and so the
	select doesn't return.  The second command is basically stuck in
	glibc's buffer.

	If I send another command to gdb, or even just send an empty
	command (a lone newline) then the select returns, we call into
	gdb_readline_no_editing_callback, and now gdb sees the second
	command.

	OK, so the above is interesting, but it doesn't explain the ESPIPE
	error.

	Well, that's a slightly different, but related issue.  The ESPIPE
	case will _only_ show up when using new-ui to create the separate tty
	for mi commands, and is a consequence of this commit:

	  commit afe09f0b6311a4dd1a7e2dc6491550bb228734f8
	  Date:   Thu Jul 18 17:20:04 2019 +0100

	      Fix for using named pipes on Windows

	Prior to this commit, the new-ui command would open the tty three
	times, once each for stdin, stderr, and stdout.  After this commit we
	open the tty just once and reuse the FILE object for all three roles.

	Consider the problem case, where glibc has (unexpectedly) read the
	second command into its internal buffer.  When we handle the first
	command we usually end up having to write something to the mi output
	stream.

	After the above commit the same FILE object represents both the input
	and output streams, so, when gdb tries to write to the FILE object,
	glibc spots that there is input pending within the input buffer, and
	so assumes that we have read ahead of where we should be in the input
	file.  To correct for this glibc tries to do an lseek call to
	reposition the file offset of the output stream prior to writing to
	it.  However, as the output stream is a tty, and seeking is not
	supported on a tty, this lseek call fails, this results in the ESPIPE,
	which ultimately causes gdb to terminate.

	So, now we understand why the ESPIPE triggers (which was what caused
	the gdb crash in the original bug report), and we also understand that
	sometime gdb will not handle the second command in a timely
	fashion (if the first command is just the wrong length). So, what to
	do about all this?

	We could revert the commit mentioned above (and implement its
	functionality another way).  This would certainly resolve the ESPIPE
	issue, the buffered input would now only be on the input stream, the
	output stream would have no buffered input, and so glibc would never
	try to lseek, and so we'd never get the ESPIPE error.

	However, this only solves one of the two problems.  We would still
	suffer from the problem where, if the first command is just the wrong
	length, the second command will not (immediately) get handled.

	The only solution I can see to this problem is to unbuffer the input
	stream.  If glibc is not buffering the input, but instead, we read
	incoming data character by character from the kernel, then everything
	will be fine.  As soon as we see the newline at the end of the first
	command we will handle the first command.  As glibc will have no
	buffered input it will not be tempted to lseek, so no ESPIPE error.
	When we go have to the event loop there will be more data pending in
	the kernel, so the select will immediately return, and the second
	command will be processed.

	I'm tempted to suggest that we should move the unbuffering of the
	input stream out of gdb_readline_no_editing_callback and do it
	somewhere earlier, more like when we create the input streams.
	However, I've not done that in this commit for a couple of reasons:

	  1. By keeping the unbuffering in gdb_readline_no_editing_callback
	  I'm making the smallest possible change that fixes the bug.  Moving
	  the unbuffering somewhere better can be done as a refactor later, if
	  that 's felt to be important,

	  2. I don't think making repeated calls to unbuffer the input will
	  have that much performance impact.  We only make the unbuffer call
	  once per call to gdb_readline_no_editing_callback, and, if the input
	  stream is already unbuffered we'll return pretty quickly, so I don't
	  see this as being massively costly,

	  3. Tom is currently doing lots of gdb stream management changes and
	  I want to minimise the chances we'll conflict.

	So, this commit just changes gdb_readline_no_editing_callback to
	always unbuffer the input stream.

	The test for this issue sends two commands in a loop, with the first
	command growing bigger each time around the loop.  I actually make the
	first command bigger by just adding whitespace to the front, as gdb
	still has to read the complete command (including whitespace) via
	glibc, so this is enough to trigger the bug.

	The original bug was reported when using a virtual machine, and in
	this situation we see this in the strace output:

	  read(9, "70-var-info-path-expression var1.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 1024) = 64
	  read(9, "\n71-var-info-path-expression var1.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n", 1024) = 67

	I'm not completely sure what's going on here, but it appears that the
	kernel on the virtual machine is delivering the input to glibc slower
	than I see on my real hardware; glibc asks for 1024 bytes, but only
	gets 64 bytes the first time.  In the second read we see the problem
	case, the first character is the newline, but then the entire second
	command is included.

	If I run this exact example on my real hardware then the first command
	would not be truncated at 64 bytes, instead, I'd expect to see the
	newline included in the first read, with the second command split into
	a second read.

	So, for testing, I check cases where the first command is just a few
	characters (starting at 8 character), all the way up to 2048
	characters.  Hopefully, this should mean we hit the problem case for
	most machine setups.

	The only last question relates to commit afe09f0b6311a4d that I
	mentioned earlier.  That commit was intended to provide support for
	Microsoft named pipes:

	  https://docs.microsoft.com/en-us/windows/win32/ipc/named-pipes

	I know next to nothing about this topic beyond a brief scan of the
	above link, but I think these windows named pipe are closer in
	behaviour to unix sockets than to unix named fifos.

	I am a little nervous that, after the above commit, we now use the
	same FILE for in, err, and out streams.  In contrast, in a vanilla C
	program, I would expect different FILE objects for each stream.

	Still, I'm reluctant to revert the above commit (and provide the same
	functionality a different way) without a specific bug to point at,
	and, now that the streams are unbuffered, I expect a lot of the read
	and write calls are going straight to the kernel with minimal glibc
	involvement, so maybe it doesn't really matter.  Anyway, I haven't
	touched the above patch, but it is something to keep in mind when
	working in this area.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28711

2022-02-07  Andrew Burgess  <aburgess@redhat.com>

	gdb/disasm: combine the no printing disassembler setup code
	We have three places in gdb where we initialise a disassembler that
	will not print anything (used for figuring out the length of
	instructions, or collecting other information from the disassembler).

	Each of these places has its own stub function to act as a print like
	callback, the stub function is identical in each case, and just does
	nothing.

	In this commit I create a new function to initialise a disassembler
	that doesn't print anything, and have all three locations use this new
	function.  There's now only one non-printing stub function.

	There should be no user visible changes after this commit.

2022-02-07  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

	gdb: add the 'set/show suppress-cli-notifications' command
	GDB already has a flag to suppress printing notification events, such
	as thread and inferior context switches, on the CLI.  This is used
	internally when executing commands.  Make the flag available to the
	user via a new command.  This is expected to be useful in scripts.

	For instance, suppose that when Inferior 1 gets to a certain state,
	you want to add and set up a new inferior using the commands below,
	but you also want to have a reduced/clean output.

	  define do-setup
	    printf "Setting up Inferior 2...\n"
	    add-inferior -exec a.out
	    inferior 2
	    break file.c:3
	    run
	    inferior 1
	    printf "Done\n"
	  end

	Currently, GDB prints

	  (gdb) do-setup
	  Setting up Inferior 2...
	  [New inferior 2]
	  Added inferior 2 on connection 1 (native)
	  [Switching to inferior 2 [<null>] (/tmp/a.out)]
	  Breakpoint 2 at 0x1155: file file.c, line 3.

	  Thread 2.1 "a.out" hit Breakpoint 2, main () at file.c:3
	  3         return 0;
	  [Switching to inferior 1 [process 7670] (/tmp/test)]
	  [Switching to thread 1.1 (process 7670)]
	  #0  main () at test.c:2
	  2         int a = 1;
	  Done

	GDB's Python API make it possible to capture and return GDB's output,
	but this does not work for all the streams.  In particular, CLI
	notification events are not captured:

	  (gdb) python gdb.execute("do-setup", False, True)
	  [Switching to inferior 2 [<null>] (/tmp/a.out)]

	  Thread 2.1 "a.out" hit Breakpoint 2, main () at file.c:3
	  3         return 0;
	  [Switching to inferior 1 [process 8263] (/tmp/test)]
	  [Switching to thread 1.1 (process 8263)]
	  #0  main () at test.c:2
	  2         int a = 1;

	You can use the new "set suppress-cli-notifications" command to
	suppress the output:

	  (gdb) set suppress-cli-notifications on
	  (gdb) do-setup
	  Setting up Inferior 2...
	  [New inferior 2]
	  Added inferior 2 on connection 1 (native)
	  Breakpoint 2 at 0x1155: file file.c, line 3.
	  Done

2022-02-07  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

	gdb/cli: add a 'normal_stop' option to 'cli_suppress_notification'
	Extend the 'cli_suppress_notification' struct with a new field,
	'normal_stop', that can be used for checking if printing normal stop
	events on the CLI should be suppressed.

	This patch only introduces the flag.  The subsequent patch adds a user
	command to turn the flag off/on.

2022-02-07  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

	gdb/cli: convert cli_suppress_notification from int to bool
	Convert the suppress_notification flag for the CLI from int to bool.

2022-02-07  Alan Modra  <amodra@gmail.com>

	Revert "elf: Remove the 1-page gap before the RELRO segment"
	This reverts commit 2f83249c13d86065b4c7cdb198ea871017b4bba1.

		PR ld/28743
		* ldlang.c (lang_size_relro_segment_1): Revert 2022-01-10 changes.
		* testsuite/ld-i386/pr20830.d: Likewise.
		* testsuite/ld-s390/gotreloc_64-relro-1.dd: Likewise.
		* testsuite/ld-x86-64/pr14207.d: Likewise.
		* testsuite/ld-x86-64/pr18176.d: Likewise.
		* testsuite/ld-x86-64/pr20830a-now.d: Likewise.
		* testsuite/ld-x86-64/pr20830a.d: Likewise.
		* testsuite/ld-x86-64/pr20830b-now.d: Likewise.
		* testsuite/ld-x86-64/pr20830b.d: Likewise.
		* testsuite/ld-x86-64/pr21038a-now.d: Likewise.
		* testsuite/ld-x86-64/pr21038a.d: Likewise.
		* testsuite/ld-x86-64/pr21038b-now.d: Likewise.
		* testsuite/ld-x86-64/pr21038c-now.d: Likewise.
		* testsuite/ld-x86-64/pr21038c.d: Likewise.

2022-02-07  Alan Modra  <amodra@gmail.com>

	Revert "ld: Rewrite lang_size_relro_segment_1"
	This reverts commit c804c6f98d342c3d46f73d7a7ec6229d5ab1c9f3.

		PR ld/28743
		PR ld/28819
		* ldlang.c (lang_size_relro_segment_1): Revert 2022-01-14 change.
		* testsuite/ld-x86-64/pr28743-1.d: Likewise.
		* testsuite/ld-x86-64/pr28743-1.s: Likewise.
		* testsuite/ld-x86-64/x86-64.exp: Likewise.

2022-02-07  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-02-06  Alan Modra  <amodra@gmail.com>

	A more elegant pr28827-1 testcase
	Use .irpc macros in pr28827-1.s

		* testsuite/ld-powerpc/pr28827-1.s: Make the testcase more
		elegant.  Comment.

2022-02-06  Tom Tromey  <tom@tromey.com>

	Merge do_val_print and common_val_print
	The only caller of do_val_print just does a small bit of work before
	the call.  This patch merges the two functions, and removes an
	unnecessary local variable, making gdb a bit simpler.

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove SYMBOL_LINE macro
	Add a getter and a setter for a symbol's line.  Remove the corresponding macro
	and adjust all callers.

	Change-Id: I229f2b8fcf938c07975f641361313a8761fad9a5

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove SYMBOL_TYPE macro
	Add a getter and a setter for a symbol's type.  Remove the corresponding
	macro and adjust all callers.

	Change-Id: Ie1a137744c5bfe1df4d4f9ae5541c5299577c8de

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remote SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION macro
	Add a getter for a whether a symbol is a C++ template function.  Remove
	the corresponding macro and adjust all callers.

	Change-Id: I89abc2802a952b77b0e0eb73a25c2306cb8e8bcc

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove SYMBOL_INLINED macro
	Add a getter and a setter for whether a symbol is inlined.  Remove the
	corresponding macro and adjust all callers.

	Change-Id: I934468da3b5a32dd6b161a6f252a6b1b94737279

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove SYMBOL_IS_ARGUMENT macro
	Add a getter and a setter for whether a symbol is an argument.  Remove
	the corresponding macro and adjust all callers.

	Change-Id: I71b4f0465f3dfd2ed8b9e140bd3f7d5eb8d9ee81

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove SYMBOL_OBJFILE_OWNED macro
	Add a getter and a setter for whether a symbol is objfile owned.  Remove
	the corresponding macro and adjust all callers.

	Change-Id: Ib7ef3718d65553ae924ca04c3fd478b0f4f3147c

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove SYMBOL_DOMAIN macro
	Add a getter and a setter for a symbol's domain.  Remove the
	corresponding macro and adjust all callers.

	Change-Id: I54465b50ac89739c663859a726aef8cdc6e4b8f3

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove SYMBOL_CLASS macro, add getter
	Change-Id: I83211d5a47efc0564386e5b5ea4a29c00b1fd46a

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove SYMBOL_IMPL macro, add method
	Add a getter for a symbol's "impl".  Remove the corresponding macro and
	adjust all callers.

	Change-Id: Ibe26ed442f0f99a0f5cddafca30bd96ec7fb9fa8

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove SYMBOL_ACLASS_INDEX macro, add getter/setter
	Add a getter and a setter for a symbol's aclass index.  Remove the
	corresponding macro and adjust all callers.

	Change-Id: Ie8c8d732624cfadb714aba5ddafa3d29409b3d39

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove SYMBOL_MATCHES_SEARCH_NAME
	It seems like this macro is not needed at all anymore, it just wraps the
	function of the same name with the same arguments.

	Change-Id: I3c342ac8d89c27af5aee1a819dc32cc6396fd41b

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove SYMTAB_DIRNAME macro
	Remove the macro, replace with an equivalent method.

	Change-Id: I46ec36b91bb734331138eb9cd086b2db01635aed

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove SYMTAB_PSPACE macro
	Remove the macro, replace with an equivalent method.

	Change-Id: Icccc20e7e8ae03ac4dac1c7514c25a12a9a0ac69

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove SYMTAB_OBJFILE macro
	Remove the macro, replace with an equivalent method.

	Change-Id: I8f9ecd290ad28502e53c1ceca5006ba78bf042eb

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove SYMTAB_BLOCKVECTOR macro
	Remove the macro, replace with an equivalent method.

	Change-Id: Id6fe2a79c04bcd6c69ccaefb7a69bc06a476288c

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove SYMTAB_LANGUAGE macro, add getter/setter
	Add a getter and a setter for a symtab's language.  Remove the
	corresponding macro and adjust all callers.

	Change-Id: I9f4d840b11c19f80f39bac1bce020fdd1739e11f

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove SYMTAB_LINETABLE macro, add getter/setter
	Add a getter and a setter for a symtab's linetable.  Remove the
	corresponding macro and adjust all callers.

	Change-Id: I159183fc0ccd8e18ab937b3c2f09ef2244ec6e9c

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove SYMTAB_COMPUNIT macro, add getter/setter
	Add a getter and a setter for a symtab's compunit_symtab.  Remove the
	corresponding macro and adjust all callers.

	For brevity, I chose the name "compunit" instead of "compunit_symtab"
	the the field, getter and setter names.  Since we are already in symtab
	context, the _symtab suffix seems redundant.

	Change-Id: I4b9b731c96e3594f7733e75af1e3d01bc0e4fe92

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove COMPUNIT_MACRO_TABLE macro, add getter/setter
	Add a getter and a setter for a compunit_symtab's macro table.  Remove the
	corresponding macro and adjust all callers.

	Change-Id: I00615ea72d5ac43d9a865e941cb2de0a979c173a

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove COMPUNIT_EPILOGUE_UNWIND_VALID macro, add getter/setter
	Add a getter and a setter for a compunit_symtab's epilogue unwind valid flag.
	Remove the corresponding macro and adjust all callers.

	Change-Id: If3b68629d987767da9be7041a95d96dc34367a9a

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove COMPUNIT_LOCATIONS_VALID macro, add getter/setter
	Add a getter and a setter for a compunit_symtab's locations valid flag.
	Remove the corresponding macro and adjust all callers.

	Change-Id: I3e3cfba926ce62993d5b61814331bb3244afad01

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove COMPUNIT_BLOCK_LINE_SECTION macro, add getter/setter
	Add a getter and a setter for a compunit_symtab's block line section.  Remove
	the corresponding macro and adjust all callers.

	Change-Id: I3eb1a323388ad55eae8bfa45f5bc4a08dc3df455

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove COMPUNIT_BLOCKVECTOR macro, add getter/setter
	Add a getter and a setter for a compunit_symtab's blockvector.  Remove
	the corresponding macro and adjust all callers.

	Change-Id: I99484c6619dcbbea7c5d89c72aa660316ca62f64

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove COMPUNIT_DIRNAME macro, add getter/setter
	Add a getter and a setter for a compunit_symtab's dirname.  Remove the
	corresponding macro and adjust all callers.

	Change-Id: If2f39b295fd26822586485e04a8b8b5aa5cc9b2e

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove COMPUNIT_PRODUCER macro, add getter/setter
	Add a getter and a setter for a compunit_symtab's producer.  Remove the
	corresponding macro and adjust all callers.

	Change-Id: Ia1d6d8a0e247a08a21af23819d71e49b37d8931b

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove COMPUNIT_DEBUGFORMAT macro, add getter/setter
	Add a getter and a setter for a compunit_symtab's debugformat.  Remove
	the corresponding macro and adjust all callers.

	Change-Id: I1667b02d5322346f8e23abd9f8a584afbcd75975

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove COMPUNIT_FILETABS macro
	I think that most remaining uses of COMPUNIT_FILETABS intend to get the
	primary filetab of the compunit_symtab specifically (and not to iterate
	over all filetabs, for example, those cases would use compunit_filetabs,
	which has been converted to compunit_symtab::filetabs), so replace mosts
	uses with compunit_symtab::primary_filetab.

	In jit.c, function finalize_symtab, we can save the symtab object
	returned by allocate_symtab and use it, it makes things simpler.

	Change-Id: I4e51d6d4b40759de8768b61292e5e13c8eae2e38

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: move compunit_filetabs to compunit_symtab::filetabs
	Make compunit_filetabs, used to iterate a compunit_symtab's filetabs, a
	method of compunit_symtab.  The name filetabs conflicts with the current
	name of the field.  Rename the field to m_filetabs, since at this point
	nothing outside of compunit_symtab uses it, so we should treat it as
	private (even though it's not actually private).  Rename the
	last_filetab field to m_last_filetab as well (it's only used on
	compunit_symtab::add_filetab).

	Adjust the COMPUNIT_FILETABS macro to keep its current behavior of
	returning the first filetab.

	Change-Id: I537b553a44451c52d24b18ee1bfa47e23747cfc3

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: add compunit_symtab::set_primary_filetab method
	Add a method to set the primary filetab of the CU.  This is currently
	done in buildsym_compunit::end_symtab_with_blockvector.

	Change-Id: I16c51a6b90a4cb4c0c5f183b0f2e12bc64b6fd74

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: add compunit_symtab::add_filetab method
	Add a method to append a filetab/symtab to a compunit_symtab.  There is
	a single place where this is done currently, in allocate_symtab.

	Change-Id: Ie86c6e34d175728173d1cffdce44acd6cff6c31d

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: rename compunit_primary_filetab to compunit_symtab::primary_filetab
	Make compunit_primary_filetab a method of compunit_symtab.

	Change-Id: Iee3c4f7e36d579bf763c5bba146e5e10d6766768

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: remove COMPUNIT_OBJFILE macro
	Remove the macro, update all users to use the getter directly.

	Change-Id: I3f0fd6f4455d1c4ebd5da73b561eb18a979ef1f6

2022-02-06  Simon Marchi  <simon.marchi@efficios.com>

	gdb: add getter/setter for compunit_symtab::objfile
	Rename the field to m_objfile, and add a getter and a setter.  Update
	all users.

	Change-Id: If7e2f763ee3e70570140d9af9261b1b056253317

2022-02-06  Tom Tromey  <tom@tromey.com>

	Allow non-ASCII characters in Rust identifiers
	Rust 1.53 (quite a while ago now) ungated the support for non-ASCII
	identifiers.  This didn't work in gdb.  This is PR rust/20166.

	This patch fixes the problem by allowing non-ASCII characters to be
	considered as identifier components.  It seemed simplest to just pass
	them through -- doing any extra checking didn't seem worthwhile.

	The new test also verifies that such characters are allowed in strings
	and character literals as well.  The latter also required a bit of
	work in the lexer.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=20166

2022-02-06  Tom Tromey  <tom@tromey.com>

	Fix Rust parser bug with function fields
	In Rust, 'obj.f()' is a method call -- but '(obj.f)()' is a call of a
	function-valued field 'f' in 'obj'.  The Rust parser in gdb currently
	gets this wrong.  This is PR rust/24082.

	The expression and Rust parser rewrites made this simple to fix --
	simply wrapping a parenthesized expression in a new operation handles
	it.  This patch has a slight hack because I didn't want to introduce a
	new exp_opcode enumeration constant just for this.  IMO this doesn't
	matter, since we should work toward removing dependencies on these
	opcodes anyway; but let me know what you think of this.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=24082

2022-02-06  H.J. Lu  <hjl.tools@gmail.com>

	ld: Add emultempl/emulation.em
	Add emultempl/emulation.em to define ld_${EMULATION_NAME}_emulation so
	that new emulation hooks can be added easily.

		* emultempl/aix.em (LDEMUL_AFTER_OPEN): New.
		(LDEMUL_SET_OUTPUT_ARCH): Likewise.
		(LDEMUL_CHOOSE_TARGET): Likewise.
		(LDEMUL_BEFORE_ALLOCATION): Likewise.
		(LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Likewise.
		(LDEMUL_OPEN_DYNAMIC_ARCHIVE): Likewise.
		(LDEMUL_PARSE_ARGS): Likewise.
		(LDEMUL_ADD_OPTIONS): Likewise.
		(LDEMUL_HANDLE_OPTION): Likewise.
		(LDEMUL_UNRECOGNIZED_FILE): Likewise.
		(LDEMUL_PRINT_SYMBOL): Likewise.
		(ld_${EMULATION_NAME}_emulation): Removed.
		Source ${srcdir}/emultempl/emulation.em.
		* emultempl/beos.em (gld_${EMULATION_NAME}_before_parse):
		Renamed to ...
		(gld${EMULATION_NAME}_before_parse): This.
		(gld_${EMULATION_NAME}_set_symbols): Renamed to ...
		(gld${EMULATION_NAME}_set_symbols): This.
		(gld_${EMULATION_NAME}_after_open): Renamed to ...
		(gld${EMULATION_NAME}_after_open): This.
		(gld_${EMULATION_NAME}_before_allocation): Renamed to ...
		(gld${EMULATION_NAME}_before_allocation): This.
		(gld_${EMULATION_NAME}_get_script): Renamed to ...
		(gld${EMULATION_NAME}_get_script): This.
		(LDEMUL_AFTER_OPEN): New.
		(LDEMUL_BEFORE_ALLOCATION): Likewise.
		(LDEMUL_PLACE_ORPHAN): Likewise.
		(LDEMUL_SET_SYMBOLS): Likewise.
		(LDEMUL_ADD_OPTIONS): Likewise.
		(LDEMUL_HANDLE_OPTION): Likewise.
		(ld_${EMULATION_NAME}_emulation): Removed.
		Source ${srcdir}/emultempl/emulation.em.
		* emultempl/elf.em (LDEMUL_AFTER_PARSE): New.
		(LDEMUL_AFTER_OPEN): Likewise.
		(LDEMUL_BEFORE_PLACE_ORPHANS): Likewise.
		(LDEMUL_AFTER_ALLOCATION): Likewise.
		(LDEMUL_SET_OUTPUT_ARCH): Likewise.
		(LDEMUL_BEFORE_ALLOCATION): Likewise.
		(LDEMUL_OPEN_DYNAMIC_ARCHIVE): Likewise.
		(LDEMUL_PLACE_ORPHAN): Likewise.
		(LDEMUL_ADD_OPTIONS): Likewise.
		(LDEMUL_HANDLE_OPTION): Likewise.
		(LDEMUL_LIST_OPTIONS): Likewise.
		(LDEMUL_UNRECOGNIZED_FILE): Likewise.
		(ld_${EMULATION_NAME}_emulation): Removed.
		Source ${srcdir}/emultempl/emulation.em.
		* emultempl/emulation.em: New file.
		* emultempl/generic.em (ld_${EMULATION_NAME}_emulation): Removed.
		Source ${srcdir}/emultempl/emulation.em.
		* emultempl/msp430.em (LDEMUL_AFTER_OPEN): New.
		(LDEMUL_AFTER_ALLOCATION): Likewise.
		(LDEMUL_PLACE_ORPHAN): Likewise.
		(LDEMUL_FINISH): Likewise.
		(LDEMUL_ADD_OPTIONS): Likewise.
		(LDEMUL_HANDLE_OPTION): Likewise.
		(LDEMUL_LIST_OPTIONS): Likewise.
		(ld_${EMULATION_NAME}_emulation): Removed.
		Source ${srcdir}/emultempl/emulation.em.
		* emultempl/pe.em (gld_${EMULATION_NAME}_before_parse): Renamed
		to ...
		(gld${EMULATION_NAME}_before_parse): This.
		(gld_${EMULATION_NAME}_list_options): Renamed to ...
		(gld${EMULATION_NAME}_list_options): This.
		(gld_${EMULATION_NAME}_set_symbols): Renamed to ...
		(gld${EMULATION_NAME}_set_symbols): This.
		(gld_${EMULATION_NAME}_after_parse): Renamed to ...
		(gld${EMULATION_NAME}_after_parse): This.
		(gld_${EMULATION_NAME}_after_open): Renamed to ...
		(gld${EMULATION_NAME}_after_open): This.
		(gld_${EMULATION_NAME}_before_allocation): Renamed to ...
		(gld${EMULATION_NAME}_before_allocation): This.
		(gld_${EMULATION_NAME}_unrecognized_file): Renamed to ...
		(gld${EMULATION_NAME}_unrecognized_file): This.
		(gld_${EMULATION_NAME}_recognized_file): Renamed to ...
		(gld${EMULATION_NAME}_recognized_file): This.
		(gld_${EMULATION_NAME}_finish): Renamed to ...
		(gld${EMULATION_NAME}_finish): This.
		(gld_${EMULATION_NAME}_place_orphan): Renamed to ...
		(gld${EMULATION_NAME}_place_orphan): This.
		(gld_${EMULATION_NAME}_open_dynamic_archive): Renamed to ...
		(gld${EMULATION_NAME}_open_dynamic_archive): This.
		(gld_${EMULATION_NAME}_find_potential_libraries): Renamed to ...
		(gld${EMULATION_NAME}_find_potential_libraries): This.
		(gld_${EMULATION_NAME}_get_script): Renamed to ...
		(gld${EMULATION_NAME}_get_script): This.
		(LDEMUL_AFTER_PARSE): New.
		(LDEMUL_AFTER_OPEN): Likewise.
		(LDEMUL_BEFORE_ALLOCATION): Likewise.
		(LDEMUL_FINISH=): Likewise.
		(LDEMUL_OPEN_DYNAMIC_ARCHIVE): Likewise.
		(LDEMUL_PLACE_ORPHAN): Likewise.
		(LDEMUL_SET_SYMBOLS): Likewise.
		(LDEMUL_ADD_OPTIONS): Likewise.
		(LDEMUL_HANDLE_OPTION): Likewise.
		(LDEMUL_UNRECOGNIZED_FILE): Likewise.
		(LDEMUL_LIST_OPTIONS): Likewise.
		(LDEMUL_RECOGNIZED_FILE): Likewise.
		(LDEMUL_FIND_POTENTIAL_LIBRARIES): Likewise.
		(ld_${EMULATION_NAME}_emulation): Removed.
		Source ${srcdir}/emultempl/emulation.em.
		* emultempl/pep.em (gld_${EMULATION_NAME}_before_parse): Renamed
		to ...
		(gld${EMULATION_NAME}_before_parse): This.
		(gld_${EMULATION_NAME}_list_options): Renamed to ...
		(gld${EMULATION_NAME}_list_options): This.
		(gld_${EMULATION_NAME}_set_symbols): Renamed to ...
		(gld${EMULATION_NAME}_set_symbols): This.
		(gld_${EMULATION_NAME}_after_parse): Renamed to ...
		(gld${EMULATION_NAME}_after_parse): This.
		(gld_${EMULATION_NAME}_after_open): Renamed to ...
		(gld${EMULATION_NAME}_after_open): This.
		(gld_${EMULATION_NAME}_before_allocation): Renamed to ...
		(gld${EMULATION_NAME}_before_allocation): This.
		(gld_${EMULATION_NAME}_unrecognized_file): Renamed to ...
		(gld${EMULATION_NAME}_unrecognized_file): This.
		(gld_${EMULATION_NAME}_recognized_file): Renamed to ...
		(gld${EMULATION_NAME}_recognized_file): This.
		(gld_${EMULATION_NAME}_finish): Renamed to ...
		(gld${EMULATION_NAME}_finish): This.
		(gld_${EMULATION_NAME}_place_orphan): Renamed to ...
		(gld${EMULATION_NAME}_place_orphan): This.
		(gld_${EMULATION_NAME}_open_dynamic_archive): Renamed to ...
		(gld${EMULATION_NAME}_open_dynamic_archive): This.
		(gld_${EMULATION_NAME}_find_potential_libraries): Renamed to ...
		(gld${EMULATION_NAME}_find_potential_libraries): This.
		(gld_${EMULATION_NAME}_get_script): Renamed to ...
		(gld${EMULATION_NAME}_get_script): This.
		(LDEMUL_AFTER_PARSE): New.
		(LDEMUL_AFTER_OPEN): Likewise.
		(LDEMUL_BEFORE_ALLOCATION): Likewise.
		(LDEMUL_FINISH=): Likewise.
		(LDEMUL_OPEN_DYNAMIC_ARCHIVE): Likewise.
		(LDEMUL_PLACE_ORPHAN): Likewise.
		(LDEMUL_SET_SYMBOLS): Likewise.
		(LDEMUL_ADD_OPTIONS): Likewise.
		(LDEMUL_HANDLE_OPTION): Likewise.
		(LDEMUL_UNRECOGNIZED_FILE): Likewise.
		(LDEMUL_LIST_OPTIONS): Likewise.
		(LDEMUL_RECOGNIZED_FILE): Likewise.
		(LDEMUL_FIND_POTENTIAL_LIBRARIES): Likewise.
		(ld_${EMULATION_NAME}_emulation): Removed.
		Source ${srcdir}/emultempl/emulation.em.
		* emultempl/ticoff.em (gld_${EMULATION_NAME}_list_options):
		Renamed to ...
		(gld${EMULATION_NAME}_list_options): This.
		(gld_${EMULATION_NAME}_before_parse): Renamed to ...
		(gld_${EMULATION_NAME}_get_script): Renamed to ...
		(gld${EMULATION_NAME}_get_script): This.
		(LDEMUL_ADD_OPTIONS): New.
		(LDEMUL_HANDLE_OPTION): Likewise.
		(LDEMUL_LIST_OPTIONS): Likewise.
		(ld_${EMULATION_NAME}_emulation): Removed.
		Source ${srcdir}/emultempl/emulation.em.
		* emultempl/vanilla.em (LDEMUL_BEFORE_PARSE): New.
		(LDEMUL_SET_OUTPUT_ARCH): Likewise.
		(LDEMUL_GET_SCRIPT): Likewise.
		(EMULATION_NAME): Likewise.
		(OUTPUT_FORMAT): Likewise.
		(ld_vanilla_emulation): Removed.
		Source ${srcdir}/emultempl/emulation.em.

2022-02-06  Andrew Burgess  <aburgess@redhat.com>

	gdb/doc: update docs for 'info win' and 'winheight' commands
	This started by noticing that the docs for 'winheight' are out of
	date, the docs currently give a specific list of possible window
	names.  However, now that windows can be implemented in Python, it is
	not possible to list all possible names.

	I now link the user to a mechanism by which they can discover the
	valid names for themselves at run time (by using 'info win').  That,
	and the fact that gdb provides tab-completion of the name at the
	command line, feels good enough.

	Finally, I noticed that the docs for 'win info' don't explicitly say
	that the name of the window is given in the output.  This could
	probably have been inferred, but given I'm now linking to this as a
	mechanism to find the window name, I'd prefer to mention that the name
	can be found in the output.

2022-02-06  Andrew Burgess  <aburgess@redhat.com>

	gdb/tui: add window width information to 'info win' output
	Now that we support horizontal window placement in the tui, it makes
	sense to have 'info win' include the width, as well as the height, of
	the currently visible windows.

	That's what this commit does.  Example output is now:

	  (gdb) info win
	  Name       Lines Columns Focus
	  src           12      40 (has focus)
	  asm           12      41
	  status         1      80
	  cmd           11      80

	I've added a NEWS entry, but the documentation was already suitably
	vague, it just says that 'info win' displays the size of the visible
	windows, so I don't think anything needs to be added there.

	I've also added some tests, as far as I could find, the 'info win'
	command was previously untested.

2022-02-06  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-02-05  H.J. Lu  <hjl.tools@gmail.com>

	x86: Skip undefined symbol when finishing DT_RELR
	Don't abort for undefined symbol when finishing DT_RELR.  Instead, skip
	undefined symbol.  Undefined symbol will be reported by relocate_section.

		* elfxx-x86.c (elf_x86_size_or_finish_relative_reloc): Skip
		undefined symbol in finishing phase.

2022-02-05  Alan Modra  <amodra@gmail.com>

	Tweak assembler invocation for pr28827-1 test
		PR 28827
		* testsuite/ld-powerpc/pr28827-1.d: Pass -a64 to gas.

2022-02-05  Alan Modra  <amodra@gmail.com>

	PR28827 testcase
	This testcase triggers a stub sizing error with the patches applied
	for PR28743 (commit 2f83249c13d8 and c804c6f98d34).

		PR 28827
		* testsuite/ld-powerpc/pr28827-1.s,
		* testsuite/ld-powerpc/pr28827-1.d: New test.
		* testsuite/ld-powerpc/powerpc.exp: Run it.

2022-02-05  Alan Modra  <amodra@gmail.com>

	Enable "size" as a dumpprog in ld
	binutils/
		* testsuite/lib/binutils-common.exp (run_dump_test): Reference
		global SIZE and SIZEFLAGS.
	ld/
		* testsuite/config/default.exp: Define SIZE and SIZEFLAGS.

2022-02-05  Alan Modra  <amodra@gmail.com>

	Detect .eh_frame_hdr earlier for SIZEOF_HEADERS
	Current code detects the need for PT_GNU_EH_FRAME using a field set by
	_bfd_elf_discard_section_eh_frame_hdr, which is called fairly late in
	the linking process.  Use the elf hash table eh_info instead, which is
	set up earlier by size_dynamic_sections.

		* elf-bfd.h (struct output_elf_obj_tdata): Delete eh_frame_hdr.
		(elf_eh_frame_hdr): Don't define.
		(_bfd_elf_discard_section_eh_frame_hdr): Update prototype.
		* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame_hdr): Delete
		abfd parameter.  Don't set elf_eh_frame_hdr.
		* elf.c (elf_eh_frame_hdr): New function.
		(get_program_header_size): Adjust elf_eh_frame_hdr call.
		(_bfd_elf_map_sections_to_segments): Likewise.

2022-02-05  Faraz Shahbazker  <fshahbazker@wavecomp.com>

	sim: mips: Add simulator support for mips32r6/mips64r6
	2022-02-01  Ali Lown  <ali.lown@imgtec.com>
		    Andrew Bennett  <andrew.bennett@imgtec.com>
		    Dragan Mladjenovic  <dragan.mladjenovic@rt-rk.com>
		    Faraz Shahbazker  <fshahbazker@wavecomp.com>

	sim/common/ChangeLog:
		* sim-bits.h (EXTEND9, EXTEND18 ,EXTEND19, EXTEND21,
		EXTEND26): New macros.

	sim/mips/ChangeLog:
		* Makefile.in (IGEN_INCLUDE): Add mips3264r6.igen.
		* configure: Regenerate.
		* configure.ac: Support mipsisa32r6 and mipsisa64r6.
		(sim_engine_run): Pick simulator model from processor specified
		in e_flags.
		* cp1.c (value_fpr): Handle fmt_dc32.
		(fp_unary, fp_binary): Zero initialize locals.
		(update_fcsr, fp_classify, fp_rint, fp_r6_cmp, inner_fmac,
		fp_fmac, fp_min, fp_max, fp_mina, fp_maxa, fp_fmadd, fp_fmsub):
		New functions.
		(sim_fpu_class_mips_mapping): New.
		* cp1.h (fcsr_ABS2008_mask, fcsr_ABS2008_shift): New define.
		* interp.c (MIPSR6_P): New.
		(load_word): Allow unaligned memory access for MIPSR6.
		* micromips.igen (sc, scd): Adapt to new do_sc* helper signature.
		* mips.igen: Add *r6 models.
		(signal_if_cti, forbiddenslot32): New helpers.
		(delayslot32): Use signal_if_cti.
		(do_sc, do_scd); Add store_ll_bit parameter.
		(sc, scd): Adapt to previous change.
		(nal, beq, bal): New definitions for *r6.
		(sll): Split nop and ssnop cases into ...
		(nop, ssnop): New definitions.
		(loadstore_ea): Use the 32-bit compatibility adressing.
		(cache): Split logic into ...
		(do_cache): New helper.
		(check_fpu): Select IEEE 754-2008 mode for R6.
		(not_word_value, unpredictable, check_mt_hilo, check_mf_hilo,
		check_multi_hilo, check_div_hilo, check_u64, do_dmfc1b, add,
		li, addu, and, andi, bgez, bgtz, blez, bltz, bne, break, dadd,
		daddiu, daddu, dror, dror32, drorv, dsll, dsll32, dsllv, dsra,
		dsra32, dsrav, dsrl, dsrl32, dsub, dsubu, j, jal, jalr,
		jalr.hb, lb, lbu, ld, lh, lhu, lui, lw, lwu, nor, or, ori, ror,
		rorv, sb, sd, sh, sll, sllv, slt, slti, sltiu, sltu, sra, srav,
		srl, srlv, sub, subu, sw, sync, syscall, teq, tge, tgeu, tlt,
		tltu, tne, xor, xori, check_fmt_p, do_load_double,
		do_store_double, abs.FMT, add.FMT, ceil.l.FMT, ceil.w.FMT,
		cfc1, ctc1, cvt.d.FMT, cvt.l.FMT, cvt.w.FMT, div.FMT, dfmc1,
		dmtc1, floor.l.FMT, floor.w.FMT, ldc1, lwc1, mfc1, mov.FMT,
		mtc1, mul.FMT, recip.FMT, round.l.FMT, round.w.FMT, rsqrt.FMT,
		sdc1, sqrt.FMT, sub.FMT, swc1, trunc.l.FMT, trunc.w.FMT, bc0f,
		bc0fl, bc0t, bc0tl, dmfc0, dmtc0, eret, mfc0, mtc0, cop, tlbp,
		tlbr, tlbwi, tlbwr): Enable on *r6 models.
		* mips3264r2.igen (dext, dextm, dextu, di, dins, dinsm, dinsu,
		dsbh, dshd, ei, ext, mfhc1, mthc1, ins, seb, seh, synci, rdhwr,
		wsbh): Likewise.
		* mips3264r6.igen: New file.
		* sim-main.h (FP_formats): Add fmt_dc32.
		(FORBIDDEN_SLOT): New macros.
		(simFORBIDDENSLOT, FP_R6CMP_*, FP_R6CLASS_*): New defines.
		(fp_r6_cmp, fp_classify, fp_rint, fp_min, fp_max, fp_mina,
		fp_maxa, fp_fmadd, fp_fmsub): New declarations.
		(R6Compare, Classify, RoundToIntegralExact, Min, Max, MinA,
		MaxA, FusedMultiplyAdd, FusedMultiplySub): New macros. Wrapping
		previous declarations.

	sim/testsuite/mips/ChangeLog:
		* basic.exp: Add r6-*.s tests.
		(run_r6_removed_test): New function.
		(run_endian_tests): New function.
		* hilo-hazard-3.s: Skip for mips*r6.
		* r2-fpu.s: New test.
		* r6-64.s: New test.
		* r6-branch.s: New test.
		* r6-forbidden.s: New test.
		* r6-fpu.s: New test.
		* r6-llsc-dp.s: New test.
		* r6-llsc-wp.s: New test.
		* r6-removed.csv: New test.
		* r6-removed.s: New test.
		* r6.s: New test.
		* utils-r6.inc: New inc.

2022-02-05  Faraz Shahbazker  <fshahbazker@wavecomp.com>

	sim: Add partial support for IEEE 754-2008
	2022-02-01  Faraz Shahbazker  <fshahbazker@wavecomp.com>

	sim/common/ChangeLog:
		* sim-fpu.c (sim_fpu_minmax_nan): New.
		(sim_fpu_max): Add variant behaviour for IEEE 754-2008.
		(sim_fpu_min): Likewise.
		(sim_fpu_is_un, sim_fpu_is_or): New.
		(sim_fpu_un, sim_fpu_or): New.
		(sim_fpu_is_ieee754_2008, sim_fpu_is_ieee754_1985): New.
		(sim_fpu_set_mode): New.
		(sim_fpu_classify): New.
		* sim-fpu.h (sim_fpu_minmax_nan): New declaration.
		(sim_fpu_un, sim_fpu_or): New declarations.
		(sim_fpu_is_un, sim_fpu_is_or): New declarations.
		(sim_fpu_mode): New enum.
		[sim_fpu_state](current_mode): New field.
		(sim_fpu_current_mode): New define.
		(sim_fpu_is_ieee754_2008): New declaration.
		(sim_fpu_is_ieee754_1985): New declaration.
		(sim_fpu_set_mode): New declaration.
		(sim_fpu_classify): New declaration.

2022-02-05  Faraz Shahbazker  <fshahbazker@wavecomp.com>

	sim: Factor out NaN handling in floating point operations
	2022-02-01  Faraz Shahbazker  <fshahbazker@wavecomp.com>

	sim/common/ChangeLog:
		* sim-fpu.c (sim_fpu_op_nan): New.
		(sim_fpu_add): Factor out NaN operand handling with
		a call to sim_fpu_op_nan.
		(sim_fpu_sub, sim_fpu_mul, sim_fpu_div): Likewise.
		(sim_fpu_rem, sim_fpu_max, sim_fpu_min): Likewise.
		* sim-fpu.h (sim_fpu_op_nan): New declaration.

2022-02-05  Faraz Shahbazker  <fshahbazker@wavecomp.com>

	sim: Allow toggling of quiet NaN-bit semantics
	IEEE754-1985 specifies the top bit of the mantissa as an indicator
	of signalling vs. quiet NaN, but does not define the precise semantics.
	Most architectures treat this bit as indicating quiet NaN, but legacy
	(pre-R6) MIPS goes the other way and treats it as signalling NaN.

	This used to be controlled by a macro that was only defined for MIPS.
	This patch replaces the macro with a variable to track the current
	semantics of the NaN bit and allows differentiation between older
	(pre-R6) and and newer MIPS cores.

	2022-02-01  Faraz Shahbazker  <fshahbazker@wavecomp.com>

	sim/common/ChangeLog:
		* sim-fpu.c (_sim_fpu): New.
		(pack_fpu, unpack_fpu): Allow reversal of quiet NaN semantics.
		* sim-fpu.h (sim_fpu_state): New struct.
		(_sim_fpu): New extern.
		(sim_fpu_quiet_nan_inverted): New define.

	sim/mips/ChangeLog:
		* cp1.h (fcsr_NAN2008_mask, fcsr_NAN2008_shift): New.
		* mips.igen (check_fpu): Select default quiet NaN mode
		for legacy MIPS.
		* sim-main.h (SIM_QUIET_NAN_NEGATED): Remove.

2022-02-05  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-02-04  H.J. Lu  <hjl.tools@gmail.com>

	ld: Remove emultempl/armcoff.em
	Remove emultempl/armcoff.em which has been unused after

	commit 2ac93be706418f3b2aebeb22159a328023faed52
	Author: Alan Modra <amodra@gmail.com>
	Date:   Mon Apr 16 20:33:36 2018 +0930

	    Remove arm-aout and arm-coff support

	    This also removes arm-netbsd (not arm-netbsdelf!), arm-openbsd, and
	    arm-riscix.  Those targets weren't on the obsolete list but they are
	    all aout, and it doesn't make all that much sense to remove arm-aout
	    without removing them too.

		* emultempl/armcoff.em: Removed.

2022-02-04  Simon Marchi  <simon.marchi@efficios.com>

	gdb: include jit_code_entry::symfile_addr value in names of objfiles created by jit reader API
	This commit includes the JIT object's symfile address in the names of
	objfiles created by JIT reader API (e.g., << JIT compiled code at
	0x7ffd8a0c77a0 >>).  This allows one to at least differentiate one from
	another.

	The address is the one that the debugged program has put in
	jit_code_entry::symfile_addr, and that the JIT reader's read function
	receives.  As we can see in gdb.base/jit-reader-host.c and
	gdb.base/jit-reader.c, that may not be the actual value of where the
	JIT-ed code is.  But it is a value chosen by the author of the JIT
	engine and the JIT reader, so including this value in the objfile name
	may help them correlate the JIT objfiles created by with their logs /
	data structures.

	To access this field, we need to pass down a reference to the
	jit_code_entry.  So make jit_dbg_reader_data a structure (instead of an
	alias for a CORE_ADDR) that includes the address of the code entry in
	the inferior's address space (the previous meaning of
	jit_dbg_reader_data) plus a reference to the jit_code_entry as read into
	GDB's address space.  And while at it, pass down the gdbarch, so that we
	don't have to call target_gdbarch.

	Co-Authored-By: Jan Vrany <jan.vrany@labware.com>
	Change-Id: Ib26c4d1bd8de503d651aff89ad2e500cb312afa5

2022-02-04  Tom Tromey  <tromey@adacore.com>

	Improve Ada unchecked union type printing
	Currently, "ptype" of an Ada unchecked union may show a
	compiler-generated wrapper structure in its output.  It's more
	Ada-like to elide this structure, which is what this patch implements.
	It turned out to be simplest to reuse a part of print_variant_clauses
	for this.

	As this is Ada-specific, and Joel already reviewed it internally, I am
	going to check it in.

2022-02-04  Tom Tromey  <tromey@adacore.com>

	Remove host_hex_value
	I noticed that host_hex_value is redundant, because gdbsupport already
	has fromhex.  This patch removes the former in favor of the latter.

	Regression tested on x86-64 Fedora 34.

2022-02-04  Andi Kleen  <andi@firstfloor.org>

	Support symbol+offset lookup in addr2line
	The Linux kernel usually ouputs symbol+offset instead of plain code
	addresses these days, to avoid leaking ASLR secrets and to handle
	dynamically loaded modules.

	Converting those with addr2line is somewhat involved: it requires
	looking up the symbol first using nm and then manually compute the
	offset, and then pass it to addr2line.

	This patch implements the necessary steps directly in addr2line,
	by looking up the symbol (with demangling if needed) and computing
	the offset.

	It's possible that a symbol is ambigious with a hex number. In this
	case it uses the symbol lookup if the string contains a +. When it isn't
	ambigious the + is optional.

2022-02-04  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-02-03  Cary Coutant  <ccoutant@gmail.com>

	Rename EM_56800V4 to EM_56800EF.
	include/elf:
		* common.h: Rename EM_56800V4 to EM_56800EF.

2022-02-03  H.J. Lu  <hjl.tools@gmail.com>

	x86: Update X86_64_GOT_TYPE_P to cover more GOT relocations
	Add R_X86_64_GOT32, R_X86_64_GOT64, R_X86_64_GOTPCREL64 and
	R_X86_64_GOTPLT64 to X86_64_GOT_TYPE_P to cover more GOT relocations.

		PR ld/28858
		* elfxx-x86.h (X86_64_GOT_TYPE_P): Add R_X86_64_GOT32,
		R_X86_64_GOT64, R_X86_64_GOTPCREL64 and R_X86_64_GOTPLT64.

2022-02-03  Cary Coutant  <ccoutant@gmail.com>

	Add new e_machine values.
	include/elf:
		* common.h: Add EM_U16_U8CORE, EM_TACHYUM, EM_56800V4.

2022-02-03  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

	testsuite: fix failure in gdb.threads/killed-outside.exp
	Starting with commit

	  commit 1da5d0e664e362857153af8682321a89ebafb7f6
	  Date:   Tue Jan 4 08:02:24 2022 -0700

	    Change how Python architecture and language are handled

	we see a failure in gdb.threads/killed-outside.exp:

	  ...
	  Executing on target: kill -9 16622    (timeout = 300)
	  builtin_spawn -ignore SIGHUP kill -9 16622
	  continue
	  Continuing.
	  Couldn't get registers: No such process.
	  (gdb) [Thread 0x7ffff77c2700 (LWP 16626) exited]

	  Program terminated with signal SIGKILL, Killed.
	  The program no longer exists.
	  FAIL: gdb.threads/killed-outside.exp: prompt after first continue (timeout)

	This is not a regression but a failure due to a change in GDB's
	output.  Prior to the aforementioned commit, GDB has been printing the
	"Couldn't get registers: No such process." message twice.  The second
	one came from

	  (top-gdb) bt
	  #0  amd64_linux_nat_target::fetch_registers (this=0x555557f31440 <the_amd64_linux_nat_target>, regcache=0x555558805ce0, regnum=16) at /gdb-up/gdb/amd64-linux-nat.c:225
	  #1  0x000055555640ac5f in target_ops::fetch_registers (this=0x555557d636d0 <the_thread_db_target>, arg0=0x555558805ce0, arg1=16) at /gdb-up/gdb/target-delegates.c:502
	  #2  0x000055555641a647 in target_fetch_registers (regcache=0x555558805ce0, regno=16) at /gdb-up/gdb/target.c:3945
	  #3  0x0000555556278e68 in regcache::raw_update (this=0x555558805ce0, regnum=16) at /gdb-up/gdb/regcache.c:587
	  #4  0x0000555556278f14 in readable_regcache::raw_read (this=0x555558805ce0, regnum=16, buf=0x555558881950 "") at /gdb-up/gdb/regcache.c:601
	  #5  0x00005555562792aa in readable_regcache::cooked_read (this=0x555558805ce0, regnum=16, buf=0x555558881950 "") at /gdb-up/gdb/regcache.c:690
	  #6  0x000055555627965e in readable_regcache::cooked_read_value (this=0x555558805ce0, regnum=16) at /gdb-up/gdb/regcache.c:748
	  #7  0x0000555556352a37 in sentinel_frame_prev_register (this_frame=0x555558181090, this_prologue_cache=0x5555581810a8, regnum=16) at /gdb-up/gdb/sentinel-frame.c:53
	  #8  0x0000555555fa4773 in frame_unwind_register_value (next_frame=0x555558181090, regnum=16) at /gdb-up/gdb/frame.c:1235
	  #9  0x0000555555fa420d in frame_register_unwind (next_frame=0x555558181090, regnum=16, optimizedp=0x7fffffffd570, unavailablep=0x7fffffffd574, lvalp=0x7fffffffd57c, addrp=0x7fffffffd580,
	      realnump=0x7fffffffd578, bufferp=0x7fffffffd5b0 "") at /gdb-up/gdb/frame.c:1143
	  #10 0x0000555555fa455f in frame_unwind_register (next_frame=0x555558181090, regnum=16, buf=0x7fffffffd5b0 "") at /gdb-up/gdb/frame.c:1199
	  #11 0x00005555560178e2 in i386_unwind_pc (gdbarch=0x5555587c4a70, next_frame=0x555558181090) at /gdb-up/gdb/i386-tdep.c:1972
	  #12 0x0000555555cd2b9d in gdbarch_unwind_pc (gdbarch=0x5555587c4a70, next_frame=0x555558181090) at /gdb-up/gdb/gdbarch.c:3007
	  #13 0x0000555555fa3a5b in frame_unwind_pc (this_frame=0x555558181090) at /gdb-up/gdb/frame.c:948
	  #14 0x0000555555fa7621 in get_frame_pc (frame=0x555558181160) at /gdb-up/gdb/frame.c:2572
	  #15 0x0000555555fa7706 in get_frame_address_in_block (this_frame=0x555558181160) at /gdb-up/gdb/frame.c:2602
	  #16 0x0000555555fa77d0 in get_frame_address_in_block_if_available (this_frame=0x555558181160, pc=0x7fffffffd708) at /gdb-up/gdb/frame.c:2665
	  #17 0x0000555555fa5f8d in select_frame (fi=0x555558181160) at /gdb-up/gdb/frame.c:1890
	  #18 0x0000555555fa5bab in lookup_selected_frame (a_frame_id=..., frame_level=-1) at /gdb-up/gdb/frame.c:1720
	  #19 0x0000555555fa5e47 in get_selected_frame (message=0x0) at /gdb-up/gdb/frame.c:1810
	  #20 0x0000555555cc9c6e in get_current_arch () at /gdb-up/gdb/arch-utils.c:848
	  #21 0x000055555625b239 in gdbpy_before_prompt_hook (extlang=0x555557451f20 <extension_language_python>, current_gdb_prompt=0x555557f4d890 <top_prompt+16> "(gdb) ")
	      at /gdb-up/gdb/python/python.c:1063
	  #22 0x0000555555f7cfbb in ext_lang_before_prompt (current_gdb_prompt=0x555557f4d890 <top_prompt+16> "(gdb) ") at /gdb-up/gdb/extension.c:922
	  #23 0x0000555555f7d442 in std::_Function_handler<void (char const*), void (*)(char const*)>::_M_invoke(std::_Any_data const&, char const*&&) (__functor=...,
	      __args#0=@0x7fffffffd900: 0x555557f4d890 <top_prompt+16> "(gdb) ") at /usr/include/c++/7/bits/std_function.h:316
	  #24 0x0000555555f752dd in std::function<void (char const*)>::operator()(char const*) const (this=0x55555817d838, __args#0=0x555557f4d890 <top_prompt+16> "(gdb) ")
	      at /usr/include/c++/7/bits/std_function.h:706
	  #25 0x0000555555f75100 in gdb::observers::observable<char const*>::notify (this=0x555557f49060 <gdb::observers::before_prompt>, args#0=0x555557f4d890 <top_prompt+16> "(gdb) ")
	      at /gdb-up/gdb/../gdbsupport/observable.h:150
	  #26 0x0000555555f736dc in top_level_prompt () at /gdb-up/gdb/event-top.c:444
	  #27 0x0000555555f735ba in display_gdb_prompt (new_prompt=0x0) at /gdb-up/gdb/event-top.c:411
	  #28 0x00005555564611a7 in tui_on_command_error () at /gdb-up/gdb/tui/tui-interp.c:205
	  #29 0x0000555555c2173f in std::_Function_handler<void (), void (*)()>::_M_invoke(std::_Any_data const&) (__functor=...) at /usr/include/c++/7/bits/std_function.h:316
	  #30 0x0000555555e10c20 in std::function<void ()>::operator()() const (this=0x5555580f9028) at /usr/include/c++/7/bits/std_function.h:706
	  #31 0x0000555555e10973 in gdb::observers::observable<>::notify() const (this=0x555557f48d20 <gdb::observers::command_error>) at /gdb-up/gdb/../gdbsupport/observable.h:150
	  #32 0x00005555560e9b3f in start_event_loop () at /gdb-up/gdb/main.c:438
	  #33 0x00005555560e9bcc in captured_command_loop () at /gdb-up/gdb/main.c:481
	  #34 0x00005555560eb616 in captured_main (data=0x7fffffffddd0) at /gdb-up/gdb/main.c:1348
	  #35 0x00005555560eb67c in gdb_main (args=0x7fffffffddd0) at /gdb-up/gdb/main.c:1363
	  #36 0x0000555555c1b6b3 in main (argc=12, argv=0x7fffffffded8) at /gdb-up/gdb/gdb.c:32

	Commit 1da5d0e664 eliminated the call to 'get_current_arch'
	in 'gdbpy_before_prompt_hook'.  Hence, the second instance of
	"Couldn't get registers: No such process." does not appear anymore.

	Fix the failure by updating the regular expression in the test.

2022-02-03  Alan Modra  <amodra@gmail.com>

	PowerPC64 treatment of absolute symbols
	Supporting -static-pie on PowerPC64 requires the linker to properly
	treat SHN_ABS symbols for cases like glibc's _nl_current_LC_CTYPE_used
	absolute symbol.  I've been slow to fix the linker on powerpc because
	there is some chance that this will break some shared libraries or
	PIEs.

	bfd/
		* elf64-ppc.c (ppc64_elf_check_relocs): Consolidate local sym
		handling code.  Don't count dyn relocs against non-dynamic
		absolute symbols.
		(dec_dynrel_count): Adjust to suit.
		(ppc64_elf_edit_toc): Don't remove entries for absolute symbols
		when pic.
		(allocate_got): Don't allocate space for got relocs against
		non-dynamic absolute syms.
		(ppc64_elf_layout_multitoc): Likewise.
		(got_and_plt_relr): Likewise.
		(ppc64_elf_size_dynamic_sections): Likewise for local got.
		(got_and_plt_relr_for_local_syms): Likewise.
		(ppc64_elf_size_stubs): Don't allocate space for relr either.
		(ppc64_elf_relocate_section): Don't write relocs against non-dynamic
		absolute symbols.  Don't optimise got and toc code sequences
		loading absolute symbol entries.
	ld/
		* testsuite/ld-powerpc/abs-reloc.s,
		* testsuite/ld-powerpc/abs-static.d,
		* testsuite/ld-powerpc/abs-static.r,
		* testsuite/ld-powerpc/abs-pie.d,
		* testsuite/ld-powerpc/abs-pie.r,
		* testsuite/ld-powerpc/abs-shared.d,
		* testsuite/ld-powerpc/abs-shared.r,
		* testsuite/ld-powerpc/abs-pie-relr.d,
		* testsuite/ld-powerpc/abs-pie-relr.r,
		* testsuite/ld-powerpc/abs-shared-relr.d,
		* testsuite/ld-powerpc/abs-shared-relr.r: New tests.
		* testsuite/ld-powerpc/powerpc.exp: Run them.

2022-02-03  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-02-02  Nick Clifton  <nickc@redhat.com>

	Stop the BFD library complaining about compressed dwarf debug string sections being too big.
		PR 28834
		* dwarf2.c (read_section): Change the heuristic that checks for
		overlarge dwarf debug info sections.

2022-02-02  Andrew Burgess  <aburgess@redhat.com>

	gdb: fix formatting for help set/show extended-prompt
	The formatting of the help text for 'help set extended-prompt' and
	'help show extended-prompt' is a little off.

	Here's the offending snippet:

	    Substitutions are applied to VALUE to compute the real prompt.

	    The currently defined substitutions are:
	      \[	Begins a sequence of non-printing characters.
	  \\	A backslash.
	  \]	Ends a sequence of non-printing characters.
	  \e	The ESC character.

	Notice that the line for '\[' is indented more that the others.

	Turns out this is due to how we build this help text, something which
	is done in Python.  We extended a classes __doc__ string with some
	dynamically generated text.

	The classes doc string looks like this:

	    """Set the extended prompt.

	    Usage: set extended-prompt VALUE

	    Substitutions are applied to VALUE to compute the real prompt.

	    The currently defined substitutions are:
	    """

	Notice the closing """ are in a line of their own, and include some
	white space just before.  It's this extra white space that's causing
	the problem.

	Fix the formatting issue by moving the """ to the end of the previous
	line.  I then add the extra newline in at the point where the doc
	string is merged with the dynamically generated text.

	Now everything lines up correctly.

2022-02-02  Andrew Burgess  <aburgess@redhat.com>

	gdb: test to check one aspect of the linespec parsing code
	While working on the fix for PR cli/28665 (see previous couple of
	commits), I was playing with making a change in the linespec parsing
	code.  Specifically, I was thinking about whether the spec_string for
	LINESPEC_LOCATION locations should ever be nullptr.

	I made a change to prevent the spec_string from ever being nullptr,
	tested gdb, and saw no regressions.

	However, as part of this work I was reviewing how the breakpoint code
	handles this case (spec_string being nullptr), and spotted that in
	parse_breakpoint_sals the nullptr case is specifically handled, so
	changing this should have caused a regression.  But I didn't see one.

	So, this commit adds a comment in location.c mentioning that the
	nullptr case is (a) not an oversight, and (b) is required.  Then I add
	a new test to gdb.base/break.exp that ensures a change in this area
	will cause a regression.

	This test passes on current gdb, but with my modified (and broken)
	gdb, the test would fail.

2022-02-02  Andrew Burgess  <aburgess@redhat.com>

	gdb: handle calls to edit command passing only a linespec condition
	While working on the previous commit to fix PR cli/28665, I noticed
	that the 'edit' command would suffer from the same problem.  That is,
	something like:

	  (gdb) edit task 123

	would cause GDB to break.  For a full explanation of what's going on
	here, see the commit message for the previous commit.

	As with the previous commit, this issue can be prevented by detecting,
	and throwing, a junk at the end of the line error earlier, before
	calling decode_line_1.

	So, that's what this commit does.  I've also added some tests for this
	issue.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28665

2022-02-02  Andrew Burgess  <aburgess@redhat.com>

	gdb: handle calls to list command passing only a linespec condition
	In PR cli/28665, it was reported that GDB would crash when given a
	command like:

	  (gdb) list task 123

	The problem here is that in cli/cli-cmd.c:list_command, the string
	'task 123' is passed to string_to_event_location in find a location
	specification.  However, this location parsing understands about
	breakpoint conditions, and so, will stop parsing when it sees
	something that looks like a condition, in this case, the 'task 123'
	looks like a breakpoint condition.

	As a result, the location we get back from string_to_event_location
	has no actual location specification attached to it.  The actual call
	path is:

	  list_command
	    string_to_event_location
	      string_to_event_location_basic
	        new_linespec_location

	In new_linespec_location we call linespec_lex_to_end, which looks at
	'task 123' and decides that there's nothing there that describes a
	location.  As such, in new_linespec_location, the spec_string field of
	the location is left as nullptr.

	Back in list_command we then call decode_line_1, which calls
	event_location_to_sals, which calls parse_linespec, which takes the
	spec_string we found earlier, and tries to converts this into a list
	of sals.

	However, parse_linespec is not intended to be passed a nullptr, for
	example, calling is_ada_operator will try to access through the
	nullptr, causing undefined behaviour.  But there are other cases
	within parse_linespec which don't expect to see a nullptr.

	When looking at how to fix this issue, I first considered having
	linespec_lex_to_end detect the problem.  That function understands
	when the first thing in the linespec is a condition keyword, and so,
	could throw an error saying something like: "no linespec before
	condition keyword", however, this is not going to work, at least, not
	without additional changes to GDB, it is valid to place a breakpoint
	like:

	  (gdb) break task 123

	This will place a breakpoint at the current location with the
	condition 'task 123', and changing linespec_lex_to_end breaks this
	behaviour.

	So, next, I considered what would happen if I added a condition to an
	otherwise valid list command, this is what I see:

	  (gdb) list file.c:1 task 123
	  Junk at end of line specification.
	  (gdb)

	So, then I wondered, could we just pull the "Junk" detection forward,
	so that we throw the error earlier, before we call decode_line_1?

	It turns out that yes we can.  Well, sort of.

	It is simpler, I think, to add a separate check into the list_command
	function, after calling string_to_event_location, but before calling
	decode_line_1.  We know when we call string_to_event_location that the
	string in question is not empty, so, after calling
	string_to_event_location, if non of the string has been consumed, then
	the content of the string must be junk - it clearly doesn't look like
	a location specification.

	I've reused the same "Junk at end of line specification." error for
	consistency, and added a few tests to cover this issue.

	While the first version of this patch was on the mailing list, a
	second bug PR gdb/28797 was raised.  This was for a very similar
	issue, but this time the problem command was:

	  (gdb) list ,,

	Here the list command understands about the first comma, list can have
	two arguments separated by a comma, and the first argument can be
	missing.  So we end up trying to parse the second command "," as a
	linespec.

	However, in linespec_lex_to_end, we will stop parsing a linespec at a
	comma, so, in the above case we end up with an empty linespec (between
	the two commas), and, like above, this results in the spec_string
	being nullptr.

	As with the previous case, I've resolved this issue by adding an extra
	check for junk at the end of the line - after parsing (or failing to
	parse) the nothing between the two commas, we still have the "," left
	at the end of the list command line - when we see this we can throw
	the same "junk at the end of the line" error, and all is good.

	I've added tests for this case too.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28665
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28797

2022-02-02  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: move linespec test into gdb.linespec/ directory
	The gdb.base/linespecs.exp test should really live in the gdb.linespec
	directory, so lets move it there.

	As we already have gdb.linespec/linespec.exp, I've renamed the test to
	gdb.linespec/errors.exp, as this better reflects what the test is
	actually checking.

	Finally, the test script doesn't have its own source file, it was
	reusing a random other source file, gdb.base/memattr.c.  Now the tests
	script is in gdb.linespec/, I've updated the test to use a different
	source file from that directory.

2022-02-02  Andrew Burgess  <aburgess@redhat.com>

	gdb: add empty string check in parse_linespec
	If parse_linespec (linespec.c) is passed ARG as an empty string then
	we end up calling `strchr (linespec_quote_characters, '\0')`, which
	will return a pointer to the '\0' at the end of
	linespec_quote_characters.  This then results in GDB calling
	skip_quote_char with `ARG + 1`, which is undefined behaviour (as ARG
	only contained a single character, the '\0').

	Fix this by checking for the first character of ARG being '\0' before
	the call to strchr.

	I have additionally added an assertion that ARG can't itself be
	nullptr, as calling is_ada_operator with nullptr can end up calling
	'startswith' on the nullptr, which is undefined behaviour.

	Finally, I moved the declaration of TOKEN into the body of
	parse_linespec, to where TOKEN is defined.

	This patch came about while I was working on fixes for PR cli/28665
	and PR gdb/28797.  The actual fixes for these two issues will be in a
	later commit in this series, but, with this patch in place, both of
	the above bugs would hit the new assertion rather than accessing
	invalid memory and crashing.  The '\0' check is not currently ever
	hit, but just makes the code a little safer.

	Because this patch only changes the nature of the failure for the
	above two bugs, there's no tests here.  A later commit will fix the
	above two issues, at which point I'll add some tests.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28665
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28797

2022-02-02  Andrew Burgess  <aburgess@redhat.com>

	gdb: update the comment on string_to_event_location
	The comment on string_to_event_location is (I believe) out of date.
	This commit fixes the two issues I see:

	  1. This function can't return NULL any more.  The implementation
	  calls string_to_explicit_location which can return NULL, but if this
	  is the case we then call string_to_event_location_basic, which I
	  don't believe can ever return NULL.

	  2. I've removed the mention that the returned string is malloc'd,
	  though this is true, now that we return a managed pointer, I believe
	  the source of the memory allocation is irrelevant, and so, shouldn't
	  be discussed in the header comment.

	There should be no user visible changes after this commit.

2022-02-02  Nick Clifton  <nickc@redhat.com>

	Updated French translation for the ld/ and gold/ sub-directories

2022-02-02  Stafford Horne  <shorne@gmail.com>

	or1k: Avoid R_OR1K_GOT16 signed overflow by using special howto
	Previously when fixing PR 21464 we masked out upper bits of the
	relocation value in order to avoid overflow complaints when acceptable.
	It turns out this does not work when the relocation value ends up being
	signed.

	To fix this this patch introduces a special howto with
	complain_on_overflow set to complain_overflow_dont.  This is used in
	place of the normal R_OR1K_GOT16 howto when we detect R_OR1K_GOT_AHI16
	relocations.

	bfd/ChangeLog:

		PR 28735
		* elf32-or1k.c (or1k_elf_got16_no_overflow_howto): Define.
		(or1k_elf_relocate_section): Use new howto instead of trying to
		mask out relocation bits.

2022-02-02  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-02-01  Tom Tromey  <tromey@adacore.com>

	Fix flex rule in gdb
	Currently, if flex fails, it will leave the resulting .c file in the
	tree.  This will cause a cascade of errors, and requires the manual
	deletion of the .c file in order to recreate the problem.

	It's better for the rule to fail such that the .c file is not updated.
	This way, 'make' will fail the same way every time -- which is much
	handier for debugging syntax errors.

	This fix just updates the Makefile rule to follow the way that the
	"yacc" rule already works.

2022-02-01  Markus Metzger  <markus.t.metzger@intel.com>

	gdb, btrace: improve error messages
	When trying to use 'record btrace' on a system that does not support it,
	the error message isn't as clear as it could be.  See
	https://sourceware.org/pipermail/gdb/2022-January/049870.html.

	Improve the error message in a few cases.

	Reported-by: Simon Sobisch  <simonsobisch@gnu.org>

2022-02-01  Jan Vrany  <jan.vrany@labware.com>

	gdb/python: fix gdb.Objfile.__repr__ () for dynamically compiled code
	While experimenting with JIT reader API I realized that calling repr ()
	on objfile created by JIT reader crashes GDB.

	The problem was that objfpy_repr () called objfile_filename () which
	returned NULL, causing PyString_FromFormat () to crash.

	This commit fixes this problem by using objfile_name () instead of
	objfile_filename (). This also makes consistent with the value of gdb.Objfile.filename variable.

2022-02-01  Samuel Thibault  <samuel.thibault@gnu.org>

	hurd: Fix RPC prototypes
	The last updates of MIG introduced qualifying strings and arrays with
	const as appropriate.  We thus have to update the protypes in gdb too.

	Change-Id: I3f72aac1dfa6e58d1394d5776b822d7c8f2409df

2022-02-01  Samuel Thibault  <samuel.thibault@gnu.org>

	hurd: Fix RPC link names
	The RPC stub code expects to be calling a C function, not a C++
	function.

	Change-Id: Idd7549fc118f2addc7fb4975667a011cacacc03f

2022-02-01  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-31  H.J. Lu  <hjl.tools@gmail.com>

	elf: Check symbol version without any symbols
	VER_FLG_WEAK doesn't indicate that all symbol references of the symbol
	version have STB_WEAK.  VER_FLG_WEAK indicates a weak symbol version
	definition with no symbols associated with it.  It is used to verify
	the existence of a particular implementation without any symbol references
	to the weak symbol version.

		PR ld/24718
		* testsuite/ld-elf/pr24718-1.d: New file.
		* testsuite/ld-elf/pr24718-1.s: Likewise.
		* testsuite/ld-elf/pr24718-1.t: Likewise.

2022-01-31  H.J. Lu  <hjl.tools@gmail.com>

	Load debug section only when dumping debug sections
	Don't load debug sections if we aren't dumping any debug sections.

		PR binutils/28843
		* objdump.c (dump_any_debugging): New.
		(load_debug_section): Return false if dump_any_debugging isn't
		set.
		(main): Set dump_any_debugging when dumping any debug sections.
		* readelf (dump_any_debugging): New.
		(parse_args): Set dump_any_debugging when dumping any debug
		sections.
		(load_debug_section): Return false if dump_any_debugging isn't
		set.

2022-01-31  Simon Marchi  <simon.marchi@efficios.com>

	gdb: fix some clang-tidy readability-misleading-indentation warnings
	I have warnings like these showing in my editor all the time, so I
	thought I'd run clang-tidy with this diagnostic on all the files (that I
	can compile) and fix them.

	There is still one warning, in utils.c, but that's because some code
	is mixed up with preprocessor macros (#ifdef TUI), so I think there no
	good solution there.

	Change-Id: I345175fc7dd865318f0fbe61ac026c88c3b6a96b

2022-01-31  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	gdb, testsuite, fortran: adapt info symbol expected output for intel compilers
	Info symbol is expected to print the symbol table name of a symbol, since
	symbol lookup happens via the minimal symbol table.  This name
	corresponds to the linkage name in the full symbol table.

	For gfortran (and maybe others) these names currently have the form
	XXXX.NUMBER where XXXX is the symbol name and NUMBER a compiler
	generated appendix for mangling.
	An example taken from the modified nested-funcs-2.exp would be

	~~~~
	$ objdump -t ./outputs/gdb.fortran/nested-funcs-2/nested-funcs-2 | grep \
	increment
	00000000000014ab l  F .text  0000000000000095  increment.3883
	000000000000141c l  F .text  000000000000008f  increment_program_global.3881
	~~~~

	This mangled name gets recognized by the Ada demangler/decoder and decoded as
	Ada to XXXX (setting the symbol language to Ada).  This leads to output
	of XXXX over XXXX.NUMBER for info symbol on gfortran symbols.

	For ifort and ifx the generated linkage names have the form
	SCOPEA_SCOPEB_XXXX_ which are not recognized by the Ada decoder (or any
	other demangler for that matter) and thus printed as is.
	The respective objdump in the above case looks like

	~~~~
	$ objdump -t ./outputs/gdb.fortran/nested-funcs-2/nested-funcs-2 | grep \
	increment
	0000000000403a44 l  F .text  0000000000000074  contains_keyword_IP_increment_
	0000000000403ab8 l  F .text  0000000000000070
	contains_keyword_IP_increment_program_global_
	~~~~

	In the unmodified testcase this results in 'fails' when ran with the intel
	compilers:

	~~~~
	>> make check RUNTESTFLAGS="gdb.fortran/nested-funcs-2.exp \
	GDBFLAGS='$GDBFLAGS' CC_FOR_TARGET='icpc' F90_FOR_TARGET='ifort'"

	...

	                === gdb Summary ===

	\# of expected passes            80
	\# of unexpected failures        14
	~~~~

	Note that there is no Fortran mangling standard.  We keep the gfortran
	behavior as is and modify the test to reflect ifx and ifort mangled
	names which fixes above fails.

2022-01-31  Nick Clifton  <nickc@redhat.com>

	Import patch from mainline GCC to fix an infinite recusion in the Rust demangler.
		PR 98886
		PR 99935
		* rust-demangle.c (struct rust_demangler): Add a recursion
		counter.
		(demangle_path): Increment/decrement the recursion counter upon
		entry and exit.  Fail if the counter exceeds a fixed limit.
		(demangle_type): Likewise.
		(rust_demangle_callback): Initialise the recursion counter,
		disabling if requested by the option flags.

2022-01-31  Alan Modra  <amodra@gmail.com>

	Re: PR28827, assertion building LLVM 9 on powerpc64le-linux-gnu
	In trying to find a testcase for PR28827, I managed to hit a linker
	error in bfd_set_section_contents with a .branch_lt input section
	being too large for the output .branch_lt.

	bfd/
		PR 28827
		* elf64-ppc.c (ppc64_elf_size_stubs): Set section size to
		maxsize past STUB_SHRINK_ITER before laying out.  Remove now
		unnecessary conditional setting of maxsize at start of loop.
	ld/
		* testsuite/ld-powerpc/pr28827-2.d,
		* testsuite/ld-powerpc/pr28827-2.lnk,
		* testsuite/ld-powerpc/pr28827-2.s: New test.
		* testsuite/ld-powerpc/powerpc.exp: Run it.

2022-01-31  Tom Tromey  <tom@tromey.com>

	Remove unused variables in fbsd-tdep.c files
	i386-fbsd-tdep.c and amd64-fbsd-tdep.c failed to build on my x86-64
	Fedora 34 machine, using the system gcc, after a recent patch.  These
	two files now have unused variables, which provokes a warning in this
	configuration.

	I'm checking in this patch to remove the unused variables.

2022-01-31  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-30  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-29  Alan Modra  <amodra@gmail.com>

	Re: PR28827, assertion building LLVM 9 on powerpc64le-linux-gnu
	The previous patch wasn't quite correct.  The size and padding depends
	on offset used in the current iteration, and if we're fudging the
	offset past STUB_SHRINK_ITER then we'd better use that offset.  We
	can't have plt_stub_pad using stub_sec->size as the offset.

		PR 28827
		* elf64-ppc.c (plt_stub_pad): Add stub_off param.
		(ppc_size_one_stub): Set up stub_offset to value used in this
		iteration before sizing the stub.  Adjust plt_stub_pad calls.

2022-01-29  Alan Modra  <amodra@gmail.com>

	objcopy --only-keep-debug
	From: Peilin Ye <peilin.ye@bytedance.com>
	objcopy's --only-keep-debug option has been broken for ELF files since
	commit 8c803a2dd7d3.

	  1. binutils/objcopy.c:setup_section() marks non-debug sections as
	     SHT_NOBITS, then calls bfd_copy_private_section_data();
	  2. If ISEC and OSEC share the same section flags,
	     bfd/elf.c:_bfd_elf_init_private_section_data() restores OSEC's
	     section type back to ISEC's section type, effectively undoing
	     "make_nobits".

		* objcopy.c (setup_section): Act on make_nobits after calling
		bfd_copy_private_section_data.

2022-01-29  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-28  John Baldwin  <jhb@FreeBSD.org>

	gdb: fix ppc-sysv-tdep.c build on 32-bit platforms
	The previous code triggered the following error on an i386 host:

	/git/gdb/gdb/ppc-sysv-tdep.c:1764:34: error: non-constant-expression cannot be narrowed from type 'ULONGEST' (aka 'unsigned long long') to 'size_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]
	              unscaled.read ({writebuf, TYPE_LENGTH (valtype)},
	                                        ^~~~~~~~~~~~~~~~~~~~~
	/git/gdb/gdb/gdbtypes.h:2043:31: note: expanded from macro 'TYPE_LENGTH'
	                              ^~~~~~~~~~~~~~~~~~
	/git/gdb/gdb/ppc-sysv-tdep.c:1764:34: note: insert an explicit cast to silence this issue
	              unscaled.read ({writebuf, TYPE_LENGTH (valtype)},
	                                        ^~~~~~~~~~~~~~~~~~~~~
	                                        static_cast<size_t>( )
	/git/gdb/gdb/gdbtypes.h:2043:31: note: expanded from macro 'TYPE_LENGTH'
	                              ^~~~~~~~~~~~~~~~~~
	1 error generated.

	Fix this by using gdb::make_array_view.

2022-01-28  John Baldwin  <jhb@FreeBSD.org>

	FreeBSD x86 nat: Use register maps for GP register sets.
	Rather than using the x86-specific register offset tables, use
	register maps to describe the layout of the general purpose registers
	fetched via PT_GETREGS.  The sole user-visible difference is that
	FreeBSD/amd64 will now report additional segment registers ($ds, $es,
	$fs, and $gs) for both 32-bit and 64-bit processes.

	As part of these changes, the FreeBSD x86 native targets no longer use
	amd64-bsd-nat.c or i386-bsd-nat.c.  Remove FreeBSD-specific register
	handling (for $fs_base, $gs_base, and XSAVE state) from these files.
	Similarly, remove the global x86bsd_xsave_len from x86-bsd-nat.c.  The
	FreeBSD x86 native targets use a static xsave_len instead.

	While here, rework the probing of PT_GETXMMREGS on FreeBSD/i386.
	Probe the ptrace op once in the target read_description method and
	cache the result for the future similar to the way the status of XSAVE
	support is probed in the read_description method.  In addition, return
	the proper xcr0 mask (X87-only) for old kernels or systems without
	either XSAVE or XMM support.

2022-01-28  John Baldwin  <jhb@FreeBSD.org>

	fbsd-nat: Return a bool from fetch_register_set and store_register_set.
	Change these helper functions to return true if they did any work.

2022-01-28  John Baldwin  <jhb@FreeBSD.org>

	FreeBSD x86: Use tramp-frame for signal frames.
	Use a register map to describe the registers in mcontext_t as part of
	the signal frame as is done on several other FreeBSD arches.  This
	permits fetching the fsbase and gsbase register values from the signal
	frame for both amd64 and i386 and permits fetching additional segment
	registers stored as 16-bit values on amd64.

	While signal frames on FreeBSD do contain floating point/XSAVE state,
	these unwinders do not attempt to supply those registers.  The
	existing x86 signal frame uwinders do not support these registers, and
	the only existing functions which handle FSAVE/FXSAVE/XSAVE state all
	work with regcaches.  In the future these unwinders could create a
	tempory regcache, collect floating point registers, and then supply
	values out of the regcache into the trad-frame.

2022-01-28  John Baldwin  <jhb@FreeBSD.org>

	Use register maps for gp regsets on FreeBSD/x86 core dumps.
	In particular, this permits reporting the value of the $ds, $es, $fs,
	and $gs segment registers from amd64 core dumps since they are stored
	as 16-bit values rather than the 32-bit size assumed by i386_gregset.

2022-01-28  John Baldwin  <jhb@FreeBSD.org>

	regcache: Zero-extend small registers described by a register map.
	When registers are supplied via regcache_supply_register from a
	register block described by a register map, registers may be stored in
	slots smaller than GDB's native register size (e.g. x86 segment
	registers are 16 bits, but the GDB registers for those are 32-bits).
	regcache_collect_regset is careful to zero-extend slots larger than a
	register size, but regcache_supply_regset just used
	regcache::raw_supply_part and did not initialize the upper bytes of a
	register value.

	trad_frame_set_reg_regmap assumes these semantics (zero-extending
	short registers).  Upcoming patches also require these semantics for
	handling x86 segment register values stored in 16-bit slots on
	FreeBSD.  Note that architecturally x86 segment registers are 16 bits,
	but the x86 gdb architectures treat these registers as 32 bits.

2022-01-28  John Baldwin  <jhb@FreeBSD.org>

	FreeBSD x86: Remove fallback for detecting signal trampolines by address.
	A few FreeBSD releases did not include the page holding the signal
	code in core dumps.  As a workaround, a sysctl was used to fetch the
	default location of the signal code instead.  The youngest affected
	FreeBSD release is 10.1 released in November 2014 and EOLed in
	December 2016.  The fallback only works for native processes and would
	require a separate unwinder once the FreeBSD arches are converted to
	use tramp_frame for signal frames.

	Remove support for pre-5.0 FreeBSD/i386 signal trampolines.
	The last relevant release (FreeBSD 4.11) was released in January of
	2005.

	Remove vestigal FreeBSD/i386 3.x support.
	This was orphaned when a.out support was removed as the FreeBSD/i386
	ELF support always used the register layouts from 4.0+.

2022-01-28  Bruno Larsen  <blarsen@redhat.com>

	Add Bruno Larsen to gdb/MAINTAINERS

2022-01-28  Enze Li  <lienze2010@hotmail.com>

	gdb/build: Fix Wpessimizing-move in clang build
	When building with clang, I run into an error:

	...
	tui/tui-disasm.c:138:25: error: moving a temporary object prevents copy
	elision [-Werror,-Wpessimizing-move]
	      tal.addr_string = std::move (gdb_dis_out.release ());
	                        ^
	tui/tui-disasm.c:138:25: note: remove std::move call here
	      tal.addr_string = std::move (gdb_dis_out.release ());
	                        ^~~~~~~~~~~                      ~
	...

	The error above is caused by the recent commit 5d10a2041eb8 ("gdb: add
	string_file::release method").

	Fix this by removing std::move.

	Build on x86_64-linux with clang 13.0.0.

2022-01-28  Simon Marchi  <simon.marchi@polymtl.ca>

	Add top-level .editorconfig file
	Add a .editorconfig [1] file.  This helps configure editors
	automatically with the right whitespace settings.  It will help me,
	since I need to juggle with different whitespace settings for different
	projects.   But I think it can also help newcomers get things right from
	the start.

	Some editors have native support for reading these files, while others
	require a plug-in [2].  And if you don't want to use it, then this file
	doesn't change anything to your life.

	I added rules for the kinds of files I edit most often, but more can be
	added later.  I assumed that the rules were the same for GDB and the
	other projects, but if that's not the case, we can always put
	.editorconfig files in project subdirectories to override settings.

	[1] https://editorconfig.org/
	[2] https://editorconfig.org/#download

	Change-Id: Ifda136d13877fafcf0d137fec8501f6a34e1367b

2022-01-28  Nick Clifton  <nickc@redhat.com>

	Updated French translation for the gas sub-directory.

2022-01-28  Alan Modra  <amodra@gmail.com>

	Set __ehdr_start rel_from_abs earlier
	This is just a tidy, making the __ehdr_start symbol flag tweaks all in
	one place.

		* ldelf.c (ldelf_before_allocation): Don't set rel_from_abs
		for __ehdr_start.
		* ldlang.c (lang_symbol_tweaks): Set it here instead.

2022-01-28  Alan Modra  <amodra@gmail.com>

	PowerPC64 handling of @tocbase
		* elf64-ppc.c (ppc64_elf_relocate_section): Warn if the symbol
		on R_PPC64_TOC isn't local.

2022-01-28  Alan Modra  <amodra@gmail.com>

	Update PowerPC64 symtocbase test
	Using a symbol other than .TOC. with @tocbase is an extension to the
	ABI.  It is never valid to use a symbol without a definition in the
	binary, and symbols on these expressions cannot be overridden.  Make
	this explicit by using ".hidden" in the testcase.

		* testsuite/ld-powerpc/symtocbase-1.s: Align data.  Make function
		entry symbol hidden.
		* testsuite/ld-powerpc/symtocbase-2.s: Likewise.
		* testsuite/ld-powerpc/symtocbase.d: Adjust expected output.

2022-01-28  Alan Modra  <amodra@gmail.com>

	PR28827, assertion building LLVM 9 on powerpc64le-linux-gnu
	The assertion is this one in ppc_build_one_stub
	  BFD_ASSERT (stub_entry->stub_offset >= stub_entry->group->stub_sec->size);
	It is checking that a stub doesn't overwrite the tail of a previous
	stub, so not something trivial.

	Normally, stub sizing iterates until no stubs are added, detected by
	no change in stub section size.  Iteration also continues if no stubs
	are added but one or more stubs increases in size, which also can be
	detected by a change in stub section size.  But there is a
	pathological case where stub section sizing decreases one iteration
	then increases the next.  To handle that situation, stub sizing also
	stops at more than STUB_SHRINK_ITER (20) iterations when calculated
	stub section size is smaller.  The previous larger size is kept for
	the actual layout (so that building the stubs, which behaves like
	another iteration of stub sizing, will see the stub section sizes
	shrink).  The problem with that stopping condition is that it assumes
	that stub sizing is only affected by addresses external to the stub
	sections, which isn't always true.

	This patch fixes that by also keeping larger individual stub_offset
	addresses past STUB_SHRINK_ITER.  It also catches a further
	pathological case where one stub shrinks and another expands in such a
	way that no stub section size change is seen.

		PR 28827
		* elf64-ppc.c (struct ppc_link_hash_table): Add stub_changed.
		(STUB_SHRINK_ITER): Move earlier in file.
		(ppc_size_one_stub): Detect any change in stub_offset.  Keep
		larger one if past STUB_SHRINK_ITER.
		(ppc64_elf_size_stubs): Iterate on stub_changed too.

2022-01-28  Alan Modra  <amodra@gmail.com>

	PR28826 x86_64 ld segfaults building xen
	Fallout from commit e86fc4a5bc37

		PR 28826
		* coffgen.c (coff_write_alien_symbol): Init dummy to zeros.

2022-01-28  Alan Modra  <amodra@gmail.com>

	PR28753, buffer overflow in read_section_stabs_debugging_info
		PR 28753
		* rddbg.c (read_section_stabs_debugging_info): Don't read past
		end of section when concatentating stab strings.

2022-01-28  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-27  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: work around negative DW_AT_data_member_location GCC 11 bug
	g++ 11.1.0 has a bug where it will emit a negative
	DW_AT_data_member_location in some cases:

	    $ cat test.cpp
	    #include <memory>

	    int
	    main()
	    {
	      std::unique_ptr<int> ptr;
	    }
	    $ g++ -g test.cpp
	    $ llvm-dwarfdump -F a.out
	    ...
	    0x00000964:       DW_TAG_member
	                        DW_AT_name [DW_FORM_strp]   ("_M_head_impl")
	                        DW_AT_decl_file [DW_FORM_data1]     ("/usr/include/c++/11.1.0/tuple")
	                        DW_AT_decl_line [DW_FORM_data1]     (125)
	                        DW_AT_decl_column [DW_FORM_data1]   (0x27)
	                        DW_AT_type [DW_FORM_ref4]   (0x0000067a "default_delete<int>")
	                        DW_AT_data_member_location [DW_FORM_sdata]  (-1)
	    ...

	This leads to a GDB crash (when built with ASan, otherwise probably
	garbage results), since it tries to read just before (to the left, in
	ASan speak) of the value's buffer:

	    ==888645==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6020000c52af at pc 0x7f711b239f4b bp 0x7fff356bd470 sp 0x7fff356bcc18
	    READ of size 1 at 0x6020000c52af thread T0
	        #0 0x7f711b239f4a in __interceptor_memcpy /build/gcc/src/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:827
	        #1 0x555c4977efa1 in value_contents_copy_raw /home/simark/src/binutils-gdb/gdb/value.c:1347
	        #2 0x555c497909cd in value_primitive_field(value*, long, int, type*) /home/simark/src/binutils-gdb/gdb/value.c:3126
	        #3 0x555c478f2eaa in cp_print_value_fields(value*, ui_file*, int, value_print_options const*, type**, int) /home/simark/src/binutils-gdb/gdb/cp-valprint.c:333
	        #4 0x555c478f63b2 in cp_print_value /home/simark/src/binutils-gdb/gdb/cp-valprint.c:513
	        #5 0x555c478f02ca in cp_print_value_fields(value*, ui_file*, int, value_print_options const*, type**, int) /home/simark/src/binutils-gdb/gdb/cp-valprint.c:161
	        #6 0x555c478f63b2 in cp_print_value /home/simark/src/binutils-gdb/gdb/cp-valprint.c:513
	        #7 0x555c478f02ca in cp_print_value_fields(value*, ui_file*, int, value_print_options const*, type**, int) /home/simark/src/binutils-gdb/gdb/cp-valprint.c:161
	        #8 0x555c478f63b2 in cp_print_value /home/simark/src/binutils-gdb/gdb/cp-valprint.c:513
	        #9 0x555c478f02ca in cp_print_value_fields(value*, ui_file*, int, value_print_options const*, type**, int) /home/simark/src/binutils-gdb/gdb/cp-valprint.c:161
	        #10 0x555c4760d45f in c_value_print_struct /home/simark/src/binutils-gdb/gdb/c-valprint.c:383
	        #11 0x555c4760df4c in c_value_print_inner(value*, ui_file*, int, value_print_options const*) /home/simark/src/binutils-gdb/gdb/c-valprint.c:438
	        #12 0x555c483ff9a7 in language_defn::value_print_inner(value*, ui_file*, int, value_print_options const*) const /home/simark/src/binutils-gdb/gdb/language.c:632
	        #13 0x555c49758b68 in do_val_print /home/simark/src/binutils-gdb/gdb/valprint.c:1048
	        #14 0x555c49759b17 in common_val_print(value*, ui_file*, int, value_print_options const*, language_defn const*) /home/simark/src/binutils-gdb/gdb/valprint.c:1151
	        #15 0x555c478f2fcb in cp_print_value_fields(value*, ui_file*, int, value_print_options const*, type**, int) /home/simark/src/binutils-gdb/gdb/cp-valprint.c:335
	        #16 0x555c478f63b2 in cp_print_value /home/simark/src/binutils-gdb/gdb/cp-valprint.c:513
	        #17 0x555c478f02ca in cp_print_value_fields(value*, ui_file*, int, value_print_options const*, type**, int) /home/simark/src/binutils-gdb/gdb/cp-valprint.c:161
	        #18 0x555c4760d45f in c_value_print_struct /home/simark/src/binutils-gdb/gdb/c-valprint.c:383
	        #19 0x555c4760df4c in c_value_print_inner(value*, ui_file*, int, value_print_options const*) /home/simark/src/binutils-gdb/gdb/c-valprint.c:438
	        #20 0x555c483ff9a7 in language_defn::value_print_inner(value*, ui_file*, int, value_print_options const*) const /home/simark/src/binutils-gdb/gdb/language.c:632
	        #21 0x555c49758b68 in do_val_print /home/simark/src/binutils-gdb/gdb/valprint.c:1048
	        #22 0x555c49759b17 in common_val_print(value*, ui_file*, int, value_print_options const*, language_defn const*) /home/simark/src/binutils-gdb/gdb/valprint.c:1151
	        #23 0x555c478f2fcb in cp_print_value_fields(value*, ui_file*, int, value_print_options const*, type**, int) /home/simark/src/binutils-gdb/gdb/cp-valprint.c:335
	        #24 0x555c4760d45f in c_value_print_struct /home/simark/src/binutils-gdb/gdb/c-valprint.c:383
	        #25 0x555c4760df4c in c_value_print_inner(value*, ui_file*, int, value_print_options const*) /home/simark/src/binutils-gdb/gdb/c-valprint.c:438
	        #26 0x555c483ff9a7 in language_defn::value_print_inner(value*, ui_file*, int, value_print_options const*) const /home/simark/src/binutils-gdb/gdb/language.c:632
	        #27 0x555c49758b68 in do_val_print /home/simark/src/binutils-gdb/gdb/valprint.c:1048
	        #28 0x555c49759b17 in common_val_print(value*, ui_file*, int, value_print_options const*, language_defn const*) /home/simark/src/binutils-gdb/gdb/valprint.c:1151
	        #29 0x555c4760f04c in c_value_print(value*, ui_file*, value_print_options const*) /home/simark/src/binutils-gdb/gdb/c-valprint.c:587
	        #30 0x555c483ff954 in language_defn::value_print(value*, ui_file*, value_print_options const*) const /home/simark/src/binutils-gdb/gdb/language.c:614
	        #31 0x555c49759f61 in value_print(value*, ui_file*, value_print_options const*) /home/simark/src/binutils-gdb/gdb/valprint.c:1189
	        #32 0x555c48950f70 in print_formatted /home/simark/src/binutils-gdb/gdb/printcmd.c:337
	        #33 0x555c48958eda in print_value(value*, value_print_options const&) /home/simark/src/binutils-gdb/gdb/printcmd.c:1258
	        #34 0x555c48959891 in print_command_1 /home/simark/src/binutils-gdb/gdb/printcmd.c:1367
	        #35 0x555c4895a3df in print_command /home/simark/src/binutils-gdb/gdb/printcmd.c:1458
	        #36 0x555c4767f974 in do_simple_func /home/simark/src/binutils-gdb/gdb/cli/cli-decode.c:97
	        #37 0x555c47692e25 in cmd_func(cmd_list_element*, char const*, int) /home/simark/src/binutils-gdb/gdb/cli/cli-decode.c:2475
	        #38 0x555c4936107e in execute_command(char const*, int) /home/simark/src/binutils-gdb/gdb/top.c:670
	        #39 0x555c485f1bff in catch_command_errors /home/simark/src/binutils-gdb/gdb/main.c:523
	        #40 0x555c485f249c in execute_cmdargs /home/simark/src/binutils-gdb/gdb/main.c:618
	        #41 0x555c485f6677 in captured_main_1 /home/simark/src/binutils-gdb/gdb/main.c:1317
	        #42 0x555c485f6c83 in captured_main /home/simark/src/binutils-gdb/gdb/main.c:1338
	        #43 0x555c485f6d65 in gdb_main(captured_main_args*) /home/simark/src/binutils-gdb/gdb/main.c:1363
	        #44 0x555c46e41ba8 in main /home/simark/src/binutils-gdb/gdb/gdb.c:32
	        #45 0x7f71198bcb24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24)
	        #46 0x555c46e4197d in _start (/home/simark/build/binutils-gdb-one-target/gdb/gdb+0x77f197d)

	    0x6020000c52af is located 1 bytes to the left of 8-byte region [0x6020000c52b0,0x6020000c52b8)
	    allocated by thread T0 here:
	        #0 0x7f711b2b7459 in __interceptor_calloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:154
	        #1 0x555c470acdc9 in xcalloc /home/simark/src/binutils-gdb/gdb/alloc.c:100
	        #2 0x555c49b775cd in xzalloc(unsigned long) /home/simark/src/binutils-gdb/gdbsupport/common-utils.cc:29
	        #3 0x555c4977bdeb in allocate_value_contents /home/simark/src/binutils-gdb/gdb/value.c:1029
	        #4 0x555c4977be25 in allocate_value(type*) /home/simark/src/binutils-gdb/gdb/value.c:1040
	        #5 0x555c4979030d in value_primitive_field(value*, long, int, type*) /home/simark/src/binutils-gdb/gdb/value.c:3092
	        #6 0x555c478f6280 in cp_print_value /home/simark/src/binutils-gdb/gdb/cp-valprint.c:501
	        #7 0x555c478f02ca in cp_print_value_fields(value*, ui_file*, int, value_print_options const*, type**, int) /home/simark/src/binutils-gdb/gdb/cp-valprint.c:161
	        #8 0x555c478f63b2 in cp_print_value /home/simark/src/binutils-gdb/gdb/cp-valprint.c:513
	        #9 0x555c478f02ca in cp_print_value_fields(value*, ui_file*, int, value_print_options const*, type**, int) /home/simark/src/binutils-gdb/gdb/cp-valprint.c:161
	        #10 0x555c478f63b2 in cp_print_value /home/simark/src/binutils-gdb/gdb/cp-valprint.c:513
	        #11 0x555c478f02ca in cp_print_value_fields(value*, ui_file*, int, value_print_options const*, type**, int) /home/simark/src/binutils-gdb/gdb/cp-valprint.c:161
	        #12 0x555c4760d45f in c_value_print_struct /home/simark/src/binutils-gdb/gdb/c-valprint.c:383
	        #13 0x555c4760df4c in c_value_print_inner(value*, ui_file*, int, value_print_options const*) /home/simark/src/binutils-gdb/gdb/c-valprint.c:438
	        #14 0x555c483ff9a7 in language_defn::value_print_inner(value*, ui_file*, int, value_print_options const*) const /home/simark/src/binutils-gdb/gdb/language.c:632
	        #15 0x555c49758b68 in do_val_print /home/simark/src/binutils-gdb/gdb/valprint.c:1048
	        #16 0x555c49759b17 in common_val_print(value*, ui_file*, int, value_print_options const*, language_defn const*) /home/simark/src/binutils-gdb/gdb/valprint.c:1151
	        #17 0x555c478f2fcb in cp_print_value_fields(value*, ui_file*, int, value_print_options const*, type**, int) /home/simark/src/binutils-gdb/gdb/cp-valprint.c:335
	        #18 0x555c478f63b2 in cp_print_value /home/simark/src/binutils-gdb/gdb/cp-valprint.c:513
	        #19 0x555c478f02ca in cp_print_value_fields(value*, ui_file*, int, value_print_options const*, type**, int) /home/simark/src/binutils-gdb/gdb/cp-valprint.c:161
	        #20 0x555c4760d45f in c_value_print_struct /home/simark/src/binutils-gdb/gdb/c-valprint.c:383
	        #21 0x555c4760df4c in c_value_print_inner(value*, ui_file*, int, value_print_options const*) /home/simark/src/binutils-gdb/gdb/c-valprint.c:438
	        #22 0x555c483ff9a7 in language_defn::value_print_inner(value*, ui_file*, int, value_print_options const*) const /home/simark/src/binutils-gdb/gdb/language.c:632
	        #23 0x555c49758b68 in do_val_print /home/simark/src/binutils-gdb/gdb/valprint.c:1048
	        #24 0x555c49759b17 in common_val_print(value*, ui_file*, int, value_print_options const*, language_defn const*) /home/simark/src/binutils-gdb/gdb/valprint.c:1151
	        #25 0x555c478f2fcb in cp_print_value_fields(value*, ui_file*, int, value_print_options const*, type**, int) /home/simark/src/binutils-gdb/gdb/cp-valprint.c:335
	        #26 0x555c4760d45f in c_value_print_struct /home/simark/src/binutils-gdb/gdb/c-valprint.c:383
	        #27 0x555c4760df4c in c_value_print_inner(value*, ui_file*, int, value_print_options const*) /home/simark/src/binutils-gdb/gdb/c-valprint.c:438
	        #28 0x555c483ff9a7 in language_defn::value_print_inner(value*, ui_file*, int, value_print_options const*) const /home/simark/src/binutils-gdb/gdb/language.c:632
	        #29 0x555c49758b68 in do_val_print /home/simark/src/binutils-gdb/gdb/valprint.c:1048

	Since there are some binaries with this in the wild, I think it would be
	useful for GDB to work around this.  I did the obvious simple thing, if
	the DW_AT_data_member_location's value is -1, replace it with 0.  I
	added a producer check to only apply this fixup for GCC 11.  The idea is
	that if some other compiler ever uses a DW_AT_data_member_location value
	of -1 by mistake, we don't know (before analyzing the bug at least) if
	they did mean 0 or some other value.  So I wouldn't want to apply the
	fixup in that case.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28063
	Change-Id: Ieef3459b0b9bbce8bdad838ba83b4b64e7269d42

2022-01-27  Kevin Buettner  <kevinb@redhat.com>

	Fix GDB internal error by using text (instead of data) section offset
	Fedora Rawhide is now using gcc-12.0.  As part of updating to the
	gcc-12.0 package set, Rawhide is also now using a version of libgcc_s
	which lacks a .data section.  This causes gdb to fail in the following
	fashion while debugging a program (such as gdb) which uses libgcc_s:

	    (top-gdb) run
	    Starting program: rawhide-master/bld/gdb/gdb
	    ...
	    objfiles.h:467: internal-error: sect_index_data not initialized
	    A problem internal to GDB has been detected,
	    further debugging may prove unreliable.
	    ...

	I snipped the backtrace from the above output.  Instead, here's a
	portion of a backtrace obtained using GDB's backtrace command.
	(Obviously, in order to obtain it, I used a GDB which has been patched
	with this commit.)

	    #0  internal_error (
		file=0xc6a508 "gdb/objfiles.h", line=467,
		fmt=0xc6a4e8 "sect_index_data not initialized")
		at gdbsupport/errors.cc:51
	    #1  0x00000000005f9651 in objfile::data_section_offset (this=0x4fa48f0)
		at gdb/objfiles.h:467
	    #2  0x000000000097c5f8 in relocate_address (address=0x17244, objfile=0x4fa48f0)
		at gdb/stap-probe.c:1333
	    #3  0x000000000097c630 in stap_probe::get_relocated_address (this=0xa1a17a0,
		objfile=0x4fa48f0)
		at gdb/stap-probe.c:1341
	    #4  0x00000000004d7025 in create_exception_master_breakpoint_probe (
		objfile=0x4fa48f0)
		at gdb/breakpoint.c:3505
	    #5  0x00000000004d7426 in create_exception_master_breakpoint ()
		at gdb/breakpoint.c:3575
	    #6  0x00000000004efcc1 in breakpoint_re_set ()
		at gdb/breakpoint.c:13407
	    #7  0x0000000000956998 in solib_add (pattern=0x0, from_tty=0, readsyms=1)
		at gdb/solib.c:1001
	    #8  0x00000000009576a8 in handle_solib_event ()
		at gdb/solib.c:1269
	    ...

	The function 'relocate_address' in gdb/stap-probe.c attempts to do
	its "relocation" by using objfile->data_section_offset().  That
	method, data_section_offset() is defined as follows in objfiles.h:

	  CORE_ADDR data_section_offset () const
	  {
	    return section_offsets[SECT_OFF_DATA (this)];
	  }

	The internal error occurs when the SECT_OFF_DATA macro finds that the
	'sect_index_data' field is -1:

	    #define SECT_OFF_DATA(objfile) \
		 ((objfile->sect_index_data == -1) \
		  ? (internal_error (__FILE__, __LINE__, \
				     _("sect_index_data not initialized")), -1)	\
		  : objfile->sect_index_data)

	relocate_address() is obtaining the section offset in order to compute
	a relocated address.  For some ABIs, such as the System V ABI, the
	section offsets will all be the same.  So for those ABIs, it doesn't
	matter which offset is used.  However, other ABIs, such as the FDPIC
	ABI, will have different offsets for the various sections.  Thus, for
	those ABIs, it is vital that this and other relocation code use the
	correct offset.

	In stap_probe::get_relocated_address, the address to which to add the
	offset (thus forming the relocated address) is obtained via
	this->get_address (); get_address is a getter for m_address in
	probe.h.  It's documented/defined as follows (also in probe.h):

	  /* The address where the probe is inserted, relative to
	     SECT_OFF_TEXT.  */
	  CORE_ADDR m_address;

	(Thanks to Tom Tromey for this observation.)

	So, based on this, the current use of data_section_offset /
	SECT_OFF_DATA is wrong.  This relocation code should have been using
	text_section_offset / SECT_OFF_TEXT all along.  That being the
	case, I've adjusted the stap-probe.c relocation code accordingly.

	Searching the sources turned up one other use of data_section_offset,
	in gdb/dtrace-probe.c, so I've updated that code as well.  The same
	reasoning presented above applies to this case too.

	Summary:

		* gdb/dtrace-probe.c (dtrace_probe::get_relocated_address):
		Use method text_section_offset instead of data_section_offset.
		* gdb/stap-probe.c (relocate_address): Likewise.

2022-01-27  Markus Metzger  <markus.t.metzger@intel.com>

	gdb, remote, btrace: move switch_to_thread call right before xfer call
	In remote_target::remote_btrace_maybe_reopen, we switch to the currently
	iterated thread in order to set inferior_ptid for a subsequent xfer.

	Move the switch_to_thread call directly before the target_read_stralloc
	call to clarify why we need to switch threads.

2022-01-27  Markus Metzger  <markus.t.metzger@intel.com>

	gdb, gdbserver: update thread identifier in enable_btrace target method
	The enable_btrace target method takes a ptid_t to identify the thread on
	which tracing shall be enabled.

	Change this to thread_info * to avoid translating back and forth between
	the two.  This will be used in a subsequent patch.

2022-01-27  Markus Metzger  <markus.t.metzger@intel.com>

	gdb, btrace: switch threads in remote_btrace_maybe_reopen()
	In remote_btrace_maybe_reopen() we iterate over threads and use
	set_general_thread() to set the thread from which to transfer the btrace
	configuration.

	This sets the remote general thread but does not affect inferior_ptid.  On
	the xfer request later on, remote_target::xfer_partial() again sets the
	remote general thread to inferior_ptid, overwriting what
	remote_btrace_maybe_reopen() had done.

	In one case, this led to inferior_ptid being null_ptid when we tried to
	enable tracing on a newly created thread inside a newly created process
	during attach.

	This, in turn, led to find_inferior_pid() asserting when we iterated over
	threads in record_btrace_is_replaying(), which was called from
	record_btrace_target::xfer_partial() when reading the btrace configuration
	of the new thread to check whether it was already being recorded.

	The bug was exposed by

	    0618ae41497 gdb: optimize all_matching_threads_iterator

	and found by

	    FAIL: gdb.btrace/enable-new-thread.exp: ... (GDB internal error)

	Use switch_to_thread() in remote_btrace_maybe_reopen().

2022-01-27  Markus Metzger  <markus.t.metzger@intel.com>

	gdb, btrace: rename record_btrace_enable_warn()
	We use record_btrace_enable_warn() as the new-thread observer callback.
	It is not used in other contexts.

	Rename it to record_btrace_on_new_thread() to make its role more clear.

2022-01-27  Nick Clifton  <nickc@redhat.com>

	Updated Swedish translation for the binutils subdirectory

2022-01-27  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-26  Andrew Burgess  <aburgess@redhat.com>

	gdb/python: handle non utf-8 characters when source highlighting
	This commit adds support for source files that contain non utf-8
	characters when performing source styling using the Python pygments
	package.  This does not change the behaviour of GDB when the GNU
	Source Highlight library is used.

	For the following problem description, assume that either GDB is built
	without GNU Source Highlight support, of that this has been disabled
	using 'maintenance set gnu-source-highlight enabled off'.

	The initial problem reported was that a source file containing non
	utf-8 characters would cause GDB to print a Python exception, and then
	display the source without styling, e.g.:

	  Python Exception <class 'UnicodeDecodeError'>: 'utf-8' codec can't decode byte 0xc0 in position 142: invalid start byte
	  /* Source code here, without styling...  */

	Further, as the user steps through different source files, each time
	the problematic source file was evicted from the source cache, and
	then later reloaded, the exception would be printed again.

	Finally, this problem is only present when using Python 3, this issue
	is not present for Python 2.

	What makes this especially frustrating is that GDB can clearly print
	the source file contents, they're right there...  If we disable
	styling completely, or make use of the GNU Source Highlight library,
	then everything is fine.  So why is there an error when we try to
	apply styling using Python?

	The problem is the use of PyString_FromString (which is an alias for
	PyUnicode_FromString in Python 3), this function converts a C string
	into a either a Unicode object (Py3) or a str object (Py2).  For
	Python 2 there is no unicode encoding performed during this function
	call, but for Python 3 the input is assumed to be a uft-8 encoding
	string for the purpose of the conversion.  And here of course, is the
	problem, if the source file contains non utf-8 characters, then it
	should not be treated as utf-8, but that's what we do, and that's why
	we get an error.

	My first thought when looking at this was to spot when the
	PyString_FromString call failed with a UnicodeDecodeError and silently
	ignore the error.  This would mean that GDB would print the source
	without styling, but would also avoid the annoying exception message.

	However, I also make use of `pygmentize`, a command line wrapper
	around the Python pygments module, which I use to apply syntax
	highlighting in the output of `less`.  And this command line wrapper
	is quite happy to syntax highlight my source file that contains non
	utf-8 characters, so it feels like the problem should be solvable.

	It turns out that inside the pygments module there is already support
	for guessing the encoding of the incoming file content, if the
	incoming content is not already a Unicode string.  This is what
	happens for Python 2 where the incoming content is of `str` type.

	We could try and make GDB smarter when it comes to converting C
	strings into Python Unicode objects; this would probably require us to
	just try a couple of different encoding schemes rather than just
	giving up after utf-8.

	However, I figure, why bother?  The pygments module already does this
	for us, and the colorize API is not part of the documented external
	API of GDB.  So, why not just change the colorize API, instead of the
	content being a Unicode string (for Python 3), lets just make the
	content be a bytes object.  The pygments module can then take
	responsibility for guessing the encoding.

	So, currently, the colorize API receives a unicode object, and returns
	a unicode object.  I propose that the colorize API receive a bytes
	object, and return a bytes object.

2022-01-26  Tom Tromey  <tom@tromey.com>

	Remove global wrap_here function
	This removes the global wrap_here function, so that future calls
	cannot be introduced.  Instead, all callers must use the method on the
	appropriate ui_file.

	This temporarily moves the implementation of this method to utils.c.
	This will change once the remaining patches to untangle the pager have
	been written.

2022-01-26  Tom Tromey  <tom@tromey.com>

	Always call the wrap_here method
	This changes all existing calls to wrap_here to call the method on the
	appropriate ui_file instead.  The choice of ui_file is determined by
	context.

2022-01-26  Tom Tromey  <tom@tromey.com>

	Add ui_file::wrap_here
	Right now, wrap_here is a global function.  In the long run, we'd like
	output streams to be relatively self-contained objects, and having a
	global function like this is counter to that goal.  Also, existing
	code freely mixes writes to some parameterized stream with calls to
	wrap_here -- but wrap_here only really affects gdb_stdout, so this is
	also incoherent.

	This step is a patch toward making wrap_here more sane.  It adds a
	wrap_here method to ui_file and changes ui_out implementations to use
	it.

2022-01-26  Tom Tromey  <tom@tromey.com>

	Convert wrap_here to use integer parameter
	I think it only really makes sense to call wrap_here with an argument
	consisting solely of spaces.  Given this, it seemed better to me that
	the argument be an int, rather than a string.  This patch is the
	result.  Much of it was written by a script.

2022-01-26  Andrew Burgess  <aburgess@redhat.com>

	gdb/python: improve the auto help text for gdb.Parameter
	This commit attempts to improve the help text that is generated for
	gdb.Parameter objects when the user fails to provide their own
	documentation.

	Documentation for a gdb.Parameter is currently pulled from two
	sources: the class documentation string, and the set_doc/show_doc
	class attributes.  Thus, a fully documented parameter might look like
	this:

	  class Param_All (gdb.Parameter):
	     """This is the class documentation string."""

	     show_doc = "Show the state of this parameter"
	     set_doc = "Set the state of this parameter"

	     def get_set_string (self):
	        val = "on"
	        if (self.value == False):
	           val = "off"
	        return "Test Parameter has been set to " + val

	     def __init__ (self, name):
	        super (Param_All, self).__init__ (name, gdb.COMMAND_DATA, gdb.PARAM_BOOLEAN)
	        self._value = True

	  Param_All ('param-all')

	Then in GDB we see this:

	  (gdb) help set param-all
	  Set the state of this parameter
	  This is the class documentation string.

	Which is fine.  But, if the user skips both of the documentation parts
	like this:

	  class Param_None (gdb.Parameter):

	     def get_set_string (self):
	        val = "on"
	        if (self.value == False):
	           val = "off"
	        return "Test Parameter has been set to " + val

	     def __init__ (self, name):
	        super (Param_None, self).__init__ (name, gdb.COMMAND_DATA, gdb.PARAM_BOOLEAN)
	        self._value = True

	  Param_None ('param-none')

	Now in GDB we see this:

	  (gdb) help set param-none
	  This command is not documented.
	  This command is not documented.

	That's not great, the duplicated text looks a bit weird.  If we drop
	different parts we get different results.  Here's what we get if the
	user drops the set_doc and show_doc attributes:

	  (gdb) help set param-doc
	  This command is not documented.
	  This is the class documentation string.

	That kind of sucks, we say it's undocumented, then proceed to print
	the documentation.  Finally, if we drop the class documentation but
	keep the set_doc and show_doc:

	  (gdb) help set param-set-show
	  Set the state of this parameter
	  This command is not documented.

	That seems OK.

	So, I think there's room for improvement.

	With this patch, for the four cases above we now see this:

	  # All values provided by the user, no change in this case:
	  (gdb) help set param-all
	  Set the state of this parameter
	  This is the class documentation string.

	  # Nothing provided by the user, the first string is now different:
	  (gdb) help set param-none
	  Set the current value of 'param-none'.
	  This command is not documented.

	  # Only the class documentation is provided, the first string is
	  # changed as in the previous case:
	  (gdb) help set param-doc
	  Set the current value of 'param-doc'.
	  This is the class documentation string.

	  # Only the set_doc and show_doc are provided, this case is unchanged
	  # from before the patch:
	  (gdb) help set param-set-show
	  Set the state of this parameter
	  This command is not documented.

	The one place where this change might be considered a negative is when
	dealing with prefix commands.  If we create a prefix command but don't
	supply the set_doc / show_doc strings, then this is what we saw before
	my patch:

	  (gdb) python Param_None ('print param-none')
	  (gdb) help set print
	  set print, set pr, set p
	  Generic command for setting how things print.

	  List of set print subcommands:

	  ... snip ...
	  set print param-none -- This command is not documented.
	  ... snip ...

	And after my patch:

	  (gdb) python Param_None ('print param-none')
	  (gdb) help set print
	  set print, set pr, set p
	  Generic command for setting how things print.

	  List of set print subcommands:

	  ... snip ...
	  set print param-none -- Set the current value of 'print param-none'.
	  ... snip ...

	This seems slightly less helpful than before, but I don't think its
	terrible.

	Additionally, I've changed what we print when the get_show_string
	method is not provided in Python.

	Back when gdb.Parameter was first added to GDB, we didn't provide a
	show function when registering the internal command object within
	GDB.  As a result, GDB would make use of its "magic" mangling of the
	show_doc string to create a sentence that would display the current
	value (see deprecated_show_value_hack in cli/cli-setshow.c).

	However, when we added support for the get_show_string method to
	gdb.Parameter, there was an attempt to maintain backward compatibility
	by displaying the show_doc string with the current value appended, see
	get_show_value in py-param.c.  Unfortunately, this isn't anywhere
	close to what deprecated_show_value_hack does, and the results are
	pretty poor, for example, this is GDB before my patch:

	  (gdb) show param-none
	  This command is not documented. off

	I think we can all agree that this is pretty bad.

	After my patch, we how show this:

	  (gdb) show param-none
	  The current value of 'param-none' is "off".

	Which at least is a real sentence, even if it's not very informative.

	This patch does change the way that the Python API behaves slightly,
	but only in the cases when the user has missed providing GDB with some
	information.  In most cases I think the new behaviour is a lot better,
	there's the one case (noted above) which is a bit iffy, but I think is
	still OK.

	I've updated the existing gdb.python/py-parameter.exp test to cover
	the modified behaviour.

	Finally, I've updated the documentation to (I hope) make it clearer
	how the various bits of help text come together.

2022-01-26  Andrew Burgess  <aburgess@redhat.com>

	gdb/python: add gdb.history_count function
	Add a new function gdb.history_count to the Python api, this function
	returns an integer, the number of items in GDB's value history.

	This is useful if you want to pull items from the history by their
	absolute number, for example, if you wanted to show a complete history
	list.  Previously we could figure out how many items are in the
	history list by trying to fetch the items, and then catching the
	exception when the item is not available, but having this function
	seems nicer.

2022-01-26  Tom Tromey  <tromey@adacore.com>

	Remove unused declaration
	This removes an unused declaration from top.h.  This type is not
	defined anywhere.

2022-01-26  Simon Marchi  <simon.marchi@efficios.com>

	gdb: convert maintenance target-async and target-non-stop settings to callbacks
	This simplifies things a bit, as we don't need two variables and think
	about reverting target_async_permitted_1 and target_non_stop_enabled_1
	values if we can't change the setting.

	Change-Id: I36acab045dacf02ae1988486cfdb27c1dff309f6

2022-01-26  Keith Seitz  <keiths@redhat.com>

	Reference array of structs instead of first member during memcpy
	aarch64-tdep.c defines the following macro:

	#define MEM_ALLOC(MEMS, LENGTH, RECORD_BUF) \
	        do  \
	          { \
	            unsigned int mem_len = LENGTH; \
	            if (mem_len) \
	              { \
	                MEMS =  XNEWVEC (struct aarch64_mem_r, mem_len);  \
	                memcpy(&MEMS->len, &RECORD_BUF[0], \
	                       sizeof(struct aarch64_mem_r) * LENGTH); \
	              } \
	          } \
	          while (0)

	This is simlpy allocating a new array and copying it. However, for
	the destination address, it is actually copying into the first member
	of the first element of the array (`&MEMS->len"). This elicits a
	warning with GCC 12:

	../../binutils-gdb/gdb/aarch64-tdep.c: In function ‘int aarch64_process_record(gdbarch*, regcache*, CORE_ADDR)’:
	../../binutils-gdb/gdb/aarch64-tdep.c:3711:23: error: writing 16 bytes into a region of size 8 [-Werror=stringop-overflow=]
	 3711 |                 memcpy(&MEMS->len, &RECORD_BUF[0], \
	      |                       ^
	../../binutils-gdb/gdb/aarch64-tdep.c:4394:3: note: in expansion of macro ‘MEM_ALLOC’
	 4394 |   MEM_ALLOC (aarch64_insn_r->aarch64_mems, aarch64_insn_r->mem_rec_count,
	      |   ^~~~~~~~~
	../../binutils-gdb/gdb/aarch64-tdep.c:3721:12: note: destination object ‘aarch64_mem_r::len’ of size 8
	 3721 |   uint64_t len;    /* Record length.  */
	      |            ^~~

	The simple fix is to reference the array, `MEMS' as the destination of the copy.

	Tested by rebuilding.


	# Please enter the commit message for your changes. Lines starting
	# with '#' will be kept; you may remove them yourself if you want to.
	# An empty message aborts the commit.
	#
	# Date:      Tue Jan 25 08:28:32 2022 -0800
	#
	# On branch master
	# Your branch is ahead of 'origin/master' by 1 commit.
	#   (use "git push" to publish your local commits)
	#
	# Changes to be committed:
	#	modified:   aarch64-tdep.c
	#

2022-01-26  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: add string_file::release method
	A common pattern for string_file is to want to move out the internal
	string buffer, because it is the result of the computation that we want
	to return.  It is the reason why string_file::string returns a non-const
	reference, as explained in the comment.  I think it would make sense to
	have a dedicated method for that instead and make string_file::string
	return a const reference.

	This allows removing the explicit std::move in the typical case.  Note
	that compile_program::compute was missing a move, meaning that the
	resulting string was copied.  With the new version, it's not possible to
	forget to move.

	Change-Id: Ieaefa35b73daa7930b2f3a26988b6e3b4121bb79

2022-01-26  Tom Tromey  <tromey@adacore.com>

	Add a way to temporarily set a gdb parameter from Python
	It's sometimes useful to temporarily set some gdb parameter from
	Python.  Now that the 'endian' crash is fixed, and now that the
	current language is no longer captured by the Python layer, it seems
	reasonable to add a helper function for this situation.

	This adds a new gdb.with_parameter function.  This creates a context
	manager which temporarily sets some parameter to a specified value.
	The old value is restored when the context is exited.  This is most
	useful with the Python "with" statement:

	   with gdb.with_parameter('language', 'ada'):
	      ... do Ada stuff

	This also adds a simple function to set a parameter,
	gdb.set_parameter, as suggested by Andrew.

	This is PR python/10790.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=10790

2022-01-26  Tom Tromey  <tromey@adacore.com>

	Fix another crash with gdb parameters in Python
	While looking into the language-capturing issue, I found another way
	to crash gdb using parameters from Python:

	(gdb) python print(gdb.parameter('endian'))

	(This is related to PR python/12188, though this patch isn't going to
	fix what that bug is really about.)

	The problem here is that the global variable that underlies the
	"endian" parameter is initialized to NULL.  However, that's not a
	valid value for an "enum" set/show parameter.

	My understanding is that, in gdb, an "enum" parameter's underlying
	variable must have a value that is "==" (not just strcmp-equal) to one
	of the values coming from the enum array.  This invariant is relied on
	in various places.

	I started this patch by fixing the problem with "endian".  Then I
	added some assertions to add_setshow_enum_cmd to try to catch other
	problems of the same type.

	This patch fixes all the problems that I found.  I also looked at all
	the calls to add_setshow_enum_cmd to ensure that they were all
	included in the gdb I tested.  I think they are: there are no calls in
	nat-* files, or in remote-sim.c; and I was trying a build with all
	targets, Python, and Guile enabled.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=12188

2022-01-26  Tom Tromey  <tromey@adacore.com>

	Change how Python architecture and language are handled
	Currently, gdb's Python layer captures the current architecture and
	language when "entering" Python code.  This has some undesirable
	effects, and so this series changes how this is handled.

	First, there is code like this:

	  gdbpy_enter enter_py (python_gdbarch, python_language);

	This is incorrect, because both of these are NULL when not otherwise
	assigned.  This can cause crashes in some cases -- I've added one to
	the test suite.  (Note that this crasher is just an example, other
	ones along the same lines are possible.)

	Second, when the language is captured in this way, it means that
	Python code cannot affect the current language for its own purposes.
	It's reasonable to want to write code like this:

	    gdb.execute('set language mumble')
	    ... stuff using the current language
	    gdb.execute('set language previous-value')

	However, this won't actually work, because the language is captured on
	entry.  I've added a test to show this as well.

	This patch changes gdb to try to avoid capturing the current values.
	The Python concept of the current gdbarch is only set in those few
	cases where a non-default value is computed or needed; and the
	language is not captured at all -- instead, in the cases where it's
	required, the current language is temporarily changed.

2022-01-26  H.J. Lu  <hjl.tools@gmail.com>

	bfd: Make bfd.stamp depend on source bfd.texi
	Make bfd.stamp depend on source bfd.texi to avoid regenerating
	doc/bfd.info for each make run.

		PR binutils/28807
		* Makefile.in: Regenerate.
		* doc/local.mk (%D%/bfd.stamp): Depend on $(srcdir)/%D%/bfd.texi.

2022-01-26  H.J. Lu  <hjl.tools@gmail.com>

	ld: Rewrite lang_size_relro_segment_1
	1. Compute the desired PT_GNU_RELRO segment base and find the maximum
	section alignment of sections starting from the PT_GNU_RELRO segment.
	2. Find the first preceding load section.
	3. Don't add the 1-page gap between the first preceding load section and
	the relro segment if the maximum page size >= the maximum section
	alignment.  Align the PT_GNU_RELRO segment first.  Subtract the maximum
	page size if therer is still a 1-page gap.

		PR ld/28743
		PR ld/28819
		* ldlang.c (lang_size_relro_segment_1): Rewrite.
		* testsuite/ld-x86-64/pr28743-1.d: New file.
		* testsuite/ld-x86-64/pr28743-1.s: Likewise.
		* testsuite/ld-x86-64/x86-64.exp: Run pr28743-1.

2022-01-26  Lancelot SIX  <lancelot.six@amd.com>

	gdb/testsuite: Ensure constant test name in gdb.base/break-interp.exp
	When running the testsuite, I have lines similar to the following in the
	gdb.sum file:

	~~~
	PASS: gdb.base/break-interp.exp: ldprelink=NO: ldsepdebug=NO: first backtrace: p /x 0x7f283d2f0fd1
	...
	PASS: gdb.base/break-interp.exp: ldprelink=NO: ldsepdebug=NO: binprelink=NO: binsepdebug=NO: binpie=NO: INNER: first backtrace: p /x 0x7f00de0317a5
	...
	~~~

	The address part of the command might change between execution of the
	test, which adds noise to a diff between two .sum files.

	This patch changes to test name to "p /x $pc" in order to have constant
	test name.

	Tested on x86_64-Linux.

	Change-Id: I973c1237a084dd6d424276443cbf0920533c9a21

2022-01-26  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-25  Tom Tromey  <tom@tromey.com>

	Always print the "host libthread-db" message to stdout
	linux-thread-db.c has a bit of unusual code that unconditionally
	prints a message, but decides whether to print to gdb_stdout or
	gdb_stdlog based on a debug flag.  It seems better to me to simply
	always print this; and this is the only spot in gdb where we
	conditionally pass gdb_stdout to one of the f*_unfiltered functions.

2022-01-25  Tom Tromey  <tom@tromey.com>

	Reduce explicit use of gdb_stdout
	In an earlier version of the pager rewrite series, it was important to
	audit unfiltered output calls to see which were truly necessary.

	This is no longer necessary, but it still seems like a decent cleanup
	to change calls to avoid explicitly passing gdb_stdout.  That is,
	rather than using something like fprintf_unfiltered with gdb_stdout,
	the code ought to use plain printf_unfiltered instead.

	This patch makes this change.  I went ahead and converted all the
	_filtered calls I could find, as well, for the same clarity.

2022-01-25  Tom Tromey  <tom@tromey.com>

	Sent timing stats to gdb_stdlog
	This changes the time / space / symtab per-command statistics code to
	send its output to gdb_stdlog rather than gdb_stdout.  This seems
	slightly more correct to me.

	Send some error output to gdb_stderr
	This changes some code to send some error messages to gdb_stderr
	rather than gdb_stdout.

2022-01-25  Klaus Ziegler  <klausz@haus-gisela.de>

	Fix a probem building the binutils on SPARC/amd64
		PR 28816
		* elf/common.h (AT_SUN_HWCAP): Make definition conditional.

2022-01-25  H.J. Lu  <hjl.tools@gmail.com>

	bfd: Regenerate Makefile.in
		* Makefile.in: Regenerate.

2022-01-25  Mike Frysinger  <vapier@gentoo.org>

	gold: drop old cygnus install hack
	The gold subdir doesn't actually have a manual, so this hack doesn't
	do anything.  Plus the automake cygnus option was removed years ago
	by Simon in d0ac1c44885daf68f631befa37e ("Bump to autoconf 2.69 and
	automake 1.15.1").  So delete it here.

	gas: drop old cygnus install hack
	This was needed when gas was using the automake cygnus option, but
	this was removed years ago by Simon in d0ac1c44885daf68f631befa37e
	("Bump to autoconf 2.69 and automake 1.15.1").  So delete it here.
	The info pages are already & still installed by default w/out it.

2022-01-25  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-24  H.J. Lu  <hjl.tools@gmail.com>

	bfd: Update doc/local.mk
		PR binutils/28807
		* Makefile.in: Regenerate.
		* doc/local.mk (AM_MAKEINFOFLAGS): Add -I "$(srcdir)/%D%" -I %D%.
		(TEXI2DVI): New.
		(%D%/bfd.texi): Removed.
		(doc/bfd/index.html): Remove -I$(srcdir).  Replace bfd.texi with
		%D%/bfd.texi.

2022-01-24  Roland McGrath  <mcgrathr@google.com>

	bfd/doc: Fix racy build failure from missing mkdir
	bfd/
		* doc/local.mk (%D%/bfdver.texi): Add mkdir command.

2022-01-24  Martin Sebor  <msebor@redhat.com>

	Fix a proble building the libiberty library with gcc-12.
		PR 28779
		* regex.c: Suppress -Wuse-after-free.

2022-01-24  Andrew Burgess  <aburgess@redhat.com>

	gdb/doc: improve description for Window.click on Python TUI windows
	The description of the Window.click method doesn't mention where the
	coordinates are anchored (it's the top left corner).

	This minor tweak just mentions this point.

2022-01-24  Nick Clifton  <nickc@redhat.com>

	Update Bulgarian, French, Romaniam and Ukranian translation for some of the sub-directories

2022-01-24  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-23  Tom Tromey  <tom@tromey.com>

	Simplify some Rust expression-evaluation code
	A few Rust operations do a bit of work in their 'evaluate' functions
	and then call another function -- but are also the only caller.  This
	patch simplifies this code by removing the extra layer.

	Tested on x86-64 Fedora 34.  I'm checking this in.

2022-01-23  H.J. Lu  <hjl.tools@gmail.com>

	bfd: Partially revert commit 0e3839bde6f
	Partially revert

	commit 0e3839bde6f93e1e3eefce815be3636e3d81054d
	Author: H.J. Lu <hjl.tools@gmail.com>
	Date:   Sun Jan 23 07:29:27 2022 -0800

	    bfd: Properly install library and header files

		PR binutils/28807
		* Makefile.am: Revert bfdlib_LTLIBRARIES and bfdinclude_HEADERS
		changes.
		* Makefile.in: Regenerate.

2022-01-23  H.J. Lu  <hjl.tools@gmail.com>

	bfd: Properly install library and header files
	Rename bfdlib_LTLIBRARIES and bfdinclude_HEADERS to lib_LTLIBRARIES and
	include_HEADERS to fix the missing installed library and header files in
	bfd caused by

	commit bd32be01c997f686ab0b53f0640eaa0aeb61fbd3
	Author: Mike Frysinger <vapier@gentoo.org>
	Date:   Fri Dec 3 00:23:20 2021 -0500

	    bfd: merge doc subdir up a level

		PR binutils/28807
		* Makefile.am (bfdlib_LTLIBRARIES): Renamed to ...
		(lib_LTLIBRARIES): This.
		(bfdinclude_HEADERS): Renamed to ...
		(include_HEADERS): This.
		* Makefile.in: Regenerate.
		* doc/local.mk (install): Removed.

2022-01-23  H.J. Lu  <hjl.tools@gmail.com>

	Regenerate Makefile.in files with automake 1.15.1
	Regenerate Makefile.in files with the unmodified automake 1.15.1 to
	remove

	runstatedir = @runstatedir@

	bfd/

		* Makefile.in: Regenerate.

	binutils/

		* Makefile.in: Regenerate.

	gas/

		* Makefile.in: Regenerate.

	gold/

		* Makefile.in: Regenerate.
		* testsuite/Makefile.in: Likewise.

	gprof/

		* Makefile.in: Regenerate.

	ld/

		* Makefile.in: Regenerate.

	opcodes/

		* Makefile.in: Regenerate.

2022-01-23  H.J. Lu  <hjl.tools@gmail.com>

	Regenerate configure files with autoconf 2.69
	Regenerate configure files with the unmodified autoconf 2.69 to remove

	  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]

	bfd/

		* configure: Regenerate.

	binutils/

		* configure: Regenerate.

	gas/

		* configure: Regenerate.

	gold/

		* configure: Regenerate.

	gprof/

		* configure: Regenerate.

	ld/

		* configure: Regenerate.

	opcodes/

		* configure: Regenerate.

2022-01-23  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-22  Mike Frysinger  <vapier@gentoo.org>

	bfd: merge doc subdir up a level
	This avoids a recursive make into the doc subdir and speeds up the
	build slightly.  It also allows for more parallelism.

	bfd: rename core.texi to corefile.texi
	This is a generated file name from a correspondingly named C file.
	Rename it to avoid unique build rules since there's no difference
	to the generated manual.

	bfd: replace doc header generation with pattern rules
	This unifies boilerplate rules for most files with pattern rules.

2022-01-22  Martin Storsj?  <martin@martin.st>

	Allow inferring tmp_prefix from the dll name from a def file.

2022-01-22  Alexander von Gluck IV  <kallisti5@unixzen.com>

	Adjust default page sizes for haiku arm.
		* configure.tgt (arm-haiku): Fix typo.
		* emulparams/armelf_haiku.su (MAXPAGESIZE): Use the default value.
		(COMMONPAGESIZE): Likewise.

2022-01-22  Nick Clifton  <nickc@redhat.com>

	Update release makeing script with new release numbers

	Change version number to 2.38.50 and regenerate files

	Add markers for 2.38 branch

2022-01-22  Lifang Xia  <lifang_xia@linux.alibaba.com>

	RISC-V: create new frag after alignment.
	PR 28793:

	The alignment may be removed in linker. We need to create new frag after
	alignment to prevent the assembler from computing static offsets.

	gas/
		* config/tc-riscv.c (riscv_frag_align_code): Create new frag.

2022-01-22  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-21  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: include gdbsupport/buildargv.h in ser-mingw.c
	Fixes:

	      CXX    ser-mingw.o
	    /home/simark/src/binutils-gdb/gdb/ser-mingw.c: In function ‘int pipe_windows_open(serial*, const char*)’:
	    /home/simark/src/binutils-gdb/gdb/ser-mingw.c:870:3: error: ‘gdb_argv’ was not declared in this scope
	      870 |   gdb_argv argv (name);
	          |   ^~~~~~~~

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28802
	Change-Id: I7f3e8ec5f9ca8582d587545fdf6b69901259f199

2022-01-21  Nick Clifton  <nickc@redhat.com>

	Updated Serbian translation for the ld sub-directory

2022-01-21  Andrew Burgess  <aburgess@redhat.com>

	gdb/doc: fill in two missing @r
	I noticed two places in the docs where we appear to be missing @r.
	makeinfo seems to do the correct things despite these being
	missing (at least, I couldn't see any difference in the pdf or info
	output), but it doesn't hurt to have the @r in place.

2022-01-21  Mike Frysinger  <vapier@gentoo.org>

	drop old unused stamp-h.in file
	This was needed by ancient versions of automake, but that hasn't been
	the case since at least automake-1.5, so punt this from the tree.

2022-01-21  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbsupport/gdb_regex.cc: replace defs.h include with common-defs.h
	This was forgotten when gdb_regex was moved from gdb to gdbsupport.

	Change-Id: I73b446f71861cabbf7afdb7408ef9d59fa64b804

2022-01-21  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-20  Tom Tromey  <tromey@adacore.com>

	Avoid bad breakpoints with --gc-sections
	We found a case where --gc-sections can cause gdb to set an invalid
	breakpoint.  In the included test case, gdb will set a breakpoint with
	two locations, one of which is 0x0.

	The code in lnp_state_machine::check_line_address is intended to
	filter out this sort of problem, but in this case, the entire CU is
	empty, causing unrelocated_lowpc==0x0 -- which circumvents the check.

	It seems to me that if a CU is empty like this, then it is ok to
	simply ignore the line table, as there won't be any locations anyway.

2022-01-20  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-19  Maciej W. Rozycki  <macro@embecosm.com>

	Add `set print array-indexes' tests for C/C++ arrays
	Add `set print array-indexes' tests for C/C++ arrays, complementing one
	for Fortran arrays.

2022-01-19  Maciej W. Rozycki  <macro@embecosm.com>

	Respect `set print array-indexes' with Fortran arrays
	Add `set print array-indexes' handling for Fortran arrays.  Currently
	the setting is ignored and indices are never shown.

	Keep track of the most recent index handled so that any outstanding
	repeated elements printed when the limit set by `set print elements' is
	hit have the correct index shown.

	Output now looks like:

	(gdb) set print array-indexes on
	(gdb) print array_1d
	$1 = ((-2) = 1, (-1) = 1, (0) = 1, (1) = 1, (2) = 1)
	(gdb) set print repeats 4
	(gdb) set print elements 12
	(gdb) print array_2d
	$2 = ((-2) = ((-2) = 2, <repeats 5 times>) (-1) = ((-2) = 2, <repeats 5 times>) (0) = ((-2) = 2, (-1) = 2, ...) ...)
	(gdb)

	for a 5-element vector and a 5 by 5 array filled with the value of 2.

2022-01-19  Maciej W. Rozycki  <macro@embecosm.com>

	Add `set print repeats' tests for C/C++ arrays
	Add `set print repeats' tests for C/C++ arrays, complementing one for
	Fortran arrays and covering the different interpretation of the `set
	print elements' setting in particular where the per-dimension count of
	the elements handled is matched against the trigger rather than the
	total element count as with Fortran arrays.

2022-01-19  Maciej W. Rozycki  <macro@embecosm.com>

	Respect `set print repeats' with Fortran arrays
	Implement `set print repeats' handling for Fortran arrays.  Currently
	the setting is ignored and always treated as if no limit was set.

	Unlike the generic array walker implemented decades ago the Fortran one
	is a proper C++ class.  Rather than trying to mimic the old walker then,
	which turned out a bit of a challenge where interacting with the `set
	print elements' setting, write it entirely from scratch, by adding an
	extra specialization handler method for processing dimensions other than
	the innermost one and letting the specialization class call the `walk_1'
	method from the handler as it sees fit.  This way repeats can be tracked
	and the next inner dimension recursed into as a need arises only, or
	unconditionally in the base class.

	Keep track of the dimension number being handled in the class rather as
	a parameter to the walker so that it does not have to be passed across
	by the specialization class.

	Use per-dimension element count tracking, needed to terminate processing
	early when the limit set by `set print elements' is hit.  This requires
	extra care too where the limit triggers exactly where another element
	that is a subarray begins.  In that case rather than recursing we need
	to terminate processing or lone `(...)' would be printed.  Additionally
	if the skipped element is the last one in the current dimension we need
	to print `...' by hand, because `continue_walking' won't print it at the
	upper level, because it can see the last element has already been taken
	care of.

	Preserve the existing semantics of `set print elements' where the total
	count of the elements handled is matched against the trigger level which
	is unlike with the C/C++ array printer where the per-dimension element
	count is used instead.

	Output now looks like:

	(gdb) set print repeats 4
	(gdb) print array_2d
	$1 = ((2, <repeats 5 times>) <repeats 5 times>)
	(gdb) set print elements 12
	(gdb) print array_2d
	$2 = ((2, <repeats 5 times>) (2, <repeats 5 times>) (2, 2, ...) ...)
	(gdb)

	for a 5 by 5 array filled with the value of 2.

	Amend existing test cases accordingly that rely on the current incorrect
	behavior and explicitly request that there be no limit for printing
	repeated elements there.

	Add suitable test cases as well covering sliced arrays in particular.

	Co-Authored-By: Andrew Burgess <andrew.burgess@embecosm.com>

2022-01-19  John Baldwin  <jhb@FreeBSD.org>

	fbsd-nat: Add include for gdb_argv.

2022-01-19  Alan Modra  <amodra@gmail.com>

	PowerPC64 DT_RELR ELFv1
	More fun with R_PPC64_NONE found in .opd.  Fixed by the
	allocate_dynrelocs and ppc64_elf_size_dynamic_sections changes, and
	since we are doing ifunc, opd and SYMBOL_REFERENCES_LOCAL tests later,
	don't duplicate that work in check_relocs.

		* elf64-ppc.c (ppc64_elf_check_relocs): Remove opd and ifunc
		conditions for rel_count.
		(dec_dynrel_count): Likewise.
		(allocate_dynrelocs): Test for opd and ifunc when allocating
		relative relocs.
		(ppc64_elf_size_dynamic_sections): Likewise.

2022-01-19  Alan Modra  <amodra@gmail.com>

	PowerPC64 DT_RELR local PLT
	Similarly to the local GOT case.

		* elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
		space for PLT relocs against local syms when enable_dt_relr.

2022-01-19  Alan Modra  <amodra@gmail.com>

	PowerPC64 DT_RELR local GOT
	Fixes another case where we end up with superfluous R_PPC64_NONE.

		* elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
		space for GOT relocs against non-TLS local syms when enable_dt_relr.
		(ppc64_elf_layout_multitoc): Likewise.

2022-01-19  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-18  Alan Modra  <amodra@gmail.com>

	Re: PowerPC64 DT_RELR
	HJ: "There are 238 R_PPC64_NONEs in libc.so.6 alone."
	Indeed, let's make them go away.  I had the SYMBOL_REFERENCES_LOCAL
	test in the wrong place.  check_relocs is too early to know whether a
	symbol is dynamic in a shared library.  Lots of glibc symbols are made
	local by version script, but that doesn't happen until
	size_dynamic_sections.

		* elf64-ppc.c (ppc64_elf_check_relocs): Don't count relative relocs
		here depending on SYMBOL_REFERENCES_LOCAL.
		(dec_dynrel_count): Likewise.
		(allocate_dynrelocs): Do so here instead.

2022-01-18  Tom Tromey  <tom@tromey.com>

	Fix the remote-sim.c build
	My earlier patch to move gdb_argv broke the remote-sim.c build.  This
	patch fixes the bug.  I'm checking it in.

2022-01-18  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbserver: introduce remote_debug_printf
	Add remote_debug_printf, and use it for all debug messages controlled by
	remote_debug.

	Change remote_debug to be a bool, which is trivial in this case.

	Change-Id: I90de13cb892faec3830047b571661822b126d6e8

2022-01-18  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbserver: introduce threads_debug_printf, THREADS_SCOPED_DEBUG_ENTER_EXIT
	Add the threads_debug_printf and THREADS_SCOPED_DEBUG_ENTER_EXIT, which
	use the logging infrastructure from gdbsupport/common-debug.h.  Replace
	all debug_print uses that are predicated by debug_threads with
	threads_dethreads_debug_printf.  Replace uses of the debug_enter and
	debug_exit macros with THREADS_SCOPED_DEBUG_ENTER_EXIT, which serves
	essentially the same purpose, but allows showing what comes between the
	enter and the exit in an indented form.

	Note that "threads" debug is currently used for a bit of everything in
	GDBserver, not only threads related stuff.  It should ideally be cleaned
	up and separated logically as is done in GDB, but that's out of the
	scope of this patch.

	Change-Id: I2d4546464462cb4c16f7f1168c5cec5a89f2289a

2022-01-18  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbserver: turn debug_threads into a boolean
	debug_threads is always used as a boolean.  Except in ax.cc and
	tracepoint.cc.  These files have their own macros that use
	debug_threads, and have a concept of verbosity level.  But they both
	have a single level, so it's just a boolean in the end.

	Remove this concept of level.  If we ever want to re-introduce it, I
	think it will be better implemented in a more common location.

	Change debug_threads to bool and adjust some users that were treating it
	as an int.

	Change-Id: I137f596eaf763a08c977dd74417969cedfee9ecf

2022-01-18  Tom Tromey  <tom@tromey.com>

	Simplify Ada catchpoints
	All the Ada catchpoints use the same breakpoint_ops contents, because
	the catchpoint itself records its kind.  This patch simplifies the
	code by removing the redundant ops structures.

	Move "catch exec" to a new file
	The "catch exec" code is reasonably self-contained, and so this patch
	moves it out of breakpoint.c (the second largest source file in gdb)
	and into a new file, break-catch-exec.c.

	Move "catch fork" to a new file
	The "catch fork" code is reasonably self-contained, and so this patch
	moves it out of breakpoint.c (the second largest source file in gdb)
	and into a new file, break-catch-fork.c.

	Unify "catch fork" and "catch vfork"
	I noticed that "catch fork" and "catch vfork" are nearly identical.
	This patch simplifies the code by unifying these two cases.

	Move gdb_regex to gdbsupport
	This moves the gdb_regex convenience class to gdbsupport.

	Introduce gdb-hashtab module in gdbsupport
	gdb has some extensions and helpers for working with the libiberty
	hash table.  This patch consolidates these and moves them to
	gdbsupport.

	Move gdb obstack code to gdbsupport
	This moves the gdb-specific obstack code -- both extensions like
	obconcat and obstack_strdup, and things like auto_obstack -- to
	gdbsupport.

	Move gdb_argv to gdbsupport
	This moves the gdb_argv class to a new header in gdbsupport.

	Simplify event_location_probe
	event_location_probe currently stores two strings, but really only
	needs one.  This patch simplifies it and removes some unnecessary
	copies as well.

	Use std::string in event_location
	This changes event_location to use std::string, removing some manual
	memory management, and an unnecessary string copy.

	Split event_location into subclasses
	event_location uses the old C-style discriminated union approach.
	However, it's better to use subclassing, as this makes the code
	clearer and removes some chances for error.  This also enables future
	cleanups to avoid manual memory management and copies.

	Remove EL_* macros from location.c
	This patch removes the old-style EL_* macros from location.c.  This
	cleans up the code by itself, IMO, but also enables further cleanups
	in subsequent patches.

	Boolify explicit_to_string_internal
	This changes explicit_to_string_internal to use 'bool' rather than
	'int'.

	Remove a use of xfree in location.c
	This small cleanup removes a use of xfree from location.c, by
	switching to unique_xmalloc_ptr.  One function is only used in
	location.c, so it is made static.  And, another function is changed to
	avoid a copy.

2022-01-18  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: use ptid_t::to_string instead of target_pid_to_str in debug statements
	Same idea as 0fab79556484 ("gdb: use ptid_t::to_string in infrun debug
	messages"), but throughout GDB.

	Change-Id: I62ba36eaef29935316d7187b9b13d7b88491acc1

2022-01-18  Andrew Burgess  <aburgess@redhat.com>

	gdb: preserve `|` in connection details string
	Consider this GDB session:

	  $ gdb -q
	  (gdb) target remote  | gdbserver - ~/tmp/hello.x
	  Remote debugging using | gdbserver - ~/tmp/hello.x
	  ... snip ...
	  (gdb) info connections
	    Num  What                              Description
	  * 1    remote gdbserver - ~/tmp/hello.x  Remote target using gdb-specific protocol
	  (gdb) python conn = gdb.selected_inferior().connection
	  (gdb) python print(conn.details)
	  gdbserver - ~/tmp/hello.x
	  (gdb)

	I think there are two things wrong here, first in the "What" column of
	the 'info connections' output, I think the text should be:

	  remote | gdbserver - ~/tmp/hello.x

	to correctly show the user how the connection was established.  And in
	a similar fashion, I think that the `details` string of the
	gdb.TargetConnection object should be:

	  | gdbserver - ~/tmp/hello.x

	This commit makes this change.  Currently the '|' is detected and
	removed in gdb/serial.c.  The string passed to the pipe_ops
	structure (from gdb/ser-pipe.c), doesn't then, contain the `|`, this
	is instead implied by the fact that it is a pipes based implementation
	of the serial_ops interface.

	After this commit we still detect the `|` in gdb/serial.c, but we now
	store the full string (including the `|`) in the serial::name member
	variable.

	For pipe based serial connections, this name is only used for
	displaying the two fields I mention above, and in pipe_open (from
	gdb/ser-pipe.c), and in pipe_open, we now know to skip over the `|`.

	The benefit I see from this change is that GDB's output now more
	accurately reflects the commands used to start a target, thus making
	it easier for a user to understand what is going on.

2022-01-18  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: testsuite: print explicit test result for gdb.base/dfp-test.exp
	In the current code, if decimal floating point is not supported for
	this target, there is no binary file dfp-test, and also there is no
	test result after execute the following commands:

	  $ make check-gdb TESTS="gdb.base/dfp-test.exp"
	  $ grep error gdb/testsuite/gdb.log
	  /home/loongson/gdb.git/gdb/testsuite/gdb.base/dfp-test.c:39:1: error: decimal floating point not supported for this target
	  [...]
	  $ cat gdb/testsuite/gdb.sum
	  [...]
	  Running target unix
	  Running /home/loongson/gdb.git/gdb/testsuite/gdb.base/dfp-test.exp ...

			  === gdb Summary ===
	  [...]

	With this patch:

	  $ make check-gdb TESTS="gdb.base/dfp-test.exp"
	  $ cat gdb/testsuite/gdb.sum
	  [...]
	  Running target unix
	  Running /home/loongson/gdb.git/gdb/testsuite/gdb.base/dfp-test.exp ...
	  UNSUPPORTED: gdb.base/dfp-test.exp: decimal floating point not supported for this target.

			  === gdb Summary ===

	  # of unsupported tests		1
	  [...]

2022-01-18  Simon Marchi  <simon.marchi@efficios.com>

	bfd/elf64-ppc.c: fix clang -Wbitwise-instead-of-logical warning in ppc64_elf_check_init_fini
	I see this error with clang-14:

	      CC       elf64-ppc.lo
	    /home/smarchi/src/binutils-gdb/bfd/elf64-ppc.c:13131:11: error: use of bitwise '&' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
	      return (check_pasted_section (info, ".init")
	             ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

	Fix by replacing & with &&.  But given that the check_pasted_section
	function has side-effects and we want to make sure both calls are made,
	assign to temporary variables before evaluating the `&&`.

	Change-Id: I849e1b2401bea5f4d8ef3ab9af99ba9e3ef42490

2022-01-18  Alan Modra  <amodra@gmail.com>

	PR28029, debuginfod tests
	binutils/NEWS says of the change in --process-links semantics:
	  If other debug section display options are also enabled (eg
	  --debug-dump=info) then the contents of matching sections in both the main
	  file and the separate debuginfo file *will* be displayed.  This is because in
	  most cases the debug section will only be present in one of the files.

	Implying that debug info is dumped without --process-links.  Indeed
	that appears to be the case for readelf.  This does the same for
	objdump.

		PR 28029
		* objdump.c (dump_bfd): Do not exit early when !is_mainfile
		&& !processlinks, instead just exclude non-debug output.
		(dump_dwarf): Add is_mainfile parameter and pass to
		dump_dwarf_section.
		(dump_dwarf_section): Only display debug sections when
		!is_mainfile and !process_links.

2022-01-18  Alan Modra  <amodra@gmail.com>

	Check thin archive element file size against archive header
	Makes it a little less likely for someone to break their thin archives.

		* archive.c (_bfd_get_elt_at_filepos): Check thin archive
		element file size.

2022-01-18  Alan Modra  <amodra@gmail.com>

	lang_size_relro_segment tidy
	This function has seen too many minimal change style edits.
	No functional changes in this patch.

		* ldlang.c (lang_size_relro_segment): Tidy.

2022-01-18  Alan Modra  <amodra@gmail.com>

	PowerPC64 DT_RELR
	PowerPC64 takes a more traditional approach to DT_RELR than x86.  Count
	relative relocs in check_relocs, allocate space for them and output in
	the usual places but not doing so when enable_dt_relr.  DT_RELR is
	sized in the existing ppc stub relaxation machinery, run via the
	linker's ldemul_after_allocation hook.  DT_RELR is output in the same
	function that writes ppc stubs, run via ldemul_finish.

	This support should be considered experimental.

	bfd/
		* elf64-ppc.c (struct ppc_local_dyn_relocs): Renamed from
		ppc_dyn_relocs.  Add rel_count field.  Update uses.
		(struct ppc_dyn_relocs): New.  Replace all uses of elf_dyn_relocs.
		(struct ppc_link_hash_table): Add relr_alloc, relr_count and
		relr_addr.
		(ppc64_elf_copy_indirect_symbol): Merge rel_count.
		(ppc64_elf_check_relocs): Init rel_count for global and local syms.
		(dec_dynrel_count): Change r_info param to reloc pointer.  Update
		all callers.  Handle decrementing rel_count.
		(allocate_got): Don't allocate space for relative relocs when
		enable_dt_relr.
		(allocate_dynrelocs): Likewise.
		(ppc64_elf_size_dynamic_sections): Likewise.  Handle srelrdyn.
		(ppc_build_one_stub): Don't emit relative relocs on .branch_lt.
		(compare_relr_address, append_relr_off): New functions.
		(got_and_plt_relr_for_local_syms, got_and_plt_relr): Likewise.
		(ppc64_elf_size_stubs): Size .relr.syn.
		(ppc64_elf_build_stubs): Emit .relr.dyn.
		(build_global_entry_stubs_and_plt): Don't output relative relocs
		when enable_dt_relr.
		(write_plt_relocs_for_local_syms): Likewise.
		(ppc64_elf_relocate_section): Likewise.
	binutils/
		* testsuite/lib/binutils-common.exp (supports_dt_relr): Add
		powerpc64.
	ld/
		* emulparams/elf64ppc.sh: Source dt-relr.sh.
		* testsuite/ld-elf/dt-relr-2b.d: Adjust for powerpc.
		* testsuite/ld-elf/dt-relr-2c.d: Likewise.
		* testsuite/ld-elf/dt-relr-2d.d: Likewise.
		* testsuite/ld-elf/dt-relr-2e.d: Likewise.

2022-01-18  Alan Modra  <amodra@gmail.com>

	tweak __ehdr_start visibility and flags for check_relocs
	bfd/
		* elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Test linker_def.
	ld/
		* ldelf.c (ldelf_before_allocation): Don't force __ehdr_start
		local and hidden here..
		* ldlang.c (lang_symbol_tweaks): ..do so here instead and set
		def_regular and linker_def for check_relocs.  New function
		extracted from lang_process.

2022-01-18  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-17  Nick Clifton  <nickc@redhat.com>

	Update the config.guess and config.sub files from the master repository and regenerate files.

2022-01-17  Sergey Belyashov  <sergey.belyashov@gmail.com>

	Fix Z80 assembly failure.
		PR 28762
		* app.c (do_scrub_chars): Correct handling when the symbol is not 'af'.

2022-01-17  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/infrun: rename variable and move to more specific scope
	Move the "started" variable to the scope it's needed, and rename it to
	"step_over_started".

	Change-Id: I56f3384dbd328f55198063bb855edda10f1492a3

2022-01-17  Jan Beulich  <jbeulich@suse.com>

	x86: adjust struct instr_info field types
	Now that this lives on the stack, let's have it be a little less
	wasteful in terms of space. Switch boolean fields to "bool" (also when
	this doesn't change their size) and also limit the widths of "rex",
	"rex_used", "op_ad", and "op_index". Do a little bit of re-ordering as
	well to limit the number of padding holes.

	x86: drop index16 field
	There's a single use on a generally infrequently taken code path. Put
	the necessary conditional there instead.

	x86: drop most Intel syntax register name arrays
	By making use of, in particular, oappend_maybe_intel() there's no need
	for this redundant set of static data.

	x86: fold variables in memory operand index handling
	There's no real need for the pseudo-boolean "haveindex" or for separate
	32-bit / 64-bit index pointers. Fold them into a single "indexes" and
	set that uniformly to AT&T names, compensating by emitting the register
	name via oappend_maybe_intel().

	x86: constify disassembler static data
	Now that the code is intended to be largely thread-safe, we'd better not
	have any writable static objects.

2022-01-17  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-16  Joel Brobecker  <brobecker@adacore.com>

	gdb/copyright.py: Do not update gdbsupport/Makefile.in
	This file is generated, so we should not modify it (any modification
	we make is going to be undone at the next re-generation anyway).

2022-01-16  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-15  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-14  Simon Marchi  <simon.marchi@efficios.com>

	gdb.dlang/demangle.exp: update expected output for _D8demangle4testFnZv
	Since commit ce2d3708bc8b ("Synchronize binutils libiberty sources with
	gcc version."), I see this failure:

	    demangle _D8demangle4testFnZv^M
	    demangle.test(typeof(null))^M
	    (gdb) FAIL: gdb.dlang/demangle.exp: _D8demangle4testFnZv

	The commit imported the commit 0e32a5aa8bc9 ("libiberty: Add support for
	D `typeof(*null)' types") from the gcc repository.  That commit includes
	an update to libiberty/testsuite/d-demangle-expected, which updates a
	test for the exact same mangled name:

	     _D8demangle4testFnZv
	    -demangle.test(none)
	    +demangle.test(typeof(null))

	I don't know anything about D, but give that the change was made by Iain
	Buclaw, the D language maintainer, I trust him on that.

	Fix our test by updating the expected output in the same way.

	Note: it's not really useful to have all these D demangling tests in the
	GDB testsuite, since there are demangling tests in libiberty.  We should
	consider removing them, but we first need to make sure that everything
	that is covered in gdb/testsuite/gdb.dlang/demangle.exp is also covered
	in libiberty/testsuite/d-demangle-expected.

	Change-Id: If2b290ea8367b8e1e0b90b20d4a6e0bee517952d

2022-01-14  Nils-Christian Kempke  <nils-christian.kempke@intel.com>

	gdb/testsuite: enable __INTEL_LLVM_COMPILER preprocessor in get_compiler_info
	Intel Next Gen compiler defines preprocessor __INTEL_LLVM_COMPILER and provides
	version info in __clang_version__ e.g. value: 12.0.0 (icx 2020.10.0.1113).

	gdb/testsuite/ChangeLog:
	2020-12-07  Abdul Basit Ijaz  <abdul.b.ijaz@intel.com>

		* lib/compiler.c: Add Intel next gen compiler pre-processor check.
		* lib/compiler.cc: Ditto.
		* lib/fortran.exp (fortran_main): Check Intel next gen compiler in
		test_compiler_info.

2022-01-14  Alan Modra  <amodra@gmail.com>

	PR28751 mbind2a / mbind2b regressions on powerpc*-linux
	include/
		* bfdlink.h (struct bfd_link_info): Add commonpagesize_is_set.
	ld/
		PR 28751
		* emultempl/elf.em (handle_option): Set commonpagesize_is_set.
		* ldelf.c (ldelf_after_parse): Don't error when only one of
		-z max-page-size or -z common-page-size is given, correct the
		other value to make it sane.
		* testsuite/ld-elf/elf.exp (mbind2a, mbind2b): Do not pass
		-z max-page-size.

2022-01-14  Jan Beulich  <jbeulich@suse.com>

	x86: drop ymmxmm_mode
	This enumerator is not used by any table entry.

	x86: share yet more VEX table entries with EVEX decoding
	On top of prior similar work more opportunities have appeared in the
	meantime. Note that this also happens to address the prior lack of
	decoding of EVEX.L'L for VMOV{L,H}P{S,D} and VMOV{LH,HL}PS.

	x86: consistently use scalar_mode for AVX512-FP16 scalar insns
	For some reason the original AVFX512F insns were not taken as a basis
	here, causing unnecessary divergence. While not an active issue, it is
	still relevant to note that OP_XMM() has special treatment of e.g.
	scalar_mode (marking broadcast as invalid). Such would better be
	consistent for all sufficiently similar insns.

	x86: record further wrong uses of EVEX.b
	For one EVEX.W set does not imply EVEX.b is uniformly valid. Reject it
	for modes which occur for insns allowing for EVEX.W to be set (noticed
	with VMOV{H,L}PD and VMOVDDUP, and only in AT&T mode, but not checked
	whether further insns would also have been impacted; I expect e.g.
	VCMPSD would have had the same issue). And then the present concept of
	broadcast makes no sense at all when the memory operand of an insn is
	the destination.

2022-01-14  Jan Beulich  <jbeulich@suse.com>

	x86: reduce AVX512 FP set of insns decoded through vex_w_table[]
	Like for AVX512-FP16, there's not that many FP insns where going through
	this table is easier / cheaper than using suitable macros. Utilize %XS
	and %XD more to eliminate a fair number of table entries.

	While doing this I noticed a few anomalies. Where lines get touched /
	moved anyway, these are being addressed right here:
	- vmovshdup used EXx for its 2nd operand, thus displaying seemingly
	  valid broadcast when EVEX.b is set with a memory operand; use
	  EXEvexXNoBcst instead just like vmovsldup already does
	- vmovlhps used EXx for its 3rd operand, when all sibling entries use
	  EXq; switch to EXq there for consistency (the two differ only for
	  memory operands)

2022-01-14  Jan Beulich  <jbeulich@suse.com>

	x86: reduce AVX512-FP16 set of insns decoded through vex_w_table[]
	Like already indicated during review of the original submission, there's
	really only very few insns where going through this table is easier /
	cheaper than using suitable macros. Utilize %XH more and introduce
	similar %XS and %XD (which subsequently can be used for further table
	size reduction).

	While there also switch to using oappend() in 'XH' macro processing.

2022-01-14  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-13  H.J. Lu  <hjl.tools@gmail.com>

	ld: Disable DT_RELR in some -z relro tests
	Disable DT_RELR in the following -z relro tests which don't expect
	DT_RELR in linker outputs.

		* testsuite/ld-i386/pr20830.d: Pass $NO_DT_RELR_LDFLAGS to ld.
		* testsuite/ld-x86-64/pr20830a-now.d: Likewise.
		* testsuite/ld-x86-64/pr20830a.d: Likewise.
		* testsuite/ld-x86-64/pr20830b-now.d: Likewise.
		* testsuite/ld-x86-64/pr20830b.d: Likewise.
		* testsuite/ld-x86-64/pr21038a-now.d: Likewise.
		* testsuite/ld-x86-64/pr21038a.d: Likewise.
		* testsuite/ld-x86-64/pr21038b-now.d: Likewise.
		* testsuite/ld-x86-64/pr21038c-now.d: Likewise.
		* testsuite/ld-x86-64/pr21038c.d: Likewise.

2022-01-13  H.J. Lu  <hjl.tools@gmail.com>

	Reapply libiberty: Pass --plugin to AR and RANLIB
	Reapply the patch to detect GCC LTO plugin used for libiberty build to
	support LTO build in libiberty.

		* Makefile.in (AR): Add @AR_PLUGIN_OPTION@
		(RANLIB): Add @RANLIB_PLUGIN_OPTION@.
		(configure_deps): Depend on ../config/gcc-plugin.m4.
		* aclocal.m4: Include ../config/gcc-plugin.m4.
		* configure.ac: AC_SUBST AR_PLUGIN_OPTION and
		RANLIB_PLUGIN_OPTION.
		* configure: Regenerate.

2022-01-13  H.J. Lu  <hjl.tools@gmail.com>

	elf: Remove the 1-page gap before the RELRO segment
	The existing RELRO scheme may leave a 1-page gap before the RELRO segment
	and align the end of the RELRO segment to the page size:

	  [18] .eh_frame    PROGBITS    408fa0 008fa0 005e80 00   A  0   0  8
	  [19] .init_array  INIT_ARRAY  410de0 00fde0 000008 08  WA  0   0  8
	  [20] .fini_array  FINI_ARRAY  410de8 00fde8 000008 08  WA  0   0  8
	  [21] .dynamic     DYNAMIC     410df0 00fdf0 000200 10  WA  7   0  8
	  [22] .got         PROGBITS    410ff0 00fff0 000010 08  WA  0   0  8
	  [23] .got.plt     PROGBITS    411000 010000 000048 08  WA  0   0  8

	Instead, we can remove the 1-page gap if the maximum page size >= the
	maximum section alignment:

	  [18] .eh_frame    PROGBITS    408fa0 008fa0 005e80 00   A  0   0  8
	  [19] .init_array  INIT_ARRAY  40fde0 00fde0 000008 08  WA  0   0  8
	  [20] .fini_array  FINI_ARRAY  40fde8 00fde8 000008 08  WA  0   0  8
	  [21] .dynamic     DYNAMIC     40fdf0 00fdf0 000200 10  WA  7   0  8
	  [22] .got         PROGBITS    40fff0 00fff0 000010 08  WA  0   0  8
	  [23] .got.plt     PROGBITS    410000 010000 000048 08  WA  0   0  8

	Because the end of the RELRO segment is always aligned to the page size
	and may not be moved, the RELRO segment size may be increased:

	  [ 3] .dynstr      STRTAB      000148 000148 000001 00   A  0   0  1
	  [ 4] .eh_frame    PROGBITS    000150 000150 000000 00   A  0   0  8
	  [ 5] .init_array  INIT_ARRAY  200150 000150 000010 08  WA  0   0  1
	  [ 6] .fini_array  FINI_ARRAY  200160 000160 000010 08  WA  0   0  1
	  [ 7] .jcr         PROGBITS    200170 000170 000008 00  WA  0   0  1
	  [ 8] .data.rel.ro PROGBITS    200180 000180 000020 00  WA  0   0 16
	  [ 9] .dynamic     DYNAMIC     2001a0 0001a0 0001c0 10  WA  3   0  8
	  [10] .got         PROGBITS    200360 000360 0002a8 00  WA  0   0  8
	  [11] .bss         NOBITS      201000 000608 000840 00  WA  0   0  1

	vs the old section layout:

	  [ 3] .dynstr      STRTAB      000148 000148 000001 00   A  0   0  1
	  [ 4] .eh_frame    PROGBITS    000150 000150 000000 00   A  0   0  8
	  [ 5] .init_array  INIT_ARRAY  200b48 000b48 000010 08  WA  0   0  1
	  [ 6] .fini_array  FINI_ARRAY  200b58 000b58 000010 08  WA  0   0  1
	  [ 7] .jcr         PROGBITS    200b68 000b68 000008 00  WA  0   0  1
	  [ 8] .data.rel.ro PROGBITS    200b70 000b70 000020 00  WA  0   0 16
	  [ 9] .dynamic     DYNAMIC     200b90 000b90 0001c0 10  WA  3   0  8
	  [10] .got         PROGBITS    200d50 000d50 0002a8 00  WA  0   0  8
	  [11] .bss         NOBITS      201000 000ff8 000840 00  WA  0   0  1

	But there is no 1-page gap.

		PR ld/28743
		* ldlang.c (lang_size_relro_segment_1): Remove the 1-page gap
		before the RELRO segment if the maximum page size >= the maximum
		section alignment.
		* testsuite/ld-i386/pr20830.d: Adjusted.
		* testsuite/ld-s390/gotreloc_64-relro-1.dd: Likewise.
		* testsuite/ld-x86-64/pr14207.d: Likewise.
		* testsuite/ld-x86-64/pr18176.d: Likewise.
		* testsuite/ld-x86-64/pr20830a-now.d: Likewise.
		* testsuite/ld-x86-64/pr20830a.d: Likewise.
		* testsuite/ld-x86-64/pr20830b-now.d: Likewise.
		* testsuite/ld-x86-64/pr20830b.d: Likewise.
		* testsuite/ld-x86-64/pr21038a-now.d: Likewise.
		* testsuite/ld-x86-64/pr21038a.d: Likewise.
		* testsuite/ld-x86-64/pr21038b-now.d: Likewise.
		* testsuite/ld-x86-64/pr21038c-now.d: Likewise.
		* testsuite/ld-x86-64/pr21038c.d: Likewise.

2022-01-13  Nick Clifton  <nickc@redhat.com>

	Synchronize binutils libiberty sources with gcc version.
	+2021-12-30  Lancelot SIX  <lsix@lancelotsix.com>
	+
	+	* cp-demangle.c (d_clone_suffix): Support digits in clone tag
	+	names.
	+	* testsuite/demangle-expected: Check demangling of clone symbols
	+	with digits in name.
	+
	+2021-12-16  H.J. Lu  <hjl.tools@gmail.com>
	+
	+	Revert:
	+	2021-12-16  H.J. Lu  <hjl.tools@gmail.com>
	+
	+	* Makefile.in (AR): Add @AR_PLUGIN_OPTION@
	+	(RANLIB): Add @RANLIB_PLUGIN_OPTION@.
	+	(configure_deps): Depend on ../config/gcc-plugin.m4.
	+	* configure.ac: AC_SUBST AR_PLUGIN_OPTION and
	+	RANLIB_PLUGIN_OPTION.
	+	* aclocal.m4: Regenerated.
	+	* configure: Likewise.
	+
	+2021-12-15  H.J. Lu  <hjl.tools@gmail.com>
	+
	+	* Makefile.in (AR): Add @AR_PLUGIN_OPTION@
	+	(RANLIB): Add @RANLIB_PLUGIN_OPTION@.
	+	(configure_deps): Depend on ../config/gcc-plugin.m4.
	+	* configure.ac: AC_SUBST AR_PLUGIN_OPTION and
	+	RANLIB_PLUGIN_OPTION.
	+	* aclocal.m4: Regenerated.
	+	* configure: Likewise.
	+
	+2021-11-29  Eric Gallager  <egallager@gcc.gnu.org>
	+
	+	PR other/103021
	+	* Makefile.in: Use ETAGS variable in TAGS target.
	+	* configure: Regenerate.
	+	* configure.ac: Allow ETAGS variable to be overridden.
	+
	+2021-11-29  Andrew Pinski  <apinski@marvell.com>
	+
	+	* make-temp-file.c (try_dir): Check to see if the dir
	+	is actually a directory.
	+
	+2021-10-22  Eric Gallager  <egallager@gcc.gnu.org>
	+
	+	PR other/102663
	+	* Makefile.in: Allow dvi-formatted documentation
	+	to be installed.
	+
	+2021-10-17  Lu?s Ferreira  <contact@lsferreira.net>
	+
	+	PR d/102618
	+	* d-demangle.c (dlang_parse_qualified): Handle anonymous
	+	symbols correctly.
	+	* testsuite/d-demangle-expected: New tests to cover anonymous
	+	symbols.
	+
	+2021-10-14  Lu?s Ferreira  <contact@lsferreira.net>
	+
	+	* testsuite/d-demangle-expected: Add test case for function literals.
	+
	+2021-10-14  Lu?s Ferreira  <contact@lsferreira.net>
	+
	+	* testsuite/d-demangle-expected: Add test cases for simple special
	+	mangles.
	+
	+2021-10-12  Lu?s Ferreira  <contact@lsferreira.net>
	+
	+	* d-demangle.c (dlang_parse_qualified): Remove redudant parenthesis
	+	around lhs and rhs of assignments.
	+
	+2021-10-01  Lu?s Ferreira  <contact@lsferreira.net>
	+
	+	* testsuite/d-demangle-expected: Add missing format for new test
	+
	+2021-09-23  Lu?s Ferreira  <contact@lsferreira.net>
	+
	+	* d-demangle.c (dlang_Type): Validate MANGLED is nonnull.
	+	* testsuite/d-demangle-expected: New test.
	+
	+2021-09-23  Lu?s Ferreira  <contact@lsferreira.net>
	+
	+	* d-demangle.c (dlang_symbol_backref): Ensure strlen of
	+	string is less than length computed by dlang_number.
	+
	+2021-09-01  Iain Sandoe  <iain@sandoe.co.uk>

	 	* configure: Regenerate.
	+	* configure.ac: Do not search for sbrk on Darwin.
	+	* xmalloc.c: Do not declare sbrk unless it has been found
	+	by configure.
	+
	+2021-08-29  Iain Buclaw  <ibuclaw@gdcproject.org>
	+
	+	* d-demangle.c (dlang_identifier): Skip over fake parent manglings.
	+	* testsuite/d-demangle-expected: Add tests.
	+
	+2021-08-29  Iain Buclaw  <ibuclaw@gdcproject.org>
	+
	+	* d-demangle.c (dlang_parse_arrayliteral): Add 'info' parameter.
	+	(dlang_parse_assocarray): Likewise.
	+	(dlang_parse_structlit): Likewise.
	+	(dlang_value): Likewise.  Handle function literal symbols.
	+	(dlang_template_args): Pass 'info' to dlang_value.
	+	* testsuite/d-demangle-expected: Add new test.
	+
	+2021-08-29  Iain Buclaw  <ibuclaw@gdcproject.org>
	+
	+	* d-demangle.c (dlang_attributes): Handle typeof(*null).
	+	(dlang_type): Likewise.  Demangle 'n' as typeof(null).
	+	* testsuite/d-demangle-expected: Update tests.
	+
	+2021-08-23  Iain Sandoe  <iain@sandoe.co.uk>
	+
	+	* simple-object-mach-o.c (simple_object_mach_o_write_segment):
	+	Cast the first argument to set_32 as needed.

	-2021-07-03  Nick Clifton  <nickc@redhat.com>
	+2021-08-18  Iain Sandoe  <iain@sandoe.co.uk>

	+	* simple-object-mach-o.c (simple_object_mach_o_write_segment):
	+	Arrange to swap the LTO index tables where needed.
	 # Please enter the commit message for your changes. Lines starting

2022-01-13  Andrew Burgess  <aburgess@redhat.com>

	gdb: don't use -Wmissing-prototypes with g++
	This commit aims to not make use of -Wmissing-prototypes when
	compiling with g++.

	Use of -Wmissing-prototypes was added with this commit:

	  commit a0761e34f054767de6d6389929d27e9015fb299b
	  Date:   Wed Mar 11 15:15:12 2020 -0400

	      gdb: enable -Wmissing-prototypes warning

	Because clang can provide helpful warnings with this flag.
	Unfortunately, g++ doesn't accept this flag, and will give this
	warning:

	  cc1plus: warning: command line option ‘-Wmissing-prototypes’ is valid for C/ObjC but not for C++

	In theory the fact that this flag is not supported should be detected
	by the configure check in gdbsupport/warning.m4, but for users of
	ccache, this check doesn't work due to a long standing ccache issue:

	  https://github.com/ccache/ccache/issues/738

	The ccache problem is that -W... options are reordered on the command
	line, and so -Wmissing-prototypes is seen before -Werror.  Usually
	this doesn't matter, but the above warning (about the flag not being
	valid) is issued before the -Werror flag is processed, and so is not
	fatal.

	There have been two previous attempts to fix this that I'm aware of.
	The first is:

	  https://sourceware.org/pipermail/gdb-patches/2021-September/182148.html

	In this attempt, instead of just relying on a compile to check if a
	flag is valid, the proposal was to both compile and link.  As linking
	doesn't go through ccache, we don't suffer from the argument
	reordering problem, and the link phase will correctly fail when using
	-Wmissing-prototypes with g++.  The configure script will then disable
	the use of this flag.

	This approach was rejected, and the suggestion was to only add the
	-Wmissing-prototypes flag if we are compiling with gcc.

	The second attempt, attempts this approach, and can be found here:

	  https://sourceware.org/pipermail/gdb-patches/2021-November/183076.html

	This attempt only adds the -Wmissing-prototypes flag is the value of
	GCC is not 'yes'.  This feels like it is doing the right thing,
	unfortunately, the GCC flag is really a 'is gcc like' flag, not a
	strict, is gcc check.  As such, GCC is set to 'yes' for clang, which
	would mean the flag was not included for clang or gcc.  The entire
	point of the original commit was to add this flag for clang, so
	clearly the second attempt is not sufficient either.

	In this new attempt I have added gdbsupport/compiler-type.m4, this
	file defines AM_GDB_COMPILER_TYPE.  This macro sets the variable
	GDB_COMPILER_TYPE to either 'gcc', 'clang', or 'unknown'.  In future
	the list of values might be extended to cover other compilers, if this
	is ever useful.

	I've then modified gdbsupport/warning.m4 to only add the problematic
	-Wmissing-prototypes flag if GDB_COMPILER_TYPE is not 'gcc'.

	I've tested this with both gcc and clang and see the expected results,
	gcc no longer attempts to use the -Wmissing-prototypes flag, while
	clang continues to use it.

	When compiling using ccache, I am no longer seeing the warning.

2022-01-13  Andrew Burgess  <aburgess@redhat.com>

	gdb: add some extra debug information to attach_command
	While working on another patch I wanted to add some extra debug
	information to the attach_command function.  This required me to add a
	new function to convert the thread_info::state variable to a string.

	The new debug might be useful to others, and the state to string
	function might be useful in other locations, so I thought I'd merge
	it.

2022-01-13  Alan Modra  <amodra@gmail.com>

	Re: gas: add visibility support using GNU syntax on XCOFF
	tc-ppc.c: In function 'ppc_comm':
	tc-ppc.c:4560:40: error: 'visibility' may be used uninitialized in this function [-Werror=maybe-uninitialized]

	With that fixed we hit lots of segfaults in the ld testsuite.

		PR 22085
	bfd/
		* xcofflink.c (xcoff_link_input_bfd): Don't segfault on NULL
		sym_hash.
	gas/
		* config/tc-ppc.c (ppc_comm): Init visibility.

2022-01-13  Alan Modra  <amodra@gmail.com>

	dt-relr.exp --no-as-needed
	Otherwise the very simple test may not be linked with libc.so at all,
	and thus correctly have no version reference added.  Causing failure
	of the dt-relr-glibc-1b.so test.

		* testsuite/ld-elf/dt-relr.exp: Link with --no-as-needed.

2022-01-13  Alan Modra  <amodra@gmail.com>

	Correct .relr.dyn nocombreloc script
		* scripttempl/elf.sc (.relr.dyn): Don't depend on $COMBRELOC.

2022-01-13  Alan Modra  <amodra@gmail.com>

	testsuite supports_dt_relr
	Tidy, and fix "FAIL: Build dt-relr-glibc-1b.so" on all non-x86
	linux targets.

	binutils/
		* binutils-common.exp (supports_dt_relr): New proc.
	ld/
		* testsuite/config/default.exp (DT_RELR_LDFLAGS, NO_DT_RELR_LDFLAGS),
		(DT_RELR_CC_LDFLAGS, NO_DT_RELR_CC_LDFLAGS): Use supports_dt_relr.
		* testsuite/ld-elf/dt-relr.exp: Don't run unless supports_dt_relr.
		* testsuite/ld-elf/dt-relr-1a.d: Likewise.
		* testsuite/ld-elf/dt-relr-1b.d: Likewise.
		* testsuite/ld-elf/dt-relr-1c.d: Likewise.
		* testsuite/ld-elf/dt-relr-2a.d: Likewise.
		* testsuite/ld-elf/dt-relr-2b.d: Likewise.
		* testsuite/ld-elf/dt-relr-2c.d: Likewise.
		* testsuite/ld-elf/dt-relr-2d.d: Likewise.
		* testsuite/ld-elf/dt-relr-2e.d: Likewise.
		* testsuite/ld-elf/dt-relr-2f.d: Likewise.
		* testsuite/ld-elf/dt-relr-2g.d: Likewise.
		* testsuite/ld-elf/dt-relr-2h.d: Likewise.
		* testsuite/ld-elf/dt-relr-3a.d: Likewise.
		* testsuite/ld-elf/dt-relr-3b.d: Likewise.

2022-01-13  Alan Modra  <amodra@gmail.com>

	Don't use C++ comments in assembly
	It might seem to work, but only if '/' is a start of comment char.

		* testsuite/ld-elf/dt-relr-1.s: Use # for comment.
		* testsuite/ld-elf/dt-relr-2.s: Likewise.
		* testsuite/ld-elf/dt-relr-3.s: Likewise.

2022-01-13  Alan Modra  <amodra@gmail.com>

	Move DT_RELR tag setting to elflink.c
	This makes the code setting DT_RELR tags generally available.  Many
	targets will be able to use the defaults.  Those that can't should set
	up sh_entsize for .relr.dyn output section before reaching the dynamic
	tag code in bfd_elf_final_link.

		* elflink.c (bfd_elf_final_link): Set up DT_RELR tags and sh_entsize.
		* elfxx-x86.c (_bfd_x86_elf_finish_dynamic_sections): Don't do any
		of that here.

2022-01-13  Alan Modra  <amodra@gmail.com>

	Re: Set SEC_ELF_REVERSE_COPY earlier
	Let's not rely on .init/.fini having relocs for the size sanity check.
	This is mainly to squash reports of "my fuzzed object made ld hang".

2022-01-13  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: testsuite: make string[] type as char in gdb.base/charset.c
	This reverts the commit ff656e2e1cb1 ("gdb: testsuite: fix failed
	testcases in gdb.base/charset.exp").

	The original test code has no problem. On an architecture where
	char is signed, then both 'A' and ebcdic_us_string[7] will yield
	-63, which makes the equality true. On an architecture where char
	is unsigned, then both 'A' and ebcdic_us_string[7] will yield 193,
	which also makes the equality true.

	The test cases only failed on LoongArch. The default type of char
	is signed char on LoongArch, like x86-64. But when use gdb print
	command on LoongArch, the default type of char is unsigned char,
	this is wrong, I will look into it later, sorry for that.

	On LoongArch:

	  $ cat test_char.c
	  #include <stdio.h>

	  int main()
	  {
	          char c1 = 193;
	          unsigned char c2 = 193;

	          printf("%d\n", c1);
	          printf("%d\n", c1 == c2);

	          return 0;
	  }
	  $ gcc test_char.c -o test_char
	  $ ./test_char
	  -63
	  0

	  (gdb) set target-charset EBCDIC-US
	  (gdb) print 'A'
	  $1 = 193 'A'
	  (gdb) print /c 'A'
	  $2 = 193 'A'
	  (gdb) print /u 'A'
	  $3 = 193
	  (gdb) print /d 'A'
	  $4 = -63
	  (gdb) print /x 'A'
	  $5 = 0xc1

2022-01-13  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-12  Carl Love  <cel@us.ibm.com>

	gdb Power 9 add test for HW watchpoint support.
	The Power 9 processor revision 2.2 has HW watchpoint support disabled due
	to a HW bug.  The support is fixed in Power 9 processor revision 2.3.  This
	patch add a test to lib/gdb.exp for Power to determine if the processor
	supports HW watchpoints or not.  If the Power processor doesn't support HW
	watchpoints the proceedure skip_hw_watchpoint_tests will return 1 to
	disable the various HW watchpoint tests.

	The patch has been tested on Power 9, processor revesions 2.2 and 2.3.  The
	patch has also been tested on Power 10.  No regression test failures were
	found.

2022-01-12  Andrew Burgess  <aburgess@redhat.com>

	gdb/python: add gdb.host_charset function
	We already have gdb.target_charset and gdb.target_wide_charset.  This
	commit adds gdb.host_charset along the same lines.

2022-01-12  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

	gdb/testsuite: fix gdb.python/py-events.exp for finding process id
	When executed with --target_board=native-extended-gdbserver, the
	gdb.python/py-events.exp test errors out with

	  ERROR: tcl error sourcing /path/to/gdb/testsuite/gdb.python/py-events.exp.
	  ERROR: can't read "process_id": no such variable
	      while executing
	  "lappend expected "ptid: \\($process_id, $process_id, 0\\)" "address: $addr""
	      (file "/path/to/gdb/testsuite/gdb.python/py-events.exp" line 103)
	      invoked from within
	  "source /path/to/gdb/testsuite/gdb.python/py-events.exp"
	      ("uplevel" body line 1)
	      invoked from within
	  "uplevel #0 source /path/to/gdb/testsuite/gdb.python/py-events.exp"
	      invoked from within
	  "catch "uplevel #0 source $test_file_name""

	There are multiple problems around this:

	1. The process_id variable is not initialized to a default value.

	2. The test attempts to find the PID of the current thread, but the
	   regexp that it uses is not tailored for the output printed by the
	   remote target.

	3. The test uses "info threads" to find the current thread PID.
	   Using the "thread" command instead is simpler.

	Fix these problems.

2022-01-12  Tom Tromey  <tromey@adacore.com>

	Don't mention "serial" in target remote description
	PR remote/9177 points out that "info files" mentions "serial" a couple
	of times:

	    Remote serial target in gdb-specific protocol:
	    Debugging a target over a serial line.

	However, often the remote target isn't really a serial connection.

	It seems to me that this text could be a bit clearer; and furthermore
	since "info files" prints the target's long description,
	remote_target::files_info doesn't really add much and can simply be
	removed.

	Regression tested on x86-64 Fedora 34.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=9177

2022-01-12  H.J. Lu  <hjl.tools@gmail.com>

	ld: Add glibc dependency for DT_RELR
	When DT_RELR is enabled, to avoid random run-time crash with older glibc
	binaries without DT_RELR support, add a GLIBC_ABI_DT_RELR symbol version,
	which is provided by glibc with DT_RELR support, dependency on the shared
	C library if it provides a GLIBC_2.XX symbol version.

	bfd/

		* elflink.c (elf_link_add_dt_relr_dependency): New function.
		(bfd_elf_size_dynamic_sections): Call
		elf_link_add_dt_relr_dependency if DT_RELR is enabled.

	ld/

		* ld.texi: Mention GLIBC_ABI_DT_RELR in -z pack-relative-relocs
		entry.
		* testsuite/ld-elf/dt-relr-glibc-1.c: New file.
		* testsuite/ld-elf/dt-relr-glibc-1a.rd: Likewise.
		* testsuite/ld-elf/dt-relr-glibc-1b.rd: Likewise.
		* testsuite/ld-elf/dt-relr.exp: Likewise.

2022-01-12  H.J. Lu  <hjl.tools@gmail.com>

	ld: Add simple DT_RELR tests
		* testsuite/ld-elf/dt-relr-1.s: New file.
		* testsuite/ld-elf/dt-relr-1a.d: Likewise.
		* testsuite/ld-elf/dt-relr-1b.d: Likewise.
		* testsuite/ld-elf/dt-relr-1c.d: Likewise.
		* testsuite/ld-elf/dt-relr-2.s: Likewise.
		* testsuite/ld-elf/dt-relr-2a.d: Likewise.
		* testsuite/ld-elf/dt-relr-2b.d: Likewise.
		* testsuite/ld-elf/dt-relr-2c.d: Likewise.
		* testsuite/ld-elf/dt-relr-2d.d: Likewise.
		* testsuite/ld-elf/dt-relr-2e.d: Likewise.
		* testsuite/ld-elf/dt-relr-2f.d: Likewise.
		* testsuite/ld-elf/dt-relr-2g.d: Likewise.
		* testsuite/ld-elf/dt-relr-2h.d: Likewise.
		* testsuite/ld-elf/dt-relr-3.s: Likewise.
		* testsuite/ld-elf/dt-relr-3a.d: Likewise.
		* testsuite/ld-elf/dt-relr-3b.d: Likewise.
		* testsuite/ld-i386/dt-relr-1.s: Likewise.
		* testsuite/ld-i386/dt-relr-1a.d: Likewise.
		* testsuite/ld-i386/dt-relr-1b.d: Likewise.
		* testsuite/ld-x86-64/dt-relr-1a-x32.d: Likewise.
		* testsuite/ld-x86-64/dt-relr-1a.d: Likewise.
		* testsuite/ld-x86-64/dt-relr-1b-x32.d: Likewise.
		* testsuite/ld-x86-64/dt-relr-1b.d: Likewise.
		* testsuite/ld-x86-64/dt-relr-1.s: Likewise.
		* testsuite/ld-i386/i386.exp: Run dt-relr-1a and dt-relr-1b.
		* testsuite/ld-x86-64/x86-64.exp: Run dt-relr-1a, dt-relr-1a-x32
		dt-relr-1b and dt-relr-1b-x32.

2022-01-12  H.J. Lu  <hjl.tools@gmail.com>

	x86: Add DT_RELR support
	DT_RELR is implemented with linker relaxation:

	1. During linker relaxation, we scan input relocations with the same
	logic in relocate_section to determine if a relative relocation should
	be generated and save the relative relocation candidate information for
	sizing the DT_RELR section later after all symbols addresses can be
	determined.  For these relative relocations which can't be placed in
	the DT_RELR section, they will be placed in the rela.dyn/rel.dyn
	section.
	2. When DT_RELR is enabled, _bfd_elf_map_sections_to_segments calls a
	backend function to size the DT_RELR section which will compute the
	DT_RELR section size and tell ldelf_map_segments to layout sections
	again when the DT_RELR section size has been increased.
	3. After regular symbol processing is finished, bfd_elf_final_link calls
	a backend function to finish the DT_RELR section.

		* elf32-i386.c (elf_i386_relocate_section): Don't generate
		relative relocation when DT_RELR is enabled.
		(elf_i386_finish_dynamic_symbol): Likewise.
		* elf64-x86-64.c (elf_x86_64_relocate_section): Don't generate
		relative relocation when DT_RELR is enabled.
		(elf_x86_64_finish_dynamic_symbol): Likewise.
		* elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
		relative_r_type, relative_r_name, elf_append_reloc,
		elf_write_addend and elf_write_addend_in_got.
		(elf_x86_relative_reloc_record_add): New function.
		(_bfd_x86_elf_link_relax_section): Likewise.
		(elf64_dt_relr_bitmap_add): Likewise.
		(elf32_dt_relr_bitmap_add): Likewise.
		(_bfd_elf32_write_addend): Likewise.
		(_bfd_elf64_write_addend): Likewise.
		(elf_x86_size_or_finish_relative_reloc): Likewise.
		(elf_x86_compute_dl_relr_bitmap): Likewise.
		(elf_x86_write_dl_relr_bitmap): Likewise.
		(elf_x86_relative_reloc_compare ): Likewise.
		(_bfd_elf_x86_size_relative_relocs): Likewise.
		(_bfd_elf_x86_finish_relative_relocs): Likewise.
		(_bfd_x86_elf_size_dynamic_sections): Skip the .relr.dyn section.
		(_bfd_x86_elf_finish_dynamic_sections): Convert 3 spare dynamic
		tags to DT_RELR, DT_RELRSZ and for compact relative relocation.
		* elfxx-x86.h (X86_64_GOT_TYPE_P): New.
		(I386_GOT_TYPE_P): Likewise.
		(X86_GOT_TYPE_P): Likewise.
		(X86_64_RELATIVE_RELOC_TYPE_P): Likewise.
		(I386_RELATIVE_RELOC_TYPE_P): Likewise.
		(X86_RELATIVE_RELOC_TYPE_P): Likewise.
		(X86_LOCAL_GOT_RELATIVE_RELOC_P): Likewise.
		(I386_PCREL_TYPE_P): Likewise.
		(X86_64_PCREL_TYPE_P): Likewise.
		(X86_64_NEED_DYNAMIC_RELOC_TYPE_P): Rewrite.
		(I386_NEED_DYNAMIC_RELOC_TYPE_P): Likewise.
		(GENERATE_DYNAMIC_RELOCATION_P): Also check rel_from_abs.
		(elf_x86_link_hash_entry): Add got_relative_reloc_done.
		(elf_x86_relative_reloc_record): New.
		(elf_x86_relative_reloc_data): Likewise.
		(elf_dt_relr_bitmap): Likewise.
		(elf_x86_link_hash_table): Add dt_relr_bitmap, relative_reloc,
		unaligned_relative_reloc, relative_r_type, relative_r_name,
		elf_append_reloc, elf_write_addend, elf_write_addend_in_got and
		relative_reloc_done.
		(elf_x86_relative_reloc_done): New.
		(relative_reloc_packed): Likewise.
		(_bfd_x86_elf_link_relax_section): Likewise.
		(_bfd_elf_x86_size_relative_relocs): Likewise.
		(_bfd_elf_x86_finish_relative_relocs): Likewise.
		(_bfd_elf32_write_addend): Likewise.
		(_bfd_elf64_write_addend): Likewise.
		(bfd_elf32_bfd_relax_section): Likewise.
		(bfd_elf64_bfd_relax_section): Likewise.
		(elf_backend_size_relative_relocs): Likewise.
		(elf_backend_finish_relative_relocs): Likewise.
		(elf_x86_allocate_local_got_info): Also allocate
		relative_reloc_done.

2022-01-12  H.J. Lu  <hjl.tools@gmail.com>

	elf: Support DT_RELR in linker tests
	Allow eabling and disabling DT_RELR in linker tests.  Disable DT_RELR in
	linker tests which don't expect DT_RELR in linker outputs.

	binutils/

		* testsuite/lib/binutils-common.exp (run_dump_test): Make
		DT_RELR_LDFLAGS and NO_DT_RELR_LDFLAGS global.

	ld/

		* testsuite/config/default.exp (DT_RELR_LDFLAGS): New.
		(DT_RELR_CC_LDFLAGS): Likewise.
		(NO_DT_RELR_LDFLAGS): Likewise.
		(NO_DT_RELR_CC_LDFLAGS): Likewise.
		* testsuite/ld-elf/shared.exp: Pass $NO_DT_RELR_LDFLAGS to
		linker for some tests.
		* testsuite/ld-i386/export-class.exp: Likewise.
		* testsuite/ld-i386/i386.exp: Likewise.
		* testsuite/ld-i386/ibt-plt-2a.d: Pass $NO_DT_RELR_LDFLAGS to
		linker.
		* testsuite/ld-i386/ibt-plt-3a.d: Likewise.
		* testsuite/ld-i386/ibt-plt-3c.d: Likewise.
		* testsuite/ld-i386/pr26869.d: Likewise.
		* testsuite/ld-i386/report-reloc-1.d: Likewise.
		* testsuite/ld-ifunc/ifunc-2-i386-now.d: Likewise.
		* testsuite/ld-ifunc/ifunc-2-local-i386-now.d: Likewise.
		* testsuite/ld-ifunc/ifunc-2-local-x86-64-now.d: Likewise.
		* testsuite/ld-ifunc/ifunc-2-x86-64-now.d: Likewise.
		* testsuite/ld-ifunc/pr17154-x86-64.d: Likewise.
		* testsuite/ld-x86-64/bnd-branch-1-now.d: Likewise.
		* testsuite/ld-x86-64/bnd-ifunc-1-now.d: Likewise.
		* testsuite/ld-x86-64/bnd-ifunc-2-now.d: Likewise.
		* testsuite/ld-x86-64/bnd-ifunc-2.d: Likewise.
		* testsuite/ld-x86-64/bnd-plt-1-now.d: Likewise.
		* testsuite/ld-x86-64/bnd-plt-1.d: Likewise.
		* testsuite/ld-x86-64/ibt-plt-2a-x32.d: Likewise.
		* testsuite/ld-x86-64/ibt-plt-2a.d: Likewise.
		* testsuite/ld-x86-64/ibt-plt-3a-x32.d: Likewise.
		* testsuite/ld-x86-64/ibt-plt-3a.d: Likewise.
		* testsuite/ld-x86-64/ilp32-4.d: Likewise.
		* testsuite/ld-x86-64/load1c.d: Likewise.
		* testsuite/ld-x86-64/load1d.d: Likewise.
		* testsuite/ld-x86-64/pr13082-2b.d: Likewise.
		* testsuite/ld-x86-64/pr14207.d: Likewise.
		* testsuite/ld-x86-64/pr18176.d: Likewise.
		* testsuite/ld-x86-64/pr19162.d: Likewise.
		* testsuite/ld-x86-64/pr19636-2d.d: Likewise.
		* testsuite/ld-x86-64/pr19636-2l.d: Likewise.
		* testsuite/ld-x86-64/pr20253-1d.d: Likewise.
		* testsuite/ld-x86-64/pr20253-1f.d: Likewise.
		* testsuite/ld-x86-64/pr20253-1j.d: Likewise.
		* testsuite/ld-x86-64/pr20253-1l.d: Likewise.
		* testsuite/ld-x86-64/report-reloc-1-x32.d: Likewise.
		* testsuite/ld-x86-64/report-reloc-1.d: Likewise.
		* testsuite/ld-x86-64/export-class.exp (x86_64_export_class_test):
		Pass $NO_DT_RELR_LDFLAGS to linker.
		* testsuite/ld-x86-64/x86-64.exp: Pass $NO_DT_RELR_LDFLAGS to
		linker for some tests.

2022-01-12  H.J. Lu  <hjl.tools@gmail.com>

	elf: Add size_relative_relocs and finish_relative_relocs
	On some targets, the DT_RELR section size can be computed only after all
	symbols addresses can be determined.  Set the preliminary DT_RELR section
	size before mapping sections to segments and set the final DT_RELR section
	size after regular symbol processing is done.

		* elf-bfd.h (elf_backend_data): Add size_relative_relocs and
		finish_relative_relocs.
		* elf.c (_bfd_elf_map_sections_to_segments): Call
		size_relative_relocs if DT_RELR is enabled.
		* elflink.c (bfd_elf_final_link): Call finish_relative_relocs
		after regular symbol processing is finished if DT_RELR is enabled.
		* elfxx-target.h (elf_backend_size_relative_relocs): New.
		(elf_backend_finish_relative_relocs): Likewise.
		(elfNN_bed): Add elf_backend_size_relative_relocs and
		elf_backend_finish_relative_relocs.

2022-01-12  H.J. Lu  <hjl.tools@gmail.com>

	ld: Initial DT_RELR support
	Add a -z pack-relative-relocs option to enable DT_RELR and create a
	relr.dyn section for DT_RELR.  DT_RELR is implemented with the linker
	relaxation infrastructure, but it doesn't require the --relax option
	enabled.  -z pack-relative-relocs implies -z combreloc.  -z nocombreloc
	implies -z nopack-relative-relocs.

	-z pack-relative-relocs is chosen over the similar option in lld,
	--pack-dyn-relocs=relr, to implement a glibc binary lockout mechanism
	with a special glibc version symbol, to avoid random crashes of DT_RELR
	binaries with the existing glibc binaries.

	bfd/

		* elf-bfd.h (elf_link_hash_table): Add srelrdyn.
		* elflink.c (_bfd_elf_link_create_dynamic_sections): Create a
		.relr.dyn section for DT_RELR.

	include/

		* bfdlink.h (bfd_link_info): Add enable_dt_relr.

	ld/

		* News: Mention -z pack-relative-relocs and
		-z nopack-relative-relocs.
		* ld.texi: Document -z pack-relative-relocs and
		-z nopack-relative-relocs.
		* ldelf.c (ldelf_after_parse): Disable DT_RELR if not building
		PIE nor shared library.  Add 3 spare dynamic tags for DT_RELR,
		DT_RELRSZ and DT_RELRENT.
		* ldlang.c (lang_relax_sections): Also enable relaxation if
		DT_RELR is enabled.
		* emulparams/elf32_x86_64.sh: Source dt-relr.sh.
		* emulparams/elf_i386.sh: Likewise.
		* emulparams/elf_x86_64.sh: Likewise.
		* emulparams/dt-relr.sh: New file.
		* scripttempl/elf.sc: Support .relr.dyn.

2022-01-12  H.J. Lu  <hjl.tools@gmail.com>

	elf: Pass need_layout to _bfd_elf_map_sections_to_segments
	On some targets, the DT_RELR section size can be computed only after all
	symbols addresses can be determined.  Update ldelf_map_segments to pass
	need_layout to _bfd_elf_map_sections_to_segments which will size DT_RELR
	section and set need_layout to true if the DT_RELR section size is changed.

	bfd/

		* elf-bfd.h (_bfd_elf_map_sections_to_segments): Add a bool
		pointer argument.
		* elf.c (_bfd_elf_map_sections_to_segments): Add a bool pointer
		argument to indicate if section layout needs update.
		(assign_file_positions_for_load_sections): Pass NULL to
		_bfd_elf_map_sections_to_segments.
		* elflink.c (_bfd_elf_strip_zero_sized_dynamic_sections): Pass
		NULL to _bfd_elf_map_sections_to_segments.

	ld/

		* ldelfgen.c (ldelf_map_segments): Pass &need_layout to
		_bfd_elf_map_sections_to_segments.

2022-01-12  H.J. Lu  <hjl.tools@gmail.com>

	elf: Add .relr.dyn to special_sections_r
		* elf.c (special_sections_r): Add .relr.dyn.

2022-01-12  Andrew Burgess  <aburgess@redhat.com>

	gdb: add 'maint set/show gnu-source-highlight enabled' command
	In a later commit I want to address an issue with the Python pygments
	based code styling solution.  As this approach is only used when the
	GNU Source Highlight library is not available, testing bugs in this
	area can be annoying, as it requires GDB to be rebuilt with use of GNU
	Source Highlight disabled.

	This commit adds a pair of new maintenance commands:

	  maintenance set gnu-source-highlight enabled on|off
	  maintenance show gnu-source-highlight enabled

	these commands can be used to disable use of the GNU Source Highlight
	library, allowing me, in a later commit, to easily test bugs that
	would otherwise be masked by GNU Source Highlight being used.

	I made this a maintenance command, rather than a general purpose
	command, as it didn't seem like this was something a general user
	would need to adjust.  We can always convert the maintenance command
	to a general command later if needed.

	There's no test for this here, but this feature will be used in a
	later commit.

2022-01-12  Andrew Burgess  <aburgess@redhat.com>

	gdb: erase items from the source_cache::m_offset_cache
	The source_cache class has two member variables m_source_map, which
	stores the file contents, and m_offset_cache, which stores offsets
	into the file contents.

	As source files are read the contents of the file, as well as the
	offset data, are stored in the cache using these two member variables.

	Whenever GDB needs either the files contents, or the offset data,
	source_cache::ensure is called.  This function looks for the file in
	m_source_map, and if it's found then this implies the file is also in
	m_offset_cache, and we're done.

	If the file is not in m_source_map then GDB calls
	source_cache::get_plain_source_lines to open the file and read its
	contents.  ::get_plain_source_lines also calculates the offset data,
	which is then inserted into m_offset_cache.

	Back in ::ensure, the file contents are added into m_source_map.  And
	finally, if m_source_map contains more than MAX_ENTRIES, an entry is
	removed from m_source_map.

	The problem is entries are not removed from m_offset_cache at the same
	time.

	This means that if a program contains enough source files, GDB will
	hold at most MAX_ENTRIES cached source file contents, but can contain
	offsets data for every source file.

	Now, the offsets data is going to be smaller than the cached file
	contents, so maybe there's no harm here.  But, when we reload the file
	contents we always recalculate the offsets data.  And, when we
	::get_line_charpos asking for offset data we still call ::ensure which
	will ends up loading and caching the file contents.

	So, given the current code does the work of reloading the offset data
	anyway, we may as well save memory by capping m_offset_cache to
	MAX_ENTRIES just like we do m_source_map.

	That's what this commit does.

	There should be no user visible changes after this commit, except for
	ever so slightly lower memory usage in some cases.

2022-01-12  Andrew Burgess  <aburgess@redhat.com>

	gdb: new 'maint flush source-cache' command
	This commit adds a new 'maint flush source-cache' command, this
	flushes the cache of source file contents.

	After flushing GDB is forced to reread source files the next time any
	source lines are to be displayed.

	I've added a test for this new feature.  The test is a little weird,
	in that it modifies a source file after compilation, and makes use of
	the cache flush so that the changes show up when listing the source
	file.  I'm not sure when such a situation would ever crop up in real
	life, but maybe we can imagine such cases.

	In reality, this command is useful for testing the syntax highlighting
	within GDB, we can adjust the syntax highlighting settings, flush the
	cache, and then get the file contents re-highlighted using the new
	settings.

2022-01-12  Andrew Burgess  <aburgess@redhat.com>

	gdb: rename lin-lwp to linux-nat in set/show debug
	Rename 'set debug lin-lwp' to 'set debug linux-nat' and 'show debug
	lin-lwp' to 'show debug linux-nat'.

	I've updated the documentation and help text to match, as well as
	making it clear that the debug that is coming out relates to all
	aspects of Linux native inferior support, not just the LWP aspect of
	it.

	The boundary between general "native" target debug, and the lwp
	specific part of that debug was always a little blurry, but the actual
	debug variable inside GDB is debug_linux_nat, and the print routine
	linux_nat_debug_printf, is used throughout the linux-nat.c file, not
	just for lwp related debug, so the new name seems to make more sense.

2022-01-12  Clément Chigot  <clement.chigot@atos.net>

	ld: add hidden and internal visibility support for XCOFF
	This patch adds a primary support for hidden and internal visibility in
	GNU linker for XCOFF format.
	The protected visibility isn't yet supported.

	PR 22085

	bfd/ChangeLog:

		* xcofflink.c (xcoff_dynamic_definition_p): Add hidden
		  and internal visibility support.
		(xcoff_link_add_symbols): Likewise.
		(xcoff_auto_export_p): Likewise.
		(bfd_xcoff_export_symbol): Likewise.
		(xcoff_link_input_bfd): Likewise.

	ld/ChangeLog:

		* testsuite/ld-vsb/main.c: Adapt for XCOFF.
		* testsuite/ld-vsb/sh1.c: Likewse.
		* testsuite/ld-vsb/vsb.exp: Likewise.
		* testsuite/ld-vsb/visibility-1-xcoff-32.d: New test.
		* testsuite/ld-vsb/visibility-1-xcoff-64.d: New test.
		* testsuite/ld-vsb/visibility-2-xcoff-32.d: New test.
		* testsuite/ld-vsb/visibility-2-xcoff-64.d: New test.
		* testsuite/ld-vsb/xcoffvsb.dat: New test.

2022-01-12  Clément Chigot  <clement.chigot@atos.net>

	ld/testsuite: prepare ld-elfvsb to support XCOFF
	A following patch will add visibility support in ld for XCOFF. Thus,
	ld-elfvsb is renamed ld-vsb and a suffix is added to files targeting only
	ELF format.

	ld/ChangeLog:

		* testsuite/ld-elfvsb: rename as ld-vsb.
		* testsuite/ld-elfvsb/hidden0.d: move to ld-vsb and rename with
		  suffix -elf.d.
		* testsuite/ld-elfvsb/hidden1.d: Likewise.
		* testsuite/ld-elfvsb/hidden2.d: Likewise.
		* testsuite/ld-elfvsb/internal0.d: Likewise.
		* testsuite/ld-elfvsb/internal1.d: Likewise.
		* testsuite/ld-elfvsb/protected0.d: Likewise.
		* testsuite/ld-elfvsb/protected1.d: Likewise.

2022-01-12  Clément Chigot  <clement.chigot@atos.net>

	gas: add visibility support using GNU syntax on XCOFF
	In order to ease port of GNU assembly code and especially ld testsuite,
	this patch allows XCOFF to accept the usual GNU syntax for visibility.

	PR 22085

	gas/ChangeLog:

		* config/tc-ppc.c (ppc_GNU_visibility): New function.
		* testsuite/gas/ppc/aix.exp: Add new tests.
		* testsuite/gas/ppc/xcoff-visibility-2-32.d: New test.
		* testsuite/gas/ppc/xcoff-visibility-2-64.d: New test.
		* testsuite/gas/ppc/xcoff-visibility-2.s: New test.

2022-01-12  Clément Chigot  <clement.chigot@atos.net>

	gas: add visibility support for XCOFF
	XCOFF assembly defines the visibility using an additional argument
	on several pseudo-ops: .globl, .weak, .extern and .comm.
	This implies that .globl and .weak syntax is different than the
	usual GNU syntax. But we want to provide compatibility with AIX
	assembler, especially because GCC is generating the visibility
	using this XCOFF syntax.

	PR 22085

	bfd/ChangeLog:

	        * coffcode.h (coff_write_object_contents): Change XCOFF header
	        vstamp field to 2.
	        * coffgen.c (coff_print_symbol): Increase the size for n_type.

	gas/ChangeLog:

	        * config/tc-ppc.c (ppc_xcoff_get_visibility): New function.
	        (ppc_globl): New function.
	        (ppc_weak): New function.
	        (ppc_comm): Add visibility field support.
	        (ppc_extern): Likewise.
	        * testsuite/gas/all/cofftag.d: Adjust to new n_type size
	        providing by objdump.
	        * testsuite/gas/ppc/test1xcoff32.d: Likewise.
	        * testsuite/gas/ppc/aix.exp: Add new tests.
	        * testsuite/gas/ppc/xcoff-visibility-1-32.d: New test.
	        * testsuite/gas/ppc/xcoff-visibility-1-64.d: New test.
	        * testsuite/gas/ppc/xcoff-visibility-1.s: New test.

	include/ChangeLog:

	        * coff/internal.h (SYM_V_INTERNAL, SYM_V_HIDDEN,
	        SYM_V_PROTECTED, SYM_V_EXPORTED, SYM_V_MASK): New defines.
	        * coff/xcoff.h (struct xcoff_link_hash_entry): Add visibility
	        field.

	ld/ChangeLog:

	        * testsuite/ld-pe/pr19803.d: Adjust to new n_type size
	        providing by objdump.

2022-01-12  Hans-Peter Nilsson  <hp@axis.com>

	objdump, readelf: Emit "CU:" format only when wide output is requested
	As pre-approved by Alan in
	https://sourceware.org/pipermail/binutils/2021-September/118019.html
	and I believe people have run into getting testsuite failures for
	test-environments with "long" directory names, at least once more
	since that time.  Enough.  I grepped the gas, binutils and ld
	testsuites for "CU:" to catch target-specific occurrences, but I
	noticed none.  I chose to remove "CU:" on the objdump tests instead of
	changing options to get the wide format, so as to keep the name of the
	test consistent with actual options; but added it to the readelf
	options for the gas test as I believe the "CU:" format is preferable.

	Tested for cris-elf and native x86_64-pc-linux-gnu.

	binutils:
		* dwarf.c (display_debug_lines_decoded): Don't check the
		string length of the directory, instead emit the "CU: dir/name"
		format only if wide output is requested.
		* testsuite/binutils-all/dw5.W, testsuite/binutils-all/objdump.WL:
		Adjust accordingly.

	gas:
		* testsuite/gas/elf/dwarf-5-loc0.d: Add -W to readelf options.

2022-01-12  Alan Modra  <amodra@gmail.com>

	Set SEC_ELF_REVERSE_COPY earlier
	For the sake of DT_RELR.

	bfd/
		* elflink.c (elf_link_input_bfd): Don't set SEC_ELF_REVERSE_COPY
		here.  Move sanity checks to reverse copying code.
	ld/
		* ldlang.c (lang_add_section): Set SEC_ELF_REVERSE_COPY for
		.ctors/.dtors in .init_array/.fini_array.

2022-01-12  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: testsuite: fix wrong comment in gdb.base/charset.c
	In gdb/testsuite/gdb.base/charset.c, use "IBM1047" instead of "EBCDIC"
	to fix the wrong comment.

2022-01-12  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: testsuite: fix failed testcases in gdb.base/charset.exp
	In gdb/testsuite/gdb.base/charset.c, the last argument is greater than 127
	when call fill_run() in EBCDIC-US and IBM1047, but the type of string[] is
	char, this will change the value due to sign extension.

	For example, ebcdic_us_string[7] will be -63 instead of the original 193 in
	EBCDIC-US.

	Make the type of string[] as unsigned char to fix the following six failed
	testcases:

	  $ grep FAIL gdb/testsuite/gdb.sum
	  FAIL: gdb.base/charset.exp: check value of parsed character literal in EBCDIC-US
	  FAIL: gdb.base/charset.exp: check value of parsed string literal in EBCDIC-US
	  FAIL: gdb.base/charset.exp: check value of escape that doesn't exist in EBCDIC-US
	  FAIL: gdb.base/charset.exp: check value of parsed character literal in IBM1047
	  FAIL: gdb.base/charset.exp: check value of parsed string literal in IBM1047
	  FAIL: gdb.base/charset.exp: check value of escape that doesn't exist in IBM1047

2022-01-12  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-11  Fangrui Song  <maskray@google.com>

	ar: Add --thin for creating thin archives
	In many ar implementations (FreeBSD, elfutils, etc), -T has the X/Open
	System Interface specified semantics. Therefore -T for thin archives is
	not recommended for portability. -T is deprecated without diagnostics.

	    PR binutils/28759
	    * ar.c (long_options): Add --thin.
	    (usage) Add --thin. Deprecate -T without diagnostics.
	    * doc/binutils.texi: Add doc.
	    * NEWS: Mention --thin.
	    * binutils/testsuite/binutils-all/ar.exp: Add tests.

2022-01-11  Martin Storsj  <martin@martin.st>

	Fix multiple problems with DLL generation.
	ld	* pe-dll.c (make_head): Prefix the symbol name with the dll name.
		(make_tail, make_one, make_singleton_name_thunk): Likewise.
		(make_import_fixup_entry, make_runtime_pseudo_reloc): Likewise.
		(pe_create_runtime_relocator_reference): Likewise.
		(pe_dll_generate_implib): Set dll_symname_len.
		(pe_process_import_defs): Likewise.

	binutils
		* dlltool.c (main): If a prefix has not been provided, attempt to
		use a deterministic one based upon the dll name.

2022-01-11  Jan Beulich  <jbeulich@suse.com>

	gas/doc: mention quoted symbol names

2022-01-11  Andrew Burgess  <aburgess@redhat.com>

	gdbsupport: regenerate Makefile.in
	I had cause to regenerate gdbsupport/Makefile.in, and noticed some
	unexpected changes in the copyright header dates.

	I suspect that this was caused by the end of year date range update
	process.

	The Makefile.in contains two date ranges.  The first range appears to
	be the date range for the version of automake being used, that is the
	range runs up to 2017 only, when automake 1.15.1 was released.

	The second date range in Makefile.in represents the date range for the
	generated file, and so, now runs up to 2022.

	Anyway, this is the result of running autoreconf (using automake
	1.15.1) in the gdbsupport directory.

2022-01-11  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-10  Clément Chigot  <clement.chigot@atos.net>

	XCOFF: add support for TLS relocations on hidden symbols
	This patch adds support for TLS relocation targeting C_HIDEXT symbols.
	In gas, TLS relocations, except R_TLSM and R_TLMSL, must keep the value
	of their target symbol.
	In ld, it simply ensures that internal TLS symbols are added to the
	linker hash table for xcoff_reloc_type_tls.

	It also improves the tests made by both.

	bfd/ChangeLog:

		* coff-rs6000.c (xcoff_howto_table): Fix name of R_TLSML.
		(xcoff_reloc_type_tls): Replace the error when h is NULL by
		an assert.
		(xcoff_complain_overflow_unsigned_func): Adjust comments.
		* coff64-rs6000.c (xcoff64_howto_table): Fix name of R_TLSML.
		* xcofflink.c (xcoff_link_add_symbols_to_hash_table): New
		function.
		(xcoff_link_add_symbols): Add C_HIDEXT TLS symbols to the linker
		hash table.

	gas/ChangeLog:

		* config/tc-ppc.c (md_apply_fix): Enable support for TLS
		relocation over internal symbols.
		* testsuite/gas/ppc/aix.exp: Replace xcoff-tlms by xcoff-tls.
		* testsuite/gas/ppc/xcoff-tlsm-32.d: Removed.
		* testsuite/gas/ppc/xcoff-tlsm-64.d: Removed.
		* testsuite/gas/ppc/xcoff-tlsm.s: Removed.
		* testsuite/gas/ppc/xcoff-tls-32.d: New test.
		* testsuite/gas/ppc/xcoff-tls-64.d: New test.
		* testsuite/gas/ppc/xcoff-tls.s: New test.

	ld/ChangeLog:

		* testsuite/ld-powerpc/aix52.exp: Improve aix-tls-reloc test.
		* testsuite/ld-powerpc/aix-tls-reloc.s: Likewise.
		* testsuite/ld-powerpc/aix-tls-reloc-32.d: Removed.
		* testsuite/ld-powerpc/aix-tls-reloc-64.d: Removed.
		* testsuite/ld-powerpc/aix-tls-reloc-32.dd: New test.
		* testsuite/ld-powerpc/aix-tls-reloc-32.dt: New test.
		* testsuite/ld-powerpc/aix-tls-reloc-64.dd: New test.
		* testsuite/ld-powerpc/aix-tls-reloc-64.dt: New test.

2022-01-10  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: add Tiezhu Yang to MAINTAINERS

2022-01-10  Tom Tromey  <tom@tromey.com>

	Reduce use of unfiltered output in Darwin code
	The Darwin code uses unfiltered output liberally.  This patch changes
	this code to send some output to gdb_stdlog (in some cases via the use
	of debug_prefixed_printf_cond_nofunc), or to gdb_stderr, or to simply
	switch to filtered output.

	Note that I didn't switch inferior_debug to use
	debug_prefixed_printf_cond_nofunc, because that would affect the
	output by removing the information about the inferior.  I wasn't sure
	if this was important or not, so I left it in.

	v2 of this patch uses warning rather than prints to gdb_stderr, and
	removes some trailing whitespace.

	I can't compile this patch, so it's "best effort".

2022-01-10  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-09  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-08  Andrew Burgess  <aburgess@redhat.com>

	gdb/hurd: handle inferiors exiting
	While testing on GNU/Hurd (i386) I noticed that GDB crashes when an
	inferior exits, with this error:

	  inferior.c:293: internal-error: inferior* find_inferior_pid(process_stratum_target*, int): Assertion `pid != 0' failed.

	The problem appears to be in gnu_nat_target::wait.

	We always set inferior_ptid to null_ptid before calling target_wait,
	this has been the case since the multi-target changes were made to GDB
	in commit:

	  commit 5b6d1e4fa4fc6827c7b3f0e99ff120dfa14d65d2
	  Date:   Fri Jan 10 20:06:08 2020 +0000

	      Multi-target support

	With follow up changes in commit:

	  commit 24ed6739b699f329c2c45aedee5f8c7d2f54e493
	  Date:   Thu Jan 30 14:35:40 2020 +0000

	      gdb/remote: Restore support for 'S' stop reply packet

	Unfortunately, the GNU/Hurd target is still relying on the value of
	inferior_ptid in the case where an inferior exits - we return the
	value of inferior_ptid as the pid of the process that exited.  This
	was fine in the single target world, where inferior_ptid identified
	the one running inferior, but this is no longer good enough.

	Instead, we should return a ptid containing the pid of the process
	that exited, as obtained from the wait event, and this is what this
	commit does.

	I've not run the full testsuite on GNU/Hurd as there appear to be lots
	of other issues with this target that makes running the full testsuite
	very painful, but I think this looks like a small easy improvement.

2022-01-08  Tom Tromey  <tom@tromey.com>

	Add explicit check for nullptr to target_announce_attach
	Lancelot pointed out that target_announce_attach was missing an
	explicit check against nullptr.  This patch adds it.

2022-01-08  Hannes Domani  <ssbssa@yahoo.de>

	Add _sigsys info to siginfo struct
	This patch adds information about _sigsys structure from newer
	kernels, so that $_siginfo decoding can show information about
	_sigsys, making it easier for developers to debug seccomp failures.
	Requested in PR gdb/24283.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=24283

2022-01-08  Tiezhu Yang  <yangtiezhu@loongson.cn>

	gdb: testsuite: show print array-indexes after set in arrayidx.exp
	Add "show print array-indexes" testcases after set print array-indexes
	to off or on.

	Without this patch:

	    PASS: gdb.base/arrayidx.exp: set print array-indexes to off
	    PASS: gdb.base/arrayidx.exp: print array with array-indexes off
	    PASS: gdb.base/arrayidx.exp: set print array-indexes to on
	    PASS: gdb.base/arrayidx.exp: print array with array-indexes on

	With this patch:

	    PASS: gdb.base/arrayidx.exp: set print array-indexes to off
	    PASS: gdb.base/arrayidx.exp: show print array-indexes is off
	    PASS: gdb.base/arrayidx.exp: print array with array-indexes off
	    PASS: gdb.base/arrayidx.exp: set print array-indexes to on
	    PASS: gdb.base/arrayidx.exp: show print array-indexes is on
	    PASS: gdb.base/arrayidx.exp: print array with array-indexes on

2022-01-08  H.J. Lu  <hjl.tools@gmail.com>

	ld: Extract _bfd_elf_link_iterate_on_relocs
	DT_RELR encodes consecutive R_*_RELATIVE relocations in GOT (the global
	offset table) and data sections in a compact format:

	https://groups.google.com/g/generic-abi/c/bX460iggiKg

	On some targets, R_*_RELATIVE relocations are counted and the GOT offsets
	are allocated when setting the dynamic section sizes after seeing all
	relocations.  R_*_RELATIVE relocations are generated while relocating
	sections after section layout has been finalized.

	To prepare for DT_RELR implementation on these targets, extract
	_bfd_elf_link_iterate_on_relocs from _bfd_elf_link_check_relocs so
	that a backend can scan relocations in elf_backend_always_size_sections

	For x86 targets, the old check_relocs is renamed to scan_relocs and a
	new check_relocs is added to chek input sections and create dynamic
	relocation sections so that they will be mapped to output sections.
	scan_relocs is now called from elf_backend_always_size_sections.

	Since relocations are scanned after __start, __stop, .startof. and
	.sizeof. symbols have been finalized on x86, __[start|stop]_SECNAME for
	--gc-sections -z start-stop-gc are now zero when all SECNAME sections
	been garbage collected.  This is no need for elf_x86_start_stop_gc_p.

	bfd/

		* elf-bfd.h (_bfd_elf_link_iterate_on_relocs): New.
		* elf32-i386.c (elf_i386_convert_load_reloc): Don't call
		elf_x86_start_stop_gc_p.
		(elf_i386_check_relocs): Renamed to ...
		(elf_i386_scan_relocs): This.  Don't call
		_bfd_elf_make_dynamic_reloc_section.
		(elf_i386_always_size_sections): New.
		(elf_backend_check_relocs): Removed.
		(elf_backend_always_size_sections): New.
		* elf64-x86-64.c (elf_x86_64_convert_load_reloc): Don't call
		elf_x86_start_stop_gc_p.
		(elf_x86_64_check_relocs): Renamed to ...
		(elf_x86_64_scan_relocs): This.  Don't call
		_bfd_elf_make_dynamic_reloc_section.
		(elf_x86_64_always_size_sections): New.
		(elf_backend_check_relocs): Removed.
		(elf_backend_always_size_sections): New.
		* elflink.c (elf_link_check_or_scan_relocs):
		New.  Extracted from _bfd_elf_link_check_relocs.
		(_bfd_elf_link_check_relocs): Call elf_link_check_or_scan_relocs.
		* elfxx-x86.c (_bfd_x86_elf_check_relocs): New.
		* elfxx-x86.h (X86_64_NEED_DYNAMIC_RELOC_TYPE_P): New.
		(I386_NEED_DYNAMIC_RELOC_TYPE_P): Likewise.
		(X86_NEED_DYNAMIC_RELOC_TYPE_P): Likewise.
		(_bfd_x86_elf_check_relocs): Likewise.
		(elf_backend_check_relocs): Likewise.
		(elf_backend_always_size_sections): Removed.
		(elf_x86_start_stop_gc_p): Likewise.

	ld/

		* testsuite/ld-i386/pr27491-1a.d: Updated.
		* testsuite/ld-x86-64/pr27491-1a.d: Likewise.

2022-01-08  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.mi/mi-catch-load.exp
	When I run the testsuite, I have:

	    Running .../gdb/testsuite/gdb.mi/mi-catch-load.exp ...
	    DUPLICATE: gdb.mi/mi-catch-load.exp: breakpoint at main
	    DUPLICATE: gdb.mi/mi-catch-load.exp: mi runto main

	Fix by grouping the various phases in with_test_prefix blocks.  Since
	the tests now have a prefix, remove the manually written prefixes in
	testnames.

	Also change some messages with the pattern "(timeout) $testname" into
	"$estname (timeout)" since tools will handle this as $testname[1] (which
	is what we want in this particular scenario).

	Tested on x86_64-linux.

	[1] https://sourceware.org/gdb/wiki/GDBTestcaseCookbook#Do_not_use_.22tail_parentheses.22_on_test_messages

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.threads/staticthreads.ex
	When running the testsuite, I have:

	    Running .../gdb/testsuite/gdb.threads/staticthreads.exp ...
	    DUPLICATE: gdb.threads/staticthreads.exp: couldn't compile staticthreads.c: unrecognized error

	Fix by using foreach_with_prefix instead of foreach when preparing the
	test case.

	Testeed on x86_64-linux both in a setup where the test fails to prepare
	and in a setup where the test fails to setup.

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.mi/mi-language.exp
	When running the testsuite, I have:

	    Running .../gdb/testsuite/gdb.mi/mi-language.exp ...
	    DUPLICATE: gdb.mi/mi-language.exp: set lang ada

	This is due to an erroneous explicit test name.  This explicit test name
	also happens to be useless (at least it would have been if it was
	correct) since it only repeats the command, so just remove the explicit
	test name and let the command be used as default test name.  Also remove
	explicit test name at another location in the file since it also just
	repeat the command.

	Tested on x86_64-linux.

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.mi/mi-nonstop-exit.exp
	When running the testsuite, I have:

	    Running .../gdb/testsuite/gdb.mi/mi-nonstop-exit.exp ...
	    DUPLICATE: gdb.mi/mi-nonstop-exit.exp: breakpoint at main
	    DUPLICATE: gdb.mi/mi-nonstop-exit.exp: mi runto main

	This test runs the same sequence of operations twice.  Refactor the code
	by running both of those sequences within a foreach_with_prefix block to
	ensure that the commands have unique test names.

	Tested on x86_64-linux.

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.mi/mi-nonstop.exp
	When running the testsuite, I have:

	    Running .../gdb/testsuite/gdb.mi/mi-nonstop.exp ...
	    DUPLICATE: gdb.mi/mi-nonstop.exp: check varobj, w1, 1
	    DUPLICATE: gdb.mi/mi-nonstop.exp: stacktrace of stopped thread

	Fix by adjusting the problematic test names.

	Tested on x86_64-linux.

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.mi/mi-nsthrexec.exp
	When running the testsuite, I have:

	    Running .../gdb/testsuite/gdb.mi/mi-nsthrexec.exp ...
	    DUPLICATE: gdb.mi/mi-nsthrexec.exp: breakpoint at main

	Fix by adjusting the duplicated test name.

	Tested on x86_64-linux.

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.base/watchpoints.exp
	When running the testsuite, I have:

	    Running ../gdb/testsuite/gdb.base/watchpoints.exp ...
	    DUPLICATE: gdb.base/watchpoints.exp: watchpoint hit, first time

	Fix by adjusting the test names where appropriate.

	Tested on x86_64-linux.

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.base/nested-subp2.exp
	When running the testsuite, I have:

	    Running .../gdb/testsuite/gdb.base/nested-subp2.exp ...
	    DUPLICATE: gdb.base/nested-subp2.exp: continue to the STOP marker
	    DUPLICATE: gdb.base/nested-subp2.exp: print c
	    DUPLICATE: gdb.base/nested-subp2.exp: print count

	Fix by using with_test_prefix to differentiate the test that are
	performed at different points during the execution of the debuggee.

	Tested on x86_64-linux.

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.base/call-signal-resume.exp
	When running the testsuite, I have:

	    Running .../gdb/testsuite/gdb.base/call-signal-resume.exp ...
	    DUPLICATE: gdb.base/call-signal-resume.exp: dummy stack frame number
	    DUPLICATE: gdb.base/call-signal-resume.exp: set confirm off
	    DUPLICATE: gdb.base/call-signal-resume.exp: return

	This is due to the fact that a pattern was probably copy/pasted to
	re-use the logic while not adjusting the test names to avoid the
	duplication.

	Fix by removing the redundant tests ('set confirm off' only needs to be
	used once) and adjusting the test names where appropriate.

	Tested on x86_64-linux.

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.base/pointers.exp
	When I run the testsuite, I have :

	    Running .../gdb/testsuite/gdb.base/pointers.exp ...
	    DUPLICATE: gdb.base/pointers.exp: pointer assignment

	Fix by placing the sections with duplication in with_test_prefix blocks.
	This removes the duplication and gives a better organization the file.

	Tested on x86_64-linux.
	Co-Authored-By: Pedro Alves <pedro@palves.net>

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.base/unload.exp
	When running the testsuite, I have:

	    Running .../gdb/testsuite/gdb.base/unload.exp ...
	    DUPLICATE: gdb.base/unload.exp: continuing to unloaded libfile

	Fix by adjusting the test name.

	Tested on x86_64-linux.

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.base/define-prefix.exp
	When running the testsuite, I have:

	    Running .../gdb/testsuite/gdb.base/define-prefix.exp ...
	    DUPLICATE: gdb.base/define-prefix.exp: define user command: ghi-prefix-cmd

	Fix by adjusting test names.

	Tested on x86_64-linux.

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.base/funcargs.exp
	When running the testsuite, I have:

	    Running .../gdb/testsuite/gdb.base/funcargs.exp ...
	    DUPLICATE: gdb.base/funcargs.exp: run to call2a

	Fix by using proc_with_prefix instead on plain proc to create logical
	function blocks.

	Tested on x86_64-linux.

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.base/shlib-call.exp
	When I run the testsuite, I have:

	    Running .../gdb/testsuite/gdb.base/shlib-call.exp ...
	    DUPLICATE: gdb.base/shlib-call.exp: print g
	    DUPLICATE: gdb.base/shlib-call.exp: set print sevenbit-strings
	    DUPLICATE: gdb.base/shlib-call.exp: set print address off
	    DUPLICATE: gdb.base/shlib-call.exp: set width 0
	    DUPLICATE: gdb.base/shlib-call.exp: continue until exit

	Fix by adjusting the test names when required, and by removing
	un-necessary commands.

	While at it, do some cleanup:
	- Replace an explicit GDB restart sequence with a call to clean_restart.
	- Remove trailing whitespaces.
	- Use $gdb_test_name in gdb_test_multiple.

	Tested on x86_64-linux.

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.base/set-cfd.exp
	When running the testsuite, I have:

	    Running .../gdb/testsuite/gdb.base/set-cwd.exp ...
	    DUPLICATE: gdb.base/set-cwd.exp: test_cwd_reset: continue to breakpoint: break-here

	Fix by moving the tests after the 'runto_main' within the same
	with_test_prefix scope.

	While at it, I fix some indentation issues.

	Tested on x86_64-linux.

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.base/exprs.exp
	When running the testsuite, I have:

	    Running .../gdb/testsuite/gdb.base/exprs.exp ...
	    DUPLICATE: gdb.base/exprs.exp: \$[0-9]* = red (setup)

	Fix by using with_test_prefix where appropriate.

	Tested on x86_64-linux.

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.base/readline.exp
	When running the testsuite, I have:

	    Running .../gdb/testsuite/gdb.base/readline.exp ...
	    DUPLICATE: gdb.base/readline.exp: Simple operate-and-get-next - final prompt

	Fix by adjusting the prefix given to the second 'simple' call to
	operate_and_get_next.

	Tested on x86_64-linux.

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.base/pretty-array.exp
	When I run the testsuite, I have:

	    Running .../gdb/testsuite/gdb.base/pretty-array.exp ...
	    DUPLICATE: gdb.base/pretty-array.exp: print nums
	    DUPLICATE: gdb.base/pretty-array.exp: print nums

	Fix by giving a name to the test cases.

	Tested on x86_64-linux.

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.base/ui-redirect.exp
	When running the testsuite, I have:

	    Running .../gdb/testsuite/gdb.base/ui-redirect.exp ...
	    DUPLICATE: gdb.base/ui-redirect.exp: redirect while already logging: set logging redirect off

	Fix by moving the first 'set logging redirect off' to the end of the
	previous [with_test_prefix] test block. The statement's purpose is to
	clean the on flag set in this previous block, so moving it there makes
	sense and does not change the sequence of commands in the test file.

	Tested on x86_64-linux.

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb: completion-support.exp: improve leading whitespace support
	There is a expect support library in the source tree designed to help
	developers test the auto-completion capabilities of GDB.

	One of the functions is test_gdb_complete_unique_re.  It is used
	(usually indirectly via test_gdb_complete_unique) to test that a given
	input line is completed as a given output line.  The test checks for two
	ways to do the completion: using tab-completion, or using the
	'complete' command.  To do this, calls to two dedicated functions are
	performed.  If we omit few details, we can consider that a call to

	    test_gdb_complete_unique $input $expected

	is equivalent to the two following calls:

	    test_gdb_complete_tab_unique $input $expected
	    test_gdb_complete_cmd_unique $input $expected

	When using the tab-completion, everything works as expected, but some
	care must be taken when using the 'complete' command if the given input
	has leading whitespaces.  In such situation, the output of the
	'complete' command will drop the leading whitespaces.

	The current approach is that in such situation, the input and expected
	outputs are right trimmed (i.e. all leading whitespaces are removed)
	when performing the command completion check.

	This means that the following call:

	    test_gdb_complete_unique "   $input" "   $expected"

	is almost equivalent to (again, omitting few details and arguments):

	    test_gdb_complete_tab_unique "   $input" "   $expected"
	    test_gdb_complete_cmd_unique "$input" "$expected"

	This approach comes with a problem that we encounter when running the
	tests in complete-empty.exp.  When doing so, we have:

	    Running .../gdb/testsuite/gdb.base/complete-empty.exp ...
	    DUPLICATE: gdb.base/complete-empty.exp: empty-input-line: cmd complete ""

	This is because the test file does something like:

	    test_gdb_complete_unique "" "!" " " 1
	    test_gdb_complete_unique "   " "   !" " " 1¬

	which, if we do the substitution introduced above is equivalent to:

	    test_gdb_complete_tab_unique "" "!"
	    test_gdb_complete_cmd_unique "" "!"
	    test_gdb_complete_tab_unique "   " "   !"
	    test_gdb_complete_cmd_unique "" "!"

	We see that the lines 2 and 4 are now the same, and for this reason the
	testing framework complains about DUPLICATE test names.

	To fix that, this commit proposes that instead of left trimming both
	input and expected outputs, only the expected output is trimmed.

	Care must be taken in the case the completion gives more possibilities
	than allowed by the max-completions setting.  In this case, the input
	will be repeated in the output in its left trimmed version.  This commit
	also ensures that this is taken care of.

	With this commit, the gdb.base/complete-empty.exp still passes all its
	tests but does not report the DUPLICATE anymore.

	Tested on x86_64-linux.

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.base/subst.exp
	When I run the testsuite, I have:

	    Running .../gdb/testsuite/gdb.base/subst.ex ...
	    DUPLICATE: gdb.base/subst.exp: unset substitute-path from, no rule entered yet

	Fix by adjusting the problematic test name.

	Tested on x86_64-linux.

2022-01-07  Pedro Alves  <pedro@palves.net>

	gdb/testsuite: Remove duplicates from gdb.base/dfp-exprs.exp
	When I run the testsuite, I have:

	    Running ../gdb/testsuite/gdb.base/dfp-exprs.exp ...
	    DUPLICATE: gdb.base/dfp-exprs.exp: p 1.2dl < 1.3df

	Replace hand-written tests checking various comparison operators between
	various decimal floating point types with a loop to programmatically
	generate all the combinations.  This removes the need to eyeball for all
	suffixes, which lead to the original duplication.

	Also add a lot more combinations, testing all comparison operators
	comprehensively.  The result is 262 unique tests vs 104 before this
	patch.

	Tested on x86_86-linux.

	Change-Id: Id215a3d610aa8e032bf06ee160b5e3aed4a92d1e

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.base/ptype.exp
	When running the testsuite, I have:

	    Running .../gdb/testsuite/gdb.base/ptype.exp ...
	    DUPLICATE: gdb.base/ptype.exp: ptype the_highest
	    DUPLICATE: gdb.base/ptype.exp: list intfoo
	    DUPLICATE: gdb.base/ptype.exp: list charfoo

	Fix by adjusting the offending test names.

	Tested on x86_64-linux.

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.base/dfp-test.exp
	When running the testsuite, I have:

	    Running .../gdb/testsuite/gdb.base/dfp-test.exp ...
	    DUPLICATE: gdb.base/dfp-test.exp: 1.23E is an invalid number
	    DUPLICATE: gdb.base/dfp-test.exp: 1.23E45A is an invalid number
	    DUPLICATE: gdb.base/dfp-test.exp: 1.23E is an invalid number
	    DUPLICATE: gdb.base/dfp-test.exp: 1.23E45A is an invalid number

	Fix by using proc_with_prefix where appropriate.

	Tested on x86_64-linux.
	Co-Authored-By: Andrew Burgess <aburgess@redhat.com>

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.base/del.exp
	When running the testsuite, I have:

	    Running .../gdb/testsuite/gdb.base/del.exp ...
	    DUPLICATE: gdb.base/del.exp: info break after removing break on main

	Refactor slightly this test to run the various configurations under
	foreach_with_prefix so each variant is automatically prefixed, ensuring
	that the forgotten custom test name cannot happen.

	Tested on x86_64-linux.

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.base/solib-display.exp
	When running the testsuite, I have:

	    Running .../gdb/testsuite/gdb.base/solib-display.exp ...
	    DUPLICATE: gdb.base/solib-display.exp: NO: break 25
	    DUPLICATE: gdb.base/solib-display.exp: NO: continue
	    DUPLICATE: gdb.base/solib-display.exp: IN: break 25
	    DUPLICATE: gdb.base/solib-display.exp: IN: continue
	    DUPLICATE: gdb.base/solib-display.exp: SEP: break 25
	    DUPLICATE: gdb.base/solib-display.exp: SEP: continue

	The 'break 25' appears because the test inserts two breakpoints at the
	same location.  Fix this by only inserting the breakpoint once.

	Fix the 'continue' DUPLICATE by giving a phony name to the second
	continue: 'continue two'.

	While at it, this commit also removes a trailing space.

	Tested on x86_64-linux.

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.base/decl-before-def.exp
	When running the testsuite, I have:

	    Running .../gdb/testsuite/gdb.base/decl-before-def.exp ...
	    DUPLICATE: gdb.base/decl-before-def.exp: p a

	Fix by giving explicit names to the two tests that use the same command.

	Tested on x86_64-linux.

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.base/pending.exp
	When running the testsuite, I have:

	    Running .../gdb/testsuite/gdb.base/pending.exp ...
	    DUPLICATE: gdb.base/pending.exp: disable other breakpoints

	Fix by adjusting the test names.

	Tested on x86_64-linux.

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.base/checkpoint.exp
	When running the testsuite, I have:

	    Running .../gdb/testsuite/gdb.base/checkpoint.exp ...
	    DUPLICATE: gdb.base/checkpoint.exp: verify lines 5 two
	    DUPLICATE: gdb.base/checkpoint.exp: restart 0 one

	This patch fixes the various erroneous incorrect test names.

	While at it, this patch also remove some trailing white spaces across
	the file.

	Tested on x86_64-linux.

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.base/pie-fork.exp
	When running the testsuite, I have:

	    Running .../gdb/testsuite/gdb.base/pie-fork.exp ...
	    DUPLICATE: gdb.base/pie-fork.exp: test_no_detach_on_fork: continue

	Fix by giving explicit names to the 'continue' commands that cause the
	duplicate message.

	Tested on x86_64-linux.

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.base/realname-expand.exp
	When running the testsuite, I have:

	    Running .../gdb/testsuite/gdb.base/realname-expand.exp ...
	    DUPLICATE: gdb.base/realname-expand.exp: set basenames-may-differ on

	This is due to the fact that the test restarts GDB twice and each time
	sets the basenames-may-differ setting.  This patch proposes to fix this
	by not restarting GDB so the setting is maintained.  It just clears the
	breakpoints between the two tests and updates the breakpoints number as
	required.

	This patch also perform some minor refactorings to improve visibility.

	Tested on x86_64-linux.

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.base/interp.exp
	When running the testsuite I have:

	    Running .../gdb/testsuite/gdb.base/interp.exp ...
	    DUPLICATE: gdb.base/interp.exp: interpreter-exec mi "-var-update *"

	This is due to the fact that multiple successive instances of
	gdb_test_multiple use 'pass $cmd', but one of them forgets to reset $cmd
	to a new test name.

	Fix by using 'pass $gdb_test_name', given that the gdb_test_name is set
	by gdb_test_multiple.

	While fixing this, this patch refactors all occurrences of the following
	pattern:

	    set cmd foo
	    gdb_test_multiple $cmd $cmd {
	        -re ... {
	            pass $cmd
	        }
	    }

	into

	    gdb_test_multiple foo "" {
	        -re ... {
	            pass $gdb_test_name
	         }
	    }

	This makes this test file coherent in its use of $gdb_test_name.

	Tested on x86_64-linux.

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.base/miscexprs.exp
	When running the testsuite I see:

	    Running .../gdb/testsuite/gdb.base/miscexprs.exp ...
	    DUPLICATE: gdb.base/miscexprs.exp: print value of !ibig.i[100]
	    DUPLICATE: gdb.base/miscexprs.exp: print value of !ibig.i[100]

	This is due to an explicit test name repeated across multiple tests.
	The actual test explicit names do not add much over the command from
	wich default test names are derived.

	Fix by removing the explicit test names across the file where they do
	not add value.  While at doing some cleaning, also use $gdb_test_name in
	the various uses of gdb_test_multiple.

	Tested on x86_64-linux.

2022-01-07  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates from gdb.base/stack-checking.exp
	When running the testsuite I have:

	    Running .../gdb/testsuite/gdb.base/stack-checking.exp ...
	    DUPLICATE: gdb.base/stack-checking.exp: bt
	    DUPLICATE: gdb.base/stack-checking.exp: bt

	Fix by using with_test_prefix.

	Tested on x86_64-linux.

2022-01-07  Philipp Tomsich  <philipp.tomsich@vrull.eu>

	RISC-V: update docs to reflect privileged spec v1.9 has been dropped
	After commit d8af286fffa ("RISC-V: Drop the privileged spec v1.9
	support.") has removed support for privileged spec v1.9, this removes
	it from the documentation.

	References: d8af286fffa ("RISC-V: Drop the privileged spec v1.9 support.")

	gas/ChangeLog:

		* configure: Regenerate.
		* configure.ac: Remove reference to priv spec 1.9.
		* po/fr.po: Same.
		* po/ru.po: Same.
		* po/uk.po: Same.

2022-01-07  Philipp Tomsich  <philipp.tomsich@vrull.eu>

	RISC-V: update docs for -mpriv-spec/--with-priv-spec for 1.12
	While support for the privileged spec was added in a63375ac337
	("RISC-V: Hypervisor ext: support Privileged Spec 1.12"), the
	documentation has not been updated.  Add 1.12 to the relevant
	documentation.

	References: a63375ac337 ("RISC-V: Hypervisor ext: support Privileged Spec 1.12")

	gas/ChangeLog:

		* config/tc-riscv.c: Add 1.12 to the usage message.
		* configure: Regenerate.
		* configure.ac: Add 1.12 to the help/usage message.
		* po/fr.po: Same.
		* po/ru.po: Same.
		* po/uk.po: Same.

2022-01-07  Tom Tromey  <tromey@adacore.com>

	Do not use CC_HAS_LONG_LONG
	ax.cc checks CC_HAS_LONG_LONG, but nothing defines this.  However,
	PRINTF_HAS_LONG_LONG is checked in configure.  This patch removes the
	former and keeps the latter.  This is PR remote/14976 (filed by me in
	2012, lol).

	I'm checking this in.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=14976

2022-01-07  Andrew Burgess  <aburgess@redhat.com>

	gdb/doc: shorten some source lines, and prevent some line breaks
	Building on the previous commit, this makes use of a trailing @ to
	split long @deffn lines in the guile.texi source file.  This splitting
	doesn't change how the document is laid out by texinfo.

	I have also wrapped keyword and argument name pairs in @w{...} to
	prevent line breaks appearing between the two.  I've currently only
	done this for the longer @deffn lines, where a line break is
	possible.  This makes the @deffn lines much nicer to read in the
	generated pdf.

2022-01-07  Andrew Burgess  <aburgess@redhat.com>

	gdb/doc: Remove (...) around guile procedure names in @deffn lines
	Most guile procedures in the guile.texi file are defined like:

	  @deffn {Scheme Procedure} name arg1 arg2 arg3

	But there are two places where we do this:

	  @deffn {Scheme Procedure} (name arg1 arg2 arg3)

	Notice the added (...).  Though this does represent how a procedure
	call is written in scheme, it's not the normal style throughout the
	manual.  I also checked the 'info guile' info page to see how they
	wrote there declarations, and they use the first style too.

	The second style also has the drawback that index entries are added as
	'(name', and so they are grouped in the '(' section of the index,
	which is not very user friendly.

	In this commit I've changed the definitions of make-command and
	make-parameter to use the first style.

	The procedure declaration lines can get pretty long with all of the
	arguments, and this was true for both of the procedures I am changing
	in this commit.  I have made use of a trailing '@' to split the deffn
	lines, and keep them under 80 characters in the texi source.  This
	makes no difference to how the final document looks.

	Finally, our current style for keyword arguments, appears to be:

	  [#:keyword-name argument-name]

	I don't really understand the reason for this, 'info guile' just seems
	to use:

	  [#:keyword-name]

	which seems just as good to me.  But I don't propose to change
	that just now.  What I do notice though, is that sometimes, texinfo
	will place a line break between the keyword-name and the
	argument-name, for example, the pdf of make-command is:

	  make-command name [#:invoke invoke] [#:command-class
	    command-class] [#:completer-class completer] [#:prefix? prefix] [#:doc
	    doc-string]

	Notice the line break after '#:command-class' and after '#:doc',
	neither of which are ideal.  And so, for the two commands I am
	changing in this commit, I have made use of @w{...} to prevent line
	breaks between the keyword-name and the argument-name.  Now the pdf
	looks like this:

	  make-command name [#:invoke invoke]
	    [#:command-class command-class] [#:completer-class completer]
	    [#:prefix? prefix] [#:doc doc-string]

	Which seems much better.  I'll probably update the other deffn lines
	at some point.

2022-01-07  Pavel Mayorov  <pmayorov@cloudlinux.com>

	Revert previous delta to debug.c.  Replace with patch to reject indirect types that point to indirect types.
		PR 28718
		* dwarf.c: Revert previous delta.
		(debug_get_real_type): Reject indirect types that point to
		indirect types.
		(debug_get_type_name, debug_get_type_size, debug_write_type):
		Likewise.

2022-01-07  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: Updated the default ISA spec to 20191213.
	Update the default ISA spec from 2.2 to 20191213 will change the default
	version of i from 2.0 to 2.1.  Since zicsr and zifencei are separated
	from i 2.1, users need to add them in the architecture string if they need
	fence.i and csr instructions.  Besides, we also allow old ISA spec can
	recognize zicsr and zifencei, but we won't output them since they are
	already included in the i extension when i's version is less than 2.1.

	bfd/
		* elfxx-riscv.c (riscv_parse_add_subset): Allow old ISA spec can
		recognize zicsr and zifencei.
	gas/
		* config/tc-riscv.c (DEFAULT_RISCV_ISA_SPEC): Updated to 20191213.
		* testsuite/gas/riscv/csr-version-1p10.d: Added zicsr to -march since
		the default version of i is 2.1.
		* testsuite/gas/riscv/csr-version-1p11.d: Likewise.
		* testsuite/gas/riscv/csr-version-1p12.d: Likewise.
		* testsuite/gas/riscv/csr-version-1p9p1.d: Likewise.
		* testsuite/gas/riscv/option-arch-03.d: Updated i's version to 2.1.
		* testsuite/gas/riscv/option-arch-03.s: Likewise.
	ld/
		* testsuite/ld-riscv-elf/call-relax.d: Added zicsr to -march since
		the default version of i is 2.1.
		* testsuite/ld-riscv-elf/attr-merge-arch-01.d: Updated i's version to 2.1.
		* testsuite/ld-riscv-elf/attr-merge-arch-01a.s: Likewise.
		* testsuite/ld-riscv-elf/attr-merge-arch-01b.: Likewise.
		* testsuite/ld-riscv-elf/attr-merge-arch-02.d: Likewise.
		* testsuite/ld-riscv-elf/attr-merge-arch-02a.s: Likewise.
		* testsuite/ld-riscv-elf/attr-merge-arch-02b.s: Likewise.
		* testsuite/ld-riscv-elf/attr-merge-arch-03.d: Likewise.
		* testsuite/ld-riscv-elf/attr-merge-arch-03a.s: Likewise.
		* testsuite/ld-riscv-elf/attr-merge-arch-03b.s: Likewise.
		* testsuite/ld-riscv-elf/attr-merge-arch-failed-02.d: Added zifencei
		into Tag_RISCV_arch since it is added implied when i's version is
		larger than 2.1.

2022-01-07  Alan Modra  <amodra@gmail.com>

	Move elf_backend_always_size_sections earlier
		* elflink.c (bfd_elf_size_dynamic_sections): Move plt/got init
		earlier and call elf_backend_always_size_sections at the start
		of this function.

2022-01-07  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-06  H.J. Lu  <hjl.tools@gmail.com>

	ldelfgen.c: Add missing newlines when calling einfo
		* ldelfgen.c (ldelf_map_segments): Add the missing newline to
		einfo.

2022-01-06  Nick Clifton  <nickc@redhat.com>

	Fix a stack exhaustion bug parsing malicious STABS format debug information.
		PR 28718
		* debug.c (debug_write_type): Allow for malicious recursion via
		indirect debug types.

2022-01-06  Richard Sandiford  <richard.sandiford@arm.com>

	aarch64: Add support for new SME instructions
	This patch adds support for three new SME instructions: ADDSPL,
	ADDSVL and RDSVL.  They behave like ADDPL, ADDVL and RDVL, but read
	the streaming vector length instead of the current vector length.

	opcodes/
		* aarch64-tbl.h (aarch64_opcode_table): Add ADDSPL, ADDSVL and RDSVL.
		* aarch64-dis-2.c: Regenerate.

	gas/
		* testsuite/gas/aarch64/sme.s, testsuite/gas/aarch64/sme.d: Add tests
		for ADDSPL, ADDSVL and RDSVL.

2022-01-06  Tom Tromey  <tom@tromey.com>

	Use target_announce_detach in more targets
	target_announce_detach was added in commit 0f48b757 ("Factor out
	"Detaching from program" message printing").  There, Pedro wrote:

	    (For now, I left the couple targets that print this a bit differently
	    alone.  Maybe this could be further pulled out into infcmd.c.  If we
	    did that, and those targets want to continue printing differently,
	    this new function could be converted to a target method.)

	It seems to me that the differences aren't very big, and in some cases
	other targets handled the output a bit more nicely.  In particular,
	some targets will print a different message when exec_file==NULL,
	rather than printing the same output with an empty string as
	exec_file.

	This patch incorporates the nicer output into target_announce_detach,
	then changes the remaining ports to use this function.

2022-01-06  Tom Tromey  <tom@tromey.com>

	Introduce target_announce_attach
	This introduces target_announce_attach, by analog with
	target_announce_detach.  Then it converts existing targets to use
	this, rather than emitting their own output by hand.

2022-01-06  Andrew Burgess  <aburgess@redhat.com>

	gdb: make use add_setshow_prefix_cmd in gnu-nat.c
	In gnu-nat.c we currently implement some set/show prefix commands
	"manually", that is, we call add_prefix_cmd, and assign a set and show
	function to each prefix command.

	These set/show functions print an error indicating that the user
	didn't type a complete command.

	If we instead switch to using add_setshow_prefix_cmd then we can
	delete the set/show functions, GDB provides some default functions,
	which give a nice help style summary that lists all of the available
	sub-commands, along with a one line summary of what each does.

	Though this clearly changes the existing behaviour, I think this
	change is acceptable as the new behaviour is more inline with other
	set/show prefix commands, and the new behaviour is more informative.

	This change will conflict with Tom's change here:

	  https://sourceware.org/pipermail/gdb-patches/2022-January/184724.html

	Where Tom changes the set/show functions that I delete.  My suggestion
	is that the set/show functions still be deleted even after Tom's
	patch (or instead of Tom's patch).

	For testing I've build GDB on GNU/Hurd, and manually tested these
	functions.  I did a grep over the testsuite, and don't believe the
	existing error messages are being checked for in any tests.

2022-01-06  Tom Tromey  <tom@tromey.com>

	Use warning in windows-nat error messages
	A warning in windows-nat.c can be converted to use the warning
	function.  As a side effect, this arranges for the output to be sent
	to gdb_stderr.

2022-01-06  Tom Tromey  <tom@tromey.com>

	Clean up some dead code in windows-tdep.c
	windows-tdep.c checks the result of xmalloc, which isn't necessary.  I
	initially removed this dead check, but then went a bit further and
	modified the code so that some "goto"s and explicit memory management
	could be removed.  Then, I added a couple of missing bounds checks.

	I believe this also fixes a possible bug with a missing 0-termination
	of a string.  I am not certain, but that is why I think the existing
	code allocates a buffer that is 1 byte too long -- but then it fails
	to set this byte to 0.

2022-01-06  Tom Tromey  <tromey@adacore.com>

	Avoid crash in language_info
	language_info calls:

	  show_language_command (NULL, 1, NULL, NULL);

	... "knowing" that show_language_command does not use its ui_file
	parameter.  However, this was changed in commit 7514a661
	("Consistently Use ui_file parameter to show callbacks").

	This patch changes language_info to pass a ui_file.

	It took a while to write the test -- this function is only called when
	'verbose' is on and when switching the "expected" language in auto
	mode.

2022-01-06  Tom Tromey  <tromey@adacore.com>

	Fix some failures in langs.exp
	langs.exp currently has some fails for me because the stack trace
	includes full paths to the source files.

	    FAIL: gdb.base/langs.exp: up to foo in langs.exp
	    FAIL: gdb.base/langs.exp: up to cppsub_ in langs.exp
	    FAIL: gdb.base/langs.exp: up to fsub in langs.exp

	This fixes the failures by making the filename regexps a bit more lax.

2022-01-06  Jan Beulich  <jbeulich@suse.com>

	x86: drop NoAVX insn attribute
	To avoid issues like that addressed by 6e3e5c9e4181 ("x86: extend SSE
	check to PCLMULQDQ, AES, and GFNI insns"), base the check on opcode
	attributes and operand types.

	x86: drop NoAVX from POPCNT
	With the introduction of CpuPOPCNT the NoAVX attribute has become
	meaningless for POPCNT.

	x86: drop some "comm" template parameters
	As already indicated in a remark when introducing these templates, the
	"commutative" attribute is ignored for legacy encoding templates. Hence
	it is possible to shorten a number of templates by specifying C directly
	rather than through a template parameter. I think this helps readability
	a bit.

	x86: templatize FMA insn templates
	The operand ordering portion of the mnemonics repeats, causing a flurry
	of almost identical templates. Abstract this out.

	x86-64: restrict PC32 -> PLT32 conversion
	Neither non-64-bit code nor uses with a non-zero offset from a symbol
	should be converted to PLT32, as an eventual PLT entry would not express
	what was requested.

2022-01-06  Lancelot SIX  <lancelot.six@amd.com>

	gdb: Fix copyright year in gdb/testsuite/gdb.base/inferior-clone.exp
	I just realized that I forgot to update the year before pushing the
	patch that created this file.  Since it landed after the global
	copyright year update have been done, this file’s copyright year is
	updated.

	This patch fixes that.

	Change-Id: I280f7d86e02d38425f7afdcf19a1c3500d51c23f

2022-01-06  Mike Frysinger  <vapier@gentoo.org>

	sim: ppc: migrate to standard uintXX_t types
	Drop the sim-specific unsignedXX types and move to the standard uintXX_t
	types that C11 provides.

	sim: common: migrate to standard uintXX_t types
	Drop the sim-specific unsignedXX types and move to the standard uintXX_t
	types that C11 provides.

	sim: igen: migrate to standard uintXX_t types
	Move off the custom local 64-bit types and to the standard uintXX_t
	types that C11 provides.

	sim: mips: migrate to standard uintXX_t types
	Move off the sim-specific unsignedXX types and to the standard uintXX_t
	types that C11 provides.

	sim: cris: migrate to standard uintXX_t types
	Move off the sim-specific unsignedXX types and to the standard uintXX_t
	types that C11 provides.

	sim: iq2000: migrate to standard uintXX_t types
	Move off the sim-specific unsignedXX types and to the standard uintXX_t
	types that C11 provides.

	sim: synacor: migrate to standard uintXX_t types
	Move off the sim-specific unsignedXX types and to the standard uintXX_t
	types that C11 provides.

	sim: msp430: migrate to standard uintXX_t types
	Move off the sim-specific unsignedXX types and to the standard uintXX_t
	types that C11 provides.

	sim: riscv: migrate to standard uintXX_t types
	Move off the sim-specific unsignedXX types and to the standard uintXX_t
	types that C11 provides.

	sim: bfin: migrate to standard uintXX_t types
	Move off the sim-specific unsignedXX types and to the standard uintXX_t
	types that C11 provides.

	sim: testsuite: migrate to standard uintXX_t types
	This old code setup its own uintXX types, but since we require C11
	now, we can assume the standard uintXX_t types exist and use them.

	sim: erc32: migrate to standard uintXX_t types
	This old port setup its own uintXX types, but since we require C11
	now, we can assume the standard uintXX_t types exist and use them.

	sim: mn10300: migrate to standard uintXX_t types
	This old port setup its own uintXX types, but since we require C11
	now, we can assume the standard uintXX_t types exist and use them.

	sim: v850: migrate to standard uintXX_t types
	This old port setup its own uintXX types, but since we require C11
	now, we can assume the standard uintXX_t types exist and use them.

2022-01-06  Mike Frysinger  <vapier@gentoo.org>

	sim: m68hc11: migrate to standard uintXX_t types
	This old port setup its own uintXX types, but since we require C11
	now, we can assume the standard uintXX_t types exist and use them.

	Also migrate off the sim-specific unsignedXX types.

2022-01-06  Mike Frysinger  <vapier@gentoo.org>

	sim: d10v: migrate to standard uintXX_t types
	This old port setup its own uintXX types, but since we require C11
	now, we can assume the standard uintXX_t types exist and use them.

	Also migrate off the sim-specific unsignedXX types.

2022-01-06  Mike Frysinger  <vapier@gentoo.org>

	sim: cr16: migrate to standard uintXX_t types
	This old port setup its own uintXX types, but since we require C11
	now, we can assume the standard uintXX_t types exist and use them.

	Also migrate off the sim-specific unsignedXX types.

2022-01-06  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-05  H.J. Lu  <hjl.tools@gmail.com>

	x86: Add elf_x86_allocate_local_got_info
	Add elf_x86_allocate_local_got_info to allocate x86 GOT info for local
	symbols.

		* elf32-i386.c (elf_i386_check_relocs): Call
		elf_x86_allocate_local_got_info.
		* elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
		* elfxx-x86.h (elf_x86_allocate_local_got_info): New.

2022-01-05  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	opcodes: Make i386-dis.c thread-safe
	Improve thread safety in print_insn_i386_att, print_insn_i386_intel and
	print_insn_i386 by removing the use of static variables.

	Tested on x86_64-pc-linux-gnu.

	2022-01-04 Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

		* i386-dis.c: Make print_insn_i386_att, print_insn_i386_intel
		and print_insn_i386 thread-safe

2022-01-05  H.J. Lu  <hjl.tools@gmail.com>

	doc: Replace =frame-interp with =frames-interp
	The actual objdump and readelf option name is =frames-interp, not
	=frames-interp.

		PR binutils/28747
		* doc/debug.options.texi: Replace =frame-interp with
		=frames-interp.

2022-01-05  Tom Tromey  <tromey@adacore.com>

	Change riscv_return_value to use RETURN_VALUE_ABI_PRESERVES_ADDRESS
	Internally, AdaCore has a test that is equivalent to (really a direct
	translation of) gdb.base/gnu_vector.exp.  On 32-bit RISC-V, the
	"return" part of this test fails.

	Joel tracked this down to riscv_return_value returning
	RETURN_VALUE_ABI_RETURNS_ADDRESS.  Using
	RETURN_VALUE_ABI_PRESERVES_ADDRESS is more correct here, and fixes the
	bug.

	I tested this for both 32- and 64-bit RISC-V using the AdaCore
	internal test suite, and Andrew Burgess tested it using
	gnu_vector.exp.

2022-01-05  Tom Tromey  <tom@tromey.com>

	Filtered output cleanup in expression dumping
	Most of the expression-dumping code uses filtered output, but a few
	functions did not.  This patch cleans up these instance.

	Note that this won't cause any behavior change, because the only calls
	to dump_prefix_expression pass in gdb_stdlog.  However, in the long
	run it's easier to audit the code if the number of uses of _unfiltered
	is reduced.

2022-01-05  Tom Tromey  <tom@tromey.com>

	Use filtered output in terminal_info implementations
	This changes one terminal_info implementation, and
	default_terminal_info, to use filtered output.  Other implementations
	of this method already use filtered output.

	I can't compile go32-nat.c, so this is a 'best effort' patch.

2022-01-05  Tom Tromey  <tom@tromey.com>

	Use filtered output in gnu-nat.c commands
	gnu-nat.c has a number of ordinary commands that should use filtered
	output.  In a few cases, I changed the output to use gdb_stderr as
	well.  I can't compile this file, so this patch is split out as a
	"best effort".

	Use filtered output in *-tdep commands
	Various targets introduce their own commands, which then use
	unfiltered output.  It's better to use filtered output by default, so
	this patch fixes the instances I found.

	Use filtered output in btrace-related commands
	This changes btrace.c and record-btrace.c to use filtered output in
	the commands implemented there.

	Use filtered output in some dumping commands
	There are several commands that may optionally send their output to a
	file -- they take an optional filename argument and open a file.  This
	patch changes these commands to use filtered output.  The rationale
	here is that, when printing to gdb_stdout, filtering is appropriate --
	it is, and should be, the default for all commands.  And, when writing
	to a file, paging will not happen anyway (it only happens when the
	stream==gdb_stdout), so using the _filtered form will not change
	anything.

	Use filtered output in kill command
	This changes the kill command to use filtered output.  I split this
	one into its own patch because, out of an abundance of caution, I
	changed the function to call bfd_cache_close_all a bit earlier, in
	case pagination caused an exception.

2022-01-05  Tom Tromey  <tom@tromey.com>

	Use filtered output in ordinary commands
	Many otherwise ordinary commands choose to use unfiltered output
	rather than filtered.  I don't think there's any reason for this, so
	this changes many such commands to use filtered output instead.

	Note that complete_command is not touched due to a comment there
	explaining why unfiltered output is believed to be used.

2022-01-05  Tom Tromey  <tom@tromey.com>

	Use filtered output in language_info
	Change language_info to use filtered output.  This is ok because the
	sole caller uses filtered output elsewhere, and because this function
	calls show_language_command, which also uses filtered output.

	Use filtered output in files_info implementations
	This changes the implementations of the target files_info method to
	use filtered output.  This makes sense because the sole caller of this
	method is an ordinary command (info_program_command).  This patch
	changes this command to use filtered output as well.

	Use filtered output in target-descriptions.c
	target-descriptions.c uses unfiltered output.  However, if you happen
	to invoke this command interactively, it's probably better for it to
	use filtering.  For non-interactive use, this doesn't matter.

	Use filtered output for gdbarch dump
	This changes gdbarch dumping to use filtered output.  This seems a bit
	better to me, both on the principle that this is an ordinary command,
	and because the output can be voluminous, so it may be nice to stop in
	the middle.

2022-01-05  Tom Tromey  <tom@tromey.com>

	Implement putstr and putstrn in ui_file
	In my tour of the ui_file subsystem, I found that fputstr and fputstrn
	can be simplified.  The _filtered forms are never used (and IMO
	unlikely to ever be used) and so can be removed.  And, the interface
	can be simplified by removing a callback function and moving the
	implementation directly to ui_file.

	A new self-test is included.  Previously, I think nothing was testing
	this code.

	Regression tested on x86-64 Fedora 34.

2022-01-05  Tom Tromey  <tromey@adacore.com>

	Change how versioned symbols are recorded
	A change to BFD caused a gdb regression when using the Ada "catch
	exception" feature.  The bug is visible when a shared library throws
	an exception that is caught in the main executable.

	This was discussed here:

	https://sourceware.org/pipermail/binutils/2021-July/117538.html

	This patch implements Alan's proposed fix, namely to use VERSYM_HIDDEN
	rather than the name when deciding to install a version-less symbol.

	The internal test case is identical to the catch_ex_std.exp that is
	in-tree, so I haven't added a new test.  I could not make that one
	fail on x86-64 Linux, though.  It's possible that maybe I'd have to
	update the system linker first, but I didn't want to try that.

	Regression tested on x86-64 Fedora 32.

2022-01-05  Hannes Domani  <ssbssa@yahoo.de>

	Fix inferior_thread attribute in new_thread event
	Commit 72ee03ff58 fixed a use-after-move bug in add_thread_object, but
	it changed the inferior_thread attribute to contain the inferior instead
	of the actual thread.
	This now uses the thread_obj in its new location instead.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28429

2022-01-05  Tom Tromey  <tom@tromey.com>

	Simplify execute_control_commands_to_string
	execute_control_commands_to_string can be rewritten in terms of
	execute_fn_to_string, which consolidates some knowledge about which
	streams to redirect.

	Regression tested on x86-64 Fedora 34.

2022-01-05  Tom Tromey  <tromey@adacore.com>

	Do not print anything when self-backtrace unavailable
	Right now, gdb's self-backtrace feature will still print something
	when a backtrace is unavailable:

	   sig_write (_("----- Backtrace -----\n"));
	[...]
	     sig_write (_("Backtrace unavailable\n"));
	    sig_write ("---------------------\n");

	However, if GDB_PRINT_INTERNAL_BACKTRACE is undefined, it seems better
	to me to print nothing at all.

	This patch implements this change.  It also makes a couple of other
	small changes in this same module: it adds a header guard to
	bt-utils.h, and it protects the definitions of
	gdb_internal_backtrace_1 with a check of GDB_PRINT_INTERNAL_BACKTRACE.

2022-01-05  Tom Tromey  <tromey@adacore.com>

	Fix pager regression
	The patch to fix paging with redirection caused a regression in the
	internal AdaCore test suite.  The problem occurs when running an MI
	command from the CLI using interpreter-exec, when paging is enabled.
	This scenario isn't covered by the current test suite, so this patch
	includes a new test.

	The problem is that, in this situation, MI does:

	  fputs_unfiltered (strcmp (context->command, "target-select") == 0
			     ? "^connected" : "^done", mi->raw_stdout);

	Here raw_stdout is a stdio_file wrapping stdout, so the pager thinks
	that it is ok to buffer the output.  However, in this setup, it isn't
	ok, and flushing the wrap buffer doesn't really work properly.  Also,
	MI next does:

	  mi_out_put (uiout, mi->raw_stdout);

	... but this uses ui_file::write, which also doesn't flush the wrap
	buffer.

	I think all this will be fixed by the pager rewrite series I'm working
	on.  However, in the meantime, adding the old gdb_stdout check back to
	the pager fixes this problem.

	Regression tested on x86-64 Fedora 34.

2022-01-05  H.J. Lu  <hjl.tools@gmail.com>

	elf: Set p_align to the minimum page size if possible
	Currently, on 32-bit and 64-bit ARM, it seems that ld generates p_align
	values of 0x10000 even if no section alignment is greater than 0x1000.
	The issue is more general and probably affects other targets with multiple
	page sizes.

	While file layout absolutely must take 64K page size into account, that
	does not have to be reflected in the p_align value.  If running on a 64K
	kernel, the file will be loaded at a 64K page boundary by necessity. On
	a 4K kernel, 64K alignment is not needed.

	The glibc loader has been fixed to honor p_align:

	https://sourceware.org/bugzilla/show_bug.cgi?id=28676

	similar to kernel:

	commit ce81bb256a224259ab686742a6284930cbe4f1fa
	Author: Chris Kennelly <ckennelly@google.com>
	Date:   Thu Oct 15 20:12:32 2020 -0700

	    fs/binfmt_elf: use PT_LOAD p_align values for suitable start address

	This means that on 4K kernels, we will start to do extra work for 64K
	p_align, but this pointless for pretty much all binaries (whose section
	alignment rarely exceeds 16).

	The minimum page size is used, instead of the maximum section alignment
	due to this glibc bug:

	https://sourceware.org/bugzilla/show_bug.cgi?id=28688

	It has been fixed in glibc 2.35.  But linker output must work on existing
	glibc binaries.

	1. Set p_align to the minimum page size while laying out segments aligning
	to the maximum page size or section alignment.  The run-time loader can
	align segments to the minimum page size or above, depending on system page
	size.
	2. If -z max-page-size=NNN is used, p_align will be set to the maximum
	page size or the largest section alignment.
	3. If a section requires alignment higher than the minimum page size,
	don't set p_align to the minimum page size.
	4. If a section requires alignment higher than the maximum page size,
	set p_align to the section alignment.
	5. For objcopy, when the minimum page size != the maximum page size,
	p_align may be set to the minimum page size while segments are aligned
	to the maximum page size.  In this case, the input p_align will be
	ignored and the maximum page size will be used to align the ouput
	segments.
	6. Update linker to disallow the common page size > the maximum page size.
	7. Update linker to avoid the common page size > the maximum page size.
	8. Adjust pru_irq_map-1.d to expect p_align == sh_addralign:

	Section Headers:
	  [Nr] Name   Type            Addr     Off    Size   ES Flg Lk Inf Al
	  [ 0]        NULL            00000000 000000 000000 00      0   0  0
	  [ 1] .text  PROGBITS        20000000 00007c 000004 00  AX  0   0  4
	...
	Program Headers:
	  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
	  LOAD           0x000074 0x00000000 0x00000000 0x00008 0x00008 RW  0x1
	  LOAD           0x00007c 0x20000000 0x20000000 0x00004 0x00004 R E 0x4

	vs.

	Section Headers:
	  [Nr] Name   Type            Addr     Off    Size   ES Flg Lk Inf Al
	  [ 0]        NULL            00000000 000000 000000 00      0   0  0
	  [ 1] .text  PROGBITS        20000000 00007c 000004 00  AX  0   0  4
	...
	Program Headers:
	  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
	  LOAD           0x000074 0x00000000 0x00000000 0x00008 0x00008 RW  0x1
	  LOAD           0x00007c 0x20000000 0x20000000 0x00004 0x00004 R E 0x1

	To enable this linker optimization, the backend should define ELF_P_ALIGN
	to ELF_MINPAGESIZE.

	bfd/

		PR ld/28689
		PR ld/28695
		* elf-bfd.h (elf_backend_data): Add p_align.
		* elf.c (assign_file_positions_for_load_sections): Set p_align
		to the default p_align value while laying out segments aligning
		to maximum page size or section alignment.
		(elf_is_p_align_valid): New function.
		(copy_elf_program_header): Call elf_is_p_align_valid to determine
		if p_align is valid.
		* elfxx-target.h (ELF_P_ALIGN): New.  Default to 0.
		(elfNN_bed): Add ELF_P_ALIGN.
		* elfxx-x86.h (ELF_P_ALIGN): New.  Set to ELF_MINPAGESIZE.

	include/

		PR ld/28689
		PR ld/28695
		* bfdlink.h (bfd_link_info): Add maxpagesize_is_set.

	ld/

		PR ld/28689
		PR ld/28695
		* emultempl/elf.em (gld${EMULATION_NAME}_handle_option): Set
		link_info.maxpagesize_is_set for -z max-page-size=NNN.
		* ldelf.c (ldelf_after_parse): Disallow link_info.commonpagesize
		> link_info.maxpagesize.
		* testsuite/ld-elf/elf.exp: Pass -z max-page-size=0x4000 to
		linker to build mbind2a and mbind2b.
		* testsuite/ld-elf/header.d: Add -z common-page-size=0x100.
		* testsuite/ld-elf/linux-x86.exp: Add PR ld/28689 tests.
		* testsuite/ld-elf/p_align-1.c: New file.
		* testsuite/ld-elf/page-size-1.d: New test.
		* testsuite/ld-elf/pr26936.d: Add -z common-page-size=0x1000.
		* testsuite/ld-elf/seg.d: Likewise.
		* testsuite/ld-scripts/rgn-at5.d: Likewise.
		* testsuite/ld-pru/pru_irq_map-1.d: Append 1 to name.  Adjust
		expected PT_LOAD segment alignment.
		* testsuite/ld-pru/pru_irq_map-2.d: Append 2 to name.
		* testsuite/ld-scripts/pr23571.d: Add -z max-page-size=0x1000.

2022-01-05  Alan Modra  <amodra@gmail.com>

	Adjust quoted-sym-names test
	Some targets restrict symbol addresses in .text to instruction
	boundaries.

		* testsuite/gas/all/quoted-sym-names.s: Define syms in .data.
		* testsuite/gas/all/quoted-sym-names.d: Adjust to suit.

2022-01-05  Alan Modra  <amodra@gmail.com>

	infinite recursion detected in gold testcase
	gold/testsuite/icf_test.cc:32:5: error: infinite recursion detected [-Werror=infinite-recursion]
	   32 | int kept_func()
	      |     ^~~~~~~~~

		* testsuite/icf_test.cc: Avoid infinite recursion error.

2022-01-05  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-04  H.J. Lu  <hjl.tools@gmail.com>

	ld/x86: Update -z report-relative-reloc
	Use 0x%v, instead of bfd_sprintf_vma, to report relative relocations.
	Change linker relative relocations report from

	tmpdir/dump: R_X86_64_IRELATIVE (offset: 0x0000000000002000, info: 0x0000000000000025, addend: 0x0000000000001007) against 'ifunc' for section '.data.rel.ro.local' in tmpdir/report-reloc-1.o

	to

	tmpdir/dump: R_X86_64_IRELATIVE (offset: 0x2000, info: 0x25, addend: 0x1007) against 'ifunc' for section '.data.rel.ro.local' in tmpdir/report-reloc-1.o

	bfd/

		* elfxx-x86.c (_bfd_x86_elf_link_report_relative_reloc): Use
		0x%v instead of bfd_sprintf_vma.

	ld/

		* testsuite/ld-i386/report-reloc-1.l: Updated.
		* testsuite/ld-x86-64/report-reloc-1.l: Likewise.

2022-01-04  H.J. Lu  <hjl.tools@gmail.com>

	ld: Improve thin archive member error message
	Improve thin archive member error message with:

	ld: libbar.a(bar.o): error opening thin archive member: No such file or directory

	instead of

	ld: libbar.a: error adding symbols: No such file or directory

		PR ld/28722
		* archive.c (_bfd_get_elt_at_filepos): Add a pointer argument
		for struct bfd_link_info.  Call linker callback when failing to
		open thin archive member.
		(_bfd_generic_get_elt_at_index): Pass NULL to
		_bfd_get_elt_at_filepos.
		(bfd_generic_openr_next_archived_file): Likewise.
		* coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Add a pointer
		argument for struct bfd_link_info and pass it to
		_bfd_get_elt_at_filepos.
		(alpha_ecoff_openr_next_archived_file): Pass NULL to
		_bfd_get_elt_at_filepos.
		(alpha_ecoff_get_elt_at_index): Likewise.
		* coff-rs6000.c (_bfd_xcoff_openr_next_archived_file): Likewise.
		* ecoff.c (ecoff_link_add_archive_symbols): Pass info to
		backend->get_elt_at_filepos.
		* elflink.c (elf_link_is_defined_archive_symbol): info to
		_bfd_get_elt_at_filepos.
		* libbfd-in.h (_bfd_get_elt_at_filepos): Add a pointer argument
		for struct bfd_link_info.
		* libbfd.h: Regenerate.
		* libecoff.h (ecoff_backend_data): Add a pointer argument for
		struct bfd_link_info to get_elt_at_filepos.
		* linker.c (_bfd_generic_link_add_archive_symbols): Pass info to
		_bfd_get_elt_at_filepos.

2022-01-04  Lancelot SIX  <lancelot.six@amd.com>

	gdb/testsuite: fix inferior-clone.exp for native-extended-gdbserver
	003aae076207dbf32f98ba846158fc32669ef85f (gdb: Copy inferior properties
	in clone-inferior) introduced a testcase that fails when testing with
	the native-extended-gdbserver board:

	    Running ../gdb/testsuite/gdb.base/inferior-clone.exp ...
	    FAIL: gdb.base/inferior-clone.exp: inferior 2: clone-inferior
	    FAIL: gdb.base/inferior-clone.exp: inferior 3: clone-inferior

	The error is as follows:

	    clone-inferior
	    [New inferior 2]
	    Added inferior 2 on connection 1 (extended-remote localhost:2346)
	    (gdb) FAIL: gdb.base/inferior-clone.exp: inferior 2: clone-inferior

	This fails because the testcase only expect the 'Added inferior 2' part
	of the message.  The 'on connection 1 [...]' part is unexpected.

	Fix by adjusting the testcase to a account for the possible trailing
	part of the message.

	Tested on x86_64-linux with native-extende-gdbserver and unix boards.

	Change-Id: Ie3d6f04c9ffe9cab1fbda8ddf4935ee09b858c7a

2022-01-04  Nick Clifton  <nickc@redhat.com>

	Add ATTRIBUTE_UNUSED to load_build_id_debug_file()'s main_filename parameter.

2022-01-04  Andrew Burgess  <aburgess@redhat.com>

	gdb: don't pass nullptr to sigwait
	I tried building GDB on GNU/Hurd, and ran into this warning:

	  gdbsupport/scoped_ignore_signal.h:78:16: error: null argument where non-null required (argument 2) [-Werror=nonnull]

	This is because in this commit:

	  commit 99624310dd82542c389c89c2e55d8cae36bb74e1
	  Date:   Sun Jun 27 15:13:14 2021 -0400

	      gdb: fall back on sigpending + sigwait if sigtimedwait is not available

	A call to sigwait was introduced that passes nullptr as the second
	argument, this call is only reached if sigtimedwait is not supported.

	The original patch was written for macOS, I assume on that target
	passing nullptr as the second argument is fine.

	On my GNU/Linux box, the man-page for sigwait doesn't mention that
	nullptr is allowed for the second argument, so my assumption would be
	that nullptr is not OK, and, if I change the '#ifdef
	HAVE_SIGTIMEDWAIT' introduced by the above patch to '#if 0', and
	rebuild on GNU/Linux, I see the same warning that I see on GNU/Hurd.

	I propose that we stop passing nullptr as the second argument to
	sigwait, and instead pass a valid int pointer.  The value returned in
	the int can then be used in an assert.

	For testing, I (locally) made the change to the #ifdef I mentioned
	above, compiled GDB, and ran the usual tests, this meant I was using
	sigwait instead on sigtimedwait on GNU/Linux, I saw no regressions.

2022-01-04  Nick Clifton  <nickc@redhat.com>

	Remove a spurious debugging message.
		PR 28716
		* dwarf.c (load_build_id_debug_file): Remove spurious printf.

2022-01-04  Tom de Vries  <tdevries@suse.de>

	[gdb/build] Fix build breaker in gdb/cli/cli-logging.c
	Fix build breaker in gdb/cli/cli-logging.c:
	...
	gdb/cli/cli-logging.c: In function \
	  ‘void show_logging_enabled(ui_file*, int, cmd_list_element*, const char*)’:
	gdb/gdbsupport/gdb_locale.h:28:28: error: cannot convert ‘char*’ to ‘ui_file*’
	   28 | # define _(String) gettext (String)
	      |                    ~~~~~~~~^~~~~~~~
	      |                            |
	      |                            char*
	gdb/cli/cli-logging.c:202:25: note: in expansion of macro ‘_’
	  202 |     fprintf_unfiltered (_("on: Logging is enabled.\n"));
	      |                         ^
	...

	Build and tested on x86_64-linux.

	Fixes: 45aec4e5ed8 ("[gdb/cli] Improve show logging output")

2022-01-04  Jan Beulich  <jbeulich@suse.com>

	x86/Intel: correct VFPCLASSP{S,D} handling when displacement is present
	fits_in_disp8() can be called before ambiguous operands get resolved
	or rejected (in process_suffix()), which requires that i.memshift be
	non-negative to avoid an internal error. This case wasn't covered by
	6c0946d0d28d ("x86: correct VFPCLASSP{S,D} operand size handling").

2022-01-04  Jan Beulich  <jbeulich@suse.com>

	gas: rework handling of backslashes in quoted symbol names
	Strange effects can result from the present handling, e.g.:

	.if 1
	"backslash\\":
	.endif

	yields first (correctly) "missing closing `"'" but then also "invalid
	character '\' in mnemonic" and further "end of file inside conditional".
	Symbols names ending in \ are in principle not expressable with that
	scheme.

	Instead of recording whether a backslash was seen, inspect the
	subsequent character right away. Only accept \\ (meaning a single
	backslash in the resulting symbol name) and \" (meaning an embedded
	double quote in the resulting symbol name) for now, warning about any
	other combination.

	While perhaps not necessary immediately, also permit concatenated
	strings to form a symbol name. This may become useful if going forward
	we would want to support \<octal> or \x<hex> sequences, where closing
	and re-opening quotes can be useful to delimit such sequences.

	The ELF "Multibyte symbol names" test gets switched away from using
	.set, as that would now also mean excluding nios2 and pru. By using
	.equiv instead, even the existing #notarget can be dropped. (For h8300
	the .section directive additionally needs attributes specified, to avoid
	a target specific warning.)

2022-01-04  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-03  Tom de Vries  <tdevries@suse.de>

	[gdb/cli] Improve show logging output
	Before commit 3b6acaee895 "Update more calls to add_prefix_cmd" we had the
	following output for "show logging":
	...
	$ gdb -q -batch -ex "set trace-commands on" \
	    -ex "set logging off" \
	    -ex "show logging" \
	    -ex "set logging on" \
	    -ex "show logging"
	+set logging off
	+show logging
	Future logs will be written to gdb.txt.
	Logs will be appended to the log file.
	Output will be logged and displayed.
	Debug output will be logged and displayed.
	+set logging on
	+show logging
	Currently logging to "gdb.txt".
	Logs will be appended to the log file.
	Output will be logged and displayed.
	Debug output will be logged and displayed.
	...

	After that commit we have instead:
	...
	+set logging off
	+show logging
	debugredirect:  The logging output mode is off.
	file:  The current logfile is "gdb.txt".
	overwrite:  Whether logging overwrites or appends to the log file is off.
	redirect:  The logging output mode is off.
	+set logging on
	+show logging
	debugredirect:  The logging output mode is off.
	file:  The current logfile is "gdb.txt".
	overwrite:  Whether logging overwrites or appends to the log file is off.
	redirect:  The logging output mode is off.
	...
	which gives less clear output for some subcommands.

	OTOH, it's explicit about whether boolean values are on or off.

	The new text seems to have been chosen to match the set/show help texts:
	...
	(gdb) help show logging
	Show logging options.

	List of show logging subcommands:

	show logging debugredirect -- Show the logging debug output mode.
	show logging file -- Show the current logfile.
	show logging overwrite -- \
	  Show whether logging overwrites or appends to the log file.
	show logging redirect -- Show the logging output mode.
	...

	Make the show logging messages more clear, while still keep the boolean
	values explicit, such that we have:
	...
	$ ./gdb.sh -q -batch -ex "show logging"
	logging debugredirect:  off: \
	  Debug output will go to both the screen and the log file.
	logging enabled:  off: Logging is disabled.
	logging file:  The current logfile is "gdb.txt".
	logging overwrite:  off: Logging appends to the log file.
	logging redirect:  off: Output will go to both the screen and the log file.
	...

	Tested on x86_64-linux.

2022-01-03  Tom Tromey  <tromey@adacore.com>

	Fix use of 'printf' in gdbtypes.c
	An earlier patch of mine, commit 64b7cc50 ("Remove
	gdb_print_host_address") inadvertently changed a function in
	gdbtypes.c to use printf rather than printf_filtered.  This patch
	fixes the problem.

	Fix regression in page-logging.exp
	Simon and Tom pointed out that page-logging.exp failed on their
	machines.  Tom tracked this down to the "width" setting.  Since
	there's no need in the test to change the width, it seems simplest to
	remove the setting.  I confirmed that the test still fails if the fix
	is backed out, ensuring that the test is still testing what it
	purports to.

	Small indentation fix in eval.c
	I noticed that the AdaCore tree had a small divergence in eval.c -- it
	had a fix for an indentation problem in binop_promote.  I'm checking
	in this small fix as obvious.

2022-01-03  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Handle for loop initial decl with gcc 4.8.5
	When running test-case gdb.threads/schedlock-thread-exit.exp on a system with
	system compiler gcc 4.8.5, I run into:
	...
	src/gdb/testsuite/gdb.threads/schedlock-thread-exit.c:33:3: error: \
	  'for' loop initial declarations are only allowed in C99 mode
	...

	Fix this by:
	- using -std=c99, or
	- using -std=gnu99, in case that's required, or
	- in the case of the jit test-cases, rewriting the for loops.

	Tested on x86_64-linux, both with gcc 4.8.5 and gcc 7.5.0.

2022-01-03  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-02  Tom Tromey  <tom@tromey.com>

	Update copying.awk for _initialize declaration patch
	Commit 6c265988 ("gdb: add back declarations for _initialize
	functions") modified copying.c, but not copying.awk.  This patch
	updates copying.awk to backport the appropriate fix.  This way, if
	copying.awk is run again, it will create the correct output.

	I'm checking this in as obvious.

2022-01-02  Tom Tromey  <tom@tromey.com>

	Use filtered output in print_i387_ext
	print_i387_ext mostly uses filtered output, but one call in the middle
	of the function uses the _unfiltered form.  This patch fixes this
	call.  I'm checking this in as obvious.

2022-01-02  Alan Modra  <amodra@gmail.com>

	Update year range in copyright notice of binutils files
	The result of running etc/update-copyright.py --this-year, fixing all
	the files whose mode is changed by the script, plus a build with
	--enable-maintainer-mode --enable-cgen-maint=yes, then checking
	out */po/*.pot which we don't update frequently.

	The copy of cgen was with commit d1dd5fcc38ead reverted as that commit
	breaks building of bfp opcodes files.

2022-01-02  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2022-01-01  Mike Frysinger  <vapier@gentoo.org>

	gdb: copyright: fix a few comment typos

	sim: ppc: drop natural types
	These are almost entirely unused.  For the very few places using them,
	replace with explicit signed types.  This matches what was done in the
	common sim code.

	sim: mips: clean up bad style/whitespace
	This doesn't fix all the problems, but grabs a bunch of the more
	obvious ones.

	sim: tweak copyright lines for gnulib update-copyright
	The regex it uses does not like so many leading spaces which causes
	it to think the files lack copyright.  Trim them down so the script
	can find & update them accordingly.

	gdb: update sim mips testsuite copyright exemption
	The sim testsuite was reorganized last year, so update the path.

2022-01-01  Mike Frysinger  <vapier@gentoo.org>

	unify 64-bit bfd checks
	Move the 64-bit bfd logic out of bfd/configure.ac and into bfd64.m4
	under config so it can be shared between all the other subdirs.

	This replaces want64 with enable_64_bit_bfd which was already being
	declared, but not used directly.

2022-01-01  Joel Brobecker  <brobecker@adacore.com>

	Update Copyright year in gdb/testsuite/gdb.arch/powerpc-power10.exp
	This commit updates the copyright year range in the script
	gdb/testsuite/gdb.arch/powerpc-power10.exp. The update was
	performed by running gdb/copyright.py again, to make sure
	that the copyright year range will be automatically updated
	in years forward.

2022-01-01  Joel Brobecker  <brobecker@adacore.com>

	Fix copyright header in gdb/testsuite/gdb.arch/powerpc-power10.exp
	The copyright year and holder line is slight malformed, missing
	a space after a comma, and this is sufficient for gdb's
	copyright.py script to miss this file during its automated
	copyright year update.

	This commit fixes this.

2022-01-01  Joel Brobecker  <brobecker@adacore.com>

	gdb/copyright.py: Add update-netbsd.sh to MULTIPLE_COPYRIGHT_HEADERS
	Add gdb/syscalls/update-netbsd.sh to the reminder printed
	at the end of the execution listing all the files where
	a manual update of the copyright header is needed. This
	scripts contains some inline code which includes a copyright
	header.

	Manual copyright year update of various GDB files
	This commit updates the copyright year in some files where
	we have a copyright year outside of the copyright year,
	and thus are not included in gdb's copyright.py script.

2022-01-01  Joel Brobecker  <brobecker@adacore.com>

	Automatic Copyright Year update after running gdb/copyright.py
	This commit brings all the changes made by running gdb/copyright.py
	as per GDB's Start of New Year Procedure.

	For the avoidance of doubt, all changes in this commits were
	performed by the script.

2022-01-01  Joel Brobecker  <brobecker@adacore.com>

	Update Copyright Year in gdb, gdbserver and gdbreplay version output
	This commit changes the copyright year printed by gdb, gdbserver
	and gdbreplay when printing the tool's version.

2022-01-01  Alan Modra  <amodra@gmail.com>

	ubsan: next_char_of_string signed integer overflow
	Squash another totally useless fuzz report that I should have ignored.

		* read.c (next_char_of_string): Avoid integer overflow.

2022-01-01  Alan Modra  <amodra@gmail.com>

	ubsan: bfd_mach_o_build_commands shift exponent 64 is too large
		* mach-o.c (bfd_mach_o_read_section_32): Limit alignment further.
		(bfd_mach_o_read_section_64): Likewise.

2022-01-01  Alan Modra  <amodra@gmail.com>

	ubsan: signed integer multiply overflow
	9223371018427387904 * 2 cannot be represented in type 'long', yes, but
	we don't care.

		* expr.c (expr): Avoid signed overflow.

2022-01-01  Alan Modra  <amodra@gmail.com>

	asan: Null-dereference in _bfd_xcoff_copy_private_bfd_data
	sec->output_section will be NULL when objcopy removes sections.

		* coff-rs6000.c (_bfd_xcoff_copy_private_bfd_data): Protect against
		objcopy removing sections.

2022-01-01  Alan Modra  <amodra@gmail.com>

	ubsan: integer overflow in section filepos subtraction
		* elf.c (assign_file_positions_for_non_load_sections): Avoid
		signed integer overflow.

2022-01-01  Alan Modra  <amodra@gmail.com>

	Remove unnecessary ELF_MINPAGESIZE defines
	The idea of this patch is to make it easy to see which targets (just
	sparc) have ELF_MINPAGESIZE != ELF_COMMONPAGESIZE.

		* elf32-arm.c (ELF_MINPAGESIZE): Don't define.
		* elf32-metag.c: Likewise.
		* elfnn-aarch64.c: Likewise.
		* elf64-x86-64.c: Likewise.  Also don't redefine a bunch of other
		macros for l1om elf64-target.h use that are unchanged from default.

2022-01-01  H.J. Lu  <hjl.tools@gmail.com>

	ld-x86-64: Pass options to linker with "-Wl,"
		* testsuite/ld-x86-64/x86-64.exp: Pass options to linker with
		"-Wl,".

2022-01-01  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-31  Tom Tromey  <tom@tromey.com>

	Do not call reinitialize_more_filter from avr_io_reg_read_command
	avr_io_reg_read_command is an ordinary gdb command, and so should not
	be calling reinitialize_more_filter.  This patch removes it.  I'm
	checking this in as obvious.  Tested by rebuilding.

2021-12-31  H.J. Lu  <hjl.tools@gmail.com>

	x86: Define check_relocs_failed in elfxx-x86.h
		* elf32-i386.c (check_relocs_failed): Moved to ...
		* elfxx-x86.h (check_relocs_failed): Here.  New.
		* elf64-x86-64.c (check_relocs_failed): Removed.

	Define X86_PCREL_TYPE_P/X86_SIZE_TYPE_P in elfxx-x86.h
		* elf32-i386.c: Don't include "elf/i386.h".
		(X86_PCREL_TYPE_P): Removed.
		(X86_SIZE_TYPE_P): Likewise.
		(elf_i386_check_relocs): Pass false to NEED_DYNAMIC_RELOCATION_P.
		(elf_i386_relocate_section): Pass false to
		GENERATE_DYNAMIC_RELOCATION_P and COPY_INPUT_RELOC_P.
		* elf64-x86-64.c: Don't include "elf/x86-64.h".
		(X86_PCREL_TYPE_P): Removed.
		(X86_SIZE_TYPE_P): Likewise.
		(elf_x86_64_check_relocs): Pass true to NEED_DYNAMIC_RELOCATION_P
		and X86_PCREL_TYPE_P.
		(elf_x86_64_relocate_section): Pass true to X86_PCREL_TYPE_P,
		X86_SIZE_TYPE_P, GENERATE_DYNAMIC_RELOCATION_P and
		COPY_INPUT_RELOC_P.
		* elfxx-x86.c: Don't include "elf/i386.h" nor "elf/x86-64.h".
		* elfxx-x86.h (X86_64_PCREL_TYPE_P): New.
		(I386_PCREL_TYPE_P): Likewise.
		(X86_PCREL_TYPE_P): Likewise.
		(X86_64_SIZE_TYPE_P): Likewise.
		(I386_SIZE_TYPE_P): Likewise.
		(X86_SIZE_TYPE_P): Likewise.
		(NEED_DYNAMIC_RELOCATION_P): Add IS_X86_64 and pass it to
		X86_PCREL_TYPE_P.
		(COPY_INPUT_RELOC_P): Likewise.
		(GENERATE_DYNAMIC_RELOCATION_P): Add IS_X86_64, pass it to
		X86_PCREL_TYPE_P and X86_SIZE_TYPE_P.

2021-12-31  Tamar Christina  <tamar.christina@arm.com>

	ld: fix coff PE SEH
	COFF_WITH_pex64 and COFF_WITH_peAArch64 can't be true at the same time.
	That means that two conditionals that control the sorting of the .pdata section
	became a falsum.

	The testsuite doesn't catch this because the linker does the sorting and to link
	you require library support from the unwinder so we can't test from binutils in
	isolation.

	bfd/ChangeLog:

	2021-12-31  Tamar Christina  <tamar.christina@arm.com>

		PR ld/28682
		* peXXigen.c: Fix conditional.

2021-12-31  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-30  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-29  Tom Tromey  <tom@tromey.com>

	Use filtered output in show callbacks
	"show" command callbacks, like most ordinary gdb commands, should use
	filtered output.  I found a few that did not, so this patch changes
	them to use the filtered form.

2021-12-29  Tom Tromey  <tom@tromey.com>

	Consistently Use ui_file parameter to show callbacks
	I happened to notice that one "show" callback was printing to
	gdb_stdout rather than to the passed-in ui_file parameter.  I went
	through all such callbacks and fixed them to consistently use the
	ui_file.

	Regression tested on x86-64 Fedora 34.

2021-12-29  Tom Tromey  <tom@tromey.com>

	Use gdb_stdlog for MI debugging
	When MI debugging is enabled, the logging output should be sent to
	gdb_stdlog.  This is part of PR gdb/7233.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=7233

2021-12-29  Tom Tromey  <tom@tromey.com>

	Use debug_prefixed_printf_cond_nofunc in index-cache
	This changes index-cache.c to use debug_prefixed_printf_cond_nofunc.
	As a side effect, logs are now written to gdb_stdlog.  This is part of
	PR gdb/7233.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=7233

2021-12-29  Tom Tromey  <tom@tromey.com>

	Send minsym logging to gdb_stdlog
	This changes minsyms.c to send logging output to gdb_stdlog.  This is
	part of PR gdb/7233.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=7233

2021-12-29  Tom Tromey  <tom@tromey.com>

	Use gdb_stdlog for separate debug file logging
	This changes the separate debug file logging code (spread across two
	files) to use gdb_stdlog for its output.  This is part of PR gdb/7233.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=7233

2021-12-29  Tom Tromey  <tom@tromey.com>

	Use debug_prefixed_printf_cond_nofunc in machoread
	This changes machoread.c to use debug_prefixed_printf_cond_nofunc.  As
	a side effect, the logs are now written to gdb_stdlog.  This is part
	of PR gdb/7233.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=7233

2021-12-29  Tom Tromey  <tom@tromey.com>

	Use debug_prefixed_printf_cond_nofunc in microblaze.c
	This changes microblaze.c to use the standard logging macro.  As a
	side effect, logs will now go to gdb_stdlog.  This is part of PR gdb/7233.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=7233

2021-12-29  Tom Tromey  <tom@tromey.com>

	Send debugging data to gdb_stdlog in mips-linux-nat.c
	This changes mips-linux-nat.c to send some logging output to
	gdb_stdlog, rather than stdout.  This is part of PR gdb/7233.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=7233

2021-12-29  Tom Tromey  <tom@tromey.com>

	Send arch-utils error messages to gdb_stderr
	This changes arch-utils.c to send some error messages to gdb_stderr.
	This is part of PR gdb/7233.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=7233

2021-12-29  Tom Tromey  <tom@tromey.com>

	Use correct stream for process record output
	The process record code often emits unfiltered output.  In some cases,
	this output ought to go to gdb_stderr (but see below).  In other
	cases, the output is guarded by a logging variable and so ought to go
	to gdb_stdlog.  This patch makes these changes.

	Note that in many cases, the output to stderr is followed by a
	"return -1", which is how process record indicates an error.  It seems
	to me that calling error here would be preferable, because, in many
	cases, that's all the caller does when it sees a -1.  However, I
	haven't made this change.

	This is part of PR gdb/7233.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=7233

2021-12-29  Tom Tromey  <tom@tromey.com>

	Send jit.c errors to gdb_stderr
	jit.c writes some error messages to gdb_stdout, but using gdb_stderr
	is better.  This is part of PR gdb/7233.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=7233

2021-12-29  Tom Tromey  <tom@tromey.com>

	Fix logging redirection bug with pager
	I noticed yesterday that if gdb output is redirected to a file, the
	pager will still be active.  This is irritating, because the output
	isn't actually visible -- just the pager prompt.  Looking in bugzilla,
	I found that this had been filed 17 years ago, as PR cli/8798.

	This patch fixes the bug.  It changes the pagination code to query the
	particular ui-file to see if paging is allowable.  The ui-file
	implementations are changed so that only the stdout implementation and
	a tee (where one sub-file is stdout) can page.

	Regression tested on x86-64 Fedora 34.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=8798

2021-12-29  Tom Tromey  <tom@tromey.com>

	Remove unusual use of core_addr_eq and core_addr_hash
	gdbtypes.h uses core_addr_eq and core_addr_hash in a weird way: taking
	the address of a member and then passing this (as a void*) to these
	functions.

	It seems better to simply inline the ordinary code here.  CORE_ADDR is
	a scalar so it can be directly compared, and the identity hash
	function seems safe to assume as well.

	After this, core_addr_eq and core_addr_hash are unused, so this patch
	removes them.

2021-12-29  Lancelot SIX  <lancelot.six@amd.com>

	gdb: Copy inferior properties in clone-inferior
	This commit ensures that the following settings are cloned from one
	inferior to the new one when processing the clone-inferior command:
	  - inferior-tty
	  - environment variables
	  - cwd
	  - args

	Some of those parameters can be passed as command line arguments to GDB
	(-args and -tty), so one could expect the clone-inferior to respect
	those flags.  The following debugging session illustrates that:

	    gdb -nx -quiet -batch \
	         -ex "show args" \
	         -ex "show inferior-tty" \
	         -ex "clone-inferior" \
	         -ex "inferior 2" \
	         -ex "show args" \
	         -ex "show inferior-tty" \
	         -tty=/some/tty \
	         -args echo foo bar
	    Argument list to give program being debugged when it is started is "foo bar".
	    Terminal for future runs of program being debugged is "/some/tty".
	    [New inferior 2]
	    Added inferior 2.
	    [Switching to inferior 2 [<null>] (/bin/echo)]
	    Argument list to give program being debugged when it is started is "".
	    Terminal for future runs of program being debugged is "".

	The other properties this commit copies on clone (i.e. CWD and the
	environment variables) are included since they are related (in the sense
	that they influence the runtime behavior of the program) even if they
	cannot be directly set using command line switches.

	There is a chance that this patch changes existing user workflow.  I
	think that this change is mostly harmless.  If users want to start a new
	inferior based on an existing one, they probably already propagate those
	settings to the new inferior in some way.

	Tested on x86_64-linux.

	Change-Id: I3b1f28b662f246228b37bb24c2ea1481567b363d

2021-12-29  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-28  H.J. Lu  <hjl.tools@gmail.com>

	elf32-i386: Fix a typo in GOT comments
	Entry offsets in the global offset table are multiples of 4, not 8.

		* elf32-i386.c (elf_i386_relocate_section): Fix a typo in GOT
		comments.

2021-12-28  H.J. Lu  <hjl.tools@gmail.com>

	bfd: Don't check non-thin archive member file size
	There is no need to check member file size for thin archive member.

		* bfdio.c (bfd_bread): Don't check non-thin archive member file
		size.

2021-12-28  Alan Modra  <amodra@gmail.com>

	gas reloc sorting
	In some cases, eg. riscv_pre_output_hook, gas generates out-of-order
	relocations.  Various places in the linker assume relocs are sorted
	by increasing r_offset, which is normally the case.  Provide
	GAS_SORT_RELOCS to handle unsorted relocs.

	bfd/
		PR 28709
		* elf32-nds32.c (nds32_insertion_sort): Make static.
		* elf32-nds32.h (nds32_insertion_sort): Delete declaration.
	gas/
		PR 28709
		* write.c (write_relocs): Implement reloc sorting by r_offset
		when GAS_SORT_RELOCS.
		* config/tc-nds32.c (compar_relent, nds32_set_section_relocs): Delete.
		* config/tc-nds32.h (nds32_set_section_relocs): Don't declare.
		(SET_SECTION_RELOCS): Don't define.
		(GAS_SORT_RELOCS): Define.
		* config/tc-riscv.h (GAS_SORT_RELOCS): Define.

2021-12-28  jiawei  <jiawei@iscas.ac.cn>

	ld: Fix testcase errors due to -shared not support.
	Reviewed-by: Jim Wilson <jim.wilson.gcc@gmail.com>

	ld/ChangeLog:

	        * testsuite/ld-ctf/ctf.exp: Add shared lib check.
	        * testsuite/ld-plugin/lto.exp: Add lto shared check.

2021-12-28  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-27  H.J. Lu  <hjl.tools@gmail.com>

	elf: Update comments for check_relocs in elf_backend_data
	Since

	commit 5c3261b0e834647cf9eb555320e20871b7854f98
	Author: H.J. Lu <hjl.tools@gmail.com>
	Date:   Mon Oct 16 03:49:54 2017 -0700

	    ELF: Call check_relocs after opening all inputs

	check_relocs is called after opening all inputs.

		* elf-bfd.h (elf_backend_data::check_relocs): Update comments.

2021-12-27  H.J. Lu  <hjl.tools@gmail.com>

	ld: Remove emultempl/linux.em
	Remove emultempl/linux.em whose last usage was removed by

	commit c65c21e1ffd1e02d9970a4bca0b7e384788a50f0
	Author: Alan Modra <amodra@gmail.com>
	Date:   Mon Apr 16 22:14:01 2018 +0930

	    various i386-aout and i386-coff target removal

	    Also tidies some other aout leftovers in binutils-common.exp.

2021-12-27  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-26  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-25  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-24  Tom Tromey  <tom@tromey.com>

	Remove gdb_print_host_address
	gdb_print_host_address is just a simple wrapper around
	fprintf_filtered.  However, it is readily replaced in all callers by a
	combination of %s and call to host_address_to_string.  This also
	simplifies the code, so I think it's worthwhile to remove this
	function.

	Regression tested on x86-64 Fedora 64.

2021-12-24  Tom Tromey  <tom@tromey.com>

	Move gdb_bfd_errmsg to gdb_bfd.c
	gdb_bfd.c contains most of gdb's BFD-related utility functions.
	However, gdb_bfd_errmsg is in utils.c.  It seemed better to me to move
	this out of util.[ch] and into the BFD-related file instead.

	Tested by rebuilding.

2021-12-24  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: Rewrite the csr testcases.
	Maskray (Fangrui Song) had suggested me before that we should combine
	multiple testcases into one file as possible as we can.  So that we can
	more easily understand what these test cases are testing, and easier to
	maintain.  Therefore, this patch rewrites all csr testcases, to make them
	more clean.

	gas/
		* testsuite/gas/riscv/csr-fail-nonexistent.d: Renamed from
		priv-reg-fail-nonexistent testcase.
		* testsuite/gas/riscv/csr-fail-nonexistent.: Likewise.
		* testsuite/gas/riscv/csr-fail-nonexistent.s: Likewise.
		* testsuite/gas/riscv/csr-insns-pseudo-noalias.d: Renamed from
		priv-reg-pseudo testcase.
		* testsuite/gas/riscv/csr-insns-pseudo.d: Likewise.
		* testsuite/gas/riscv/csr-insns-pseudo.s: Likewise.
		* testsuite/gas/riscv/csr-insns-read-only.d: Renamed from
		priv-reg-fail-read-only-02 testcase.
		* testsuite/gas/riscv/csr-insns-read-only.l: Likewise.
		* testsuite/gas/riscv/csr-insns-read-only.s: Likewise.
		* testsuite/gas/riscv/h-ext-32.d: Moved hypervisor csrs to csr.s.
		* testsuite/gas/riscv/h-ext-32.s: Likewise.
		* testsuite/gas/riscv/h-ext-64.d: Likewise.
		* testsuite/gas/riscv/h-ext-64.s: Likewise.
		* testsuite/gas/riscv/csr.s: Renamed from priv-reg.s, and then
		added the hypervisor csrs.
		* testsuite/gas/riscv/csr-version-1p9p1.d: The csr testcase when
		the privileged spec is 1.9.1.  Also tested all invalid csr warnings
		when -mcsr-check is enabled.
		* testsuite/gas/riscv/csr-version-1p9p1.l: Likewise.
		* testsuite/gas/riscv/csr-version-1p10.d: Likewise, but the
		privileged spec is 1.10..
		* testsuite/gas/riscv/csr-version-1p10.l: Likewise.
		* testsuite/gas/riscv/csr-version-1p11.d: Likewise, but the
		privileged spec is 1.11.
		* testsuite/gas/riscv/csr-version-1p11.l: Likewise.
		* testsuite/gas/riscv/csr-version-1p12.d: Likewise, but the
		privileged spec is 1.12.
		* testsuite/gas/riscv/csr-version-1p12.l: Likewise.
		* testsuite/gas/riscv/priv-reg*: Removed or Renamed.

2021-12-24  Vineet Gupta  <vineetg@rivosinc.com>

	RISC-V: Hypervisor ext: support Privileged Spec 1.12
	This is the Hypervisor Extension 1.0

	 - Hypervisor Memory-Management Instructions
	   HFENCE.VVMA, HFENCE.GVMA,

	 - Hypervisor Virtual Machine Load and Store Instructions
	   HLV.B, HLV.BU,          HSV.B,
	   HLV.H, HLV.HU, HLVX.HU, HSB.H,
	   HLV.W, HLV.WU, HLVX.WU, HSV.W,
	   HLV.D,                  HSV.D

	 - Hypervisor CSRs (some new, some address changed)
	   hstatus, hedeleg, hideleg, hie, hcounteren, hgeie, htval, hip, hvip,
	   htinst, hgeip, henvcfg, henvcfgh, hgatp, hcontext, htimedelta, htimedeltah,
	   vsstatus, vsie, vstvec, vsscratch, vsepc, vscause, vstval, vsip, vsatp,

	Note that following were added already as part of svinval extension
	support:
	   HINVAL.GVMA, HINVAL.VVMA

	Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
	Reviewed-by: Nelson Chu <nelson.chu@sifive.com>

	bfd/
		* cpu-riscv.c (riscv_priv_specs): Added entry for 1.12.
		* cpu-riscv.h (enum riscv_spec_class): Added PRIV_SPEC_CLASS_1P12.
	gas/
		* config/tc-riscv.c (abort_version): Updated comment.
		(validate_riscv_insn): Annotate switch-break.
		* testsuite/gas/riscv/h-ext-32.d: New testcase for hypervisor.
		* testsuite/gas/riscv/h-ext-32.s: Likewise.
		* testsuite/gas/riscv/h-ext-64.d: Likewise.
		* testsuite/gas/riscv/h-ext-64.s: Likewise.
	include/
		* opcode/riscv-opc.h: Added encodings for hypervisor csrs and
		instrcutions.
	opcodes/
		* riscv-opc.c (riscv_opcodes): Added hypervisor instrcutions.

2021-12-24  Vineet Gupta  <vineetg@rivosinc.com>

	RISC-V: Hypervisor ext: drop Privileged Spec 1.9.1 implementation/tests
	This makes way for a clean 1.12 based Hypervisor Ext support.

	There are no known implementors of 1.9.1 H-ext. (Per Jim, kendryte k210
	is based on priv spec 1.9.1, but it seems unlikely that they implemented
	H-ext).

	Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
	Reviewed-by: Nelson Chu <nelson.chu@sifive.com>

	gas/
		* testsuite/gas/riscv/csr-dw-regnums.d: Drop the hypervisor csrs
		defined in the privileged spec 1.9.1.
		* testsuite/gas/riscv/csr-dw-regnums.s: Likewise.
		* testsuite/gas/riscv/priv-reg-fail-read-only-01.s: Likewise.
		* testsuite/gas/riscv/priv-reg-fail-version-1p10.l: Likewise.
		* testsuite/gas/riscv/priv-reg-fail-version-1p11.l: Likewise.
		* testsuite/gas/riscv/priv-reg-version-1p10.d: Likewise.
		* testsuite/gas/riscv/priv-reg-version-1p11.d: Likewise.
		* testsuite/gas/riscv/priv-reg-version-1p9p1.d: Likewise.
		* testsuite/gas/riscv/priv-reg.s: Likewise.
	include/
		* opcode/riscv-opc.h: Drop the hypervisor csrs defined in the
		privileged spec 1.9.1.

2021-12-24  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-23  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: resolve some duplicate testnames in gdb.mi
	Set of fixes to resolve some duplicate test names in the gdb.mi/
	directory.  There should be no real test changes after this set of
	fixes, they are all either:

	  - Adding with_test_prefix type constructs to make test names unique,
	    or

	  - Changing the test name to be more descriptive, or better reflect
	    the test being run.

2021-12-23  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb/remote: handle attach when stop packet lacks thread-id
	Bug PR gdb/28405 reports a regression when using attach with an
	extended-remote target.  In this case the target is not including a
	thread-id in the stop packet it sends back after the attach.

	The regression was introduced with this commit:

	  commit 8f66807b98f7634c43149ea62e454ea8f877691d
	  Date:   Wed Jan 13 20:26:58 2021 -0500

	      gdb: better handling of 'S' packets

	The problem is that when GDB processes the stop packet, it sees that
	there is no thread-id and so has to "guess" which thread the stop
	should apply to.

	In this case the target only has one thread, so really, there's no
	guessing needed, but GDB still runs through the same process, this
	shouldn't cause us any problems.

	However, after the above commit, GDB now expects itself to be more
	internally consistent, specifically, only a thread that GDB thinks is
	resumed, can be a candidate for having stopped.

	It turns out that, when GDB attaches to a process through an
	extended-remote target, the threads of the process being attached too,
	are not, initially, marked as resumed.

	And so, when GDB tries to figure out which thread the stop might apply
	too, it finds no threads in the processes marked resumed, and so an
	assert triggers.

	In extended_remote_target::attach we create a new thread with a call
	to add_thread_silent, rather than remote_target::remote_add_thread,
	the reason is that calling the latter will result in a call to
	'add_thread' rather than 'add_thread_silent'.  However,
	remote_target::remote_add_thread includes additional
	actions (i.e. calling remote_thread_info::set_resumed and set_running)
	which are missing from extended_remote_target::attach.  These missing
	calls are what would serve to mark the new thread as resumed.

	In this commit I propose that we add an extra parameter to
	remote_target::remote_add_thread.  This new parameter will force the
	new thread to be added with a call to add_thread_silent.  We can now
	call remote_add_thread from the ::attach method, the extra
	actions (listed above) will now be performed, and the thread will be
	left in the correct state.

	Additionally, in PR gdb/28405, a segfault is reported.  This segfault
	triggers when 'set debug remote 1' is used before trying to reproduce
	the original assertion failure.  The cause of this is in
	remote_target::select_thread_for_ambiguous_stop_reply, where we do
	this:

	  remote_debug_printf ("first resumed thread is %s",
			       pid_to_str (first_resumed_thread->ptid).c_str ());
	  remote_debug_printf ("is this guess ambiguous? = %d", ambiguous);

	  gdb_assert (first_resumed_thread != nullptr);

	Notice that when debug printing is on we dereference
	first_resumed_thread before we assert that the pointer is not
	nullptr.  This is the cause of the segfault, and is resolved by moving
	the assert before the debug printing code.

	I've extended an existing test, ext-attach.exp, so that the original
	test is run multiple times; we run in the original mode, as normal,
	but also, we now run with different packets disabled in gdbserver.  In
	particular, disabling Tthread would trigger the assertion as it was
	reported in the original bug.  I also run the test in all-stop and
	non-stop modes now for extra coverage, we also run the tests with
	target-async enabled, and disabled.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28405

2021-12-23  Andrew Burgess  <aburgess@redhat.com>

	gdb: on x86-64 non-trivial C++ objects are returned in memory
	Fixes PR gdb/28681.  It was observed that after using the `finish`
	command an incorrect value was displayed in some cases.  Specifically,
	this behaviour was observed on an x86-64 target.

	Consider this test program:

	  struct A
	  {
	    int i;

	    A ()
	    { this->i = 0; }
	    A (const A& a)
	    { this->i = a.i; }
	  };

	  A
	  func (int i)
	  {
	    A a;
	    a.i = i;
	    return a;
	  }

	  int
	  main ()
	  {
	    A a = func (3);
	    return a.i;
	  }

	And this GDB session:

	  $ gdb -q ex.x
	  Reading symbols from ex.x...
	  (gdb) b func
	  Breakpoint 1 at 0x401115: file ex.cc, line 14.
	  (gdb) r
	  Starting program: /home/andrew/tmp/ex.x

	  Breakpoint 1, func (i=3) at ex.cc:14
	  14	  A a;
	  (gdb) finish
	  Run till exit from #0  func (i=3) at ex.cc:14
	  main () at ex.cc:23
	  23	  return a.i;
	  Value returned is $1 = {
	    i = -19044
	  }
	  (gdb) p a
	  $2 = {
	    i = 3
	  }
	  (gdb)

	Notice how after the `finish` the contents of $1 are junk, but, when I
	immediately ask for the value of `a`, I get back the correct value.

	The problem here is that after the finish command GDB calls the
	function amd64_return_value to figure out where the return value can
	be found (on x86-64 targets anyway).

	This function makes the wrong choice for the struct A in our case, as
	sizeof(A) <= 8, then amd64_return_value decides that A will be
	returned in a register.  GDB then reads the return value register an
	interprets the contents as an instance of A.

	Unfortunately, A is not trivially copyable (due to its copy
	constructor), and the sys-v specification for argument and return
	value passing, says that any non-trivial C++ object should have space
	allocated for it by the caller, and the address of this space is
	passed to the callee as a hidden first argument.  The callee should
	then return the address of this space as the return value.

	And so, the register that GDB is treating as containing an instance of
	A, actually contains the address of an instance of A (in this case on
	the stack), this is why GDB shows the incorrect result.

	The call stack within GDB for where we actually go wrong is this:

	  amd64_return_value
	    amd64_classify
	      amd64_classify_aggregate

	And it is in amd64_classify_aggregate that we should be classifying
	the type as AMD64_MEMORY, instead of as AMD64_INTEGER as we currently
	do (via a call to amd64_classify_aggregate_field).

	At the top of amd64_classify_aggregate we already have this logic:

	  if (TYPE_LENGTH (type) > 16 || amd64_has_unaligned_fields (type))
	    {
	      theclass[0] = theclass[1] = AMD64_MEMORY;
	      return;
	    }

	Which handles some easy cases where we know a struct will be placed
	into memory, that is (a) the struct is more than 16-bytes in size,
	or (b) the struct has any unaligned fields.

	All we need then, is to add a check here to see if the struct is
	trivially copyable.  If it is not then we know the struct will be
	passed in memory.

	I originally structured the code like this:

	  if (TYPE_LENGTH (type) > 16
	      || amd64_has_unaligned_fields (type)
	      || !language_pass_by_reference (type).trivially_copyable)
	    {
	      theclass[0] = theclass[1] = AMD64_MEMORY;
	      return;
	    }

	This solved the example from the bug, and my small example above.  So
	then I started adding some more extensive tests to the GDB testsuite,
	and I ran into a problem.  I hit this error:

	  gdbtypes.h:676: internal-error: loc_bitpos: Assertion `m_loc_kind == FIELD_LOC_KIND_BITPOS' failed.

	This problem is triggered from:

	  amd64_classify_aggregate
	    amd64_has_unaligned_fields
	      field::loc_bitpos

	Inside the unaligned field check we try to get the bit position of
	each field.  Unfortunately, in some cases the field location is not
	FIELD_LOC_KIND_BITPOS, but is FIELD_LOC_KIND_DWARF_BLOCK.

	An example that shows this bug is:

	  struct B
	  {
	    short j;
	  };

	  struct A : virtual public B
	  {
	    short i;

	    A ()
	    { this->i = 0; }
	    A (const A& a)
	    { this->i = a.i; }
	  };

	  A
	  func (int i)
	  {
	    A a;
	    a.i = i;
	    return a;
	  }

	  int
	  main ()
	  {
	    A a = func (3);
	    return a.i;
	  }

	It is the virtual base class, B, that causes the problem.  The base
	class is represented, within GDB, as a field within A.  However, the
	location type for this field is a DWARF_BLOCK.

	I spent a little time trying to figure out how to convert the
	DWARF_BLOCK to a BITPOS, however, I realised that, in this case at
	least, conversion is not needed.

	The C++ standard says that a class is not trivially copyable if it has
	any virtual base classes.  And so, in this case, even if I could
	figure out the BITPOS for the virtual base class fields, I know for
	sure that I would immediately fail the trivially_copyable check.  So,
	lets just reorder the checks in amd64_classify_aggregate to:

	  if (TYPE_LENGTH (type) > 16
	      || !language_pass_by_reference (type).trivially_copyable
	      || amd64_has_unaligned_fields (type))
	    {
	      theclass[0] = theclass[1] = AMD64_MEMORY;
	      return;
	    }

	Now, if we have a class with virtual bases we will fail quicker, and
	avoid the unaligned fields check completely.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28681

2021-12-23  Andrew Burgess  <aburgess@redhat.com>

	gdb: make use of SCOPE_EXIT to manage thread executing state
	While working on another patch relating to how GDB manages threads
	executing and resumed state, I spotted the following code in
	record-btrace.c:

	  executing = tp->executing ();
	  set_executing (proc_target, inferior_ptid, false);

	  id = null_frame_id;
	  try
	    {
	      id = get_frame_id (get_current_frame ());
	    }
	  catch (const gdb_exception &except)
	    {
	      /* Restore the previous execution state.  */
	      set_executing (proc_target, inferior_ptid, executing);

	      throw;
	    }

	  /* Restore the previous execution state.  */
	  set_executing (proc_target, inferior_ptid, executing);

	  return id;

	I notice that we only catch the exception so we can call
	set_executing, and this is the same call to set_executing that we need
	to perform in the non-exception return path.

	This would be much cleaner if we could use SCOPE_EXIT to avoid the
	try/catch, so lets do that.

	While cleaning this up, I also applied a similar patch to
	record-full.c, though there's no try/catch in that case, but using
	SCOPE_EXIT makes the code safe if, in the future, we do start throwing
	exceptions.

	There should be no user visible changes after this commit.

2021-12-23  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-22  Andrew Burgess  <aburgess@redhat.com>

	gdb/doc: add some index entries relating to mi-async setting
	I noticed that the mi-async setting was not referenced from the index
	in any way, this commit tries to rectify that a bit.

	The @cindex lines I think are not controversial, these same index
	entries are used elsewhere in the manual for async related topics (see
	@node Background Execution).

	The only bit that might be controversial is that I've added a @kindex
	entry for 'set mi-async' when the command is documented as '-gdb-set
	mi-async' (with a similar difference for the show/-gdb-show).

	My reasoning here is that nothing else is indexed under -gdb-set or
	-gdb-show, and as -gdb-set/-gdb-show are just the MI equivalent for
	set/show anything that is documented under set/show can be adjusted
	using -gdb-set/-gdbshow, and so, I've tried to keep the index
	consistent for mi-async.

2021-12-22  Andrew Burgess  <aburgess@redhat.com>

	gdb: convert 'set debug lin-lwp' to a boolean command
	Convert the 'set debug lin-lwp' command to a boolean.  Adds a new
	LINUX_NAT_SCOPED_DEBUG_ENTER_EXIT macro, and makes use of it in one
	place (linux_nat_target::stop).

	The manual entry for 'set debug lin-lwp' is already vague about
	exactly what arguments this command takes, and the description talks
	about turning debug on and off, so I don't think there's any updates
	required there.

	I have updated the doc strings shown when the users enters 'help show
	debug lin-lwp' or 'help show debug lin-lwp'.  The old title lines used
	to talk about the 'GNU/Linux lwp module', but this debug flag is now
	used for any native linux target debug, so we now talk about
	'GNU/Linux native target'.  The body string for this setting has been
	changed from 'Enables printf debugging output.' to 'When on, print
	debug messages relating to the GNU/Linux native target.', the old
	value looks like a cut&paste error to me.

2021-12-22  Andrew Burgess  <aburgess@redhat.com>

	gdb: add threads debugging switch
	Add new commands:

	  set debug threads on|off
	  show debug threads

	Prints additional debug information relating to thread creation and
	deletion.

	GDB already announces when threads are created of course.... most of
	the time, but sometimes threads are added silently, in which case this
	debug message is the only mechanism to see the thread being added.
	Also, though GDB does announce when a thread exits, it doesn't
	announce when the thread object is deleted, I've added a debug message
	for that.

	Additionally, having message printed through the debug system will
	cause the messages to be nested to an appropriate depth when other
	debug sub-systems are turned on (especially things like `infrun` and
	`lin-lwp`).

2021-12-22  jiawei  <jiawei@iscas.ac.cn>

	RISC-V: Update Scalar Crypto testcases.
	Add opcodes in testcases to make sure every instruction generate
	right opcode after disassemble.

	gas/ChangeLog:

	        * testsuite/gas/riscv/k-ext-64.d: Add opcode detect.
	        * testsuite/gas/riscv/k-ext.d: Ditto.
	        * testsuite/gas/riscv/zbkb-32.d: Ditto.
	        * testsuite/gas/riscv/zbkb-64.d: Ditto.
	        * testsuite/gas/riscv/zbkc-32.d: Ditto.
	        * testsuite/gas/riscv/zbkc-64.d: Ditto.
	        * testsuite/gas/riscv/zbkx-32.d: Ditto.
	        * testsuite/gas/riscv/zbkx-64.d: Ditto.
	        * testsuite/gas/riscv/zknd-32.d: Ditto.
	        * testsuite/gas/riscv/zknd-64.d: Ditto.
	        * testsuite/gas/riscv/zkne-32.d: Ditto.
	        * testsuite/gas/riscv/zkne-64.d: Ditto.
	        * testsuite/gas/riscv/zknh-32.d: Ditto.
	        * testsuite/gas/riscv/zknh-64.d: Ditto.
	        * testsuite/gas/riscv/zksed-32.d: Ditto.
	        * testsuite/gas/riscv/zksed-64.d: Ditto.
	        * testsuite/gas/riscv/zksh-32.d: Ditto.
	        * testsuite/gas/riscv/zksh-64.d: Ditto.

2021-12-22  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbarch-components.py: change empty "params" tuples to empty lists
	During review, it was suggested to change the "params" parameter from a
	tuple to a list, for esthetic reasons.  The empty ones are still tuples
	though, they should probably be changed to be empty lists, for
	consistency.  It does not change anything in the script result.

	Change-Id: If13c6c527aa167a5ee5b45740e5f1bda1e9517e4

2021-12-22  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-21  Luis Machado  <luis.machado@linaro.org>

	[AArch64] Fix typo in error messages
	Fix mispelling of PROT_ME to PROT_MTE in the error messages.

2021-12-21  Joel Sherrill  <joel@rtems.org>

	Obsolete m32c-rtems and m32r-rtems
	2020-12-20  Joel Sherrill <joel@rtems.org>

	bfd/
		* config.bfd (m32c-*-rtems*): Remove target.

	ld/
		* configure.tgt (m32c-*-rtems*): Remove target.
		* configure.tgt (m32r-*-rtems*): Remove target.

2021-12-21  Jan Beulich  <jbeulich@suse.com>

	x86: -mfence-as-lock-add=yes doesn't work for 16-bit mode
	Rather than trying to fix this (which would require making an assumption
	on the upper half of %esp being zero), simply issue an error. While at
	it, since the generated code is in conflict with -momit-lock-prefix=yes,
	issue an error in that case as well.

	gas/ELF: avoid below-base ref in obj_elf_parse_section_letters()
	We would better be prepared for 'm' being the first character of the
	incoming string.

2021-12-21  Alan Modra  <amodra@gmail.com>

	Typo fixes in binutils doc
		* doc/binutils.texi: Fix typos.

2021-12-21  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-20  Tom Tromey  <tom@tromey.com>

	Remove print_spaces
	This removes the print_spaces helper function, in favor of using the
	"*%s" idiom that's already used in many places in gdb.  One spot (in
	symmisc.c) is changed to use print_spaces_filtered, because the rest
	of that function is using filtered output.  (This highlights one way
	that the printf idiom is better -- this error is harder to make when
	using that.)

	Regression tested on x86-64 Fedora 34.

2021-12-20  Tom Tromey  <tom@tromey.com>

	Remove puts_debug
	I noticed that puts_debug isn't used in the tree.  git log tells me
	that the last use was removed in 2015:

	    commit 40e0b27177e747600d3ec186458fe0e482a1cf77
	    Author: Pedro Alves <palves@redhat.com>
	    Date:   Mon Aug 24 15:40:26 2015 +0100

		Delete the remaining ROM monitor targets

	... and this commit mentions that the code being removed here probably
	hadn't worked for 6 years prior to that.

	Based on this, I'm removing puts_debug.  I don't think it's useful.
	Tested by rebuilding.

2021-12-20  Tom Tromey  <tom@tromey.com>

	Make n_spaces return a const char *
	n_spaces keeps the spaces in a static buffer.  If a caller overwrites
	these, it may give an incorrect result to a subsequent caller.  So,
	make the return type const to help avoid this outcome.

2021-12-20  Enze Li  <lienze2010@hotmail.com>

	Add Enze Li to gdb/MAINTAINERS

2021-12-20  Joel Brobecker  <brobecker@adacore.com>

	gdb/ada-exp.y: Reformat comment to follow GDB's coding standards
	This commit reformats a comment in gdb/ada-exp.y to avoid
	the leading '*' at the beginning of each line of the comment.

	gdb/ada-lang.h: Reformat comment to follow coding standards
	This commit reformats a comment in gdb/ada-lang.h to avoid
	the leading '*' at the beginning of each line of the comment.

2021-12-20  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-19  Alan Modra  <amodra@gmail.com>

	Obsolete m32c-rtems

	readelf: avoid a possible divide by zero
		* readelf.c (process_section_headers): Check SHT_RELR entsize.

2021-12-19  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-18  Enze Li  <lienze2010@hotmail.com>

	gdb: add "exit" command as an alias for "quit"
	This command adds the "exit" command as an alias for the "quit"
	command, as requested in PR gdb/28406.

	The documentation is also updated to mention this new command.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28406

2021-12-18  Andrew Burgess  <aburgess@redhat.com>

	gdb: add assert in remote_target::wait relating to async being off
	While working on another patch I ended up in a situation where I had
	async mode disabled (with 'maint set target-async off'), but the async
	event token got marked anyway.

	In this situation GDB was continually calling into
	remote_target::wait, however, the async token would never become
	unmarked as the unmarking is guarded by target_is_async_p.

	We could just unconditionally unmark the token, but that would feel
	like just ignoring a bug, so, instead, lets assert that if
	!target_is_async_p, then the async token should not be marked.

	This assertion would have caught my earlier mistake.

	There should be no user visible changes with this commit.

2021-12-18  Andrew Burgess  <aburgess@redhat.com>

	gdb/remote: some fixes for 'maint set target-async off'
	While working on another patch relating to remote targets, I wanted to
	test with 'maint set target-async off' in place.  Unfortunately I ran
	into some problems.  This commit is an attempt to fix one of the
	issues I hit.

	In my particular case I was actually running with:

	  maint set target-async off
	  maint set target-non-stop off

	that is, we're telling GDB to force the targets to operate in
	non-async mode, and in all-stop mode.  Here's my GDB session showing
	the problem:

	  (gdb) maintenance set target-async off
	  (gdb) maintenance set target-non-stop off
	  (gdb) target extended-remote :54321
	  Remote debugging using :54321
	  (gdb) attach 2365960
	  Attaching to process 2365960
	  No unwaited-for children left.
	  (gdb)

	Notice the 'No unwaited-for children left.' error, this is the
	problem.  There's no reason why GDB should not be able to attach to
	the process.

	The problem is this:

	  1. The user runs 'attach PID' and this sends GDB into attach_command
	  in infcmd.c.  From here we call the ::attach method on the attach
	  target, which will be the extended_remote_target.

	  2. In extended_remote_target::attach, we attach to the remote target
	  and get the first reply (which is a stop packet).  We put off
	  processing the stop packet until the end of ::attach.  We setup the
	  inferior and thread to represent the process we attached to, and
	  download the target description.  Finally, we process the initial
	  stop packet.

	  If '!target_is_non_stop_p ()' and '!target_can_async_p ()', which is
	  the case for us given the maintenance commands we used, we cache the
	  stop packet within the remote_state::buf for later processing.

	  3. Back in attach_command, if 'target_is_non_stop_p ()' then we
	  request that the target stops.  This will either process any cached
	  stop replies, or request that the target stops, and process the stop
	  replies.  However, this code is not what we use due to non-stop mode
	  being disabled.  So, we skip to the next step which is to call
	  validate_exec_file.

	  4. Calling validate_exec_file can cause packets to be sent to the
	  remote target, and replies received, the first path I hit is the
	  call to target_pid_to_exec_file, which calls
	  remote_target::pid_to_exec_file, which can then try to read the
	  executable from the remote.  Sending an receiving packets will make
	  use of the remote_state::buf object.

	  5. The attempt to attach continues, but the damage is already done...

	So, the problem is that, in step #2 we cache a stop reply in the
	remote_state::buf, and then in step #4 we reuse the remote_state::buf
	object, discarding any cached stop reply.  As a result, the initial
	stop, which is sent when GDB first attaches to the target, is lost.

	This problem can clearly be seen, I feel, by looking at the
	remote_state::cached_wait_status flag.  This flag tells GDB if there
	is a wait status cached in remote_state::buf.  However, in
	remote_target::putpkt_binary and remote_target::getpkt_or_notif_sane_1
	this flag is just set back to 0, doing this immediately discards any
	cached data.

	I don't know if this scheme ever made sense,  looking at commit
	2d717e4f8a54, where the cached_wait_status flag was added, it appears
	that there was nothing between where the stop was cached, and where
	the stop was consumed, so, I suspect, there never was a situation
	where we ended up in putpkt_binary or getpkt_or_notif_sane_1 and
	needed to clear to the flag, maybe the clearing was added "just in
	case".  Whatever the history, I claim that this clearing this flag is
	no longer a good idea.

	So, my first step toward fixing this issue was to replace the two
	instances of 'rs->cached_wait_status = 0;' in ::putpkt_binary and
	::getpkt_or_notif_sane_1 with 'gdb_assert (rs->cached_wait_status ==
	0);', this, at least would show me when GDB was doing something
	dangerous, and indeed, this assert is now hit in my test case above.

	I did play with using some kind of scoped restore to backup, and
	restore the remote_state::buf object in all the places within remote.c
	that I was hitting where the ::buf was being corrupted.  The first
	problem with this is that, where the ::cached_wait_status flag is
	reset is _not_ where ::buf is corrupted.  For the ::putpkt_binary
	case, by the time we get to the method the buffer has already been
	corrupted in many cases, so we end up needing to add the scoped
	save/restore within the callers, which means we need the save/restore
	in _lots_ of places.

	Plus, using this save/restore model feels like the wrong solution.  I
	don't think that it's obvious that the buffer might be holding cached
	data, and I think it would be too easy for new corruptions of the
	buffer to be introduced, which could easily go unnoticed for a long
	time.

	So, I really wanted a solution that didn't require us to cache data in
	the ::buf object.

	Luckily, I think we already have such a solution in place, the
	remote_state::stop_reply_queue, it seems like this does exactly the
	same task, just in a slightly different way.  With the
	::stop_reply_queue, the stop packets are processed upon receipt and
	the stop_reply object is added to the queue.  With the ::buf cache
	solution, the unprocessed stop reply is cached in the ::buf, and
	processed later.

	So, finally, in this commit, I propose to remove the
	remote_state::cached_wait_status flag and to stop using the ::buf to
	cache stop replies.  Instead, stop replies will now always be stored
	in the ::stop_reply_queue.

	There are two places where we use the ::buf to hold a cached stop
	reply, the first is in the ::attach method, and the second is in
	remote_target::start_remote, however, the second of these cases is far
	less problematic, as after caching the stop reply in ::buf we call the
	global start_remote function, which does very little work before
	calling normal_stop, which processes the cached stop reply.  However,
	my plan is to switch both users over to using ::stop_reply_queue so
	that the old (unsafe) ::cached_wait_status mechanism can be completely
	removed.

	The next problem is that the ::stop_reply_queue is currently only used
	for async-mode, and so, in remote_target::push_stop_reply, where we
	push stop_reply objects into the ::stop_reply_queue, we currently also
	mark the async event token.  I've modified this so we only mark the
	async event token if 'target_is_async_p ()' - note, _is_, not _can_
	here. The ::push_stop_reply method is called in places where async
	mode has been temporarily disabled, but, when async mode is switched
	back on (see remote_target::async) we will mark the event token if
	there are events in the queue.

	Another change of interest is in remote_target::remote_interrupt_as.
	Previously this code checked ::cached_wait_status, but didn't check
	for events in the ::stop_reply_queue.  Now that ::cached_wait_status
	has been removed we now check the queue length instead, which should
	have the same result.

	Finally, in remote_target::wait_as, I've tried to merge the processing
	of the ::stop_reply_queue with how we used to handle the
	::cached_wait_status flag.

	Currently, when processing the ::stop_reply_queue we call
	process_stop_reply and immediately return.  However, when handling
	::cached_wait_status we run through the whole of ::wait_as, and return
	at the end of the function.

	If we consider a standard stop packet, the two differences I see are:

	  1. Resetting of the remote_state::waiting_for_stop_reply, flag; this
	  is not currently done when processing a stop from the
	  ::stop_reply_queue.

	  2. The final return value has the possibility of being adjusted at
	  the end of ::wait_as, as well as there being calls to
	  record_currthread, non of which are done if we process a stop from
	  the ::stop_reply_queue.

	After discussion on the mailing list:

	  https://sourceware.org/pipermail/gdb-patches/2021-December/184535.html

	it was suggested that, when an event is pushed into the
	::stop_reply_queue, the ::waiting_for_stop_reply flag is never going
	to be set.  As a result, we don't need to worry about the first
	difference.  I have however, added a gdb_assert to validate the
	assumption that the flag is never going to be set.  If in future the
	situation ever changes, then we should find out pretty quickly.

	As for the second difference, I have resolved this by having all stop
	packets taken from the ::stop_reply_queue, pass through the return
	value adjustment code at the end of ::wait_as.

	An example of a test that reveals the benefits of this commit is:

	  make check-gdb \
	    RUNTESTFLAGS="--target_board=native-extended-gdbserver \
	                  GDBFLAGS='-ex maint\ set\ target-async\ off \
	                            -ex maint\ set\ target-non-stop\ off' \
	                  gdb.base/attach.exp"

	For testing I've been running test on x86-64/GNU Linux, and run with
	target boards unix, native-gdbserver, and native-extended-gdbserver.
	For each board I've run with the default GDBFLAGS, as well as with:

	  GDBFLAGS='-ex maint\ set\ target-async\ off \
	            -ex maint\ set\ target-non-stop\ off' \

	Though running with the above GDBFLAGS is clearly a lot more unstable
	both before and after my patch, I'm not seeing any consistent new
	failures with my patch, except, with the native-extended-gdbserver
	board, where I am seeing new failures, but only because more tests are
	now running.  For that configuration alone I see the number of
	unresolved go down by 49, the number of passes goes up by 446, and the
	number of failures also increases by 144.  All of the failures are new
	tests as far as I can tell.

2021-12-18  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	x86: Terminate mnemonicendp in swap_operand()
	Tested on x86_64-pc-linux-gnu.

	opcodes/ChangeLog:
	2021-12-17 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>

		* i386-dis.c (swap_operand): Terminate mnemonicendp.

	gas/ChangeLog:
	2021-12-17 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>

		* testsuite/gas/i386/opts-intel.d: Updated expected disassembly.
		* testsuite/gas/i386/opts.d: Likewise.
		* testsuite/gas/i386/sse2avx-opts-intel.d: Likewise.
		* testsuite/gas/i386/sse2avx-opts.d: Likewise.
		* testsuite/gas/i386/x86-64-opts-intel.d: Likewise.
		* testsuite/gas/i386/x86-64-opts.d: Likewise.
		* testsuite/gas/i386/x86-64-sse2avx-opts-intel.d: Likewise.
		* testsuite/gas/i386/x86-64-sse2avx-opts.d: Likewise.

2021-12-18  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-17  Tom Tromey  <tom@tromey.com>

	Document gdbarch-components.py
	This adds a comment to document how to update gdbarch.

	Remove gdbarch.sh
	This patch runs gdbarch.py and removes gdbarch.sh.

2021-12-17  Simon Marchi  <simon.marchi@efficios.com>

	Add new gdbarch generator
	The new gdbarch generator is a Python program.  It reads the
	"components.py" that was created in the previous patch, and generates
	gdbarch.c and gdbarch-gen.h.

	This is a relatively straightforward translation of the existing .sh
	code.  It doesn't try very hard to be idiomatic Python or to be
	especially smart.

	It is, however, incredibly faster:

	    $ time ./gdbarch.sh

	    real	0m8.197s
	    user	0m5.779s
	    sys	0m3.384s

	    $ time ./gdbarch.py

	    real	0m0.065s
	    user	0m0.053s
	    sys	0m0.011s

	Co-Authored-By: Tom Tromey <tom@tromey.com>

2021-12-17  Tom Tromey  <tom@tromey.com>

	Generate new gdbarch-components.py from gdbarch.sh
	The new gdbarch.sh approach will be to edit a Python file, rather than
	adding a line to a certain part of gdbarch.sh.  We use the existing sh
	code, though, to generate the first draft of this .py file.

	Documentation on the format will come in a subsequent patch.

	Note that some info (like "staticdefault") in the current code is
	actually unused, and so is ignored by this new generator.

2021-12-17  Tom Tromey  <tom@tromey.com>

	Do not sort the fields in gdbarch_dump
	This changes gdbarch.sh so that it no longer sorts the fields in
	gdbarch_dump.  This sorting isn't done anywhere else by gdbarch.sh,
	and this simplifies the new generator a little bit.

	Do not generate gdbarch.h
	Now that gdbarch.h has been split, we no longer need the generator
	code in gdbarch.sh, so remove it.

2021-12-17  Tom Tromey  <tom@tromey.com>

	Split gdbarch.h into two files
	This patch splits gdbarch.h into two files -- gdbarch.h now is
	editable and hand-maintained, and the new gdbarch-gen.h file is the
	only thing generated by gdbarch.sh.  This lets us avoid maintaining
	boilerplate in the gdbarch.sh file.

	Note that gdbarch.sh still generates gdbarch.h after this patch.  This
	makes it easier to re-run when rebasing.  This code is removed in a
	subsequent patch.

2021-12-17  Tom Tromey  <tom@tromey.com>

	Move ordinary gdbarch code to arch-utils
	While I think it makes sense to generate gdbarch.c, at the same time I
	think it is better for ordinary code to be editable in a C file -- not
	as a hunk of C code embedded in the generator.

	This patch moves this sort of code out of gdbarch.sh and gdbarch.c and
	into arch-utils.c, then has arch-utils.c include gdbarch.c.

2021-12-17  Maciej W. Rozycki  <macro@embecosm.com>

	Avoid redundant operations in `fortran_array_walker'
	Move inner dimension's element type determination outside the respective
	loops in `fortran_array_walker'.  The operation is exactly the same with
	each iteration, so there is no point in redoing it for each element and
	while a smart compiler might be able to move it outside the loop it is
	regardless a bad coding style.  No functional change.

	Initialize `m_ndimensions' in the member initializer list
	Following our coding convention initialize the `m_ndimensions' member in
	the member initializer list rather than in the body of the constructor
	of the `fortran_array_walker' class.  No functional change.

2021-12-17  Lancelot SIX  <lancelot.six@amd.com>
	    Pedro Alves  <pedro@palves.net>

	gdb/tui: install SIGWINCH only when connected to a TTY
	PR26056 reports that when GDB is connected to non-TTY stdin/stdout, it
	crashes when it receives a SIGWINCH signal.

	This can be reproduced as follows:

	    $ gdb/gdb -nx -batch -ex 'run' --args sleep 60 </dev/null 2>&1 | cat

	    # from another terminal:
	    $ kill -WINCH %(pidof gdb)

	When doing so, the process crashes in a call to rl_resize_terminal:

	    void
	    rl_resize_terminal (void)
	    {
	      _rl_get_screen_size (fileno (rl_instream), 1);
	      ...
	    }

	The problem is that at this point rl_instream has the value NULL.

	The rl_instream variable is supposed to be initialized during a call to
	readline_initialize_everything, which in a normal startup sequence is
	called under this call chain:

	    tui_interp::init
	      tui_ensure_readline_initialized
	        rl_initialize
	          readline_initialize_everything

	In tui_interp::init, we have the following sequence:

	    tui_initialize_io ();
	    tui_initialize_win ();                // <- Installs SIGWINCH
	    if (gdb_stdout->isatty ())
	      tui_ensure_readline_initialized (); // <- Initializes rl_instream

	This function unconditionally installs the SIGWINCH signal handler (this
	is done by tui_initialize_win), and then if gdb_stdout is a TTY it
	initializes readline.  Therefore, if stdout is not a TTY, SIGWINCH is
	installed but readline is not initialized.  In such situation
	rl_instream stays NULL, and when GDB receives a SIGWINCH it calls its
	handler and in fine tries to access rl_instream leading to the crash.

	This patch proposes to fix this issue by installing the SIGWINCH signal
	handler only if GDB is connected to a TTY.  Given that this
	initialization it the only task of tui_initialize_win, this patch moves
	tui_initialize_win just after the call to
	tui_ensure_readline_initialized.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=26056
	Change-Id: I6458acef7b0d9beda2a10715d0345f02361076d9

2021-12-17  Alan Modra  <amodra@gmail.com>

	asan: NULL dereference in bfd_elf_set_group_contents
		* elf-bfd.h (struct output_elf_obj_tdata): Make num_section_syms
		unsigned.
		* elf.c (bfd_elf_set_group_contents): Bounds check sec->index
		and check that entry in elf_section_syms for sec is non-NULL.
		(_bfd_elf_symbol_from_bfd_symbol): Adjust.

2021-12-17  Alan Modra  <amodra@gmail.com>

	asan: use after free in _bfd_elf_mips_get_relocated_section_contents
	Leaving entries on mips_hi16_list from a previous pass over relocs
	leads to confusing bugs.

		* elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
		Free mips_hi16_list entries on error exit.

2021-12-17  Alan Modra  <amodra@gmail.com>

	asan: abort in wasm_scan_name_function_section
	Macros like READ_LEB128 in wasm-module.c that alter control flow are
	evil.  Maintainers will break your code if you have hidden ways to
	reach labels.

		* wasm-module.c (wasm_scan_name_function_section): Don't
		attempt to bfd_release NULL.

2021-12-17  Alan Modra  <amodra@gmail.com>

	asan: heap-buffer-overflow in bpf_elf_generic_reloc
	The bpf reloc howtos are a bit weird, using bitpos to specify an
	offset from r_offset that is outside the size of the reloc as given by
	howto.size.  That means bfd_get_reloc_size gives the wrong answer for
	range checking, and thus bfd_reloc_offset_in_range can't be used.

		* elf64-bpf.c (bpf_elf_generic_reloc): Handle bitpos offset reloc
		range checking.

2021-12-17  Alan Modra  <amodra@gmail.com>

	ubsan: bfd.c:2519:8: shift exponent 34 is too large
		* bfd.c (bfd_update_compression_header): Avoid integer overflow.

	asan: buffer overflow in mmo_get_symbols
		* mmo.c (mmo_get_symbols): Error on symbol name exceeding max length.

2021-12-17  Alan Modra  <amodra@gmail.com>

	asan: buffer overflow in elfnn-aarch64.c get_plt_type
	We can't assume .dynamic is a multiple of ElfNN_External_Dyn, at least
	not when presented with fuzzed object files.

		* elfnn-aarch64.c (get_plt_type): Don't access past end of
		improperly sized .dynamic.

2021-12-17  Alan Modra  <amodra@gmail.com>

	try_build_id_prefix gcc-10 -Wformat-security errors
	dwarf.c:11300:3: error: format not a string literal and no format arguments [-Werror=format-security]
	11300 |   f += sprintf (f, prefix);

		PR 28697
		* dwarf.c (try_build_id_prefix): Avoid -Wformat-security error.

2021-12-17  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-16  Nick Clifton  <nickc@redhat.com>

	Fix AVR assembler so that it creates relocs that will work with linker relaxation.
		PR 28686
	gas	* config/tc-avr.h (tc_fix_adjustable): Define.
		* config/tc-avr.c (avr_fix_adjustable): New function.
		* testsuite/gas/all/gas.exp: Skip tests that need adjustable fixups.
		* testsuite/gas/elf/elf.exp: Likewise.
		* testsuite/gas/avr/diffreloc_withrelax.d: Adjust expected output.
		* testsuite/gas/avr/pc-relative-reloc.d: Adjust expected output.

	ld	* testsuite/ld-avr/avr-prop-7.d: Adjust expected output.
		* testsuite/ld-avr/avr-prop-8.d: Likewise.
		* testsuite/ld-avr/pr13402.d: Likewise.

2021-12-16  Nick Clifton  <nickc@redhat.com>

	When loading separate debug info files, also attempt to locate a file based upon the build-id.
		PR 28697
		* dwarf.c (load_build_id_debug_file): New function.
		(try_build_id_prefix): New function.
		(check_for_and_load_links): Call load_build_id_debug_file.
		(debug_displays): Add entry for .note.gnu.build-id.
		* dwarf.h (enum dwarf_section_display_enum): Add
		note_gnu_build_id.
		* testsuite/binutils-all/debuginfod.exp (test_fetch_debuglink):
		Fix regexp for loads via debuglink section.

2021-12-16  Richard Sandiford  <richard.sandiford@arm.com>

	arm: Add support for Armv9.1-A to Armv9.3-A
	This patch adds AArch32 support for -march=armv9.[123]-a.
	The behaviour of the new options can be expressed using a
	combination of existing feature flags and tables.

	The cpu_arch_ver entries for ARM_ARCH_V9_2A and ARM_ARCH_V9_3A
	are technically redundant but it seemed less surprising to include
	them anyway.

	include/
		* opcode/arm.h (ARM_ARCH_V9_1A, ARM_ARCH_V9_2A): New macros.
		(ARM_ARCH_V9_3A): Likewise.

	gas/
		* doc/c-arm.texi: Add armv9.1-a, armv9.2-a and armv9.3-a.
		* config/tc-arm.c (armv91a_ext_table, armv92a_ext_table): New macros.
		(armv93a_ext_table): Likewise.
		(arm_archs): Add armv9.1-a, armv9.2-a and armv9.3-a.
		(cpu_arch_ver): Add ARM_ARCH_V9_1A, ARM_ARCH_V9_2A and ARM_ARCH_V9_3A.
		* NEWS: Mention the above.
		* testsuite/gas/arm/attr-march-armv9_1-a.d: New test.
		* testsuite/gas/arm/attr-march-armv9_2-a.d: Likewise.
		* testsuite/gas/arm/attr-march-armv9_3-a.d: Likewise.
		* testsuite/gas/arm/bfloat16-armv9.1-a.d: Likewise.
		* testsuite/gas/arm/bfloat16-armv9.2-a.d: Likewise.
		* testsuite/gas/arm/bfloat16-armv9.3-a.d: Likewise.
		* testsuite/gas/arm/i8mm-armv9.1-a.d: Likewise.
		* testsuite/gas/arm/i8mm-armv9.2-a.d: Likewise.
		* testsuite/gas/arm/i8mm-armv9.3-a.d: Likewise.

2021-12-16  Richard Sandiford  <richard.sandiford@arm.com>

	arm: Add support for Armv8.7-A and Armv8.8-A
	This patch adds AArch32 support for -march=armv8.[78]-a.
	The behaviour of the new options can be expressed using a
	combination of existing feature flags and tables.

	The cpu_arch_ver entries are technically redundant but
	it seemed less surprising to include them anyway.

	include/
		* opcode/arm.h (ARM_ARCH_V8_7A, ARM_ARCH_V8_8A): New macros.

	gas/
		* doc/c-arm.texi: Add armv8.7-a and armv8.8-a.
		* config/tc-arm.c (armv87a_ext_table, armv88a_ext_table): New macros.
		(arm_archs): Add armv8.7-a and armv8.8-a.
		(cpu_arch_ver): Add ARM_ARCH_V8_7A and ARM_ARCH_V8_8A.
		* NEWS: Mention the above.
		* testsuite/gas/arm/attr-march-armv8_7-a.d: New test.
		* testsuite/gas/arm/attr-march-armv8_8-a.d: Likewise.
		* testsuite/gas/arm/bfloat16-armv8.7-a.d: Likewise.
		* testsuite/gas/arm/bfloat16-armv8.8-a.d: Likewise.
		* testsuite/gas/arm/i8mm-armv8.7-a.d: Likewise.
		* testsuite/gas/arm/i8mm-armv8.8-a.d: Likewise.

2021-12-16  Richard Sandiford  <richard.sandiford@arm.com>

	aarch64: Add support for Armv9.1-A to Armv9.3-A
	This patch adds AArch64 support for -march=armv9.[123]-a.
	The behaviour of the new options can be expressed using a
	combination of existing feature flags, so we don't need to
	eat into the vanishing number of spare AARCH64_FEATURE_* bits.
	Hoewver, it was more convenient to separate out the |s of
	feature flags so that Armv9.1-A could reuse the set for
	Armv8.6-A, and so on.

	include/
		* opcode/aarch64.h (AARCH64_ARCH_V8_FEATURES): New macro,
		split out from...
		(AARCH64_ARCH_V8): ...here.
		(AARCH64_ARCH_V8_1_FEATURES): New macro, split out from...
		(AARCH64_ARCH_V8_1): ...here.
		(AARCH64_ARCH_V8_2_FEATURES): New macro, split out from...
		(AARCH64_ARCH_V8_2): ...here.
		(AARCH64_ARCH_V8_3_FEATURES): New macro, split out from...
		(AARCH64_ARCH_V8_3): ...here.
		(AARCH64_ARCH_V8_4_FEATURES): New macro, split out from...
		(AARCH64_ARCH_V8_4): ...here.
		(AARCH64_ARCH_V8_5_FEATURES): New macro, split out from...
		(AARCH64_ARCH_V8_5): ...here.
		(AARCH64_ARCH_V8_6_FEATURES): New macro, split out from...
		(AARCH64_ARCH_V8_6): ...here.
		(AARCH64_ARCH_V8_7_FEATURES): New macro, split out from...
		(AARCH64_ARCH_V8_7): ...here.
		(AARCH64_ARCH_V8_8_FEATURES): New macro, split out from...
		(AARCH64_ARCH_V8_8): ...here.
		(AARCH64_ARCH_V9_FEATURES): New macro, split out from...
		(AARCH64_ARCH_V9): ...here.
		(AARCH64_ARCH_V9_1_FEATURES, AARCH64_ARCH_V9_1): New macros.
		(AARCH64_ARCH_V9_2_FEATURES, AARCH64_ARCH_V9_2): New macros.
		(AARCH64_ARCH_V9_3_FEATURES, AARCH64_ARCH_V9_3): New macros.

	gas/
		* doc/c-aarch64.texi: Add armv9.1-a, armv9-2-a and armv9.3-a.
		* config/tc-aarch64.c (aarch64_archs): Likewise.
		* NEWS: Mention the above.
		* testsuite/gas/aarch64/armv9_invalid.d,
		testsuite/gas/aarch64/armv9_invalid.s,
		testsuite/gas/aarch64/armv9_invalid.l: New test.
		* testsuite/gas/aarch64/armv9_1.d,
		testsuite/gas/aarch64/armv9_1.s: Likewise.
		* testsuite/gas/aarch64/armv9_1_invalid.d,
		testsuite/gas/aarch64/armv9_1_invalid.s,
		testsuite/gas/aarch64/armv9_1_invalid.l: Likewise.
		* testsuite/gas/aarch64/armv9_2.d,
		testsuite/gas/aarch64/armv9_2.s: Likewise.
		* testsuite/gas/aarch64/armv9_2_invalid.d,
		testsuite/gas/aarch64/armv9_2_invalid.s,
		testsuite/gas/aarch64/armv9_2_invalid.l: Likewise.
		* testsuite/gas/aarch64/armv9_3.d,
		testsuite/gas/aarch64/armv9_3.s: Likewise.

2021-12-16  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: Support svinval extension with frozen version 1.0.
	According to the privileged spec, there are five new instructions for
	svinval extension.  Two of them (HINVAL.VVMA and HINVAL.GVMA) need to
	enable the hypervisor extension.  But there is no implementation of
	hypervisor extension in mainline for now, so let's consider the related
	issues later.

	                31..25  24..20 19..15 14..12 11...7 6..2  1..0
	sinval.vma      0001011 rs2    rs1    000    00000  11100 11
	sfence.w.inval  0001100 00000  00000  000    00000  11100 11
	sfence.inval.ir 0001100 00001  00000  000    00000  11100 11
	hinval.vvma     0010011 rs2    rs1    000    00000  11100 11
	hinval.gvma     0110011 rs2    rs1    000    00000  11100 11

	This patch is cherry-picked from the riscv integration branch since the
	svinval extension is frozen for now.  Besides, we fix the funct7 encodings
	of hinval.vvma and hinval.gvma, from 0x0011011 and 0x0111011 to 0x0010011
	and 0x0110011.

	bfd/
		* elfxx-riscv.c (riscv_supported_std_s_ext): Added svinval.
		(riscv_multi_subset_supports): Handle INSN_CLASS_SVINVAL.
	gas/
		* testsuite/gas/riscv/svinval.d: New testcase.
		* testsuite/gas/riscv/svinval.s: Likewise.
	include/
		* opcode/riscv-opc.h: Added encodings for svinval.
		* opcode/riscv.h (enum riscv_insn_class): Added INSN_CLASS_SVINVAL.
	opcodes/
		* riscv-opc.c (riscv_opcodes): Added svinval instructions.

2021-12-16  Mike Frysinger  <vapier@gentoo.org>

	sim: mips/or1k: drop redundant arg to bitsize macro
	These are just using the default behavior for the 3rd arg, so drop
	it to make it more clear.  This also makes them match all other
	ports that only use the first 2 arguments.

2021-12-16  Mike Frysinger  <vapier@gentoo.org>

	bfd: unify texi generation rules
	The logic between these rules are extremely similar, so unify them
	into a single variable by leveraging make $@ and $< variables.

	Also add automake silent rule support while we're here.

2021-12-16  Mike Frysinger  <vapier@gentoo.org>

	sim: fix mingw builds with replacement gnulib open
	The header shuffling in here broke the workaround for gnulib defining
	"open".  Move it back before the sim-specific includes to fix.  This
	is because the callback struct in the headers has an "open" member and
	this file tries to call that.

2021-12-16  Sandra Loosemore  <sandra@codesourcery.com>

	Adjust compare_link_order for unstable qsort
	In a cross toolchain for nios2-elf target and x86_64-w64-mingw32 host
	using binutils 2.37, we observed a failure that didn't show up on
	x86_64-linux-gnu host:  testcase pr25490-5.s was failing with

	C:\path\to\nios2-elf-ld.exe: looping in map_segments
	FAIL: __patchable_function_entries section 5

	    	* ldelfgen.c (compare_link_order): Don't use section id in
		sorting.  Keep original ordering instead.  Update comments.

2021-12-16  Alan Modra  <amodra@gmail.com>

	Re: Fix an undefined behaviour in the BFD library's DWARF parser
	Using an unsigned int cast (to 32 bits) on a pointer difference (of
	possibly 64 bits) is wrong.  Even though it will work on all real
	object files, the fuzzers will eventually find this hole.

		PR 28687
		* dwarf1.c (parse_die): Cast pointer difference to size_t.
		Catch another possible pointer overflow.

2021-12-16  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: re-format with black 21.12b0
	Run black 21.12b0 on gdb/, there is a single whitespace change.  I will
	update the wiki [1] in parallel to bump the version of black to 21.12b0.

	[1] https://sourceware.org/gdb/wiki/Internals%20GDB-Python-Coding-Standards

	Change-Id: Ib3b859e3506c74a4f15d16f1e44ef402de3b98e2

2021-12-16  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: re-format with black 21.9b0
	Run black 21.9b0 on gdb/ (this is the version currently mentioned on the
	wiki [1], the subsequent commit will bump that version).

	[1] https://sourceware.org/gdb/wiki/Internals%20GDB-Python-Coding-Standards

	Change-Id: I5ceaab42c42428e053e2572df172aa42a88f0f86

2021-12-16  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-15  Alan Modra  <amodra@gmail.com>

	PR28691, validate dwarf attribute form
	PR28691 is a fuzzing PR that triggers a non-problem of "output changes
	per run" with PIEs and/or different compilers.  I've closed similar
	PRs before as wontfix, but I guess there will be no end of this type
	of PR.  The trigger is an attribute that usually takes one of the
	offset/constant reference DW_FORMs being given an indexed string
	DW_FORM.  The bfd reader doesn't support indexed strings and returns
	an error string instead.  The address of the string varies with PIE
	runs and/or compiler, and we allow that address to appear in output.
	Fix this by validating integer attribute forms, as we do for string
	form attributes.

		PR 28691
		* dwarf2.c (is_str_attr): Rename to..
		(is_str_form): ..this.  Change param type.  Update calls.
		(is_int_form): New function.
		(read_attribute_value): Handle DW_FORM_addrx2.
		(find_abstract_instance): Validate form when using attr.u.val.
		(scan_unit_for_symbols, parse_comp_unit): Likewise.

2021-12-15  Luis Machado  <luis.machado@linaro.org>

	New --enable-threading configure option to control use of threads in GDB/GDBserver
	Add the --enable-threading configure option so multithreading can be disabled
	at configure time. This is useful for statically-linked builds of
	GDB/GDBserver, since the thread library doesn't play well with that setup.

	If you try to run a statically-linked GDB built with threading, it will crash
	when setting up the number of worker threads.

	This new option is also convenient when debugging GDB in a system with lots of
	threads, where the thread discovery code in GDB will emit too many messages,
	like so:

	[New Thread 0xfffff74d3a50 (LWP 2625599)]

	If you have X threads, that message will be repeated X times.

	The default for --enable-threading is "yes".

2021-12-15  Nikita Popov  <npv1310@gmail.com>

	Fix an undefined behaviour in the BFD library's DWARF parser.
		PR 28687
		* dwarf1.c (parse_die): Fix undefined behaviour in range tests.

2021-12-15  Alan Modra  <amodra@gmail.com>

	PR28694, Out-of-bounds write in stab_xcoff_builtin_type
		PR 28694
		* stabs.c (stab_xcoff_builtin_type): Make typenum unsigned.
		Negate typenum earlier, simplifying bounds checking.  Correct
		off-by-one indexing.  Adjust switch cases.

2021-12-15  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-14  Alan Modra  <amodra@gmail.com>

	loongarch32 build failure on 32-bit host
	gas/config/tc-loongarch.c: In function ‘assember_macro_helper’:
	gas/config/tc-loongarch.c:915:28: error: right shift count >= width of type [-Werror=shift-count-overflow]
	  915 |       hi32 = insn->args[1] >> 32;
	      |                            ^~

	One possible fix is to make offsetT a 64-bit type for loongarch32.
	This also makes bfd/targmatch.h (generated from bfd/config.bfd)
	consistent since the loongarch32 match is inside #ifdef BFD64.

		* config.bfd (loongarch32-*): Set want64.

2021-12-14  Alan Modra  <amodra@gmail.com>

	loongarch64 build failure on 32-bit host
	gas/config/tc-loongarch.c: In function ‘loongarch_args_parser_can_match_arg_helper’:
	gas/config/tc-loongarch.c:661:13: error: cast from pointer to integer of different size [-Werror=pointer
	-to-int-cast]
	  661 |       imm = (offsetT) str_hash_find (r_htab, arg);
	      |             ^

	Cast it to the correct size int, relying on normal integer promotions
	if offsetT is larger than a pointer.

		* config/tc-loongarch.c (loongarch_args_parser_can_match_arg_helper):
		Cast return from str_hash_find to intptr_t, not offsetT.

2021-12-14  Alan Modra  <amodra@gmail.com>

	XCOFF C_STSYM test failure on 32-bit host
	This test was failing here and on another similar symbol:
	[  4](sec  1)(fl 0x00)(ty   0)(scl 143) (nx 0) 0x05d1745d11745d21 .bs
	where correct output is
	[  4](sec  1)(fl 0x00)(ty   0)(scl 143) (nx 0) 0x000000000000000a .bs

	The problem is caused by a 32-bit host pointer being sign-extended
	when stored into a 64-bit bfd_vma, and then that value not being
	trimmed back to 32 bits when used.  The following belt-and-braces
	patch fixes both the store and subsequent reads.

		* coffcode.h (coff_slurp_symbol_table): Do not sign extend
		when storing a host pointer to syment.n_value.
		* coffgen.c (coff_get_symbol_info): Cast syment.n_value to a
		bfd_hostptr_t before using in arithmetic.
		(coff_print_symbol): Likewise.

2021-12-14  Simon Marchi  <simon.marchi@efficios.com>

	gdbserver/tracepoint.cc: use snprintf in gdb_agent_socket_init
	If we modify tracepoint.cc to try to use a too long unix socket name,
	for example by modifying SOCK_DIR to be:

	    #define SOCK_DIR "/tmp/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut/salut"

	... trying to start an application with libinproctrace.so loaded
	crashes:

	    $ LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.6:./libinproctrace.so /bin/ls
	    /home/smarchi/src/binutils-gdb/gdbserver/../gdbsupport/common-utils.cc:69: A problem internal to GDBserver in-process agent has been detected.
	    xsnprintf: Assertion `ret < size' failed.

	Looking at the rest of the socket initialization code, the intent seems
	to be that if something goes wrong, we warn but let the program
	execute.  So crashing on this failed assertions seems against the intent.

	Commit 6cebaf6e1ae4 ("use xsnprintf instead of snprintf.") changed this
	code to use xsnprintf instead of snprintf, introducing this assertion.
	Before that, snprintf would return a value bigger that UNIX_PATH_MAX and
	the "if" after would catch it and emit a warning, which is exactly what
	we want.  That change was done because LynxOS didn't have snprintf.
	Since LynxOS isn't supported anymore, we can simply revert to use
	snprintf there.

	With this patch, we get a warning (printed by the caller of
	gdb_agent_socket_init), but the program keeps executing:

	    $ LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.6:./libinproctrace.so /bin/ls
	    ipa: could not create sync socket
	    ...

	Change-Id: I78bca52d5dc3145335abeae45a42052701e3f5dd

2021-12-14  Simon Marchi  <simon.marchi@efficios.com>

	gdbserver/tracepoint.cc: work around -Wstringop-truncation error
	When building gdb with  on AArch64 with g++ 11.1.0 (and some preceding
	versions too), -O2 and -fsanitize=address, I get this error.

	      CXX    tracepoint-ipa.o
	    cc1plus: warning: command-line option ‘-Wmissing-prototypes’ is valid for C/ObjC but not for C++
	    In file included from /usr/include/string.h:519,
	                     from ../gnulib/import/string.h:41,
	                     from /home/simark/src/binutils-gdb/gdbserver/../gdbsupport/common-defs.h:95,
	                     from /home/simark/src/binutils-gdb/gdbserver/server.h:22,
	                     from /home/simark/src/binutils-gdb/gdbserver/tracepoint.cc:19:
	    In function ‘char* strncpy(char*, const char*, size_t)’,
	        inlined from ‘int init_named_socket(const char*)’ at /home/simark/src/binutils-gdb/gdbserver/tracepoint.cc:6902:11,
	        inlined from ‘int gdb_agent_socket_init()’ at /home/simark/src/binutils-gdb/gdbserver/tracepoint.cc:6953:26,
	        inlined from ‘void* gdb_agent_helper_thread(void*)’ at /home/simark/src/binutils-gdb/gdbserver/tracepoint.cc:7204:41:
	    /usr/include/bits/string_fortified.h:95:34: error: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ output may be truncated copying 107 bytes from a string of length 107 [-Werror=stringop-truncation]
	       95 |   return __builtin___strncpy_chk (__dest, __src, __len,
	          |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
	       96 |                                   __glibc_objsize (__dest));
	          |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~

	Note that _FORTIFY_SOURCE changes the message a bit, but I get a similar
	error if I use -D_FORTIFY_SOURCE=0.

	I am pretty sure it's spurious and might be related to this GCC bug:

	  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88780

	From what I can see, we are copying from a static 108 bytes long buffer
	(the global array agent_socket_name) to a 108 bytes long array,
	sockaddr_un::sun_path.  I don't see anything wrong.

	Still, it would make things easier if we didn't see this error.  Change
	the code to check that the source string length is smaller than the
	destination buffer (including space for the NULL byte) and use strcpy.

	For anybody who would like to try to reproduce, the full command line
	is:

	    g++     -I. -I/home/simark/src/binutils-gdb/gdbserver -I/home/simark/src/binutils-gdb/gdbserver/../gdb/regformats -I/home/simark/src/binutils-gdb/gdbserver/.. -I/home/simark/src/binutils-gdb/gdbserver/../include -I/home/simark/src/binutils-gdb/gdbserver/../gdb -I/home/simark/src/binutils-gdb/gdbserver/../gnulib/import -I../gnulib/import -I/home/simark/src/binutils-gdb/gdbserver/.. -I..   -pthread -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-variable -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-error=maybe-uninitialized -Wno-mismatched-tags -Wsuggest-override -Wimplicit-fallthrough=3 -Wduplicated-cond -Wshadow=local -Wdeprecated-copy -Wdeprecated-copy-dtor -Wredundant-move -Wmissing-declarations -Wmissing-prototypes -Wstrict-null-sentinel -Wformat -Wformat-nonliteral -Werror -DGDBSERVER  -DCONFIG_UST_GDB_INTEGRATION -Drpl_strerror_r=strerror_r -Drpl_free=free -fPIC -DIN_PROCESS_AGENT -fvisibility=hidden -g3 -O2 -fsanitize=address   -c -o tracepoint-ipa.o -MT tracepoint-ipa.o -MMD -MP -MF ./.deps/tracepoint-ipa.Tpo /home/simark/src/binutils-gdb/gdbserver/tracepoint.cc

	Change-Id: I18e86c0487feead7e7677e69398405e7057cf464

2021-12-14  Simon Marchi  <simon.marchi@polymtl.ca>

	bfd: fix -Wunused errors with clang 13+
	Clang 13 and 14 produce some -Wunused-but-set-{variable,parameter} for
	situations where gcc doesn't.  In particular, when a variable is set and
	then used in a way to update its own value.  For example, if `i` is only
	used in this way:

	  int i = 2;
	  i++;
	  i = i + 1;

	gcc won't warn, but clang will.

	Fix all such errors found in an --enable-targets=all build.  It would be
	important for somebody who knows what they're doing to just make sure
	that these variables can indeed be deleted, and that there a no cases
	where it's a bug, and the variable should actually be used.

	The first instance of this error fix by this patch is:

	      CC       elf32-score.lo
	    /home/simark/src/binutils-gdb/bfd/elf32-score.c:450:11: error: variable 'relocation' set but not used [-Werror,-Wunused-but-set-variable]
	      bfd_vma relocation;
	              ^

	Change-Id: I2f233ce20352645cf388aff3dfa08a651d21a6b6

2021-12-14  Andrew Burgess  <aburgess@redhat.com>

	gdb/mi: rename build_table to add_builtin_mi_commands
	Just give the function build_table a more descriptive name.  There
	should be no user visible changes after this commit.

2021-12-14  Jan Vrany  <jan.vrany@labware.com>

	gdb/mi: rename mi_cmd to mi_command
	Just give this class a new name, more inline with the name of the
	sub-classes.  I've also updated mi_cmd_up to mi_command_up in
	mi-cmds.c inline with this new naming scheme.

	There should be no user visible changes after this commit.

2021-12-14  Jan Vrany  <jan.vrany@labware.com>

	gdb/mi: use separate classes for different types of MI command
	This commit changes the infrastructure in mi-cmds.{c,h} to add new
	sub-classes for the different types of MI command.  Instances of these
	sub-classes are then created and added into mi_cmd_table.

	The existing mi_cmd class becomes the abstract base class, this has an
	invoke method and takes care of the suppress notifications handling,
	before calling a do_invoke virtual method which is implemented by all
	of the sub-classes.

	There's currently two different sub-classes, one of pure MI commands,
	and a second for MI commands that delegate to CLI commands.

	There should be no user visible changes after this commit.

2021-12-14  Andrew Burgess  <aburgess@redhat.com>

	gdb/mi: int to bool conversion in mi_execute_cli_command
	Change an argument of mi_execute_cli_command from int to bool.  Update
	the callers to take this into account.  Within mi_execute_cli_command,
	update a comparison of a pointer to 0 with a comparison to nullptr,
	and add an assert, if we are not using the argument string then the
	string should be nullptr.  Also removed a cryptic 'gdb_????' comment,
	which isn't really helpful.

	There should be no user visible changes after this commit.

2021-12-14  Jan Vrany  <jan.vrany@labware.com>

	gdb/mi: use std::map for MI commands in mi-cmds.c
	This changes the hashmap used in mi-cmds.c from a custom structure to
	std::map.  Not only is replacing a custom container with a standard
	one an improvement, but using std::map will make it easier to
	dynamically add commands; which is something that is planned for a
	later series, where we will allow MI commands to be implemented in
	Python.

	There should be no user visible changes after this commit.

2021-12-14  Jan Vrany  <jan.vrany@labware.com>

	gdb/mi: rename mi_lookup to mi_cmd_lookup
	Lets give this function a more descriptive name.  I've also improved
	the comments in the header and source files.

	There should be no user visible changes after this commit.

2021-12-14  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: Added ld testcases for the medlow and medany code models.
	There are two linker scripts, code-model-01.ld and code-model-02.ld,
	which are corresponding to the two different memory layouts,

	* code-model-01.ld: the text section is in the 32-bit address range, but
	  the data section is far away from the text section, which means the data
	  section is over the 32-bit address range.

	* code-model-02.ld: the text section is over the 32-bit address range, but
	  the data section is placed nearly zero address.

	We use the two linker scripts, to test the current medlow and medany behaviors
	of GNU ld, including the weak symbol references and the relaxations behaviors.
	Besides, these testcases also show the limits of the current medlow and medany
	code models, that is - we may get the truncated to fit errors when linking
	with the above two linker scripts.

	ld/
		* testsuite/ld-riscv-elf/code-model-01.ld: New testcases to test the
		behaviors of the current medlow and medany code models.
		* testsuite/ld-riscv-elf/code-model-02.ld: Likewise.
		* testsuite/ld-riscv-elf/code-model-medany-01.d: Likewise.
		* testsuite/ld-riscv-elf/code-model-medany-02.d: Likewise.
		* testsuite/ld-riscv-elf/code-model-medany-weakref-01.d: Likewise.
		* testsuite/ld-riscv-elf/code-model-medany-weakref-02.d: Likewise.
		* testsuite/ld-riscv-elf/code-model-medlow-01.d: Likewise.
		* testsuite/ld-riscv-elf/code-model-medlow-02.d: Likewise.
		* testsuite/ld-riscv-elf/code-model-medlow-weakref-01.d: Likewise.
		* testsuite/ld-riscv-elf/code-model-medlow-weakref-02.d: Likewise.
		* testsuite/ld-riscv-elf/code-model-relax-medany-01.d: Likewise.
		* testsuite/ld-riscv-elf/code-model-relax-medany-02.d: Likewise.
		* testsuite/ld-riscv-elf/code-model-relax-medany-weakref-01.d: Likewise.
		* testsuite/ld-riscv-elf/code-model-relax-medany-weakref-02.d: Likewise.
		* testsuite/ld-riscv-elf/code-model-relax-medlow-01.d: Likewise.
		* testsuite/ld-riscv-elf/code-model-relax-medlow-02.d: Likewise.
		* testsuite/ld-riscv-elf/code-model-relax-medlow-weakref-01.d: Likewise.
		* testsuite/ld-riscv-elf/code-model-relax-medlow-weakref-02.d: Likewise.
		* testsuite/ld-riscv-elf/code-model.s: Likewise.
		* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Updated.

2021-12-14  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-13  H.J. Lu  <hjl.tools@gmail.com>

	x86: Adjust linker tests for --disable-separate-code
	Adjust linker tests for linker configured with --disable-separate-code:

	1. Update expected outputs.
	2. Pass -z max-page-size=0x1000 -z separate-code" to linker.

		* testsuite/ld-i386/report-reloc-1.l: Updated.
		* testsuite/ld-x86-64/report-reloc-1.l: Likewise.
		* testsuite/ld-x86-64/pe-x86-64.exp: Pass
		"-z max-page-size=0x1000 -z separate-code" to linker.
		* testsuite/ld-x86-64/pr19609-4e.d: Likewise.
		* testsuite/ld-x86-64/pr19609-6a.d: Likewise.
		* testsuite/ld-x86-64/pr19609-6b.d: Likewise.
		* testsuite/ld-x86-64/pr19609-7b.d: Likewise.
		* testsuite/ld-x86-64/pr19609-7d.d: Likewise.

2021-12-13  Carl Love  <cel@us.ibm.com>

	gdb: Powerpc mark xfail in gdb.base/catch-syscall.exp
	Powerpc is not reporting the

	  Catchpoint 1 (returned from syscall execve),  ....

	as expected.  The issue appears to be with the kernel not returning the
	expected result.  This patch marks the test failure as an xfail.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28623

2021-12-13  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: improve reuse of value contents when fetching array elements
	While working on a Python script, which was interacting with a remote
	target, I noticed some weird slowness in GDB.  In my program I had a
	structure something like this:

	  struct foo_t
	  {
	    int array[5];
	  };

	  struct foo_t global_foo;

	Then in the Python script I was fetching a complete copy of global
	foo, like:

	  val = gdb.parse_and_eval('global_foo')
	  val.fetch_lazy()

	Then I would work with items in foo_t.array, like:

	  print(val['array'][1])

	I called the fetch_lazy method specifically because I knew I was going
	to end up accessing almost all of the contents of val, and so I wanted
	GDB to do a single remote protocol call to fetch all the contents in
	one go, rather than trying to do lazy fetches for a couple of bytes at
	a time.

	What I observed was that, after the fetch_lazy call, GDB does,
	correctly, fetch the entire contents of global_foo, including all of
	the contents of array, however, when I access val.array[1], GDB still
	goes and fetches the value of this element from the remote target.

	What's going on is that in valarith.c, in value_subscript, for C like
	languages, we always end up treating the array value as a pointer, and
	then doing value_ptradd, and value_ind, the second of these calls
	always returns a lazy value.

	My guess is that this approach allows us to handle indexing off the
	end of an array, when working with zero element arrays, or when
	indexing a raw pointer as an array.  And, I agree, that in these
	cases, where, even when the original value is non-lazy, we still will
	not have the content of the array loaded, we should be using the
	value_ind approach.

	However, for cases where we do have the array contents loaded, and we
	do know the bounds of the array, I think we should be using
	value_subscripted_rvalue, which is what we use for non C like
	languages.

	One problem I did run into, exposed by gdb.base/charset.exp, was that
	value_subscripted_rvalue stripped typedefs from the element type of
	the array, which means the value returned will not have the same type
	as an element of the array, but would be the raw, non-typedefed,
	type.  In charset.exp we got back an 'int' instead of a
	'wchar_t' (which is a typedef of 'int'), and this impacts how we print
	the value.  Removing typedefs from the resulting value just seems
	wrong, so I got rid of that, and I don't see any test regressions.

	With this change in place, my original Python script is now doing no
	additional memory accesses, and its performance increases about 10x!

2021-12-13  Andrew Burgess  <aburgess@redhat.com>

	gdb: update gdb-gdb.py.in for latest changes to struct field
	This commit updates uses of 'loc' and 'loc_kind' to 'm_loc' and
	'm_loc_kind' respectively, in gdb-gdb.py.in, which is required after
	this commit:

	  commit cd3f655cc7a55437a05aa8e7b1fcc9051b5fe404
	  Date:   Thu Sep 30 22:38:29 2021 -0400

	      gdb: add accessors for field (and call site) location

	I have also incorporated this change:

	  https://sourceware.org/pipermail/gdb-patches/2021-September/182171.html

	Which means we print 'm_name' instead of 'name' when displaying the
	'm_name' member variable.

	Finally, I have also added support for the new TYPE_SPECIFIC_INT
	fields, which were added with this commit:

	  commit 20a5fcbd5b28cca88511ac5a9ad5e54251e8fa6d
	  Date:   Wed Sep 23 09:39:24 2020 -0600

	      Handle bit offset and bit size in base types

	I updated the gdb.gdb/python-helper.exp test to cover all of these
	changes.

2021-12-13  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

	gdbserver/linux-low: replace direct assignment to current_thread
	Use scoped_restore_current_thread and switch_to_thread in
	linux_process_target::wait_for_sigstop.

2021-12-13  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

	gdbserver: replace direct assignments to current_thread
	Replace the direct assignments to current_thread with
	switch_to_thread.  Use scoped_restore_current_thread when appropriate.
	There is one instance remaining in linux-low.cc's wait_for_sigstop.
	This will be handled in a separate patch.

	Regression-tested on X86-64 Linux using the native-gdbserver and
	native-extended-gdbserver board files.

2021-12-13  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

	gdbserver: introduce scoped_restore_current_thread and switch_to_thread
	Introduce a class for restoring the current thread and a function to
	switch to the given thread.  This is a preparation for a refactoring
	that aims to remove direct assignments to 'current_thread'.

2021-12-13  Andrew Burgess  <aburgess@redhat.com>

	gdb: make post_startup_inferior a virtual method on inf_ptrace_target
	While working on a later patch that required me to understand how GDB
	starts up inferiors, I was confused by the
	target_ops::post_startup_inferior method.

	The post_startup_inferior target function is only called from
	inf_ptrace_target::create_inferior.

	Part of the target class hierarchy looks like this:

	  inf_child_target
	     |
	     '-- inf_ptrace_target
	            |
	            |-- linux_nat_target
	            |
	            |-- fbsd_nat_target
	            |
	            |-- nbsd_nat_target
	            |
	            |-- obsd_nat_target
	            |
	            '-- rs6000_nat_target

	Every sub-class of inf_ptrace_target, except rs6000_nat_target,
	implements ::post_startup_inferior.  The rs6000_nat_target picks up
	the implementation of ::post_startup_inferior not from
	inf_ptrace_target, but from inf_child_target.

	No descendent of inf_child_target, outside the inf_ptrace_target
	sub-tree, implements ::post_startup_inferior, which isn't really
	surprising, as they would never see the method called (remember, the
	method is only called from inf_ptrace_target::create_inferior).

	What I find confusing is the role inf_child_target plays in
	implementing, what is really a helper function for just one of its
	descendents.

	In this commit I propose that we formally make ::post_startup_inferior
	a helper function of inf_ptrace_target.  To do this I will remove the
	::post_startup_inferior from the target_ops API, and instead make this
	a protected, pure virtual function on inf_ptrace_target.

	I'll remove the empty implementation of ::post_startup_inferior from
	the inf_child_target class, and add a new empty implementation to the
	rs6000_nat_target class.

	All the other descendents of inf_ptrace_target already provide an
	implementation of this method and so don't need to change beyond
	making the method protected within their class declarations.

	To me, this makes much more sense now.  The helper function, which is
	only called from within the inf_ptrace_target class, is now a part of
	the inf_ptrace_target class.

	The only way in which this change is visible to a user is if the user
	turns on 'set debug target 1'.  With this debug flag on, prior to this
	patch the user would see something like:

	  -> native->post_startup_inferior (...)
	  <- native->post_startup_inferior (2588939)

	After this patch these lines are no longer present, as the
	post_startup_inferior is no longer a top level target method.  For me,
	this is an acceptable change.

2021-12-13  Andrew Burgess  <aburgess@redhat.com>

	gdb: have mips_nbsd_nat_target inherit from nbsd_nat_target
	While working on another patch I had reason to look at
	mips-netbsd-nat.c, and noticed that the class mips_nbsd_nat_target
	inherits directly from inf_ptrace_target.

	This is a little strange as alpha_bsd_nat_target,
	arm_netbsd_nat_target, hppa_nbsd_nat_target, m68k_bsd_nat_target,
	ppc_nbsd_nat_target, sh_nbsd_nat_target, and vax_bsd_nat_target all
	inherit from nbsd_nat_target.

	Originally, in this commit:

	  commit f6ac5f3d63e03a81c4ff3749aba234961cc9090e
	  Date:   Thu May 3 00:37:22 2018 +0100

	      Convert struct target_ops to C++

	When the target tree was converted to C++, all of the above classes
	inherited from inf_ptrace_target except for hppa_nbsd_nat_target,
	which was the only class that originally inherited from
	nbsd_nat_target.

	Later on all the remaining targets (except mips) were converted to
	inherit from nbsd_nat_target, these are the commits:

	  commit 4fed520be264b60893aa674071947890f8172915
	  Date:   Sat Mar 14 16:05:24 2020 +0100

	      Inherit alpha_netbsd_nat_target from nbsd_nat_target

	  commit 6018d381a00515933016c539d2fdc18ad0d304b8
	  Date:   Sat Mar 14 14:50:51 2020 +0100

	      Inherit arm_netbsd_nat_target from nbsd_nat_target

	  commit 01a801176ea15ddfc988cade2e3d84c3b0abfec3
	  Date:   Sat Mar 14 16:54:42 2020 +0100

	      Inherit m68k_bsd_nat_target from nbsd_nat_target

	  commit 9faa006d11a5e08264a007463435f84b77864c9c
	  Date:   Thu Mar 19 14:52:57 2020 +0100

	      Inherit ppc_nbsd_nat_target from nbsd_nat_target

	  commit 9809762324491b851332ce600ae9bde8dd34f601
	  Date:   Tue Mar 17 15:07:39 2020 +0100

	      Inherit sh_nbsd_nat_target from nbsd_nat_target

	  commit d5be5fa4207da00d039a1d5a040ba316e7092cbd
	  Date:   Sat Mar 14 13:21:58 2020 +0100

	      Inherit vax_bsd_nat_target from nbsd_nat_target

	I could only find mailing list threads for ppc and sh in the archive ,
	and unfortunately, none of the commits has any real detail that might
	explain why mips was missed out, the only extra context I could find
	was this message:

	  https://sourceware.org/pipermail/gdb-patches/2020-March/166853.html

	Which says that "proper" OS support is going to be added to
	nbsd_nat_target, hence the need to inherit from that class.

	My guess is that leaving mips_nbsd_nat_target unchanged was an
	oversight, so, in this commit, I propose changing mips_nbsd_nat_target
	to inherit from nbsd_nat_target just like all the other nbsd targets.

	My motivation for this patch relates to the post_startup_inferior
	target method.  In a future commit I want to change how this method is
	handled.  Currently the mips_nbsd_nat_target will pick up the empty
	implementation of inf_child_target::post_startup_inferior rather than
	the version in netbsd-nat.c.  This feels like a bug to me, as surely,
	enabling of proc events is something that would need to be done for
	all netbsd targets, regardless of architecture.

	In my future patch I have a choice then, either (a) add a new, empty
	implementation of post_startup_inferior to mips_nbsd_nat_target,
	or (b) this commit, have mips_nbsd_nat_target inherit from
	nbsd_nat_target.  Option (b) seems like the right way to go, hence,
	this commit.

	I've done absolutely no testing for this change, not even building it,
	as that would require at least an environment in which I can x-build
	mips-netbsd applications, which I have no idea how to set up.

2021-12-13  Andrew Burgess  <aburgess@redhat.com>

	gdb: only include mips and riscv targets if building with 64-bit bfd
	While testing another patch I was trying to build different
	configurations of GDB, and, during one test build I ran into a
	problem, I configured with `--enable-targets=all
	--host=i686-w64-mingw32` and saw this error while linking GDB:

	  .../i686-w64-mingw32/bin/ld: mips-tdep.o: in function `mips_gdbarch_init':
	  .../src/gdb/mips-tdep.c:8730: undefined reference to `disassembler_options_mips'
	  .../i686-w64-mingw32/bin/ld: riscv-tdep.o: in function `riscv_gdbarch_init':
	  .../src/gdb/riscv-tdep.c:3851: undefined reference to `disassembler_options_riscv'

	So the `disassembler_options_mips` and `disassembler_options_riscv`
	symbols are missing.

	This turns out to be because mips-dis.c and riscv-dis.c, in which
	these symbols are defined, are in the TARGET64_LIBOPCODES_CFILES list
	in opcodes/Makefile.am, these files are only built when we are
	building with a 64-bit bfd.

	If we look further, into bfd/Makefile.am, we can see that all the
	files matching elf*-riscv.lo are in the BFD64_BACKENDS list, as are
	the elf*-mips.lo files, and (I know because I tried), the two
	disassemblers do, not surprisingly, depend on features supplied from
	libbfd.

	So, though we can build most of GDB just fine for riscv and mips with
	a 32-bit bfd, if I understand correctly, the final GDB
	executable (assuming we could get it to link) would not understand
	these architectures at the bfd level, nor would there be any
	disassembler available.  This sounds like a pretty useless GDB to me.

	So, in this commit, I move the riscv and mips targets into GDB's list
	of targets that require a 64-bit bfd.  After this I can build GDB just
	fine with the configure options given above.

	This was discussed on the mailing list in a couple of threads:

	  https://sourceware.org/pipermail/gdb-patches/2021-December/184365.html
	  https://sourceware.org/pipermail/binutils/2021-November/118498.html

	and it is agreed, that it is unfortunate that the 32-bit riscv and
	32-bit mips targets require a 64-bit bfd.  If in the future this
	situation ever changes then it would be expected that some (or all) of
	this patch would be reverted.  Until then though, this patch allows
	GDB to build when configured with --enable-targets=all, and when using
	a 32-bit libbfd.

2021-12-13  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-12  Tom Tromey  <tom@tromey.com>

	C++-ify path substitution code
	I found some uses of xfree in the path substitution code in source.c.
	C++-ifying struct substitute_path_rule both simplifies the code and
	removes manual memory management.

	Regression tested on x86-64 Fedora 34.

2021-12-12  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-11  Alan Modra  <amodra@gmail.com>

	[GOLD] PowerPC64 @notoc in non-power10 code
	Gold version of commit 7aba54da42.

	elfcpp/
		* powerpc.h (R_PPC64_REL24_P9NOTOC): Define.
	gold/
		* powerpc.cc (Target_powerpc::maybe_skip_tls_get_addr_call,
		is_branch_reloc, max_branch_delta): Handle R_PPC64_REL24_P9NOTOC.
		(Target_powerpc::Branch_info::make_stub): Likewise.
		(struct Plt_stub_ent): Add p9notoc_, p9off_, tsize_.
		(struct Branch_stub_ent): Add p9notoc_, p9off_.
		(Stub_table::add_plt_call_entry): Handle R_PPC64_REL24_P9NOTOC.
		(Stub_table::add_long_branch_entry): Likewise.
		(Stub_table::add_eh_frame): Likewise.
		(Stub_table::plt_call_size): Return aligned size.  Adjust callers.
		Handle p9notoc_ sizing.
		(Stub_table::do_write): Write out p9notoc_ stubs.
		(Target_powerpc::Scan::get_reference_flags, local, global):
		Handle R_PPC64_REL24_P9NOTOC.
		(Target_powerpc::Relocate::relocate): Likewise.

2021-12-11  H.J. Lu  <hjl.tools@gmail.com>

	Don't return the main file as the separate debug info
	On Fedora 35,

	$ readelf -d /usr/bin/npc

	caused readelf to run out of stack since load_separate_debug_info
	returned the input main file as the separate debug info:

	(gdb) bt
	 #0  load_separate_debug_info (
	    main_filename=main_filename@entry=0x510f50 "/export/home/hjl/.cache/debuginfod_client/dcc33c51c49e7dafc178fdb5cf8bd8946f965295/debuginfo",
	    xlink=xlink@entry=0x4e5180 <debug_displays+4480>,
	    parse_func=parse_func@entry=0x431550 <parse_gnu_debuglink>,
	    check_func=check_func@entry=0x432ae0 <check_gnu_debuglink>,
	    func_data=func_data@entry=0x7fffffffdb60, file=file@entry=0x51d430)
	    at /export/gnu/import/git/sources/binutils-gdb/binutils/dwarf.c:11057
	 #1  0x000000000043328d in check_for_and_load_links (file=0x51d430,
	    filename=0x510f50 "/export/home/hjl/.cache/debuginfod_client/dcc33c51c49e7dafc178fdb5cf8bd8946f965295/debuginfo")
	    at /export/gnu/import/git/sources/binutils-gdb/binutils/dwarf.c:11381
	 #2  0x00000000004332ae in check_for_and_load_links (file=0x51b070,
	    filename=0x518dd0 "/export/home/hjl/.cache/debuginfod_client/dcc33c51c49e7dafc178fdb5cf8bd8946f965295/debuginfo")

	Return NULL if the separate debug info is the same as the input main
	file to avoid infinite recursion.

		PR binutils/28679
		* dwarf.c (load_separate_debug_info): Don't return the input
		main file.

2021-12-11  Alan Modra  <amodra@gmail.com>

	Don't edit bogus sh_link on reading relocatable objects (Oracle fix)
	This reverts a 1995 fix to handle bogus object files.  Presumably such
	object files have long gone.

		* elf.c (bfd_section_from_shdr): Remove old hack for Oracle
		libraries.

2021-12-11  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-10  Jan Vrany  <jan.vrany@labware.com>

	gdb/testsuite: respect GDBSERVER variable in remote-stdio-gdbserver "board"
	The comment on top of gdb/testsuite/boards/remote-stdio-gdbserver.exp says
	that user can specify path to gdbserver on remote system by setting
	GDBSERVER variable. However, this variable was ignored and /usr/bin/gdbserver
	was used unconditionally.

	This commit updates the code to respect GDBSERVER if set and fall back to
	/usr/bin/gdbserver if not.

2021-12-10  Simon Marchi  <simon.marchi@polymtl.ca>

	Revert "gdbsupport: remove unnecessary `#ifndef IN_PROCESS_AGENT`"
	This reverts commit fe72c32765e1190c8a17d309fc3a7e1882d6a430.

	It turns out it was wrong, libinproctrace.so does build its own
	gdbsupport/tdesc.cc.  This broke the build:

	    make[1]: Entering directory '/home/simark/build/binutils-gdb-one-target/gdbserver'
	      CXXLD  libinproctrace.so
	    /usr/bin/ld: gdbsupport/tdesc-ipa.o: in function `print_xml_feature::visit_pre(target_desc const*)':
	    /home/simark/src/binutils-gdb/gdbserver/../gdbsupport/tdesc.cc:407: undefined reference to `tdesc_architecture_name(target_desc const*)'
	    /usr/bin/ld: /home/simark/src/binutils-gdb/gdbserver/../gdbsupport/tdesc.cc:408: undefined reference to `tdesc_architecture_name(target_desc const*)'
	    /usr/bin/ld: /home/simark/src/binutils-gdb/gdbserver/../gdbsupport/tdesc.cc:411: undefined reference to `tdesc_osabi_name(target_desc const*)'
	    /usr/bin/ld: /home/simark/src/binutils-gdb/gdbserver/../gdbsupport/tdesc.cc:416: undefined reference to `tdesc_compatible_info_list(target_desc const*)'
	    /usr/bin/ld: /home/simark/src/binutils-gdb/gdbserver/../gdbsupport/tdesc.cc:418: undefined reference to `tdesc_compatible_info_arch_name(std::unique_ptr<tdesc_compatible_info, std::default_delete<tdesc_compatible_info> > const&)'

2021-12-10  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-09  Alan Modra  <amodra@gmail.com>

	PR28674, objdump crash
	Not returning an error indication here leaves the attribute
	uninitialised, which then leads to intemperate behaviour.

		PR 28674
		* dwarf2.c (read_attribute_value): Return NULL on trying to read
		past end of attributes.

2021-12-09  Alan Modra  <amodra@gmail.com>

	Set sh_link for reloc sections created as normal sections
	binutils-all/strip-13 and binutils-all/strip-14 tests create
	SHT_REL/SHT_RELA sections by hand.  These don't have sh_link set to
	the .symtab section as they should, leading to readelf warnings if you
	happen to be looking at the object files.

		* elf.c (assign_section_numbers): Formatting.  Set sh_link for
		reloc sections created as normal sections in relocatable
		objects.

2021-12-09  Simon Marchi  <simon.marchi@efficios.com>

	gdbsupport: remove unnecessary `#ifndef IN_PROCESS_AGENT`
	I suppose this code was copied from GDBserver and this ifndef was left
	there.  As far as I know, IN_PROCESS_AGENT will never be defined when
	building this file, so we can remove this.

	Change-Id: I84fc408e330b3a29106df830a09342861cadbaf6

2021-12-09  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/microblaze-tdep.c: fix -Wunused-but-set-variable
	Fix this, seen when building with clang 14:

	      CXX    microblaze-tdep.o
	    /home/simark/src/binutils-gdb/gdb/microblaze-tdep.c:207:7: error: variable 'flags' set but not used [-Werror,-Wunused-but-set-variable]
	      int flags = 0;
	          ^

	Change-Id: I59f726ed33e924912748bc475b6fd9a9394fc0d0

2021-12-09  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/csky-tdep.c: fix -Wunused-but-set-variable error
	Fix these, seen when building with clang 14:

	      CXX    csky-tdep.o
	    /home/simark/src/binutils-gdb/gdb/csky-tdep.c:332:7: error: variable 'need_dummy_stack' set but not used [-Werror,-Wunused-but-set-variable]
	      int need_dummy_stack = 0;
	          ^
	    /home/simark/src/binutils-gdb/gdb/csky-tdep.c:805:12: error: variable 'offset' set but not used [-Werror,-Wunused-but-set-variable]
	                  int offset = 0;
	                      ^

	Change-Id: I6703bcb50e83c50083f716f4084ef6aa30d659c4

2021-12-09  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: fix default behavior of runto
	The documented behavior of proc runto is to not emit a PASS when
	succeeding to to run to the specified location, but emit a FAIL when
	failing to do so.  I suppose the intent is that it won't pollute the
	results normally passing tests (although I don't see why we would care),
	but make visible any problems.

	However, it seems like the implementation makes it default to never
	print anything.  "no-message" is prependend to "args", so if "message"
	is not passed, we will always take the   path that sets print_fail to 0,
	which will silence any failure.

	This unfortunately means that tests relying on runto_main won't emit a
	FAIL if failing to run to main.  And since commit 4dfef5be6812
	("gdb/testsuite: make runto_main not pass no-message to runto"), tests
	don't emit a FAIL themselves when failing to run to main.  This means
	that tests failing to run to main just fail silently, and that's bad.

	This can be reproduced by hacking gdb.base/template.exp like so:

	    diff --git a/gdb/testsuite/gdb.base/template.c b/gdb/testsuite/gdb.base/template.c
	    index bcf39c377d92..052be5b79d73 100644
	    --- a/gdb/testsuite/gdb.base/template.c
	    +++ b/gdb/testsuite/gdb.base/template.c
	    @@ -15,6 +15,14 @@
	        You should have received a copy of the GNU General Public License
	        along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

	    +#include <stdlib.h>
	    +
	    +__attribute__((constructor))
	    +static void c (void)
	    +{
	    +  exit (1);
	    +}
	    +
	     int
	     main (void)
	     {

	Running the modified gdb.base/template.exp shows that it exits without
	printing any result.

	Remove the line that prepends no-message to args, that should make
	runto's behavior match its documentation.

	This patch will appear to add many failures, but in reality they already
	existed, they were just silenced.

	Change-Id: I2a730d5bc72b6ef0698cd6aad962d9902aa7c3d6

2021-12-09  Carl Love  <cel@us.ibm.com>

	gdb fix elfv1 Powerpc gdb.dwarf2/frame-inlined-in-outer-frame.exp
	On ELFv1, the _start symbol must point to the *function descriptor* (in
	the .opd section), not to the function code (in the .text section) like
	with ELFv2 and other architectures.

2021-12-09  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/maint.exp with -readnow
	With test-case gdb.base/maint.exp and target board -readnow, I run into:
	...
	FAIL: gdb.base/maint.exp: maint info line-table w/o a file name
	...

	The problem is that this and other regexps anchored using '^':
	...
	    -re "^$gdb_prompt $" {
	...
	don't trigger because other regexps don't consume the entire preceding line.

	This is partly due to the addition of the IS-STMT column.

	Fix this by making the regexps consume entire lines.

	Tested on x86_64-linux with native and target board readnow, as well as
	check-read1 and check-readmore.

2021-12-09  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/include-main.exp with -readnow
	With test-case gdb.base/include-main.exp and target board readnow, I run into:
	...
	FAIL: gdb.base/include-main.exp: maint info symtab
	...

	The corresponding check in gdb.base/include-main.exp:
	...
	gdb_test_no_output "maint info symtab"
	...
	checks that no CU was expanded, while -readnow ensures that all CUs are
	expanded.

	Fix this by skipping the check with -readnow.

	Tested on x86_64-linux, with native and target board readnow.

2021-12-09  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: Clarify the behavior of .option arch directive.
	* To be consistent with -march option, removed the "=" operator when
	user want to reset the whole architecture string.  So the formats are,

	.option arch, +<extension><version>, ...
	.option arch, -<extension>
	.option arch, <ISA string>

	* Don't allow to add or remove the base extensions in the .option arch
	directive.  Instead, users should reset the whole architecture string
	while they want to change the base extension.

	* The operator "+" won't update the version of extension, if the
	extension is already in the subset list.

	bfd/
		* elfxx-riscv.c (riscv_add_subset): Don't update the version
		if the extension is already in the subset list.
		(riscv_update_subset): To be consistent with -march option,
		removed the "=" operator when user want to reset the whole
		architecture string.  Besides, Don't allow to add or remove
		the base extensions in the .option arch directive.
	gas/
		* testsuite/gas/riscv/option-arch-01.s: Updated since we cannot
		add or remove the base extensions in the .option arch directive.
		* testsuite/gas/riscv/option-arch-02.s: Likewise.
		* testsuite/gas/riscv/option-arch-fail.l: Likewise.
		* testsuite/gas/riscv/option-arch-fail.s: Likewise.
		* testsuite/gas/riscv/option-arch-01a.d: Set -misa-spec=2.2.
		* testsuite/gas/riscv/option-arch-01b.d: Likewise.
		* testsuite/gas/riscv/option-arch-02.d: Updated since the .option
		arch, + won't change the version of extension, if the extension is
		already in the subset list.
		* testsuite/gas/riscv/option-arch-03.s: Removed the "=" operator
		when resetting the whole architecture string.

2021-12-09  Mike Frysinger  <vapier@gentoo.org>

	sim: use ## for automake comments
	The ## marker tells automake to not include the comment in its
	generated output, so use that in most places where the comment
	only makes sense in the inputs.

2021-12-09  Simon Marchi  <simon.marchi@efficios.com>

	gdb, gdbserver: detach fork child when detaching from fork parent
	While working with pending fork events, I wondered what would happen if
	the user detached an inferior while a thread of that inferior had a
	pending fork event.  What happens with the fork child, which is
	ptrace-attached by the GDB process (or by GDBserver), but not known to
	the core?  Sure enough, neither the core of GDB or the target detach the
	child process, so GDB (or GDBserver) just stays ptrace-attached to the
	process.  The result is that the fork child process is stuck, while you
	would expect it to be detached and run.

	Make GDBserver detach of fork children it knows about.  That is done in
	the generic handle_detach function.  Since a process_info already exists
	for the child, we can simply call detach_inferior on it.

	GDB-side, make the linux-nat and remote targets detach of fork children
	known because of pending fork events.  These pending fork events can be
	stored in:

	 - thread_info::pending_waitstatus, if the core has consumed the event
	   but then saved it for later (for example, because it got the event
	   while stopping all threads, to present an all-stop stop on top of a
	   non-stop target)
	 - thread_info::pending_follow: if we ran to a "catch fork" and we
	   detach at that moment

	Additionally, pending fork events can be in target-specific fields:

	 - For linux-nat, they can be in lwp_info::status and
	   lwp_info::waitstatus.
	 - For the remote target, they could be stored as pending stop replies,
	   saved in `remote_state::notif_state::pending_event`, if not
	   acknowledged yet, or in `remote_state::stop_reply_queue`, if
	   acknowledged.  I followed the model of remove_new_fork_children for
	   this: call remote_notif_get_pending_events to process /
	   acknowledge any unacknowledged notification, then look through
	   stop_reply_queue.

	Update the gdb.threads/pending-fork-event.exp test (and rename it to
	gdb.threads/pending-fork-event-detach.exp) to try to detach the process
	while it is stopped with a pending fork event.  In order to verify that
	the fork child process is correctly detached and resumes execution
	outside of GDB's control, make that process create a file in the test
	output directory, and make the test wait $timeout seconds for that file
	to appear (it happens instantly if everything goes well).

	This test catches a bug in linux-nat.c, also reported as PR 28512
	("waitstatus.h:300: internal-error: gdb_signal target_waitstatus::sig()
	const: Assertion `m_kind == TARGET_WAITKIND_STOPPED || m_kind ==
	TARGET_WAITKIND_SIGNALLED' failed.).  When detaching a thread with a
	pending event, get_detach_signal unconditionally fetches the signal
	stored in the waitstatus (`tp->pending_waitstatus ().sig ()`).  However,
	that is only valid if the pending event is of type
	TARGET_WAITKIND_STOPPED, and this is now enforced using assertions (iit
	would also be valid for TARGET_WAITKIND_SIGNALLED, but that would mean
	the thread does not exist anymore, so we wouldn't be detaching it).  Add
	a condition in get_detach_signal to access the signal number only if the
	wait status is of kind TARGET_WAITKIND_STOPPED, and use GDB_SIGNAL_0
	instead (since the thread was not stopped with a signal to begin with).

	Add another test, gdb.threads/pending-fork-event-ns.exp, specifically to
	verify that we consider events in pending stop replies in the remote
	target.  This test has many threads constantly forking, and we detach
	from the program while the program is executing.  That gives us some
	chance that we detach while a fork stop reply is stored in the remote
	target.  To verify that we correctly detach all fork children, we ask
	the parent to exit by sending it a SIGUSR1 signal and have it write a
	file to the filesystem before exiting.  Because the parent's main thread
	joins the forking threads, and the forking threads wait for their fork
	children to exit, if some fork child is not detach by GDB, the parent
	will not write the file, and the test will time out.  If I remove the
	new remote_detach_pid calls in remote.c, the test fails eventually if I
	run it in a loop.

	There is a known limitation: we don't remove breakpoints from the
	children before detaching it.  So the children, could hit a trap
	instruction after being detached and crash.  I know this is wrong, and
	it should be fixed, but I would like to handle that later.  The current
	patch doesn't fix everything, but it's a step in the right direction.

	Change-Id: I6d811a56f520e3cb92d5ea563ad38976f92e93dd
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28512

2021-12-09  Simon Marchi  <simon.marchi@efficios.com>

	gdb: move clearing of tp->pending_follow to follow_fork_inferior
	A following patch will change targets so that when they detach an
	inferior, they also detach any pending fork children this inferior may
	have.  While doing this, I hit a case where we couldn't differentiate
	two cases, where in one we should detach the fork detach but not in the
	other.

	Suppose we continue past a fork with "follow-fork-mode == child" &&
	"detach-on-fork on".  follow_fork_inferior calls target_detach to detach
	the parent.  In that case the target should not detach the fork
	child, as we'll continue debugging the child.  As of now, the
	tp->pending_follow field of the thread who called fork still contains
	the details about the fork.

	Then, suppose we run to a fork catchpoint and the user types "detach".
	In that case, the target should detach the fork child in addition to the
	parent.  In that case as well, the tp->pending_follow field contains
	the details about the fork.

	To allow targets to differentiate the two cases, clear
	tp->pending_follow a bit earlier, when following a fork.  Targets will
	then see that tp->pending_follow contains TARGET_WAITKIND_SPURIOUS, and
	won't detach the fork child.

	As of this patch, no behavior changes are expected.

	Change-Id: I537741859ed712cb531baaefc78bb934e2a28153

2021-12-09  Simon Marchi  <simon.marchi@efficios.com>

	gdb/remote.c: refactor pending fork status functions
	In preparation for a following patch, refactor a few things that I did
	find a bit awkward, and to make them a bit more reusable.

	 - Pass an inferior to kill_new_fork_children instead of a pid.  That
	   allows iterating on only this inferior's threads and avoid further
	   filtering on the thread's pid.
	 - Change thread_pending_fork_status to return a non-nullptr value only
	   if the thread does have a pending fork status.
	 - Remove is_pending_fork_parent_thread, as one can just use
	   thread_pending_fork_status and check for nullptr.
	 - Replace is_pending_fork_parent with is_fork_status, which just
	   returns if the given target_waitkind if a fork or a vfork.  Push
	   filtering on the pid to the callers, when it is necessary.

	Change-Id: I0764ccc684d40f054e39df6fa5458cc4c5d1cd7b

2021-12-09  Simon Marchi  <simon.marchi@efficios.com>

	gdb/remote.c: move some things up
	Move the stop_reply and a few functions up.  Some code above them in the
	file will need to use them in a following patch.  No behavior changes
	expected here.

	Change-Id: I3ca57d0e3ec253f56e1ba401289d9d167de14ad2

2021-12-09  Simon Marchi  <simon.marchi@efficios.com>

	gdb/linux-nat: factor ptrace-detach code to new detach_one_pid function
	The following patch will add some code paths that need to ptrace-detach
	a given PID.  Factor out the code that does this and put it in its own
	function, so that it can be re-used.

	Change-Id: Ie65ca0d89893b41aea0a23d9fc6ffbed042a9705

2021-12-09  Simon Marchi  <simon.marchi@efficios.com>

	gdbserver: hide fork child threads from GDB
	This patch aims at fixing a bug where an inferior is unexpectedly
	created when a fork happens at the same time as another event, and that
	other event is reported to GDB first (and the fork event stays pending
	in GDBserver).  This happens for example when we step a thread and
	another thread forks at the same time.  The bug looks like (if I
	reproduce the included test by hand):

	    (gdb) show detach-on-fork
	    Whether gdb will detach the child of a fork is on.
	    (gdb) show follow-fork-mode
	    Debugger response to a program call of fork or vfork is "parent".
	    (gdb) si
	    [New inferior 2]
	    Reading /home/simark/build/binutils-gdb/gdb/testsuite/outputs/gdb.threads/step-while-fork-in-other-thread/step-while-fork-in-other-thread from remote target...
	    Reading /home/simark/build/binutils-gdb/gdb/testsuite/outputs/gdb.threads/step-while-fork-in-other-thread/step-while-fork-in-other-thread from remote target...
	    Reading symbols from target:/home/simark/build/binutils-gdb/gdb/testsuite/outputs/gdb.threads/step-while-fork-in-other-thread/step-while-fork-in-other-thread...
	    [New Thread 965190.965190]
	    [Switching to Thread 965190.965190]
	    Remote 'g' packet reply is too long (expected 560 bytes, got 816 bytes): ... <long series of bytes>

	The sequence of events leading to the problem is:

	 - We are using the all-stop user-visible mode as well as the
	   synchronous / all-stop variant of the remote protocol
	 - We have two threads, thread A that we single-step and thread B that
	   calls fork at the same time
	 - GDBserver's linux_process_target::wait pulls the "single step
	   complete SIGTRAP" and the "fork" events from the kernel.  It
	   arbitrarily choses one event to report, it happens to be the
	   single-step SIGTRAP.  The fork stays pending in the thread_info.
	 - GDBserver send that SIGTRAP as a stop reply to GDB
	 - While in stop_all_threads, GDB calls update_thread_list, which ends
	   up querying the remote thread list using qXfer:threads:read.
	 - In the reply, GDBserver includes the fork child created as a result
	   of thread B's fork.
	 - GDB-side, the remote target sees the new PID, calls
	   remote_notice_new_inferior, which ends up unexpectedly creating a new
	   inferior, and things go downhill from there.

	The problem here is that as long as GDB did not process the fork event,
	it should pretend the fork child does not exist.  Ultimately, this event
	will be reported, we'll go through follow_fork, and that process will be
	detached.

	The remote target (GDB-side), has some code to remove from the reported
	thread list the threads that are the result of forks not processed by
	GDB yet.  But that only works for fork events that have made their way
	to the remote target (GDB-side), but haven't been consumed by the core
	yet, so are still lingering as pending stop replies in the remote target
	(see remove_new_fork_children in remote.c).  But in our case, the fork
	event hasn't made its way to the GDB-side remote target.  We need to
	implement the same kind of logic GDBserver-side: if there exists a
	thread / inferior that is the result of a fork event GDBserver hasn't
	reported yet, it should exclude that thread / inferior from the reported
	thread list.

	This was actually discussed a while ago, but not implemented AFAIK:

	    https://pi.simark.ca/gdb-patches/1ad9f5a8-d00e-9a26-b0c9-3f4066af5142@redhat.com/#t
	    https://sourceware.org/pipermail/gdb-patches/2016-June/133906.html

	Implementation details-wise, the fix for this is all in GDBserver.  The
	Linux layer of GDBserver already tracks unreported fork parent / child
	relationships using the lwp_info::fork_relative, in order to avoid
	wildcard actions resuming fork childs unknown to GDB.  This information
	needs to be made available to the handle_qxfer_threads_worker function,
	so it can filter the reported threads.  Add a new thread_pending_parent
	target function that allows the Linux target to return the parent of an
	eventual fork child.

	Testing-wise, the test replicates pretty-much the sequence of events
	shown above.  The setup of the test makes it such that the main thread
	is about to fork.  We stepi the other thread, so that the step completes
	very quickly, in a single event.  Meanwhile, the main thread is resumed,
	so very likely has time to call fork.  This means that the bug may not
	reproduce every time (if the main thread does not have time to call
	fork), but it will reproduce more often than not.  The test fails
	without the fix applied on the native-gdbserver and
	native-extended-gdbserver boards.

	At some point I suspected that which thread called fork and which thread
	did the step influenced the order in which the events were reported, and
	therefore the reproducibility of the bug.  So I made the test try  both
	combinations: main thread forks while other thread steps, and vice
	versa.  I'm not sure this is still necessary, but I left it there
	anyway.  It doesn't hurt to test a few more combinations.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28288
	Change-Id: I2158d5732fc7d7ca06b0eb01f88cf27bf527b990

2021-12-09  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-08  Tom Tromey  <tom@tromey.com>

	Use for-each more in gdb
	There are some loops in gdb that use ARRAY_SIZE (or a wordier
	equivalent) to loop over a static array.  This patch changes some of
	these to use foreach instead.

	Regression tested on x86-64 Fedora 34.

2021-12-08  Tom Tromey  <tromey@adacore.com>

	Fix error in file_and_directory patch
	In my earlier C++-ization patch for file_and_directory, I introduced
	an error:

	-  if (strcmp (fnd.name, "<unknown>") != 0)
	+  if (fnd.is_unknown ())

	This change inverted the sense of the test, which causes failures with
	.debug_names.

	This patch fixes the bug.  Regression tested on x86-64 Fedora 34.  I
	also tested it using the AdaCore internal test suite, with
	.debug_names -- this was failing before, and now it works.

2021-12-08  Andrew Burgess  <aburgess@redhat.com>

	gdb/python: Use tp_init instead of tp_new to setup gdb.Value
	The documentation suggests that we implement gdb.Value.__init__,
	however, this is not currently true, we really implement
	gdb.Value.__new__.  This will cause confusion if a user tries to
	sub-class gdb.Value.  They might write:

	  class MyVal (gdb.Value):
	      def __init__ (self, val):
	          gdb.Value.__init__(self, val)

	  obj = MyVal(123)
	  print ("Got: %s" % obj)

	But, when they source this code they'll see:

	  (gdb) source ~/tmp/value-test.py
	  Traceback (most recent call last):
	    File "/home/andrew/tmp/value-test.py", line 7, in <module>
	      obj = MyVal(123)
	    File "/home/andrew/tmp/value-test.py", line 5, in __init__
	      gdb.Value.__init__(self, val)
	  TypeError: object.__init__() takes exactly one argument (the instance to initialize)
	  (gdb)

	The reason for this is that, as we don't implement __init__ for
	gdb.Value, Python ends up calling object.__init__ instead, which
	doesn't expect any arguments.

	The Python docs suggest that the reason why we might take this
	approach is because we want gdb.Value to be immutable:

	   https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_new

	But I don't see any reason why we should require gdb.Value to be
	immutable when other types defined in GDB are not.  This current
	immutability can be seen in this code:

	  obj = gdb.Value(1234)
	  print("Got: %s" % obj)
	  obj.__init__ (5678)
	  print("Got: %s" % obj)

	Which currently runs without error, but prints:

	  Got: 1234
	  Got: 1234

	In this commit I propose that we switch to using __init__ to
	initialize gdb.Value objects.

	This does introduce some additional complexity, during the __init__
	call a gdb.Value might already be associated with a gdb value object,
	in which case we need to cleanly break that association before
	installing the new gdb value object.  However, the cost of doing this
	is not great, and the benefit - being able to easily sub-class
	gdb.Value seems worth it.

	After this commit the first example above works without error, while
	the second example now prints:

	  Got: 1234
	  Got: 5678

	In order to make it easier to override the gdb.Value.__init__ method,
	I have tweaked the definition of gdb.Value.__init__.  The second,
	optional argument to __init__ is a gdb.Type, if this argument is not
	present then GDB figures out a suitable type.

	However, if we want to override the __init__ method in a sub-class,
	and still support the default argument, it is easier to write:

	  class MyVal (gdb.Value):
	      def __init__ (self, val, type=None):
	          gdb.Value.__init__(self, val, type)

	Currently, passing None for the Type will result in an error:

	  TypeError: type argument must be a gdb.Type.

	After this commit I now allow the type argument to be None, in which
	case GDB figures out a suitable type just as if the type had not been
	passed at all.

	Unless a user is trying to reinitialize a value, or create sub-classes
	of gdb.Value, there should be no user visible changes after this
	commit.

2021-12-08  Andrew Burgess  <aburgess@redhat.com>

	gdb: use try/catch around a gdb_disassembler::print_insn call
	While investigating some disassembler problems I ran into this case;
	GDB compiled on a 32-bit arm target, with --enable-targets=all.  Then
	in GDB:

	  (gdb) set architecture i386
	  (gdb) disassemble 0x0,+4
	  unknown disassembler error (error = -1)

	This is interesting because it shows a case where the libopcodes
	disassembler is returning -1 without first calling the
	memory_error_func callback.  Indeed, the return from libopcodes
	happens from this code snippet in i386-dis.c in the print_insn
	function:

	  if (address_mode == mode_64bit && sizeof (bfd_vma) < 8)
	    {
	      (*info->fprintf_func) (info->stream,
				     _("64-bit address is disabled"));
	      return -1;
	    }

	Notice how, prior to the return the disassembler tries to print a
	helpful message out, but GDB doesn't print this message.

	The reason this message goes missing is the call stack, it looks like
	this:

	  gdb_pretty_print_disassembler::pretty_print_insn
	    gdb_disassembler::print_insn
	      gdbarch_print_insn
	        ...
	          i386-dis.c:print_insn

	When i386-dis.c:print_insn returns -1 this is handled in
	gdb_disassembler::print_insn, where an exception is thrown.  However,
	the actual printing of the disassembler output is done in
	gdb_pretty_print_disassembler::pretty_print_insn, and is only done if
	an exception is not thrown.

	In this commit I change this.  The pretty_print_insn now uses
	try/catch around the call to gdb_disassembler::print_insn, if we catch
	an error then we first print any pending output in the instruction
	buffer, before rethrowing the exception.  As a result, even if an
	exception is thrown we still print any pending disassembler output to
	the screen; in the above case the helpful message will now be shown.

	Before my patch we might expect to see this output:

	  (gdb) disassemble 0x0,+4
	  Dump of assembler code from 0x0 to 0x4:
	     0x0000000000000000:	unknown disassembler error (error = -1)
	  (gdb)

	But now we see this:

	  (gdb) disassemble 0x0,+4
	  Dump of assembler code from 0x0 to 0x4:
	     0x0000000000000000:	64-bit address is disabled
	  unknown disassembler error (error = -1)

	If the disassembler returns -1 without printing a helpful message then
	we would still expect a change in output, something like:

	  (gdb) disassemble 0x0,+4
	  Dump of assembler code from 0x0 to 0x4:
	     0x0000000000000000:
	  unknown disassembler error (error = -1)

	Which I think is still acceptable, though at this point I think a
	strong case can be made that this is a disassembler bug (not printing
	anything, but still returning -1).

	Notice however, that the error message is always printed on a new line
	now.  This is also true for the memory error case, where before we
	might see this:

	  (gdb) disassemble 0x0,+4
	  Dump of assembler code from 0x0 to 0x4:
	     0x00000000:	Cannot access memory at address 0x0

	We now get this:

	  (gdb) disassemble 0x0,+4
	  Dump of assembler code from 0x0 to 0x4:
	     0x00000000:
	  Cannot access memory at address 0x0

	For me, I'm happy to accept this change, having the error on a line by
	itself, rather than just appended to the end of the previous line,
	seems like an improvement, but I'm aware others might feel
	differently, so I'd appreciate any feedback.

2021-12-08  Jan Vrany  <jan.vrany@labware.com>

	ppc: recognize all program traps
	Permanent program breakpoints (ones inserted into the code) other than
	the one GDB uses for POWER (0x7fe00008) did not result in stop but
	caused GDB to loop infinitely.

	This was because GDB did not recognize trap instructions other than
	"trap". For example, "tw 12, 4, 4" was not be recognized, causing GDB
	to loop forever.

	This commit fixes this by providing POWER specific hook
	(gdbarch_program_breakpoint_here_p) recognizing all tw, twi, td and tdi
	instructions.

	Tested on Linux on PowerPC e500 and on QEMU PPC64le.

2021-12-08  Jan Vrany  <jan.vrany@labware.com>

	ppc: use "trap" ("tw, 31, 0, 0") as breakpoint instruction
	Power ISA 3.0 B spec [1], sections 3.3.11 "Fixed-Point Trap Instructions"
	and section C.6 "Trap Mnemonics" specify "tw, 31, 0, 0" (encoded as
	0x7fe00008) as canonical unconditional trap instruction.

	This commit changes the breakpoint instruction used by GDB from
	"tw 12, r2, r2" to unconditional "trap".

	[1]: https://openpowerfoundation.org/?resource_lib=power-isa-version-3-0

2021-12-08  Fangrui Song  <maskray@google.com>

	bfd_section_from_shdr: Support SHT_RELR sections
	If a.so contains an SHT_RELR section, objcopy a.so will fail with:

	    a.so: unknown type [0x13] section `.relr.dyn'

	This change allows objcopy to work.

	bfd/
	    * elf.c (bfd_section_from_shdr): Support SHT_RELR.

2021-12-08  Alan Modra  <amodra@gmail.com>

	PR28673, input file 'gcov' is the same as output file
		PR 28673
		* ldlang.c (open_output): Use local_sym_name when checking
		output against input files rather than filename.

2021-12-08  Tom Tromey  <tom@tromey.com>

	Fix bug in source.c change
	My earlier change to source.c ("Remove an xfree from add_path")
	introduced a regression.  This patch fixes the problem.

2021-12-08  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: make struct linespect contain vectors, not pointers to vectors
	struct linespec contains pointers to vectors, instead of containing
	vectors directly.  This is probably historical, when linespec_parser
	(which contains a struct linespec field) was not C++-ified yet.  But it
	seems easy to change the pointers to vectors to just vectors today.
	This simplifies the code, we don't need to manually allocate and delete
	the vectors and there's no pointer that can be NULL.

	As far as I understand, there was not meaningful distinction between a
	NULL pointer to vector and an empty vector.  So all NULL checks are
	changed for !empty checks.

	Change-Id: Ie759707da14d9d984169b93233343a86e2de9ee6

2021-12-08  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-07  Tom Tromey  <tom@tromey.com>

	Remove an xfree from add_path
	This removes a temporary \0 assignment and an xfree from add_path,
	replacing it with a simpler use of std::string.

2021-12-07  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/linespec.c: simplify condition
	We can remove the empty check: if the vector has size 1, it is obviously
	not empty.  This code ended up like this because the empty check used to
	be a NULL check.

	Change-Id: I1571bd0228818ca93f6a6b444e9b010dc2da4c08

2021-12-07  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: rename "maint agent" functions
	Functions agent_eval_command and agent_command are used to implement
	maintenance commands, rename them accordingly (with the maint_ prefix),
	as well as the agent_command_1 helper function.

	Change-Id: Iacf96d4a0a26298e8dd4648a0f38da649ea5ef61

2021-12-07  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: make set_raw_breakpoint static
	set_raw_breakpoint is only used in breakpoint.c, make it static.

	Change-Id: I7fbeda067685309a30b88aceaf957eff7a28e310

2021-12-07  John Baldwin  <jhb@FreeBSD.org>

	Support AT_FXRNG and AT_KPRELOAD on FreeBSD.
	FreeBSD's kernel has recently added two new ELF auxiliary vector
	entries.  AT_FXRNG points to a root seed version for the kernel's
	PRNG.  Userland can use this to reseed a userland PRNG after the
	kernel's PRNG has reseeded.  AT_KPRELOAD is the base address of a
	kernel-provided vDSO.

	This change displays the proper name and description of these entries
	in 'info auxv'.

	include/ChangeLog:

		* elf/common.h (AT_FREEBSD_FXRNG, AT_FREEBSD_KPRELOAD): Define.

2021-12-07  Tom Tromey  <tromey@adacore.com>

	Avoid extra work in global_symbol_searcher::expand_symtabs
	I noticed that global_symbol_searcher::expand_symtabs always passes a
	file matcher to expand_symtabs_matching.  However, if 'filenames' is
	empty, then this always returns true.  It's slightly more efficient to
	pass a null file matcher in this case, because that lets the "quick"
	symbol implementations skip any filename checks.

	Regression tested on x86-64 Fedora 34.

2021-12-07  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix options arg handling in compile_jit_elf_main_as_so
	In commit 80ad340c902 ("[gdb/testsuite] use -Ttext-segment for jit-elf tests")
	the following change was made:
	...
	 proc compile_jit_elf_main_as_so {main_solib_srcfile main_solib_binfile options} {
	-    set options [concat $options debug]
	+    global jit_load_address jit_load_increment
	+
	+    set options [list \
	+       additional_flags="-DMAIN=jit_dl_main" \
	+       additional_flags=-DLOAD_ADDRESS=$jit_load_address \
	+       additional_flags=-DLOAD_INCREMENT=$jit_load_increment \
	+       debug]
	...

	Before the change, the options argument was used, but after the change not
	anymore.

	Fix this by reverting back to using "set options [concat $options ...]".

	Fixing this gets us twice the -DMAIN=jit_dl_main bit, once from a caller, and
	once from compile_jit_elf_main_as_so.  Fix this by removing the bit from
	compile_jit_elf_main_as_so, which makes the code similar to compile_jit_main.

	Tested on x86_64-linux.

2021-12-07  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix FAIL in gdb.tui/basic.exp
	On openSUSE Leap 15.2 aarch64 I ran into:
	...
	FAIL: gdb.tui/basic.exp: check main is where we expect on the screen
	...
	while this is passing on x86_64.

	On x86_64-linux we have at the initial screen dump for "list -q main":
	...
	 0 +-/home/vries/gdb_versions/devel/src/gdb/testsuite/gdb.tui/tui-layout.c--+
	 1 |       15     You should have received a copy of the GNU General Public |
	 2 |       16     along with this program.  If not, see <http://www.gnu.org/|
	 3 |       17                                                               |
	 4 |       18  int                                                          |
	 5 |       19  main ()                                                      |
	 6 |       20  {                                                            |
	 7 |       21    return 0;                                                  |
	 8 |       22  }                                                            |
	 9 |       23                                                               |
	...
	but on aarch64:
	...
	 0 +-/home/tdevries/gdb/src/gdb/testsuite/gdb.tui/tui-layout.c--------------+
	 1 |       16     along with this program.  If not, see <http://www.gnu.org/|
	 2 |       17                                                               |
	 3 |       18  int                                                          |
	 4 |       19  main ()                                                      |
	 5 |       20  {                                                            |
	 6 |       21    return 0;                                                  |
	 7 |       22  }                                                            |
	 8 |       23                                                               |
	 9 |       24                                                               |
	...

	The cause of the diffferent placement is that we have as line number for main
	on x86_64:
	...
	$ gdb -q -batch outputs/gdb.tui/basic/basic -ex "info line main"
	Line 20 of "tui-layout.c" starts at address 0x4004a7 <main> \
	  and ends at 0x4004ab <main+4>.
	...
	and on aarch64 instead:
	...
	$ gdb -q -batch outputs/gdb.tui/basic/basic -ex "info line main"
	Line 21 of "tui-layout.c" starts at address 0x4005f4 <main> \
	  and ends at 0x4005f8 <main+4>.
	...

	Fix this by using a new source file main-one-line.c, that implements the
	entire main function on a single line, in order to force the compiler to use
	that line number.

	Also try to do less hard-coding in the test-case.

	Tested on x86_64-linux and aarch64-linux.

2021-12-07  Tom de Vries  <tdevries@suse.de>

	[gdb/tdep] Fix inferior plt calls in PIE for i386
	Consider test-case test.c:
	...
	int main (void) {
	  void *p = malloc (10);
	  return 0;
	}
	...

	When compiled to a non-PIE exec:
	...
	$ gcc -m32 test.c
	...
	the call sequence looks like:
	...
	 8048447:       83 ec 0c                sub    $0xc,%esp
	 804844a:       6a 0a                   push   $0xa
	 804844c:       e8 bf fe ff ff          call   8048310 <malloc@plt>
	...
	which calls to:
	...
	08048310 <malloc@plt>:
	 8048310:       ff 25 0c a0 04 08       jmp    *0x804a00c
	 8048316:       68 00 00 00 00          push   $0x0
	 804831b:       e9 e0 ff ff ff          jmp    8048300 <.plt>
	...
	where the first insn at 0x8048310 initially jumps to the following address
	0x8048316, read from the .got.plt @ 0x804a00c:
	...
	 804a000 0c9f0408 00000000 00000000 16830408  ................
	 804a010 26830408                             &...
	...

	Likewise, when compiled as a PIE:
	...
	$ gcc -m32 -fPIE -pie test.c
	...
	we have this call sequence (with %ebx setup to point to the .got.plt):
	...
	0000055d <main>:
	 579:   83 ec 0c                sub    $0xc,%esp
	 57c:   6a 0a                   push   $0xa
	 57e:   89 c3                   mov    %eax,%ebx
	 580:   e8 6b fe ff ff          call   3f0 <malloc@plt>
	...
	which calls to:
	...
	000003f0 <malloc@plt>:
	 3f0:   ff a3 0c 00 00 00       jmp    *0xc(%ebx)
	 3f6:   68 00 00 00 00          push   $0x0
	 3fb:   e9 e0 ff ff ff          jmp    3e0 <.plt>
	...
	where the insn at 0x3f0 initially jumps to following address 0x3f6, read from
	the .got.plt at offset 0xc:
	...
	 2000 f41e0000 00000000 00000000 f6030000  ................
	 2010 06040000                             ....
	...

	When instead doing an inferior call to malloc (with nosharedlib to force
	malloc to resolve to malloc@plt rather than the functions in ld.so or libc.so)
	with the non-PIE exec, we have the expected:
	...
	$ gdb -q -batch a.out -ex start -ex nosharedlib -ex "p /x (void *)malloc (10)"
	Temporary breakpoint 1 at 0x8048444

	Temporary breakpoint 1, 0x08048444 in main ()
	$1 = 0x804b160
	...

	But with the PIE exec, we run into:
	...
	$ gdb -q -batch a.out -ex start -ex nosharedlib -ex "p /x (void *)malloc (10)"
	Temporary breakpoint 1 at 0x56c

	Temporary breakpoint 1, 0x5655556c in main ()

	Program received signal SIGSEGV, Segmentation fault.
	0x565553f0 in malloc@plt ()
	...

	The segfault happens because:
	- the inferior call mechanism doesn't setup %ebx
	- %ebx instead is 0
	- the jump to "*0xc(%ebx)" reads from memory at 0xc

	Fix this by setting up %ebx properly in i386_thiscall_push_dummy_call.

	Fixes this failure with target board unix/-m32/-pie/-fPIE reported in
	PR28467:
	...
	FAIL: gdb.base/nodebug.exp: p/c (int) array_index("abcdef",2)
	...

	Tested on x86_64-linux, with target board unix/-m32 and unix/-m32/-fPIE/-pie.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28467

2021-12-07  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Support -readnow during reread
	When running test-case gdb.base/cached-source-file.exp with target board
	readnow, we run into:
	...
	FAIL: gdb.base/cached-source-file.exp: rerun program (the program exited)
	...

	The problem is that when rereading, the readnow is ignored.

	Fix this by copying the readnow handling code from symbol_file_add_with_addrs
	to reread_symbols.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=26800

2021-12-07  Tom de Vries  <tdevries@suse.de>

	[gdb/ada] Fix assert in ada_is_unconstrained_packed_array_type
	On openSUSE Leap 42.3, with system compiler gcc 4.8.5 I run into:
	...
	(gdb) print u_one_two_three^M
	src/gdb/gdbtypes.h:1050: internal-error: field: \
	 Assertion `idx >= 0 && idx < num_fields ()' failed.^M
	...

	We run into trouble while doing this in
	ada_is_unconstrained_packed_array_type:
	...
	1953          return TYPE_FIELD_BITSIZE (type, 0) > 0;
	...
	which tries to get field 0 from a type without fields:
	...
	(gdb) p type->num_fields ()
	$6 = 0
	...
	which is the case because the type is a typedef:
	...
	(gdb) p type->code ()
	$7 = TYPE_CODE_TYPEDEF
	...

	Fix this by using the type referenced by the typedef instead.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28323

2021-12-07  Alan Modra  <amodra@gmail.com>

	Re: Add support for AArch64 EFI (efi-*-aarch64)
	Commit b69c9d41e8 was broken in multiple ways regarding the realloc
	of the target string, most notably in that "-little" wasn't actually
	appended to the input_target or output_target.  This caused asan
	errors and "FAIL: Check if efi app format is recognized".  I also
	noticed that the input_target string wasn't being copied but rather
	the output_target when dealing with the input target.  Fix that too.

		PR 26206
		* objcopy.c (convert_efi_target): Rewrite.  Allocate modified
		target strings here..
		(copy_main): ..rather than here.  Do handle input_target,
		not output_target for input.

2021-12-07  Alan Modra  <amodra@gmail.com>

	Error on ld output file name matching input file name
	It's not foolproof, for example we don't catch output to a linker
	script, to a library specified with -l, or to an element of a thin
	archive.

		* ldlang.c (open_output): Exit with error on output file matching
		an input file.
		* testsuite/ld-misc/just-symbols.exp: Adjust ld -r test to suit.

2021-12-07  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-06  Carl Love  <cel@us.ibm.com>

	gdb: Add PowerPC support to gdb.dwarf2/frame-inlined-in-outer-frame
	This patch adds an #elif defined for PowerPC to setup the exit_0 macro.
	This patch addes the needed macro definitionald logic to handle both elfV1
	and elfV2.

	The patch has been successfully tested on both PowerPC BE, Powerpc LE and
	X86_64 with no regressions.

2021-12-06  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Use precise align in gdb.arch/i386-{avx,sse}.exp
	Test-cases gdb.arch/i386-{avx,sse}.exp use assembly instructions that require
	the memory operands to be aligned to a certain boundary, and the test-cases
	use C11's _Alignas to make that happen.

	The draw-back of using _Alignas is that while it does enforce a minimum
	alignment, the actual alignment may be bigger, which makes the following
	scenario possible:
	- copy say, gdb.arch/i386-avx.c as basis for a new test-case
	- run the test-case and observe a PASS
	- commit the new test-case in the supposition that the test-case is correct
	  and well-tested
	- run later into a failure on a different test setup (which may be a setup
	  where reproduction and investigation is more difficult and time-consuming),
	  and find out that the specified alignment was incorrect and should have been
	  updated to say, 64 bytes.  The initial PASS occurred only because the actual
	  alignment happened to be greater than required.

	The idea of having precise alignment as a means of having more predictable
	execution which allows flushing out bugs earlier, has been filed as PR
	gcc/103095.

	Add a new file lib/precise-aligned-alloc.c with functions
	precise_aligned_alloc and precise_aligned_dup, to support precise alignment.

	Use precise_aligned_dup in aforementioned test-cases to:
	- verify that the specified alignment is indeed sufficient, rather
	  than too little but accidentally over-aligned.
	- prevent the same type of problems in any new test-cases based on these

	Tested on x86_64-linux, with both gcc and clang.

2021-12-06  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix data alignment in gdb.arch/i386-{avx,sse}.exp
	When running test-case gdb.arch/i386-avx.exp with clang I ran into:
	...
	(gdb) PASS: gdb.arch/i386-avx.exp: set first breakpoint in main
	continue^M
	Continuing.^M
	^M
	Program received signal SIGSEGV, Segmentation fault.^M
	0x000000000040052b in main (argc=1, argv=0x7fffffffd3c8) at i386-avx.c:54^M
	54        asm ("vmovaps 0(%0), %%ymm0\n\t"^M
	(gdb) FAIL: gdb.arch/i386-avx.exp: continue to breakpoint: \
	  continue to first breakpoint in main
	...

	The problem is that the vmovaps insn requires an 256-bit (or 32-byte) aligned
	address, and it's only 16-byte aligned:
	...
	(gdb) p /x $rax
	$1 = 0x601030
	...

	Fix this by using a sufficiently aligned address, using _Alignas.

	Compile using -std=gnu11 to support _Alignas.

	Likewise in gdb.arch/i386-sse.exp.

	Tested on x86_64-linux, with both gcc and clang.

2021-12-06  Alan Modra  <amodra@gmail.com>

	[GOLD] PowerPC64 inline plt sequences
	The fixes gold failures to handle inline PLT sequences properly.
	PowerPC gold was always turning these back into direct calls due to
	gsym->use_plt_offset() returning false.  This is fixed for dynamic
	linking by correcting get_reference_flags, and for static linking by
	overriding use_plt_offset() in relocate().  The rest of the patch
	revolves around needing to create PLT entries for inline PLT calls
	when statically linking (for gcc -mlongcall).  The lplt section
	handled that for local symbols, now it does globals too.

		* powerpc.cc (Target_powerpc::plt_off): Return proper section
		for static link.
		(Target_powerpc::symval_for_branch): Make public.
		(Target_powerpc::make_lplt_section): Add Symbol_table* param.
		Adjust all calls.
		(Target_powerpc::make_local_plt_entry): Likewise.
		(Target_powerpc::make_local_plt_entry): New variant for global syms.
		(Powerpc_relobj::do_relocate_sections): Don't write lplt contents.
		(Output_data_plt_powerpc::do_write): Write lplt contents here.
		(Output_data_plt_powerpc::Output_data_plt_powerpc): Save
		symbol table pointer.  Adjust all uses.
		(Output_data_plt_powerpc::add_entry): Add stash parameter.  Don't
		do dynamic reloc handling when no reloc section.  Save symbol
		for local plt entries.
		(Output_data_plt_powerpc::add_local_entry): Save symbol.
		(Output_data_plt_powerpc::Local_plt_ent): New class.
		(Output_data_plt_powerpc::sym_ents_): New vector.
		(Target_powerpc::Scan::get_reference_flags): Return
		FUNCTION_CALL|RELATIVE_REF for inline plt relocs.
		(Target_powerpc::Scan::global): Make entries in lplt for inline
		plt call relocation symbols.
		(Target_powerpc::Relocate::relocate): Rename has_plt_offset to
		use_plt_offset.  Set use_plt_offset for inline plt relocs.

2021-12-06  Clément Chigot  <clement.chigot@atos.net>

	ld: improve shared tests for AIX
	It's now possible to refer symbols in the main program from the
	shared library. However, it still impossible to have the same
	overriden features between shared objects and mains than ELF,
	without using the runtime linking feature which isn't yet fully
	available.

	ld/ChangeLog:

		* testsuite/ld-shared/shared.exp: Improve XCOFF support
		* testsuite/ld-shared/main.c: Likewise.
		* testsuite/ld-shared/sh1.c: Likewise.
		* testsuite/ld-shared/xcoff.dat: Likewise.

2021-12-06  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-05  Tom Tromey  <tom@tromey.com>

	Preserve artificial CU name in process_psymtab_comp_unit_reader
	This fixes a use-after-free that Simon pointed out.
	process_psymtab_comp_unit_reader was allocating an artificial name for
	a CU, and then discarding it.  However, this name was preserved in the
	cached file_and_directory.  This patch arranges for the allocated name
	to be preserved there.

2021-12-05  Mike Frysinger  <vapier@gentoo.org>

	sim: include ansidecl.h when needed
	Avoid implicit include deps with this to help untangle sim headers
	so we can get rid of arch-specific sim-main.h.

	sim: include stdint.h when needed
	Avoid implicit include deps with this to help untangle sim headers
	so we can get rid of arch-specific sim-main.h.

	sim: include stdarg.h when used
	Avoid implicit include deps with this to help untangle sim headers
	so we can get rid of arch-specific sim-main.h.

2021-12-05  Mike Frysinger  <vapier@gentoo.org>

	sim: reorder header includes
	We're including system headers after local headers in a bunch of
	places, but this leads to conflicts when our local headers happen
	to define symbols that show up in the system headers.

	Use the more standard order of:
	* config.h (via defs.h)
	* system headers
	* local library headers (e.g. bfd & libiberty)
	* sim specific headers

2021-12-05  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbsupport: fix memory leak in create_file_handler when re-using file handler
	ASan made me notice a memory leak, where the memory tied to the file
	handle name string wasn't freed.  When register a file handler with an
	fd that is already registered, we re-use the file_handler object, so we
	ended up creating a new std::string object and overwriting the
	file_handler::name pointer, without free-ing the old std::string.

	Fix this by allocating file_handler with new, deleting it with
	delete, and making file_handler::name not a pointer.

	Change-Id: Ie304cc78ab5ae5dfad9a1366e9890c09de651f43

2021-12-05  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-04  Mike Frysinger  <vapier@gentoo.org>

	sim: moxie: hoist dtb rules up to common builds
	These rules don't depend on the target compiler settings, so hoist
	the build logic up to the common builds for better parallelization.

	sim: m68hc11: delete unused profile flags
	These were moved to the common configure script a while ago and have
	the same default as these, so just delete it.

	sim: msp430: delete redundant comments & settings
	These were copied from the example docs, so aren't adding any value.

	sim: erc32: drop old configure target
	There is no configure script in here anymore to regenerate.

	sim: m32c/rl78: drop redundant -Wall settings
	We already turn these on in the configure script.

2021-12-04  Tom Tromey  <tom@tromey.com>

	Cache the result of find_file_and_directory
	This changes the DWARF reader to cache the result of
	find_file_and_directory.  This is not especially important now, but it
	will help the new DWARF indexer.

	Move file_and_directory to new file and C++-ize
	This moves file_and_directory to a new file, and then C++-izes it --
	replacing direct assignments with methods, and arranging for it to own
	any string that must be computed.  Finally, the CU's objfile will only
	be used on demand; this is an important property for the new DWARF
	indexer's parallel mode.

	Remove Irix case from find_file_and_directory
	find_file_and_directory has a special case for the Irix 6.2 compiler.
	Since this is long obsolete, this patch removes it.

2021-12-04  Mike Frysinger  <vapier@gentoo.org>

	sim: frv: split up testsuite a bit
	Running frv's allinsn in serial is quite slow due to the sheer number
	of tests it contains.  By splitting it up and running in parallel, the
	execution time on my system goes from ~100sec to ~60sec.

2021-12-04  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: don't show deprecated aliases
	I don't think it's very useful to show deprecated aliases to the
	user.  It encourages the user to use them, when the goal is the
	opposite.

	For example, before:

	    (gdb) help set index-cache enabled
	    set index-cache enabled, set index-cache off, set index-cache on
	      alias set index-cache off = set index-cache enabled off
	      alias set index-cache on = set index-cache enabled on
	    Enable the index cache.
	    When on, enable the use of the index cache.

	    (gdb) help set index-cache on
	    Warning: 'set index-cache on', an alias for the command 'set index-cache enabled', is deprecated.
	    Use 'set index-cache enabled on'.

	    set index-cache enabled, set index-cache off, set index-cache on
	      alias set index-cache off = set index-cache enabled off
	      alias set index-cache on = set index-cache enabled on
	    Enable the index cache.
	    When on, enable the use of the index cache.

	After:

	    (gdb) help set index-cache enabled
	    Enable the index cache.
	    When on, enable the use of the index cache.
	    (gdb) help set index-cache on
	    Warning: 'set index-cache on', an alias for the command 'set index-cache enabled', is deprecated.
	    Use 'set index-cache enabled on'.

	    Enable the index cache.
	    When on, enable the use of the index cache.

	Change-Id: I989b618a5ad96ba975367e9d16db95523cd57a4c

2021-12-04  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: fix two "maint info line-table"-related tests
	Commit 92228a334ba2 ("gdb: small "maintenance info line-table"
	readability improvements") change the output format of "maint info
	line-table" slightly, adding some empty lines between each
	line-table.  This causes two tests to start failing, update them to
	account for those empty lines.

	Change-Id: I9d33a58fce3e860ba0554b25f5582e8066a5c519

2021-12-04  Simon Marchi  <simon.marchi@efficios.com>

	gdb: revert one array_view copy change in ada-lang.c
	Commit 4bce7cdaf481 ("gdbsupport: add array_view copy function") caused
	an internal error when running gdb.ada/packed_array_assign.exp:

	    print pra(1) := pr^M
	    /home/smarchi/src/binutils-gdb/gdb/../gdbsupport/array-view.h:217: internal-error: copy: Assertion `dest.size () == src.size ()' failed.^M

	I am not sure what's the root cause of this, whether it is a GDB bug
	exposed by using the array_view copy function or not.  Back out the
	change that triggers the internal error for now, while we investigate
	it.

	Change-Id: I055ab14143e4cfd3ca7ce8f4855c6c3c05db52a7

2021-12-04  Mike Frysinger  <vapier@gentoo.org>

	bfd: unify header generation rules
	The logic between these rules are extremely similar, so unify them
	into a single variable.

2021-12-04  Mike Frysinger  <vapier@gentoo.org>

	bfd: move header updates up a directory
	The rules for rebuilding the bfd headers live in the doc/ subdir
	(most likely) because they rely on the chew & related tools.  But
	we can collapse them into the main Makefile while keeping the tools
	in the doc subdir easily enough.  This makes the code simpler and
	allows for rebuilding them in parallel.

	Also add automake silent rule support while we're here.

2021-12-04  Mike Frysinger  <vapier@gentoo.org>

	bfd: convert bfdver.h to silent automake rules

2021-12-04  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-03  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: small "maintenance info line-table" readability improvements
	 - separate each entry with a newline, to visually separate them
	 - style filenames with the filename style
	 - print the name of the compunit_symtab

	A header now looks like this, with the compunit_symtab name added (and
	the coloring, but you can't really see it here):

	    objfile: /home/simark/build/babeltrace/src/cli/.libs/babeltrace2 ((struct objfile *) 0x613000005980)
	    compunit_symtab: babeltrace2-cfg-cli-args.c ((struct compunit_symtab *) 0x62100da1ed10)
	    symtab: /usr/include/glib-2.0/glib/gdatetime.h ((struct symtab *) 0x62100d9ee530)
	    linetable: ((struct linetable *) 0x0):

	Change-Id: Idc23e10aaa66e2e692adb0a6a74144f72c4fa1c7

2021-12-03  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: change some alias functions parameters to const-reference
	Now that we use intrusive list to link aliases, it becomes easier to
	pass cmd_list_element arguments by const-reference rather than by
	pointer to some functions, change a few.

	Change-Id: Id0df648ed26e9447da0671fc2c858981cda31df8

2021-12-03  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: use intrusive_list for cmd_list_element aliases list
	Change the manually-implemented linked list to use intrusive_list.  This
	is not strictly necessary, but it makes the code much simpler.

	Change-Id: Idd08090ebf2db8bdcf68e85ef72a9635f1584ccc

2021-12-03  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: trivial changes to use array_view
	Change a few relatively obvious spots using value contents to propagate
	the use array_view a bit more.

	Change-Id: I5338a60986f06d5969fec803d04f8423c9288a15

2021-12-03  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: make extract_integer take an array_view
	I think it would make sense for extract_integer, extract_signed_integer
	and extract_unsigned_integer to take an array_view.  This way, when we
	extract an integer, we can validate that we don't overflow the buffer
	passed by the caller (e.g. ask to extract a 4-byte integer but pass a
	2-byte buffer).

	 - Change extract_integer to take an array_view
	 - Add overloads of extract_signed_integer and extract_unsigned_integer
	   that take array_views.  Keep the existing versions so we don't
	   need to change all callers, but make them call the array_view
	   versions.

	This shortens some places like:

	  result = extract_unsigned_integer (value_contents (result_val).data (),
					     TYPE_LENGTH (value_type (result_val)),
					     byte_order);

	into

	  result = extract_unsigned_integer (value_contents (result_val), byte_order);

	value_contents returns an array view that is of length
	`TYPE_LENGTH (value_type (result_val))` already, so the length is
	implicitly communicated through the array view.

	Change-Id: Ic1c1f98c88d5c17a8486393af316f982604d6c95

2021-12-03  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbsupport: add array_view copy function
	An assertion was recently added to array_view::operator[] to ensure we
	don't do out of bounds accesses.  However, when the array_view is copied
	to or from using memcpy, it bypasses that safety.

	To address this, add a `copy` free function that copies data from an
	array view to another, ensuring that the destination and source array
	views have the same size.  When copying to or from parts of an
	array_view, we are expected to use gdb::array_view::slice, which does
	its own bounds check.  With all that, any copy operation that goes out
	of bounds should be caught by an assertion at runtime.

	copy is implemented using std::copy and std::copy_backward, which, at
	least on libstdc++, appears to pick memmove when copying trivial data.
	So in the end there shouldn't be much difference vs using a bare memcpy,
	as we do right now.  When copying non-trivial data, std::copy and
	std::copy_backward assigns each element in a loop.

	To properly support overlapping ranges, we must use std::copy or
	std::copy_backward, depending on whether the destination is before the
	source or vice-versa.  std::copy and std::copy_backward don't support
	copying exactly overlapping ranges (where the source range is equal to
	the destination range).  But in this case, no copy is needed anyway, so
	we do nothing.

	The order of parameters of the new copy function is based on std::copy
	and std::copy_backward, where the source comes before the destination.

	Change a few randomly selected spots to use the new function, to show
	how it can be used.

	Add a test for the new function, testing both with arrays of a trivial
	type (int) and of a non-trivial type (foo).  Test non-overlapping
	ranges as well as three kinds of overlapping ranges: source before dest,
	dest before source, and dest == source.

	Change-Id: Ibeaca04e0028410fd44ce82f72e60058d6230a03

2021-12-03  Simon Marchi  <simon.marchi@efficios.com>

	gdb: change store_waitstatus to return a target_waitstatus by value
	store_waitstatus is basically a translation function between a status
	integer and an equivalent target_waitstatus object.  It would make sense
	for it to take the integer as a parameter and return the
	target_waitstatus by value.  Do that, and rename to
	host_status_to_waitstatus.  Users can then do:

	  ws = host_status_to_waitstatus (status)

	which does the right thing, given the move constructor of
	target_waitstatus.

	Change-Id: I7a07d59d3dc19d3ed66929642f82f44f3e85d61b

2021-12-03  Simon Marchi  <simon.marchi@efficios.com>

	gdb: return *this in target_waitstatus setters
	While playing with some code creating target_waitstatus objects, I was
	mildly annoyed by the fact that we can't just return a new
	target_waitstatus object.  We have to do:

	    target_waitstatus ws;
	    ws.set_exited (123);
	    return ws;

	Make the setters return the "this" object as a reference, such that it's
	possible to do:

	    return target_waitstatus ().set_exited (123);

	I initially thought of adding static creation functions, which you would
	use like:

	    return target_waitstatus::make_exited (123);

	However, making the setters return a reference to the object achieves
	pretty much the same thing, with less new code.

	Change-Id: I45159b7f9fcd9db5b20603480e323020b14ed147

2021-12-03  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: make saved_filename an std::string
	Make this variable an std::string, avoiding manual memory management.

	Change-Id: Ie7a8d7381449ab9c4dfc4cb8b99e63b9ffa8f947

2021-12-03  Richard Sandiford  <richard.sandiford@arm.com>

	aarch64: Fix uninitialised memory
	AARCH64_OPDE_EXPECTED_A_AFTER_B and AARCH64_OPDE_A_SHOULD_FOLLOW_B
	are not paired with an error string, but we had an assert that the
	error was nonnull.  Previously this assert was testing uninitialised
	memory and so could pass or fail arbitrarily.

	opcodes/
		* aarch64-opc.c (verify_mops_pme_sequence): Initialize the error
		field to null for AARCH64_OPDE_EXPECTED_A_AFTER_B and
		AARCH64_OPDE_A_SHOULD_FOLLOW_B.
		* aarch64-dis.c (print_verifier_notes): Move assert.

2021-12-03  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: make value_subscripted_rvalue static
	The function value_subscripted_rvalue is only used in valarith.c, so
	lets make it a static function.

	There should be no user visible change after this commit.

2021-12-03  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: give a test a real name
	A test in gdb.python/py-send-packet.exp added in this commit:

	  commit 24b2de7b776f8f23788d855b1eec290c6e208821
	  Date:   Tue Aug 31 14:04:36 2021 +0100

	      gdb/python: add gdb.RemoteTargetConnection.send_packet

	included a large amount of binary data in the command sent to GDB.  As
	this test didn't have a real test name the binary data was included in
	the gdb.sum file.  The contents of the binary data could change
	between different runs of GDB, and this makes comparing results
	harder.

	This commit gives the test a real test name.

2021-12-03  Andrew Burgess  <aburgess@redhat.com>

	gdb/remote: fix use after free bug
	This commit:

	  commit 288712bbaca36bff6578bc839ebcdc3707662f81
	  Date:   Mon Nov 22 15:16:27 2021 +0000

	      gdb/remote: use scoped_restore to control starting_up flag

	introduced a use after free bug.  The scoped restore added in the
	above commit resets a flag within a remote_target's remote_state
	object.

	However, in some situations, the remote_target can be unpushed before
	the error is thrown.  If the only reference to the target is the one
	in the target stack, then unpushing the target will cause the
	remote_target to be deleted, which, in turn, will delete the
	remote_state object.  The scoped restore will then try to reset the
	flag within a deleted object.

	This problem was caught in the gdb.server/server-connect.exp test,
	which, when run with the address sanitizer enabled, highlights the
	write after free bug described above.

	This commit resolves this issue by adding a new class specifically for
	the purpose of managing the starting_up flag.  As well as setting, and
	then clearing the starting_up flag, this new class increments, and
	then decrements the reference count on the remote_target object.  This
	prevents the remote_target from being deleted until after the flag has
	been reset.

	The gdb.server/server-connect.exp now runs cleanly with the address
	sanitizer enabled.

2021-12-03  Mike Frysinger  <vapier@gentoo.org>

	libctf: workaround automake bug with conditional info pages
	It looks like automake makes assumptions about its ability to build info
	pages based on the GNU standard behavior of shipping info pages with the
	distributions.  So even though the info pages were conditionalized, and
	automake disabled some of the targets, it was still creeping in by way
	of unconditional INFO_DEPS settings.

	We can workaround this by adding a stub target for the info page when
	building info pages are disabled.  This tricks automake into disabling
	its own extended generation target.  I'll follow up with the automake
	folks to see what they think.

2021-12-03  Chenghua Xu  <xuchenghua@loongson.cn>

	Add myself and Zhensong Liu as the LoongArch port maintainer.

2021-12-03  Alan Modra  <amodra@gmail.com>

	Revert "Re: Don't compile some opcodes files when bfd is 32-bit only"
	This reverts commit 7a53275579e7cec9389ccb924f5ecf69e8d89d41.
	The bpf sim doesn't work with a 32-bit bfd after all.

2021-12-03  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-02  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove unexpected xstrdup in _initialize_maint_test_settings
	That xstrdup is not correct, since we are assigning an std::string.  The
	result of xstrdup is used to initialize the string, and then lost
	forever.  Remove it.

	Change-Id: Ief7771055e4bfd643ef3b285ec9fb7b1bfd14335

2021-12-02  Nick Clifton  <nickc@redhat.com>

	Fix illegal memory access whilst parsing corrupt DWARF debug information.
		PR 28645
		* dwarf.c (process_cu_tu_index): Add test for overruning section
		whilst processing slots.

2021-12-02  Tom de Vries  <tdevries@suse.de>

	[gdb/tdep] Fix avx512 -m32 support in gdbserver
	PR27257 reports a problem that can be reproduced as follows:
	- use x86_64 machine with avx512 support
	- compile a hello world with -m32 to a.out
	- start a gdbserver session with a.out
	- use gdb to connect to the gdbserver session

	This makes us run into:
	...
	Listening on port 2346
	Remote debugging from host ::1, port 34940
	src/gdbserver/regcache.cc:257: \
	  A problem internal to GDBserver has been detected.
	Unknown register zmm16h requested
	...

	The problem is that i387_xsave_to_cache in gdbserver/i387-fp.cc can't find a
	register zmm16h in the register cache.

	To understand how this happens, first some background.

	SSE has 16 128-bit wide xmm registers.

	AVX extends the SSE registers set as follows:
	- it extends the 16 existing 128-bit wide xmm registers to 256-bit wide ymm
	  registers.

	AVX512 extends the AVX register set as follows:
	- it extends the 16 existing 256-bit wide ymm registers to 512-bit wide zmm
	  registers.
	- it adds 16 additional 512-bit wide zmm registers (with corresponding ymm and
	  xmm subregisters added as well)

	However, in 32-bit mode, there are only 8 xmm/ymm/zmm registers.

	The problem we're running into is that gdbserver/i387-fp.cc uses these
	constants to describe the size of the register file:
	...
	static const int num_avx512_zmmh_low_registers = 16;
	static const int num_avx512_zmmh_high_registers = 16;
	static const int num_avx512_ymmh_registers = 16;
	static const int num_avx512_xmm_registers = 16;
	...
	which are all incorrect for the 32-bit case.

	Fix this by replacing the constants with variables that have the appropriate
	values in 64-bit and 32-bit mode.

	Tested on x86_64-linux with native and unix/-m32.

2021-12-02  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: update tests looking for "DWARF 2" debug format
	Commit ab557072b8ec ("gdb: use actual DWARF version in compunit's
	debugformat field") changes the debug format string in "info source" to
	show the actual DWARF version, rather than always show "DWARF 2".

	However, it failed to consider that some tests checked for the "DWARF 2"
	string to see if the test program is compiled with DWARF debug
	information.  Since everything is compiled with DWARF 4 or 5 nowadays,
	that changed the behavior of those tests.  Notably, it prevent the
	tests using skip_inline_var_tests to run.

	Grep through the testsuite for "DWARF 2" and change all occurrences I
	could find to use "DWARF [0-9]" instead (that string is passed to TCL's
	string match).

	Change-Id: Ic7fb0217fb9623880c6f155da6becba0f567a885

2021-12-02  Joel Brobecker  <brobecker@adacore.com>

	(PPC64) fix handling of fixed-point values when using "return" command
	In the gdb.ada/fixed_points_function.exp testcase, we have the following
	Ada code...

	   type FP1_Type is delta 0.1 range -1.0 .. +1.0; --  Ordinary
	   function Call_FP1 (F : FP1_Type) return FP1_Type is
	   begin
	      FP1_Arg := F;
	      return FP1_Arg;
	   end Call_FP1;

	... used as follow:

	   F1 : FP1_Type := 1.0;
	   F1 := Call_FP1 (F1);

	The testcase, among other things, verifies that "return" works
	properly as follow:

	    | (gdb) return 1.0
	    | Make pck.call_fp1 return now? (y or n) y
	    | [...]
	    | 9          F1 := Call_FP1 (F1);
	    | (gdb) next
	    | (gdb) print f1
	    | $1 = 0.0625

	The output of the last command shows that we returned the wrong
	value. The value printed gives a clue about the problem, since
	it is 1/16th of the value we expected, where 1/16 is FP1_Type's
	scaling factor.

	The problem, here, comes from the fact that the function
	handling return values for base types (ppc64_sysv_abi_return_value_base)
	writes the return value using unpack_long which, upon seeing that
	the value being unpacked is a fixed point type, applies the scaling
	factor, to get the integer-representation of our fixed-point value
	(similar to what it does with floats, for instance).

	So, the fix consists in teaching ppc64_sysv_abi_return_value_base
	about fixed-point types, and to avoid the unwanted application
	of the scaling factor.

	Note that the "finish" function, on the other hand, does not
	suffer from this issue, simply becaue the value returned by
	the function is read from register without the use of a type,
	thus avoiding an unwanted application of a scaling factor.

	No test added, as this change is already tested by
	gdb.ada/fixed_points_function.exp.

	Co-Authored-By: Tristan Gingold <gingold@adacore.com>

2021-12-02  Joel Brobecker  <brobecker@adacore.com>

	(RISCV) fix handling of fixed-point type return values
	This commit adds support for TYPE_CODE_FIXED_POINT types for
	"finish" and "return" commands.

	Consider the following Ada code...

	   type FP1_Type is delta 0.1 range -1.0 .. +1.0; --  Ordinary
	   function Call_FP1 (F : FP1_Type) return FP1_Type is
	   begin
	      FP1_Arg := F;
	      return FP1_Arg;
	   end Call_FP1;

	... used as follow:

	   F1 : FP1_Type := 1.0;
	   F1 := Call_FP1 (F1);

	"finish" currently behaves as follow:

	    | (gdb) finish
	    | [...]
	    | Value returned is $1 = 0

	We expect the returned value to be "1".

	Similarly, "return" makes the function return the wrong value:

	    | (gdb) return 1.0
	    | Make pck.call_fp1 return now? (y or n) y
	    | [...]
	    | 9          F1 := Call_FP1 (F1);
	    | (gdb) next
	    | (gdb) print f1
	    | $1 = 0.0625

	(we expect it to print "1" instead).

	This problem comes from the handling of integral return values
	when the return value is actually fixed point type. Our type
	here is actually a range of a fixed point type, but the same
	principles should also apply to pure fixed-point types. For
	the record, here is what the debugging info looks like:

	 <1><238>: Abbrev Number: 2 (DW_TAG_subrange_type)
	    <239>   DW_AT_lower_bound : -16
	    <23a>   DW_AT_upper_bound : 16
	    <23b>   DW_AT_name        : pck__fp1_type
	    <23f>   DW_AT_type        : <0x248>

	 <1><248>: Abbrev Number: 4 (DW_TAG_base_type)
	    <249>   DW_AT_byte_size   : 1
	    <24a>   DW_AT_encoding    : 13      (signed_fixed)
	    <24b>   DW_AT_binary_scale: -4
	    <24c>   DW_AT_name        : pck__Tfp1_typeB
	    <250>   DW_AT_artificial  : 1

	... where the scaling factor is 1/16.

	Looking at the "finish" command, what happens is that riscv_arg_location
	determines that our return value should be returned by parameter using
	an integral convention (via builtin type long). And then,
	riscv_return_value uses a cast to that builtin type long to
	store the value of into a buffer with the right register size.
	This doesn't work in our case, because the underlying value
	returned by the function is unscaled, which means it is 16,
	and thus the cast is like doing:

	   arg_val = (FP1_Type) 16

	... In other words, it is trying to create an FP1_Type enty whose
	value is 16. Applying the scaling factor, that's 256, and because
	the size of FP1_Type is 1 byte, we overflow and thus it ends up
	being zero.

	The same happen with the "return" function, but the other way around.

	The fix consists in handling fixed-point types separately from
	integral types.

2021-12-02  Joel Brobecker  <brobecker@adacore.com>

	(ARM/fixed-point) wrong value shown by "finish" command:
	Consider the following Ada code:

	   type FP1_Type is delta 0.1 range -1.0 .. +1.0; --  Ordinary
	   FP1_Arg : FP1_Type := 0.0;

	   function Call_FP1 (F : FP1_Type) return FP1_Type is
	   begin
	      FP1_Arg := F;
	      return FP1_Arg;
	   end Call_FP1;

	After having stopped inside function Call_FP1 as follow:

	    Breakpoint 1, pck.call_fp1 (f=1) at /[...]/pck.adb:5
	    5             FP1_Arg := F;

	Returning from that function call using "finish" should show
	that the function return "1.0" (the same value as was passed
	as an argument). However, this is not the case:

	    (gdb) finish
	    Run till exit from #0  pck.call_fp1 (f=1)
	    [...]
	    9          F1 := Call_FP1 (F1);
	    Value returned is $1 = 0

	This patch enhances the extraction of the return value to know about
	fixed point types.

2021-12-02  Xavier Roirand  <roirand@adacore.com>

	(Ada/AArch64) fix fixed point argument passing in inferior funcall
	Consider the following code:

	   type FP1_Type is delta 0.1 range -1.0 .. +1.0; --  Ordinary

	   function Call_FP1 (F : FP1_Type) return FP1_Type is
	   begin
	      return F;
	   end Call_FP1;

	When the default in GCC is to generate proper DWARF info for fixed point
	types, then in gdb, printing the result of a call to call_fp1 with a
	decimal parameter leads to:

	  (gdb) p call_fp1(0.5)
	  $1 = 0

	The displayed value is wrong, and we actually expected:

	  (gdb) p call_fp1(0.5)
	  $1 = 0.5

	What happened is that our fixed point type parameter got promoted to a
	32bit integer because we detected that the length of that object was less
	than 4 bytes. The compiler does not perform this promotion and therefore
	GDB should not either.

	This patch fixes the behavior described above.

2021-12-02  Tom Tromey  <tromey@adacore.com>

	Implement 'task apply'
	This adds a 'task apply' command, which is the Ada tasking analogue of
	'thread apply'.  Unlike 'thread apply', it doesn't offer the
	'ascending' flag; but otherwise it's essentially the same.

	Add "task" keyword to the "watch" command
	Breakpoints in gdb can be made specific to an Ada task using the
	"task" qualifier.  This patch applies this same idea to watchpoints.

2021-12-02  Richard Sandiford  <richard.sandiford@arm.com>

	aarch64: Update gas/NEWS for recent changes
	gas/
		* NEWS: Mention support for Armv8.8-A and for new system registers.

2021-12-02  Richard Sandiford  <richard.sandiford@arm.com>

	aarch64: Add BC instruction
	This patch adds support for the Armv8.8-A BC instruction.
	[https://developer.arm.com/documentation/ddi0596/2021-09/Base-Instructions/BC-cond--Branch-Consistent-conditionally-?lang=en]

	include/
		* opcode/aarch64.h (AARCH64_FEATURE_HBC): New macro.
		(AARCH64_ARCH_V8_8): Make armv8.8-a imply AARCH64_FEATURE_HBC.

	opcodes/
		* aarch64-tbl.h (aarch64_feature_hbc): New variable.
		(HBC, HBC_INSN): New macros.
		(aarch64_opcode_table): Add BC.C.
		* aarch64-dis-2.c: Regenerate.

	gas/
		* doc/c-aarch64.texi: Document +hbc.
		* config/tc-aarch64.c (aarch64_features): Add "hbc".
		* testsuite/gas/aarch64/hbc.s, testsuite/gas/aarch64/hbc.d: New test.
		* testsuite/gas/aarch64/hbc-invalid.s,
		testsuite/gas/aarch64/hbc-invalid.l,
		testsuite/gas/aarch64/hbc-invalid.d: New test.

2021-12-02  Richard Sandiford  <richard.sandiford@arm.com>

	aarch64: Enforce P/M/E order for MOPS instructions
	The MOPS instructions should be used as a triple, such as:

	       cpyfp [x0]!, [x1]!, x2!
	       cpyfm [x0]!, [x1]!, x2!
	       cpyfe [x0]!, [x1]!, x2!

	The registers should also be the same for each writeback operand.
	This patch adds a warning for code that doesn't follow this rule,
	along similar lines to the warning that we already emit for
	invalid uses of MOVPRFX.

	include/
		* opcode/aarch64.h (C_SCAN_MOPS_P, C_SCAN_MOPS_M, C_SCAN_MOPS_E)
		(C_SCAN_MOPS_PME): New macros.
		(AARCH64_OPDE_A_SHOULD_FOLLOW_B): New aarch64_operand_error_kind.
		(AARCH64_OPDE_EXPECTED_A_AFTER_B): Likewise.
		(aarch64_operand_error): Make each data value a union between
		an int and a string.

	opcodes/
		* aarch64-tbl.h (MOPS_CPY_OP1_OP2_INSN): Add scan flags.
		(MOPS_SET_OP1_OP2_INSN): Likewise.
		* aarch64-opc.c (set_out_of_range_error): Update after change to
		aarch64_operand_error.
		(set_unaligned_error, set_reg_list_error): Likewise.
		(init_insn_sequence): Use a 3-instruction sequence for
		MOPS P instructions.
		(verify_mops_pme_sequence): New function.
		(verify_constraints): Call it.
		* aarch64-dis.c (print_verifier_notes): Handle
		AARCH64_OPDE_A_SHOULD_FOLLOW_B and AARCH64_OPDE_EXPECTED_A_AFTER_B.

	gas/
		* config/tc-aarch64.c (operand_mismatch_kind_names): Add entries
		for AARCH64_OPDE_A_SHOULD_FOLLOW_B and AARCH64_OPDE_EXPECTED_A_AFTER_B.
		(operand_error_higher_severity_p): Check that
		AARCH64_OPDE_A_SHOULD_FOLLOW_B and AARCH64_OPDE_EXPECTED_A_AFTER_B
		come between AARCH64_OPDE_RECOVERABLE and AARCH64_OPDE_SYNTAX_ERROR;
		their relative order is not significant.
		(record_operand_error_with_data): Update after change to
		aarch64_operand_error.
		(output_operand_error_record): Likewise.  Handle
		AARCH64_OPDE_A_SHOULD_FOLLOW_B and AARCH64_OPDE_EXPECTED_A_AFTER_B.
		* testsuite/gas/aarch64/mops_invalid_2.s,
		testsuite/gas/aarch64/mops_invalid_2.d,
		testsuite/gas/aarch64/mops_invalid_2.l: New test.

2021-12-02  Richard Sandiford  <richard.sandiford@arm.com>

	aarch64: Add support for +mops
	This patch adds support for FEAT_MOPS, an Armv8.8-A extension
	that provides memcpy and memset acceleration instructions.

	I took the perhaps controversial decision to generate the individual
	instruction forms using macros rather than list them out individually.
	This becomes useful with a follow-on patch to check that code follows
	the correct P/M/E sequence.
	[https://developer.arm.com/documentation/ddi0596/2021-09/Base-Instructions?lang=en]

	include/
		* opcode/aarch64.h (AARCH64_FEATURE_MOPS): New macro.
		(AARCH64_ARCH_V8_8): Make armv8.8-a imply AARCH64_FEATURE_MOPS.
		(AARCH64_OPND_MOPS_ADDR_Rd): New aarch64_opnd.
		(AARCH64_OPND_MOPS_ADDR_Rs): Likewise.
		(AARCH64_OPND_MOPS_WB_Rn): Likewise.

	opcodes/
		* aarch64-asm.h (ins_x0_to_x30): New inserter.
		* aarch64-asm.c (aarch64_ins_x0_to_x30): New function.
		* aarch64-dis.h (ext_x0_to_x30): New extractor.
		* aarch64-dis.c (aarch64_ext_x0_to_x30): New function.
		* aarch64-tbl.h (aarch64_feature_mops): New feature set.
		(aarch64_feature_mops_memtag): Likewise.
		(MOPS, MOPS_MEMTAG, MOPS_INSN, MOPS_MEMTAG_INSN)
		(MOPS_CPY_OP1_OP2_PME_INSN, MOPS_CPY_OP1_OP2_INSN, MOPS_CPY_OP1_INSN)
		(MOPS_CPY_INSN, MOPS_SET_OP1_OP2_PME_INSN, MOPS_SET_OP1_OP2_INSN)
		(MOPS_SET_INSN): New macros.
		(aarch64_opcode_table): Add MOPS instructions.
		(aarch64_opcode_table): Add entries for AARCH64_OPND_MOPS_ADDR_Rd,
		AARCH64_OPND_MOPS_ADDR_Rs and AARCH64_OPND_MOPS_WB_Rn.
		* aarch64-opc.c (aarch64_print_operand): Handle
		AARCH64_OPND_MOPS_ADDR_Rd, AARCH64_OPND_MOPS_ADDR_Rs and
		AARCH64_OPND_MOPS_WB_Rn.
		(verify_three_different_regs): New function.
		* aarch64-asm-2.c: Regenerate.
		* aarch64-dis-2.c: Likewise.
		* aarch64-opc-2.c: Likewise.

	gas/
		* doc/c-aarch64.texi: Document +mops.
		* config/tc-aarch64.c (parse_x0_to_x30): New function.
		(parse_operands): Handle AARCH64_OPND_MOPS_ADDR_Rd,
		AARCH64_OPND_MOPS_ADDR_Rs and AARCH64_OPND_MOPS_WB_Rn.
		(aarch64_features): Add "mops".
		* testsuite/gas/aarch64/mops.s, testsuite/gas/aarch64/mops.d: New test.
		* testsuite/gas/aarch64/mops_invalid.s,
		* testsuite/gas/aarch64/mops_invalid.d,
		* testsuite/gas/aarch64/mops_invalid.l: Likewise.

2021-12-02  Richard Sandiford  <richard.sandiford@arm.com>

	aarch64: Add Armv8.8-A system registers
	Armv8.8-A defines two new system registers: allint and icc_nmiar1_el1.
	Both of them were previously unmapped.  allint supports a 0/1 immediate.
	[https://developer.arm.com/documentation/ddi0595/2021-09/AArch64-Registers/ALLINT--All-Interrupt-Mask-Bit?lang=en]
	[https://developer.arm.com/documentation/ddi0595/2021-09/AArch64-Registers/ICC-NMIAR1-EL1--Interrupt-Controller-Non-maskable-Interrupt-Acknowledge-Register-1?lang=en]

	opcodes/
		* aarch64-opc.c (SR_V8_8): New macro.
		(aarch64_sys_regs): Add allint and icc_nmiar1_el1.
		(aarch64_pstatefields): Add allint.

	gas/
		* testsuite/gas/aarch64/armv8_8-a-sysregs.s,
		* testsuite/gas/aarch64/armv8_8-a-sysregs.d: New test.
		* testsuite/gas/aarch64/armv8_8-a-sysregs-invalid.s,
		* testsuite/gas/aarch64/armv8_8-a-sysregs-invalid.l,
		* testsuite/gas/aarch64/armv8_8-a-sysregs-invalid.d: New test.

2021-12-02  Richard Sandiford  <richard.sandiford@arm.com>

	aarch64: Add id_aa64isar2_el1
	Armv8.8-A defines a read-only system register called id_aa64isar2_el1.
	The register was previously RES0 and should therefore be accepted
	at all architecture levels.
	[https://developer.arm.com/documentation/ddi0595/2021-09/AArch64-Registers/ID-AA64ISAR2-EL1--AArch64-Instruction-Set-Attribute-Register-2?lang=en]

	opcodes/
		* aarch64-opc.c (aarch64_sys_regs): Add id_aa64isar2_el1.

	gas/
		* testsuite/gas/aarch64/sysreg-diagnostic.s: Test writes to
		id_aa64isar2_el1.
		* testsuite/gas/aarch64/sysreg-diagnostic.d: Update accordingly.
		* testsuite/gas/aarch64/sysreg-diagnostic.l: Likewise.
		* testsuite/gas/aarch64/sysreg.s: Test reads from
		id_aa64isar2_el1.
		* testsuite/gas/aarch64/sysreg.d: Update accordingly.

2021-12-02  Richard Sandiford  <richard.sandiford@arm.com>

	aarch64: Add support for Armv8.8-A
	This patch adds skeleton support for -march=armv8.8-a, testing only
	that it correctly inherits from armv8.7-a.

	include/
		* opcode/aarch64.h (AARCH64_FEATURE_V8_8): New macro.
		(AARCH64_ARCH_V8_8): Likewise.

	gas/
		* doc/c-aarch64.texi: Document armv8.8-a.
		* config/tc-aarch64.c (aarch64_archs): Add armv8-8-a
		* testsuite/gas/aarch64/v8-8-a.s,
		* testsuite/gas/aarch64/v8-8-a.d: New test.

2021-12-02  Richard Sandiford  <richard.sandiford@arm.com>

	aarch64: Provide line info for unclosed sequences
	We warn about MOVPRFX instructions that have no following
	instruction.  This patch adds a line number to the message,
	which is useful if the assembly code has multiple text sections.

	The new code is unconditional since OBJ_ELF is always defined
	for aarch64.

	gas/
		* config/tc-aarch64.h (aarch64_segment_info_type): Add last_file
		and last_line.
		* config/tc-aarch64.c (now_instr_sequence): Delete.
		(force_automatic_sequence_close): Provide a line number when
		reporting unclosed sequences.
		(md_assemble): Record the location of the instruction in
		tc_segment_info.
		* testsuite/gas/aarch64/sve-movprfx_4.l: Add line number to error
		message.
		* testsuite/gas/aarch64/sve-movprfx_7.l: Likewise.
		* testsuite/gas/aarch64/sve-movprfx_8.l: Likewise.

2021-12-02  Richard Sandiford  <richard.sandiford@arm.com>

	aarch64: Tweak insn sequence code
	libopcodes has some code to check constraints across sequences
	of consecutive instructions.  It was added to support MOVPRFX
	sequences but is going to be useful for the Armv8.8-A MOPS
	feature as well.

	Currently the structure has one field to record the instruction
	that started a sequence and another to record the remaining
	instructions in the sequence.  It's more convenient for the
	MOPS code if we put the instructions into a single array instead.

	No functional change intended.

	include/
		* opcode/aarch64.h (aarch64_instr_sequence): Replace num_insns
		and current_insns with num_added_insns and num_allocated_insns.

	opcodes/
		* aarch64-opc.c (add_insn_to_sequence): New function.
		(init_insn_sequence): Update for new aarch64_instr_sequence layout.
		Add the first instruction to the inst array.
		(verify_constraints): Update for new aarch64_instr_sequence layout.
		Don't add the last instruction to the array.

2021-12-02  Richard Sandiford  <richard.sandiford@arm.com>

	aarch64: Add maximum immediate value to aarch64_sys_reg
	The immediate form of MSR has a 4-bit immediate field (in CRm).
	However, many forms of MSR require a smaller immediate.  These cases
	are identified by value in operand_general_constraint_met_p,
	but they're now the common case rather than the exception.

	This patch therefore adds the maximum value to the sys_reg
	description and gets the range from there.  It also enforces
	the minimum of 0, which avoids a situation in which:

	  msr dit, #2

	would give the expected:

	  Error: immediate value out of range 0 to 1

	whereas:

	  msr dit, #-1

	would give:

	  Error: immediate value out of range 0 to 15

	(from the later UIMM4 checking).

	Also:

	- we were reporting the first error above against the wrong operand
	- TCO takes a single-bit immediate, but we previously allowed
	  all 16 values.
	  [https://developer.arm.com/documentation/ddi0596/2021-09/Base-Instructions/MSR--immediate---Move-immediate-value-to-Special-Register-?lang=en]

	opcodes/
		* aarch64-opc.h (F_REG_MAX_VALUE, F_GET_REG_MAX_VALUE): New macros.
		* aarch64-opc.c (operand_general_constraint_met_p): Read the
		maximum MSR immediate value from aarch64_pstatefields.
		(aarch64_pstatefields): Add the maximum immediate value
		for each register.

	gas/
		* testsuite/gas/aarch64/sysreg-4.s: Use an immediate value of 1
		rather than 8 for the TCO test.
		* testsuite/gas/aarch64/sysreg-4.d: Update accordingly.
		* testsuite/gas/aarch64/armv8_2-a-illegal.l: Fix operand number
		in MSR immediate error messages.
		* testsuite/gas/aarch64/diagnostic.l: Likewise.
		* testsuite/gas/aarch64/pan-illegal.l: Likewise.
		* testsuite/gas/aarch64/ssbs-illegal1.l: Likewise.
		* testsuite/gas/aarch64/illegal-sysreg-4b.s,
		* testsuite/gas/aarch64/illegal-sysreg-4b.d,
		* testsuite/gas/aarch64/illegal-sysreg-4b.l: New test.

2021-12-02  Marcus Nilsson  <brainbomb@gmail.com>

	Allow the --visualize-jumps feature to work with the AVR disassembler.
		* avr-dis.c (avr_operand); Pass in disassemble_info and fill
		in insn_type on branching instructions.

2021-12-02  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb, include: replace pragmas with DIAGNOSTIC macros, fix build with g++ 4.8
	When introducing this code, I forgot that we had some macros for this.
	Replace some "manual" pragma diagnostic with some DIAGNOSTIC_* macros,
	provided by include/diagnostics.h.

	In diagnostics.h:

	 - Add DIAGNOSTIC_ERROR, to enable a diagnostic at error level.
	 - Add DIAGNOSTIC_ERROR_SWITCH, to enable -Wswitch at error level, for
	   both gcc and clang.

	Additionally, using DIAGNOSTIC_PUSH, DIAGNOSTIC_ERROR_SWITCH and
	DIAGNOSTIC_POP seems to misbehave with g++ 4.8, where we see these
	errors:

	      CXX    ada-tasks.o
	    /home/smarchi/src/binutils-gdb/gdb/ada-tasks.c: In function void read_known_tasks():
	    /home/smarchi/src/binutils-gdb/gdb/ada-tasks.c:998:10: error: enumeration value ADA_TASKS_UNKNOWN not handled in switch [-Werror=switch]
	       switch (data->known_tasks_kind)
	              ^

	Because of the POP, the diagnostic should go back to being disabled,
	since it was disabled in the beginning, but that's not what we see
	here.  Versions of GCC >= 5 compile correctly.

	Work around this by making DIAGNOSTIC_ERROR_SWITCH a no-op for GCC < 5.

	Note that this code (already as it exists in master today) enables
	-Wswitch at the error level even if --disable-werror is passed.  It
	shouldn't be a problem, as it's not like a new enumerator will appear
	out of nowhere and cause a build error if building with future
	compilers.  Still, for correctness, we would ideally want to ask the
	compiler to enable -Wswitch at its default level (as if the user had
	passed -Wswitch on the command-line).  There doesn't seem to be a way to
	do this.

	Change-Id: Id33ebec3de39bd449409ea0bab59831289ffe82d

2021-12-02  Simon Marchi  <simon.marchi@polymtl.ca>

	gas: re-generate configure
	When configuring gas, I get:

	  config.status: error: cannot find input file: `doc/Makefile.in'

	This is because configure is out-of-date, re-generate it.

	Change-Id: Iaa5980c282900d9fd23b90f0df25bf8ba3676498

2021-12-02  Simon Marchi  <simon.marchi@polymtl.ca>

	libctf: re-generate configure
	When configuring libctf, I get:

	  config.status: error: cannot find input file: `doc/Makefile.in'

	This is because configure is out-of-date, re-generate it.

	Change-Id: Ie69acd33012211a4620661582c7d24ad6d2cd169

2021-12-02  H.J. Lu  <hjl.tools@gmail.com>

	x86: Skip __[start|stop]_SECNAME for --gc-sections -z start-stop-gc
	Don't convert memory load to immediate load on __start_SECNAME and
	__stop_SECNAME for --gc-sections -z start-stop-gc if all SECNAME
	sections been garbage collected.

	bfd/

		PR ld/27491
		* elf32-i386.c (elf_i386_convert_load_reloc): Skip __start_SECNAME
		and __stop_SECNAME for --gc-sections -z start-stop-gc if the input
		section been garbage collected.
		* elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
		* elfxx-x86.h (elf_x86_start_stop_gc_p): New function.

	ld/
		PR ld/27491
		* testsuite/ld-i386/i386.exp: Run PR ld/27491 tests.
		* testsuite/ld-x86-64/x86-64.exp: Likewise.
		* testsuite/ld-i386/pr27491-1.s: New file.
		* testsuite/ld-i386/pr27491-1a.d: Likewise.
		* testsuite/ld-i386/pr27491-1b.d: Likewise.
		* testsuite/ld-i386/pr27491-1c.d: Likewise.
		* testsuite/ld-i386/pr27491-2.d: Likewise.
		* testsuite/ld-i386/pr27491-2.s: Likewise.
		* testsuite/ld-i386/pr27491-3.d: Likewise.
		* testsuite/ld-i386/pr27491-3.s: Likewise.
		* testsuite/ld-i386/pr27491-4.d: Likewise.
		* testsuite/ld-i386/pr27491-4a.s: Likewise.
		* testsuite/ld-i386/pr27491-4b.s: Likewise.
		* testsuite/ld-x86-64/pr27491-1.s: Likewise.
		* testsuite/ld-x86-64/pr27491-1a.d: Likewise.
		* testsuite/ld-x86-64/pr27491-1b.d: Likewise.
		* testsuite/ld-x86-64/pr27491-1c.d: Likewise.
		* testsuite/ld-x86-64/pr27491-2.d: Likewise.
		* testsuite/ld-x86-64/pr27491-2.s: Likewise.
		* testsuite/ld-x86-64/pr27491-3.d: Likewise.
		* testsuite/ld-x86-64/pr27491-3.s: Likewise.
		* testsuite/ld-x86-64/pr27491-4.d: Likewise.
		* testsuite/ld-x86-64/pr27491-4a.s: Likewise.
		* testsuite/ld-x86-64/pr27491-4b.s: Likewise.

2021-12-02  Mike Frysinger  <vapier@gentoo.org>

	bfd: delete unused proto settings
	These have been around for decades but don't appear to be used, and
	trying to build them (e.g. `make archive.p archive.ip`) doesn't work,
	so just delete it all.

	gas: merge doc subdir up a level
	This avoids a recursive make into the doc subdir and speeds up the
	build slightly.  It also allows for more parallelism.

	libctf: merge doc subdir up a level
	This avoids a recursive make into the doc subdir and speeds up the
	build slightly.  It also allows for more parallelism.

2021-12-02  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: use actual DWARF version in compunit's debugformat field
	The "info source" command, with a DWARF-compile program, always show
	that the debug info is "DWARF 2":

	    (gdb) info source
	    Current source file is test.c
	    Compilation directory is /home/smarchi/build/binutils-gdb/gdb
	    Located in /home/smarchi/build/binutils-gdb/gdb/test.c
	    Contains 2 lines.
	    Source language is c.
	    Producer is GNU C17 9.3.0 -mtune=generic -march=x86-64 -g3 -gdwarf-5 -O0 -fasynchronous-unwind-tables -fstack-protector-strong -fstack-clash-protection -fcf-protection.
	    Compiled with DWARF 2 debugging format.
	    Includes preprocessor macro info.

	Change it to display the actual DWARF version:

	    (gdb) info source
	    Current source file is test.c
	    Compilation directory is /home/smarchi/build/binutils-gdb/gdb
	    Located in /home/smarchi/build/binutils-gdb/gdb/test.c
	    Contains 2 lines.
	    Source language is c.
	    Producer is GNU C17 9.3.0 -mtune=generic -march=x86-64 -g3 -gdwarf-5 -O0 -fasynchronous-unwind-tables -fstack-protector-strong -fstack-clash-protection -fcf-protection.
	    Compiled with DWARF 5 debugging format.
	    Includes preprocessor macro info.

	The comp_unit_head::version field is guaranteed to be between 2 and 5,
	thanks to the check in read_comp_unit_head.  So we can still use static
	strings to pass to record_debugformat, and keep it efficient.

	In the future, when somebody will update GDB to support DWARF 6, they'll
	hit this assert and have to update this code.

	Change-Id: I3270b7ebf5e9a17b4215405bd2e365662a4d6172

2021-12-02  H.J. Lu  <hjl.tools@gmail.com>

	elf: Discard input .note.gnu.build-id sections
	1. Discard input .note.gnu.build-id sections.
	2. Clear the build ID field before writing.
	3. Use bfd_make_section_anyway_with_flags to create the output
	.note.gnu.build-id section.

		PR ld/28639
		* ldelf.c (ldelf_after_open): Discard input .note.gnu.build-id
		sections, excluding the first one.
		(write_build_id): Clear the build ID field before writing.
		(ldelf_setup_build_id): Use bfd_make_section_anyway_with_flags
		to create the output .note.gnu.build-id section.
		* testsuite/ld-elf/build-id.exp: New file.
		* testsuite/ld-elf/pr28639a.rd: Likewise.
		* testsuite/ld-elf/pr28639b.rd: Likewise.
		* testsuite/ld-elf/pr28639c.rd: Likewise.
		* testsuite/ld-elf/pr28639d.rd: Likewise.

2021-12-02  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-12-01  Mike Frysinger  <vapier@gentoo.org>

	binutils: add missing prefix for binutils/index.html rule

2021-12-01  Luca Boccassi  <luca.boccassi@gmail.com>

	readelf: recognize FDO Packaging Metadata ELF note.  (Correcting snafu during patch application)

2021-12-01  Luca Boccassi  <luca.boccassi@gmail.com>

	readelf: recognize FDO Packaging Metadata ELF note
	As defined on: https://systemd.io/COREDUMP_PACKAGE_METADATA/
	this note will be used starting from Fedora 36. Allow
	readelf --notes to pretty print it:

	Displaying notes found in: .note.package
	  Owner                Data size 	Description
	  FDO                  0x00000039	FDO_PACKAGING_METADATA
	    Packaging Metadata: {"type":"deb","name":"fsverity-utils","version":"1.3-1"}

2021-12-01  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix typo in gdb.multi/multi-arch-exec.exp
	With gdb.multi/multi-arch-exec.exp I run into:
	...
	Running src/gdb/testsuite/gdb.multi/multi-arch-exec.exp ...
	ERROR: tcl error sourcing src/gdb/testsuite/gdb.multi/multi-arch-exec.exp.
	ERROR: wrong # args: extra words after "else" clause in "if" command
	    while executing
	"if [istarget "powerpc64*-*-*"] {
	        set march "-m64"
	    } else if [istarget "s390*-*-*"] {
	        set march "-m31"
	    } else {
	        set march "-m32"
	    }"
	...

	Fix the else if -> elseif typo.

	Tested on x86_64-linux.

2021-12-01  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.arch/i386-pkru.exp on linux
	When running test-case gdb.arch/i386-pkru.exp on a machine with "Memory
	Protection Keys for Userspace" support, we run into:
	...
	(gdb) PASS: gdb.arch/i386-pkru.exp: probe PKRU support
	print $pkru^M
	$2 = 1431655764^M
	(gdb) FAIL: gdb.arch/i386-pkru.exp: pkru register
	...

	The test-case expects the $pkru register to have the default value 0, matching
	the "init state" of 0 defined by the XSAVE hardware.

	Since linux kernel version v4.9 containing commit acd547b29880 ("x86/pkeys:
	Default to a restrictive init PKRU"), the register is set to 0x55555554 by
	default (which matches the printed decimal value above).

	Fix the FAIL by accepting this value for linux.

	Tested on x86_64-linux.

2021-12-01  Nick Clifton  <nickc@redhat.com>

	Fix the fields in the x_n union inside the the x_file structure so that pointers can be stored.
		PR 28630
		* coff/internal.h (x_n): Use bfd_hostptr_t for the fields in this
		structure.

2021-12-01  Andrew Burgess  <aburgess@redhat.com>

	gdb/remote: use scoped_restore to control starting_up flag
	This commit makes use of a scoped_restore object to control the
	remote_state::starting_up flag within the remote_target::start_remote
	method.

	Ideally I would have liked to create the scoped_restore inside
	start_remote and just leave the restore in place until the end of the
	scope, however, I'm worried that doing this would change the behaviour
	of GDB.  Specifically, in start_remote, the following code is executed
	once the starting_up flag has been restored to its previous value:

	  if (breakpoints_should_be_inserted_now ())
	    insert_breakpoints ();

	I think (but am not 100% sure) that calling install_breakpoints could
	end up back inside remote_target::can_download_tracepoint, which does
	check the value of remote_state::starting_up.  And so, I'm concerned
	that leaving the scoped_restore in place until the end of start_remote
	will cause a possible change in behaviour.

	To avoid this, and to leave things as close to the current behaviour
	as possible, I've split remote_target::start_remote into two, there's
	the main function body which moves into remote_target::start_remote_1,
	this function uses the scoped_restore to change the ::starting_up
	flag, then there's the old remote_target::start_remote, which now just
	calls ::start_remote_1, and then does the insert_breakpoints call.

	There should be no user visible changes after this commit, unless
	there's a situation where the ::starting_up flag could previously have
	been left set, if this was the case, then this situation should no
	longer be possible.

2021-12-01  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb.base/corefile-buildid.exp: fix DUPLICATEs when failing to generate a core file
	When my system isn't properly configured to generate core files in the
	local directory, I see these DUPLICATEs:

	    DUPLICATE: gdb.base/corefile-buildid.exp: could not generate core file

	Fix that by having a single with_test_prefix around that message and
	what follows.

	Change-Id: I4ac245fcce1c666db56e3bad3582aa17f183dcba

2021-12-01  Mike Frysinger  <vapier@gentoo.org>

	gold: enable silent build rules

2021-12-01  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-30  Carl Love  <cel@us.ibm.com>

	gdb: Powerpc fix gdb.multi/multi-arch-exec.exp test
	The expect file has a procedure append_arch_options which sets march based
	the istarget.  The current if / else statement does not check for
	powerpc64.  The else statement is hit which sets march to -m32.  This
	results in compilation errors on 64-bit PowerPC.

	This patch adds an if statement to check for powerpc64 and if true sets mach
	to -m64.

	The patch was tested on a Power 10 system.  No compile errors were generated.
	The test completes with 1 expected pass and no failures.

2021-11-30  Mike Frysinger  <vapier@gentoo.org>

	binutils: regenerate Makefile.in after doc/ changes

2021-11-30  Roland McGrath  <mcgrathr@google.com>

	Fix missing build dependency for binutils man pages
	binutils/
		* doc/local.mk: Give each man page target its missing dependency on
		doc/$(am__dirstamp).

2021-11-30  Richard Sandiford  <richard.sandiford@arm.com>

	aarch64: Add missing system registers [PR27145]
	This patch adds support for various system registers, up to Armv8.7-A.
	This includes all the registers that were mentioned in the PR and that
	hadn't become supported since.

	opcodes/
		PR aarch64/27145
		* aarch64-opc.c (SR_V8_4): Remove duplicate definition.
		(SR_V8_6, SR_V8_7, SR_GIC, SR_AMU): New macros.
		(aarch64_sys_regs): Add missing entries (up to Armv8.7-A).

	gas/
		PR aarch64/27145
		* testsuite/gas/aarch64/sysreg-8.s,
		* testsuite/gas/aarch64/sysreg-8.d,
		* testsuite/gas/aarch64/illegal-sysreg-8.s,
		* testsuite/gas/aarch64/illegal-sysreg-8.d,
		* testsuite/gas/aarch64/illegal-sysreg-8.l,
		* testsuite/gas/aarch64/illegal-sysreg-8b.s,
		* testsuite/gas/aarch64/illegal-sysreg-8b.d,
		* testsuite/gas/aarch64/illegal-sysreg-8b.l: New tests.
		* testsuite/gas/aarch64/sysreg.s: Change system register numbers
		to ones that are still unallocated.
		* testsuite/gas/aarch64/sysreg.d: Update accordingly.

2021-11-30  Richard Sandiford  <richard.sandiford@arm.com>

	aarch64: Make LOR registers conditional on +lor
	We have a +lor feature flag for the Limited Ordering Regions
	extension, but the associated registers didn't use it.

	opcodes/
		* aarch64-opc.c (SR_LOR): New macro.
		(aarch64_sys_regs): Use it for lorc_el1, lorea_el1, lorn_el1 and
		lorsa_el1.

	gas/
		* testsuite/gas/aarch64/sysreg-7.s: Enable +lor.
		* testsuite/gas/aarch64/illegal-sysreg-7.s: Test for LOR registers
		without +lor.
		* testsuite/gas/aarch64/illegal-sysreg-7.d: Update accordingly.
		* testsuite/gas/aarch64/illegal-sysreg-7.l: Likewise.

2021-11-30  Richard Sandiford  <richard.sandiford@arm.com>

	aarch64: Remove ZIDR_EL1
	ZIDR_EL1 was part of an early version of SVE, but didn't make
	it to the final release.

	opcodes/
		* aarch64-opc.c (aarch64_sys_regs): Remove zidr_el1 entry.

	gas/
		* testsuite/gas/aarch64/sve-sysreg.s: Remove zidr_el1.
		* testsuite/gas/aarch64/sve-sysreg.d: Update accordingly.
		* testsuite/gas/aarch64/sve-sysreg-invalid.l: Likewise.

2021-11-30  Richard Sandiford  <richard.sandiford@arm.com>

	aarch64: Allow writes to MFAR_EL3
	MFAR_EL3 is a read/write register, but was incorrectly marked as
	read-only
	[https://developer.arm.com/documentation/ddi0601/2021-09/AArch64-Registers/MFAR-EL3--PA-Fault-Address-Register?lang=en]

	opcodes/
		* aarch64-opc.c (aarch64_sys_regs): Mark mfar_el3 as read-write.

	gas/
		* testsuite/gas/aarch64/rme.s: Test writing to mfar_el3.
		* testsuite/gas/aarch64/rme.d: Update accordingly.
		* testsuite/gas/aarch64/rme-invalid.s: Delete.
		* testsuite/gas/aarch64/rme-invalid.l: Likewise.
		* testsuite/gas/aarch64/rme-invalid.d: Likewise.

2021-11-30  Richard Sandiford  <richard.sandiford@arm.com>

	aarch64: Mark PMSIDR_EL1 as read-only
	We were incorrectly allowing writes to PMSIDR_EL1, which is
	a read-only register.
	[https://developer.arm.com/documentation/ddi0595/2021-09/AArch64-Registers/PMSIDR-EL1--Sampling-Profiling-ID-Register?lang=en]

	opcodes/
		* aarch64-opc.c (aarch64_sys_regs): Make pmsidr_el1 as F_REG_READ.

	gas/
		* testsuite/gas/aarch64/msr.s: Remove write to pmsidr_el1.
		* testsuite/gas/aarch64/msr.d: Update accordingly.
		* testsuite/gas/aarch64/illegal-sysreg-2.s,
		* testsuite/gas/aarch64/illegal-sysreg-2.d,
		* testsuite/gas/aarch64/illegal-sysreg-2.l: New test.

2021-11-30  Richard Sandiford  <richard.sandiford@arm.com>

	aarch64: Remove duplicate system register entries
	There is a lot of overlap between the ETM and ETE system registers,
	so some registers were listed twice.

	Already tested by etm.[sd] and ete.[sd].

	opcodes/
		* aarch64-opc.c (aarch64_sys_regs): Combine ETE and ETM blocks
		and remove redundant entries.

	gas/
		* testsuite/gas/aarch64/etm.s: Remove duplicated test.
		* testsuite/gas/aarch64/etm.d: Update accordingly.

2021-11-30  Richard Sandiford  <richard.sandiford@arm.com>

	aarch64: Check for register aliases before mnemonics
	Previously we would not accept:

		A .req B

	if A happened to be the name of an instruction.  Adding new
	instructions could therefore invalidate existing register aliases.

	I noticed this with a test that used "zero" as a register alias
	for "xzr", where "zero" is now also the name of an SME instruction.
	I don't have any evidence that "real" code is doing this, but it
	seems at least plausible.

	This patch switches things so that we check for register aliases
	first.  It might slow down parsing slightly, but the difference
	is unlikely to be noticeable.

	Things like:

		b	.req + 0

	still work, since create_register_alias checks for " .req ",
	and with the input scrubber, we'll only keep whitespace after
	.req if it's followed by another name.  If there's some valid
	expression that I haven't thought about that is scrubbed to
	" .req ", users could avoid the ambiguity by wrapping .req
	in parentheses.

	The new test for invalid aliases already passed.  I just wanted
	something to exercise the !dot condition.

	I can't find a way of exercising the (existing) p == base condition,
	but I'm not brave enough to say that it can never happen.  If it does
	happen, get_mnemonic_name would return an empty string.

	gas/
		* config/tc-aarch64.c (opcode_lookup): Move mnemonic extraction
		code to...
		(md_assemble): ...here.  Check for register aliases first.
		* testsuite/gas/aarch64/register_aliases.d,
		testsuite/gas/aarch64/register_aliases.s: Test for a register
		alias called "zero".
		* testsuite/gas/aarch64/register_aliases_invalid.d,
		testsuite/gas/aarch64/register_aliases_invalid.l,
		testsuite/gas/aarch64/register_aliases_invalid.s: New test.

2021-11-30  Andrew Burgess  <aburgess@redhat.com>

	gdb/python: don't use the 'p' format for parsing args
	When running the gdb.python/py-arch.exp tests on a GDB built
	against Python 2 I ran into some errors.  The problem is that this
	test script exercises the gdb.Architecture.integer_type method, and
	this method uses 'p' as an argument format specifier in a call to
	gdb_PyArg_ParseTupleAndKeywords.

	Unfortunately this specified was only added in Python 3.3, so will
	cause an error for earlier versions of Python.

	This commit switches to use the 'O' specifier to collect a PyObject,
	and then uses PyObject_IsTrue to convert the object to a boolean.

	An earlier version of this patch incorrectly switched from using 'p'
	to use 'i', however, it was pointed out during review that this would
	cause some changes in behaviour, for example both of these will work
	with 'p', but not with 'i':

	  gdb.selected_inferior().architecture().integer_type(32, None)
	  gdb.selected_inferior().architecture().integer_type(32, "foo")

	The new approach of using 'O' works fine with these cases.  I've added
	some new tests to cover both of the above.

	There should be no user visible changes after this commit.

2021-11-30  Tom de Vries  <tdevries@sdflex.arch.suse.de>

	[gdb/testsuite] Fix gdb.base/style.exp with stub-termcap
	When running test-case gdb.base/style.exp with a gdb build using
	stub-termcap.c, we run into:
	...
	(gdb) PASS: gdb.base/style.exp: all styles enabled: frame when width=20
	^M<et width 30^M
	(gdb) FAIL: gdb.base/style.exp: all styles enabled: set width 30
	...

	The problem is that we're trying to issue the command "set width 30" while
	width is set to 20, which causes horizontal scrolling.

	Fix this by resetting the width to 0 before issuing the "set width 30"
	command.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=24582

2021-11-30  Nick Clifton  <nickc@redhat.com>

	Use dwarf_vma type for offsets, ranges and section sizes in DWARF decoder.
		* dwarf.c (find_debug_info_for_offset): Use dwarf_vma type for
		offsets, sizes and ranges.
		(display_loc_list): Likewise.  Also use print_dwarf_vma to print
		the offset.
		(display_loclists_list): Likewise.
		(display_loc_list_dwo): Likewise.
		(display_debug_str): Likewise.
		(display_debug_aranges): Likewise.
		(display_debug_ranges_list): Likewise.
		(display_debug_rnglists_list): Likewise.
		(display_debug_ranges): Likewise.

	ld: pru: Add pru_irq_map output section
		* scripttempl/pru.sc (.pru_irq_map): Define output section.
		* testsuite/ld-pru/pru_irq_map-1.d: New test.
		* testsuite/ld-pru/pru_irq_map-2.d: New test.
		* testsuite/ld-pru/pru_irq_map.s: New test.

2021-11-30  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: check the python module is available before using it
	The gdb.python/py-inferior-leak.exp test makes use of the tracemalloc
	module.  When running the Python tests with a GDB built against Python
	2 I ran into a test failure due to the tracemalloc module not being
	available.

	This commit adds a new helper function to lib/gdb-python.exp that
	checks if a named module is available.  Using this we can then skip
	the py-inferior-leak.exp test when the tracemalloc module is not
	available.

2021-11-30  Andrew Burgess  <aburgess@redhat.com>

	gdb: fix disassembler regressions for 32-bit arm
	After this commit:

	  commit 76b43c9b5c2b275cbf4f927bfc25984410cb5dd5
	  Date:   Tue Oct 5 15:10:12 2021 +0100

	      gdb: improve error reporting from the disassembler

	We started seeing FAILs in the gdb.base/all-architectures*.exp tests,
	when running on a 32-bit ARM target, though I suspect running on any
	target that compiles such that bfd_vma is 32-bits would also trigger
	the failures.

	The problem is that the test is expected GDB's disassembler to print
	an error like this:

	  Cannot access memory at address 0x0

	However, after the above commit we see an error like:

	  unknown disassembler error (error = -1)

	The reason for this is this code in opcodes/i386-dis.c (in the
	print_insn function):

	  if (address_mode == mode_64bit && sizeof (bfd_vma) < 8)
	    {
	      (*info->fprintf_func) (info->stream,
	                             _("64-bit address is disabled"));
	      return -1;
	    }

	This code effectively disallows us from ever disassembling 64-bit x86
	code if we compiled GDB with a 32-bit bfd_vma.  Notice we return
	-1 (indicating a failure to disassemble), but never call the
	memory_error_func callback.

	Prior to the above commit GDB, when it received the -1 return value
	would assume that a memory error had occurred and just print whatever
	value happened to be in the memory error address variable, the default
	value of 0 just happened to be fine because the test had asked GDB to
	do this 'disassemble 0x0,+4'.

	If we instead change the test to do 'disassemble 0x100,+4' then GDB
	would (previously) have still reported:

	  Cannot access memory at address 0x0

	which makes far less sense.

	In this commit I propose to fix this issue by changing the test to
	accept either the "Cannot access memory ..." string, or the newer
	"unknown disassembler error ..." string.  With this change done the
	test now passes.

	However, there is one weakness with this strategy; if GDB broke such
	that we _always_ reported "unknown disassembler error ..." we would
	never notice.  This clearly would be bad.  To avoid this issue I have
	adjusted the all-architectures*.exp tests so that, when we disassemble
	for the default architecture (the one selected by "auto") we _only_
	expect to get the "Cannot access memory ..." error string.

	[ Note: In an ideal world we should be able to disassemble any
	  architecture at all times.  There's no reason why the 64-bit x86
	  disassembler requires a 64-bit bfd_vma, other than the code happens
	  to be written that way.  We could rewrite the disassemble to not
	  have this requirement, but, I don't plan to do that any time soon. ]

	Further, I have changed the all-architectures*.exp test so that we now
	disassemble at address 0x100, this should avoid us being able to pass
	by printing a default address of 0x0.  I did originally change the
	address we disassembled at to 0x4, however, some architectures,
	e.g. ia64, have a default instruction alignment that is greater than
	4, so would still round down to 0x0.  I could have just picked 0x8 as
	an address, but I figured that 0x100 was likely to satisfy most
	architectures alignment requirements.

2021-11-30  Andrew Burgess  <aburgess@redhat.com>

	gdb/python: add gdb.RemoteTargetConnection.send_packet
	This commits adds a new sub-class of gdb.TargetConnection,
	gdb.RemoteTargetConnection.  This sub-class is created for all
	'remote' and 'extended-remote' targets.

	This new sub-class has one additional method over its base class,
	'send_packet'.  This new method is equivalent to the 'maint
	packet' CLI command, it allows a custom packet to be sent to a remote
	target.

	The outgoing packet can either be a bytes object, or a Unicode string,
	so long as the Unicode string contains only ASCII characters.

	The result of calling RemoteTargetConnection.send_packet is a bytes
	object containing the reply that came from the remote.

2021-11-30  Andrew Burgess  <aburgess@redhat.com>

	gdb: make packet_command function available outside remote.c
	In a later commit I will add a Python API to access the 'maint packet'
	functionality, that is, sending a user specified packet to the target.

	To make implementing this easier, this commit refactors how this
	command is currently implemented so that the packet_command function
	is now global.

	The new global send_remote_packet function takes an object that is an
	implementation of an abstract interface.  Two functions within this
	interface are then called, one just before a packet is sent to the
	remote target, and one when the reply has been received from the
	remote target.  Using an interface object in this way allows (1) for
	the error checking to be done before the first callback is made, this
	means we only print out what packet it being sent once we know we are
	going to actually send it, and (2) we don't need to make a copy of the
	reply if all we want to do is print it.

	One user visible changes after this commit are the error
	messages, which I've changed to be less 'maint packet' command
	focused, this will make them (I hope) better for when
	send_remote_packet can be called from Python code.

	So:      "command can only be used with remote target"
	Becomes: "packets can only be sent to a remote target"

	And:     "remote-packet command requires packet text as argument"
	Becomes: "a remote packet must not be empty"

	Additionally, in this commit, I've added support for packet replies
	that contain binary data.  Before this commit, the code that printed
	the reply treated the reply as a C string, it assumed that the string
	only contained printable characters, and had a null character only at
	the end.

	One way to show the problem with this is if we try to read the auxv
	data from a remote target, the auxv data is binary, so, before this
	commit:

	  (gdb) target remote :54321
	  ...
	  (gdb) maint packet qXfer:auxv:read::0,1000
	  sending: "qXfer:auxv:read::0,1000"
	  received: "l!"
	  (gdb)

	And after this commit:

	  (gdb) target remote :54321
	  ...
	  (gdb) maint packet qXfer:auxv:read::0,1000
	  sending: "qXfer:auxv:read::0,1000"
	  received: "l!\x00\x00\x00\x00\x00\x00\x00\x00\xf0\xfc\xf7\xff\x7f\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\xff\xf>
	  (gdb)

	The binary contents of the reply are now printed as escaped hex.

2021-11-30  Andrew Burgess  <aburgess@redhat.com>

	gdb/python: introduce gdb.TargetConnection object type
	This commit adds a new object type gdb.TargetConnection.  This new
	type represents a connection within GDB (a connection as displayed by
	'info connections').

	There's three ways to find a gdb.TargetConnection, there's a new
	'gdb.connections()' function, which returns a list of all currently
	active connections.

	Or you can read the new 'connection' property on the gdb.Inferior
	object type, this contains the connection for that inferior (or None
	if the inferior has no connection, for example, it is exited).

	Finally, there's a new gdb.events.connection_removed event registry,
	this emits a new gdb.ConnectionEvent whenever a connection is removed
	from GDB (this can happen when all inferiors using a connection exit,
	though this is not always the case, depending on the connection type).
	The gdb.ConnectionEvent has a 'connection' property, which is the
	gdb.TargetConnection being removed from GDB.

	The gdb.TargetConnection has an 'is_valid()' method.  A connection
	object becomes invalid when the underlying connection is removed from
	GDB (as discussed above, this might be when all inferiors using a
	connection exit, or it might be when the user explicitly replaces a
	connection in GDB by issuing another 'target' command).

	The gdb.TargetConnection has the following read-only properties:

	  'num': The number for this connection,

	  'type': e.g. 'native', 'remote', 'sim', etc

	  'description': The longer description as seen in the 'info
	                 connections' command output.

	  'details': A string or None.  Extra details for the connection, for
	             example, a remote connection's details might be
	             'hostname:port'.

2021-11-30  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: The vtype immediate with more than the defined 8 bits are preserved.
	According the rvv spec,
	https://github.com/riscv/riscv-v-spec/blob/master/vtype-format.adoc

	The bits of vtype immediate from 8 to (xlen - 1) should be reserved.
	Therefore, we should also dump the vtype immediate as numbers, when
	they are set over 8-bits.  I think this is a bug that we used to support
	vediv extension and use the bit 8 and 9 of vtype, but forgot to update
	the behavior when removing the vediv.

	Consider the testcases,

	vsetvli  a0, a1,  0x700    # the reserved bit 10, 9 and 8 are used.
	vsetvli  a0, a1,  0x400    # the reserved bit 10 is used.
	vsetvli  a0, a1,  0x300    # the reserved bit 9 and 8 are used.
	vsetvli  a0, a1,  0x100    # the reserved bit 8 is used.
	vsetivli a0, 0xb, 0x300    # the reserved bit 9 and 8 are used.
	vsetivli a0, 0xb, 0x100    # the reserved bit 8 is used.

	The original objdump shows the following result,

	0000000000000000 <.text>:
	   0:   7005f557                vsetvli a0,a1,1792
	   4:   4005f557                vsetvli a0,a1,1024
	   8:   3005f557                vsetvli a0,a1,e8,m1,tu,mu
	   c:   1005f557                vsetvli a0,a1,e8,m1,tu,mu
	  10:   f005f557                vsetivli        a0,11,e8,m1,tu,mu
	  14:   d005f557                vsetivli        a0,11,e8,m1,tu,mu

	But in fact the correct result should be,

	0000000000000000 <.text>:
	   0:   7005f557                vsetvli a0,a1,1792
	   4:   4005f557                vsetvli a0,a1,1024
	   8:   3005f557                vsetvli a0,a1,768
	   c:   1005f557                vsetvli a0,a1,256
	  10:   f005f557                vsetivli        a0,11,768
	  14:   d005f557                vsetivli        a0,11,256

	gas/
		* testsuite/gas/riscv/vector-insns.d: Added testcases to
		test the reserved bit 8 to (xlen-1) of vtype.
		* testsuite/gas/riscv/vector-insns.s: Likewise.
	include/
		* opcode/riscv.h: Removed OP_MASK_VTYPE_RES and OP_SH_VTYPE_RES,
		since they are different for operand Vc and Vb.
	opcodes/
		* riscv-dis.c (print_insn_args): Updated imm_vtype_res to
		extract the reserved immediate of vtype correctly.

2021-11-30  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: Dump vset[i]vli immediate as numbers once vsew or vlmul is reserved.
	Consider the following case,

	vsetvli  a0, a1,  0x4           # unrecognized vlmul
	vsetvli  a0, a1,  0x20          # unrecognized vsew
	vsetivli a0, 0xb, 0x4           # unrecognized vlmul
	vsetivli a0, 0xb, 0x20          # unrecognized vsew

	For the current dis-assembler, we get the result,

	0000000000000000 <.text>:
	   0:   0045f557                vsetvli a0,a1,e8,(null),tu,mu
	   4:   0205f557                vsetvli a0,a1,e128,m1,tu,mu
	   8:   c045f557                vsetivli        a0,11,e8,(null),tu,mu
	   c:   c205f557                vsetivli        a0,11,e128,m1,tu,mu

	The vsew e128 and vlmul (null) are preserved according to the spec,
	so dump these fields looks wrong.  Consider that we are used to dump
	the unrecognized csr as csr numbers directly, we should also dump
	the whole vset[i]vli immediates as numbers, once the vsew or vlmul
	is reserved.  Therefore, following is what I expected,

	0000000000000000 <.text>:
	   0:   0045f557                vsetvli a0,a1,4
	   4:   0205f557                vsetvli a0,a1,32
	   8:   c045f557                vsetivli        a0,11,4
	   c:   c205f557                vsetivli        a0,11,32

	gas/
		* testsuite/gas/riscv/vector-insns.d: Rewrite the vset[i]vli
		testcases since we should dump the immediate as numbers once
		the vsew or vlmul is reserved.
		* testsuite/gas/riscv/vector-insns.s: Likewise.
	opcodes/
		* riscv-dis.c (print_insn_args): The reserved vsew and vlmul
		are NULL string in the riscv_vsew and riscv_vlmul, so dump the
		whole imm as numbers once one of them is NULL.
		* riscv-opc.c (riscv_vsew): Set the reserved vsew to NULL.
		(riscv_vlmul): Set the reserved vlmul to NULL.

2021-11-30  Mike Frysinger  <vapier@gentoo.org>

	zlib: enable silent build rules

	ld: enable silent build rules
	Also add $(AM_V_xxx) to various manual rules in here.

	libctf: enable silent build rules
	Also add $(AM_V_xxx) to various manual rules in here.

	gprof: enable silent build rules
	Also add $(AM_V_xxx) to various manual rules in here.

	binutils: merge doc subdir up a level
	This avoids a recursive make into the doc subdir and speeds up the
	build slightly.  It also allows for more parallelism.

	binutils: enable silent build rules
	Also add $(AM_V_xxx) to various manual rules in here.

	bfd: enable silent build rules
	Also add $(AM_V_xxx) to various manual rules in here.

	opcodes: enable silent build rules
	Also add $(AM_V_xxx) to various manual rules in here.

2021-11-30  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-29  Tom Tromey  <tom@tromey.com>

	Allow DW_ATE_UTF for Rust characters
	The Rust compiler plans to change the encoding of a Rust 'char' type
	to use DW_ATE_UTF.  You can see the discussion here:

	    https://github.com/rust-lang/rust/pull/89887

	However, this fails in gdb.  I looked into this, and it turns out that
	the handling of DW_ATE_UTF is currently fairly specific to C++.  In
	particular, the code here assumes the C++ type names, and it creates
	an integer type.

	This comes from commit 53e710acd ("GDB thinks char16_t and char32_t
	are signed in C++").  The message says:

	    Both places need fixing.  But since I couldn't tell why dwarf2read.c
	    needs to create a new type, I've made it use the per-arch built-in
	    types instead, so that the types are only created once per arch
	    instead of once per objfile.  That seems to work fine.

	... which is fine, but it seems to me that it's also correct to make a
	new character type; and this approach is better because it preserves
	the type name as well.  This does use more memory, but first we
	shouldn't be too concerned about the memory use of types coming from
	debuginfo; and second, if we are, we should implement type interning
	anyway.

	Changing this code to use a character type revealed a couple of
	oddities in the C/C++ handling of TYPE_CODE_CHAR.  This patch fixes
	these as well.

	I filed PR rust/28637 for this issue, so that this patch can be
	backported to the gdb 11 branch.

2021-11-29  Aaron Merey  <amerey@redhat.com>
	    Tom de Vries  <tdevries@suse.de>

	[PR gdb/27026] CTRL-C is ignored when debug info is downloaded
	During debuginfod downloads, ctrl-c should result in the download
	being cancelled and skipped.  However in some cases, ctrl-c fails to
	get delivered to gdb during downloading.  This can result in downloads
	being unskippable.

	Fix this by ensuring that target_terminal::ours is in effect for the
	duration of each download.

	https://sourceware.org/bugzilla/show_bug.cgi?id=27026#c3

2021-11-29  Nick Clifton  <nickc@redhat.com>

	strings: Replace references to -u option with references to -U.
		PR 28632

2021-11-29  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Fix segfault in search_one_symtab
	PR28539 describes a segfault in lambda function search_one_symtab due to
	psymbol_functions::expand_symtabs_matching calling expansion_notify with a
	nullptr symtab:
	...
	          struct compunit_symtab *symtab =
	            psymtab_to_symtab (objfile, ps);

	          if (expansion_notify != NULL)
	            if (!expansion_notify (symtab))
	              return false;
	...

	This happens as follows.  The partial symtab ps is a dwarf2_include_psymtab
	for some header file:
	...
	(gdb) p ps.filename
	$5 = 0x64fcf80 "/usr/include/c++/11/bits/stl_construct.h"
	...

	The includer of ps is a shared symtab for a partial unit, with as user:
	...
	(gdb) p ps.includer().user.filename
	$11 = 0x64fc9f0 \
	  "/usr/src/debug/llvm13-13.0.0-1.2.x86_64/tools/clang/lib/AST/Decl.cpp"
	...

	The call to psymtab_to_symtab expands the Decl.cpp symtab (and consequently
	the shared symtab), but returns nullptr because:
	...
	struct dwarf2_include_psymtab : public partial_symtab
	{
	  ...
	  compunit_symtab *get_compunit_symtab (struct objfile *objfile) const override
	  {
	    return nullptr;
	  }
	...

	Fix this by returning the Decl.cpp symtab instead, which fixes the segfault
	in the PR.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28539

2021-11-29  Nick Clifton  <nickc@redhat.com>

	Update description of string's -n option.
		PR 28632
		* strings.c (usage): Update desciption of -n option.
		* doc/binutils.texi: Likewise.

2021-11-29  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix typo in proc lines
	Proc lines contains a typo:
	...
	  string_form { set $_line_string_form $value }
	...

	Remove the incorrect '$' in '$_line_string_form'.

	Tested on x86_64-linux.

2021-11-29  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Use unique files in gdb.dwarf2/dw2-lines.exp
	While debugging a problem in gdb.dwarf2/dw2-lines.exp, I realized that the
	test-case generates all executables and associated temporary files using the
	same filenames.

	Fix this by adding a new proc prefix_id in lib/gdb.exp, and using it in the
	test-case.

	Tested on x86_64-linux.

2021-11-29  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.dwarf2/dw2-lines.exp with -m32
	When running test-case gdb.dwarf2/dw2-lines.exp with target board -unix/-m32,
	we run into another instance of PR28383, where the dwarf assembler generates
	64-bit relocations which are not supported by the 32-bit assembler:
	...
	dw2-lines-dw.S: Assembler messages:^M
	outputs/gdb.dwarf2/dw2-lines/dw2-lines-dw.S:76: Error: \
	  cannot represent relocation type BFD_RELOC_64^M
	...

	Fix this by using _op_offset in _line_finalize_header.

	Tested on x86_64-linux.

2021-11-29  Mike Frysinger  <vapier@gentoo.org>

	sim: testsuite: drop most specific istarget checks
	We'll rely on the toolchain probing to determine whether each arch's
	tests can be run rather the current configure target.  This allows
	testing all of the ports in a multitarget configuration.

	For now, we don't reformat the files entirely to make it easier to
	review, and in case we need to make adjustments.  Once this feels
	like it's stable, we can flatten the code a bit by removing the if
	statement entirely.

2021-11-29  Mike Frysinger  <vapier@gentoo.org>

	sim: testsuite: support parallel execution
	Break up the dejagnu logic so that we can parallelize the testsuite.
	This takes a page from gcc & gdb where each .exp is run in isolation
	instead of in serial.

	For most targets, this doesn't make much of a difference as they only
	have a single .exp.  A few (like cris & frv) have multiple .exp though
	and will see a bit of a speed up.

	The real gain is when testing a multitarget build.  This way we can
	run all the targets in parallel and cut the execution time a bit.
	On my system, it goes from ~155sec to ~100sec.

	We can gain further speedups by splitting up some of the larger .exp
	files into smaller groups.  We'll do that in a followup though.

2021-11-29  Mike Frysinger  <vapier@gentoo.org>

	sim: testsuite: expand arch specific toolchain settings
	Leverage the new per-port toolchain settings to initialize the env
	for eeach set of tests.  This allows us to run all the tests in a
	multitarget build if the user sets up the vars.  If they don't, we
	can still skip all the tests.

2021-11-29  Mike Frysinger  <vapier@gentoo.org>

	sim: testsuite: setup per-port toolchain settings for multitarget build
	Gas does not support multitarget builds -- it still only supports
	a single input & output format.  ld is a bit better, but requires
	manual flags to select the right output.  This makes it impossible
	to run the complete testsuite in a multitarget build.

	To address this limitation, create a suite of FOR_TARGET variables
	so these can be set to precompiled as & ld programs.  It requires
	a bit of setup ahead of time, but it's a one-time cost, and makes
	running the full testsuite at once much easier.

2021-11-29  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-28  Alan Modra  <amodra@gmail.com>

	PR28629 NIOS2 fallout
	The test exactly matched wrong output.

		PR 28629
		* testsuite/gas/nios2/relax.d: Update expected output.

2021-11-28  Mike Frysinger  <vapier@gentoo.org>

	sim: add checks to core headers to prevent incorrect common building
	Some of the core sim headers rely on the SIM_AC_OPTION_BITSIZE macro
	which can change the size of core types.  Since these haven't been
	unified across ports, add checks to make sure they aren't accidentally
	included when building for all ports.  This caught the sim-load file
	using poisoned headers that it didn't actually need.

	sim: unify syscall.o building
	Now that we've unified all the syscall tables, this file does not rely
	on any port-specific settings, so move it up to building as part of the
	common step so we only do it once in a multibuild.

	sim: drop unused gentmap & nltvals.def logic
	Now that all ports have switched to target-newlib-* files, there's
	no need for these files & generating things at build time.  So punt
	the logic and make target-newlib-syscall a hard requirement.

	sim: mcore: switch to new target-newlib-syscall
	Use the new target-newlib-syscall module.  This is needed to merge all
	the architectures into a single build, and mcore has a custom syscall
	table for its newlib/libgloss port.

	sim: riscv: switch to new target-newlib-syscall
	Use the new target-newlib-syscall module.  This is needed to merge all
	the architectures into a single build, and riscv has a custom syscall
	table for its newlib/libgloss port.

2021-11-28  Mike Frysinger  <vapier@gentoo.org>

	sim: cr16: switch to new target-newlib-syscall
	Use the new target-newlib-syscall module.  This is needed to merge all
	the architectures into a single build, and cr16 has a custom syscall
	table for its newlib/libgloss port.

	This allows cleaning up the syscall ifdef logic.  We know these will
	always exist now.

2021-11-28  Mike Frysinger  <vapier@gentoo.org>

	sim: d10v: switch to new target-newlib-syscall
	Use the new target-newlib-syscall module.  This is needed to merge all
	the architectures into a single build, and d10v has a custom syscall
	table for its newlib/libgloss port.

	This allows cleaning up the syscall ifdef logic.  We know these will
	always exist now.

2021-11-28  Mike Frysinger  <vapier@gentoo.org>

	sim: sh: switch to new target-newlib-syscall
	Use the new target-newlib-syscall module.  This is needed to merge all
	the architectures into a single build, and sh has a custom syscall
	table for its newlib/libgloss port.

2021-11-28  Mike Frysinger  <vapier@gentoo.org>

	sim: v850: switch to new target-newlib-syscall
	Use the new target-newlib-syscall module.  This is needed to merge all
	the architectures into a single build, and v850 has a custom syscall
	table for its newlib/libgloss port.

	This allows cleaning up the syscall ifdef logic.  We know these will
	always exist now.

2021-11-28  Mike Frysinger  <vapier@gentoo.org>

	sim: iq2000/lm32/m32c/moxie/rx: switch to new target-newlib-syscall.h
	Use the new target-newlib-syscall.h to provide the target syscall
	defines.  These code paths are written specifically for the newlib
	ABI rather than being generalized, so switching them to the defines
	rather than trying to go through the dynamic callback conversion
	seems like the best trade-off for now.  Might have to reconsider
	this in the future.

2021-11-28  Mike Frysinger  <vapier@gentoo.org>

	sim: nltvals: pull target syscalls out into a dedicated source file
	Like we just did for pulling out the errno map, pull out the syscall
	maps into a dedicated common file.  Most newlib ports are using the
	same syscall map, but not all, which means we have to do a bit more
	work to migrate.

	This commit adds the maps and switches the ports using the common
	default syscall table over to it.  Ports using unique syscall tables
	are still using the old targ-map.c logic.

	Switching common ports over is easy by checking NL_TARGET, but the
	ppc code needs a bit more cleanup here hence its larger diff.

2021-11-28  Mike Frysinger  <vapier@gentoo.org>

	sim: frv: resolve syscalls dynamically
	Avoid use of TARGET_<syscall> defines and rely on the callback layers
	to resolve these dynamically so we can support multiple syscall layers
	instead of assuming the newlib/libgloss numbers all the time.

	sim: mn10300: resolve syscalls dynamically
	Avoid use of TARGET_<syscall> defines and rely on the callback layers
	to resolve these dynamically so we can support multiple syscall layers
	instead of assuming the newlib/libgloss numbers all the time.

	sim: nltvals: drop i960
	This port was dropped from gdb/bfd/sim years ago, so stop including
	its syscall constants too.

	sim: moxie: fix datadir handling
	Expand the value at `make` time rather than configure generation time
	so that we handle $(datarootdir) setting properly.

2021-11-28  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-27  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: fix typos in configure
	The variable names used to restore CFLAGS and LDFLAGS here don't quite
	match the names used above, resulting in losing the original CFLAGS and
	LDFLAGS.  Fix that.

	Change-Id: I9cc2c3b48b1dc30c31a7143563c893fd6f426a0a

2021-11-27  Mike Frysinger  <vapier@gentoo.org>

	sim: hw: mark hw_descriptors const

	sim: testsuite: add dedicated flag for init toolchain tests
	As we setup more reliable CC_FOR_TARGET variables for each target, the
	bfin way of overriding it to stuff custom CFLAGS doesn't scale well.
	Add a dedicated CFLAGS_FOR_TARGET_init setting that each set of tests
	can setup if they want to add custom options.

	sim: testsuite: clean up arch specific toolchain settings
	In a multitarget build, we process all targets in order, so make sure
	the toolchain settings from one don't leak into the next.

2021-11-27  Mike Frysinger  <vapier@gentoo.org>

	sim: cris: always search for local rvdummy tool
	If the board info sets the sim to a basename that is found via $PATH
	(which is the default dejagnu behavior), the logic here to use its
	dirname to find rvdummy fails because it looks for `./rvdummy`.  So
	switch it to always use the local build of rvdummy which is the one
	we want to be testing against in the first place.

	If we get a request for testing against a different setup, we can
	figure out & document the needs at that point, and then setup some
	config knobs to control it.

2021-11-27  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix FAIL in gdb.base/list-missing-source.exp
	In commit f8080fb7a44 "[gdb/testsuite] Add gdb.base/include-main.exp" a
	file gdb.base/main.c was added, which caused the following regression:
	...
	(gdb) list^M
	<gdb.base/main.c>
	(gdb) FAIL: gdb.base/list-missing-source.exp: list
	...

	The problem is that the test-case does not expect to find a file main.c, but
	now it finds gdb.base/main.c.

	Fix this by using the more specific file name list-missing-source.c.

	Tested on x86_64-linux.

2021-11-27  Mike Frysinger  <vapier@gentoo.org>

	sim: testsuite: fix bits-gen EXEEXT handling
	Add missing $(EXEEXT) to dependencies on bits-gen.  These are actually
	build-only tools, but automake doesn't allow for build & host tools, so
	the rules are re-using EXEEXT.

2021-11-27  Mike Frysinger  <vapier@gentoo.org>

	sim: testsuite: initial support for OS-specific tests
	We usually test against the newlib/libgloss environment, but for a
	few ports that also support Linux apps, we want to test that logic
	too.  A lot of the C code is written such that it works with either
	newlib/libgloss or glibc/linux toolchains, but we have some tests
	that end up being Linux-specific.  Cris has been using the target
	tuple as a rough proxy for this (where cris*-*-elf is assumed to be
	newlib/libgloss, and everything else is glibc/linux), but that is a
	bit too rough, and it doesn't work in a multitarget build.

	So lets create a few stub files that we can do compile tests with
	to detect the different setups, and then let tests declare which
	one they require (if they require any at all).

2021-11-27  Mike Frysinger  <vapier@gentoo.org>

	sim: testsuite: unify basic C compiler checks
	Both bfin & cris ports test the C compiler to see if it works, but in
	their own way.  Unify the checks in the common code so we can leverage
	them in more ports in the future, and collapse the bfin & cris code.

2021-11-27  Mike Frysinger  <vapier@gentoo.org>

	sim: testsuite: rework sim_init usage
	The sim_init function was called by runtest for each test when --tool
	was set to sim.  When we changed to --tool '' to collapse the testsuite
	dir, the init function was no longer called on every test.  However, it
	was still being called explicitly by config/default.exp.  It's not clear
	why that explicit call ever existed since, in the past, it meant it was
	redundant.

	Lets drop the single sim_init call in config/default.exp and move it out
	to all our tests.  This replicates the runtest behavior so we can setup
	variables on a per-test basis which allows us to recollapse the sim_path
	logic back.  We'll also leverage this in the future for toolchain setup.

	Also add a few comments clarifying the overall runtime behavior.

2021-11-27  Mike Frysinger  <vapier@gentoo.org>

	sim: cris: fix testsuite hang when sim is missing
	If the cris sim hasn't been built yet, trying to run its testsuite
	will hang indefinitely.  The common sim APIs already have this, so
	copy it over to the cris forks of the test+run functions.

2021-11-27  Mike Frysinger  <vapier@gentoo.org>

	sim: testsuite: fix objdir handling
	The tests assume that the cwd is the objdir directory and write its
	intermediates to there all the time.  When using runtest's --objdir
	setting though, this puts the files in the wrong place.  This isn't
	a big problem currently as we never change --objdir, but in order to
	support parallel test execution, we're going to start setting that
	option, so clean up the code ahead of time.

	We also have to tweak some of the cris tests which were making
	assumptions about the argv[0] value.

2021-11-27  Mike Frysinger  <vapier@gentoo.org>

	sim: testsuite: rename global_sim_options to SIMFLAGS_FOR_TARGET
	Now that all the other toolchain settings have been renamed to match
	the dejagnu settings of XXX_FOR_TARGET, rename global_sim_options to
	SIMFLAGS_FOR_TARGET too.

	sim: testsuite: replace global_ld_options with LDFLAGS_FOR_TARGET
	Only a few tests actually use global_ld_options, but we can replace the
	sim-specific settings with the dejagnu common LDFLAGS_FOR_TARGET and get
	the same result.

2021-11-27  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-26  John David Anglin  <danglin@gcc.gnu.org>

	Fix ifunc test fails on hppa*-*-*
	2021-11-26  John David Anglin  <danglin@gcc.gnu.org>

		PR ld/27442

	ld/ChangeLog:

		* ld/testsuite/ld-ifunc/ifunc.exp (contains_irelative_reloc): Adjust
		regexp.
		Skip static ifunc-using executable test on hppa*-*-*.

2021-11-26  H.J. Lu  <hjl.tools@gmail.com>

	gas: Update commit 4780e5e4933
	Update

	commit 4780e5e4933a2497a5aecc4ceabbbb8e82aaf822
	Author: Tom de Vries <tdevries@suse.de>
	Date:   Fri Nov 26 09:59:45 2021 +0100

	    [gas] Fix file 0 dir with -gdwarf-5

	1. Replace i with j in

	  for (j = 0; i < NUM_MD5_BYTES; ++j)

	2. Pass -W to readelf to force CU: in output due to:

		      if (do_wide || strlen (directory) < 76)
			printf (_("CU: %s/%s:\n"), directory, file_table[0].name);
		      else
			printf ("%s:\n", file_table[0].name);

		PR gas/28629
		* dwarf2dbg.c (out_dir_and_file_list): Fix a typo in commit
		4780e5e4933.
		* testsuite/gas/elf/dwarf-5-nop-for-line-table.d: Pass -W to
		readelf.

2021-11-26  Mike Frysinger  <vapier@gentoo.org>

	sim: testsuite: replace global_as_options with ASFLAGS_FOR_TARGET
	Only a few tests actually use global_as_options, but we can replace the
	sim-specific settings with the dejagnu common ASFLAGS_FOR_TARGET and get
	the same result.

2021-11-26  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add gdb.base/include-main.exp
	The test-case gdb.ada/dgopt.exp uses the -gnatD switch, in combination with
	-gnatG.

	This causes the source file $src/gdb/testsuite/gdb.ada/dgopt/x.adb to be
	expanded into $build/gdb/testsuite/outputs/gdb.ada/dgopt/x.adb.dg, and the
	debug information should refer to the x.adb.dg file.

	That is the case for the .debug_line part:
	...
	The Directory Table is empty.

	 The File Name Table (offset 0x1c):
	  Entry Dir     Time    Size    Name
	  1     0       0       0       x.adb.dg
	...
	but not for the .debug_info part:
	...
	    <11>   DW_AT_name        : $src/gdb/testsuite/gdb.ada/dgopt/x.adb
	    <15>   DW_AT_comp_dir    : $build/gdb/testsuite/outputs/gdb.ada/dgopt
	...

	Filed as PR gcc/103436.

	In C we can generate similar debug information, using a source file that does
	not contain any code, but includes another one that does:
	...
	 $ cat gdb/testsuite/gdb.base/include-main.c
	 #include "main.c"
	...
	such that in the .debug_line part we have:
	...
	 The Directory Table (offset 0x1c):
	  1     /home/vries/gdb_versions/devel/src/gdb/testsuite/gdb.base

	 The File Name Table (offset 0x57):
	  Entry Dir     Time    Size    Name
	  1     1       0       0       main.c
	...
	and in the .debug_info part:
	...
	    <11>   DW_AT_name        : $src/gdb/testsuite/gdb.base/include-main.c
	    <15>   DW_AT_comp_dir    : $build/gdb/testsuite
	...

	Add a C test-case that mimics gdb.ada/dgopt.exp, that is:
	- generate debug info as described above,
	- issue a list of a line in include-main.c, while the corresponding
	  CU is not expanded yet.

	Tested on x86_64-linux.

2021-11-26  Mike Frysinger  <vapier@gentoo.org>

	sim: testsuite: drop unused global_cc_options
	Nothing in the testsuite is using this setting, so let's drop it.
	Any code that wants to set compiler flags can use CFLAGS_FOR_TARGET
	instead to get the same effect.

	sim: testsuite: punt unused toolchain variables
	These haven't been used in over 20 years.  The sim testsuite used to
	run these tools itself directly, but back in ~1999 it switched to the
	dejagnu helpers (e.g. target_assemble & target_link), and the dejagnu
	logic only utilizes XXX_FOR_TARGET variables.  Punt them here to avoid
	confusion with dead code.

2021-11-26  Andrew Burgess  <aburgess@redhat.com>
	    Simon Cook  <simon.cook@embecosm.com>

	gdb: add risc-v disassembler options support
	This commit adds support for RISC-V disassembler options to GDB.  This
	commit is based on this patch which was never committed:

	  https://sourceware.org/pipermail/binutils/2021-January/114944.html

	All of the binutils refactoring has been moved to a separate, earlier,
	commit, so this commit is pretty straight forward, just registering
	the required gdbarch hooks.

2021-11-26  Andrew Burgess  <aburgess@redhat.com>
	    Simon Cook  <simon.cook@embecosm.com>

	opcodes/riscv: add disassembler options support to libopcodes
	In preparation for the next commit, which will add GDB support for
	RISC-V disassembler options, this commit restructures how the
	disassembler options are managed within libopcodes.

	The implementation provided here is based on this mailing list patch
	which was never committed:

	  https://sourceware.org/pipermail/binutils/2021-January/114944.html

	which in turn took inspiration from the MIPS implementation of the
	same feature.

	The biggest changes from the original mailing list post are:

	  1. The GDB changes have been split into a separate patch, and

	  2. The `riscv_option_args_privspec` variable, which held the valid
	  priv-spec values is now gone, instead we use the `riscv_priv_specs`
	  array from bfd/cpu-riscv.c instead.


	include/ChangeLog:

		* dis-asm.h (disassembler_options_riscv): Declare.

	opcodes/ChangeLog:

		* riscv-dis.c (enum riscv_option_arg_t): New enum typedef.
		(riscv_options): New static global.
		(disassembler_options_riscv): New function.
		(print_riscv_disassembler_options): Rewrite to use
		disassembler_options_riscv.

2021-11-26  Tom de Vries  <tdevries@suse.de>

	[gas] Fix file 0 dir with -gdwarf-5
	In out_dir_and_file_list, if file 0 is copied from file 1, only the filename
	is copied, and the dir and md5 fields are left to their default values.

	Fix this by adding the copy of the dir and md5 fields.

	gas/ChangeLog:

	2021-11-26  Tom de Vries  <tdevries@suse.de>

		PR 28629
		* dwarf2dbg.c (out_dir_and_file_list): When copying file 1 to file 0,
		also copy dir and md5 fields.
		* testsuite/gas/i386/dwarf5-line-4.d: Adjust expected output.

2021-11-26  Mike Frysinger  <vapier@gentoo.org>

	sim: mips: avoid _ namespace
	Some C libraries export _P symbols in their headers (like older
	newlib and its ctype.h), so use P_ instead to avoid conflicts.

	ld: fix POSIX shell test usage
	POSIX test uses = for compares, not == which is a bashism.

	gas: enable silent build rules

	ld: fix --disable-multiple-abs-defs alignment in help

2021-11-26  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-25  Enze Li  <lienze2010@hotmail.com>

	gdb: ensure extension_language_python is always defined
	In this commit:

	  commit c6a6aad52d9e839d6a84ac31cabe2b7e1a2a31a0
	  Date:   Mon Oct 25 17:25:45 2021 +0100

	      gdb/python: make some global variables static

	building without Python was broken.  The extension_language_python
	global was moved from being always defined, to only being defined when
	the HAVE_PYTHON macro was defined.  As a consequence, building without
	Python support would result in errors like:

	  /usr/bin/ld: extension.o:(.rodata+0x120): undefined reference to `extension_language_python'

	This commit fixes the problem by moving the definition of
	extension_language_python outside of the HAVE_PYTHON macro protection.

2021-11-25  Andrew Burgess  <aburgess@redhat.com>

	Revert "gdb: add assert in remote_target::wait relating to async being off"
	This commit introduced a test failure in gdb.server/attach-flag.exp.
	I didn't spot this failure originally as the problem is fixed by this,
	as yet unpushed patch:

	  https://sourceware.org/pipermail/gdb-patches/2021-November/183768.html

	I unfortunately didn't test each patch in the original series
	independently.  I'll repost this patch after the above patch has been
	merged.

	This reverts commit 32b1f5e8d6b8ddd3be6e471c26dd85a1dac31dda.

2021-11-25  Nick Clifton  <nickc@redhat.com>

	Fix building the AArch64 assembler and disassembler when assertions are disabled.
		PR 28614
		* aarch64-asm.c: Replace assert(0) with real code.
		* aarch64-dis.c: Likewise.
		* aarch64-opc.c: Likewise.

2021-11-25  Bruno Larsen  <blarsen@redhat.com>

	PR gdb/28480: Improve ambiguous member detection
	Basic ambiguity detection assumes that when 2 fields with the same name
	have the same byte offset, it must be an unambiguous request. This is not
	always correct. Consider the following code:

	class empty { };

	class A {
	public:
	  [[no_unique_address]] empty e;
	};

	class B {
	public:
	  int e;
	};

	class C: public A, public B { };

	if we tried to use c.e in code, the compiler would warn of an ambiguity,
	however, since A::e does not demand an unique address, it gets the same
	address (and thus byte offset) of the members, making A::e and B::e have the
	same address. however, "print c.e" would fail to report the ambiguity,
	and would instead print it as an empty class (first path found).

	The new code solves this by checking for other found_fields that have
	different m_struct_path.back() (final class that the member was found
	in), despite having the same byte offset.

	The testcase gdb.cp/ambiguous.exp was also changed to test for this
	behavior.

2021-11-25  Jan W. Jagersma  <jwjagersma@gmail.com>

	coff-go32: consistent 16-byte section alignment
	Section alignment for coff-go32 is inconsistent - The '.text' and
	'.data' sections are 16-byte aligned, but named sections '.text.*' and
	'.data.*' are only 4-byte aligned.  '.gnu.linkonce.r.*' is aligned to
	16 bytes, yet '.rodata' and '.rodata.*' are aligned to 4 bytes.  For
	'.bss' all input sections are only aligned to 4 bytes.

	This primarily can cause trouble when using SSE instructions, which
	require their memory operands to be aligned to 16-byte boundaries.

	This patch solves the issue simply by setting the section alignment
	to 16 bytes, for all code and data sections referenced in the default
	linker script.

		* coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES):  Use partial
		name match for .text, .data.  Add entries for .const, .rodata,
		.bss, .gnu.linkonce.b.

2021-11-25  Alan Modra  <amodra@gmail.com>

	Re: AArch64: Add support for AArch64 EFI (efi-*-aarch64)
	Commit b69c9d41e8 edited bfd/Makefile.in rather than using automake,
	which meant a typo in Makefile.am was not discovered and other
	differences in Makefile.in are seen with a proper regeneration.  One
	difference was lack of an empty line between the pe-aarch64igen.c rule
	and the following $(BFD32_LIBS) etc. dependency rule, in the
	regenerated file.  Not that it matters for proper "make" behaviour,
	but it's nicer with a line between those rules.  Moving the rule
	earlier seems to cure the missing empty line.

		* Makefile.am (BFD64_BACKENDS): Correct typo.
		(BFD_H_DEPS, LOCAL_H_DEPS): Move earlier.  Move rule using these
		deps earlier too.
		* Makefile.in: Regenerate.
		* po/BLD-POTFILES.in: Regenerate.
		* po/SRC-POTFILES.in: Regenerate.

2021-11-25  Nick Clifton  <nickc@redhat.com>

	Updated French translation for the opcodes directory.
		* po/fr.po; Updated French translation.

2021-11-25  Andrew Burgess  <aburgess@redhat.com>

	gdb: rename source_styling_changed observer
	In a later commit I plan to add disassembler styling.  In the same way
	that we have a source_styling_changed observer I would need to add a
	disassembler_styling_changed observer.

	However, currently, these observers would only be notified from
	cli-style.c:set_style_enabled, and observed in tui-winsource.c,
	tui_source_window::style_changed, as a result, having two observers
	seems unnecessary right now, so, in this commit, I plan to rename
	source_styling_changed to just styling_changed, then, in the later
	commit, when disassembler styling is added, I can use the same
	observer for both source styling, and disassembler styling.

	There should be no user visible changes after this commit.

2021-11-25  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb/python: make some global variables static
	Make a couple of global variables static in python/python.c.  To do
	this I had to move the definition of extension_language_python to
	later in the file.

	There should be no user visible changes after this commit.

2021-11-25  Andrew Burgess  <aburgess@redhat.com>

	gdb: add assert in remote_target::wait relating to async being off
	While working on another patch I ended up in a situation where I had
	async mode disabled (with 'maint set target-async off'), but the async
	event token got marked anyway.

	In this situation GDB was continually calling into
	remote_target::wait, however, the async token would never become
	unmarked as the unmarking is guarded by target_is_async_p.

	We could just unconditionally unmark the token, but that would feel
	like just ignoring a bug, so, instead, lets assert that if
	!target_is_async_p, then the async token should not be marked.

	This assertion would have caught my earlier mistake.

	There should be no user visible changes with this commit.

2021-11-25  Andrew Burgess  <aburgess@redhat.com>

	gdb: simplify remote_target::is_async_p
	This commit simplifies remote_target::is_async_p by removing the
	target_async_permitted check.

	In previous commits I have added additional assertions around the
	target_async_permitted flag into target.c, as a result we should now
	be confident that if target_can_async_p returns false, a target will
	never have async mode enabled.  Given this, it should not be necessary
	to check target_async_permitted in remote_target::is_async_p, if this
	flag is false ::is_async_p should return false anyway.  There is an
	assert to this effect in target_is_async_p.

	There should be no user visible change after this commit.

2021-11-25  Andrew Burgess  <aburgess@redhat.com>

	gdb: add asserts in target.c for target_async_permitted
	The target_async_permitted flag allows a user to override whether a
	target can act in async mode or not.  In previous commits I have moved
	the checking of this flag out of the various ::can_async_p methods and
	into the common target.c code.

	In this commit I will add some additional assertions into
	target_is_async_p and target_async.  The rules these assertions are
	checking are:

	  1. A target that returns false for target_can_async_p should never
	  become "async enabled", and so ::is_async_p should always return
	  false.  This is being checked in target_is_async_p.

	  2. GDB should never try to enable async mode for a target that
	  returns false for target_can_async_p, this is checked in
	  target_async.

	There are a few places where we call the ::is_async_p method directly,
	in these cases we will obviously not pass through the assert in
	target_is_async_p, however, there are also plenty of places where we
	do call target_is_async_p so if GDB starts to misbehave we should
	catch it quickly enough.

	There should be no user visible changes after this commit.

2021-11-25  Andrew Burgess  <aburgess@redhat.com>

	gdb: hoist target_async_permitted checks into target.c
	This commit moves the target_async_permitted check out of each targets
	::can_async_p method and into the target_can_async_p wrapper function.

	I've left some asserts in the two ::can_async_p methods that I
	changed, which will hopefully catch any direct calls to these methods
	that might be added in the future.

	There should be no user visible changes after this commit.

2021-11-25  Andrew Burgess  <aburgess@redhat.com>

	gdb: introduce a new overload of target_can_async_p
	There are a few places where we call the target_ops::can_async_p
	member function directly, instead of using the target_can_async_p
	wrapper.

	In some of these places this is because we need to ask before the
	target has been pushed, and in another location (in target.c) it seems
	unnecessary to go through the wrapper when we are already in target.c
	code.

	However, in the next commit I'd like to hoist some common checks out
	of target specific code into target.c.  To achieve this, in this
	commit, I introduce a new overload of target_can_async_p which takes a
	target_ops pointer, and calls the ::can_async_p method directly.  I
	then make use of the new overload where appropriate.

	There should be no user visible changes after this commit.

2021-11-25  Clément Chigot  <clement.chigot@atos.net>

	ld/testsuite/ld-elfvsb: correctly test "weak hidden symbol DSO last"
	The test must be done with the shared object and not with the object
	file which is already being tested above.

	ld/
		* testsuite/ld-elfvsb/elfvsb.exp: use .so file in "weak hidden
		  symbol DSO last"

2021-11-25  Tom de Vries  <tdevries@suse.de>

	[gdb/cli] Add "set logging enabled", deprecate "set logging on/off"
	Before commit 3b6acaee895 "Update more calls to add_prefix_cmd" we had the
	following output for "show logging file":
	...
	$ gdb -q -batch -ex "set trace-commands on" \
	    -ex "set logging off" \
	    -ex "show logging file" \
	    -ex "set logging on" \
	    -ex "show logging file"
	+set logging off
	+show logging file
	Future logs will be written to gdb.txt.
	+set logging on
	+show logging file
	Currently logging to "gdb.txt".
	...

	After that commit we have instead:
	...
	+set logging off
	+show logging file
	The current logfile is "gdb.txt".
	+set logging on
	+show logging file
	The current logfile is "gdb.txt".
	...

	Before the commit, whether logging is enabled or not can be deduced from the
	output of the command.  After the commit, the message is unified and it's no
	longer clear whether logging is enabled or not.

	Fix this by:
	- adding a new command "show logging enabled"
	- adding a corresponding new command "set logging enabled on/off"
	- making the commands "set logging on/off" deprecated aliases of the
	  "set logging enabled on/off" command.

	Update the docs and testsuite to use "set logging enabled".  Mention the new
	and deprecated commands in NEWS.

	Tested on x86_64-linux.

2021-11-25  Tom de Vries  <tdevries@suse.de>

	[gdb/cli] Fix typo in logging overwrite help text
	Currently we have:
	...
	$ gdb -q -batch -ex "help set logging overwrite"
	Set whether logging overwrites or appends to the log file.
	If set, logging overrides the log file.
	...

	Fix overrides -> overwrites typo.

2021-11-25  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-24  Simon Marchi  <simon.marchi@efficios.com>

	gdb: fix help doc for "set index-cache enabled"
	When implementing this command, I put "help doc" as a placeholder for
	the help string, and forgot to update it.  Change it for a real help
	string.

	Change-Id: Id23c2142c5073dc570bd8a706e9ec6fa8c40eb09

2021-11-24  Simon Marchi  <simon.marchi@efficios.com>

	Revert (part of) "gdb fix for catch-syscall.exp"
	This reverts (par of) commit ab198279120fe7937c0970a8bb881922726678f9.
	This commit changed what the test expects when catching the execve
	syscall based on the behavior seen on a Linux PowerPC machine.  That is,
	we get an "entry" event, but no "return" event.  This is not what we get
	on Linux with other architectures, though, and it seems like a
	PowerPC-specific bug.

	Revert the part of the patch related to this, but not the other hunk.

	Change-Id: I4248776e4299f10999487be96d4acd1b33639996

2021-11-24  Nick Clifton  <nickc@redhat.com>

	Fix an illegal memory access parsing a corrupt sysroff file.
		PR 28564
		* sysdump.c (getCHARS): Check for an out of bounds read.

2021-11-24  Andrew Burgess  <aburgess@redhat.com>

	gdb: fix crash when reading ECOFF debug information
	In commit:

	  commit 633cf2548bcd3dafe297e21a1dd3574240280d48
	  Date:   Wed May 9 15:42:28 2018 -0600

	      Remove cleanups from mdebugread.c

	the following change was made in the function parse_partial_symbols in
	mdebugread.c:

	  -  fdr_to_pst = XCNEWVEC (struct pst_map, hdr->ifdMax + 1);
	  -  old_chain = make_cleanup (xfree, fdr_to_pst);
	  +  gdb::def_vector<struct pst_map> fdr_to_pst_holder (hdr->ifdMax + 1);
	  +  fdr_to_pst = fdr_to_pst_holder.data ();

	The problem with this change is that XCNEWVEC calls xcalloc, which in
	turn calls calloc, and calloc zero initializes the allocated memory.
	In contrast, the new line gdb::def_vector<struct pst_map> specifically
	does not initialize the underlying memory.

	This is a problem because, later on in this same function, we
	increment the n_globals field within 'struct pst_map' objects stored
	in the vector.  The incrementing is now being done from an
	uninitialized starting point.

	In this commit we switch from using gdb::def_vector to using
	std::vector, this alone should be enough to ensure that the fields are
	initialized to zero.

	However, for extra clarity, I have also added initial values in the
	'struct pst_map' to make it crystal clear how the struct will start
	up.

	This issue was reported on the mailing list here:

	  https://sourceware.org/pipermail/gdb-patches/2021-November/183693.html

	Co-Authored-By: Lightning <lightningth@gmail.com>

2021-11-24  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-23  Alexandra Hájková  <ahajkova@redhat.com>

	configure.ac: Check for the readline.h explicitly
	When readline development package is missing make fails with
	"configure: error: system readline is not new enough" which
	might be confusing. This patch checks for the readline.h explicitly
	and makes make to warn about the missing package.

2021-11-23  Tamar Christina  <tamar.christina@arm.com>

	AArch64: Add support for AArch64 EFI (efi-*-aarch64).
	This adds support for efi-*-aarch64 by virtue of adding a new PEI target
	pei-aarch64-little.  This is not a full target and only exists to support EFI
	at this time.

	This means that this target does not support relocation processing and is mostly
	a container format.  This format has been added to elf based aarch64 targets
	such that efi images can be made natively on Linux.

	However this target is not valid for use with gas but only with objcopy.

	With these changes the resulting file is recognized as an efi image by
	third party tools:

	>  pecli info hello.efi

	Metadata
	================================================================================
	MD5:            598c32a778b0f0deebe977fef8578c4e
	SHA1:           4580121edd5cb4dc40f51b28f171fd15250df84c
	SHA256:         3154bd7cf42433d1c957f6bf55a17ad8c57ed41b29df2d485703349fd6ff1d5c
	Imphash:
	Size:           47561 bytes
	Type:           PE32+ executable (EFI application) (stripped to external PDB), for MS Windows
	Compile Time:   1970-01-01 00:00:00 (UTC - 0x0       )
	Entry point:    0x2000 (section .text)

	Sections
	================================================================================
	Name      RWX  VirtSize   VirtAddr   RawAddr   RawSize   Entropy  md5
	.text     R-X  0x5bb0     0x2000     0x400     0x5c00      6.39 551fbc264256a3f387de8a891500ae0d
	.reloc    R--  0xc        0x8000     0x6000    0x200       0.02 0c45f6d812d079821c1d54c09ab89e1d
	.data     RW-  0x1d88     0x9000     0x6200    0x1e00      4.18 5d1137c09f01289dc62bf754f7290db3
	.dynamic  RW-  0xf0       0xb000     0x8000    0x200       0.34 5c94ed3206f05a277e6f04fbf131f131
	.rela     R--  0xe58      0xc000     0x8200    0x1000      1.87 8b5c6bc30f3acb7ca7bf2e6789d68519
	.dynsym   R--  0x138      0xd000     0x9200    0x200       0.96 bdcf5101da51aadc663ca8859f88138c

	Imports
	================================================================================

	Any magic number is based on the Microsoft PE specification [1].

	[1] https://docs.microsoft.com/en-us/windows/win32/debug/pe-format

	bfd/ChangeLog:

	2021-10-21  Tamar Christina  <tamar.christina@arm.com>

		PR binutils/26206
		* .gitignore (pe-aarch64igen.c): New.
		* Makefile.am (pei-aarch64.lo, pe-aarch64igen.lo, pei-aarch64.c,
		pe-aarch64igen.c): Add support.
		* Makefile.in: Likewise.
		* bfd.c (bfd_get_sign_extend_vma): Add pei-aarch64-little.
		* coff-aarch64.c: New file.
		* coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
		coff_write_object_contents) Add aarch64 (aarch64_pei_vec) support.
		* config.bfd: Likewise.
		* configure: Likewise.
		* configure.ac: Likewise.
		* libpei.h (GET_OPTHDR_IMAGE_BASE, PUT_OPTHDR_IMAGE_BASE,
		GET_OPTHDR_SIZE_OF_STACK_RESERVE, PUT_OPTHDR_SIZE_OF_STACK_RESERVE,
		GET_OPTHDR_SIZE_OF_STACK_COMMIT, PUT_OPTHDR_SIZE_OF_STACK_COMMIT,
		GET_OPTHDR_SIZE_OF_HEAP_RESERVE, PUT_OPTHDR_SIZE_OF_HEAP_RESERVE,
		GET_OPTHDR_SIZE_OF_HEAP_COMMIT, PUT_OPTHDR_SIZE_OF_HEAP_COMMIT,
		GET_PDATA_ENTRY, _bfd_peAArch64_bfd_copy_private_bfd_data_common,
		_bfd_peAArch64_bfd_copy_private_section_data,
		_bfd_peAArch64_get_symbol_info, _bfd_peAArch64_only_swap_filehdr_out,
		_bfd_peAArch64_print_private_bfd_data_common,
		_bfd_peAArch64i_final_link_postscript,
		_bfd_peAArch64i_only_swap_filehdr_out, _bfd_peAArch64i_swap_aouthdr_in,
		_bfd_peAArch64i_swap_aouthdr_out, _bfd_peAArch64i_swap_aux_in,
		_bfd_peAArch64i_swap_aux_out, _bfd_peAArch64i_swap_lineno_in,
		_bfd_peAArch64i_swap_lineno_out, _bfd_peAArch64i_swap_scnhdr_out,
		_bfd_peAArch64i_swap_sym_in, _bfd_peAArch64i_swap_sym_out,
		_bfd_peAArch64i_swap_debugdir_in, _bfd_peAArch64i_swap_debugdir_out,
		_bfd_peAArch64i_write_codeview_record,
		_bfd_peAArch64i_slurp_codeview_record,
		_bfd_peAArch64_print_ce_compressed_pdata): New.
		* peXXigen.c (_bfd_XXi_swap_aouthdr_in, _bfd_XXi_swap_aouthdr_out,
		pe_print_pdata, _bfd_XX_print_private_bfd_data_common,
		_bfd_XX_bfd_copy_private_section_data, _bfd_XXi_final_link_postscript):
		Support COFF_WITH_peAArch64,
		* pei-aarch64.c: New file.
		* peicode.h (coff_swap_scnhdr_in, pe_ILF_build_a_bfd, pe_ILF_object_p):
		Support COFF_WITH_peAArch64.
		(jtab): Add dummy entry that traps.
		* targets.c (aarch64_pei_vec): New.

	binutils/ChangeLog:

	2021-10-21  Tamar Christina  <tamar.christina@arm.com>

		PR binutils/26206
		* NEWS: Add new support.
		* objcopy.c (convert_efi_target): Add efi-*-aarch64 support.
		* testsuite/binutils-all/aarch64/pei-aarch64-little.d: New test.
		* testsuite/binutils-all/aarch64/pei-aarch64-little.s: New test.

	include/ChangeLog:

	2021-10-21  Tamar Christina  <tamar.christina@arm.com>

		PR binutils/26206
		* coff/aarch64.h: New file.
		* coff/pe.h (IMAGE_FILE_MACHINE_ARM64): New.

2021-11-23  Alan Modra  <amodra@gmail.com>

	binutils debuginfod test
	A missing "return" resulted in this non-ELF fail:
	x86_64-w64-mingw32  +FAIL: debuginfod (create separate debug info file)

	Also, the debuginfod I have installed does not appear to handle
	non-native ELF objects, so only run the test when native.

		* testsuite/binutils-all/debuginfod.exp: Don't run test unless
		native ELF.

2021-11-23  Alan Modra  <amodra@gmail.com>

	Update bug reporting address
	https://sourceware.org/bugzilla/ everywhere

	bfd/
		* configure.ac (ACX_BUGURL): Set to https://sourceware.org/bugzilla/
		* po/Make-in (msgid-bugs-address): Likewise.
		* README: Report bugs to the above.
		* configure: Regenerate.
	binutils/
		* po/Make-in (msgid-bugs-address): Update.
	gas/
		* README: Update bug address.  Delete mention of gcc.
		* po/Make-in: Update bug address.
	gold/
		* po/Make-in: Update bug address.
	gprof/
		* po/Make-in: Update bug address.
	ld/
		* po/Make-in: Update bug address.
	opcodes/
		* po/Make-in: Update bug address.

2021-11-23  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	gdb: more compile fixes for gnu-nat.c
	This fixes compile errors like

	    ../../gdb-11.1/gdb/gnu-nat.c: In function void add_task_commands():
	    ../../gdb-11.1/gdb/gnu-nat.c:3204:17: error: no matching function for call to add_cmd(const char [8], command_class, cmd_list_element*&, char*, cmd_list_element**)
	     3204 |         &setlist);
	          |                 ^
	    In file included from ../../gdb-11.1/gdb/completer.h:21,
	                     from ../../gdb-11.1/gdb/symtab.h:36,
	                     from ../../gdb-11.1/gdb/infrun.h:21,
	                     from ../../gdb-11.1/gdb/target.h:42,
	                     from ../../gdb-11.1/gdb/inf-child.h:23,
	                     from ../../gdb-11.1/gdb/gnu-nat.h:38,
	                     from ../../gdb-11.1/gdb/gnu-nat.c:24:
	    ../../gdb-11.1/gdb/command.h:160:33: note: candidate: cmd_list_element* add_cmd(const char*, command_class, void (*)(const char*, int), const char*, cmd_list_element**)
	      160 | extern struct cmd_list_element *add_cmd (const char *, enum command_class,
	          |                                 ^~~~~~~
	    ../../gdb-11.1/gdb/command.h:161:30: note:   no known conversion for argument 3 from cmd_list_element* to void (*)(const char*, int)
	      161 |       cmd_const_cfunc_ftype *fun,
	          |       ~~~~~~~~~~~~~~~~~~~~~~~^~~
	    ../../gdb-11.1/gdb/command.h:167:33: note: candidate: cmd_list_element* add_cmd(const char*, command_class, const char*, cmd_list_element**)
	      167 | extern struct cmd_list_element *add_cmd (const char *, enum command_class,
	          |                                 ^~~~~~~
	    ../../gdb-11.1/gdb/command.h:167:33: note:   candidate expects 4 arguments, 5 provided
	    ../../gdb-11.1/gdb/gnu-nat.c:3210:18: error: no matching function for call to add_cmd(const char [8], command_class, cmd_list_element*&, char*, cmd_list_element**)
	     3210 |         &showlist);
	          |                  ^

	Change-Id: Ie9029363d3fb40e34e8f5b1ab503745bc44bfe3f

2021-11-23  Andrea Monaco  <andrea.monaco@autistici.org>

	gnu-nat.c: fix calls to add_info_alias
	Some time ago add_info_alias was changed (commit
	e0f25bd9717c7973197095523db7c1cdc956cea2).  These calls were not updated
	and caused errors on compilation.

	Change-Id: I354ae4e8b8926d785abc94ec7142471ffd76d2de

2021-11-23  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-22  Simon Marchi  <simon.marchi@efficios.com>

	gdb: pass more const target_waitstatus by reference
	While working on target_waitstatus changes, I noticed a few places where
	const target_waitstatus objects could be passed by reference instead of
	by pointers.  And in some cases, places where a target_waitstatus could
	be passed as const, but was not.  Convert them as much as possible.

	Change-Id: Ied552d464be5d5b87489913b95f9720a5ad50c5a

2021-11-22  Simon Marchi  <simon.marchi@efficios.com>

	gdb: introduce target_waitkind_str, use it in target_waitstatus::to_string
	I would like to print target_waitkind values in debug messages, so I
	think that a target_waitkind-to-string function would be useful.  While
	at it, use it in target_waitstatus::to_string.  This changes the output
	of target_waitstatus::to_string a bit, but I think it is for the better.
	The debug messages will show a string matching exactly the
	target_waitkind enumerator (minus the TARGET_WAITKIND prefix).

	As a convenience, make string_appendf return the same reference to
	string it got as a parameter.  This allows doing this:

	  return string_appendf (str, "foo");

	... keeping the code concise.

	Change-Id: I383dffc9c78614e7d0668b1516073905e798eef7

2021-11-22  Simon Marchi  <simon.marchi@efficios.com>

	gdb: rename target_waitstatus_to_string to target_waitstatus::to_string
	Make target_waitstatus_to_string a "to_string" method of
	target_waitstatus, a bit like we have ptid_t::to_string already.  This
	will save a bit of typing.

	Change-Id: Id261b7a09fa9fa3c738abac131c191a6f9c13905

2021-11-22  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: Removed the redundant NULL pointer check in the riscv_update_subset.
	If we always use the .option arch to call the riscv_update_subset, then
	it is almost impossible that the input string will be NULL.  Therefore,
	just remove the redundant NULL pointer check in the riscv_update_subset.

	bfd/
		* elfxx-riscv.c (riscv_update_subset): Removed the redundant NULL
		pointer check.

2021-11-22  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: Replace .option rvc/norvc with .option arch, +c/-c.
	Since the .option rvc/norvc directives are obsolete, replace them with
	the new proposed diretives: .option arch, +c/-c.  And also reset the
	riscv_opts.rvc flag for the .option arch directives.

	gas/
		* config/tc-riscv.c (s_riscv_option): Reset the riscv_opts.rvc
		for the .option arch directives.
		* testsuite/gas/riscv/align-1.s: Replace the obsolete .option
		rvc/norvc with .option arch, +c/-c.
		* testsuite/gas/riscv/c-add-addi.s: Likewise.
		* testsuite/gas/riscv/c-nonzero-imm.s: Likewise.
		* testsuite/gas/riscv/c-nonzero-reg.s: Likewise.
		* testsuite/gas/riscv/c-zero-imm-64.s: Likewise.
		* testsuite/gas/riscv/c-zero-imm.s: Likewise.
		* testsuite/gas/riscv/c-zero-reg.s: Likewise.
		* testsuite/gas/riscv/ext.s: Likewise.
		* testsuite/gas/riscv/mapping-01.s: Likewise.
		* testsuite/gas/riscv/mapping-02.s: Likewise.
		* testsuite/gas/riscv/mapping-03.s: Likewise.
		* testsuite/gas/riscv/mapping-04.s: Likewise.
		* testsuite/gas/riscv/no-relax-align-2.s: Likewise.
		* testsuite/gas/riscv/shamt-32.s: Likewise.
		* testsuite/gas/riscv/shamt-64.s: Likewise.

2021-11-22  Tom de Vries  <tdevries@suse.de>

	[gdb/build] Fix x86_64 x32 build
	A build error on x86_64 with x32 abi was reported here (
	https://sourceware.org/pipermail/gdb/2021-November/049787.html ):
	...
	gdb/nat/amd64-linux-siginfo.c:280:42: error: \
	  'struct compat_x32_siginfo_t::<unnamed union>::<unnamed>' has no member \
	  named 'si_addr_bnd'
	280 | #define cpt_si_lower _sifields._sigfault.si_addr_bnd._lower
	| ^~~~~~~~~~~
	gdb/nat/amd64-linux-siginfo.c:337:38: note: in expansion of macro 'cpt_si_lower'
	337 | to->cpt_si_lower = from_ptrace.cpt_si_lower;
	| ^~~~~~~~~~~~
	...

	The problem is that code added in commit d3d7d1ba3bb "[gdb/tdep] Handle
	si_addr_bnd in compat_siginfo_from_siginfo" doesn't compile on an x86_64 x32
	setup, because compat_x32_siginfo_t doesn't have the si_addr_bnd fields.

	Fix this conservatively by disabling the code for x32.

	Tested on x86_64-linux.

2021-11-22  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: PR28610, Fix ASAN heap-buffer-overflow error in riscv_update_subset.
	The architecture parser in riscv_update_subset shouldn't check (or access)
	the pointer space which doesn't exist.

	bfd/
		pr 28610
		* elfxx-riscv.c (riscv_update_subset): The architecture parser
		shouldn't access the pointer space which doesn't exist.

2021-11-22  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Support .debug_line with DW_FORM_line_strp
	I noticed a new gcc option -gdwarf64 and tried it out (using gcc 11.2.1).

	With a test-case hello.c:
	...
	int
	main (void)
	{
	  printf ("hello\n");
	  return 0;
	}
	...
	compiled like this:
	...
	$ gcc -g -gdwarf64 ~/hello.c
	...
	I ran into:
	...
	$ gdb -q -batch a.out
	DW_FORM_line_strp pointing outside of .debug_line_str section \
	  [in module a.out]
	...

	Debugging gdb revealed that the string offset is:
	...
	(gdb) up
	    objfile=0x182ab70, str_offset=1378684502312,
	    form_name=0xeae9b5 "DW_FORM_line_strp")
	    at src/gdb/dwarf2/section.c:208
	208         error (_("%s pointing outside of %s section [in module %s]"),
	(gdb) p /x str_offset
	$1 = 0x14100000128
	(gdb)
	...
	which is read when parsing a .debug_line entry at 0x1e0.

	Looking with readelf at the 0x1e0 entry, we have:
	...
	 The Directory Table (offset 0x202, lines 2, columns 1):
	  Entry Name
	  0     (indirect line string, offset: 0x128): /data/gdb_versions/devel
	  1     (indirect line string, offset: 0x141): /home/vries
	...
	which in a hexdump looks like:
	...
	  0x00000200 1f022801 00004101 00000201 1f020f02
	...

	What happens is the following:
	- readelf interprets the DW_FORM_line_strp reference to .debug_line_str as
	  a 4 byte value, and sees entries 0x00000128 and 0x00000141.
	- gdb instead interprets it as an 8 byte value, and sees as first entry
	  0x0000014100000128, which is too big so it bails out.

	AFAIU, gdb is wrong.  It assumes DW_FORM_line_strp is 8 bytes on the basis
	that the corresponding CU is 64-bit DWARF.  However, the .debug_line
	contribution has it's own initial_length field, and encodes there that it's
	32-bit DWARF.

	Fix this by using the correct offset size for DW_FORM_line_strp references
	in .debug_line.

	Note: the described test-case does trigger this complaint (both with and
	without this patch):
	...
	$ gdb -q -batch -iex "set complaints 10" a.out
	During symbol reading: intermixed 32-bit and 64-bit DWARF sections
	...

	The reason that the CU has 64-bit dwarf is because -gdwarf64 was passed to
	gcc.  The reason that the .debug_line entry has 32-bit dwarf is because that's
	what gas generates.  Perhaps this is complaint-worthy, but I don't think it
	is wrong.

	Tested on x86_64-linux, using native and target board dwarf64.exp.

2021-11-22  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add target board dwarf64.exp
	Add a new target board dwarf64.exp, that runs test with -gdwarf64.

	Tested on x86_64-linux.

2021-11-22  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Support .debug_line v5 in dwarf assembler
	The v5 section version for .debug_line has:
	- two new fields address_size and segment_selector_size
	- a different way to encode the directory and filename tables.

	Add support for this in the dwarf assembler.

	For now, make the v5 directory and filename tables work with the v4 type of
	specification in the test-cases by adding duplicate entries at position 0.

	This will need to be properly fixed with an intrusive fix that changes how
	directory and filename entries are specified in the test-cases, f.i:
	...
	set diridx [include_dir "${srcdir}/${subdir}"]
	set fileidx [file_name "$srcfile" $diridx]
	...

	Tested on x86_64-linux.

2021-11-22  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Factor out _line_finalize_header
	Rather than generate dwarf immediately in procs include_dir and file_name,
	postpone generation and store the data in variables.  Then handle the
	generation in a new proc _line_finalize_header.

	Tested on x86-64-linux.

2021-11-22  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Support .debug_line v4 in dwarf assembler
	The .debug_line header got a new field in v4:
	maximum_operations_per_instruction.

	Generate this field in the dwarf assembler, for now hardcoding the value to 1,
	meaning non-VLIW.

	Tested on x86_64-linux.

2021-11-22  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add test-case gdb.dwarf2/dw2-lines.exp
	Add a new test-case gdb.dwarf2/dw2-lines.exp that tests various .debug_line
	sections.

	Tested on x86_64-linux.

2021-11-22  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Speed up MACRO_AT_* calls
	Currently, for each MACRO_AT_range or MACRO_AT_func in dwarf assembly the
	following is done:
	- $srcdir/$subdir/$srcfile is compiled to an executable using
	  flags "debug"
	- a new gdb instance is started
	- the new executable is loaded.

	This is inefficient, because the executable is identical within the same
	Dwarf::assemble call.

	Share the gdb instance in the same Dwarf::assemble invocation, which speeds
	up a make check with RUNTESTFLAGS like this to catch all dwarf assembly
	test-cases:
	...
	rtf=$(echo $(cd src/gdb/testsuite; find gdb.* -type f -name "*.exp" \
	      | xargs grep -l Dwarf::assemble))
	...
	from:
	...
	real    1m39.916s
	user    1m25.668s
	sys     0m21.377s
	...
	to:
	...
	real    1m29.512s
	user    1m17.316s
	sys     0m19.100s
	...

	Tested on x86_64-linux.

2021-11-22  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-21  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Remove duplicates in gdb.base/catch-signal.exp
	When running the testsuite I have the following:

	    Running .../gdb/testsuite/gdb.base/catch-signal.exp ...
	    DUPLICATE: gdb.base/catch-signal.exp: SIGHUP: continue
	    DUPLICATE: gdb.base/catch-signal.exp: SIGHUP: continue
	    DUPLICATE: gdb.base/catch-signal.exp: 1: continue
	    DUPLICATE: gdb.base/catch-signal.exp: 1: continue
	    DUPLICATE: gdb.base/catch-signal.exp: SIGHUP SIGUSR2: continue
	    DUPLICATE: gdb.base/catch-signal.exp: SIGHUP SIGUSR2: continue

	This patch removes DUPLICATE in gdb.base/catch-signal.exp by explicitly
	giving names to the offending 'gdb_test "continue"' statements to make
	them distinct.

	Tested on x86_64-linux.

2021-11-21  Mike Frysinger  <vapier@gentoo.org>

	sim: v850: fix cpu_option testsuite handling
	The v850 testsuite code has been testing the $opt variable, but this
	was never actually set anywhere globally or v850-specific.  Instead,
	this was a random variable leaking out of the sh testsuite code.  As
	far as I can tell, it has always been this way.  That means the code
	only ever tested the v850 cpu target (which is the default).

	This failure can be easily seen in practice by running the v850 code
	in isolation and seeing it crash:
	$ runtest v850/allinsns.exp
	...
	Running target unix
	Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
	Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
	Using ../../../sim/testsuite/config/default.exp as tool-and-target-specific interface file.
	WARNING: Assuming target board is the local machine (which is probably wrong).
	You may need to set your DEJAGNU environment variable.
	Running ../../../sim/testsuite/v850/allinsns.exp ...
	ERROR: tcl error sourcing ../../../sim/testsuite/v850/allinsns.exp.
	ERROR: tcl error code TCL LOOKUP VARNAME opt
	ERROR: can't read "opt": no such variable
	    while executing
	"switch -regexp -- $opt {

	Backing up a bit, the reason for this logic in the first place is
	because the common sim testsuite code makes an assumption about the
	assembler options with cpu_option -- the option and its value are
	always separated by an =.  This is not the case with v850.  So tweak
	the core sim logic a bit to support omitting the = so that we can
	switch v850 to the standard all_machs setting and avoid opt entirely.

2021-11-21  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-20  Jeff Law  <jeffreyalaw@gmail.com>

	    Fix intermittent failures on the H8, particularly H8/SX tests.
	    The upstream GCC tester has  showed spurious execution failures on the
	    H8 target for the H8/SX multilibs. I suspected memory corruption or an
	    uninitialized variable early as the same binary would sometimes work and
	    sometimes it got the wrong result. Worse yet, the point where the test
	    determined it was getting the wrong result would change.

	    Because it only happened on the H8/SX variant I was able to zero in on
	    the "mova" support and the "short form" of those instructions in particular.

	    As the code stands it checks if code->op3.type == 0 to try and identify cases
	    where op3 wasn't filled in and thus we've got the short form of the mova
	    instruction.

	    But for the short-form of those instructions we never set any of the "op3"
	    data structure. We get whatever was lying around -- it's usually zero and
	     thus things usually work, but if the stale data was nonzero, then we'd
	    fail to recognize the instruction as a short-form and fail to set up the
	    various fields appropriately.

	    I initially initialized the op3.type field to zero, but didn't like that
	     because it was inconsistent with how other operands were initialized.
	    Bringing consistency meant using -1 as the initializer value and adjusting
	    the check for short form mova appropriately.

	    I've had this in the upstream GCC tester for perhaps a year at this point
	    and haven't seen any of the intermittent failures again.

2021-11-20  Simon Marchi  <simon.marchi@efficios.com>

	gdbsupport: fix array-view compilation with c++11 && _GLIBCXX_DEBUG
	When building with -std=c++11 and -D_GLIBCXX_DEBUG=1, we get some errors
	like:

	      CXX    unittests/array-view-selftests.o
	    In file included from /home/smarchi/src/binutils-gdb/gdb/utils.h:25,
	                     from /home/smarchi/src/binutils-gdb/gdb/defs.h:630,
	                     from /home/smarchi/src/binutils-gdb/gdb/unittests/array-view-selftests.c:20:
	    /home/smarchi/src/binutils-gdb/gdb/../gdbsupport/array-view.h: In instantiation of constexpr gdb::array_view<T> gdb::array_view<T>::slice(gdb::array_view<T>::size_type, gdb::array_view<T>::size_type) const [with T = unsigned char; gdb::array_view<T>::size_type = long unsigned int:
	    /home/smarchi/src/binutils-gdb/gdb/unittests/array-view-selftests.c:532:29:   required from here
	    /home/smarchi/src/binutils-gdb/gdb/../gdbsupport/array-view.h:192:3: error: body of constexpr function constexpr gdb::array_view<T> gdb::array_view<T>::slice(gdb::array_view<T>::size_type, gdb::array_view<T>::size_type) const [with T = unsigned char; gdb::array_view<T>::size_type = long unsigned int not a return-statement
	      192 |   }
	          |   ^

	This is because constexpr functions in c++11 can only consist of a
	single return statement, so we can't have the gdb_assert in there.  Make
	the gdb_assert presence conditional to the __cplusplus version, to
	enable it only for c++14 and later.

	Change-Id: I2ac33f7b4bd1765ddc3ac8d07445b16ac1f340f0

2021-11-20  Tom de Vries  <tdevries@suse.de>

	[gdb/build] Check if libsource-highlight is usable
	When building gdb with g++ 4.8.5, I ran into:
	...
	ld: source-cache.o: in function `source_cache::ensure(symtab*)':
	source-cache.c:207: undefined reference to \
	  srchilite::SourceHighlight::SourceHighlight(std::string const&)
	...

	[ I configured gdb without explicit settings related to source-highlight, so
	we're excercising the enable_source_highlight=auto scenario. ]

	The problem is that:
	- the source-highlight library is build with system compiler
	  g++ 7.5.0 which uses the new libstdc++ library abi (see
	  https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html )
	- gdb is build using g++ 4.8.5 which uses the old abi.

	[ There's a compatibility macro _GLIBCXX_USE_CXX11_ABI, but that doesn't work
	for this case.  Instead, it enables the opposite case where the
	source-highlight library is build with g++ 4.8.5 and gdb is build with
	g++ 7.5.0. ]

	Fix this by checking whether the source-highlight library is usable during
	configuration.

	In the enable_source_highlight=auto scenario, this allows the build to skip
	the unusable library and finish successfully.

	In the enable_source_highlight=yes scenario, this allows the build to error
	out earlier.

	Tested on x86_64-linux.

2021-11-20  Clément Chigot  <clement.chigot@atos.net>

	bfd: remove wrong comment in xcofflink.c
	This comment was long time ago associated to the function
	"xcoff_build_ldsyms" which have since been replaced by
	"xcoff_build_ldsym".

		* xcofflink.c: Remove wrong comment.

2021-11-20  Mike Frysinger  <vapier@gentoo.org>

	sim: bfin: fix short --env usage in testsuite
	Now that we have more than one option that matches "--env", the test
	config here doesn't work.  Use the explicit --environment.

2021-11-20  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-19  H.J. Lu  <hjl.tools@gmail.com>

	elfedit: Align --[in|out]put-abiversion usage
	Align

	  --input-abiversion [0-255]  Set input ABIVERSION
	  --output-abiversion [0-255] Set output ABIVERSION

	instead of

	  --input-abiversion [0-255]
	                              Set input ABIVERSION
	  --output-abiversion [0-255]
	                              Set output ABIVERSION

		* elfedit.c (usage): Align --[in|out]put-abiversion usage.

2021-11-19  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Handle runto fail in gdb.mi/mi-var-cp.exp
	On OBS I ran into:
	...
	PASS: gdb.mi/mi-var-cp.exp: run to mi-var-cp.cc:81 (set breakpoint)
	UNRESOLVED: gdb.mi/mi-var-cp.exp: unable to start target
	...
	followed by 81 FAILs and two more UNRESOLVEDs.

	I didn't manage to reproduce this, but I did notice that the initial
	problem causing the UNRESOLVED caused all subsequent UNRESOLVEDs and FAILs.

	I emulated the problem by commenting out the send_gdb "run\n" in
	mi_run_cmd_full.

	Fix this by:
	- handling mi_run_cmd failure in mi_get_inline_test
	- handling mi_run_inline_test failure in gdb.mi/mi-var-cp.exp, and
	  other test-cases using mi_get_inline_test

	Tested on x86_64-linux.

2021-11-19  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix 64-bit dwarf test-cases with -m32
	When running test-case gdb.dwarf2/loc-sec-offset.exp with target board -m32,
	I run into:
	...
	builtin_spawn -ignore SIGHUP gcc -fno-stack-protector -m32 \
	  -fdiagnostics-color=never -c -o loc-sec-offset-dw641.o \
	  loc-sec-offset-dw64.S^M
	as: loc-sec-offset-dw641.o: unsupported relocation type: 0x1^M
	loc-sec-offset-dw64.S: Assembler messages:^M
	loc-sec-offset-dw64.S:29: Error: cannot represent relocation type \
	  BFD_RELOC_64^M
	...

	Looking at line 29, we have:
	...
	        .8byte        .Labbrev1_begin   /* Abbrevs */
	...

	It would be nice if the assembler could handle this somehow.  But I guess
	it's not unreasonable that an assembler for a 32-bit architecture will object
	to handling 64-bit labels.

	Instead, work around this in the dwarf assembler by emitting:
	...
	        .4byte        .Labbrev1_begin   /* Abbrevs (lsw) */
	        .4byte        0                 /* Abbrevs (msw) */
	...

	Tested on x86_64-linux with target board unix/-m32.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28383

2021-11-19  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.threads/thread-specific-bp.exp
	On OBS I ran into a failure in test-case gdb.threads/thread-specific-bp.exp:
	...
	(gdb) PASS: gdb.threads/thread-specific-bp.exp: non-stop: continue to end
	info breakpoint^M
	Num     Type           Disp Enb Address            What^M
	1       breakpoint     keep y   0x0000555555555167 in main at $src:36^M
	        breakpoint already hit 1 time^M
	2       breakpoint     keep y   0x0000555555555151 in start at $src:23^M
	        breakpoint already hit 1 time^M
	3       breakpoint     keep y   0x0000555555555167 in main at $src:36 thread 2^M
	        stop only in thread 2^M
	4       breakpoint     keep y   0x000055555555515c in end at $src:29^M
	        breakpoint already hit 1 time^M
	(gdb) [Thread 0x7ffff7db1640 (LWP 19984) exited]^M
	Thread-specific breakpoint 3 deleted - thread 2 no longer in the thread list.^M
	FAIL: gdb.threads/thread-specific-bp.exp: non-stop: \
	  thread-specific breakpoint was deleted (timeout)
	...

	Fix this by waiting for the "[Thread 0x7ffff7db1640 (LWP 19984) exited]"
	message before issuing the "info breakpoint command".

	Tested on x86_64-linux.

2021-11-19  Christina Schimpe  <christina.schimpe@intel.com>

	gdb/testsuite: Extend tests for print of cv qualifiers
	This commit supplements whatis and ptype command tests for print of
	const-volatile qualifiers.

	gdb/testsuite/ChangeLog:
	2021-11-16  Christina Schimpe  <christina.schimpe@intel.com>

		* gdb.cp/ptype-cv-cp.cc: New const and volatile typedef
		  variables.
		* gdb.cp/ptype-cv-cp.exp: Add new tests.

2021-11-19  Christina Schimpe  <christina.schimpe@intel.com>

	gdb: Print cv qualifiers if class attributes are substituted
	Make ptype print const/volatile qualifiers when template or typedef
	attributes are substituted.

	For a programm like
	~~~
	template<typename DataT>
	class Cfoo
	{
	  typedef float myfloat;
	public:
	  DataT me0;
	  const DataT me1=1;
	  const myfloat me2=2.0;
	};

	int main()
	{
	  Cfoo<int> cfoo;
	  return 0;
	}
	~~~

	gdb outputs the following type for cfoo's attributes:

	~~~
	(gdb) b 14
	Breakpoint 1 at 0x1170: file tmp.cc, line 14.
	(gdb) run
	Starting program: /tmp

	Breakpoint 1, main () at tmp.cc:14
	14        return 0;
	(gdb) ptype cfoo
	type = class Cfoo<int> [with DataT = int] {
	  public:
	    DataT me0;
	    DataT me1;
	    myfloat me2;

	  private:
	    typedef float myfloat;
	}

	~~~

	The cv qualifiers (const in this case) are ignored for me1 and me2.

	After:
	~~~
	(gdb) ptype cfoo
	type = class Cfoo<int> [with DataT = int] {
	  public:
	    DataT me0;
	    const DataT me1;
	    const myfloat me2;

	  private:
	    typedef float myfloat;
	}
	~~~

	gdb/ChangeLog:
	2021-11-16  Christina Schimpe  <christina.schimpe@intel.com>

		* gdb/c-typeprint.c: Print cv qualifiers in case of parameter
		  substitution.

	gdb/testsuite/ChangeLog:
	2021-11-16  Christina Schimpe  <christina.schimpe@intel.com>

		* gdb.cp/templates.cc: 	New template class Cfoo with const,
		  template, typdef and integer attributes.
		* gdb.cp/templates.exp: Add new test using ptype and ptype/r
		  commmands for template class CFoo.

2021-11-19  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: Support new .option arch directive.
	https://github.com/riscv/riscv-asm-manual/pull/67

	Format:
	.option arch, +<extension><version>, ...
	.option arch, -<extension>
	.option arch, =<ISA string>

	The new direcitve is used to enable/disable extensions for the specific
	code region.  For example,

	.attribute arch, "rv64ic"   # arch = rv64i2p0_c2p0
	.option push
	.option arch, +d2p0, -c     # arch = rv64i2p0_f2p0_d2p0, f is added implied
	.option arch, =rv32gc       # arch = rv32i2p0_m2p0_a2p0_f2p0_d2p0_c2p0
	.option pop                 # arch = rv64i2p0_c2p0

	Note that,
	1. ".option rvc/norvc" have the same behavior as ".option arch +c/-c".
	2. ".option arch -i" is illegal, since we cannot remove base i extension.
	3. If arch=rv64i2p0, then ".option arch, +i3p0" will update the i's version
	   from 2.0 to 3.0.
	4. If arch=rv64i3p0, then ".option arch, +i" will update the i's version
	   from 2.0 to the default one according to the chosen isa spec.

	bfd/
		* elfxx-riscv.c (riscv_add_subset): If the subset is already added,
		and the new versions are not RISCV_UNKNOWN_VERSION, then update the
		versions to the subset list.
		(riscv_copy_subset): New function.  Copy the subset from list.
		(riscv_copy_subset_list): New function.  Return the new copyed list.
		(riscv_update_subset): Updated to make .option arch directives workable.
		* elfxx-riscv.h: Updated.
	gas/
		* config/tc-riscv.c (riscv_subsets): Defined as a pointer.
		(riscv_rps_as): Init the subset_list to NULL, we will set it later
		once riscv_opts_stack is created or updated.
		(struct riscv_option_stack, riscv_opts_stack): Moved forward.
		(riscv_set_arch): Updated.
		(s_riscv_option): Support new .option arch directive, to add, remove
		or update subsets for the specific code region.
		(riscv_write_out_attrs): Updated.
		* doc/c-riscv.texi: Added document for new .option arch directive.
		* testsuite/gas/riscv/option-arch-01a.d: New testcase.
		* testsuite/gas/riscv/option-arch-01b.d: Likewise.
		* testsuite/gas/riscv/option-arch-01.s: Likewise..
		* testsuite/gas/riscv/option-arch-02.d: Likewise.
		* testsuite/gas/riscv/option-arch-02.s: Likewise.
		* testsuite/gas/riscv/option-arch-fail.d: Likewise.
		* testsuite/gas/riscv/option-arch-fail.l: Likewise.
		* testsuite/gas/riscv/option-arch-fail.s: Likewise.

2021-11-19  Alan Modra  <amodra@gmail.com>

	Re: Add multibyte character warning option to the assembler.
	On hppa*-hp-hpux* run_dump_test edits the test file, adjusting .comm
	directives to suit those target's unusual syntax.  Thus gas is passed
	a temporary file name.

		* testsuite/gas/all/multibyte1.l: Ignore file name.

2021-11-19  Mike Frysinger  <vapier@gentoo.org>

	sim: install various doc files

2021-11-19  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: Support STO_RISCV_VARIANT_CC and DT_RISCV_VARIANT_CC.
	This is the original discussion,
	https://github.com/riscv/riscv-elf-psabi-doc/pull/190

	And here is the glibc part,
	https://sourceware.org/pipermail/libc-alpha/2021-August/129931.html

	For binutils part, we need to support a new direcitve: .variant_cc.
	The function symbol marked by .variant_cc means it need to be resolved
	directly without resolver for dynamic linker.  We also add a new dynamic
	entry, STO_RISCV_VARIANT_CC, to indicate there are symbols with the
	special attribute in the dynamic symbol table of the object.

	I heard that llvm already have supported this in their mainline, so
	I think it's time to commit this.

	bfd/
		* elfnn-riscv.c (riscv_elf_link_hash_table): Added variant_cc
		flag. It is used to check if relocations for variant CC symbols
		may be present.
		(allocate_dynrelocs): If the symbol has STO_RISCV_VARIANT_CC
		flag, then raise the variant_cc flag of riscv_elf_link_hash_table.
		(riscv_elf_size_dynamic_sections): Added dynamic entry for
		variant_cc.
		(riscv_elf_merge_symbol_attribute): New function, used to merge
		non-visibility st_other attributes, including STO_RISCV_VARIANT_CC.
	binutils/
		* readelf.c (get_riscv_dynamic_type): New function.
		(get_dynamic_type): Called get_riscv_dynamic_type for riscv targets.
		(get_riscv_symbol_other): New function.
		(get_symbol_other): Called get_riscv_symbol_other for riscv targets.
	gas/
		* config/tc-riscv.c (s_variant_cc): Marked symbol that it follows a
		variant CC convention.
		(riscv_elf_copy_symbol_attributes): Same as elf_copy_symbol_attributes,
		but without copying st_other.  If a function symbol has special st_other
		value set via directives, then attaching an IFUNC resolver to that symbol
		should not override the st_other setting.
		(riscv_pseudo_table): Support variant_cc diretive.
		* config/tc-riscv.h (OBJ_COPY_SYMBOL_ATTRIBUTES): Defined.
		* testsuite/gas/riscv/variant_cc-set.d: New testcase.
		* testsuite/gas/riscv/variant_cc-set.s: Likewise.
		* testsuite/gas/riscv/variant_cc.d: Likewise.
		* testsuite/gas/riscv/variant_cc.s: Likewise.
	include/
		* elf/riscv.h (DT_RISCV_VARIANT_CC): Defined to (DT_LOPROC + 1).
		(STO_RISCV_VARIANT_CC): Defined to 0x80.
	ld/
		* testsuite/ld-riscv-elf/variant_cc-1.s: New testcase.
		* testsuite/ld-riscv-elf/variant_cc-2.s: Likewise.
		* testsuite/ld-riscv-elf/variant_cc-now.d: Likewise.
		* testsuite/ld-riscv-elf/variant_cc-r.d: Likewise.
		* testsuite/ld-riscv-elf/variant_cc-shared.d: Likewise.
		* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Updated.

2021-11-19  Mike Frysinger  <vapier@gentoo.org>

	sim: use program_transform_name for libsim
	Instead of always using target_alias as a prefix on the name, use
	program_transform_name instead so that the library is scoped in the
	same way as the run program.

	sim: avoid installing headers when there is no sim
	If we aren't building any sims, don't install the sim headers as they
	won't be useful to anyone.

2021-11-19  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-18  Kevin Buettner  <kevinb@redhat.com>

	dprintf-execution-x-script.exp: Adjust test for native-extended-gdbserver
	Without this commit, doing...

	make check RUNTESTFLAGS="--target_board=native-extended-gdbserver" \
	           TESTS="gdb.base/dprintf-execution-x-script.exp"

	...will show one failure.

	Here's a snippet from gdb.log showing the circumstances - I've trimmed
	the paths for readability:

	builtin_spawn gdb -nw -nx -data-directory data-directory -iex set height 0 -iex set width 0 -iex set auto-connect-native-target off -iex set sysroot -ex set height unlimited -x testsuite/gdb.base/dprintf-execution-x-script.gdb --args testsuite/outputs/gdb.base/dprintf-execution-x-script/dprintf-execution-x-script
	...
	Reading symbols from testsuite/outputs/gdb.base/dprintf-execution-x-script/dprintf-execution-x-script...
	Dprintf 1 at 0x40116e: file testsuite/gdb.base/dprintf-execution-x-script.c, line 38.
	Breakpoint 2 at 0x40113a: file testsuite/gdb.base/dprintf-execution-x-script.c, line 26.
	testsuite/gdb.base/dprintf-execution-x-script.gdb:21: Error in sourced command file:
	Don't know how to run.  Try "help target".
	(gdb) FAIL: gdb.base/dprintf-execution-x-script.exp: load and run script with -x
	...
	GNU gdb (GDB) 12.0.50.20211118-git
	Copyright (C) 2021 Free Software Foundation, Inc.
	...
	(gdb) set height 0
	(gdb) set width 0
	(gdb) builtin_spawn gdbserver/gdbserver --once --multi localhost:2346
	Listening on port 2346
	target extended-remote localhost:2346
	Remote debugging using localhost:2346
	...
	[Tests after this point will pass.]

	Note that the command which spawns gdb prevents the gdb script from
	using the native target via "-iex set auto-connect-native-target off".

	Moreover, the script in question contains a "run" command, so GDB
	doesn't know how to run (since it's prevented from using the native
	target and no alternate "target" command has been issued.  But, once
	GDB finishes starting up, the test will spawn a gdbserver and then
	connect to it.  The other (two) tests after this point both pass.

	I've fixed this by using gdb_test_multiple instead of gdb_test.
	When a "Don't know how to run message" is received, the test is
	unsupported.

	I've also added a comment explaining the reason for needing to check
	for "Don't know how to run" despite bailing out at the top of the test
	via:

	  if ![target_can_use_run_cmd] {
	      return 0
	  }

2021-11-18  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: fix array-view-selftests.c build with g++ 4.8
	When building with g++ 4.8, I get:

	    CXX    unittests/array-view-selftests.o
	  /home/smarchi/src/binutils-gdb/gdb/unittests/array-view-selftests.c:123:42: error: expected 'class' before 'Container'
	   template<template<typename ...> typename Container>
						    ^

	I am no C++ template expert, but it looks like if I change "typename" for
	"class", as the compiler kind of suggests, the code compiles.

	Change-Id: I9c3edd29fb2b190069f0ce0dbf3bc3604d175f48

2021-11-18  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: fix ia64-tdep.c build with g++ 4.8
	When building with g++ 4.8, I get:

	      CXX    ia64-tdep.o
	    /home/smarchi/src/binutils-gdb/gdb/ia64-tdep.c:3862:1: error: could not convert '{ia64_allocate_new_rse_frame, ia64_store_argument_in_slot, ia64_set_function_addr}' from '<brace
	-enclosed initializer list>' to 'const ia64_infcall_ops'
	     };
	     ^

	This happens since commit 345bd07cce3 ("gdb: fix gdbarch_tdep ODR
	violation"), which added default values for ia64_infcall_ops fields.  It
	looks like g++ 4.8 doesn't like initializing the ia64_infcall_ops object
	using the brace-enclosed initializer list when the ia64_infcall_ops
	fields are assigned default values.

	Later compilers don't have a problem with that, so I suppose that the
	code is correct, but still, change it to make gcc 4.8 happy.  Don't
	initialize the fields of ia64_infcall_ops directly, instead
	default-initialize ia64_gdbarch_tdep::infcall_ops.

	Change-Id: I35e3a61abd7b7bbcafe6cb207078c738c5266d76

2021-11-18  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: move AIX_TEXT_SEGMENT_BASE to rs6000-aix-tdep.c, remove rs6000-tdep.h
	The contents of rs6000-tdep.h (AIX_TEXT_SEGMENT_BASE) is AIX-specific,
	so I thought that this file should be named rs6000-aix-tdep.h.  But
	there's already a rs6000-aix-tdep.h, so then I though
	AIX_TEXT_SEGMENT_BASE should simply be moved there, and rs6000-tdep.h
	deleted.  But then I realized that AIX_TEXT_SEGMENT_BASE is only used in
	rs6000-aix-tdep.c, so move it to the beginning of that file.

	Change-Id: Ia212c6fae202f31aedb46575821cd642beeda7a3

2021-11-18  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: rename rs6000-nat.c to rs6000-aix-nat.c
	This file seems to be AIX-specific, according to its contents and
	configure.nat.  Rename it to rs6000-aix-nat.c, to make that clear (and
	to follow the convention).

	Change-Id: Ib418dddc6b79b2e28f64431121742b5e87f5f4f5

2021-11-18  Tom de Vries  <tdevries@suse.de>

	[gdb/doc] Fix negative repeat count examining memory example
	The documentation for the examining memory command x contains an example:
	...
	You can also specify a negative repeat count to examine memory backward from
	the given address.  For example, 'x/-3uh 0x54320' prints three halfwords (h)
	at 0x54314, 0x54328, and 0x5431c.
	...

	The 0x54328 looks like a typo, which was intended to be 0x54318.

	But the series uses a 4-byte distance, while the halfword size used in the
	command means a 2-byte distance, so the series should be:
	...
	0x5431a, 0x5431c, and 0x5431e.
	...

	Fix this by updating the addresses in the example accordingly.

	Reported here ( https://sourceware.org/pipermail/gdb/2021-November/049784.html
	).

2021-11-18  Nick Clifton  <nickc@redhat.com>

	Add multibyte character warning option to the assembler.
		* as.c (parse_args): Add support for --multibyte-handling.
		* as.h (multibyte_handling): Declare.
		* app.c (scan_for_multibyte_characters): New function.
		(do_scrub_chars): Call the new function if multibyte warning is
		enabled.
		* input-scrub,c (input_scrub_next_buffer): Call the multibyte
		scanning function if multibyte warnings are enabled.
		* symbols.c (struct symbol_flags): Add multibyte_warned bit.
		(symbol_init): Call the multibyte scanning function if multibyte
		symbol warnings are enabled.
		(S_SET_SEGMENT): Likewise.
		* NEWS: Mention the new feature.
		* doc/as.texi: Document the new feature.
		* testsuite/gas/all/multibyte.s: New test source file.
		* testsuite/gas/all/multibyte1.d: New test driver file.
		* testsuite/gas/all/multibyte1.l: New test expected output.
		* testsuite/gas/all/multibyte2.d: New test driver file.
		* testsuite/gas/all/multibyte2.l: New test expected output.
		* testsuite/gas/all/gas.exp: Run the new tests.

2021-11-18  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: include gdbarch.h in all files extending gdbarch_tdep
	Commit 345bd07cce33 ("gdb: fix gdbarch_tdep ODR violation") made a bunch
	of files define a *_gdbarch_tdep class that inherits from a gdbarch_tdep
	base.  But some of these files don't include gdbarch.h, where
	gdbarch_tdep is defined.  This may cause build errors if gdbarch.h isn't
	already included by chance by some other header file.  Avoid this by
	making them include gdbarch.h.

	Change-Id: If433d302007e274daa4f656cfc94f769cf1aa68a

2021-11-18  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbsupport: make gdb_assert_not_reached accept a format string
	Change gdb_assert_not_reached to accept a format string plus
	corresponding arguments.  This allows giving more precise messages.

	Because the format string passed by the caller is prepended with a "%s:"
	to add the function name, the callers can no longer pass a translated
	string (`_(...)`).  Make the gdb_assert_not_reached include the _(),
	just like the gdb_assert_fail macro just above.

	Change-Id: Id0cfda5a57979df6cdaacaba0d55dd91ae9efee7

2021-11-18  Carl Love  <cel@us.ibm.com>

	gdb fix for catch-syscall.exp
	Remove check_continue "execve" from Proc test_catch_syscall_execve.

	The check_continue proceedure checs that the command, execve, starts and
	checks for the return from the command.  The execve command starts a new
	program and thus the return from the command causing the test to fail.

	The call to proc check_continue "execve" is removed and replaced with
	just the call to check_call_to_syscall "execve" to verify the command
	executed.  The next test in proc test_catch_syscall_execve verifies that
	the new program started and hit the break point in main.

	Update the check for the PowerPC architecture.  Power Little Endian systems
	include "le" in the name.  The istarget "power64-*-linux*" check fails to
	match LE sytems.  The expected string is updated to capture both Big Endian
	and Little Endian systems.  Power 10 LE istarget prints as:
	powerpc64le-unknown-linux-gnu.

	This patch fixes three failures and the error:

	    ERROR: can't read "arch1": no such variable

	Patch tested on Power 10 ppc64le GNU/Linux platform.

2021-11-18  Carl Love  <cel@us.ibm.com>

	gdb: PowerPC fix gdb.base/break-interp.exp
	This patch fixes eight test failures on PowerPC for the test
	gdb.base/break-interp.exp. The patch adds a funtion and registers it to
	setup the displaced stepping for ppc-linux platform.  The patch moves the
	struct ppc_inferior_data to the ppc-tdep.h include file to make it visible
	to the ppc-linux-tdep.c and rs6000-tdep.c files.  Additionally the function
	get_ppc_per_inferior is made external in ppc-tdep.h to make it visible in
	both files.

	Tested on Power 10 ppc64le-linux with no regressions.

2021-11-18  Carl Love  <cel@us.ibm.com>

	gdb fix PowerPC test gdb.arch/ppc-longdouble.exp
	The test complains of duplicate tests.

	DUPLICATE: gdb.arch/ppc-longdouble.exp: continue to breakpoint: return

	The do_test calls gdb_continue_to_breakpoint "return".  The duplicates
	are the result of calling do_test three times with different arguments.

	This patch fixes the duplicate tests by adding $name to the
	gdb_continue_to_breakpoint argument.

	Patch tested on Power 10  ppc64le GNU/Linux, no duplicate tests reported,
	no new regression errors.

2021-11-18  H.J. Lu  <hjl.tools@gmail.com>

	elf/x86: Issue an error on discarded output .plt section
	Issue an error, instead of crash, on discarded output .plt section.

	bfd/

		PR ld/28597
		* elf32-i386.c (elf_i386_finish_dynamic_sections): Issue an error
		on discarded output .plt section.
		* elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Likewise.

	ld/

		PR ld/28597
		* testsuite/ld-elf/pr28597.d: New file.
		* testsuite/ld-elf/pr28597.s: Likewise.
		* testsuite/ld-elf/pr28597.t: Likewise.

2021-11-18  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add missing wait in gdb.base/signals-state-child.exp
	On OBS I ran into:
	...
	(gdb) shell diff -s outputs/gdb.base/signals-state-child/standalone.txt \
	  outputs/gdb.base/signals-state-child/gdb.txt^M
	diff: outputs/gdb.base/signals-state-child/standalone.txt: \
	  No such file or directory^M
	(gdb) FAIL: gdb.base/signals-state-child.exp: signals states are identical
	...

	I managed to reproduce this by adding "sleep (5)" at the start of main in
	signals-state-child.c.

	Fix this by waiting on the result of the spawned command.

	Tested on x86_64-linux.

2021-11-18  Alan Modra  <amodra@gmail.com>

	Re: Don't compile some opcodes files when bfd is 32-bit only
	Put bpf back in the 32-bit targets, even though bpf requires a 64-bit
	bfd.  bpf sim support apparently works without being 64-bit.

		* Makefile.am (TARGET64_LIBOPCODES_CFILES): Move bpf files..
		(TARGET32_LIBOPCODES_CFILES): ..to here.
		* Makefile.in: Regenerate.

2021-11-18  Alan Modra  <amodra@gmail.com>

	Pass DEBUGINFOD_CFLAGS when compiling dwarf.c
	Pick up the elfutils/debuginfod.h install location -I flags from
	a variable set by debuginfod.m4 (via pkg.m4 and pkg-config).

		* Makefile.am (DEBUGINFOD_CFLAGS): Define.
		(dwarf.@OBJECT@): New rule.

2021-11-18  jiawei  <jiawei@iscas.ac.cn>

	RISC-V: Add testcases for z[fdq]inx
	Use gpr when the zfinx enable, the testcases contain float
	instructions that reuse by z[fdq]inx.

	gas/ChangeLog:

	* testsuite/gas/riscv/zdinx.d: New test.
	* testsuite/gas/riscv/zdinx.s: New test.
	* testsuite/gas/riscv/zfinx.d: New test.
	* testsuite/gas/riscv/zfinx.s: New test.
	* testsuite/gas/riscv/zqinx.d: New test.
	* testsuite/gas/riscv/zqinx.s: New test.

	Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>

2021-11-18  jiawei  <jiawei@iscas.ac.cn>

	RISC-V: Add instructions and operand set for z[fdq]inx
	Reuse float instructions in INSN_CLASS_F/D/Q, use riscv_subset_supports to
	verify if z*inx enabled and use gpr instead of fpr when z*inx is enable.

	bfd/ChangeLog:

	* elfxx-riscv.c (riscv_multi_subset_supports): Added support for
	  z*inx extension.

	gas/ChangeLog:

	* config/tc-riscv.c (riscv_ip): Added register choice for z*inx.

	include/ChangeLog:

	* opcode/riscv.h (enum riscv_insn_class): Reused INSN_CLASS_* for z*inx.

	opcodes/ChangeLog:

	* riscv-dis.c (riscv_disassemble_insn): Added disassemble check for
	  z*inx.
	* riscv-opc.c: Reused INSN_CLASS_* for z*inx.

	Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>

2021-11-18  jiawei  <jiawei@iscas.ac.cn>

	RISC-V: Add mininal support for z[fdq]inx
	Minimal support for zfinx, zdinx, zqinx. Like f/d/q, the zqinx
	imply zdinx and zdinx imply zfinx, where zfinx are not compatible
	with f/d/q.

	bfd/ChangeLog:

	* elfxx-riscv.c (riscv_implicit_subsets): Added implicit rules
	for z*inx extensions.
	(riscv_supported_std_z_ext): Added entries for z*inx.
	(riscv_parse_check_conflicts): Added conflict check for z*inx.

	Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>

2021-11-18  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-17  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	aarch64: [SME] SVE2 instructions added to support SME
	This patch is adding new SVE2 instructions added to support SME extension.
	The following SVE2 instructions are added by the SME architecture:
	* PSEL,
	* REVD, SCLAMP and UCLAMP.

	gas/ChangeLog:

		* config/tc-aarch64.c (parse_sme_pred_reg_with_index):
		New parser.
		(parse_operands): New parser.
		* testsuite/gas/aarch64/sme-9-illegal.d: New test.
		* testsuite/gas/aarch64/sme-9-illegal.l: New test.
		* testsuite/gas/aarch64/sme-9-illegal.s: New test.
		* testsuite/gas/aarch64/sme-9.d: New test.
		* testsuite/gas/aarch64/sme-9.s: New test.

	include/ChangeLog:

		* opcode/aarch64.h (enum aarch64_opnd): New operand
		AARCH64_OPND_SME_PnT_Wm_imm.

	opcodes/ChangeLog:

		* aarch64-asm.c (aarch64_ins_sme_pred_reg_with_index):
		New inserter.
		* aarch64-dis.c (aarch64_ext_sme_pred_reg_with_index):
		New extractor.
		* aarch64-opc.c (aarch64_print_operand): Printout of
		OPND_SME_PnT_Wm_imm.
		* aarch64-opc.h (enum aarch64_field_kind): New bitfields
		FLD_SME_Rm, FLD_SME_i1, FLD_SME_tszh, FLD_SME_tszl.
		* aarch64-tbl.h (OP_SVE_NN_BHSD): New qualifier.
		(OP_SVE_QMQ): New qualifier.
		(struct aarch64_opcode): New instructions PSEL, REVD,
		SCLAMP and UCLAMP.
		aarch64-asm-2.c: Regenerate.
		aarch64-dis-2.c: Regenerate.
		aarch64-opc-2.c: Regenerate.

2021-11-17  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	aarch64: [SME] Add new SME system registers
	This patch is adding miscellaneous SME related system registers.

	gas/ChangeLog:

		* testsuite/gas/aarch64/sme-sysreg.d: New test.
		* testsuite/gas/aarch64/sme-sysreg.s: New test.
		* testsuite/gas/aarch64/sme-sysreg-illegal.d: New test.
		* testsuite/gas/aarch64/sme-sysreg-illegal.l: New test.
		* testsuite/gas/aarch64/sme-sysreg-illegal.s: New test.

	opcodes/ChangeLog:

		* aarch64-opc.c: New system registers id_aa64smfr0_el1,
		smcr_el1, smcr_el12, smcr_el2, smcr_el3, smpri_el1,
		smprimap_el2, smidr_el1, tpidr2_el0 and mpamsm_el1.

2021-11-17  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	aarch64: [SME] Add SME mode selection and state access instructions
	This patch is adding new SME mode selection and state access instructions:
	* Add SMSTART and SMSTOP instructions.
	* Add SVCR system register.

	gas/ChangeLog:

		* config/tc-aarch64.c (parse_sme_sm_za): New parser.
		(parse_operands): New parser.
		* testsuite/gas/aarch64/sme-8-illegal.d: New test.
		* testsuite/gas/aarch64/sme-8-illegal.l: New test.
		* testsuite/gas/aarch64/sme-8-illegal.s: New test.
		* testsuite/gas/aarch64/sme-8.d: New test.
		* testsuite/gas/aarch64/sme-8.s: New test.

	include/ChangeLog:

		* opcode/aarch64.h (enum aarch64_opnd): New operand
		AARCH64_OPND_SME_SM_ZA.
		(enum aarch64_insn_class): New instruction classes
		sme_start and sme_stop.

	opcodes/ChangeLog:

		* aarch64-asm.c (aarch64_ins_pstatefield): New inserter.
		(aarch64_ins_sme_sm_za): New inserter.
		* aarch64-dis.c (aarch64_ext_imm): New extractor.
		(aarch64_ext_pstatefield): New extractor.
		(aarch64_ext_sme_sm_za): New extractor.
		* aarch64-opc.c (operand_general_constraint_met_p):
		New pstatefield value for SME instructions.
		(aarch64_print_operand): Printout for OPND_SME_SM_ZA.
		(SR_SME): New register SVCR.
		* aarch64-opc.h (F_REG_IN_CRM): New register endcoding.
		* aarch64-opc.h (F_IMM_IN_CRM): New immediate endcoding.
		(PSTATE_ENCODE_CRM): Encode CRm field.
		(PSTATE_DECODE_CRM): Decode CRm field.
		(PSTATE_ENCODE_CRM_IMM): Encode CRm immediate field.
		(PSTATE_DECODE_CRM_IMM): Decode CRm immediate field.
		(PSTATE_ENCODE_CRM_AND_IMM): Encode CRm and immediate
		field.
		* aarch64-tbl.h (struct aarch64_opcode): New SMSTART
		and SMSTOP instructions.
		aarch64-asm-2.c: Regenerate.
		aarch64-dis-2.c: Regenerate.
		aarch64-opc-2.c: Regenerate.

2021-11-17  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	aarch64: [SME] Add LD1x, ST1x, LDR and STR instructions
	This patch is adding new loads and stores defined by SME instructions.

	gas/ChangeLog:

		* config/tc-aarch64.c (parse_sme_address): New parser.
		(parse_sme_za_hv_tiles_operand_with_braces): New parser.
		(parse_sme_za_array): New parser.
		(output_operand_error_record): Print error details if
		present.
		(parse_operands): Support new operands.
		* testsuite/gas/aarch64/sme-5-illegal.d: New test.
		* testsuite/gas/aarch64/sme-5-illegal.l: New test.
		* testsuite/gas/aarch64/sme-5-illegal.s: New test.
		* testsuite/gas/aarch64/sme-5.d: New test.
		* testsuite/gas/aarch64/sme-5.s: New test.
		* testsuite/gas/aarch64/sme-6-illegal.d: New test.
		* testsuite/gas/aarch64/sme-6-illegal.l: New test.
		* testsuite/gas/aarch64/sme-6-illegal.s: New test.
		* testsuite/gas/aarch64/sme-6.d: New test.
		* testsuite/gas/aarch64/sme-6.s: New test.
		* testsuite/gas/aarch64/sme-7-illegal.d: New test.
		* testsuite/gas/aarch64/sme-7-illegal.l: New test.
		* testsuite/gas/aarch64/sme-7-illegal.s: New test.
		* testsuite/gas/aarch64/sme-7.d: New test.
		* testsuite/gas/aarch64/sme-7.s: New test.

	include/ChangeLog:

		* opcode/aarch64.h (enum aarch64_opnd): New operands.
		(enum aarch64_insn_class): Added sme_ldr and sme_str.
		(AARCH64_OPDE_UNTIED_IMMS): New operand error kind.

	opcodes/ChangeLog:

		* aarch64-asm.c (aarch64_ins_sme_za_hv_tiles): New inserter.
		(aarch64_ins_sme_za_list): New inserter.
		(aarch64_ins_sme_za_array): New inserter.
		(aarch64_ins_sme_addr_ri_u4xvl): New inserter.
		* aarch64-asm.h (AARCH64_DECL_OPD_INSERTER): Added
		ins_sme_za_list, ins_sme_za_array and ins_sme_addr_ri_u4xvl.
		* aarch64-dis.c (aarch64_ext_sme_za_hv_tiles): New extractor.
		(aarch64_ext_sme_za_list): New extractor.
		(aarch64_ext_sme_za_array): New extractor.
		(aarch64_ext_sme_addr_ri_u4xvl): New extractor.
		* aarch64-dis.h (AARCH64_DECL_OPD_EXTRACTOR): Added
		ext_sme_za_list, ext_sme_za_array and ext_sme_addr_ri_u4xvl.
		* aarch64-opc.c (operand_general_constraint_met_p):
		(aarch64_match_operands_constraint): Handle sme_ldr, sme_str
		and sme_misc.
		(aarch64_print_operand): New operands supported.
		* aarch64-tbl.h (OP_SVE_QUU): New qualifier.
		(OP_SVE_QZU): New qualifier.
		aarch64-asm-2.c: Regenerate.
		aarch64-dis-2.c: Regenerate.
		aarch64-opc-2.c: Regenerate.

2021-11-17  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	aarch64: [SME] Add ZERO instruction
	This patch is adding ZERO (a list of 64-bit element ZA tiles)
	instruction.

	gas/ChangeLog:

		* config/tc-aarch64.c (parse_sme_list_of_64bit_tiles):
		New parser.
		(parse_operands): Handle OPND_SME_list_of_64bit_tiles.
		* testsuite/gas/aarch64/sme-4-illegal.d: New test.
		* testsuite/gas/aarch64/sme-4-illegal.l: New test.
		* testsuite/gas/aarch64/sme-4-illegal.s: New test.
		* testsuite/gas/aarch64/sme-4.d: New test.
		* testsuite/gas/aarch64/sme-4.s: New test.

	include/ChangeLog:

		* opcode/aarch64.h (enum aarch64_opnd): New operand
		AARCH64_OPND_SME_list_of_64bit_tiles.

	opcodes/ChangeLog:

		* aarch64-opc.c (print_sme_za_list): New printing function.
		(aarch64_print_operand): Handle OPND_SME_list_of_64bit_tiles.
		* aarch64-opc.h (enum aarch64_field_kind): New bitfield
		FLD_SME_zero_mask.
		* aarch64-tbl.h (struct aarch64_opcode): New ZERO instruction.
		aarch64-asm-2.c: Regenerate.
		aarch64-dis-2.c: Regenerate.
		aarch64-opc-2.c: Regenerate.

2021-11-17  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	aarch64: [SME] Add MOV and MOVA instructions
	This patch is adding new MOV (alias) and MOVA SME instruction.

	gas/ChangeLog:

		* config/tc-aarch64.c (enum sme_hv_slice): new enum.
		(struct reloc_entry): Added ZAH and ZAV registers.
		(parse_sme_immediate): Immediate parser.
		(parse_sme_za_hv_tiles_operand): ZA tile parser.
		(parse_sme_za_hv_tiles_operand_index): Index parser.
		(parse_operands): Added ZA tile parser calls.
		(REGNUMS): New macro. Regs with suffix.
		(REGSET16S): New macro. 16 regs with suffix.
		* testsuite/gas/aarch64/sme-2-illegal.d: New test.
		* testsuite/gas/aarch64/sme-2-illegal.l: New test.
		* testsuite/gas/aarch64/sme-2-illegal.s: New test.
		* testsuite/gas/aarch64/sme-2.d: New test.
		* testsuite/gas/aarch64/sme-2.s: New test.
		* testsuite/gas/aarch64/sme-2a.d: New test.
		* testsuite/gas/aarch64/sme-2a.s: New test.
		* testsuite/gas/aarch64/sme-3-illegal.d: New test.
		* testsuite/gas/aarch64/sme-3-illegal.l: New test.
		* testsuite/gas/aarch64/sme-3-illegal.s: New test.
		* testsuite/gas/aarch64/sme-3.d: New test.
		* testsuite/gas/aarch64/sme-3.s: New test.
		* testsuite/gas/aarch64/sme-3a.d: New test.
		* testsuite/gas/aarch64/sme-3a.s: New test.

	include/ChangeLog:

		* opcode/aarch64.h (enum aarch64_opnd): New enums
		AARCH64_OPND_SME_ZA_HV_idx_src and
		AARCH64_OPND_SME_ZA_HV_idx_dest.
		(struct aarch64_opnd_info): New ZA tile vector struct.

	opcodes/ChangeLog:

		* aarch64-asm.c (aarch64_ins_sme_za_hv_tiles):
		New inserter.
		* aarch64-asm.h (AARCH64_DECL_OPD_INSERTER):
		New inserter ins_sme_za_hv_tiles.
		* aarch64-dis.c (aarch64_ext_sme_za_hv_tiles):
		New extractor.
		* aarch64-dis.h (AARCH64_DECL_OPD_EXTRACTOR):
		New extractor ext_sme_za_hv_tiles.
		* aarch64-opc.c (aarch64_print_operand):
		Handle SME_ZA_HV_idx_src and SME_ZA_HV_idx_dest.
		* aarch64-opc.h (enum aarch64_field_kind): New enums
		FLD_SME_size_10, FLD_SME_Q, FLD_SME_V and FLD_SME_Rv.
		(struct aarch64_operand): Increase fields size to 5.
		* aarch64-tbl.h (OP_SME_BHSDQ_PM_BHSDQ): New qualifiers
		aarch64-asm-2.c: Regenerate.
		aarch64-dis-2.c: Regenerate.
		aarch64-opc-2.c: Regenerate.

2021-11-17  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	aarch64: [SME] Add SME instructions
	Patch is adding new SME matrix instructions. Please note additional
	instructions will be added in following patches.

	gas/ChangeLog:

		* config/tc-aarch64.c (parse_sme_zada_operand):
		New parser.
		* config/tc-aarch64.c (parse_reg_with_qual):
		New reg parser.
		* config/tc-aarch64.c (R_ZA): New egister type.
		(parse_operands): New parser.
		* testsuite/gas/aarch64/sme-illegal.d: New test.
		* testsuite/gas/aarch64/sme-illegal.l: New test.
		* testsuite/gas/aarch64/sme-illegal.s: New test.
		* testsuite/gas/aarch64/sme.d: New test.
		* testsuite/gas/aarch64/sme.s: New test.
		* testsuite/gas/aarch64/sme-f64.d: New test.
		* testsuite/gas/aarch64/sme-f64.s: New test.
		* testsuite/gas/aarch64/sme-i64.d: New test.
		* testsuite/gas/aarch64/sme-i64.s: New test.

	include/ChangeLog:

		* opcode/aarch64.h (enum aarch64_opnd): New operands
		AARCH64_OPND_SME_ZAda_2b, AARCH64_OPND_SME_ZAda_3b and
		AARCH64_OPND_SME_Pm.
		(enum aarch64_insn_class): New instruction class sme_misc.

	opcodes/ChangeLog:

		* aarch64-opc.c (aarch64_print_operand):
		Print OPND_SME_ZAda_2b and OPND_SME_ZAda_3b operands.
		(verify_constraints): Handle OPND_SME_Pm.
		* aarch64-opc.h (enum aarch64_field_kind):
		New bit fields FLD_SME_ZAda_2b, FLD_SME_ZAda_3b and FLD_SME_Pm.
		* aarch64-tbl.h (OP_SME_ZADA_PN_PM_ZN_S): New qualifier set.
		(OP_SME_ZADA_PN_PM_ZN_D): New qualifier.
		(OP_SME_ZADA_PN_PM_ZN_ZM): New qualifier.
		(OP_SME_ZADA_S_PM_PM_S_S): New qualifier.
		(OP_SME_ZADA_D_PM_PM_D_D): New qualifier.
		(OP_SME_ZADA_S_PM_PM_H_H): New qualifier.
		(OP_SME_ZADA_S_PM_PM_B_B): New qualifier.
		(OP_SME_ZADA_D_PM_PM_H_H): New qualifier.
		(SME_INSN): New instruction macro.
		(SME_F64_INSN): New instruction macro.
		(SME_I64_INSN): New instruction macro.
		(SME_INSNC): New instruction macro.
		(struct aarch64_opcode): New SME instructions.
		aarch64-asm-2.c: Regenerate.
		aarch64-dis-2.c: Regenerate.
		aarch64-opc-2.c: Regenerate.

2021-11-17  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	aarch64: [SME] Add +sme option to -march
	This series of patches (tagged [SME]) add support for the Scalable
	Matrix Extension. Patch introduces new command line options: +sme, +sme-f64 and
	+sme-i64 to -march command line options.

	gas/ChangeLog:

		* NEWS: Updated docs.
		* config/tc-aarch64.c: New SME command line options.
		* doc/c-aarch64.texi: Update docs.

	include/ChangeLog:

		* opcode/aarch64.h (AARCH64_FEATURE_SME): New flag.
		(AARCH64_FEATURE_SME_F64): New flag.
		(AARCH64_FEATURE_SME_I64): New flag.

	opcodes/ChangeLog:

		* aarch64-tbl.h (SME): New feature object.

2021-11-17  Jeremy Drake  <cygwin@jdrake.com>

	Set the default DLL chracteristics to 0 for Cygwin based targets.
		* emultempl/pep.em (DEFAULT_DLL_CHARACTERISTICS): Set to 0 for
		Cygwin targets.
		* emultempl/pep.em (DEFAULT_DLL_CHARACTERISTICS): Likewise.

2021-11-17  Nick Clifton  <nickc@redhat.com>

	Fix the linker script parser so that it will recognise the PT_GNU_RELRO segment type, and the linker itself so that it will gracefully handle being unable to assign any sections to such a segment.
		PR 28452
	bfd	* elf.c (assign_file_positions_for_non_load_sections): Replace
		assertion with a warning message.

	ld	* ldgram.y: Add support for PT_GNU_RELRO and PT_GNU_PROPERTY.
		* ldgram.c: Regenerate.

2021-11-17  Andreas Arnez  <arnez@linux.ibm.com>

	[gdb/build, s390x] Fix build after gdbarch_tdep changes
	Commit 345bd07cce33 ("gdb: fix gdbarch_tdep ODR violation") changes a
	declaration in s390-tdep.h from

	   struct gdbarch_tdep { ... };

	to

	   struct s390_gdbarch_tdep : gdbarch_tdep { ... };

	and now requires that gdbarch_tdep has been declared before.  Which is
	usually the case, except when compiling s390-linux-nat.c, where
	s390-tdep.h is included before gdbarch.h.  Thus the s390x build errors out
	with the compiler complaining about a missing class name after the colon.

	Fix this in s390-linux-nat.c, by including gdbarch.h before s390-tdep.h.

2021-11-17  Luis Machado  <luis.machado@linaro.org>

	Expose the BTI BTYPE more explicitly in the registers
	Augment the register description XML to expose the BTI BTYPE field contained
	in the CPSR register. It will be displayed like so:

	cpsr           0x60001000          [ EL=0 BTYPE=0 SSBS C Z ]

2021-11-17  H.J. Lu  <hjl.tools@gmail.com>

	elfedit: Add --output-abiversion option to update ABIVERSION
		* NEWS: Mention --output-abiversion.
		* elfedit.c (input_elf_abiversion): New.
		(output_elf_abiversion): Likewise.
		(update_elf_header): Update EI_ABIVERSION.
		(command_line_switch): Add OPTION_INPUT_ABIVERSION and
		OPTION_OUTPUT_ABIVERSION.
		(options): Add --input-abiversion and --output-abiversion.
		(usage): Likewise.
		(main): Handle --input-abiversion and --output-abiversion.
		* doc/binutils.texi: Document --input-abiversion and
		--output-abiversion.
		* testsuite/binutils-all/elfedit.exp: Run elfedit-6.
		* testsuite/binutils-all/elfedit-6.d: New file.

2021-11-17  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: Support rvv extension with released version 1.0.
	2021-11-17  Jim Wilson  <jimw@sifive.com>
	            Kito Cheng  <kito.cheng@sifive.com>
	            Nelson Chu  <nelson.chu@sifive.com>

	This patch is porting from the following riscv github,
	https://github.com/riscv/riscv-binutils-gdb/tree/rvv-1.0.x

	And here is the vector spec,
	https://github.com/riscv/riscv-v-spec

	bfd/
		* elfxx-riscv.c (riscv_implicit_subsets): Added imply rules
		of v, zve and zvl extensions.
		(riscv_supported_std_ext): Updated verison of v to  1.0.
		(riscv_supported_std_z_ext): Added zve and zvl extensions.
		(riscv_parse_check_conflicts): The zvl extensions need to
		enable either v or zve extension.
		(riscv_multi_subset_supports): Check the subset list to know
		if the INSN_CLASS_V and INSN_CLASS_ZVEF instructions are supported.
	gas/
		* config/tc-riscv.c (enum riscv_csr_class): Added CSR_CLASS_V.
		(enum reg_class): Added RCLASS_VECR and RCLASS_VECM.
		(validate_riscv_insn): Check whether the rvv operands are valid.
		(md_begin): Initialize register hash for rvv registers.
		(macro_build): Added rvv operands when expanding rvv pseudoes.
		(vector_macro): Expand rvv macros into one or more instructions.
		(macro): Likewise.
		(my_getVsetvliExpression): Similar to my_getVsetvliExpression,
		but used for parsing vsetvli operands.
		(riscv_ip): Parse and encode rvv operands.  Besides, The rvv loads
		and stores with EEW 64 cannot be used when zve32x is enabled.
		* testsuite/gas/riscv/priv-reg-fail-version-1p10.d: Updated -march
		to rv32ifv_zkr.
		* testsuite/gas/riscv/priv-reg-fail-version-1p11.d: Likewise.
		* testsuite/gas/riscv/priv-reg-fail-version-1p9p1.d: Likewise.
		* testsuite/gas/riscv/priv-reg.s: Added rvv csr testcases.
		* testsuite/gas/riscv/priv-reg-version-1p10.d: Likewise.
		* testsuite/gas/riscv/priv-reg-version-1p11.d: Likewise.
		* testsuite/gas/riscv/priv-reg-version-1p9p1.d: Likewise.
		* testsuite/gas/riscv/march-imply-v.d: New testcase.
		* testsuite/gas/riscv/vector-insns-fail-zve32xf.d: Likewise.
		* testsuite/gas/riscv/vector-insns-fail-zve32xf.l: Likewise.
		* testsuite/gas/riscv/vector-insns-fail-zvl.d: Likewise.
		* testsuite/gas/riscv/vector-insns-fail-zvl.l: Likewise.
		* testsuite/gas/riscv/vector-insns-vmsgtvx.d: Likewise.
		* testsuite/gas/riscv/vector-insns-vmsgtvx.s: Likewise.
		* testsuite/gas/riscv/vector-insns-zero-imm.d: Likewise.
		* testsuite/gas/riscv/vector-insns-zero-imm.s: Likewise.
		* testsuite/gas/riscv/vector-insns.d: Likewise.
		* testsuite/gas/riscv/vector-insns.s: Likewise.
	include/
		* opcode/riscv-opc.h: Defined mask/match encodings and csrs for rvv.
		* opcode/riscv.h: Defined rvv immediate encodings and fields.
		(enum riscv_insn_class): Added INSN_CLASS_V and INSN_CLASS_ZVEF.
		(INSN_V_EEW64): Defined.
		(M_VMSGE, M_VMSGEU): Added for the rvv pseudoes.
	opcodes/
		* riscv-dis.c (print_insn_args): Dump the rvv operands.
		* riscv-opc.c (riscv_vecr_names_numeric): Defined rvv registers.
		(riscv_vecm_names_numeric): Likewise.
		(riscv_vsew): Likewise.
		(riscv_vlmul): Likewise.
		(riscv_vta): Likewise.
		(riscv_vma): Likewise.
		(match_vs1_eq_vs2): Added for rvv Vu operand.
		(match_vd_eq_vs1_eq_vs2): Added for rvv Vv operand.
		(riscv_opcodes): Added rvv v1.0 instructions.

2021-11-17  Sergei Trofimovich  <siarheit@google.com>

	gdb/nat/linux-osdata.c: fix build on gcc-12 (string overfow)
	On gcc-12 build fails as:

	    ../../gdbserver/../gdb/nat/linux-osdata.c: In function 'void linux_xfer_osdata_processes(buffer*)':
	    ../../gdbserver/../gdb/nat/linux-osdata.c:330:39: error:
	      '__builtin___sprintf_chk' may write a terminating nul past the end of the destination [-Werror=format-overflow=]
	      330 |                 sprintf (core_str, "%d", i);
	          |                                       ^

	It's an off-by-one case in an infeasible scenario for negative
	huge core count. The change switches to std::string for memory
	handling.

	Tested by running 'info os processes' and checking CPU cores column.

2021-11-17  Aaron Merey  <amerey@redhat.com>

	gdb: Add aliases for read_core_file_mappings callbacks
	Add aliases read_core_file_mappings_loop_ftype and
	read_core_file_mappings_pre_loop_ftype.  Intended for use with
	read_core_file_mappings.

	Also add build_id parameter to read_core_file_mappings_loop_ftype.

2021-11-17  Mike Frysinger  <vapier@gentoo.org>

	sim: testsuite: add support for $pwd replacements
	Extend the common test framework to support $pwd replacements in
	settings.  This allows replacing the custom cris @exedir@ with it.

	sim: cris: replace @srcdir@ test extension with $srcdir/$subdir
	The common framework supports $srcdir & $subdir replacements already,
	so replace the custom @srcdir@ logic with those.  Since the replace
	happens in slurp_options that cris already uses, we don't have any
	logic to port over there.  We have to duplicate that into the cris
	slurp_rv helper though.

2021-11-17  Mike Frysinger  <vapier@gentoo.org>

	sim: cris: drop custom "dynamic" test field
	This tag is used to force tests to be built dynamically (i.e. without
	-static linking).  This is because cris-sim.exp in dejagnu turns on
	static linking in ldflags.

	The default configs and runtest flags shouldn't load these boards.
	If these settings are still needed, we should figure out a different
	way of suppressing the stock settings wholesale.  We want these to
	all pass out of the box with little to no configuration so that they
	can run in a multitarget build.

	With dropping "dynamic", it'll be easier to merge the custom cris
	test logic with the common sim test logic.

2021-11-17  Mike Frysinger  <vapier@gentoo.org>

	sim: testsuite: add more silent build rules
	site.exp is still verbose, but that comes from automake, so have
	to get it fixed upstream.

2021-11-17  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-16  Sergei Trofimovich  <siarheit@google.com>

	sim: cr16: fix build on gcc-12 (NULL comparison)
	On gcc-12 build fails as:

	    sim/cr16/interp.c: In function 'lookup_hash':
	    sim/cr16/interp.c:89:25: error:
	      the comparison will always evaluate as 'true'
	      for the address of 'mnimonic' will never be NULL [-Werror=address]
	       89 |   if ((h->ops->mnimonic != NULL) &&
	          |                         ^~

	'mnimonic' is a sharr array within ops. It can never be NULL.

	While at it renamed 'mnimonic' to 'mnemonic'.

2021-11-16  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: fix length of array view returned by some value_contents functions
	In commit 50888e42dcd3 ("gdb: change functions returning value contents
	to use gdb::array_view"), I believe I made a mistake with the length of
	the array views returned by some functions.  All functions return a view
	of `TYPE_LENGTH (value_type (type))` length.  This is not correct when
	the value's enclosing type is larger than the value's type.  In that
	case, the value's contents buffer is of the size of the enclosing type,
	and the value's actual contents is a slice of that (as returned by
	value_contents).  So, functions value_contents_all_raw,
	value_contents_for_printing and value_contents_for_printing_const are
	not correct.  Since they are meant to return the value's contents buffer
	as a whole, they should have the size of the enclosing type.

	There is nothing that uses the returned array view size at the moment,
	so this didn't cause a problem.  But it became apparent when trying to
	adjust some callers.

	Change-Id: Ib4e8837e1069111d2b2784d3253d5f3002419e68

2021-11-16  Fangrui Song  <maskray@google.com>

	readelf: Support SHT_RELR/DT_RELR for -r
	The -r output for SHT_RELR looks like:

	Relocation section '.relr.dyn' at offset 0x530 contains 4 entries:
	  7 offsets
	00000000000028c0
	00000000000028c8
	0000000000003ad0
	0000000000003ad8
	0000000000003ae0
	0000000000003ae8
	0000000000003af0

	For --use-dynamic, the header looks like

	    'RELR' relocation section at offset 0x530 contains 32 bytes:

	include/
	    * elf/common.h (DT_ENCODING): Bump to 38.
	    * elf/external.h (Elf32_External_Relr): New.
	    (Elf64_External_Relr): New.
	binutils/
	    * readelf.c (enum relocation_type): New.
	    (slurp_relr_relocs): New.
	    (dump_relocations): Change is_rela to rel_type.
	    Dump RELR.
	    (dynamic_relocations): Add DT_RELR.
	    (process_relocs): Check SHT_RELR and DT_RELR.
	    (process_dynamic_section): Store into dynamic_info for
	    DT_RELR/DT_RELRENT/DT_RELRSZ.

2021-11-16  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbsupport: remove FUNCTION_NAME
	__func__ is standard C++11:

	    https://en.cppreference.com/w/cpp/language/function

	Also, in C++11, __func__ expands to the demangled function name, so the
	mention in the comment above FUNCTION_NAME doesn't apply anymore.
	Finally, in places where FUNCTION_NAME is used, I think it's enough to
	print the function name, no need to print the whole signature.
	Therefore, I propose to just remove FUNCTION_NAME and update users to
	use the standard __func__.

	Change-Id: I778f28155422b044402442dc18d42d0cded1017d

2021-11-16  Andrew Burgess  <aburgess@redhat.com>

	gdb/gdbsupport: make xstrprintf and xstrvprintf return a unique_ptr
	The motivation is to reduce the number of places where unmanaged
	pointers are returned from allocation type routines.  All of the
	callers are updated.

	There should be no user visible changes after this commit.

2021-11-16  Andrew Burgess  <aburgess@redhat.com>

	gdbsupport: move xfree into its own file
	In the next commit I'd like to reference gdb_unique_ptr within the
	common-utils.h file.  However, this requires that I include
	gdb_unique_ptr.h, which requires that xfree be defined.

	Interestingly, gdb_unique_ptr.h doesn't actually include anything that
	defines xfree, but I was finding that when I added a gdb_unique_ptr.h
	include to common-utils.h I was getting a dependency cycle; before my
	change xfree was defined when gdb_unique_ptr.h was processed, while
	after my change it was not, and this made g++ unhappy.

	To break this cycle, I propose to move xfree into its own header file,
	gdb-xfree.h, which I'll then include into gdb_unique_ptr.h and
	common-utils.cc.

2021-11-16  Andrew Burgess  <aburgess@redhat.com>

	gdb: throw OPTIMIZED_OUT_ERROR rather than GENERIC_ERROR
	While reviewing this patch:

	  https://sourceware.org/pipermail/gdb-patches/2021-November/183227.html

	I spotted that the patch could be improved if we threw
	OPTIMIZED_OUT_ERROR rather than GENERIC_ERROR in a few places.

	This commit updates error_value_optimized_out and
	require_not_optimized_out to throw OPTIMIZED_OUT_ERROR.

	I ran the testsuite and saw no regressions.  This doesn't really
	surprise me, we don't usually write code like:

	  catch (const gdb_exception_error &ex)
	    {
	      (if ex.error == GENERIC_ERROR)
	        ...
	      else
	        ...
	    }

	There are a three places where we write something like:

	  catch (const gdb_exception_error &ex)
	    {
	      (if ex.error == OPTIMIZED_OUT_ERROR)
	        ...
	    }

	In frame.c:unwind_pc, stack.c:info_frame_command_core, and
	value.c:value_optimized_out, but if we are hitting these cases then
	it's not significantly changing GDB's behaviour.

2021-11-16  Tom Tromey  <tromey@adacore.com>

	Remove config.cache in gdbserver's "distclean"
	PR gdb/28586 points out that "make distclean" fails to delete
	config.cache from gdbserver/.  This patch fixes the bug, and removes a
	duplicate "Makefile" deletion that was also pointed out in the PR.

2021-11-16  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Remove inferior output in gdb.base/foll-vfork.exp
	Test-case gdb.base/foll-vfork.exp has inferior output that is not needed, but
	which makes the regexp matching more difficult (see commit 1f28b70def1
	"[gdb/testsuite] Fix regexp in gdb.base/foll-vfork.exp").

	Remove the inferior output, and revert commit 1f28b70def1 to make the matching
	more restrictive.

	Tested on x86_64-linux.

2021-11-16  H.J. Lu  <hjl.tools@gmail.com>

	x86: Don't allow KMOV in TLS code sequences
	Don't allow KMOV in TLS code sequences which require integer MOV
	instructions.

		PR target/28595
		* config/tc-i386.c (match_template): Don't allow KMOV in TLS
		code sequences.
		* testsuite/gas/i386/i386.exp: Run inval-tls and x86-64-inval-tls
		tests.
		* testsuite/gas/i386/inval-tls.l: New file.
		* testsuite/gas/i386/inval-tls.s: Likewise.
		* testsuite/gas/i386/x86-64-inval-tls.l: Likewise.
		* testsuite/gas/i386/x86-64-inval-tls.s: Likewise.

2021-11-16  Mike Frysinger  <vapier@gentoo.org>

	sim: run: support concise env var settings
	Support the same syntax as other common utilities where env vars can
	be specified before the program to be run without an explicit option.

	This behavior can be suppressed by using the -- marker.

2021-11-16  Mike Frysinger  <vapier@gentoo.org>

	sim: nrun: add --env-{set,unset,clear} command line options
	Provide explicit control over the program's environment with the
	basic set/unset/clear options.  These are a bit clunky to use,
	but they're functional.

	The env set operation is split out into a separate function as it'll
	be used in the next commit.

	With these in place, we can adjust the custom cris testsuite to use
	the now standard options and not its one-off hack.

2021-11-16  Mike Frysinger  <vapier@gentoo.org>

	sim: syscall: hoist argc/argn/argnlen to common code
	Now that the callback framework supports argv & envp, we can move
	the Blackfin implementation of these syscalls to the common code.

	sim: syscall: fix argvlen & argv implementation
	Now that we have access to the argv & envp strings, finish implementing
	these syscalls.  Delete unused variables, fix tbuf by incrementing the
	pointer instead of setting to the length, and make sure we don't write
	more data than the bufsize says is available.

	sim: callback: expose argv & environ
	Pass the existing strings data to the callbacks so that common
	libgloss syscalls can be implemented (which we'll do shortly).

2021-11-16  Mike Frysinger  <vapier@gentoo.org>

	sim: keep track of program environment strings
	We've been passing the environment strings to sim_create_inferior,
	but most ports don't do anything with them.  A few will use ad-hoc
	logic to stuff the stack for user-mode programs, but that's it.

	Let's formalize this across the board by storing the strings in the
	normal sim state.  This will allow (in future commits) supporting
	more functionality in the run interface, and to unify some of the
	libgloss syscalls.

2021-11-16  Mike Frysinger  <vapier@gentoo.org>

	sim: iq2000: fix some missing prototypes warnings
	Turns out some of these were hiding real bugs like not passing the
	pc variable down.

2021-11-16  jiawei  <jiawei@iscas.ac.cn>

	RISC-V: Scalar crypto instruction and entropy source CSR testcases.
	Add testcases for Scalar Crypto extension, with total testcase contain all
	instructions in k-ext/k-ext-64 and sub-extension testcase for zbk* zk*. Also
	add testcase for new CSR name 'seed' which is the Entropy Source in zkr.

	In fact these whole testcases can be combined into one file, after we have
	supported the .option arch +-= directives.

	gas/
		* testsuite/gas/riscv/k-ext-64.d: New testcase for crypto instructions.
		* testsuite/gas/riscv/k-ext-64.s: Likewise.
		* testsuite/gas/riscv/k-ext.d: Likewise.
		* testsuite/gas/riscv/k-ext.s: Likewise.
		* testsuite/gas/riscv/zbkb-32.d: Likewise.
		* testsuite/gas/riscv/zbkb-32.s: Likewise.
		* testsuite/gas/riscv/zbkb-64.d: Likewise.
		* testsuite/gas/riscv/zbkb-64.s: Likewise.
		* testsuite/gas/riscv/zbkc-32.d: Likewise.
		* testsuite/gas/riscv/zbkc-64.d: Likewise.
		* testsuite/gas/riscv/zbkc.s: Likewise.
		* testsuite/gas/riscv/zbkx-32.d: Likewise.
		* testsuite/gas/riscv/zbkx-64.d: Likewise.
		* testsuite/gas/riscv/zbkx.s: Likewise.
		* testsuite/gas/riscv/zknd-32.d: Likewise.
		* testsuite/gas/riscv/zknd-32.s: Likewise.
		* testsuite/gas/riscv/zknd-64.d: Likewise.
		* testsuite/gas/riscv/zknd-64.s: Likewise.
		* testsuite/gas/riscv/zkne-32.d: Likewise.
		* testsuite/gas/riscv/zkne-32.s: Likewise.
		* testsuite/gas/riscv/zkne-64.d: Likewise.
		* testsuite/gas/riscv/zkne-64.s: Likewise.
		* testsuite/gas/riscv/zknh-32.d: Likewise.
		* testsuite/gas/riscv/zknh-32.s: Likewise.
		* testsuite/gas/riscv/zknh-64.d: Likewise.
		* testsuite/gas/riscv/zknh-64.s: Likewise.
		* testsuite/gas/riscv/zksed-32.d: Likewise.
		* testsuite/gas/riscv/zksed-64.d: Likewise.
		* testsuite/gas/riscv/zksed.s: Likewise.
		* testsuite/gas/riscv/zksh-32.d: Likewise.
		* testsuite/gas/riscv/zksh-64.d: Likewise.
		* testsuite/gas/riscv/zksh.s: Likewise.
		* testsuite/gas/riscv/priv-reg-fail-zkr.d: New testcase for zkr
		csr check.
		* testsuite/gas/riscv/priv-reg-fail-zkr.l: Likewise.
		* testsuite/gas/riscv/priv-reg-fail-version-1p10.d: Updated march to
		rv32if_zkr.
		* testsuite/gas/riscv/priv-reg-fail-version-1p11.d: Likewise.
		* testsuite/gas/riscv/priv-reg-fail-version-1p9p1.d: Likewise.
		* testsuite/gas/riscv/priv-reg-version-1p10.d: Added Crypto seed csr.
		* testsuite/gas/riscv/priv-reg-version-1p11.d: Likewise.
		* testsuite/gas/riscv/priv-reg-version-1p9p1.d: Likewise.
		* testsuite/gas/riscv/priv-reg.s: Likewise.

2021-11-16  jiawei  <jiawei@iscas.ac.cn>

	RISC-V: Scalar crypto instructions and operand set.
	Add instructions in k-ext, some instruction in zbkb, zbkc is reuse from
	zbb,zbc, we just change the class attribute to make them both support.
	The 'aes64ks1i' and 'aes64ks2' instructions are present in both the Zknd
	and Zkne extensions on rv64.  Add new operand letter 'y' to present 'bs'
	symbol and 'Y' to present 'rnum' symbolc  for zkn instructions.  Also add
	a new Entropy Source CSR define 'seed' located at address 0x015.

	bfd/
		* elfxx-riscv.c (riscv_multi_subset_supports): Added support for
		crypto extension.
	gas/
		*config/tc-riscv.c (enum riscv_csr_class): Added CSR_CLASS_ZKR.
		(riscv_csr_address): Checked for CSR_CLASS_ZKR.
		(validate_riscv_insn): Added y and Y for bs and rnum operands.
		(riscv_ip): Handle y and Y operands.
	include/
		* opcode/riscv-opc.h: Added encodings of crypto instructions.
		Also defined new csr seed, which address is 0x15.
		* opcode/riscv.h: Defined OP_* and INSN_CLASS_* for crypto.
	opcodes/
		* riscv-dis.c (print_insn_args): Recognized new y and Y operands.
		* riscv-opc.c (riscv_opcodes): Added crypto instructions.

2021-11-16  jiawei  <jiawei@iscas.ac.cn>

	RISC-V: Minimal support of scalar crypto extension.
	Minimal support of scalar crypto extension, add "k" in the
	riscv_supported_std_ext, to make the order check right with
	"zk" behind "zb".

	bfd/
		* elfxx-riscv.c (riscv_implicit_subsets): Added implicit
		rules for zk* extensions.
		(riscv_supported_std_ext): Added entry for k.
		(riscv_supported_std_z_ext): Added entries for zk*.

2021-11-16  Simon Marchi  <simon.marchi@efficios.com>

	gdb: rework "set debuginfod" commands
	As discussed here [1], do some re-work in the "set debuginfod commands".

	First, use "set debuginfod enabled on/off/ask" instead of "set
	debuginfod on/off/ask".  This is more MI-friendly, and it gives an
	output that makes more sense in "info set", for example.

	Then, make the show commands not call "error" when debuginfod support is
	not compiled in.  This makes the commands "show" and "show debuginfod"
	stop early, breaking gdb.base/default.exp:

	    Running /home/smarchi/src/binutils-gdb/gdb/testsuite/gdb.base/default.exp ...
	    FAIL: gdb.base/default.exp: info set
	    FAIL: gdb.base/default.exp: show

	 - Make the "debuginfod enabled" setting default to "off" when debuginfod
	   support is not compiled in, and "ask" otherwise.
	 - Make the setter of "debuginfod enabled" error out when debuginfod
	   support is not compiled in, so that "debuginfod enabled" will always
	   remain "off" in that case.
	 - Make the setter of "debuginfod verbose" work in any case.  I don't
	   see the harm in letting the user change that setting, since the user will
	   hit an error if they try to enable the use of debuginfod.
	 - I would do the same for the "debuginfod urls" setter, but because
	   this one needs to see the DEBUGINFOD_URLS_ENV_VAR macro, provided by
	   libdebuginfod, I made that one error out as well if debuginfod
	   support is not compiled it (otherwise, I would have left it like
	   "debuginfod verbose".  Alternatively, we could hard-code
	   "DEBUGINFOD_URLS" in the code (in fact, it was prior to this patch,
	   but I think it was an oversight, as other spots use
	   DEBUGINFOD_URLS_ENV_VAR), or use a dummy string to store the setting,
	   but I don't really see the value in that.

	Rename debuginfod_enable to debuginfod_enabled, just so it matches the
	setting name.

	[1] https://sourceware.org/pipermail/gdb-patches/2021-October/182937.html

	Change-Id: I45fdb2993f668226a5639228951362b7800f09d5
	Co-Authored-By: Aaron Merey <amerey@redhat.com>

2021-11-16  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: adjust gdbarch_tdep calls in nat files
	Commit 345bd07cce33 ("gdb: fix gdbarch_tdep ODR violation") forgot to
	update the gdbarch_tdep calls in the native files other than x86-64
	Linux.  This patch updates them all (to the best of my knowledge).
	These are the files I was able to build-test:

	  aarch64-linux-nat.c
	  amd64-bsd-nat.c
	  arm-linux-nat.c
	  ppc-linux-nat.c
	  windows-nat.c
	  xtensa-linux-nat.c

	And these are the ones I could not build-test:

	  aix-thread.c
	  arm-netbsd-nat.c
	  ppc-fbsd-nat.c
	  ppc-netbsd-nat.c
	  ia64-tdep.c (the part that needs libunwind)
	  ppc-obsd-nat.c
	  rs6000-nat.c

	If there are still some build problems related to gdbarch_tdep in them,
	they should be pretty obvious to fix.

	Change-Id: Iaa3d791a850e4432973757598e634e3da6061428

2021-11-16  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove unused variables in xtensa-linux-nat.c
	While build-testing this file, the compiler complained about these two
	unused variables, remove them.

	Change-Id: I3c54f779f12c16ef6184af58aca75eaad042ce4e

2021-11-16  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: add arc-newlib-tdep.c to ALL_TARGET_OBS
	This file is currently not compiled in an --enable-targets=all build,
	but it should be.  Add it to ALL_TARGET_OBS.

	Update the gdbarch_tdep call that commit 345bd07cce33 ("gdb: fix
	gdbarch_tdep ODR violation") forgot to update.

	Change-Id: I86248a01493eea5e70186e9c46a298ad3994b034

2021-11-16  Jim Wilson  <wilson@tuliptree.org>

	Update my email address.
	I've left SiFive and have a new gmail account because it is convenient
	to use with git send-email.  I'm planning to use this for my RISC-V
	work.  My tuliptree address still works, it just isn't as convenient.

		binutils:
		* MAINTAINERS (RISC-V): Update my address.

2021-11-16  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-15  Tom de Vries  <tdevries@suse.de>

	[gdb] Don't use gdb_stdlog for inferior-events
	The test-case gdb.base/foll-vfork.exp contains:
	...
	if [gdb_debug_enabled] {
	    untested "debug is enabled"
	    return 0
	}
	...

	To understand what it does, I disabled this bit and ran with GDB_DEBUG=infrun,
	like so:
	...
	$ cd $build/gdb/testsuite
	$ make check GDB_DEBUG=infrun RUNTESTFLAGS=gdb.base/foll-vfork.exp
	...
	and ran into:
	...
	(gdb) PASS: gdb.base/foll-vfork.exp: exec: \
	  vfork parent follow, through step: set follow-fork parent
	next^M
	33        if (pid == 0) {^M
	(gdb) FAIL: gdb.base/foll-vfork.exp: exec: \
	  vfork parent follow, through step: step
	...

	The problem is that the test-case expects:
	...
	(gdb) PASS: gdb.base/foll-vfork.exp: exec: \
	  vfork parent follow, through step: set follow-fork parent
	next^M
	[Detaching after vfork from child process 28169]^M
	33        if (pid == 0) {^M
	(gdb) PASS: gdb.base/foll-vfork.exp: exec: \
	  vfork parent follow, through step: step
	...
	but the "Detaching" line has been redirected to
	$outputs/gdb.base/foll-vfork/gdb.debug.

	I looked at the documentation of "set logging debugredirect [on|off]":
	...
	  By default, GDB debug output will go to both the terminal and the logfile.
	  Set debugredirect if you want debug output to go only to the log file.
	...
	and my interpretation of it was that "debug output" did not match the
	"messages" description of inferior-events:
	...
	The set print inferior-events command allows you to enable or disable printing
	of messages when GDB notices that new inferiors have started or that inferiors
	have exited or have been detached.
	...

	Fix the discrepancy by not using gdb_stdlog for inferior-events.

	Update the gdb.base/foll-vfork.exp test-case to not require
	gdb_debug_enabled == 0.

	Tested on x86_64-linux.

	Tested test-case gdb.base/foll-vfork.exp with and without GDB_DEBUG=infrun.

2021-11-15  Roland McGrath  <mcgrathr@google.com>

	ld: Fix testsuite failures under --enable-textrel-check=error
	ld/
		* testsuite/ld-aarch64/dt_textrel.d: Pass explicit -z notext in
		case ld was configured with --enable-textrel-check=error.
		* testsuite/ld-aarch64/pr22764.d: Likewise.
		* testsuite/ld-aarch64/pr20402.d: Likewise.

2021-11-15  Luis Machado  <luis.machado@linaro.org>

	Extend the prologue analyzer to handle the bti instruction
	Handle the BTI instruction in the prologue analyzer. The patch handles all
	the variations of the BTI instruction.

2021-11-15  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: fix gdbarch_tdep ODR violation
	I would like to be able to use non-trivial types in gdbarch_tdep types.
	This is not possible at the moment (in theory), because of the one
	definition rule.

	To allow it, rename all gdbarch_tdep types to <arch>_gdbarch_tdep, and
	make them inherit from a gdbarch_tdep base class.  The inheritance is
	necessary to be able to pass pointers to all these <arch>_gdbarch_tdep
	objects to gdbarch_alloc, which takes a pointer to gdbarch_tdep.

	These objects are never deleted through a base class pointer, so I
	didn't include a virtual destructor.  In the future, if gdbarch objects
	deletable, I could imagine that the gdbarch_tdep objects could become
	owned by the gdbarch objects, and then it would become useful to have a
	virtual destructor (so that the gdbarch object can delete the owned
	gdbarch_tdep object).  But that's not necessary right now.

	It turns out that RISC-V already has a gdbarch_tdep that is
	non-default-constructible, so that provides a good motivation for this
	change.

	Most changes are fairly straightforward, mostly needing to add some
	casts all over the place.  There is however the xtensa architecture,
	doing its own little weird thing to define its gdbarch_tdep.  I did my
	best to adapt it, but I can't test those changes.

	Change-Id: Ic001903f91ddd106bd6ca09a79dabe8df2d69f3b

2021-11-15  Clément Chigot  <clement.chigot@atos.net>

	COFF: avoid modifications over C_FILE filename aux entries.
	Commit e86fc4a5bc37 ("PR 28447: implement multiple parameters for .file
	on XCOFF") introduces C_FILE entries which can store additional
	information.
	However, some modifications are needed by them but not by the original
	C_FILE entries, usually representing the filename.
	This patch ensures that filename entries are kept as is, in order to
	protect targets not supporting the additional entries.

		* coffgen.c (coff_write_symbol): Protect filename entries
		(coff_write_symbols): Likewise.
		(coff_print_symbol): Likewise.

2021-11-15  Eric Botcazou  <ebotcazou@gcc.gnu.org>

	Deal with full path in .file 0 directive
	Gas uses the directory part, if present, of the .file 0 directive to set
	entry 0 of the directory table in DWARF 5, which represents the "current
	directory".

	Now Gas also uses the file part of the same directive to set entry 0 of the
	file table, which represents the "current compilation file".  But the latter
	need not be located in the former so GCC will use a full path in the file
	part when it is passed a full path:

	gcc -c /full/path/test.c -save-temps

	yields:

	 .file 0 "/current/directory" "/full/path/test.c"

	in the assembly file and:

	 The Directory Table (offset 0x22, lines 2, columns 1):
	  Entry Name
	  0     (indirect line string, offset: 0x25): /current/directory
	  1     (indirect line string, offset: 0x38): /full/path

	 The File Name Table (offset 0x30, lines 2, columns 2):
	  Entry Dir     Name
	  0     0       (indirect line string, offset: 0x43): /full/path/test.c

	in the object file.  Note the full path and the questionable Dir value in
	the 0 entry of the file table.

2021-11-15  Mike Frysinger  <vapier@gentoo.org>

	sim: cris: make error message test a little more flexible
	The point of this test is to just make sure the usage text is shown,
	not the exact details of the usage text.  So shorten the output test
	to match the beginning.  This fixes breakage when the output changed
	slightly to include [--].

	sim: run: fix crash in argc==0 error situation
	The new argv processing code assumed that we were always passed a
	command line.  If we weren't, make sure we don't crash before we
	get a chance to output an error message about incorrect usage.

	sim: cris: touch up rvdummy handling
	Add quiet build support and make sure it's removed with `make clean`.

	sim: cris: replace custom "dest" test field with new --argv0
	The #dest field used in the cris testsuite is a bit of hack to set the
	argv[0] for the tests to read out later on.  Now that the sim has an
	option to set argv[0] explicitly, we don't need this custom field, so
	let's drop it to harmonize the testsuites a little.

	sim: run: add --argv0 option to control argv[0]
	We default argv[0] to the program we run which is a standard *NIX
	convention, but sometimes we want to be able to control the argv[0]
	setting independently (especially for programs that inspect argv[0]
	to change their behavior or output).  Add an option to control it.

2021-11-15  Mike Frysinger  <vapier@gentoo.org>

	sim: split program path out of argv vector
	We use the program argv to both find the program to run (argv[0]) and
	to hold the arguments to the program.  Most of the time this is fine,
	but if we want to let programs specify argv[0] independently (which is
	possible in standard *NIX programs), this double duty doesn't work.

	So let's split the path to the program to run out into a separate
	field by itself.  This simplifies the various sim_open funcs too.

	By itself, this code is more of a logical cleanup than something that
	is super useful.  But it will open up customization of argv[0] in a
	follow up commit.  Split the changes to make it easier to review.

2021-11-15  Mike Frysinger  <vapier@gentoo.org>

	sim: bfin: fix mach/xfail usage in tests
	Set the mach to the right value all the time, and update xfail to
	say the test fails on all targets.  WIth multitarget testing, the
	idea of target here doesn't make much sense.

2021-11-15  Alan Modra  <amodra@gmail.com>

	-Waddress fixes for gold testsuite
	Current mainline gcc.
	common_test_1.c: In function 'main':
	common_test_1.c:56:14: error: comparison between two arrays [-Werror=array-compare]
	   56 |   assert (c5 > c4);
	      |              ^
	common_test_1.c:56:14: note: use '&c5[0] > &c4[0]' to compare the addresses

		* testsuite/common_test_1.c: Avoid -Waddress warnings.
		* testsuite/common_test_1_v1.c: Likewise.
		* testsuite/common_test_1_v2.c: Likewise.
		* testsuite/script_test_2.cc: Likewise.

2021-11-15  Alan Modra  <amodra@gmail.com>

	PowerPC64 @notoc in non-power10 code
	R_PPC64_REL24_P9NOTOC is a variant of R_PPC64_REL24_NOTOC for use on
	@notoc cals from non-power10 code in the rare case that using such a
	construct is useful.  R_PPC64_REL24_P9NOTOC will be emitted by gas
	rather than R_PPC64_REL24_NOTOC when @notoc is used in a branch
	instruction if power10 instructions are not enabled at that point.
	The new relocation tells the linker to not use power10 instructions on
	any stub emitted for that branch, unless overridden by
	--power10-stubs=yes.

	The current linker heuristic of only generating power10 instructions
	for stubs if power10-only relocations are detected, continues to be
	used.

	include/
		* elf/ppc64.h (R_PPC64_REL24_P9NOTOC): Define.
	bfd/
		* reloc.c (BFD_RELOC_PPC64_REL24_P9NOTOC): Define.
		* elf64-ppc.c (ppc64_elf_howto_raw): Add entry for new reloc.
		(ppc64_elf_reloc_type_lookup): Handle it.
		(enum ppc_stub_type): Delete.
		(enum ppc_stub_main_type, ppc_stub_sub_type): New.
		(struct ppc_stub_type): New.
		(struct ppc_stub_hash_entry): Use the above new type.
		(struct ppc_link_hash_table): Update stub_count.
		(is_branch_reloc, ppc64_elf_check_relocs),
		(toc_adjusting_stub_needed): Handle new reloc.
		(stub_hash_newfunc, select_alt_stub, ppc_merge_stub),
		(ppc_type_of_stub, plt_stub_size, build_plt_stub),
		(build_tls_get_addr_head, build_tls_get_addr_tail),
		(ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_size_stubs),
		(ppc64_elf_build_stubs, ppc64_elf_relocate_section): Handle new
		reloc.  Modify stub handling to suit new scheme.
		* bfd-in2.h: Regenerate.
		* libbfd.h: Regenerate.
	gas/
		* config/tc-ppc.c (ppc_elf_suffix): When power10 is not enabled
		return BFD_RELOC_PPC64_REL24_P9NOTOC for @notoc.
		(fixup_size, ppc_force_relocation, ppc_fix_adjustable): Handle
		BFD_RELOC_PPC64_REL24_P9NOTOC.
	ld/
		* testsuite/ld-powerpc/callstub-2.s: Add .machine power10.

2021-11-15  Alan Modra  <amodra@gmail.com>

	Regenerate a couple of files
	A couple of files changed on my latest --enable-maintainer-mode
	build.  ld/Makefile.in had a missing dependency but better sorting of
	the loongson entries.

	intl/
		* configure: Regenerate.
	ld/
		* Makefile.am: Sort loongson entries.
		* Makefile.in: Regenerate.

2021-11-15  Pedro Alves  <pedro@palves.net>

	Fix build with current GCC: EL_EXPLICIT(location) always non-NULL
	Compiling GDB with current GCC (1b4a63593b) runs into this:

	  src/gdb/location.c: In function 'int event_location_empty_p(const event_location*)':
	  src/gdb/location.c:963:38: error: the address of 'event_location::<unnamed union>::explicit_loc' will never be NULL [-Werror=address]
	    963 |       return (EL_EXPLICIT (location) == NULL
		|                                      ^
	  src/gdb/location.c:57:30: note: 'event_location::<unnamed union>::explicit_loc' declared here
	     57 |     struct explicit_location explicit_loc;
		|                              ^~~~~~~~~~~~

	GCC is right, EL_EXPLICIT is defined as returning the address of an
	union field:

	      /* An explicit location.  */
	      struct explicit_location explicit_loc;
	  #define EL_EXPLICIT(P) (&((P)->u.explicit_loc))

	and thus must always be non-NULL.

	Change-Id: Ie74fee7834495a93affcefce03c06e4d83ad8191

2021-11-15  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-14  Lancelot SIX  <lsix@lancelotsix.com>

	[PR gdb/16238] Add completer for the show user command
	The 'show user' command (which shows the definition of non-python/scheme
	user defined commands) is currently missing a completer. This is
	mentioned in PR 16238.  Having one can improve the user experience.

	In this commit I propose an implementation for such completer as well as
	the associated tests.

	Tested on x86_64 GNU/Linux.

	All feedbacks are welcome.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=16238

2021-11-14  Alan Modra  <amodra@gmail.com>

	sync libbacktrace from gcc

2021-11-14  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-13  H.J. Lu  <hjl.tools@gmail.com>

	Sync Makefile.tpl with GCC
		* Makefile.tpl: Sync with GCC.
		* Makefile.in: Regenerate.

2021-11-13  Mike Frysinger  <vapier@gentoo.org>

	sim: sh: fix switch-bool warnings
	This code triggers -Werror=switch-bool warnings with <=gcc-5 versions.
	Rework it to use if statements instead as it also simplifies a bit.

	sim: sh: rework carry checks to not rely on integer overflows
	In <=gcc-7 versions, -fstrict-overflow is enabled by default, and that
	triggers warnings in this code that relies on integer overflows to test
	for carries.  Change the logic to test against the limit directly.

2021-11-13  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-12  Carl Love  <cel@us.ibm.com>

	Fix gdb.base/sigstep.exp test for ppc
	The test stops at <signal_handler called> which is the call to the handler
	rather than in the handler as intended.  This patch replaces the
	gdb_test "$enter_cmd to handler" with a gdb_test_multiple test.  The multiple
	test looks for the stop at <signal_handler called>.  If found, the command
	is issued again.  The test passes if gdb stops in the handler as expected.

	(gdb) PASS: gdb.base/sigstep.exp: stepi to handler, nothing in handler, step
	from handler: continue to signal
	stepi
	<signal handler called>
	1: x/i $pc
	=> 0x7ffff7f80440 <__kernel_start_sigtramp_rt64>:       bctrl
	(gdb) stepi
	handler (sig=551) at sigstep.c:32
	32      {
	1: x/i $pc
	=> 0x10000097c <handler>:       addis   r2,r12,2
	(gdb) PASS: gdb.base/sigstep.exp: stepi to handler, nothing in handler,
	step from handler: stepi to handler

	Patch has been tested on x86_64-linux and ppc64le-linux with no test failures.

2021-11-12  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix regexp in gdb.base/foll-vfork.exp
	On OBS I ran into:
	...
	(gdb) PASS: gdb.base/foll-vfork.exp: exit: \
	  vfork relations in info inferiors: continue to child exit
	info inferiors^M
	  Num  Description       Connection           Executable        ^M
	  1    <null>                                 foll-vfork-exit ^M
	* 2    <null>                                 foll-vfork-exit ^M
	(gdb) I'm the proud parent of child #5044!^M
	FAIL: gdb.base/foll-vfork.exp: exit: vfork relations in info inferiors: \
	  vfork relation no longer appears in info inferiors (timeout)
	...

	Fix this by removing the '$' anchor in the corresponding '$gdb_prompt $'
	regexps.

	Tested on x86_64-linux.

2021-11-12  Alan Modra  <amodra@gmail.com>

	Don't compile some opcodes files when bfd is 32-bit only
		* Makefile.am (TARGET_LIBOPCODES_CFILES): Split into..
		(TARGET64_LIBOPCODES_CFILES): ..this and..
		(TARGET32_LIBOPCODES_CFILES): ..this.
		(ALL_MACHINES): Likewise split to
		(ALL64_MACHINES, ALL32_MACHINES): ..this.
		* disassemble.c: Define some ARCH_* when ARCH_all only if BFD64.
		* configure.ac (BFD_MACHINES): Defined depending on BFD_ARCH_SIZE.
		* Makefile.in: Regenerate.
		* configure: Regenerate.

	Import Makefile.def from gcc
		* Makefile.def: Import from gcc.
		* Makefile.in: Regenerate.

2021-11-12  Alan Modra  <amodra@gmail.com>

	Fix demangle style usage info
	Extract allowed styles from libiberty, so we don't have to worry about
	our help messages getting out of date.  The function probably belongs
	in libiberty/cplus-dem.c but it can be here for a while to iron out
	bugs.

		PR 28581
		* demanguse.c: New file.
		* demanguse.h: New file.
		* nm.c (usage): Break up output.  Use display_demangler_styles.
		* objdump.c (usage): Use display_demangler_styles.
		* readelf.c (usage): Likewise.
		* Makefile.am: Add demanguse.c and demanguse.h.
		* Makefile.in: Regenerate.
		* po/POTFILESin: Regenerate.

2021-11-12  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-11  Simon Marchi  <simon.marchi@efficios.com>

	gdb: fix "set scheduler-locking" thread exit hang
	GDB hangs when doing this:

	 - launch inferior with multiple threads
	 - multiple threads hit some breakpoint(s)
	 - one breakpoint hit is presented as a stop, the rest are saved as
	   pending wait statuses
	 - "set scheduler-locking on"
	 - resume the currently selected thread (because of scheduler-locking,
	   it's the only one resumed), let it execute until exit
	 - GDB hangs, not showing the prompt, impossible to interrupt with ^C

	When the resumed thread exits, we expect the target to return a
	TARGET_WAITKIND_NO_RESUMED event, and that's what we see:

	    [infrun] fetch_inferior_event: enter
	      [infrun] scoped_disable_commit_resumed: reason=handling event
	      [infrun] random_pending_event_thread: None found.
	    [Thread 0x7ffff7d9c700 (LWP 309357) exited]
	      [infrun] print_target_wait_results: target_wait (-1.0.0 [process -1], status) =
	      [infrun] print_target_wait_results:   -1.0.0 [process -1],
	      [infrun] print_target_wait_results:   status->kind = no-resumed
	      [infrun] handle_inferior_event: status->kind = no-resumed
	      [infrun] handle_no_resumed: TARGET_WAITKIND_NO_RESUMED (ignoring: found resumed)
	      [infrun] prepare_to_wait: prepare_to_wait
	      [infrun] reset: reason=handling event
	      [infrun] maybe_set_commit_resumed_all_targets: not requesting commit-resumed for target native, no resumed threads
	    [infrun] fetch_inferior_event: exit

	The problem is in handle_no_resumed: we check if some other thread is
	actually resumed, to see if we should ignore that event (see comments in
	that function for more info).  If this condition is true:

	    (thread->executing () || thread->has_pending_waitstatus ())

	... then we ignore the event.  The problem is that there are some non-resumed
	threads with a pending event, which makes us ignore the event.  But these
	threads are not resumed, so we end up waiting while nothing executes, hence
	waiting for ever.

	My first fix was to change the condition to:

	    (thread->executing ()
	     || (thread->resumed () && thread->has_pending_waitstatus ()))

	... but then it occured to me that we could simply check for:

	    (thread->resumed ())

	Since "executing" implies "resumed", checking simply for "resumed"
	covers threads that are resumed and executing, as well as threads that
	are resumed with a pending status, which is what we want.

	Change-Id: Ie796290f8ae7f34c026ca3a8fcef7397414f4780

2021-11-11  Tom de Vries  <tdevries@suse.de>

	[gdb/build] Fix Wimplicit-exception-spec-mismatch in clang build
	When building with clang 13 (and -std=gnu++17 to work around an issue in
	string_view-selftests.c), we run into a few Wimplicit-exception-spec-mismatch
	warnings:
	...
	src/gdbsupport/new-op.cc:102:1: error: function previously declared with an \
	  explicit exception specification redeclared with an implicit exception \
	  specification [-Werror,-Wimplicit-exception-spec-mismatch]
	operator delete (void *p)
	^
	/usr/include/c++/11/new:130:6: note: previous declaration is here
	void operator delete(void*) _GLIBCXX_USE_NOEXCEPT
	     ^
	...

	These are due to recent commit 5fff6115fea "Fix
	LD_PRELOAD=/usr/lib64/libasan.so.6 gdb".

	Fix this by adding the missing noexcept.

	Build on x86_64-linux, using gcc 7.5.0 and clang 13.0.0.

2021-11-11  Tom de Vries  <tdevries@suse.de>

	[gdb/build] Fix build with -std=c++11
	When building with -std=c++11, we run into two Werror=missing-declarations:
	...
	new-op.cc: In function 'void operator delete(void*, std::size_t)':
	new-op.cc:114:1: error: no previous declaration for \
	  'void operator delete(void*, std::size_t)' [-Werror=missing-declarations]
	 operator delete (void *p, std::size_t) noexcept
	 ^~~~~~~~
	new-op.cc: In function 'void operator delete [](void*, std::size_t)':
	new-op.cc:132:1: error: no previous declaration for \
	  'void operator delete [](void*, std::size_t)' [-Werror=missing-declarations]
	 operator delete[] (void *p, std::size_t) noexcept
	 ^~~~~~~~
	...

	These are due to recent commit 5fff6115fea "Fix
	LD_PRELOAD=/usr/lib64/libasan.so.6 gdb".

	The declarations are provided by <new> (which is included) for c++14 onwards,
	but they are missing for c++11.

	Fix this by adding the missing declarations.

	Tested on x86_64-linux, with gcc 7.5.0, both without (implying -std=gnu++14) and
	with -std=c++11.

2021-11-11  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add gdb.arch/ppc64-break-on-_exit.exp
	Add a regression test-case for commit a50bdb99afe "[gdb/tdep, rs6000] Don't
	skip system call in skip_prologue":
	- set a breakpoint on a local copy of glibc's _exit, and
	- verify that it triggers.

	The test-case uses an assembly file by default, but also has the possibility
	to use a C source file instead.

	Tested on ppc64le-linux.  Verified that the test-case fails without
	aforementioned commit, and passes with the commit.  Both with assembly
	and C source.

2021-11-11  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: Dump objects according to the elf architecture attribute.
	For now we should always generate the elf architecture attribute both for
	elf and linux toolchains, so that we could dump the objects correctly
	according to the generated architecture string.  This patch resolves the
	problem that we probably dump an object with c.nop instructions, but
	in fact the c extension isn't allowed.  Consider the following case,

	nelson@LAPTOP-QFSGI1F2:~/test$ cat temp.s
	.option norvc
	.option norelax
	.text
	add     a0, a0, a0
	.byte   0x1
	.balign 16
	nelson@LAPTOP-QFSGI1F2:~/test$ ~/binutils-dev/build-elf32-upstream/build-install/bin/riscv32-unknown-elf-as temp.s -o temp.o
	nelson@LAPTOP-QFSGI1F2:~/test$ ~/binutils-dev/build-elf32-upstream/build-install/bin/riscv32-unknown-elf-objdump -d temp.o

	temp.o:     file format elf32-littleriscv

	Disassembly of section .text:

	00000000 <.text>:
	   0:   00a50533                add     a0,a0,a0
	   4:   01                      .byte   0x01
	   5:   00                      .byte   0x00
	   6:   0001                    nop
	   8:   00000013                nop
	   c:   00000013                nop
	nelson@LAPTOP-QFSGI1F2:~/test$ ~/binutils-dev/build-elf32-upstream/build-install/bin/riscv32-unknown-elf-readelf -A temp.o
	Attribute Section: riscv
	File Attributes
	  Tag_RISCV_arch: "rv32i2p0_m2p0_a2p0_f2p0_d2p0"

	The c.nop at address 0x6 is generated for alignment, but since the rvc isn't
	allowed for this object, dump it as a c.nop instruction looks wrong.  After
	applying this patch, I get the following result,

	nelson@LAPTOP-QFSGI1F2:~/test$ ~/binutils-dev/build-elf32-upstream/build-install/bin/riscv32-unknown-elf-objdump -d temp.o

	temp.o:     file format elf32-littleriscv

	Disassembly of section .text:

	00000000 <.text>:
	   0:   00a50533                add     a0,a0,a0
	   4:   01                      .byte   0x01
	   5:   00                      .byte   0x00
	   6:   0001                    .2byte  0x1
	   8:   00000013                nop
	   c:   00000013                nop

	For the current objdump, we dump data to .byte/.short/.word/.dword, and
	dump the unknown or unsupported instructions to .2byte/.4byte/.8byte, which
	respectively are 2, 4 and 8 bytes instructions.  Therefore, we shouldn't
	dump the 0x0001 as a c.nop instruction in the above case, we should dump
	it to .2byte 0x1 as a unknown instruction, since the rvc is disabled.

	However, consider that some people may use the new objdump to dump the old
	objects, which don't have any elf attributes.  We usually set the default
	architecture string to rv64g by bfd/elfxx-riscv.c:riscv_set_default_arch.
	But this will cause rvc instructions to be unrecognized.  Therefore, we
	set the default architecture string to rv64gc for disassembler, to keep
	the previous behavior.

	This patch pass the riscv-gnu-toolchain gcc/binutils regressions for
	rv32emc-elf, rv32gc-linux, rv32i-elf, rv64gc-elf and rv64gc-linux
	toolchains.  Also, tested by --enable-targets=all and can build
	riscv-gdb successfully.

	bfd/
		* elfnn-riscv.c (riscv_merge_arch_attr_info): Tidy the
		codes for riscv_parse_subset_t setting.
		* elfxx-riscv.c (riscv_get_default_ext_version): Updated.
		(riscv_subset_supports): Moved from gas/config/tc-riscv.c.
		(riscv_multi_subset_supports): Likewise.
		* elfxx-riscv.h: Added extern for riscv_subset_supports and
		riscv_multi_subset_supports.
	gas/
		* config/tc-riscv.c (riscv_subset_supports): Moved to
		bfd/elfxx-riscv.c.
		(riscv_multi_subset_supports): Likewise.
		(riscv_rps_as): Defined for architectrue parser.
		(riscv_set_arch): Updated.
		(riscv_set_abi_by_arch): Likewise.
		(riscv_csr_address): Likewise.
		(reg_lookup_internal): Likewise.
		(riscv_ip): Likewise.
		(s_riscv_option): Updated.
		* testsuite/gas/riscv/mapping-04b.d: Updated.
		* testsuite/gas/riscv/mapping-norelax-03b.d: Likewise.
		* testsuite/gas/riscv/mapping-norelax-04b.d: Likewise.
	opcodes/
		* riscv-dis.c: Include elfxx-riscv.h since we need the
		architecture parser.  Also removed the cpu-riscv.h, it
		is already included in elfxx-riscv.h.
		(default_isa_spec): Defined since the parser need this
		to set the default architecture string.
		(xlen): Moved out from riscv_disassemble_insn as a global
		variable, it is more convenient to initialize riscv_rps_dis.
		(riscv_subsets): Defined to recoed the supported
		extensions.
		(riscv_rps_dis): Defined for architectrue parser.
		(riscv_disassemble_insn): Call riscv_multi_subset_supports
		to make sure if the instructions are valid or not.
		(print_insn_riscv): Initialize the riscv_subsets by parsing
		the elf architectrue attribute.  Otherwise, set the default
		architectrue string to rv64gc.

2021-11-11  Mike Frysinger  <vapier@gentoo.org>

	sim: testsuite: drop sim_compile cover function
	Most code isn't using this, and the only call site (in one cris file)
	can use target_compile directly.  So switch it over to simplify.

	sim: cris: stop testing a.out explicitly [ld/13900]
	Since gcc dropped support for a.out starting with 4.4.0 in 2009, it's
	been impossible to verify this code actually still works.  Since it
	crashes in ld, and it uses a config option that no other tests uses
	and we want to remove, drop the test to avoid all the trouble.

	sim: io: tweak compiler workaround with error output
	Outputting an extra space broke a cris test.  Change the workaround
	to use %s with an empty string to avoid the compiler warning but not
	output an extra space.

	sim: testsuite: delete unused arm remote host logic
	There's no need to sync testutils.inc with remote hosts.  The one
	we have in the source tree is all we need and only thing we test.
	Delete it to simplify.

	sim: synacor: simplify test generation
	Objcopy was used to create a binary file of just the executable code
	since the environment requires code to based at address 0.  We can
	accomplish the same thing with the -Ttext=0 flag, so switch to that
	to get rid of custom logic.

2021-11-11  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-10  Tom Tromey  <tromey@adacore.com>

	Handle PIE in .debug_loclists
	Simon pointed out that my recent patches to .debug_loclists caused
	some regressions.  After a brief discussion we realized it was because
	his system compiler defaults to PIE.

	This patch changes this code to unconditionally apply the text offset
	here.  It also changes loclist_describe_location to work more like
	dwarf2_find_location_expression.

	I tested this by running the gdb.dwarf2 tests both with and without
	-pie.

2021-11-10  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	arm: enable Cortex-A710 CPU
	This patch is adding support for Cortex-A710 CPU in Arm.

	bfd/

		* cpu-arm.c (processors): Add cortex-a710.

	gas/

		* NEWS: Update docs.
		* config/tc-arm.c (arm_cpus): Add cortex-a710 to -mcpu.
		* doc/c-arm.texi: Update docs.
		* testsuite/gas/arm/cpu-cortex-a710.d: New test.

2021-11-10  Clément Chigot  <clement.chigot@atos.net>

	gdb: adjust x_file fields on COFF readers
	Commit e86fc4a5bc37 ("PR 28447: implement multiple parameters for .file
	on XCOFF") changes the structure associated to the internal
	representation of files in COFF formats.  However, gdb directory update
	has been forgotten, leading to compilation errors of this kind:

	      CXX    coffread.o
	    /home/simark/src/binutils-gdb/gdb/coffread.c: In function 'const char* coff_getfilename(internal_auxent*)':
	    /home/simark/src/binutils-gdb/gdb/coffread.c:1343:29: error: 'union internal_auxent::<unnamed struct>::<unnamed>' has no member named 'x_zeroes'
	     1343 |   if (aux_entry->x_file.x_n.x_zeroes == 0)
	          |                             ^~~~~~~~

	Fix it by adjusting the COFF code in GDB.

	Change-Id: I703fa134bc722d47515efbd72b88fa5650af6c3c

2021-11-10  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add gdb.opt/break-on-_exit.exp
	Add a test-case to excercise the problem scenario reported in PR28527 and
	fixed in commit a50bdb99afe "[gdb/tdep, rs6000] Don't skip system call in
	skip_prologue":
	- set a breakpoint on _exit, and
	- verify that it triggers.

	Note that this is not a regression test for that commit.  Since the actual
	code in _exit may vary across os instances, we cannot guarantee that the
	problem will always trigger with this test-case.

	Rather, this test-case is a version of the original test-case
	(gdb.threads/process-dies-while-detaching.exp) that is minimal while still
	reproducing the problem reported in PR28527, in that same setting.

	The benefit of this test-case is that it exercise real-life code and may
	expose similar problems in other settings.  Also, it provides a much easier
	test-case to investigate in case a similar problem occurs.

	Tested on x86_64-linux and ppc64le-linux.

2021-11-10  Mike Frysinger  <vapier@gentoo.org>

	sim: frv: flip trapdump default back to off
	When I refactored this by scoping it to sim-frv-xxx in commit
	e7954ef5e5ed90fb7d28c013518f4c2e6bcd20a1 ("sim: frv: scope the
	unique configure flag"), I changed the default from off to on.
	While the feature is nice for developers, it breaks a bunch of
	tests which aren't expecting this extra output.  So flip it back
	to off by default.

2021-11-10  Pekka Seppänen  <pexu@sourceware.mail.kapsi.fi>

	PR28575, readelf.c and strings.c use undefined type uint
	Since --unicode support (commit b3aa80b45c4) both binutils/readelf.c
	and binutils/strings.c use 'uint' in a few locations.  It likely
	should be 'unsigned int' since there isn't anything defining 'uint'
	within binutils (besides zlib) and AFAIK it isn't a standard type.

		* readelf.c (print_symbol): Replace uint with unsigned int.
		* strings.c (string_min, display_utf8_char): Likewise.
		(print_unicode_stream_body, print_unicode_stream): Likewise.
		(print_strings): Likewise.
		(get_unicode_byte): Wrap long line.

2021-11-10  Clément Chigot  <clement.chigot@atos.net>

	ld: set correct flags for AIX shared tests
	Previous flags were aimed to be run with XLC.
	Nowadays, only GCC is being tested with GNU toolchain. Moreover,
	recent XLC versions might also accept "-shared".

		* testsuite/ld-shared/shared.exp: Adjust shared flags.

2021-11-10  Clément Chigot  <clement.chigot@atos.net>

	PR 28447: implement multiple parameters for .file on XCOFF
	On XCOFF, ".file" pseudo-op allows 3 extras parameters to provide
	additional information to AIX linker, or its debugger. These are
	stored in auxiliary entries of the C_FILE symbol.

	bfd/
		PR 28447
		* coffcode.h (combined_entry_type): Add extrap field.
		(coff_bigobj_swap_aux_in): Adjust names of x_file fields.
		(coff_bigobj_swap_aux_out): Likewise.
		* coffgen.c (coff_write_auxent_fname): New function.
		(coff_fix_symbol_name): Write x_file using
		 coff_write_auxent_fname.
		(coff_write_symbol): Likewise.
		(coff_write_symbols): Add C_FILE auxiliary entries to
		string table if needed.
		(coff_get_normalized_symtab): Adjust names of x_file fields.
		Normalize C_FILE auxiliary entries.
		(coff_print_symbol): Print C_FILE auxiliary entries.
		* coff-rs6000.c (_bfd_xcoff_swap_aux_in): Adjust names of
		x_file fields.
		(_bfd_xcoff_swap_aux_out): Likewise.
		* coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Likewise.
		(_bfd_xcoff64_swap_aux_out): Likewise.
		* cofflink.c (_bfd_coff_final_link): Likewise.
		(_bfd_coff_link_input_bfd): Likewise.
		* coffswap.h (coff_swap_aux_in): Likewise.
		* peXXigen.c (_bfd_XXi_swap_aux_in): Likewise.
		(_bfd_XXi_swap_aux_out): Likewise.
		* xcofflink.c (xcoff_link_input_bfd): Likewise.
		* libcoff.h: Regenerate.
	gas/
		* config/tc-ppc.c (ppc_file): New function.
		* config/tc-ppc.h (OBJ_COFF_MAX_AUXENTRIES): Change to 4.
		* testsuite/gas/ppc/aix.exp: Add tests.
		* testsuite/gas/ppc/xcoff-file-32.d: New test.
		* testsuite/gas/ppc/xcoff-file-64.d: New test.
		* testsuite/gas/ppc/xcoff-file.s: New test.
	include/
		* coff/internal.h (union internal_auxent): Change x_file to be a
		  struct instead of a union. Add x_ftype field.
		* coff/rs6000.h (union external_auxent): Add x_resv field.
		* coff/xcoff.h (XFT_FN): New define.
		(XFT_CT): Likewise.
		(XFT_CV): Likewise.
		(XFT_CD): Likewise.

2021-11-10  Kevin Buettner  <kevinb@redhat.com>

	Test case for Bug 28308
	The purpose of this test is described in the comments in
	dprintf-execution-x-script.exp.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28308

	The name of this new test was based on that of an existing test,
	bp-cmds-execution-x-script.exp.  I started off by copying that test,
	adding to it, and then rewriting almost all of it.  It's different
	enough that I decided that listing the copyright year as 2021
	was sufficient.

2021-11-10  Kevin Buettner  <kevinb@redhat.com>

	Fix PR 28308 - dprintf breakpoints not working when run from script
	This commit fixes Bug 28308, titled "Strange interactions with
	dprintf and break/commands":

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28308

	Since creating that bug report, I've found a somewhat simpler way of
	reproducing the problem.  I've encapsulated it into the GDB test case
	which I've created along with this bug fix.  The name of the new test
	is gdb.base/dprintf-execution-x-script.exp, I'll demonstrate the
	problem using this test case, though for brevity, I've placed all
	relevant files in the same directory and have renamed the files to all
	start with 'dp-bug' instead of 'dprintf-execution-x-script'.

	The script file, named dp-bug.gdb, consists of the following commands:

	dprintf increment, "dprintf in increment(), vi=%d\n", vi
	break inc_vi
	commands
	  continue
	end
	run

	Note that the final command in this script is 'run'.  When 'run' is
	instead issued interactively, the  bug does not occur.  So, let's look
	at the interactive case first in order to see the correct/expected
	output:

	$ gdb -q -x dp-bug.gdb dp-bug
	... eliding buggy output which I'll discuss later ...
	(gdb) run
	Starting program: /mesquite2/sourceware-git/f34-master/bld/gdb/tmp/dp-bug
	vi=0
	dprintf in increment(), vi=0

	Breakpoint 2, inc_vi () at dprintf-execution-x-script.c:26
	26	in dprintf-execution-x-script.c
	vi=1
	dprintf in increment(), vi=1

	Breakpoint 2, inc_vi () at dprintf-execution-x-script.c:26
	26	in dprintf-execution-x-script.c
	vi=2
	dprintf in increment(), vi=2

	Breakpoint 2, inc_vi () at dprintf-execution-x-script.c:26
	26	in dprintf-execution-x-script.c
	vi=3
	[Inferior 1 (process 1539210) exited normally]

	In this run, in which 'run' was issued from the gdb prompt (instead
	of at the end of the script), there are three dprintf messages along
	with three 'Breakpoint 2' messages.  This is the correct output.

	Now let's look at the output that I snipped above; this is the output
	when 'run' is issued from the script loaded via GDB's -x switch:

	$ gdb -q -x dp-bug.gdb dp-bug
	Reading symbols from dp-bug...
	Dprintf 1 at 0x40116e: file dprintf-execution-x-script.c, line 38.
	Breakpoint 2 at 0x40113a: file dprintf-execution-x-script.c, line 26.
	vi=0
	dprintf in increment(), vi=0

	Breakpoint 2, inc_vi () at dprintf-execution-x-script.c:26
	26	dprintf-execution-x-script.c: No such file or directory.
	vi=1

	Breakpoint 2, inc_vi () at dprintf-execution-x-script.c:26
	26	in dprintf-execution-x-script.c
	vi=2

	Breakpoint 2, inc_vi () at dprintf-execution-x-script.c:26
	26	in dprintf-execution-x-script.c
	vi=3
	[Inferior 1 (process 1539175) exited normally]

	In the output shown above, only the first dprintf message is printed.
	The 2nd and 3rd dprintf messages are missing!  However, all three
	'Breakpoint 2...' messages are still printed.

	Why does this happen?

	bpstat_do_actions_1() in gdb/breakpoint.c contains the following
	comment and code near the start of the function:

	  /* Avoid endless recursion if a `source' command is contained
	     in bs->commands.  */
	  if (executing_breakpoint_commands)
	    return 0;

	  scoped_restore save_executing
	    = make_scoped_restore (&executing_breakpoint_commands, 1);

	Also, as described by this comment prior to the 'async' field
	in 'struct ui' in top.h, the main UI starts off in sync mode
	when processing command line arguments:

	  /* True if the UI is in async mode, false if in sync mode.  If in
	     sync mode, a synchronous execution command (e.g, "next") does not
	     return until the command is finished.  If in async mode, then
	     running a synchronous command returns right after resuming the
	     target.  Waiting for the command's completion is later done on
	     the top event loop.  For the main UI, this starts out disabled,
	     until all the explicit command line arguments (e.g., `gdb -ex
	     "start" -ex "next"') are processed.  */

	This combination of things, the state of the static global
	'executing_breakpoint_commands' plus the state of the async
	field in the main UI causes this behavior.

	This is a backtrace after hitting the dprintf breakpoint for
	the second time when doing 'run' from the script file, i.e.
	non-interactively:

	Thread 1 "gdb" hit Breakpoint 3, bpstat_do_actions_1 (bsp=0x7fffffffc2b8)
	    at /ironwood1/sourceware-git/f34-master/bld/../../worktree-master/gdb/breakpoint.c:4431
	4431	  if (executing_breakpoint_commands)

	 #0  bpstat_do_actions_1 (bsp=0x7fffffffc2b8)
	     at gdb/breakpoint.c:4431
	 #1  0x00000000004d8bc6 in dprintf_after_condition_true (bs=0x1538090)
	     at gdb/breakpoint.c:13048
	 #2  0x00000000004c5caa in bpstat_stop_status (aspace=0x116dbc0, bp_addr=0x40116e, thread=0x137f450, ws=0x7fffffffc718,
	     stop_chain=0x1538090) at gdb/breakpoint.c:5498
	 #3  0x0000000000768d98 in handle_signal_stop (ecs=0x7fffffffc6f0)
	     at gdb/infrun.c:6172
	 #4  0x00000000007678d3 in handle_inferior_event (ecs=0x7fffffffc6f0)
	     at gdb/infrun.c:5662
	 #5  0x0000000000763cd5 in fetch_inferior_event ()
	     at gdb/infrun.c:4060
	 #6  0x0000000000746d7d in inferior_event_handler (event_type=INF_REG_EVENT)
	     at gdb/inf-loop.c:41
	 #7  0x00000000007a702f in handle_target_event (error=0, client_data=0x0)
	     at gdb/linux-nat.c:4207
	 #8  0x0000000000b8cd6e in gdb_wait_for_event (block=block@entry=0)
	     at gdbsupport/event-loop.cc:701
	 #9  0x0000000000b8d032 in gdb_wait_for_event (block=0)
	     at gdbsupport/event-loop.cc:597
	 #10 gdb_do_one_event () at gdbsupport/event-loop.cc:212
	 #11 0x00000000009d19b6 in wait_sync_command_done ()
	     at gdb/top.c:528
	 #12 0x00000000009d1a3f in maybe_wait_sync_command_done (was_sync=0)
	     at gdb/top.c:545
	 #13 0x00000000009d2033 in execute_command (p=0x7fffffffcb18 "", from_tty=0)
	     at gdb/top.c:676
	 #14 0x0000000000560d5b in execute_control_command_1 (cmd=0x13b9bb0, from_tty=0)
	     at gdb/cli/cli-script.c:547
	 #15 0x000000000056134a in execute_control_command (cmd=0x13b9bb0, from_tty=0)
	     at gdb/cli/cli-script.c:717
	 #16 0x00000000004c3bbe in bpstat_do_actions_1 (bsp=0x137f530)
	     at gdb/breakpoint.c:4469
	 #17 0x00000000004c3d40 in bpstat_do_actions ()
	     at gdb/breakpoint.c:4533
	 #18 0x00000000006a473a in command_handler (command=0x1399ad0 "run")
	     at gdb/event-top.c:624
	 #19 0x00000000009d182e in read_command_file (stream=0x113e540)
	     at gdb/top.c:443
	 #20 0x0000000000563697 in script_from_file (stream=0x113e540, file=0x13bb0b0 "dp-bug.gdb")
	     at gdb/cli/cli-script.c:1642
	 #21 0x00000000006abd63 in source_gdb_script (extlang=0xc44e80 <extension_language_gdb>, stream=0x113e540,
	     file=0x13bb0b0 "dp-bug.gdb") at gdb/extension.c:188
	 #22 0x0000000000544400 in source_script_from_stream (stream=0x113e540, file=0x7fffffffd91a "dp-bug.gdb",
	     file_to_open=0x13bb0b0 "dp-bug.gdb")
	     at gdb/cli/cli-cmds.c:692
	 #23 0x0000000000544557 in source_script_with_search (file=0x7fffffffd91a "dp-bug.gdb", from_tty=1, search_path=0)
	     at gdb/cli/cli-cmds.c:750
	 #24 0x00000000005445cf in source_script (file=0x7fffffffd91a "dp-bug.gdb", from_tty=1)
	     at gdb/cli/cli-cmds.c:759
	 #25 0x00000000007cf6d9 in catch_command_errors (command=0x5445aa <source_script(char const*, int)>,
	     arg=0x7fffffffd91a "dp-bug.gdb", from_tty=1, do_bp_actions=false)
	     at gdb/main.c:523
	 #26 0x00000000007cf85d in execute_cmdargs (cmdarg_vec=0x7fffffffd1b0, file_type=CMDARG_FILE, cmd_type=CMDARG_COMMAND,
	     ret=0x7fffffffd18c) at gdb/main.c:615
	 #27 0x00000000007d0c8e in captured_main_1 (context=0x7fffffffd3f0)
	     at gdb/main.c:1322
	 #28 0x00000000007d0eba in captured_main (data=0x7fffffffd3f0)
	     at gdb/main.c:1343
	 #29 0x00000000007d0f25 in gdb_main (args=0x7fffffffd3f0)
	     at gdb/main.c:1368
	 #30 0x00000000004186dd in main (argc=5, argv=0x7fffffffd508)
	     at gdb/gdb.c:32

	There are two frames for bpstat_do_actions_1(), one at frame #16 and
	the other at frame #0.  The one at frame #16 is processing the actions
	for Breakpoint 2, which is a 'continue'.  The one at frame #0 is attempting
	to process the dprintf breakpoint action.  However, at this point,
	the value of 'executing_breakpoint_commands' is 1, forcing an early
	return, i.e. prior to executing the command(s) associated with the dprintf
	breakpoint.

	For the sake of comparison, this is what the stack looks like when hitting
	the dprintf breakpoint for the second time when issuing the 'run'
	command from the GDB prompt.

	Thread 1 "gdb" hit Breakpoint 3, bpstat_do_actions_1 (bsp=0x7fffffffccd8)
	    at /ironwood1/sourceware-git/f34-master/bld/../../worktree-master/gdb/breakpoint.c:4431
	4431	  if (executing_breakpoint_commands)

	 #0  bpstat_do_actions_1 (bsp=0x7fffffffccd8)
	     at gdb/breakpoint.c:4431
	 #1  0x00000000004d8bc6 in dprintf_after_condition_true (bs=0x16b0290)
	     at gdb/breakpoint.c:13048
	 #2  0x00000000004c5caa in bpstat_stop_status (aspace=0x116dbc0, bp_addr=0x40116e, thread=0x13f0e60, ws=0x7fffffffd138,
	     stop_chain=0x16b0290) at gdb/breakpoint.c:5498
	 #3  0x0000000000768d98 in handle_signal_stop (ecs=0x7fffffffd110)
	     at gdb/infrun.c:6172
	 #4  0x00000000007678d3 in handle_inferior_event (ecs=0x7fffffffd110)
	     at gdb/infrun.c:5662
	 #5  0x0000000000763cd5 in fetch_inferior_event ()
	     at gdb/infrun.c:4060
	 #6  0x0000000000746d7d in inferior_event_handler (event_type=INF_REG_EVENT)
	     at gdb/inf-loop.c:41
	 #7  0x00000000007a702f in handle_target_event (error=0, client_data=0x0)
	     at gdb/linux-nat.c:4207
	 #8  0x0000000000b8cd6e in gdb_wait_for_event (block=block@entry=0)
	     at gdbsupport/event-loop.cc:701
	 #9  0x0000000000b8d032 in gdb_wait_for_event (block=0)
	     at gdbsupport/event-loop.cc:597
	 #10 gdb_do_one_event () at gdbsupport/event-loop.cc:212
	 #11 0x00000000007cf512 in start_event_loop ()
	     at gdb/main.c:421
	 #12 0x00000000007cf631 in captured_command_loop ()
	     at gdb/main.c:481
	 #13 0x00000000007d0ebf in captured_main (data=0x7fffffffd3f0)
	     at gdb/main.c:1353
	 #14 0x00000000007d0f25 in gdb_main (args=0x7fffffffd3f0)
	     at gdb/main.c:1368
	 #15 0x00000000004186dd in main (argc=5, argv=0x7fffffffd508)
	     at gdb/gdb.c:32

	This relatively short backtrace is due to the current UI's async field
	being set to 1.

	Yet another thing to be aware of regarding this problem is the
	difference in the way that commands associated to dprintf breakpoints
	versus regular breakpoints are handled.  While they both use a command
	list associated with the breakpoint, regular breakpoints will place
	the commands to be run on the bpstat chain constructed in
	bp_stop_status().  These commands are run later on.  For dprintf
	breakpoints, commands are run via the 'after_condition_true' function
	pointer directly from bpstat_stop_status().  (The 'commands' field in
	the bpstat is cleared in dprintf_after_condition_true().  This
	prevents the dprintf commands from being run again later on when other
	commands on the bpstat chain are processed.)

	Another thing that I noticed is that dprintf breakpoints are the only
	type of breakpoint which use 'after_condition_true'.  This suggests
	that one possible way of fixing this problem, that of making dprintf
	breakpoints work more like regular breakpoints, probably won't work.
	(I must admit, however, that my understanding of this code isn't
	complete enough to say why.  I'll trust that whoever implemented it
	had a good reason for doing it this way.)

	The comment referenced earlier regarding 'executing_breakpoint_commands'
	states that the reason for checking this variable is to avoid
	potential endless recursion when a 'source' command appears in
	bs->commands.  We know that a dprintf command is constrained to either
	1) execution of a GDB printf command, 2) an inferior function call of
	a printf-like function, or 3) execution of an agent-printf command.
	Therefore, infinite recursion due to a 'source' command cannot happen
	when executing commands upon hitting a dprintf breakpoint.

	I chose to fix this problem by having dprintf_after_condition_true()
	directly call execute_control_commands().  This means that it no
	longer attempts to go through bpstat_do_actions_1() avoiding the
	infinite recursion check for potential 'source' commands on the
	command chain.  I think it simplifies this code a little bit too, a
	definite bonus.

	Summary:

		* breakpoint.c (dprintf_after_condition_true): Don't call
		bpstat_do_actions_1().  Call execute_control_commands()
		instead.

2021-11-10  Alan Modra  <amodra@gmail.com>

	Re: Add --unicode option
		* objdump: Whitespace fixes.
		(long_options): Correct "ctf" entry.

2021-11-10  Alan Modra  <amodra@gmail.com>

	Re: Add --unicode option
	At low optimisation levels gcc may warn.

		* strings.c (print_unicode_stream_body): Avoid bogus "may be
		used unitialised" warning.

2021-11-10  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-09  Alan Modra  <amodra@gmail.com>

	PR28543, readelf entered an infinite loop
	This little tweak terminates fuzzed binary readelf output a little
	quicker.

		PR 28543
		* dwarf.c (read_and_display_attr_value): Consume a byte when
		form is unrecognized.

2021-11-09  Alan Modra  <amodra@gmail.com>

	PR28542, Undefined behaviours in readelf.c
		PR 28542
		* readelf.c (dump_relocations): Check that section headers have
		been read before attempting to access section name.
		(print_dynamic_symbol): Likewise.
		(process_mips_specific): Delete dead code.

2021-11-09  Pedro Alves  <pedro@palves.net>

	gdb::array_view slicing/container selftest - test std::array too
	Change-Id: I2141b0b8a09f6521a59908599eb5ba1a19b18dc6

2021-11-09  Simon Marchi  <simon.marchi@efficios.com>

	gdb.debuginfod/fetch_src_and_symbols.exp: fix when GDB is built with AddressSanitizer
	This test fails for me, showing:

	    ERROR: tcl error sourcing /home/smarchi/src/binutils-gdb/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp.
	    ERROR: This GDB was configured as follows:
	       configure --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
	                 --with-auto-load-dir=$debugdir:$datadir/auto-load
	                 --with-auto-load-safe-path=$debugdir:$datadir/auto-load
	    ... and much more ...

	The problem is that TCL's exec throws an error as soon as the exec'ed
	process outputs on stderr.  When GDB is built with ASan, it prints some
	warnings about pre-existing signal handlers:

	    warning: Found custom handler for signal 7 (Bus error) preinstalled.
	    warning: Found custom handler for signal 8 (Floating point exception) preinstalled.
	    warning: Found custom handler for signal 11 (Segmentation fault) preinstalled.

	Pass --quiet to GDB to avoid these warnings.

	Change-Id: I3751d89b9b1df646da19149d7cb86775e2d3e80f

2021-11-09  Tom Tromey  <tromey@adacore.com>

	Correctly handle DW_LLE_start_end
	When the code to handle DW_LLE_start_end was added (as part of some
	DWARF 5 work), it was written to add the base address.  However, this
	seems incorrect -- the DWARF standard describes this as an address,
	not an offset from the base address.

	This patch changes a couple of spots in dwarf2/loc.c to fix this
	problem.  It then changes decode_debug_loc_addresses to return
	DEBUG_LOC_OFFSET_PAIR instead, which preserves the previous semantics.

	This only showed up on the RISC-V target internally, due to the
	combination of DWARF 5 and a newer version of GCC.  I've updated a
	couple of existing loclists test cases to demonstrate the bug.

2021-11-09  Tom Tromey  <tromey@adacore.com>

	Fix build on rhES5
	The rhES5 build failed due to an upstream import a while back.  The
	bug here is that, while the 'personality' function exists,
	ADDR_NO_RANDOMIZE is only defined in <linux/personality.h>, not
	<sys/personality.h>.

	However, <linux/personality.h> does not declare the 'personality'
	function, and <sys/personality.h> and <linux/personality.h> cannot
	both be included.

	This patch restores one of the removed configure checks and updates
	the code to check it.

	We had this as a local patch at AdaCore, because it seemed like there
	was no interest upstream.  However, now it turns out that this fixes
	PR build/28555, so I'm sending it now.

2021-11-09  H.J. Lu  <hjl.tools@gmail.com>

	doc/ctf-spec.texi: Remove "@validatemenus off"
	Remove @validatemenus from ctf-spec.texi, which has been removed from
	texinfo by

	commit a16dd1a9ece08568a1980b9a65a3a9090717997f
	Author: Gavin Smith <gavinsmith0123@gmail.com>
	Date:   Mon Oct 12 16:32:37 2020 +0100

	    * doc/texinfo.texi
	    (Writing a Menu, Customization Variables for @-Commands)
	    (Command List),
	    * doc/refcard/txirefcard.tex
	    Remove @validatemenus.
	    * tp/Texinfo/XS/Makefile.am (command_ids.h): Use gawk instead
	    of awk.  Avoid discouraged "$p" usage, using "$(p)" instead.
	    * tp/Texinfo/XS/configure.ac: Check for gawk.

	commit 128acab3889b51809dc3bd3c6c74b61d13f7f5f4
	Author: Gavin Smith <gavinsmith0123@gmail.com>
	Date:   Thu Jan 3 14:51:53 2019 +0000

	    Update refcard.

	    * doc/refcard/txirefcard.tex: @setfilename is no longer
	    mandatory.  Do not mention @validatemenus or explicitly giving
	    @node pointers, as these are not very important features.

		PR libctf/28567
		* doc/ctf-spec.texi: Remove "@validatemenus off".

2021-11-09  Nick Clifton  <nickc@redhat.com>

	Add --unicode option to control how unicode characters are handled by display tools.
		* nm.c: Add --unicode option to control how unicode characters are
		handled.
		* objdump.c: Likewise.
		* readelf.c: Likewise.
		* strings.c: Likewise.
		* binutils.texi: Document the new feature.
		* NEWS: Document the new feature.
		* testsuite/binutils-all/unicode.exp: New file.
		* testsuite/binutils-all/nm.hex.unicode
		* testsuite/binutils-all/strings.escape.unicode
		* testsuite/binutils-all/objdump.highlight.unicode
		* testsuite/binutils-all/readelf.invalid.unicode

2021-11-09  Mike Frysinger  <vapier@gentoo.org>

	sim: sh: simplify testsuite a bit
	Switch from the centralized list in the exp file to each test declaring
	its own requirements which they're already (mostly) doing.  This will
	increase coverage slightly by running more tests in more configurations
	since the hardcoded exp list was a little out of date.

	We have to mark the psh* tests as shdsp only (to match what the exp
	file was doing), mark the fsca & fsrra tests as failing (since they
	weren't even being run by the exp file), and to fix the expected
	output & status of the fail test.

2021-11-09  Mike Frysinger  <vapier@gentoo.org>

	sim: cris: clean up missing func prototype warnings
	Move some unused funcs under existing #if 0 protection, mark a few
	local funcs as static, and add missing prototypes for the rest which
	are used from other files.  This fixes all the fatal warnings in the
	mloop files so we can turn -Werror on here fully.

2021-11-09  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-08  Lancelot SIX  <lsix@lancelotsix.com>

	Improve gdb::array_view ctor from contiguous containers
	While reading the interface of gdb::array_view, I realized that the
	constructor that builds an array_view on top of a contiguous container
	(such as std::vector, std::array or even gdb::array_view) can be
	missused.

	Lets consider the following code sample:

		struct Parent
		{
		  Parent (int a): a { a } {}
		  int a;
		};

		std::ostream &operator<< (std::ostream& os, const Parent & p)
		{ os << "Parent {a=" << p.a << "}"; return os; }

		struct Child : public Parent
		{
		  Child (int a, int b): Parent { a }, b { b } {}
		  int b;
		};

		std::ostream &operator<< (std::ostream& os, const Child & p)
		{ os << "Child {a=" << p.a << ", b=" << p.b << "}"; return os; }

		template <typename T>
		void print (const gdb::array_view<const T> &p)
		{
		  std::for_each (p.begin (), p.end (), [](const T &p) { std::cout << p << '\n'; });
		}

	Then with the current interface nothinng prevents this usage of
	array_view to be done:

		const std::array<Child, 3> elts = {
		  Child {1, 2},
		  Child {3, 4},
		  Child {5, 6}
		};
		print_all<Parent> (elts);

	This compiles fine and produces the following output:

		Parent {a=1}
		Parent {a=2}
		Parent {a=3}

	which is obviously wrong.  There is nowhere in memory a Parent-like
	object for which the A member is 2 and this call to print_all<Parent>
	shold not compile at all (calling print_all<Child> is however fine).

	This comes down to the fact that a Child* is convertible into a Parent*,
	and that an array view is constructed to a pointer to the first element
	and a size.  The valid type pointed to that can be used with this
	constructor are restricted using SFINAE, which requires that a
	pointer to a member into the underlying container can be converted into a
	pointer the array_view's data type.

	This patch proposes to change the constraints on the gdb::array_view
	ctor which accepts a container now requires that the (decayed) type of
	the elements in the container match the (decayed) type of the array_view
	being constructed.

	Applying this change required minimum adjustment in GDB codebase, which
	are also included in this patch.

	Tested by rebuilding.

2021-11-08  Lancelot SIX  <lsix@lancelotsix.com>

	Add a const version of gdb_argv:as_array_view
	This commits adds const versions for the GET and AS_ARRAX_VIEW methods
	of gdb_argv.  Those methods will be required in the following patch of
	the series.

2021-11-08  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: fix nulltr -> nullptr typo
	Change-Id: I04403bd85ec3fa75ea14130d68daba675a2a8aeb

2021-11-08  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: tweak scoped_disable_commit_resumed uses when resuming all threads in non-stop
	When doing "continue -a" in non-stop mode, each thread is individually
	resumed while the commit resumed state is enabled.  This forces the
	target to commit each resumption immediately, instead of being able to
	batch things.

	The reason is that there is no scoped_disable_commit_resumed around the
	loop over threads in continue_1, when "non_stop && all_threads" is true.
	Since the proceed function is called once for each thread, the
	scoped_disable_commit_resumed in proceed therefore forces commit-resumed
	between each thread resumption.  Add the necessary
	scoped_disable_commit_resumed in continue_1 to avoid that.

	I looked at the MI side of things, the function exec_continue, and found
	that it was correct.  There is a similar iteration over threads, and
	there is a scoped_disable_commit_resumed at the function scope.  This is
	not wrong, but a bit more than we need.  The branches that just call
	continue_1 do not need it, as continue_1 takes care of disabling commit
	resumed.  So, move the scoped_disable_commit_resumed to the inner scope
	where we iterate on threads and proceed them individually.

	Here's an example debugging a multi-threaded program attached by
	gdbserver (debug output trimmed for brevity):

	    $ ./gdb -nx -q --data-directory=data-directory -ex "set non-stop" -ex "tar rem :1234"
	    (gdb) set debug remote
	    (gdb) set debug infrun
	    (gdb) c -a
	    Continuing.
	    [infrun] proceed: enter
	      [infrun] scoped_disable_commit_resumed: reason=proceeding
	      [remote] Sending packet: $vCont;c:p14388.14388#90
	      [infrun] reset: reason=proceeding
	      [infrun] maybe_set_commit_resumed_all_targets: enabling commit-resumed for target remote
	      [infrun] maybe_call_commit_resumed_all_targets: calling commit_resumed for target remote
	    [infrun] proceed: exit
	    [infrun] proceed: enter
	      [infrun] scoped_disable_commit_resumed: reason=proceeding
	      [remote] Sending packet: $vCont;c:p14388.1438a#b9
	      [infrun] reset: reason=proceeding
	      [infrun] maybe_set_commit_resumed_all_targets: enabling commit-resumed for target remote
	      [infrun] maybe_call_commit_resumed_all_targets: calling commit_resumed for target remote
	    [infrun] proceed: exit
	    ... and so on for each thread ...

	Notice how we send one vCont;c for each thread.  With the patch applied, we
	send a single vCont;c at the end:

	    [infrun] scoped_disable_commit_resumed: reason=continue all threads in non-stop
	    [infrun] proceed: enter
	      [infrun] scoped_disable_commit_resumed: reason=proceeding
	      [infrun] reset: reason=proceeding
	    [infrun] proceed: exit
	    [infrun] clear_proceed_status_thread: Thread 85790.85792
	    [infrun] proceed: enter
	      [infrun] scoped_disable_commit_resumed: reason=proceeding
	      [infrun] reset: reason=proceeding
	    [infrun] proceed: exit
	    ... proceeding threads individually ...
	    [infrun] reset: reason=continue all threads in non-stop
	    [infrun] maybe_set_commit_resumed_all_targets: enabling commit-resumed for target remote
	    [infrun] maybe_call_commit_resumed_all_targets: calling commit_resumed for target remote
	    [remote] Sending packet: $vCont;c#a8

	Change-Id: I331dd2473c5aa5114f89854196fed2a8fdd122bb

2021-11-08  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: make dwarf2_find_containing_comp_unit take a dwarf2_per_bfd
	While reading another patch, I saw that this function didn't need to
	take a dwarf2_per_objfile, but could take a dwarf2_per_bfd instead.
	It doesn't change the behavior, but doing this shows that this function
	is objfile-independent (can work with only the shared per-bfd data).

	Change-Id: I58f9c9cef6688902e95226480285da2d0005d77f

2021-11-08  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove bpstat typedef, rename bpstats to bpstat
	I don't find that the bpstat typedef, which hides a pointer, is
	particularly useful.  In fact, it confused me many times, and I just see
	it as something to remember that adds cognitive load.  Also, with C++,
	we might want to be able to pass bpstats objects by const-reference, not
	necessarily by pointer.

	So, remove the bpstat typedef and rename struct bpstats to bpstat (since
	it represents one bpstat, it makes sense that it is singular).

	Change-Id: I52e763b6e54ee666a9e045785f686d37b4f5f849

2021-11-08  Nick Alcock  <nick.alcock@oracle.com>

	libctf: add CTF format specification
	It's been a long time since most of this was written: it's long past
	time to put it in the binutils source tree.  It's believed correct and
	complete insofar as it goes: it documents format v3 (the current
	version) but not the libctf API or any earlier versions.  (The
	earlier versions can be read by libctf but not generated by it, and you
	are highly unlikely ever to see an example of any of them.)

	libctf/ChangeLog
	2021-11-08  Nick Alcock  <nick.alcock@oracle.com>

		* doc/ctf-spec.texi: New file.
		* configure.ac (MAKEINFO): Add.
		(BUILD_INFO): Likewise.
		(AC_CONFIG_FILES) [doc/Makefile]: Add.
		* Makefile.am [BUILD_INFO] (SUBDIRS): Add doc/.
		* doc/Makefile.am: New file.
		* doc/Makefile.in: Likewise.
		* configure: Regenerated.
		* Makefile.in: Likewise.

2021-11-08  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-07  Alan Modra  <amodra@gmail.com>

	Correct ld script wildcard matching description
	Goes with commit 68bbb9f788d0

		* ld.texi (Input Section Wildcards): Delete paragraph incorrectly
		saying '*' does not match '/'.

2021-11-07  Mike Frysinger  <vapier@gentoo.org>

	sim: sh: fix conversion of PC to an integer
	On LLP64 targets where sizeof(long) != sizeof(void*), this code fails:
	sim/sh/interp.c:704:24: error: cast from pointer to integer of different size  -Werror=pointer-to-int-cast]
	  704 |   do { memstalls += ((((long) PC & 3) != 0) ? (n) : ((n) - 1)); } while (0)
	      |                        ^

	Since this code simply needs to check alignment, cast it using uintptr_t
	which is the right type for this.

2021-11-07  Mike Frysinger  <vapier@gentoo.org>

	sim: sh: clean up time(NULL) call
	Casting 0 to a pointer via (long *) doesn't work on LLP64 targets:
	error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]

	It's also unnecessary here.  We can simply pass NULL like every other
	bit of code does.

2021-11-07  Mike Frysinger  <vapier@gentoo.org>

	sim: sh: break utime logic out of _WIN32 check
	Some _WIN32 targets provide utime (like mingw), so move the header
	include out from _WIN32 and under the specific HAVE_UTIME_H check.

	sim: sh: drop errno extern
	This isn't needed on any reasonable target nowadays, and no other
	source does this, and breaks with some mingw targets, so punt the
	extern entirely.

	sim: sh: fix isnan redefinition with mingw targets
	The code assumes that all _WIN32 targets are the same and can
	define isnan to _isnan.  For mingw targets, they provide an isnan
	define already, so no need for the fallback here.

	sim: arm/bfin/rx: undefine page size from system headers
	Some targets (like cygwin) will export page size defines that clash
	with our local usage here.  Undefine the system one to fix building
	for these targets.

	sim: ppc: switch to libiberty environ.h
	Drop our compat code and assume environ exists to simplify.
	We did this for all other targets already, but ppc was missed.

	sim: sh: enable -Werror everywhere
	With most of the warnings fixed in interp.c, we can enable -Werror
	here too now.  There are some -Wmaybe-uninitialized warnings still
	lurking that look legitimate, but we don't flag those are fatal,
	and I don't have the expertise to dive into each opcode to figure
	out the right way to clean them up.

	sim: sh: fix uninitialized variable usage with pdmsb
	This block of code relies on i to control which bits to test and how
	many times to run through the loop, but it never actually initialized
	it.  There is another chunk of code that handles the pdmsb instruction
	that sets i to 16, so use that here too assuming it's correct.  The
	programming manual suggests this is the right value too, but I am by
	no means a SuperH DSP expert.  The tests are still passing though ...

	sim: sh: constify a few read-only lookup tables

	sim: sh: fix various parentheses warnings
	Add parentheses to a bunch of places where the compiler suggests we
	do to avoid confusion to most readers.

	sim: sh: fix unused-value warnings
	These macro expansions are deliberate in not using the computed value
	so that they trigger side-effects (possible invalid memory accesses)
	but while otherwise being noops.  Add a (void) cast so the compiler
	knows these are intentional.

	sim: sh: rework register layout with anonymous unions & structs
	Now that we require C11, we can leverage anonymous unions & structs
	to fix a long standing issue with the SH register layout.  The use
	of sregs.i for sh-dsp has generated a lot of compiler warnings about
	the access being out of bounds -- it only has 7 elements declared,
	but code goes beyond that to reach into the fregs that follow.  But
	now that we have anonymous unions, we can reduce the nested names
	and have sregs cover all of these registers.

2021-11-07  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-06  Tiezhu Yang  <yangtiezhu@loongson.cn>

	sim: mips: use sim_fpu_to{32,64}u to fix build warnings
	Since the first argument type is unsigned32 or unsigned64, just use
	sim_fpu_to{32,64}u instead of sim_fpu_to{32,64}i to fix the following
	build warnings:

	  CC     cp1.o
	.../sim/mips/cp1.c: In function 'convert':
	.../sim/mips/cp1.c:1425:32: warning: pointer targets in passing argument 1 of 'sim_fpu_to32i' differ in signedness [-Wpointer-sign]
	       status |= sim_fpu_to32i (&result32, &wop, round);
	                                ^~~~~~~~~
	In file included from .../sim/mips/sim-main.h:67,
	                 from .../sim/mips/cp1.c:46:
	.../sim/mips/../common/sim-fpu.h:270:22: note: expected 'signed32 *' {aka 'int *'} but argument is of type 'unsigned32 *' {aka 'unsigned int *'}
	 INLINE_SIM_FPU (int) sim_fpu_to32i (signed32 *i, const sim_fpu *f,
	                      ^~~~~~~~~~~~~
	.../sim/mips/cp1.c:1429:32: warning: pointer targets in passing argument 1 of 'sim_fpu_to64i' differ in signedness [-Wpointer-sign]
	       status |= sim_fpu_to64i (&result64, &wop, round);
	                                ^~~~~~~~~
	In file included from .../sim/mips/sim-main.h:67,
	                 from .../sim/mips/cp1.c:46:
	.../sim/mips/../common/sim-fpu.h:274:22: note: expected 'signed64 *' {aka 'long int *'} but argument is of type 'unsigned64 *' {aka 'long unsigned int *'}
	 INLINE_SIM_FPU (int) sim_fpu_to64i (signed64 *i, const sim_fpu *f,
	                      ^~~~~~~~~~~~~
	.../sim/mips/cp1.c: In function 'convert_ps':
	.../sim/mips/cp1.c:1528:34: warning: pointer targets in passing argument 1 of 'sim_fpu_to32i' differ in signedness [-Wpointer-sign]
	       status_u |= sim_fpu_to32i (&res_u, &wop_u, round);
	                                  ^~~~~~
	In file included from .../sim/mips/sim-main.h:67,
	                 from .../sim/mips/cp1.c:46:
	.../sim/mips/../common/sim-fpu.h:270:22: note: expected 'signed32 *' {aka 'int *'} but argument is of type 'unsigned32 *' {aka 'unsigned int *'}
	 INLINE_SIM_FPU (int) sim_fpu_to32i (signed32 *i, const sim_fpu *f,
	                      ^~~~~~~~~~~~~
	.../sim/mips/cp1.c:1529:34: warning: pointer targets in passing argument 1 of 'sim_fpu_to32i' differ in signedness [-Wpointer-sign]
	       status_l |= sim_fpu_to32i (&res_l, &wop_l, round);
	                                  ^~~~~~
	In file included from .../sim/mips/sim-main.h:67,
	                 from .../sim/mips/cp1.c:46:
	.../sim/mips/../common/sim-fpu.h:270:22: note: expected 'signed32 *' {aka 'int *'} but argument is of type 'unsigned32 *' {aka 'unsigned int *'}
	 INLINE_SIM_FPU (int) sim_fpu_to32i (signed32 *i, const sim_fpu *f,
	                      ^~~~~~~~~~~~~

2021-11-06  Alan Modra  <amodra@gmail.com>

	Modernise yyerror
	Newer versions of bison emit a prototype for yyerror
		void yyerror (const char *);
	This clashes with some of our old code that declares yyerror to return
	an int.  Fix that in most cases by modernizing yyerror.  bfin-parse.y
	uses the return value all over the place, so for there disable
	generation of the prototype as specified by posix.

	binutils/
		* arparse.y (yyerror): Return void.
		* dlltool.c (yyerror): Likewise.
		* dlltool.h (yyerror): Likewise.
		* sysinfo.y (yyerror): Likewise.
		* windmc.h (yyerror): Likewise.
		* mclex.c (mc_error): Extract from ..
		(yyerror): ..here, both now returning void.
	gas/
		* config/bfin-parse.y (yyerror): Define.
		(yyerror): Make static.
		* itbl-parse.y (yyerror): Return void.
	ld/
		* deffilep.y (def_error): Return void.

2021-11-06  Alan Modra  <amodra@gmail.com>

	ubsan: undefined shift in mach-o.c
	This one was logically wrong too.  If file_ptr was 64 bits, then -1U
	is extended to 0x00000000ffffffff, probably not what was intended
	here.

		* mach-o.c (FILE_ALIGN): Correct expression.

2021-11-06  Fangrui Song  <maskray@google.com>

	readelf: Support RELR in -S and -d and output
	readelf -r dumping support is not added in this patch.

	include/
		* elf/common.h: Add SHT_RELR, DT_RELR{,SZ,ENT}
	bfd/
		* elf.c (_bfd_elf_print_private_bfd_data): Add DT_RELR{,SZ,ENT}.
	binutils/
		* readelf.c (get_dynamic_type): Add DT_RELR{,SZ,ENT}.
		(get_section_type_name): Add SHT_RELR.

2021-11-06  Fangrui Song  <maskray@google.com>

	readelf: Make DT_PREINIT_ARRAYSZ's output style match DT_INIT_ARRAYSZ
	The output now looks like:

	- 0x0000000000000021 (PREINIT_ARRAYSZ)    0x10
	+ 0x0000000000000021 (PREINIT_ARRAYSZ)    16 (bytes)
	  0x0000000000000019 (INIT_ARRAY)         0xbefc90
	  0x000000000000001b (INIT_ARRAYSZ)       536 (bytes)

		* readelf.c (process_dynamic_section): Handle DT_PREINIT_ARRAYSZ.

2021-11-06  Mike Frysinger  <vapier@gentoo.org>

	sim: clarify license text via COPYING file
	The project has been using GPL v3 for a while now in the source files,
	and the arm & ppc ports have carried a copy of the COPYING file.  Lets
	move those up to the top sim dir like other projects to make it clear.

	Also drop the ppc/COPYING.LIB as it's not really referenced by any
	source as everything is GPL v3.

2021-11-06  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-05  Tom Tromey  <tom@tromey.com>

	Introduce make_unique_xstrndup
	This adds a new make_unique_xstrndup function, which is the "n"
	analogue of make_unique_xstrdup.  It also updates a couple existing
	places to use this function.

2021-11-05  Pedro Alves  <pedro@palves.net>

	Avoid /proc/pid/mem races (PR 28065)
	PR 28065 (gdb.threads/access-mem-running-thread-exit.exp intermittent
	failure) shows that GDB can hit an unexpected scenario -- it can
	happen that the kernel manages to open a /proc/PID/task/LWP/mem file,
	but then reading from the file returns 0/EOF, even though the process
	hasn't exited or execed.

	"0" out of read/write is normally what you get when the address space
	of the process the file was open for is gone, because the process
	execed or exited.  So when GDB gets the 0, it returns memory access
	failure.  In the bad case in question, the process hasn't execed or
	exited, so GDB fails a memory access when the access should have
	worked.

	GDB has code in place to gracefully handle the case of opening the
	/proc/PID/task/LWP/mem just while the LWP is exiting -- most often the
	open fails with EACCES or ENOENT.  When it happens, GDB just tries
	opening the file for a different thread of the process.  The testcase
	is written such that it stresses GDB's logic of closing/reopening the
	/proc/PID/task/LWP/mem file, by constantly spawning short lived
	threads.

	However, there's a window where the kernel manages to find the thread,
	but the thread exits just after and clears its address space pointer.
	In this case, the kernel creates a file successfully, but the file
	ends up with no address space associated, so a subsequent read/write
	returns 0/EOF too, just like if the whole process had execed or
	exited.  This is the case in question that GDB does not handle.

	Oleg Nesterov gave this suggestion as workaround for that race:

	    gdb can open(/proc/pid/mem) and then read (say) /proc/pid/statm.
	    If statm reports something non-zero, then open() was "successfull".

	I think that might work.  However, I didn't try it, because I realized
	we have another nasty race that that wouldn't fix.

	The other race I realized is that because we close/reopen the
	/proc/PID/task/LWP/mem file when GDB switches to a different inferior,
	then it can happen that GDB reopens /proc/PID/task/LWP/mem just after
	a thread execs, and before GDB has seen the corresponding exec event.
	I.e., we can open a /proc/PID/task/LWP/mem file accessing the
	post-exec address space thinking we're accessing the pre-exec address
	space.

	A few months back, Simon, Oleg and I discussed a similar race:

	  [Bug gdb/26754] Race condition when resuming threads and one does an exec
	  https://sourceware.org/bugzilla/show_bug.cgi?id=26754

	The solution back then was to make the kernel fail any ptrace
	operation until the exec event is consumed, with this kernel commit:

	 commit dbb5afad100a828c97e012c6106566d99f041db6
	 Author:     Oleg Nesterov <oleg@redhat.com>
	 AuthorDate: Wed May 12 15:33:08 2021 +0200
	 Commit:     Linus Torvalds <torvalds@linux-foundation.org>
	 CommitDate: Wed May 12 10:45:22 2021 -0700

	     ptrace: make ptrace() fail if the tracee changed its pid unexpectedly

	This however, only applies to ptrace, not to the /proc/pid/mem file
	opening case.  Also, even if it did apply to the file open case, we
	would want to support current kernels until such a fix is more wide
	spread anyhow.

	So all in all, this commit gives up on the idea of only ever keeping
	one /proc/pid/mem file descriptor open.  Instead, make GDB open a
	/proc/pid/mem per inferior, and keep it open until the inferior exits,
	is detached or execs.  Make GDB open the file right after the inferior
	is created or is attached to or forks, at which point we know the
	inferior is stable and stopped and isn't thus going to exec, or have a
	thread exit, and so the file open won't fail (unless the whole process
	is SIGKILLed from outside GDB, at which point it doesn't matter
	whether we open the file).

	This way, we avoid both races described above, at the expense of using
	more file descriptors (one per inferior).

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28065
	Change-Id: Iff943b95126d0f98a7973a07e989e4f020c29419

2021-11-05  Andrew Burgess  <aburgess@redhat.com>

	gdb/testsuite: use gdb_get_line_number
	Replaces a hard coded line number with a use of gdb_get_line_number.

	I suspect that the line number has, over time, come adrift from where
	it was supposed to be stopping.  When the test was first added, line
	770 pointed at the final 'return 0' in function main.  Over time, as
	things have been added, line 770 now points at some random location in
	the middle of main.

	So, I've marked the 'return 0' with a comment, and now the test will
	always stop there.

	I also removed an old comment from 1997 talking about how these tests
	will only pass with the HP compiler, followed by an additional comment
	from 2000 saying that the tests now pass with GCC.

	I get the same results before and after this change.

2021-11-05  Alan Modra  <amodra@gmail.com>

	PR28541, unstable cie offset in the output of readelf
	Calculating "0 - pointer" can indeed result in seeming randomness as
	the pointer address varies.

		PR 28541
		* dwarf.c (display_debug_frames): Don't print cie offset when
		invalid, print "invalid" instead.  Remove now redundant warning.

2021-11-05  Alan Modra  <amodra@gmail.com>

	Missing va_end in aarch64-dis.c
		* aarch64-dis.c (extract_fields): Invoke va_end.

2021-11-05  Alan Modra  <amodra@gmail.com>

	PR28530, Hang in objdump on machine with 196GB RAM
	Investigating the PR28530 testcase, which has a fuzzed compression
	header with an enormous size, I noticed that decompress_contents is
	broken when the size doesn't fit in strm.avail_out.  It wouldn't be
	too hard to support larger sizes (patches welcome!) but for now just
	stop decompress_contents from returning rubbish.

		PR 28530
		* compress.c (decompress_contents): Fail when uncompressed_size
		is too big.
		(bfd_init_section_decompress_status): Likewise.

2021-11-05  Alan Modra  <amodra@gmail.com>

	asan: alpha-vms: objdump buffer overflows
		* vms-alpha.c (evax_bfd_print_desc): Sanity check buffer access.
		(evax_bfd_print_valspec, evax_bfd_print_typspec): Likewise.
		(evax_bfd_print_dst): Likewise.

2021-11-05  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-04  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: introduce "set index-cache enabled", deprecate "set index-cache on/off"
	The "set index-cache" command is used at the same time as a prefix
	command (prefix for "set index-cache directory", for example), and a
	boolean setting for turning the index-cache on and off.  Even though I
	did introduce that, I now don't think it's a good idea to do something
	non-standard like this.

	First, there's no dedicated CLI command to show whether the index-cache
	is enabled, so it has to be custom output in the "show index-cache
	handler".  Also, it means there's no good way a MI frontend can find out
	if the index-cache is enabled.  "-gdb-show index-cache" doesn't show it
	in the MI output record:

	    (gdb) interpreter-exec mi "-gdb-show index-cache"
	    ~"\n"
	    ~"The index cache is currently disabled.\n"
	    ^done,showlist={option={name="directory",value="/home/simark/.cache/gdb"}}

	Fix this by introducing "set/show index-cache enabled on/off", regular
	boolean setting commands.  Keep commands "set index-cache on" and "set
	index-cache off" as deprecated aliases of "set index-cache enabled",
	with respectively the default arguments "on" and "off".

	Update tests using "set index-cache on/off" to use the new command.
	Update the regexps in gdb.base/maint.exp to figure out whether the
	index-cache is enabled or not.  Update the doc to mention the new
	commands.

	Change-Id: I7d5aaaf7fd22bf47bd03e0023ef4fbb4023b37b3

2021-11-04  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: pass/return setting setter/getter scalar values by value
	The getter and setter in struct setting always receive and return values
	by const reference.  This is not necessary for scalar values (like bool
	and int), but more importantly it makes it a bit annoying to write a
	getter, you have to use a scratch static variable or something similar
	that you can refer to:

	  const bool &
	  my_getter ()
	  {
	    static bool value;
	    value = function_returning_bool ();
	    return value;
	  }

	Change the getter and setter function signatures to receive and return
	value by value instead of by reference, when the underlying data type is
	scalar.  This means that string-based settings will still use
	references, but all others will be by value.  The getter above would
	then be re-written as:

	  bool
	  my_getter ()
	  {
	    return function_returning_bool ();
	  }

	This is useful for a patch later in this series that defines a boolean
	setting with a getter and a setter.

	Change-Id: Ieca3a2419fcdb75a6f75948b2c920b548a0af0fd

2021-11-04  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove command_class enum class_deprecated
	The class_deprecated enumerator isn't assigned anywhere, so remove it.
	Commands that are deprecated have cmd_list_element::cmd_deprecated set
	instead.

	Change-Id: Ib35e540915c52aa65f13bfe9b8e4e22e6007903c

2021-11-04  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove unnecessary cmd_list_element::aliases nullptr checks
	Remove two unnecessary nullptr checks.  If aliases is nullptr, then the
	for loops will simply be skipped.

	Change-Id: I9132063bb17798391f8d019af305383fa8e0229f

2021-11-04  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbserver: re-generate configure
	I get some diffs when running autoconf in gdbserver, probably leftovers
	from commit 5dfe4bfcb969 ("Fix format_pieces selftest on Windows").
	Re-generate configure in that directory.

	Change-Id: Icdc9906af95fbaf1047a579914b2983f8ec5db08

2021-11-04  H.J. Lu  <hjl.tools@gmail.com>

	Revert "bfd: Always check sections with the corrupt size"
	This reverts commit e0f7ea91436dd308a094c4c101fd4169e8245a91.

2021-11-04  H.J. Lu  <hjl.tools@gmail.com>

	bfd: Always check sections with the corrupt size
	Always check sections with the corrupt size for non-MMO files.  Skip MMO
	files for compress_status == COMPRESS_SECTION_NONE since MMO has special
	handling for COMPRESS_SECTION_NONE.

		PR binutils/28530
		* compress.c (bfd_get_full_section_contents): Always check
		sections with the corrupt size.

2021-11-04  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: Clarify the behavior of .option rvc or norvc.
	Add/Remove the rvc extension to/from the riscv_subsets once the
	.option rvc/norvc is set.  So that we don't need to always check
	the riscv_opts.rvc in the riscv_subset_supports, just call the
	riscv_lookup_subset to search the subset list is enough.

	Besides, we will need to dump the instructions according to the
	elf architecture attributes.  That means the dis-assembler needs
	to parse the architecture string from the elf attribute before
	dumping any instructions, and also needs to recognized the
	INSN_CLASS* classes from riscv_opcodes.  Therefore, I suppose
	some functions will need to be moved from gas/config/tc-riscv.c
	to bfd/elfxx-riscv.c, including riscv_multi_subset_supports and
	riscv_subset_supports.  This is one of the reasons why we need
	this patch.

	This patch passes the gcc/binutils regressions of rv32emc-elf,
	rv32i-elf, rv64gc-elf and rv64gc-linux toolchains.

	bfd/
		* elfxx-riscv.c (riscv_remove_subset): Remove the extension
		from the subset list.
		(riscv_update_subset): Add/Remove an extension to/from the
		subset list.  This is used for the .option rvc or norvc.
		* elfxx-riscv.h: Added the extern bool riscv_update_subset.
	gas/
		* config/tc-riscv.c (riscv_set_options): Removed the unused
		rve flag.
		(riscv_opts): Likewise.
		(riscv_set_rve): Removed.
		(riscv_subset_supports): Removed the riscv_opts.rvc check.
		(riscv_set_arch): Don't need to call riscv_set_rve.
		(reg_lookup_internal): Call riscv_subset_supports to check
		whether the rve is supported.
		(s_riscv_option): Add/Remove the rvc extension to/from the
		subset list once the .option rvc/norvc is set.

2021-11-04  Mike Frysinger  <vapier@gentoo.org>

	sim: mips: fix missing prototype in multi-run generation
	The multi-run logic for mips involves a bit of codegen and rewriting
	of files to include per-architecture prefixes.  That can result in
	files with missing prototypes which cause compiler errors.  In the
	case of mips-sde-elf targets, we have:
	$srcdir/m16run.c -> $builddir/m16mips64r2_run.c
	  sim_engine_run -> m16mips64r2_engine_run
	$srcdir/micromipsrun.c -> micromipsmicromips_run.c
	  sim_engine_run -> micromips64micromips_engine_run

	micromipsmicromips_run.c:80:1: error: no previous prototype for 'micromips64micromips_engine_run' [-Werror=missing-prototypes]
	   80 | micromips64micromips_engine_run (SIM_DESC sd, int next_cpu_nr, int nr_cpus,

	We generate headers for those prototypes in the configure script,
	but only include them in the generated multi-run.c file.  Update the
	rewrite logic to turn the sim-engine.h include into the relevant
	generated engine include so these files also have their prototypes.
	$srcdir/m16run.c -> $builddir/m16mips64r2_run.c
	  sim-engine.h -> m16mips64r2_engine.h
	$srcdir/micromipsrun.c -> micromipsmicromips_run.c
	  sim-engine.h -> micromips64micromips_engine.h

2021-11-04  Alan Modra  <amodra@gmail.com>

	PR28540, segmentation fault on NULL byte_get
		PR 28540
		* objdump.c (dump_bfd): Don't attempt load_separate_debug_files
		when byte_get is NULL.

2021-11-04  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-03  Mike Frysinger  <vapier@gentoo.org>

	sim: ppc: inline common sim-fpu.c logic
	We will never bother building w/out a ../common/ sim directory,
	so drop ancient logic supporting that method.

2021-11-03  Mike Frysinger  <vapier@gentoo.org>

	sim: ppc: switch to common builds for callback objects
	We don't need to build this anymore ourselves since the common build
	includes it and produces the same object code.  We also need to pull
	in the split constant modules after the refactoring and pulling them
	out of nltvals.def & targ-map.o.  This doesn't matter for the sim
	directly, but does for gdb and other users of libsim.

	We also delete some conditional source tree logic since we already
	require this be the "new" combined tree with a ../common/ dir.  This
	has been the case for decades at this point.

2021-11-03  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: fix gnu-nat build
	When building gnu-nat.c, we get:

	      CXX    gnu-nat.o
	    gnu-nat.c: In member function 'virtual void gnu_nat_target::create_inferior(const char*, const string&, char**, int)':
	    gnu-nat.c:2117:13: error: 'struct inf' has no member named 'target_is_pushed'
	     2117 |   if (!inf->target_is_pushed (this))
	          |             ^~~~~~~~~~~~~~~~
	    gnu-nat.c:2118:10: error: 'struct inf' has no member named 'push_target'
	     2118 |     inf->push_target (this);
	          |          ^~~~~~~~~~~

	This is because of a confusion between the generic `struct inferior`
	variable and the gnu-nat-specific `struct inf` variable.  Fix by
	referring to `inferior`, not `inf`.

	Adjust the comment on top of `struct inf` to clarify the purpose of that
	type.

	Co-Authored-By: Andrea Monaco <andrea.monaco@autistici.org>
	Change-Id: I2fe2f7f6ef61a38d79860fd262b08835c963fc77

2021-11-03  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: set ASAN_OPTIONS=detect_leaks=0 while running tests
	We see some additional failures when running the testsuite against a GDB
	compiled with ASan, compared to a GDB compiled without ASan.  Some of
	them are caused by the memory leak report shown by the GDB process when
	it exits, and the fact that it makes it exit with a non-zero exit code.

	I generally try to remember to set ASAN_OPTIONS=detect_leaks=0 in my
	environment when running the tests, but I don't always do it.  I think
	it would be nice if the testsuite did it.  I don't see any use to have
	leak detection when running the tests.  That is, unless we ever have a
	test that ensures GDB doesn't leak memory, which isn't going to happen
	any time soon.

	Here are some tests I found that were affected by this:

	    gdb.base/batch-exit-status.exp
	    gdb.base/many-headers.exp
	    gdb.base/quit.exp
	    gdb.base/with-mf.exp
	    gdb.dwarf2/gdb-add-index.exp
	    gdb.dwarf2/gdb-add-index-symlink.exp
	    gdb.dwarf2/imported-unit-runto-main.exp

	Change-Id: I784c7df8a13979eb96587f735c1d33ba2cc6e0ca

2021-11-03  Tom Tromey  <tromey@adacore.com>

	Use section name in warnings in display_debug_loc
	While looking at an apparently malformed executable with
	"readelf --debug-dump=loc", I got this warning:

	    readelf: ./main: Warning: There is a hole [0x89 - 0x95] in .debug_loc section.

	However, the executable only has a .debug_loclists section.

	This patch fixes the warning messages in display_debug_loc to use the
	name of the section that is being processed.

	binutils/ChangeLog
	2021-11-03  Tom Tromey  <tromey@adacore.com>

		* dwarf.c (display_debug_loc): Use section name in warnings.

2021-11-03  Luis Machado  <luis.machado@linaro.org>

	[AArch64] Make gdbserver register set selection dynamic
	The current register set selection mechanism for AArch64 is static, based
	on a pre-populated array of register sets.

	This means that we might potentially probe register sets that are not
	available. This is OK if the kernel errors out during ptrace, but probing the
	tag_ctl register, for example, does not result in a ptrace error if the kernel
	supports the tagged address ABI but not MTE (PR 28355).

	Making the register set selection dynamic, based on feature checks, solves
	this and simplifies the code a bit. It allows us to list all of the register
	sets only once, and pick and choose based on HWCAP/HWCAP2 or other properties.

	I plan to backport this fix to GDB 11 as well.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28355

2021-11-03  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Fix LD_PRELOAD=/usr/lib64/libasan.so.6 gdb
	Currently for a binary compiled normally (without -fsanitize=address) but with
	LD_PRELOAD of ASAN one gets:

	$ ASAN_OPTIONS=detect_leaks=0:alloc_dealloc_mismatch=1:abort_on_error=1:fast_unwind_on_malloc=0 LD_PRELOAD=/usr/lib64/libasan.so.6 gdb
	=================================================================
	==1909567==ERROR: AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete []) on 0x602000001570
	    #0 0x7f1c98e5efa7 in operator delete[](void*) (/usr/lib64/libasan.so.6+0xb0fa7)
	...
	0x602000001570 is located 0 bytes inside of 2-byte region [0x602000001570,0x602000001572)
	allocated by thread T0 here:
	    #0 0x7f1c98e5cd1f in __interceptor_malloc (/usr/lib64/libasan.so.6+0xaed1f)
	    #1 0x557ee4a42e81 in operator new(unsigned long) (/usr/libexec/gdb+0x74ce81)
	SUMMARY: AddressSanitizer: alloc-dealloc-mismatch (/usr/lib64/libasan.so.6+0xb0fa7) in operator delete[](void*)
	==1909567==HINT: if you don't care about these errors you may set ASAN_OPTIONS=alloc_dealloc_mismatch=0
	==1909567==ABORTING

	Despite the code called properly operator new[] and operator delete[].
	But GDB's new-op.cc provides its own operator new[] which gets translated into
	malloc() (which gets recogized as operatore new(size_t)) but as it does not
	translate also operators delete[] Address Sanitizer gets confused.

	The question is how many variants of the delete operator need to be provided.
	There could be 14 operators new but there are only 4, GDB uses 3 of them.
	There could be 16 operators delete but there are only 6, GDB uses 2 of them.
	It depends on libraries and compiler which of the operators will get used.
	Currently being used:
	                 U operator new[](unsigned long)
	                 U operator new(unsigned long)
	                 U operator new(unsigned long, std::nothrow_t const&)
	                 U operator delete[](void*)
	                 U operator delete(void*, unsigned long)

	Tested on x86_64-linux.

2021-11-03  Alan Modra  <amodra@gmail.com>

	asan: dlltool buffer overflow: embedded NUL in string
	yyleng gives the pattern length, xstrdup just copies up to the NUL.
	So it is quite possible writing at an index of yyleng-2 overflows
	the xstrdup allocated string buffer.  xmemdup quite handily avoids
	this problem, even writing the terminating NUL over the trailing
	quote.  Use it in ldlex.l too where we'd already had a report of this
	problem and fixed it by hand, and to implement xmemdup0 in gas.

	binutils/
		* deflex.l (single and double quote strings): Use xmemdup.
	gas/
		* as.h (xmemdup0): Use xmemdup.
	ld/
		PR 20906
		* ldlex.l (double quote string): Use xmemdup.

2021-11-03  Mike Frysinger  <vapier@gentoo.org>

	sim: mloop: mark a few conditionally used funcs as unused
	These are marked inline, so building w/gcc at higher optimization
	levels will automatically discard them.  But building with -O0 will
	trigger unused function warnings, so fix that.

	The common before/after cover functions in the common mloop generator
	are not used by all architecture ports.  Doesn't seem to be a hard
	requirement, so marking them optional (i.e. unused) is fine.

	The cris execute function is conditionally used depending on the
	fast-build mode settings, so mark it unused too.

2021-11-03  Alan Modra  <amodra@gmail.com>

	asan: assert (addr_ranges) <= (start)
	That assert would be more obvious if it were reported as
	"addr_ranges <= end_ranges".  Fix that by using the obvious variable
	in the final loop.  Stop the assertion by using a signed comparison:
	It's possible for the rounding up of the arange pointer to exceed the
	end of the block when the block size is fuzzed.

		* dwarf.c (display_debug_aranges): Use "end_ranges" in loop
		displaying ranges rather that "start".  Simplify rounding up
		to 2*address_size boundary.  Use signed comparison in loop.

2021-11-03  Mike Frysinger  <vapier@gentoo.org>

	sim: hoist cgen mloop rules up to common builds
	These rules don't depend on the target compiler settings, so hoist
	the build logic up to the common builds for better parallelization.

	We have to extend the genmloop.sh logic a bit to allow outputting
	to a subdir since it always assumed cwd was the right place.

	We leave the cgen maintainer rules in the subdirs for now as they
	aren't normally run, and they rely on cgen logic that has not yet
	been generalized.

2021-11-03  Mike Frysinger  <vapier@gentoo.org>

	sim: hoist mn10300 & v850 igen rules up to common builds
	These rules don't depend on the target compiler settings, so hoist
	the build logic up to the common builds for better parallelization.

	We leave the mips rules in place as they depend on complicated
	arch-specific configure logic that needs to be untangled first.

2021-11-03  Mike Frysinger  <vapier@gentoo.org>

	sim: hoist gencode & opc2c build rules up to common builds
	These rules don't depend on the target compiler settings, so hoist
	the build logic up to the common builds for better parallelization.

2021-11-03  Mike Frysinger  <vapier@gentoo.org>

	opcodes: d10v: simplify header includes
	This file doesn't use anything from bfd (sysdep.h), so drop that
	include.  This avoids an implicit dependency on the generated
	config.h which can be problematic for build-time tools.

	Also swap stdio.h for stddef.h.  This file isn't doing or using
	any I/O structures, but it does need NULL.

2021-11-03  Alan Modra  <amodra@gmail.com>

	PR28523, ld.bfd created undefined symbols on ppc64
	This patch removes any fake (linker created) function descriptor
	symbol if its code entry symbol isn't dynamic, to ensure bogus dynamic
	symbols are not created.  The change to func_desc_adjust requires that
	it be run only once, which means ppc64_elf_tls_setup can't call it for
	just a few selected symbols.

		PR 28523
		* elf64-ppc.c (func_desc_adjust): If a function entry sym is
		not dynamic and has no plt entry, hide any associated fake
		function descriptor symbol.
		(ppc64_elf_edit): Move func_desc_adjust iteration over syms to..
		(ppc64_elf_tls_setup): ..here.

2021-11-03  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-02  Tom de Vries  <tdevries@suse.de>

	[gdb/tdep, rs6000] Don't skip system call in skip_prologue
	I ran into a case where a breakpoint on _exit never triggered, because it was
	set past the end of the _exit prologue, past the end of the exit_group system
	call (which does not return).

	More concretely, the breakpoint was set at the last insn show here:
	...
	Dump of assembler code for function _exit:
	   0x00007ffff7e42ea0 <+0>:     12 00 4c 3c     addis   r2,r12,18
	   0x00007ffff7e42ea4 <+4>:     60 43 42 38     addi    r2,r2,17248
	   0x00007ffff7e42ea8 <+8>:     00 00 00 60     nop
	   0x00007ffff7e42eac <+12>:    f8 ff e1 fb     std     r31,-8(r1)
	   0x00007ffff7e42eb0 <+16>:    78 1b 7f 7c     mr      r31,r3
	   0x00007ffff7e42eb4 <+20>:    f0 ff c1 fb     std     r30,-16(r1)
	   0x00007ffff7e42eb8 <+24>:    ea 00 00 38     li      r0,234
	   0x00007ffff7e42ebc <+28>:    a0 8b 22 e9     ld      r9,-29792(r2)
	   0x00007ffff7e42ec0 <+32>:    78 fb e3 7f     mr      r3,r31
	   0x00007ffff7e42ec4 <+36>:    14 6a c9 7f     add     r30,r9,r13
	   0x00007ffff7e42ec8 <+40>:    02 00 00 44     sc
	   0x00007ffff7e42ecc <+44>:    26 00 00 7c     mfcr    r0
	   0x00007ffff7e42ed0 <+48>:    00 10 09 74     andis.  r9,r0,4096
	...

	Fix this by treating system calls the same as branches in skip_prologue:
	by default, don't skip, such that the breakpoint is set at 0x00007ffff7e42eb8
	instead.

	Tested on ppc64le-linux, on a power 8 machine.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28527

2021-11-02  Tom de Vries  <tdevries@zinfandel-3.arch.suse.de>

	[gdb/testsuite] Handle SIGILL in two gdb.arch powerpc test-cases
	On powerpc64le-linux, with test-case gdb.arch/powerpc-addpcis.exp I run into
	SIGILL:
	...
	(gdb) PASS: gdb.arch/powerpc-addpcis.exp: get hexadecimal valueof "$r3"
	stepi^M
	^M
	Program terminated with signal SIGILL, Illegal instruction.^M
	The program no longer exists.^M
	(gdb) PASS: gdb.arch/powerpc-addpcis.exp: set r4
	...
	because it's a power9 insn, and I'm running on a power8 machine.

	Fix this by handling the SIGILL.  Likewise in gdb.arch/powerpc-lnia.exp.

	Tested on powerpc64le-linux.

2021-11-02  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb/sim: update my email address
	gdb:

		* MAINTAINERS (Global Maintainers): Update my address.
		(Responsible Maintainers): Likewise.
		(Write After Approval): Likewise.

	sim:

		* MAINTAINERS (Global Maintainers): Update my address.

2021-11-02  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix stepi test-cases with unix/-m32/-fPIE/-pie
	When running test-case gdb.base/step-indirect-call-thunk.exp with target board
	unix/-m32/-fPIE/-pie, I run into:
	...
	(gdb) stepi^M
	0x5655552e      22      {                /* inc.1 */^M
	(gdb) stepi^M
	0x56555530      22      {                /* inc.1 */^M
	(gdb) stepi^M
	0x565555f7 in __x86.get_pc_thunk.ax ()^M
	(gdb) FAIL: gdb.base/step-indirect-call-thunk.exp: stepi into return thunk
	...

	In contrast, with unix/-m32 we have instead:
	...
	(gdb) stepi^M
	0x08048407      22      {                /* inc.1 */^M
	(gdb) stepi^M
	23        return x + 1;  /* inc.2 */^M
	(gdb) stepi^M
	0x0804840c      23        return x + 1;  /* inc.2 */^M
	(gdb) stepi^M
	24      }                /* inc.3 */^M
	(gdb) stepi^M
	0x08048410      24      }                /* inc.3 */^M
	(gdb) stepi^M
	0x0804848f in __x86_return_thunk ()^M
	(gdb) PASS: gdb.base/step-indirect-call-thunk.exp: stepi into return thunk
	...

	The test-case doesn't expect to run into __x86.get_pc_thunk.ax, which is a
	PIC helper function for x86_64-linux.

	Fix this by insn-stepping through it.

	Likewise in a few other test-cases.

	Tested on x86_64-linux.

2021-11-02  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-11-01  Alan Modra  <amodra@gmail.com>

	ARM: match armeb output for unwind-pacbti-m test
		* testsuite/gas/arm/unwind-pacbti-m.d: Match armeb output.

2021-11-01  Bruno Larsen  <blarsen@redhat.com>

	[gdb/doc]: Updated manpages to be consistent with help
	Updated manpages to be consistent with help information provided by the
	binary. The main changes are:

	* Making all long-form options have '--', instead of a single '-';
	* added most of the missing options to the manpage;
	* removed the information about using '+' instead of '-', since it
	  doesn't seem to be supported anymore.

	This also fixes 2 upstream bugs:
	* https://sourceware.org/bugzilla/show_bug.cgi?id=23965; by adding
	--args to the manpage
	* https://sourceware.org/bugzilla/show_bug.cgi?id=10619; by adding the
	double dashes

2021-11-01  Alan Modra  <amodra@gmail.com>

	macho-o archive sanity checks
	Anti-fuzzing checks.

		* mach-o.c (bfd_mach_o_fat_archive_p): Sanity check entry offset
		and size against file size.

2021-11-01  Alan Modra  <amodra@gmail.com>

	objcopy buffer overflow
	"tocopy" in this code was an int, which when the size to be copied was
	larger than MAXINT could result in tocopy being negative.  A negative
	value of course is less than BUFSIZE, but when converted to
	bfd_size_type is extremely large.

		PR 995
		* objcopy.c (copy_unknown_object): Correct calculation of "tocopy".
		Use better variable types.

2021-11-01  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	arm: add armv9-a architecture to -march
	Update also include:
		+ New value of Tag_CPU_arch EABI attribute (22) is added.
		+ Updated missing Tag_CPU_arch EABI attributes.
		+ Updated how we combine archs 'v4t_plus_v6_m' as this mechanism
		  have to handle new Armv9 as well.

	Regression tested on `arm-none-eabi` cross Binutils and no issues.

	bfd/

		* archures.c: Define bfd_mach_arm_9.
		* bfd-in2.h (bfd_mach_arm_9): Define bfd_mach_arm_9.
		* cpu-arm.c: Add 'armv9-a' option to -march.
		* elf32-arm.c (using_thumb2_bl): Update assert check.
		(arch_has_arm_nop): Add TAG_CPU_ARCH_V9.
		(bfd_arm_get_mach_from_attributes): Add case for TAG_CPU_ARCH_V9.
		Update assert.
		(tag_cpu_arch_combine): Updated table.
		(v9): New table..

	binutils/

		* readelf.c (arm_attr_tag_CPU_arch): Update with

	elfcpp/

		* arm.h: Update TAG_CPU_ARCH_ enums with correct values.

	gas/

		* NEWS: Update docs.
		* config/tc-arm.c (get_aeabi_cpu_arch_from_fset): Return Armv9-a
		for -amarch=all.
		(aeabi_set_public_attributes): Update assert.
		* doc/c-arm.texi: Update docs.
		* testsuite/gas/arm/armv9-a_arch.d: New test.
		* testsuite/gas/arm/attr-march-all.d: Update test with v9.

	include/

		* elf/arm.h Update TAG_CPU_ARCH_ defines with correct values.
		* opcode/arm.h (ARM_EXT3_V9A): New macro.
		(ARM_ARCH_NONE): Updated with arm_feature_set.core size.
		(FPU_NONE): Updated.
		(ARM_ANY): Updated.
		(ARM_ARCH_UNKNOWN): New macro.
		(ARM_FEATURE_LOW): Updated.
		(ARM_FEATURE_CORE): Updated.
		(ARM_FEATURE_CORE_LOW): Updated.
		(ARM_FEATURE_CORE_HIGH): Updated.
		(ARM_FEATURE_COPROC): Updated.
		(ARM_FEATURE): Updated.
		(ARM_FEATURE_ALL): New macro.

	opcodes/

		* arm-dis.c (select_arm_features): Support bfd_mach_arm_9.
		Also Update bfd_mach_arm_unknown to use new macro ARM_ARCH_UNKNOWN.

2021-11-01  Mike Frysinger  <vapier@gentoo.org>

	sim: iq2000: reduce -Wno-error scope
	Clean up the warnings in sim-if, then reduce the -Werror disable to
	the files that still aren't clean that now that we require GNU make
	and can set variables on a per-object basis.

	sim: lm32: reduce -Wno-error scope
	Clean up some warnings in dv-lm32cpu, and all in sim-if, then reduce
	the -Werror disable to the files that still aren't clean that now that
	we require GNU make and can set variables on a per-object basis.

	sim: frv: reduce -Wno-error scope
	Only two files in here still generates warnings, so reduce the -Werror
	disable to that now that we require GNU make and can set variables on
	a per-object basis.

	sim: m32r: reduce -Wno-error scope
	Only two files in here still generates warnings, so reduce the -Werror
	disable to that now that we require GNU make and can set variables on
	a per-object basis.

	sim: mips: reduce -Wno-error scope
	Fix a few printf warnings in sim-main.c, and then we're left with only
	one file in here still generating warnings, so reduce the -Werror
	disable to that alone now that we require GNU make and can set variables
	on a per-object basis.

	sim: erc32: reduce -Wno-error scope
	Only one file in here still generates warnings, so reduce the -Werror
	disable to that alone now that we require GNU make and can set variables
	on a per-object basis.

	sim: cris: reduce -Wno-error scope
	Only two files in here still generates warnings, so reduce the -Werror
	disable to that now that we require GNU make and can set variables on
	a per-object basis.

	sim: sh: reduce -Wno-error scope
	Only one file in here still generates warnings, so reduce the -Werror
	disable to that alone now that we require GNU make and can set variables
	on a per-object basis.

	sim: or1k: build with -Werror
	The only warnings left in this port are a few maybe-uninitialized,
	but we don't abort the build for them, so turn on -Werror everywhere.

	sim: igen: minor build output alignment fix
	The custom echo was off by one space relative to all the others.

	sim: ppc: fix the printf fix for 32-bit systems
	The time delta is a 64-bit value too.

	sim: m68hc11: clean up pointer casts
	The void *data field is used to past arbitrary data between event
	handlers, and these are using it to pass an integer.  Fix up the
	casts to avoid using (long) to cast to/from pointers since there
	is no guarantee that's the right size.

	sim: d10v: clean up pointer casts
	Use %p to print pointers instead of trying to cast them to longs.

	sim: bfin: cast pointers using uintptr_t
	We can't assume that sizeof(long) == sizeof(void*), so change all
	these casts over to uintptr_t.

	sim: ppc: clean up printf format handling
	Don't blindly cast every possible type to (long).  Change to the right
	printf format specifier whether it be a 64-bit type or a pointer.

	sim: ppc: switch core types to stdint.h types
	There's no need to define these ourselves anymore, so switch to the
	stdint.h types.  This will be important when we start using PRI*
	defines with printf formats.

	sim: mn10300: clean up pointer casts
	The void *data field is used to past arbitrary data between event
	handlers, and these are using it to pass an enum.  Fix up the casts
	to avoid using (long) to cast to/from pointers since there is no
	guarantee that's the right size.

	sim: events: clean up trace casts
	Don't blindly cast every possible type to (long).  Change to the right
	printf format specifier whether it be a 64-bit type or a pointer.

	sim: ppc: handle \r in igen inputs [PR sim/28476]
	Make sure we consume & ignore \r bytes in inputs in case the file
	encodings are from a non-LF systems (e.g. Windows).

	sim: ppc: constify strings in igen tooling

2021-11-01  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-31  Tom Tromey  <tom@tromey.com>

	Fix latent bug in DWARF test case
	On my branch that replaces the DWARF psymtab reader,
	dw2-stack-boundary.exp started failing.  However, when I look at the
	output in gdb.log, it is correct:

	    file /home/tromey/gdb/build/gdb/testsuite/outputs/gdb.dwarf2/dw2-stack-boundary/dw2-stack-boundary
	    Reading symbols from /home/tromey/gdb/build/gdb/testsuite/outputs/gdb.dwarf2/dw2-stack-boundary/dw2-stack-boundary...
	    During symbol reading: location description stack overflow
	    During symbol reading: location description stack underflow

	What happens to cause the failure is that the two branches in
	gdb_test_multiple appear in this order:

	    -re "\r\nDuring symbol reading: location description stack underflow" {
	    [...]
	    -re "\r\nDuring symbol reading: location description stack overflow" {

	The first one will match the above, without causing the second one to
	ever match -- leading to a spurious failure.

	Anchoring the regexps seems to fix the problem, and works for the
	current gdb as well.

2021-10-31  Tom Tromey  <tom@tromey.com>

	Fix unittest.exp failure due to 'set debuginfod' addition
	The 'set debuginfod' change caused a regression in unittest.exp:

	    Running selftest help_doc_invariants.
	    help doc broken invariant: command 'info set debuginfod' help doc first line is not terminated with a '.' character
	    help doc broken invariant: command 'set debuginfod' help doc first line is not terminated with a '.' character
	    help doc broken invariant: command 'show debuginfod' help doc first line is not terminated with a '.' character
	    Self test failed: self-test failed at ../../binutils-gdb/gdb/unittests/command-def-selftests.c:100

	This patch fixes the problem.  I'm checking it in.

2021-10-31  Mike Frysinger  <vapier@gentoo.org>

	sim: ppc: use silent build rules here too
	The ppc codebase is unique and doesn't leverage common/, so have to
	add silent rules to it specifically.

	sim: rl78: drop obsolete manual dependency rules
	We have GNU make generate these for us automatically now, so there's
	no need to manually specify any deps.

	sim: drop unused targ-vals.h includes
	This is used in a few places where it's not needed.  Drop the include
	to avoid the build-time generated header file as we move to drop it.

	sim: unify callback.o building
	Now that the use of TARGET_xxx defines have been removed, we can move
	this to the common logic so we only build it once for multi-targets.

	sim: nltvals: pull target open flags out into a dedicated source file
	Like we just did for pulling out the errno & signal maps, pull out the
	open flag map into a dedicated common file.  All newlib ports are using
	the same map which makes it easy.

	sim: nltvals: localize TARGET_<open> defines
	Code should not be using these directly, instead they should be
	resolving these dynamically via the open_map.  Rework the common
	callback code that was using the defines to use symbolic names
	instead, and localize some of the defines in the ARM code (since
	it's a bit unclear how many different APIs it supports currently),
	then remove the defines out of the header so no new code can rely on
	them.

	sim: nltvals: pull target signal out into a dedicated source file
	Like we just did for pulling out the errno map, pull out the signal
	map into a dedicated common file.  All newlib ports are using the
	same signal map which makes it easy.

2021-10-31  Mike Frysinger  <vapier@gentoo.org>

	sim: nltvals: pull target errno out into a dedicated source file
	The current system maintains a list of target errno constants in the
	nltvals.def file, then runs a build-time tool to turn that into a C
	file.  This list of errno values is the same for all arches, so we
	don't need the arch-specific flexibility.  Further, these are only
	for newlib/libgloss environments, which makes it confusing to support
	other userland runtimes (like Linux).  Let's simplify to make this
	easier to understand & build.  We don't namespace the variables yet,
	but sets up the framework for it.

	Create a new target-newlib-errno.c template file.  The template file
	is hand written, but the inline map is still automatically generated.

	This allows us to move it to the common set of objects so it's only
	built once in a multi-target build.

	Now we can remove the output from the gentmap build-time tool since
	it's checked into the tree.

	Then we stop including the errno lists in nltvals.def since nothing
	uses it.

2021-10-31  Mike Frysinger  <vapier@gentoo.org>

	sim: erc32: use silent build rules with sis linkage

2021-10-31  Mike Frysinger  <vapier@gentoo.org>

	sim: erc32: fix a few more build warnings
	Tweak the if indentation & brace style to avoid ambiguous warnings.

	Add ATTRIBUTE_UNUSED to UART functions that aren't used when FAST_UART
	is defined (which is the default).

2021-10-31  Orgad Shaneh  <orgads@gmail.com>

	sim: erc32: fix signedness compatibility and redefinition warnings

2021-10-31  Mike Frysinger  <vapier@gentoo.org>

	sim: add arch-specific conditional logic
	This will make it easy to include arch-specific logic (build files)
	as we migrate ports to the common top level build.

	sim: v850: delete old gencode logic
	The v850 port used to have a gencode helper, but it was deleted long
	ago.  Clean up the settings that no longer make sense w/out it.

	sim: common: merge multiple clean commands
	This provides a minor speedup when cleaning in a multi-target build.

	sim: m32c: tighten up opc2c build output
	Drop the single debugging line that repeats the command line option,
	and use the silent build helpers to tighten up output.

	sim: tighten up build regen rules
	Update the makefile & configure related rules to use the silent
	build helpers.

	sim: tighten up gencode output
	Update the gencode rules to use the silent build helpers.

	sim: igen: tighten up build output
	Add a new stamp helper for quiet builds, and don't dump the command
	line options when it runs.  That isn't standard tool behavior, and
	doesn't really seem necessary in any way.

	sim: tighten up stamp rules
	Add a new ECHO_STAMP helper and convert existing stamp code over
	to it.  This is mostly common rules and cgen mloop rules.

	sim: silence stamp touch rules
	We pretty much never care about these stamp touches, so silence them.
	Also switch to using $@ when it makes sense.

	sim: standardize move-if-change rules
	Use the srcroot path and make them all silent.

	sim: mips/v850: remove redundant variable setup
	The common/Make-common.in fragment already provides these variables.

2021-10-31  Orgad Shaneh  <orgads@gmail.com>

	sim: fix compilation on mingw64 [PR sim/28476]
	...by reordering includes.

	1. sim-utils.c

	sim/mips/sim-main.h defines UserMode, while there is a struct in winnt.h
	which has UserMode as a member. So if sim-main.h is included before winnt.h,
	compilation fails.

	2. ppc

	registers.h defines CR, which is used as a member in winnt.h.

	winsock2.h is included by sys/time.h, so sys/time.h has to be included
	before registers.h.

	Bug: https://sourceware.org/PR28476

2021-10-31  Alan Modra  <amodra@gmail.com>

	Don't include coff/pe.h in coff-x86_64.c
	This (and other) code from coffcode.h is broken for x86_64_coff_vec,
	and has been ever since support was added in 2006 commit 99ad839030c1
	Here, bfd_coff_aoutsz must match coff_swap_aouthdr_out otherwise we
	end up writing garbage.

	      /* Note that peicode.h fills in a PEAOUTHDR, not an AOUTHDR.
		 include/coff/pe.h sets AOUTSZ == sizeof (PEAOUTHDR)).  */
	      char * buff;
	      bfd_size_type amount = bfd_coff_aoutsz (abfd);

	      buff = (char *) bfd_malloc (amount);
	      if (buff == NULL)
		return false;

	      coff_swap_aouthdr_out (abfd, & internal_a, buff);
	      amount = bfd_bwrite (buff, amount, abfd);

	We have removed support for --target=x86_64-coff, likely because it
	never worked properly, but still produce coff-x86_64.o with
	--enable-targets=all.  This means objcopy can recognize x86_64 COFF
	files but will write garbage to the output file, a fact found by
	fuzzers.  I suspect x86_64 COFF is still broken after this fix, and
	mention of coff-x86_64.* should be removed from bfd/Makefile.am.

		* coff-x86_64.c: Don't include coff/pe.h.
		(COFF_WITH_pex64): Don't define here.
		* pe-x86_64.c: Include coff/pe.h and other headers.
		(PEI_HEADERS): Define.

2021-10-31  Alan Modra  <amodra@gmail.com>

	Re: PR28420, ecoff fuzzing failures
	sym_ptr_ptr NULL results in segfaults.

		PR 28420
		* ecoff.c (ecoff_slurp_reloc_table): Don't leave sym_ptr_ptr NULL.

2021-10-31  Alan Modra  <amodra@gmail.com>

	ubsan: alpha-vms: undefined shift
		* vms-alpha.c (evax_bfd_print_image): Shift left 1u.

	PR28518: signed integer overflow & free on unmalloced address
		PR 28518
		* vms-alpha.c (build_module_list): Don't lose malloc buffer address.
		Use unsigned variables.

2021-10-31  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-30  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: fix gdb.gdb/unittest.exp with C++17 compiler
	On a machine with gcc 11, I get:

	    FAIL: gdb.gdb/unittest.exp: test_completion: tab complete "maintenance selftest string_v" (second tab) (timeout)
	    FAIL: gdb.gdb/unittest.exp: test_completion: tab complete "maintenance selftest string_vie" (timeout)

	That's because when compiling with C++ >= 17, we use the standard
	version of string_view, and don't have a selftest for it.  So the list
	of selftests shown by the tab completion when completing "string_v"
	differs.

	Change the test to use the copy_* tests instead.

	Change-Id: I85f6aa44ee5fc9652b9bd4451e0506b89773526b

2021-10-30  Aaron Merey  <amerey@redhat.com>

	gdb.texinfo: Expand documentation for debuginfod
	Add section describing GDB's usage of debuginfod.

	Refer to this new section in the description of the '--with-debuginfod'
	configure option.

	Mention debuginfod in the 'Separate Debug Files' section.

2021-10-30  Aaron Merey  <amerey@redhat.com>

	gdb: add set/show commands for managing debuginfod
	Add 'set debuginfod' command.  Accepts 'on', 'off' or 'ask' as an
	argument.  'on' enables debuginfod for the current session.  'off'
	disables debuginfod for the current session.  'ask' will prompt
	the user to either enable or disable debuginfod when the next query
	is about to be performed:

	    This GDB supports auto-downloading debuginfo from the following URLs:
	    <URL1> <URL2> ...
	    Enable debuginfod for this session? (y or [n]) y
	    Debuginfod has been enabled.
	    To make this setting permanent, add 'set debuginfod on' to .gdbinit.

	For interactive sessions, 'ask' is the default.  For non-interactive
	sessions, 'off' is the default.

	Add 'show debuginfod status' command.  Displays whether debuginfod
	is set to 'on', 'off' or 'ask'.

	Add 'set/show debuginfod urls' commands. Accepts a string of
	space-separated debuginfod server URLs to be queried.  The default
	value is copied from the DEBUGINFOD_URLS environment variable.

	Finally add 'set/show debuginfod verbose' commands to control whether
	debuginfod-related output is displayed.  Verbose output is enabled
	by default.

	    (gdb) run
	    Starting program: /bin/sleep 5
	    Download failed: No route to host.  Continuing without debug info for /lib64/libc.so.6.

	If GDB is not built with debuginfod then these commands will just display

	    Support for debuginfod is not compiled into GDB.

2021-10-30  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-29  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove TYPE_FIELD_DWARF_BLOCK
	Remove TYPE_FIELD_DWARF_BLOCK, replace with type::field +
	field::loc_dwarf_block.

	Change-Id: I10af9410bb5f46d342b8358a7956998c7e804b64

2021-10-29  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove TYPE_FIELD_STATIC_PHYSADDR
	Remove TYPE_FIELD_STATIC_PHYSADDR replace with type::field +
	field::loc_physaddr.

	Change-Id: Ica9bc4a48f34750ec82ec86c298d3ecece81bcbd

2021-10-29  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove TYPE_FIELD_STATIC_PHYSNAME
	Remove TYPE_FIELD_STATIC_PHYSNAME, replace with type::field +
	field::loc_physname.

	Change-Id: Ie35d446b67dd1d02f39998b406001bdb7e6d5abb

2021-10-29  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove TYPE_FIELD_ENUMVAL
	Remove TYPE_FIELD_ENUMVAL, replace with type::field +
	field::loc_enumval.

	Change-Id: I2ada73e4635aad3363ce2eb22c1dc52698ee2072

2021-10-29  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove TYPE_FIELD_BITPOS
	Remove TYPE_FIELD_BITPOS, replace its uses with type::field +
	field::loc_bitpos.

	Change-Id: Iccd8d5a77e5352843a837babaa6bd284162e0320

2021-10-29  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove TYPE_FIELD_LOC_KIND
	Remove TYPE_FIELD_LOC_KIND, replace its uses with type::field +
	field::loc_kind.

	Change-Id: Ib124a26365df82ac1d23df7962d954192913bd90

2021-10-29  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove FIELD_DWARF_BLOCK macro
	Remove FIELD_DWARF_BLOCK, replace its uses with field::loc_dwarf_block.

	Change-Id: I66b7d6a960cb5e341e61e21bd3cc9a6ac26de6a8

2021-10-29  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove FIELD_STATIC_PHYSADDR macro
	Remove FIELD_LOC_KIND_PHYSADDR, replace its uses with
	field::loc_physaddr.

	Change-Id: Ifd8b2bdaad75f42bfb1404ef8c396ffe7e10ac55

2021-10-29  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove FIELD_STATIC_PHYSNAME macro
	Remove FIELD_STATIC_PHYSNAME, replace its uses with field::loc_physname.

	Change-Id: Iaa8952410403b4eb5bbd68411feea27e2405d657

2021-10-29  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove FIELD_ENUMVAL macro
	Remove FIELD_ENUMVAL, replace its uses with field::loc_enumval.

	Change-Id: Id4861cee91a8bb583a9836f1aa5da0a320fbf4d9

2021-10-29  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove FIELD_BITPOS macro
	Remove FIELD_BITPOD, replace its uses with field::loc_bitpos.

	Change-Id: Idb99297e0170661254276c206383a7e9bf1a935a

2021-10-29  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove FIELD_LOC_KIND macro
	Remove FIELD_LOC_KIND, replace its uses with field::loc_kind or
	call_site_target::loc_kind.

	Change-Id: I0368d8c3ea269d491bb215aa70e32edbdf55f389

2021-10-29  Tom Tromey  <tromey@adacore.com>

	Add gdb.Architecture.integer_type Python function
	This adds a new Python function, gdb.Architecture.integer_type, which
	can be used to look up an integer type of a given size and
	signed-ness.  This is useful to avoid dependency on debuginfo when a
	particular integer type would be useful.

	v2 moves this to be a method on gdb.Architecture and addresses other
	review comments.

2021-10-29  Tom Tromey  <tromey@adacore.com>

	Remove ada_value_print_inner
	I noticed that the only caller of ada_value_print_inner is
	valprint.c:do_val_print (via ada_language::value_print_inner), meaning
	that the try/catch logic in this function is redundant.  This patch
	removes the wrapper function.

	Regression tested on x86-64 Fedora 34.

2021-10-29  Tom Tromey  <tromey@adacore.com>

	Document resolve_dynamic_type oddity
	Today I re-learned that resolve_dynamic_type can return a type for
	which is_dynamic_type returns true.  This can happen for an array
	whose elements have dynamic type -- the array is reported as dynamic,
	but resolving the elements would be incorrect, because each element
	might have a different type after resolution.

	You can see the special case in resolve_dynamic_array_or_string:

	  if (ary_dim != NULL && ary_dim->code () == TYPE_CODE_ARRAY)
	...
	  else
	...

	I looked into having the TYPE_CODE_ARRAY case in
	is_dynamic_type_internal follow this same logic, but that breaks down
	on the gdb.fortran/dynamic-ptype-whatis.exp test case.  In particular
	this code in fortran_undetermined::evaluate:

	  value *callee = std::get<0> (m_storage)->evaluate (nullptr, exp, noside);
	  if (noside == EVAL_AVOID_SIDE_EFFECTS
	      && is_dynamic_type (value_type (callee)))
	    callee = std::get<0> (m_storage)->evaluate (nullptr, exp, EVAL_NORMAL);

	... relies on is_dynamic_type returning true for such an array.

	I wasn't really sure of the best way to fix this, so in the meantime I
	wrote this patch, which documents the oddity so that I might have a
	chance of remembering this in the future.

2021-10-29  Tom Tromey  <tromey@adacore.com>

	Avoid self-test failures on x86-linux
	The disassembly tests in "maint selftest" will fail on x86-linux.
	This happens because opcodes rejects an attempt to disassemble for an
	arch with a 64-bit address size when bfd_vma is 32-bit.

	This patch avoids this problem by avoiding the test in this case.  I
	chose to do it this way because this seems to be the only situation
	where opcodes checks the size of bfd_vma.

	For v2 of this patch, I've also updated memory_error_test to do the
	same thing.  This is needed due to the "improve error reporting from
	the disassembler" patch.

2021-10-29  Tom de Vries  <tdevries@suse.de>

	[gdb/build] Fix build with --disable-unit-tests
	A build with --disable-unit-tests currently run into:
	...
	ld: maint.o: in function \
	  `maintenance_selftest_completer(cmd_list_element*, completion_tracker&,
	                                  char const*, char const*)':
	src/gdb/maint.c:1183: undefined reference to \
	  `selftests::for_each_selftest(
	    gdb::function_view<
	      void (std::__cxx11::basic_string<char,std::char_traits<char>,
	                                       std::allocator<char> > const&)>)'
	...

	Fix this by guarding the call to selftests::for_each_selftest in
	maintenance_selftest_completer with GDB_SELF_TEST, such that the "-verbose"
	completion still works.

	Rebuild on x86_64-linux and ran gdb.gdb/unittest.exp.

2021-10-29  Enze Li  <lienze2010@hotmail.com>

	Document "memory-tag-violations".
	* gdb/doc/gdb.texinfo: (Data): Document	'-memory-tag-violations'.
	 (Command Options): Update the example.

2021-10-29  Tejas Belagod  <tejas.belagod@arm.com>

	Support for a new pacbti unwind opcode.
	This patch adds readelf support for decoding the exception table
	opcode for restoring the RA_AUTH_CODE pseudo register defined by the
	EHABI
	(https://github.com/ARM-software/abi-aa/releases/download/2021Q1/ehabi32.pdf
	Section 10.3).

		* readelf.c (decode_arm_unwind_bytecode): Add support to decode
		restoring RA_AUTH_CODE pseudo register.

2021-10-29  Alan Modra  <amodra@gmail.com>

	Re: arm: add unwinder encoding support for PACBTI
	Move the gas testsuite files to where they belong.

2021-10-29  Alan Modra  <amodra@gmail.com>

	ELF core file size checks
	Catch fuzzed segments where p_offset + p_filesz wraps, and limit error
	output.

		* elfcore.h (elf_core_file_p): Rewrite segment checks using
		bfd_get_file_size.  Set read_only on file size errors.
		* elfcode.h (elf_swap_shdr_in): Don't repeat error message.

2021-10-29  Alan Modra  <amodra@gmail.com>

	obcopy vs. files with silly section alignment
	We already ignore stupid segment alignment when rewriting headers,
	ignore section alignment too.

		* elf.c (rewrite_elf_program_header): Ignore section alignment
		power greater than 62.

2021-10-29  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-28  Stafford Horne  <shorne@gmail.com>

	gdb: Add OpenRISC gdbserver and native config news
	The previous patches added gdbserver and native debugging support
	for OpenRISC targets.  This patch documents that in the news.

	gdb: or1k: add single step for linux native debugging
	Needed for single stepping in Linux, this adds the or1k implementation
	of or1k_software_single_step.  Most of the implementation is borrowed
	from the bare metal single step code from or1k_single_step_through_delay
	which has been extracted and shared in helper function
	or1k_delay_slot_p.

2021-10-28  Stafford Horne  <shorne@gmail.com>

	gdb: or1k: add native linux support
	This patch adds support for running gdb natively on OpenRISC linux.
	Debugging support is provided via the linux PTRACE interface which is
	mostly handled by GDB genric code.  This patch provides the logic of how
	to read and write the ptrace registers between linux and GDB.

	Single stepping is privided in a separate patch.

2021-10-28  Stafford Horne  <shorne@gmail.com>

	gdb: or1k: add generated linux descriptor file

	gdb: or1k: fixup linux regcache comment
	The old comment was not properly updated from the RISC-V example used.
	Update it to match OpenRISC.

2021-10-28  Stafford Horne  <shorne@gmail.com>

	gdb: or1k: implement gdb server
	This patch adds gdbserver support for OpenRISC.  This has been used for
	debugging the glibc port that in being worked on here:

	  https://github.com/openrisc/or1k-glibc/tree/or1k-port-2

	Hence the comment about registers definitions being inline with glibc.

2021-10-28  Christian Biesinger  <cbiesinger@google.com>

	[sim] Include defs.h in ppc/hw_memory.c
	To fix this error (seen on cygwin):
	/../../sim/ppc/../common ../../../sim/ppc/hw_memory.c
	In file included from ../../gnulib/import/stdlib.h:100,
	                 from ../../../sim/ppc/hw_memory.c:28:
	../../gnulib/import/unistd.h:663:3: error: #error "Please include config.h first."
	  663 |  #error "Please include config.h first."
	      |   ^~~~~
	../../gnulib/import/unistd.h:665:24: error: expected ';' before 'extern'
	  665 | _GL_INLINE_HEADER_BEGIN
	      |                        ^
	      |                        ;
	../../gnulib/import/unistd.h:2806:22: error: expected ';' before 'extern'
	 2806 | _GL_INLINE_HEADER_END
	      |                      ^
	      |                      ;

2021-10-28  Markus Klein  <markus.klein@sma.de>

	ARM assembler: Allow up to 32 single precision registers in the VPUSH and VPOP instructions.
		PR 28436
		* config/tc-arm.c (do_vfp_nsyn_push_pop_check): New function.
		(do_vfp_nsyn_pop): Use the new function.
		(do_vfp_nsyn_push): Use the new function.
		* testsuite/gas/arm/v8_1m-mve.s: Add new instructions.
		* testsuite/gas/arm/v8_1m-mve.d: Updated expected disassembly.

2021-10-28  Simon Marchi  <simon.marchi@efficios.com>

	gdb: use ptid_t::to_string in infrun debug messages
	In debug messages, I think it would be more helpful to print ptid using
	the simple "pid.lwp.tid" notation in infrun debug messages.  I am
	currently debugging some fork issues, and find the pid_to_str output not
	so useful, as it doesn't tell which process a thread belongs to.

	It currently shows up like this:

	    [infrun] resume_1: step=1, signal=GDB_SIGNAL_0, trap_expected=0, current thread [Thread 0x7ffff7d95740 (LWP 892942)] at 0x55555555521f

	With the patch, it shows up like this:

	    [infrun] resume_1: step=1, signal=GDB_SIGNAL_0, trap_expected=1, current thread [894072.894077.0] at 0x5555555551d9

	Change-Id: I130796d7dfb0d8e763b8358d8a6002701d80c4ea

2021-10-28  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: add selftest name completion
	After the previous commit, it is easy to add completion for selftest
	names.  Again, this is not particularly high value, but I rarely touched
	completion, so it served as a simple example to get some practice.

	Change the for_each_selftest_ftype parameter to gdb::function_view, so
	that we can pass a lambda that captures things.

	Change-Id: I87cac299ddca9ca7eb0ffab78342e850a98d954c

2021-10-28  Tejas Belagod  <Tejas.Belagod@arm.com>

	arm: add unwinder encoding support for PACBTI
	This patch adds support for encoding the Return Address Authentication pseudo
	register - '.save {ra_auth_code}' as defined by the DWARF ABI - in the
	exception tables where the opcode is defined by the EHABI

	gas/Changelog:

		* config/tc-arm.c (arm_reg_type): Add new type REG_TYPE_PSEUDO.
		(reg_expected_msgs): Add message for pseudo reg type.
		(reg_list_els): Add new reg list type REGLIST_PSEUDO.
		(parse_reg_list): Handle new REGLIST_PSEUDO type.
		(s_arm_unwind_save_pseudo): Encode pseudo reg list save in exception
		tables.
		(s_arm_unwind_save): Handle new REG_TYPE_PSEUDO.
		(reg_names): Add ra_auth_code pseudo register.
		* testsuite/gas/arm/unwind-pacbti-m.s: New test.
		* testsuite/gas/arm/unwind-pacbti-m.d: New test.
		* testsuite/gas/arm/unwind-pacbti-m-readelf.d: New test.

2021-10-28  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: add "maint set/show selftest verbose" commands and use process_options
	I saw the new -verbose switch to "maint selftests" and thought it would
	be nice for it to use the option framework.  For example, that makes
	having completion easy.  It's not that high value, given this is a
	maintenance command, but I had never used the framework myself, so it
	was a good way to practice.

	This patch also adds the "maint set/show selftest verbose" setting.  It
	would be possible to use option framework without adding the setting,
	but using the framework makes adding the option almost trivial, so I
	thought why not.

	Change-Id: I6687faa0713ff3da60b398253211777100094144

2021-10-28  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Update some test-cases to GPLv3
	I noticed some files in the test-suite have GPLv2 notices.

	Update these to GPLv3.

2021-10-28  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: add add_setshow_prefix_cmd
	There's a common pattern to call add_basic_prefix_cmd and
	add_show_prefix_cmd to add matching set and show commands.  Add the
	add_setshow_prefix_cmd function to factor that out and use it at a few
	places.

	Change-Id: I6e9e90a30e9efb7b255bf839cac27b85d7069cfd

2021-10-28  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Require python in gdb.server/server-kill-python.exp
	I came across this when running test-case gdb.server/server-kill-python.exp
	with a gdb configured without python:
	...
	builtin_spawn gdb -nw -nx -data-directory data-directory -iex set height 0 \
	  -iex set width 0 -quiet -iex set height 0 -iex set width 0 \
	  -ex source outputs/gdb.server/server-kill-python/file1.py^M
	FAIL: gdb.server/server-kill-python.exp: ensure inferior is running
	Executing on target: kill -9 28535    (timeout = 300)
	builtin_spawn -ignore SIGHUP kill -9 28535^M
	file1.py:1: Error in sourced command file:^M
	Undefined command: "import".  Try "help".^M
	...

	Fix this by testing for python support in the test-case.

	Tested on aarch64-linux (with python support disabled) and x86_64-linux (with
	python support enabled).

2021-10-28  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix assembly comments in gdb.dwarf2/clang-debug-names.exp.tcl
	On openSUSE Leap 15.2 aarch64 I ran into:
	...
	clang-debug-names-debug.S:72: \
	  Error: junk at end of line, first unrecognized character is `#'
	...
	due to:
	...
	    71  .Ldebug_names_start:
	    72    .short 5                      # Header: version
	...

	Fix this by using the /* ... */ comment style instead:
	...
	$ sed -i 's% #\([^"]*\)%/*\1 */%' clang-debug-names.exp.tcl
	...

	Tested on aarch64-linux and x86_64-linux.

2021-10-28  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Handle DW_AT_string_length with location list
	Consider a fortran routine where a string variable s is modified:
	...
	subroutine f(s)
	  character*(*) s
	  print *, s
	  s(1:3) = 'oof'
	  print *, s
	end subroutine f
	...

	When compiling with optimization level -O1 and printing the type of
	variable s we get:
	...
	$ gdb -q -batch outputs/gdb.opt/fortran-string/fortran-string \
	  -ex "b f" \
	  -ex run \
	  -ex "ptype s"
	Breakpoint 1 at 0x4006f7: file fortran-string.f90, line 21.

	Breakpoint 1, f (s=..., _s=_s@entry=3) at fortran-string.f90:21
	21      subroutine f(s)
	type = character*1
	...
	while with -O0 we have instead:
	...
	type = character (3)
	...

	The problem is that the type of s is:
	...
	 <1><2d6>: Abbrev Number: 21 (DW_TAG_string_type)
	    <2d7>   DW_AT_string_length: 0xbf (location list)
	    <2db>   DW_AT_byte_size   : 4
	...
	where the DW_AT_string_length is a location list, a case that is not handled
	by attr_to_dynamic_prop.

	Fix this by handling attr->form_is_section_offset () in attr_to_dynamic_prop.

	Tested on x86_64-linux.

	The test-case is based on gdb.opt/fortran-string.exp from
	https://src.fedoraproject.org/rpms/gdb/raw/f32/f/gdb-archer-vla-tests.patch .
	I've updated the copyrights to stretch to 2021.

	[ I've tried to create a dwarf assembly test-case for this, but didn't
	manage. ]

	Co-Authored-By: Jan Kratochvil <jan.kratochvil@redhat.com>

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=26910

2021-10-28  Kavitha Natarajan  <kavitha.natarajan@amd.com>

	[gdb/testsuite] Initialize anonymous union in gdb.cp/koenig.cc
	GDB test fails while running the test case gdb.cp/koenig.exp using
	clang compiler:
	[...]
	p foo (p_union)
	No symbol "p_union" in current context.
	(gdb) FAIL: gdb.cp/koenig.exp: p foo (p_union)
	[...]

	In the testcase, "p_union" is an unused/uninitialized variable of
	anonymous union type. Clang does not emit symbol for unused anonymous
	union/struct variables at any optimization level. Since the compiler
	itself is not emitting the symbol for "p_union", debug info is also
	not emitted when built with debug option. If the anonymous union is
	initialized (or used), then clang emits the symbol "p_union" which
	enables emitting debug info for "p_union".
	[...]
	p foo (p_union)
	Cannot resolve function foo to any overloaded instance
	(gdb) PASS: gdb.cp/koenig.exp: p foo (p_union)
	[...]

2021-10-28  Alan Modra  <amodra@gmail.com>

	asan: mmo: NULL dereferenc in mmo_xore_32
	mmo_get_loc can return NULL.  It's commented even, and that the caller
	then must handle a split field.  mmo_xore_* don't handle split fields,
	instead just segfault.  Stop that happening, and refuse to recognise
	fuzzed mmo files that trigger this problem.

		* mmo.c (mmo_get_loc): Don't declare inline.
		(mmo_xore_64, mmo_xore_32, mmo_xore_16): Remove forward decls.
		Return pointer, don't dereference NULL.
		(mmo_scan): Return error on mmo_get_loc returning NULL.

2021-10-28  Alan Modra  <amodra@gmail.com>

	bfd: remove use of INLINE
	No need to use anything fancy, plain inline works just as well.

		* bfd-in.h (INLINE): Don't define.
		* bfd-in2.h: Regenerate.
		* aoutx.h: Replace use of INLINE with inline.
		* elf-eh-frame.c: Likewise.
		* elf32-score7.c: Likewise.
		* elfxx-mips.c: Likewise.
		* ihex.c: Likewise.
		* mach-o.c: Likewise.
		* mmo.c: Likewise.

2021-10-28  Alan Modra  <amodra@gmail.com>

	ASSERT in empty output section with address
		* ldlang.c (lang_do_assignments_1): Correct "dot" inside ignored
		sections.
		* testsuite/ld-scripts/empty-address-4.d,
		* testsuite/ld-scripts/empty-address-4.s,
		* testsuite/ld-scripts/empty-address-4.t: New test.
		* testsuite/ld-scripts/empty-address.exp: Run it.

2021-10-28  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-27  Alan Modra  <amodra@gmail.com>

	asan: alpha-vms: buffer overflows
	Yet more anti-fuzzer sanity checking

		* vms-alpha.c (evax_bfd_print_egsd): Sanity check record and
		name lengths before access.
		(evax_bfd_print_etir_stc_ir, evax_bfd_print_etir): Likewise.

2021-10-27  Alan Modra  <amodra@gmail.com>

	ubsan: arm: undefined shift
	left shift of 2 by 31 places cannot be represented in type 'int'

		* arm-dis.c (print_insn_thumb16): Avoid undefined behaviour.

2021-10-27  Tom Tromey  <tromey@adacore.com>

	Fix watchpoints with multiple threads on Windows
	A recent internal change pointed out that watchpoints were not working
	on Windows when the inferior was multi-threaded.  This happened
	because the debug registers were only updated for certain threads --
	in particular, those that were being resumed and that were not marked
	as suspended.  In the case of single-stepping, the need to update the
	debug registers in other threads could also be "forgotten".

	This patch changes windows-nat.c to mark all threads needing a debug
	register update.  This brings the code closer to what gdbserver does
	(though, unfortunately, it still seems more complicated than needed).

2021-10-27  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix port detection in gdb.debuginfod/fetch_src_and_symbols.exp
	On OBS I ran into this failure with test-case
	gdb.debuginfod/fetch_src_and_symbols.exp:
	...
	Failed to listen for connections: Address already in use^M
	[Thu Oct 21 11:48:49 2021] (559/559): started http server on IPv6 port=8000^M
	  ...
	FAIL: gdb.debuginfod/fetch_src_and_symbols.exp: local_url: find port timeout
	...

	The test-case is trying to start debuginfod on a port to see if it's
	available, and it handles either this message:
	  "started http server on IPv4 IPv6 port=$port"
	meaning success, or:
	  "failed to bind to port"
	meaning failure, in which case the debuginfod instance is killed, and we try
	the next port.

	The test-case only uses the v4 address 127.0.0.1, so fix this by:
	- accepting "started http server on IPv4 port=$port"
	- rejecting "started http server on IPv6 port=$port"

	Tested on x86_64-linux.

2021-10-27  Simon Marchi  <simon.marchi@efficios.com>

	gdb: fix value.c build on 32-bits
	When building on ARM (32-bits), we errors like this:

	    /home/smarchi/src/binutils-gdb/gdb/value.c: In function 'gdb::array_view<const unsigned char> value_contents_for_printing(value*)':
	    /home/smarchi/src/binutils-gdb/gdb/value.c:1252:35: error: narrowing conversion of 'length' from 'ULONGEST' {aka 'long long unsigned int'} to 'size_t' {aka 'unsigned int'} [-Werror=narrowing]
	     1252 |   return {value->contents.get (), length};
	          |                                   ^~~~~~

	Fix that by using gdb::make_array_view, which does the appropriate
	conversion.

	Change-Id: I7d6f2e75d7440d248b8fb18f8272ee92954b404d

2021-10-27  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: Tidy riscv assembler and disassembler.
	Tidy the gas/config/tc-riscv.c and opcodes/riscv-dis.c, to prepare for
	moving the released extensions (including released vendor extensions)
	from integration branch back to mainline.

	* Added parts of missing comments.

	* Updated md_show_usage.

	* For validate_riscv_insn, riscv_ip and print_insn_args, unify the
	  following pointer names,
	  - oparg: pointed to the parsed operand defined in the riscv_opcodes.
	  - asarg: pointed to the parsed operand from assembly.
	  - opargStart: recorded the parsed operand name from riscv_opcodes.
	  - asargStart: recorded the parsed operand name from assembly.

	gas/
		* config/tc-riscv.c: Added parts of missind comments and updated
		the md_show_usage.
		(riscv_multi_subset_supports): Tidy codes.
		(validate_riscv_insn): Unify the pointer names, oparg, asarg,
		opargStart and asargStart, to prepare for moving the released
		extensions from integration branch back to mainline.
		(riscv_ip): Likewise.
		(macro_build): Added fmtStart, also used to prepare for moving
		released extensions.
		(md_show_usage): Added missing descriptions for new options.
	opcodes/
		* riscv-dis.c (print_insn_args): Unify the pointer names,
		oparg and opargStart, to prepare for moving the released
		extensions from integration branch back to mainline.

2021-10-27  Maciej W. Rozycki  <macro@embecosm.com>

	opcodes: Fix RPATH not being set for dynamic libbfd dependency
	If built as a shared library, libopcodes has a load-time dependency on
	libbfd, which is recorded in the dynamic section, however without a
	corresponding RPATH entry for the directory to find libbfd in.  This
	causes loading to fail whenever libbfd is only pulled by libopcodes
	indirectly and libbfd has been installed in a directory that is not in
	the dynamic loader's search path.

	It does not happen with the programs included with binutils or GDB,
	because they all also pull libbfd when using libopcodes, but it can
	happen with external software, e.g.:

	$ gdbserver --help
	gdbserver: error while loading shared libraries: libbfd-[...].so: cannot open shared object file: No such file or directory
	$

	(not our `gdbserver').

	Indirect dynamic dependencies are handled by libtool automatically by
	adding RPATH entries as required, however our setup for libopcodes
	prevents this from happening by linking in libbfd with an explicit file
	reference sneaked through to the linker directly behind libtool's back
	via the `-Wl' linker command-line option rather than via `-l' combined
	with a suitable library search path specified via `-L', as it would be
	usually the case, or just referring to the relevant .la file in a fully
	libtool-enabled configuration such as ours.

	According to an observation in the discussion back in 2007[1][2][3] that
	has led to the current arrangement it is to prevent libtool from picking
	up the wrong version of libbfd.  It does not appear to be needed though,
	not at least with our current libtool incarnation, as directly referring
	`libbfd.la' does exactly what it should, as previously suggested[4], and
	with no link-time reference to the installation directory other than to
	set RPATH.  Uninstalled version of libopcodes has libbfd's build-time
	location prepended to RPATH too, as also expected.

	Use a direct reference to `libbfd.la' then, making the load error quoted
	above go away.  Alternatively `-L' and `-l' could be used to the same
	effect, but it seems an unnecessary complication and just another way to
	circumvent rather than making use of libtool.

	References:

	[1] "compile failure due to undefined symbol",
	    <https://sourceware.org/ml/binutils/2007-08/msg00476.html>

	[2] same, <https://sourceware.org/ml/binutils/2007-09/msg00000.html>

	[3] same, <https://sourceware.org/ml/binutils/2007-10/msg00019.html>

	[4] same, <https://sourceware.org/ml/binutils/2007-10/msg00034.html>

		opcodes/
		* Makefile.am: Remove obsolete comment.
		* configure.ac: Refer `libbfd.la' to link shared BFD library
		except for Cygwin.
		* Makefile.in: Regenerate.
		* configure: Regenerate.

2021-10-27  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-27  H.J. Lu  <hjl.tools@gmail.com>

	gold: Place .note.gnu.property section before other note sections
	Place the .note.gnu.property section before all other note sections to
	avoid being placed between other note sections with different alignments.

		PR gold/28494
		* layout.cc (Layout::create_note): Set order to ORDER_PROPERTY_NOTE
		for the .note.gnu.property section.
		* layout.h (Output_section_order): Add ORDER_PROPERTY_NOTE.

2021-10-26  Tom de Vries  <tdevries@suse.de>

	[gdb/doc] Fix print inferior-events default
	In the docs about print inferior-events we read:
	...
	By default, these messages will not be printed.
	...

	That used to be the case, but is no longer so since commit f67c0c91715 "Enable
	'set print inferior-events' and improve detach/fork/kill/exit messages".

	Fix this by updating the docs.

2021-10-26  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-25  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: change functions returning value contents to use gdb::array_view
	The bug fixed by this [1] patch was caused by an out-of-bounds access to
	a value's content.  The code gets the value's content (just a pointer)
	and then indexes it with a non-sensical index.

	This made me think of changing functions that return value contents to
	return array_views instead of a plain pointer.  This has the advantage
	that when GDB is built with _GLIBCXX_DEBUG, accesses to the array_view
	are checked, making bugs more apparent / easier to find.

	This patch changes the return types of these functions, and updates
	callers to call .data() on the result, meaning it's not changing
	anything in practice.  Additional work will be needed (which can be done
	little by little) to make callers propagate the use of array_view and
	reap the benefits.

	[1] https://sourceware.org/pipermail/gdb-patches/2021-September/182306.html

	Change-Id: I5151f888f169e1c36abe2cbc57620110673816f3

2021-10-25  Simon Marchi  <simon.marchi@efficios.com>

	gdbsupport: add assertions in array_view
	Add assertions to ensure we don't access an array_view out of bounds.
	Enable these assertions only when _GLIBCXX_DEBUG is set, as we did for
	gdb::optional.

	Change-Id: Iffaee38252405073735ed123c8e57fde6b2c6be3

2021-10-25  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbserver: make target_pid_to_str return std::string
	I wanted to write a warning that included two target_pid_to_str calls,
	like this:

	    warning (_("Blabla %s, blabla %s"),
		     target_pid_to_str (ptid1),
		     target_pid_to_str (ptid2));

	This doesn't work, because target_pid_to_str stores its result in a
	static buffer, so my message would show twice the same ptid.  Change
	target_pid_to_str to return an std::string to avoid this.  I don't think
	we save much by using a static buffer, but it is more error-prone.

	Change-Id: Ie3f649627686b84930529cc5c7c691ccf5d36dc2

2021-10-25  H.J. Lu  <hjl.tools@gmail.com>

	x86: Also handle stores for -muse-unaligned-vector-move
		* config/tc-i386.c (encode_with_unaligned_vector_move): Also
		handle stores.
		* testsuite/gas/i386/unaligned-vector-move.s: Add stores.
		* testsuite/gas/i386/unaligned-vector-move.d: Updated.
		* testsuite/gas/i386/x86-64-unaligned-vector-move.d: Likewise.

2021-10-25  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix duplicate in gdb.mi/mi-var-cp.exp
	With test-case gdb.mi/mi-var-cp.exp I run into this duplicate:
	...
	PASS: gdb.mi/mi-var-cp.exp: run to mi-var-cp.cc:104 (set breakpoint)
	PASS: gdb.mi/mi-var-cp.exp: create varobj for s
	PASS: gdb.mi/mi-var-cp.exp: create varobj for s
	DUPLICATE: gdb.mi/mi-var-cp.exp: create varobj for s
	...

	This is due to a duplicate test name here:
	...
	$ cat -n gdb/testsuite/gdb.mi/mi-var-cp.cc
	  ...
	   100  int reference_to_struct ()
	   101  {
	   102    /*: BEGIN: reference_to_struct :*/
	   103    S s = {7, 8};
	   104    S& r = s;
	   105    /*:
	   106      mi_create_varobj S s "create varobj for s"
	   107      mi_create_varobj R r "create varobj for s"
	...

	Fix this by using "create varobj for r" instead.

	Tested on x86_64-linux.

2021-10-25  Nick Alcock  <nick.alcock@oracle.com>

	libctf, ld: handle nonrepresentable types better
	ctf_type_visit (used, among other things, by the type dumping code) was
	aborting when it saw a nonrepresentable type anywhere: even a single
	structure member with a nonrepresentable type caused an abort with
	ECTF_NONREPRESENTABLE.  This is not useful behaviour, given that the
	abort comes from a type-resolution we are only doing in order to
	determine whether the type is a structure or union.  We know
	nonrepresentable types can't be either, so handle that case and
	pass the nonrepresentable type down.

	(The added test verifies that the dumper now handles this case and
	prints nonrepresentable structure members as it already does
	nonrepresentable top-level types, rather than skipping the whole
	structure -- or, without the previous commit, skipping the whole types
	section.)

	ld/ChangeLog
	2021-10-25  Nick Alcock  <nick.alcock@oracle.com>

		* testsuite/ld-ctf/nonrepresentable-member.*: New test.

	libctf/ChangeLog
	2021-10-25  Nick Alcock  <nick.alcock@oracle.com>

		* ctf-types.c (ctf_type_rvisit): Handle nonrepresentable types.

2021-10-25  Nick Alcock  <nick.alcock@oracle.com>

	libctf: dump: do not stop dumping types on error
	If dumping of a single type fails, we obviously can't dump it; but just
	as obviously this doesn't make the other types in the types section
	invalid or undumpable.  So we should not propagate errors seen when
	type-dumping, but rather ignore them and carry on, so we dump as many
	types as we can (leaving out the ones we can't grok).

	libctf/ChangeLog
	2021-10-25  Nick Alcock  <nick.alcock@oracle.com>

		* ctf-dump.c (ctf_dump_type): Do not abort on error.

2021-10-25  Nick Alcock  <nick.alcock@oracle.com>

	binutils, ld: make objdump --ctf's parameter optional
	ld by default (and always, unless adjusted with a hand-rolled linker
	script) emits deduplicated CTF into the .ctf section.  But viewing
	it needs you to explicitly tell objdump this: it doesn't default
	its argument, even though what you always end up typing is
	--ctf=.ctf.

	This is annoying, so make the argument optional.

	binutils/ChangeLog
	2021-10-25  Nick Alcock  <nick.alcock@oracle.com>

		* objdump.c (usage): --ctf now has an optional argument.
		(main): Adjust accordingly.
		(dump_ctf): Default it.
		* doc/ctf.options.texi: Adjust.

	ld/ChangeLog
	2021-10-25  Nick Alcock  <nick.alcock@oracle.com>

		* testsuite/ld-ctf/array.d: Change --ctf=.ctf to --ctf.
		* testsuite/ld-ctf/conflicting-cycle-1.B-1.d: Likewise.
		* testsuite/ld-ctf/conflicting-cycle-1.B-2.d: Likewise.
		* testsuite/ld-ctf/conflicting-cycle-1.parent.d: Likewise.
		* testsuite/ld-ctf/conflicting-cycle-2.A-1.d: Likewise.
		* testsuite/ld-ctf/conflicting-cycle-2.A-2.d: Likewise.
		* testsuite/ld-ctf/conflicting-cycle-2.parent.d: Likewise.
		* testsuite/ld-ctf/conflicting-cycle-3.C-1.d: Likewise.
		* testsuite/ld-ctf/conflicting-cycle-3.C-2.d: Likewise.
		* testsuite/ld-ctf/conflicting-cycle-3.parent.d: Likewise.
		* testsuite/ld-ctf/conflicting-enums.d: Likewise.
		* testsuite/ld-ctf/conflicting-typedefs.d: Likewise.
		* testsuite/ld-ctf/cross-tu-cyclic-conflicting.d: Likewise.
		* testsuite/ld-ctf/cross-tu-cyclic-nonconflicting.d: Likewise.
		* testsuite/ld-ctf/cross-tu-into-cycle.d: Likewise.
		* testsuite/ld-ctf/cross-tu-noncyclic.d: Likewise.
		* testsuite/ld-ctf/cycle-1.d: Likewise.
		* testsuite/ld-ctf/cycle-2.A.d: Likewise.
		* testsuite/ld-ctf/cycle-2.B.d: Likewise.
		* testsuite/ld-ctf/cycle-2.C.d: Likewise.
		* testsuite/ld-ctf/data-func-conflicted.d: Likewise.
		* testsuite/ld-ctf/diag-cttname-null.d: Likewise.
		* testsuite/ld-ctf/diag-cuname.d: Likewise.
		* testsuite/ld-ctf/diag-parlabel.d: Likewise.
		* testsuite/ld-ctf/enum-forward.d: Likewise.
		* testsuite/ld-ctf/enums.d: Likewise.
		* testsuite/ld-ctf/forward.d: Likewise.
		* testsuite/ld-ctf/function.d: Likewise.
		* testsuite/ld-ctf/nonrepresentable.d: Likewise.
		* testsuite/ld-ctf/slice.d: Likewise.
		* testsuite/ld-ctf/super-sub-cycles.d: Likewise.

2021-10-25  Nick Alcock  <nick.alcock@oracle.com>

	binutils: make objdump/readelf --ctf-parent actually useful
	This option has been present since the very early days of the
	development of libctf as part of binutils, and it shows.  Back in the
	earliest days, I thought we might handle ambiguous types by introducing
	new ELF sections on the fly named things like .ctf.foo.c for ambiguous
	types found only in foo.c, etc.  This turned out to be a terrible idea,
	so we moved to using a CTF archive in the .ctf section which contained
	all the CTF dictionaries -- but the --ctf-parent option in objdump and
	readelf was never adjusted, and lingered as a mechanism to specify CTF
	parent dictionaries in sections other than .ctf, even though the linker
	has no way to produce parent dictionaries in different sections from
	their children, libctf's ctf_open can't handle such split-up
	parent/child dicts, and they are never found in the wild, emitted by GNU
	ld or by any known third-party linking tool.

	Meanwhile, the actually-useful ctf_link feature (albeit not used by ld)
	which lets you remap the names of CTF archive members (so you can end up
	with a parent archive member named something other than ".ctf", still
	contained with all its children in a single .ctf section) had no support
	in objdump or readelf: there was no way to tell them that these members
	were parents, so all the types in the associated child dicts always
	appeared corrupted, referencing nonexistent types from a parent objdump
	couldn't find.

	So adjust --ctf-parent so that rather than taking a section name it
	takes a member name instead (if not specified, the name is ".ctf", which
	is what GNU ld emits).  Because the option was always useless before
	now, this is expected to have no backward-compatibility implications.

	As part of this, we have to slightly adjust the code which skips the
	archive member name if redundant: right now it skips it if it's ".ctf",
	on the assumption that this name will almost always be at the start
	of the objdump output and thus we'll end up with a shared dump
	and then smaller, headed dumps for the per-TU child dicts; but if
	the parent name has been changed, that won't be true any more.

	So change the rules to "members named .ctf which appear first in the
	first have their member name skipped".  Since we now need to count
	members, move from ctf_archive_iter (for which passing in extra
	parameters requires defining a new struct and is clumsy) to
	ctf_archive_next, allowing us to just *call* dump_ctf_archive_member and
	maintain a member count in the obvious way.  In the process we fix a
	tiny difference between readelf and objdump: if a ctf_dump ever failed,
	readelf skipped every later member, while objdump tried to keep going as
	much as it could.  For a dumping tool the former is clearly preferable.

	binutils/ChangeLog
	2021-10-25  Nick Alcock  <nick.alcock@oracle.com>

		* objdump.c (usage): --ctf-parent now takes a name, not a section.
		(dump_ctf): Don't open a separate section; use the parent_name in
		ctf_dict_open instead.  Use ctf_archive_next, not ctf_archive_iter,
		so we can pass down a member count.
		(dump_ctf_archive_member): Add the member count; don't return
		anything.  Import parents into children no matter what the
		parent's name, while still avoiding displaying the header for the
		common parent name of ".ctf".
		* readelf.c (usage): Adjust similarly.
		(dump_section_as_ctf): Likewise.
		(dump_ctf_archive_member): Likewise.  Never stop iterating over
		archive members, even if ctf_dump of one member fails.
		* doc/ctf.options.texi: Adjust.

2021-10-25  Alan Modra  <amodra@gmail.com>

	objdump doesn't accept -L option
	A followup to commit ca0e11aa4b.

		* objdump.c (main): Add 'L' to short options and sort them.

2021-10-25  Alan Modra  <amodra@gmail.com>

	bfd_nonfatal_message, localise va_start
	Nothing to see here, just a little tidier.

		* bucomm.c (bfd_nonfatal_message): Localise va_list args.

2021-10-25  Alan Modra  <amodra@gmail.com>

	ubsan: _bfd_xcoff64_swap_aux_in left shift of negative value
		* coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Use bfd_vma for h.

	asan: evax_bfd_print_image buffer overflow
		* vms-alpha.c (evax_bfd_print_image): Sanity check printing of
		"image activator fixup" section.
		(evax_bfd_print_relocation_records): Sanity check buffer offsets.
		(evax_bfd_print_address_fixups): Likewise.
		(evax_bfd_print_reference_fixups): Likewise.

2021-10-25  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-24  Alan Modra  <amodra@gmail.com>

	asan: c4x, c54x coff_canonicalize_reloc buffer overflow
	Sometimes the investigation of a fuzzing bug report leads into areas
	you'd rather not go.  In this instance by the time I'd figured out the
	real cause was a target variant that had never been properly supported
	in binutils, the time needed to fix it was less than the time needed
	to rip it out.

		* coffcode.h (coff_set_alignment_hook): Call bfd_coff_swap_reloc_in
		not coff_swap_reloc_in.
		(coff_slurp_reloc_table): Likewise.  Don't use RELOC type.
		(ticoff0_swap_table): Use coff_swap_reloc_v0_out and
		coff_swap_reloc_v0_in.
		* coffswap.h (coff_swap_reloc_v0_in, coff_swap_reloc_v0_out): New.
		* coff-tic54x.c (tic54x_lookup_howto): Don't abort.
		* coffgen.c (coff_get_normalized_symtab): Use PTR_ADD.
		* bfd-in.h (PTR_ADD, NPTR_ADD): Avoid warnings when passing an
		expression.
		* bfd-in2.h: Regenerate.

2021-10-24  Alan Modra  <amodra@gmail.com>

	asan: arm-darwin: buffer overflow
		PR 21813
		* mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Sanity
		check PAIR reloc in other branch of condition as was done for
		PR21813.  Formatting.  Delete debug printf.

	asan: aout: heap buffer overflow
		* aoutx.h (aout_get_external_symbols): Sanity check before writing
		zero index entry.  Remove outdated comment.
		* pdp11.c (aout_get_external_symbols): Likewise.

2021-10-24  liuzhensong  <liuzhensong@loongson.cn>

	LoongArch ld support
	2021-10-22  Chenghua Xu  <xuchenghua@loongson.cn>
		    Zhensong Liu  <liuzhensong@loongson.cn>
		    Weinan Liu  <liuweinan@loongson.cn>
		    Xiaolin Tang  <tangxiaolin@loongson.cn>

	ld/
		* Makefile.am: Add LoongArch.
		* NEWS: Mention LoongArch support.
		* configure.tgt: Add LoongArch.
		* emulparams/elf32loongarch-defs.sh: New.
		* emulparams/elf32loongarch.sh: Likewise.
		* emulparams/elf64loongarch-defs.sh: Likewise.
		* emulparams/elf64loongarch.sh: Likewise.
		* emultempl/loongarchelf.em: Likewise.
		* Makefile.in: Regenerate.
		* po/BLD-POTFILES.in: Regenerate.
	ld/testsuite/
		* ld-loongarch-elf/disas-jirl.d: New.
		* ld-loongarch-elf/disas-jirl.s: Likewise.
		* ld-loongarch-elf/jmp_op.d: Likewise.
		* ld-loongarch-elf/jmp_op.s: Likewise.
		* ld-loongarch-elf/ld-loongarch-elf.exp: Likewise.
		* ld-loongarch-elf/macro_op.d: Likewise.
		* ld-loongarch-elf/macro_op.s: Likewise.
		* ld-loongarch-elf/syscall-0.s: Likewise.
		* ld-loongarch-elf/syscall-1.s: Likewise.
		* ld-loongarch-elf/syscall.d: Likewise.
		* ld-srec/srec.exp: Add LoongArch.
		* ld-unique/pr21529.d: Likewise.

2021-10-24  liuzhensong  <liuzhensong@loongson.cn>

	LoongArch gas support
	2021-10-22  Chenghua Xu  <xuchenghua@loongson.cn>
	            Zhensong Liu  <liuzhensong@loongson.cn>
	            Weinan Liu  <liuweinan@loongson.cn>
		    Xiaolin Tang  <tangxiaolin@loongson.cn>

	gas/
		* Makefile.am: Add LoongArch.
		* NEWS: Mention LoongArch support.
		* config/loongarch-lex-wrapper.c: New.
		* config/loongarch-lex.h: New.
		* config/loongarch-lex.l: New.
		* config/loongarch-parse.y: New.
		* config/tc-loongarch.c: New.
		* config/tc-loongarch.h: New.
		* configure.ac: Add LoongArch.
		* configure.tgt: Likewise.
		* doc/as.texi: Likewise.
		* doc/c-loongarch.texi: Likewise.
		* Makefile.in: Regenerate.
		* configure: Regenerate.
		* po/POTFILES.in: Regenerate.
	gas/testsuite/
		* gas/all/gas.exp: Add LoongArch.
		* gas/elf/elf.exp: Likewise.
		* gas/loongarch/4opt_op.d: New.
		* gas/loongarch/4opt_op.s: Likewise.
		* gas/loongarch/fix_op.d: Likewise.
		* gas/loongarch/fix_op.s: Likewise.
		* gas/loongarch/float_op.d: Likewise.
		* gas/loongarch/float_op.s: Likewise.
		* gas/loongarch/imm_op.d: Likewise.
		* gas/loongarch/imm_op.s: Likewise.
		* gas/loongarch/jmp_op.d: Likewise.
		* gas/loongarch/jmp_op.s: Likewise.
		* gas/loongarch/load_store_op.d: Likewise.
		* gas/loongarch/load_store_op.s: Likewise.
		* gas/loongarch/loongarch.exp: Likewise.
		* gas/loongarch/macro_op.d: Likewise.
		* gas/loongarch/macro_op.s: Likewise.
		* gas/loongarch/nop.d: Likewise.
		* gas/loongarch/nop.s: Likewise.
		* gas/loongarch/privilege_op.d: Likewise.
		* gas/loongarch/privilege_op.s: Likewise.
		* gas/loongarch/syscall.d: Likewise.
		* gas/loongarch/syscall.s: Likewise.
		* lib/gas-defs.exp: Add LoongArch.

2021-10-24  liuzhensong  <liuzhensong@loongson.cn>

	LoongArch binutils support
	2021-10-22  Chenghua Xu  <xuchenghua@loongson.cn>
		    Zhensong Liu  <liuzhensong@loongson.cn>
		    Weinan Liu  <liuweinan@loongson.cn>
	binutils/
		* NEWS: Mention LoongArch support.
		* readelf.c: Add LoongArch.
		* testsuite/binutils-all/objdump.exp: Add LoongArch.

2021-10-24  liuzhensong  <liuzhensong@loongson.cn>

	LoongArch opcodes support
	2021-10-22  Chenghua Xu  <xuchenghua@loongson.cn>
		    Zhensong Liu  <liuzhensong@loongson.cn>
		    Weinan Liu  <liuweinan@loongson.cn>

	include/
		* opcode/loongarch.h: New.
		* dis-asm.h: Declare print_loongarch_disassembler_options.
	opcodes/
		* Makefile.am: Add LoongArch.
		* configure.ac: Likewise.
		* disassemble.c: Likewise.
		* disassemble.h: Declare print_insn_loongarch.
		* loongarch-coder.c: New.
		* loongarch-dis.c: New.
		* loongarch-opc.c: New.
		* Makefile.in: Regenerate.
		* configure: Regenerate.
		* po/POTFILES.in: Regenerate.

2021-10-24  liuzhensong  <liuzhensong@loongson.cn>

	LoongArch bfd support
	2021-10-22  Chenghua Xu  <xuchenghua@loongson.cn>
		    Zhensong Liu  <liuzhensong@loongson.cn>
		    Weinan Liu  <liuweinan@loongson.cn>
	bfd/
		* Makefile.am: Add LoongArch.
		* archures.c: Likewise.
		* config.bfd: Likewise.
		* configure.ac: Likewise.
		* cpu-loongarch.c: New.
		* elf-bfd.h: Add LoongArch.
		* elf.c: Add LoongArch elfcore_grok_xxx.
		* elfnn-loongarch.c: New.
		* elfxx-loongarch.c: New.
		* elfxx-loongarch.h: New.
		* reloc.c: Add LoongArch BFD RELOC ENUM.
		* targets.c: Add LoongArch target.
		* Makefile.in: Regenerate.
		* bfd-in2.h: Regenerate.
		* configure: Regenerate.
		* libbfd.h: Regenerate.
		* po/BLD-POTFILES.in: Regenerate.
		* po/SRC-POTFILES.in: Regenerate.

	include/
		* elf/common.h: Add NT_LARCH_{CPUCFG,CSR,LSX,LASX}.
		* elf/loongarch.h: New.

2021-10-24  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-23  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-22  H.J. Lu  <hjl.tools@gmail.com>

	x86: Add -muse-unaligned-vector-move to assembler
	Unaligned load/store instructions on aligned memory or register are as
	fast as aligned load/store instructions on modern Intel processors.  Add
	a command-line option, -muse-unaligned-vector-move, to x86 assembler to
	encode encode aligned vector load/store instructions as unaligned
	vector load/store instructions.

		* NEWS: Mention -muse-unaligned-vector-move.
		* config/tc-i386.c (use_unaligned_vector_move): New.
		(encode_with_unaligned_vector_move): Likewise.
		(md_assemble): Call encode_with_unaligned_vector_move for
		-muse-unaligned-vector-move.
		(OPTION_MUSE_UNALIGNED_VECTOR_MOVE): New.
		(md_longopts): Add -muse-unaligned-vector-move.
		(md_parse_option): Handle -muse-unaligned-vector-move.
		(md_show_usage): Add -muse-unaligned-vector-move.
		* doc/c-i386.texi: Document -muse-unaligned-vector-move.
		* testsuite/gas/i386/i386.exp: Run unaligned-vector-move and
		x86-64-unaligned-vector-move.
		* testsuite/gas/i386/unaligned-vector-move.d: New file.
		* testsuite/gas/i386/unaligned-vector-move.s: Likewise.
		* testsuite/gas/i386/x86-64-unaligned-vector-move.d: Likewise.

2021-10-22  Tom Tromey  <tromey@adacore.com>

	Fix 'uninstall' target
	This adds some missing code to the 'uninstall' targets in gdb and
	gdbserver.  It also changes gdb's uninstall target so that it no
	longer tries to remove any man page -- this is already done (and more
	correctly) by doc/Makefile.in.

	I tested this with 'make install' followed by 'make uninstall', then
	examining the install tree for regular files.  Only the 'dir' file
	remains, but this appears to just be how 'install-info' is intended to
	work.

2021-10-22  Tom Tromey  <tromey@adacore.com>

	Remove unused variables from gdbserver's Makefile
	This removes a number of unused variables from gdbserver's Makefile.
	I found these while working on the subsequent patches, and figured it
	would be cleaner to have a separate patch for the deletions.

2021-10-22  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.threads/linux-dp.exp
	On openSUSE Tumbleweed with glibc-debuginfo installed I get:
	...
	 (gdb) PASS: gdb.threads/linux-dp.exp: continue to breakpoint: thread 5's print
	 where^M
	 #0  print_philosopher (n=3, left=33 '!', right=33 '!') at linux-dp.c:105^M
	 #1  0x0000000000401628 in philosopher (data=0x40537c) at linux-dp.c:148^M
	 #2  0x00007ffff7d56b37 in start_thread (arg=<optimized out>) \
	                          at pthread_create.c:435^M
	 #3  0x00007ffff7ddb640 in clone3 () \
	                          at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81^M
	 (gdb) PASS: gdb.threads/linux-dp.exp: first thread-specific breakpoint hit
	...
	while without debuginfo installed I get instead:
	...
	 (gdb) PASS: gdb.threads/linux-dp.exp: continue to breakpoint: thread 5's print
	 where^M
	 #0  print_philosopher (n=3, left=33 '!', right=33 '!') at linux-dp.c:105^M
	 #1  0x0000000000401628 in philosopher (data=0x40537c) at linux-dp.c:148^M
	 #2  0x00007ffff7d56b37 in start_thread () from /lib64/libc.so.6^M
	 #3  0x00007ffff7ddb640 in clone3 () from /lib64/libc.so.6^M
	 (gdb) FAIL: gdb.threads/linux-dp.exp: first thread-specific breakpoint hit
	...

	The problem is that the regexp used:
	...
	  "\(from .*libpthread\|at pthread_create\|in pthread_create\)"
	...
	expects the 'from' part to match libpthread, but in glibc 2.34 libpthread has
	been merged into libc.

	Fix this by updating the regexp.

	Tested on x86_64-linux.

2021-10-22  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix FAILs in gdb.mi/mi-breakpoint-changed.exp
	Since commit e36788d1354 "[gdb/testsuite] Fix handling of nr_args < 3 in
	mi_gdb_test" we run into:
	...
	PASS: gdb.mi/mi-breakpoint-changed.exp: test_auto_disable: mi runto main
	Expecting: ^(-break-insert -f pendfunc1[^M
	]+)?((&.*)*.*~"Breakpoint 2 at.*\\n".*=breakpoint-created,\
	  bkpt=\{number="2",type="breakpoint".*\}.*\n\^done[^M
	]+[(]gdb[)] ^M
	[ ]*)
	-break-insert -f pendfunc1^M
	^done,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",\
	  addr="0x00007ffff7bd559e",func="pendfunc1",\
	  file="gdb/testsuite/gdb.mi/pendshr1.c",\
	  fullname="gdb/testsuite/gdb.mi/pendshr1.c",line="21",thread-groups=["i1"],\
	  times="0",original-location="pendfunc1"}^M
	(gdb) ^M
	FAIL: gdb.mi/mi-breakpoint-changed.exp: test_auto_disable: \
	  -break-insert -f pendfunc1 (unexpected output)
	...

	The regexp expects a breakpoint-created event, but that's actually suppressed
	by the command:
	...
	DEF_MI_CMD_MI_1 ("break-insert", mi_cmd_break_insert,
	                   &mi_suppress_notification.breakpoint),
	...

	Fix this by updating the regexp.

	Likewise for the following:
	...
	PASS: gdb.mi/mi-breakpoint-changed.exp: test_auto_disable: \
	  -break-insert -f pendfunc1
	Expecting: ^(-break-enable count 1 2[^M
	]+)?(=breakpoint-modified,\
	  bkpt=\{number="2",type="breakpoint",disp="dis",enabled="y".*\}.*\n\^done[^M
	]+[(]gdb[)] ^M
	[ ]*)
	-break-enable count 1 2^M
	^done^M
	(gdb) ^M
	FAIL: gdb.mi/mi-breakpoint-changed.exp: test_auto_disable: \
	  -break-enable count 1 2 (unexpected out\
	put)
	...

	Tested on x86_64-linux.

2021-10-22  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb/python: move gdb.Membuf support into a new file
	In a future commit I'm going to be creating gdb.Membuf objects from a
	new file within gdb/python/py*.c.  Currently all gdb.Membuf objects
	are created directly within infpy_read_memory (as a result of calling
	gdb.Inferior.read_memory()).

	Initially I split out the Membuf creation code into a new function,
	and left the new function in gdb/python/py-inferior.c, however, it
	felt a little random that the Membuf creation code should live with
	the inferior handling code.

	So, then I moved all of the Membuf related code out into a new file,
	gdb/python/py-membuf.c, the interface is gdbpy_buffer_to_membuf, which
	wraps an array of bytes into a gdb.Membuf object.

	Most of the code is moved directly from py-inferior.c with only minor
	tweaks to layout and replacing NULL with nullptr, hence, I've left the
	copyright date on py-membuf.c as 2009-2021 to match py-inferior.c.

	Currently, the only user of this code is still py-inferior.c, but in
	later commits this will change.

	There should be no user visible changes after this commit.

2021-10-22  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb/python: new gdb.architecture_names function
	Add a new function to the Python API, gdb.architecture_names().  This
	function returns a list containing all of the supported architecture
	names within the current build of GDB.

	The values returned in this list are all of the possible values that
	can be returned from gdb.Architecture.name().

2021-10-22  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: make disassembler fprintf callback a static member function
	The disassemble_info structure has four callbacks, we have three of
	them as static member functions within gdb_disassembler, the fourth is
	just a global static function.

	However, this fourth callback, is still only used from the
	disassemble_info struct, so there's no real reason for its special
	handling.

	This commit makes fprintf_disasm a static method within
	gdb_disassembler.

	There should be no user visible changes after this commit.

2021-10-22  Lewis Revill  <lewis.revill@embecosm.com>

	RISC-V: Added ld testcase for pcgp relaxation.
	Consider the the pcgp-relax-02 testcase,

	        .text
	        .globl _start
	_start:
	.L1:    auipc   a0, %pcrel_hi(data_a)
	.L2:    auipc   a1, %pcrel_hi(data_b)
	        addi    a0, a0, %pcrel_lo(.L1)
	        addi    a1, a1, %pcrel_lo(.L2)

	        .data
	        .word 0x0
	        .globl data_a
	data_a:
	        .word 0x1

	        .section .rodata
	        .globl data_b
	data_b:
	        .word 0x2

	If the first auipc is deleted, but we are still building the pcgp
	table (connect the high and low pcrel relocations), then there is
	an aliasing issue that we need some way to disambiguate which of
	the two symbols we are targeting.  Therefore, Palmer thought of a
	way to use R_RISCV_DELETE to split this into two phases, so we
	could resolve the addresses before creating the ambiguities.

	This patch just add the ld testcase for the above case, in case we
	have changed something but break this.

	ld/
		* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Renamed pcgp-relax
		to pcgp-relax-01, and added pcgp-relax-02.
		* testsuite/ld-riscv-elf/pcgp-relax-01.d: Renmaed from pcgp-relax.
		* testsuite/ld-riscv-elf/pcgp-relax-01.s: Likewise.
		* testsuite/ld-riscv-elf/pcgp-relax-02.d: New testcase.
		* testsuite/ld-riscv-elf/pcgp-relax-02.s: Likewise.

2021-10-22  Lewis Revill  <lewis.revill@embecosm.com>

	RISC-V: Don't separate pcgp relaxation to another relax pass.
	Commit abd20cb637008da9d32018b4b03973e119388a0a and
	ebdcad3fddf6ec21f6d4dcc702379a12718cf0c4 introduced additional
	complexity into the paths run by the RISC-V relaxation pass in order to
	resolve the issue of accurately keeping track of pcrel_hi and pcrel_lo
	pairs. The first commit split up relaxation of these relocs into a pass
	which occurred after other relaxations in order to prevent the situation
	where bytes were deleted in between a pcrel_lo/pcrel_hi pair, inhibiting
	our ability to find the corresponding pcrel_hi relocation from the
	address attached to the pcrel_lo.

	Since the relaxation was split into two passes the 'again' parameter
	could not be used to perform the entire relaxation process again and so
	the second commit added a way to restart ldelf_map_segments, thus
	starting the whole process again.

	Unfortunately this process could not account for the fact that we were
	not finished with the relaxation process so in some cases - such as the
	case where code would not fit in a memory region before the
	R_RISCV_ALIGN relocation was relaxed - sanity checks in generic code
	would fail.

	This patch fixes all three of these concerns by reverting back to a
	system of having only one target relax pass but updating entries in the
	table of pcrel_hi/pcrel_lo relocs every time any bytes are deleted. Thus
	we can keep track of the pairs accurately, and we can use the 'again'
	parameter to restart the entire target relax pass, behaving in the way
	that generic code expects. Unfortunately we must still have an
	additional pass to delay deleting AUIPC bytes to avoid ambiguity between
	pcrel_hi relocs stored in the table after deletion. This pass can only
	be run once so we may potentially miss out on relaxation opportunities
	but this is likely to be rare.

	https://sourceware.org/bugzilla/show_bug.cgi?id=28410

	bfd/
		* elfnn-riscv.c (riscv_elf_link_hash_table): Removed restart_relax.
		(riscv_elf_link_hash_table_create): Updated.
		(riscv_relax_delete_bytes): Moved after the riscv_update_pcgp_relocs.
		Update the pcgp_relocs table whenever bytes are deleted.
		(riscv_update_pcgp_relocs): Add function to update the section
		offset of pcrel_hi and pcrel_lo, and also update the symbol value
		of pcrel_hi.
		(_bfd_riscv_relax_call): Need to update the pcgp_relocs table
		when deleting codes.
		(_bfd_riscv_relax_lui): Likewise.
		(_bfd_riscv_relax_tls_le): Likewise.
		(_bfd_riscv_relax_align): Once we've handled an R_RISCV_ALIGN,
		we can't relax anything else, so set the sec->sec_flg0 to true.
		Besides, we don't need to update the pcgp_relocs table at this
		stage, so just pass NULL pointer as the pcgp_relocs table for
		riscv_relax_delete_bytes.
		(_bfd_riscv_relax_section): Use only one pass for all target
		relaxations.
		(_bfd_riscv_relax_delete): Likewise, we don't need to update
		the pcgp_relocs table at this stage, and don't need to set
		the `again' since restart_relax mechanism is abandoned.
		(bfd_elfNN_riscv_restart_relax_sections): Removed.
		(_bfd_riscv_relax_section): Updated.
		* elfxx-riscv.h (bfd_elf32_riscv_restart_relax_sections): Removed.
		(bfd_elf64_riscv_restart_relax_sections): Likewise.
	ld/
		* emultempl/riscvelf.em: Revert restart_relax changes and set
		relax_pass to 3.
		* testsuite/ld-riscv-elf/align-small-region.d: New testcase.
		* testsuite/ld-riscv-elf/align-small-region.ld: Likewise.
		* testsuite/ld-riscv-elf/align-small-region.s: Likewise.
		* testsuite/ld-riscv-elf/restart-relax.d: Removed sine the
		restart_relax mechanism is abandoned.
		* testsuite/ld-riscv-elf/restart-relax.s: Likewise.
		* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Updated.

2021-10-22  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: fix remote-sim.c build
	Commit 183be222907a ("gdb, gdbserver: make target_waitstatus safe")
	broke the remote-sim.c build.  In fact, it does some wrong changes,
	result of a bad sed invocation.

	Fix it by adjusting the code to the new target_waitstatus API.

	Change-Id: I3236ff7ef7681fc29215f68be210ff4263760e91

2021-10-22  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-21  Simon Marchi  <simon.marchi@efficios.com>

	gdb, gdbserver: make target_waitstatus safe
	I stumbled on a bug caused by the fact that a code path read
	target_waitstatus::value::sig (expecting it to contain a gdb_signal
	value) while target_waitstatus::kind was TARGET_WAITKIND_FORKED.  This
	meant that the active union field was in fact
	target_waitstatus::value::related_pid, and contained a ptid.  The read
	signal value was therefore garbage, and that caused GDB to crash soon
	after.  Or, since that GDB was built with ubsan, this nice error
	message:

	    /home/simark/src/binutils-gdb/gdb/linux-nat.c:1271:12: runtime error: load of value 2686365, which is not a valid value for type 'gdb_signal'

	Despite being a large-ish change, I think it would be nice to make
	target_waitstatus safe against that kind of bug.  As already done
	elsewhere (e.g. dynamic_prop), validate that the type of value read from
	the union matches what is supposed to be the active field.

	 - Make the kind and value of target_waitstatus private.
	 - Make the kind initialized to TARGET_WAITKIND_IGNORE on
	   target_waitstatus construction.  This is what most users appear to do
	   explicitly.
	 - Add setters, one for each kind.  Each setter takes as a parameter the
	   data associated to that kind, if any.  This makes it impossible to
	   forget to attach the associated data.
	 - Add getters, one for each associated data type.  Each getter
	   validates that the data type fetched by the user matches the wait
	   status kind.
	 - Change "integer" to "exit_status", "related_pid" to "child_ptid",
	   just because that's more precise terminology.
	 - Fix all users.

	That last point is semi-mechanical.  There are a lot of obvious changes,
	but some less obvious ones.  For example, it's not possible to set the
	kind at some point and the associated data later, as some users did.
	But in any case, the intent of the code should not change in this patch.

	This was tested on x86-64 Linux (unix, native-gdbserver and
	native-extended-gdbserver boards).  It was built-tested on x86-64
	FreeBSD, NetBSD, MinGW and macOS.  The rest of the changes to native
	files was done as a best effort.  If I forgot any place to update in
	these files, it should be easy to fix (unless the change happens to
	reveal an actual bug).

	Change-Id: I0ae967df1ff6e28de78abbe3ac9b4b2ff4ad03b7

2021-10-21  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbserver: initialize the members of lwp_info in-class
	Add a constructor to initialize the waitstatus members.  Initialize the
	others in the class directly.

	Change-Id: I10f885eb33adfae86e3c97b1e135335b540d7442

2021-10-21  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbserver: make thread_info non-POD
	Add a constructor and a destructor.  The constructor takes care of the
	initialization that happened in add_thread, while the destructor takes
	care of the freeing that happened in free_one_thread.  This is needed to
	make target_waitstatus non-POD, as thread_info contains a member of that
	type.

	Change-Id: I1db321b4de9dd233ede0d5c101950f1d6f1d13b7

2021-10-21  Andrew Pinski  <apinski@marvell.com>

	Fix ARMv8.4 for hw watchpoint and breakpoint
	Just like my previoius patch for ARMv8.1 and v8.2 (49ecef2a7da2ee9df4),
	this adds ARMv8.4 debug arch as being compatible for hw watchpoint
	and breakpoints.

	Refactor code slightly in nat/aarch64-linux-hw-point.c (aarch64_linux_get_debug_reg_capacity)
	Since the two locations which check the debug arch are the same code currently, it is
	a good idea to factor it out to a new function and just use that function from
	aarch64_linux_get_debug_reg_capacity. This is also the first step to support
	ARMv8.4 debug arch.

2021-10-21  Carl Love  <cel@us.ibm.com>

	Fixes for gdb.mi/mi-break.exp
	Update the expected pattern for two of the tests.

	Matching pattern \" doesn't work.  Use .*  to match the \* pattern.

2021-10-21  Tom de Vries  <tdevries@suse.de>

	[gdb/tui] Fix breakpoint display functionality
	In commit 81e6b8eb208 "Make tui-winsource not use breakpoint_chain", a loop
	body was transformed into a lambda function body:
	...
	-      for (bp = breakpoint_chain;
	-           bp != NULL;
	-           bp = bp->next)
	+      iterate_over_breakpoints ([&] (breakpoint *bp) -> bool
	...
	and consequently:
	- a continue was replaced by a return, and
	- a final return was added.

	Then in commit 240edef62f0 "gdb: remove iterate_over_breakpoints function", we
	transformed back to a loop body:
	...
	-      iterate_over_breakpoints ([&] (breakpoint *bp) -> bool
	+      for (breakpoint *bp : all_breakpoints ())
	...
	but without reverting the changes that introduced the two returns.

	Consequently, breakpoints no longer show up in the tui source window.

	Fix this by reverting the changes that introduced the two returns.

	Build on x86_64-linux, tested with all .exp test-cases that contain
	tuiterm_env.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28483

2021-10-21  Carl Love  <cel@us.ibm.com>

	Fix test step-and-next-inline.cc
	The test expect the runto_main to stop at the first line of the function.
	Depending on the optimization level, gdb may stop in the prolog or after
	the prolog at the first line.  To ensure the test stops at the first line
	of main, have it explicitly stop at a break point on the first line of the
	function.

	On PowerPC, the test passes when compiled with no optimization but fails
	with all levels of optimization due to gdb stopping in the prolog.

2021-10-21  Tom Tromey  <tromey@adacore.com>

	Fix latent Ada bug when accessing field offsets
	The "add accessors for field (and call site) location" patch caused a
	gdb crash when running the internal AdaCore testsuite.  This turned
	out to be a latent bug in ada-lang.c.

	The immediate cause of the bug is that find_struct_field
	unconditionally uses TYPE_FIELD_BITPOS.  This causes an assert for a
	dynamic type.

	This patch fixes the problem by doing two things.  First, it changes
	find_struct_field to use a dummy value for the field offset in the
	situation where the offset is not actually needed by the caller.  This
	works because the offset isn't used in any other way -- only as a
	result.

	Second, this patch assures that calls to find_struct_field use a
	resolved type when the offset is needed.  For
	value_tag_from_contents_and_address, this is done by resolving the
	type explicitly.  In ada_value_struct_elt, this is done by passing
	nullptr for the out parameters when they are not needed (the second
	call in this function already uses a resolved type).

	Note that, while we believe the parent field probably can't occur at a
	variable offset, the patch still updates this code path, just in case.

	I've updated an existing test case to reproduce the crash.
	I'm checking this in.

2021-10-21  Alan Modra  <amodra@gmail.com>

	-Waddress warning in ldelf.c
	ldelf.c: In function 'ldelf_after_open':
	ldelf.c:1049:43: warning: the comparison will always evaluate as 'true' for the address of 'elf_header' will never be NULL [-Waddress]
	 1049 |           && elf_tdata (abfd)->elf_header != NULL
	      |                                           ^~
	In file included from ldelf.c:37:
	../bfd/elf-bfd.h:1957:21: note: 'elf_header' declared here
	 1957 |   Elf_Internal_Ehdr elf_header[1];      /* Actual data, but ref like ptr */

		* ldelf.c (ldelf_after_open): Remove useless elf_header test.

2021-10-21  Alan Modra  <amodra@gmail.com>

	Avoid -Waddress warnings in readelf
	Mainline gcc:
	readelf.c: In function 'find_section':
	readelf.c:349:8: error: the comparison will always evaluate as 'true' for the pointer operand in 'filedata->section_headers + (sizetype)((long unsigned int)i * 80)' must not be NULL [-Werror=address]
	  349 |   ((X) != NULL                                                          \
	      |        ^~
	readelf.c:761:9: note: in expansion of macro 'SECTION_NAME_VALID'
	  761 |     if (SECTION_NAME_VALID (filedata->section_headers + i)
	      |         ^~~~~~~~~~~~~~~~~~

	This will likely be fixed in gcc, but inline functions are nicer than
	macros.

		* readelf.c (SECTION_NAME, SECTION_NAME_VALID),
		(SECTION_NAME_PRINT, VALID_SYMBOL_NAME, VALID_DYNAMIC_NAME),
		(GET_DYNAMIC_NAME): Delete.  Replace with..
		(section_name, section_name_valid, section_name_print),
		(valid_symbol_name, valid_dynamic_name, get_dynamic_name): ..these
		new inline functions.  Update use throughout file.

2021-10-21  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-20  Alan Modra  <amodra@gmail.com>

	PR28417, std::string no longer allows accepting nullptr_t
		PR 28417
		* incremental.cc (Sized_relobj_incr::do_section_name): Avoid
		std:string undefined behaviour.
		* options.h (Search_directory::Search_directory): Likewise.

2021-10-20  Alan Modra  <amodra@gmail.com>

	Re: PR27625, powerpc64 gold __tls_get_addr calls
	My previous PR27625 patch had a problem or two.  For one, the error
	"__tls_get_addr call lacks marker reloc" on processing some calls
	before hitting a call without markers typically isn't seen.  Instead a
	gold assertion fails.  Either way it would be a hard error, which
	triggers on a file contained in libphobos.a when running the gcc
	testsuite.  A warning isn't even appropriate since the call involved
	is one built by hand without any of the arg setup relocations that
	might result in linker optimisation.

	So this patch reverts most of commit 0af4fcc25dd5, instead entirely
	ignoring the problem of mis-optimising old-style __tls_get_addr calls
	without marker relocs.  We can't handle them gracefully without
	another pass over relocations before decisions are made about GOT
	entries in Scan::global or Scan::local.  That seems too costly, just
	to link object files from 2009.  What's more, there doesn't seem to be
	any way to allow the libphobos explicit __tls_get_addr call, but not
	old TLS sequences without marker relocs.  Examining instructions
	before the __tls_get_addr call is out of the question: program flow
	might reach the call via a branch.  Putting an R_PPC64_TLSGD marker
	with zero sym on the call might be a solution, but current linkers
	will then merrily optimise away the call!

		PR gold/27625
		* powerpc.cc (Powerpc_relobj): Delete no_tls_marker_, tls_marker_,
		and tls_opt_error_ variables and accessors.  Remove all uses.

2021-10-20  Tom Tromey  <tom@tromey.com>

	Use std::string in print_one_catch_syscall
	This changes print_one_catch_syscall to use std::string, removing a
	bit of manual memory management.

	Use unique_xmalloc_ptr in breakpoint
	This changes struct breakpoint to use unique_xmalloc_ptr in a couple
	of spots, removing a bit of manual memory management.

	Use unique_xmalloc_ptr in bp_location
	This changes struct bp_location to use a unique_xmalloc_ptr, removing
	a bit of manual memory management.

	Use unique_xmalloc_ptr in watchpoint
	This changes struct watchpoint to use unique_xmalloc_ptr in a couple
	of places, removing a bit of manual memory management.

	Use unique_xmalloc_ptr in exec_catchpoint
	This changes struct exec_catchpoint to use a unique_xmalloc_ptr,
	removing a bit of manual memory management.

	Use unique_xmalloc_ptr in solib_catchpoint
	This changes struct solib_catchpoint to use a unique_xmalloc_ptr,
	removing a bit of manual memory management.

2021-10-20  Christian Biesinger  <cbiesinger@google.com>

	Make c-exp.y work with Bison 3.8+
	When using Bison 3.8, we get this error:

	    ../../gdb/c-exp.y:3455:1: error: 'void c_print_token(FILE*, int, YYSTYPE)' defined but not used [-Werror=unused-function]

	That's because bison 3.8 removed YYPRINT support:
	https://savannah.gnu.org/forum/forum.php?forum_id=10047

	Accordingly, this patch only defines that function for Bison < 3.8.

	Change-Id: I3cbf2f317630bb72810b00f2d9b2c4b99fa812ad

2021-10-20  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-19  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Reimplement gdb.gdb/python-interrupts.exp as unittest
	The test-case gdb.gdb/python-interrupts.exp:
	- runs to captured_command_loop
	- sets a breakpoint at set_active_ext_lang
	- calls a python command
	- verifies the command triggers the breakpoint
	- sends a signal and verifies the result

	The test-case is fragile, because (f.i. with -flto) it cannot be guaranteed
	that captured_command_loop and set_active_ext_lang are available for setting
	breakpoints.

	Reimplement the test-case as unittest, using:
	- execute_command_to_string to capture the output
	- try/catch to catch the "Error while executing Python code" exception
	- a new hook selftests::hook_set_active_ext_lang to raise the signal

	Tested on x86_64-linux.

2021-10-19  Tom Tromey  <tromey@adacore.com>

	Check index in type::field
	This changes gdb to check the index that is passed to type::field.
	This caught one bug in the Ada code when running the test suite
	(actually I found the bug first, then realized that the check would
	have helped), so this patch fixes that as well.

	Regression tested on x86-64 Fedora 34.

2021-10-19  Tom Tromey  <tromey@adacore.com>

	Fix Rust lex selftest when using libiconv
	The Rust lex selftest fails on our Windows build.  I tracked this down
	to a use of UTF-32 as a parameter to convert_between_encodings.  Here,
	iconv_open succeeds, but the actual conversion of a tab character
	fails with EILSEQ.  I suspect that "UTF-32" is being interpreted as
	big-endian, as changing the call to use "UTF-32LE" makes it work.
	This patch implements this fix.

2021-10-19  Tom Tromey  <tromey@adacore.com>

	Fix format_pieces selftest on Windows
	The format_pieces selftest currently fails on Windows hosts.

	The selftest doesn't handle the "%ll" -> "%I64" rewrite that the
	formatter may perform, but also gdbsupport was missing a configure
	check for PRINTF_HAS_LONG_LONG.  This patch fixes both issues.

2021-10-19  Tom Tromey  <tromey@adacore.com>

	Fix bug in dynamic type resolution
	A customer-reported problem led us to a bug in dynamic type
	resolution.  resolve_dynamic_struct will recursively call
	resolve_dynamic_type_internal, passing it the sub-object for the
	particular field being resolved.  While it offsets the address here,
	it does not also offset the "valaddr" -- the array of bytes describing
	the memory.

	This patch fixes the bug, by offsetting both.  A test case is included
	that can be used to reproduce the bug.

2021-10-19  Tom Tromey  <tromey@adacore.com>

	Always use std::function for self-tests
	Now that there is a register_test variant that accepts std::function,
	it seems to me that the 'selftest' struct and accompanying code is
	obsolete -- simply always using std::function is simpler.  This patch
	implements this idea.

2021-10-19  Daniel Black  <daniel@mariadb.org>

	Fix PR gdb/17917 Lookup build-id in remote binaries
	GDB doesn't support loading debug files using build-id from remote
	target filesystems.

	This is the case when gdbserver attached to a process and a gdb target
	remote occurs over tcp.

	With this change we make build-id lookups possible:

	    (gdb) show debug-file-directory
	    The directory where separate debug symbols are searched for is "/usr/local/lib/debug".
	    (gdb) set debug-file-directory /usr/lib/debug
	    (gdb) show sysroot
	    The current system root is "target:".
	    (gdb) target extended-remote :46615
	    Remote debugging using :46615
	    warning: Can not parse XML target description; XML support was disabled at compile time
	    Reading /usr/sbin/mariadbd from remote target...
	    warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.
	    Reading /usr/sbin/mariadbd from remote target...
	    Reading symbols from target:/usr/sbin/mariadbd...
	    Reading /usr/lib/debug/.build-id/6e/0a874dca5a7ff831396ddc0785d939a192efe3.debug from remote target...
	    Reading /usr/lib/debug/.build-id/6e/0a874dca5a7ff831396ddc0785d939a192efe3.debug from remote target...
	    Reading symbols from target:/usr/lib/debug/.build-id/6e/0a874dca5a7ff831396ddc0785d939a192efe3.debug...
	    Reading /lib/x86_64-linux-gnu/libpcre2-8.so.0 from remote target...
	    ...

	Before this change, the lookups would have been (GNU gdb (GDB) Fedora 10.2-3.fc34):

	    (gdb) target extended-remote :46615
	    Remote debugging using :46615
	    Reading /usr/sbin/mariadbd from remote target...
	    warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.
	    Reading /usr/sbin/mariadbd from remote target...
	    Reading symbols from target:/usr/sbin/mariadbd...
	    Reading /usr/sbin/0a874dca5a7ff831396ddc0785d939a192efe3.debug from remote target...
	    Reading /usr/sbin/.debug/0a874dca5a7ff831396ddc0785d939a192efe3.debug from remote target...
	    Reading /usr/lib/debug//usr/sbin/0a874dca5a7ff831396ddc0785d939a192efe3.debug from remote target...
	    Reading /usr/lib/debug/usr/sbin//0a874dca5a7ff831396ddc0785d939a192efe3.debug from remote target...
	    Reading target:/usr/lib/debug/usr/sbin//0a874dca5a7ff831396ddc0785d939a192efe3.debug from remote target...
	    Missing separate debuginfo for target:/usr/sbin/mariadbd
	    Try: dnf --enablerepo='*debug*' install /usr/lib/debug/.build-id/6e/0a874dca5a7ff831396ddc0785d939a192efe3.debug
	    (No debugging symbols found in target:/usr/sbin/mariadbd)

	Observe it didn't look for
	/usr/lib/debug/.build-id/6e/0a874dca5a7ff831396ddc0785d939a192efe3.debug
	on the remote target (where it is) and expected them to be installed
	locally.

	As a minor optimization, this also changes the build-id lookup such that
	if sysroot is empty, no second lookup of the same location is performed.

	Change-Id: I5181696d271c325a25a0805a8defb8ab7f9b3f55
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=17917

2021-10-19  Nick Clifton  <nickc@redhat.com>

	Fix a potential illegal memory access when testing for a special LTO symbol name.
	bfd	* linker.c (_bfd_generic_link_add_one_symbol): Test for a NULL
		name before checking to see if the symbol is __gnu_lto_slim.
		* archive.c (_bfd_compute_and_write_armap): Likewise.
	binutils
		* nm.c (filter_symbols): Test for a NULL name before checking to
		see if the symbol is __gnu_lto_slim.
		* objcopy.c (filter_symbols): Likewise.

2021-10-19  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-18  Weimin Pan  <weimin.pan@oracle.com>

	CTF: incorrect underlying type setting for enumeration types
	A bug was filed against the incorrect underlying type setting for
	an enumeration type, which was caused by a copy and paste error.
	This patch fixes the problem by setting it by calling objfile_int_type,
	which was originally dwarf2_per_objfile::int_type, with ctf_type_size bits.
	Also add error checking on ctf_func_type_info call.

2021-10-18  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-17  Alan Modra  <amodra@gmail.com>

	PR28459, readelf issues bogus warning
	I'd missed the fact that the .debug_rnglists dump doesn't exactly
	display the contents of the section.  Instead readelf rummages through
	.debug_info looking for DW_AT_ranges entries, then displays the
	entries in .debug_rnglists pointed at, sorted.  A simpler dump of the
	actual section contents might be more useful and robust, but it was
	likely done that way to detect overlap and holes.

	Anyway, the headers in .debug_rnglists besides the first are ignored,
	and limiting to the unit length of the first header fails if there is
	more than one unit.

		PR 28459
		* dwarf.c (display_debug_ranges): Don't constrain data to length
		in header.

2021-10-17  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-16  H.J. Lu  <hjl.tools@gmail.com>

	ld: Adjust pr28158.rd for glibc 2.34
	Adjust pr28158.rd for glibc 2.34:

	$ readelf -W --dyn-syms tmpdir/pr28158

	Symbol table '.dynsym' contains 4 entries:
	   Num:    Value          Size Type    Bind   Vis      Ndx Name
	     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
	     1: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __libc_start_main@GLIBC_2.34 (2)
	     2: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
	     3: 000000000040401c     4 OBJECT  GLOBAL DEFAULT   23 foo@VERS_2.0 (3)
	$

	vs older glibc:

	$ readelf -W --dyn-syms tmpdir/pr28158

	Symbol table '.dynsym' contains 4 entries:
	   Num:    Value          Size Type    Bind   Vis      Ndx Name
	     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
	     1: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __libc_start_main@GLIBC_2.2.5 (3)
	     2: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
	     3: 000000000040401c     4 OBJECT  GLOBAL DEFAULT   23 foo@VERS_2.0 (2)

	$

		* testsuite/ld-elf/pr28158.rd: Adjusted for glibc 2.34.

2021-10-16  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-15  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-14  Carl Love  <cel@us.ibm.com>

	Powerpc: Add support for openat and fstatat syscalls
	[gdb] update ppc-linux-tdep.c

	Add argument to ppc_canonicalize_syscall for the wordsize.
	Add syscall entries for the openat and fstatat system calls.

2021-10-14  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add .debug_loc support in dwarf assembler
	Add .debug_loc support in the dwarf assembler, and use it in new test-case
	gdb.dwarf2/loc-sec-offset.exp (which is based on
	gdb.dwarf2/loclists-sec-offset.exp).

	Tested on x86_64-linux.

2021-10-14  Alan Modra  <amodra@gmail.com>

	[GOLD] Re: PowerPC64: Don't pretend to support multi-toc
	We can't get at section->address() until everything is laid out, so
	trying to generalise the offset calculation rather than using a value
	of 0x8000 (the old object->toc_base_offset()) was bound to fail.
	got->g_o_t() is a little better than a hard-coded 0x8000.

		* powerpc.cc (Target_powerpc::Scan::local, global): Don't use
		toc_pointer() here.

2021-10-14  Alan Modra  <amodra@gmail.com>

	[GOLD] Two GOT sections for PowerPC64
	Split .got into two piece, one with the header and entries for small
	model got entries, the other with entries for medium/large model got
	entries.  The idea is to better support mixed pcrel/non-pcrel code
	where non-pcrel small-model .toc entries need to be within 32k of the
	toc pointer.

		* target.h (Target::tls_offset_for_local): Add got param.
		(Target::tls_offset_for_global): Likewise.
		(Target::do_tls_offset_for_local, do_tls_offset_for_global): Likewise.
		* output.h (Output_data_got::Got_entry::write): Add got param.
		* output.cc (Output_data_got::Got_entry::write): Likewise, pass to
		tls_offset_for_local/global calls.
		(Output_data_got::do_write): Adjust to suit.
		* s390.cc (Target_s390::do_tls_offset_for_local): Likewise.
		(Target_s390::do_tls_offset_for_global): Likewise.
		* powerpc.cc (enum Got_type): Extend with small types, move from
		class Target_powerpc.
		(Target_powerpc::biggot_): New.
		(Traget_powerpc::do_tls_offset_for_local, do_tls_offset_for_global,
		got_size, got_section, got_base_offset): Handle biggot_.
		(Target_powerpc::do_define_standard_symbols): Adjust.
		(Target_powerpc::make_plt_section, do_finalize_sections): Likewise.
		(Output_data_got_powerpc::Output_data_got_powerpc): Only make
		64-bit header for small got section.
		(Output_data_got_powerpc::g_o_t): Only return a result for small
		got section.
		(Output_data_got_powerpc::write): Only write small got section
		header.
		(Target_powerpc::Scan::local, global): Select small/big Got_type
		and section to suit reloc.
		(Target_powerpc::Relocate::relocate): Similarly.
		(Sort_toc_sections): Rewrite.

2021-10-14  Alan Modra  <amodra@gmail.com>

	[GOLD] PowerPC64: Don't pretend to support multi-toc
	Code in powerpc.cc is pretending to support a per-object toc pointer
	value, but powerpc gold has no real support for multi-toc.  This patch
	removes the pretense, tidying quite a lot in preparation for a
	followup patch.  If multi-toc is ever to be supported, don't revert
	this patch but start by adding object parameter to toc_pointer() and
	an object to Branch_stub_key.

		* powerpc.cc (Powerpc_relobj::toc_base_offset): Delete.
		(Target_powerpc::toc_pointer): New function.  Use throughout.
		(Target_powerpc::got_base_offset): New function.  Use throughout..
		(Output_data_got_powerpc::got_base_offset): ..in place of
		this.  Delete.
		(Output_data_got_powerpc::Output_data_got_powerpc): Init
		header_index_ to -1u for 64-bit, and make header here.
		(Output_data_got_powerpc::set_final_data_size, reserve_ent): Don't
		make 64-bit header here.
		(Output_data_got_powerpc::g_o_t): Return toc pointer offset in
		section for 64-bit.  Use throughout.
		(Stub_table): Remove toc_base_off_ from Branch_stub_key, and
		object param on add_long_branch_entry and find_long_branch_entry.
		Adjust all uses.

2021-10-14  Alan Modra  <amodra@gmail.com>

	Re: s12z/disassembler: call memory_error_func when appropriate
	Adjust for commit ba7c18a48457.

		* testsuite/gas/s12z/truncated.d: Update expected output.

2021-10-14  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-13  Tom de Vries  <tdevries@suse.de>

	[gdb/exp] Improve <error reading variable> message
	When printing a variable x in a subroutine foo:
	...
	subroutine foo (x)
	  integer(4) :: x (*)
	  x(3) = 1
	end subroutine foo
	...
	where x is an array with unknown bounds, we get:
	...
	$ gdb -q -batch outputs/gdb.fortran/array-no-bounds/array-no-bounds \
	  -ex "break foo" \
	  -ex run \
	  -ex "print x"
	Breakpoint 1 at 0x4005cf: file array-no-bounds.f90, line 18.

	Breakpoint 1, foo (x=...) at array-no-bounds.f90:18
	18        x(3) = 1
	$1 = <error reading variable>
	...

	Improve the error message by printing the details of the error, such that we
	have instead:
	...
	$1 = <error reading variable: failed to get range bounds>
	...

	This is a change in gdb/valprint.c, and grepping through the sources reveals
	that this is a common pattern.

	Tested on x86_64-linux.

2021-10-13  Carl Love  <cel@us.ibm.com>

	PPC fix for stfiwx instruction (and additional stores with primary opcode of 31)
	[gdb] Fix address being recorded in rs6000-tdep.c, ppc_process_record_op31.

	The GDB record function was recording the variable addr that was passed in
	rather than the calculated effective address (ea) by the
	ppc_process_record_op31 function.

2021-10-13  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: improve error reporting from the disassembler
	If the libopcodes disassembler returns a negative value then this
	indicates that the disassembly failed for some reason.  In disas.c, in
	the function gdb_disassembler::print_insn we can see how this is
	handled; when we get a negative value back, we call the memory_error
	function, which throws an exception.

	The problem here is that the address used in the memory_error call is
	gdb_disassembler::m_err_memaddr, which is set in
	gdb_disassembler::dis_asm_memory_error, which is called from within
	the libopcodes disassembler through the
	disassembler_info::memory_error_func callback.

	However, for this to work correctly, every time the libopcodes
	disassembler returns a negative value, the libopcodes disassembler
	must have first called the memory_error_func callback.

	My first plan was to make m_err_memaddr a gdb::optional, and assert
	that it always had a value prior to calling memory_error, however, a
	quick look in opcodes/*-dis.c shows that there _are_ cases where a
	negative value is returned without first calling the memory_error_func
	callback, for example in arc-dis.c and cris-dis.c.

	Now, I think that a good argument can be made that these disassemblers
	must therefore be broken, except for the case where we can't read
	memory, we should always be able to disassemble the memory contents to
	_something_, even if it's just '.word 0x....'.  However, I certainly
	don't plan to go and fix all of the disassemblers.

	What I do propose to do then, is make m_err_memaddr a gdb::optional,
	but now, instead of always calling memory_error, I add a new path
	which just calls error complaining about an unknown error.  This new
	path is only used if m_err_memaddr doesn't have a value (indicating
	that the memory_error_func callback was not called).

	To test this I just augmented one of the disassemblers to always
	return -1, before this patch I see this:

	  Dump of assembler code for function main:
	     0x000101aa <+0>:	Cannot access memory at address 0x0

	And after this commit I now see:

	  Dump of assembler code for function main:
	     0x000101aa <+0>:	unknown disassembler error (error = -1)

	This doesn't really help much, but that's because there's no way to
	report non memory errors out of the disasembler, because, it was not
	expected that the disassembler would ever report non memory errors.

2021-10-13  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.fortran/call-no-debug.exp with native-gdbserver
	When running test-case gdb.fortran/call-no-debug.exp with target board
	native-gdbserver, I run into:
	...
	(gdb) PASS: gdb.fortran/call-no-debug.exp: print string_func_ (&'abcdefg', 3)
	call (integer) string_func_ (&'abcdefg', 3)^M
	$2 = 0^M
	(gdb) FAIL: gdb.fortran/call-no-debug.exp: call (integer) string_func_ (&'abcdefg', 3)
	...

	The problem is that gdb_test is used to match inferior output.

	Fix this by using gdb_test_stdio.

	Tested on x86_64-linux.

2021-10-13  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Require use_gdb_stub == 0 where appropriate
	When running with target board native-gdbserver, we run into a number of FAILs
	due to use of the start command (and similar), which is not supported when
	use_gdb_stub == 1.

	Fix this by:
	- requiring use_gdb_stub == 0 for the entire test-case, or
	- guarding some tests in the test-case with use_gdb_stub == 0.

	Tested on x86_64-linux.

2021-10-13  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix test name in gdb.python/python.exp
	When running test-case gdb.python/python.exp, we have:
	...
	PASS: gdb.python/python.exp: starti via gdb.execute, not from tty
	PASS: gdb.python/python.exp: starti via interactive input
	...

	The two tests are instances of the same test, with different values for
	starti command argument from_tty, so it's strange that the test names are so
	different.

	This is due to using a gdb_test nested in a gdb_test_multiple, with the inner
	one using a different test name than the outer one.  [ That could still make
	sense if both produced passes, but that's not the case here. ]

	Fix this by using $gdb_test_name, such that we have:
	...
	PASS: gdb.python/python.exp: starti via gdb.execute, not from tty
	PASS: gdb.python/python.exp: starti via gdb.execute, from tty
	...

	Also make this more readable by using variables.

	Tested on x86_64-linux.

2021-10-13  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/batch-exit-status.exp with native-gdbserver
	When running test-case gdb.base/batch-exit-status.exp with target board
	native-gdbserver, I run into (added missing double quotes for clarity):
	...
	builtin_spawn $build/gdb/testsuite/../../gdb/gdb -nw -nx \
	  -data-directory $build/gdb/testsuite/../data-directory \
	  -iex "set height 0" -iex "set width 0" \
	  -ex "set auto-connect-native-target off" \
	  -iex "set sysroot" -batch ""^M
	: No such file or directory.^M
	PASS: gdb.base/batch-exit-status.exp: 1x: \
	  No such file or directory: [lindex $result 2] == 0
	FAIL: gdb.base/batch-exit-status.exp: 1x: \
	  No such file or directory: [lindex $result 3] == $expect_status
	...

	As in commit a02a90c114c "[gdb/testsuite] Set sysroot earlier in
	local-board.exp", the problem is the use of -ex for
	"set auto-connect-native-target off", which makes that the last command to
	be executed, and consequently determines the return status.

	Fix this by using -iex instead.

	Tested on x86_64-linux.

2021-10-13  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Remove quit in gdb.arch/i386-mpx.exp
	When running test-case gdb.arch/i386-mpx.exp with target board
	native-gdbserver, I run into:
	...
	(gdb) PASS: gdb.arch/i386-mpx.exp: verify size for bnd0
	Remote debugging from host ::1, port 42328^M
	quit^M
	A debugging session is active.^M
	^M
	        Inferior 1 [process 19679] will be killed.^M
	^M
	Quit anyway? (y or n) monitor exit^M
	Please answer y or n.^M
	A debugging session is active.^M
	^M
	        Inferior 1 [process 19679] will be killed.^M
	^M
	Quit anyway? (y or n) WARNING: Timed out waiting for EOF in server after monitor exit
	...

	The problem is that the test-case sends a quit at the end (without verifying
	the result of this in any way):
	...
	send_gdb "quit\n"
	...

	Fix this by removing the quit.

	Tested on x86_64-linux.

2021-10-13  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-12  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-11  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>

	[ARM] Add support for M-profile MVE extension
	This patch adds support for the M-profile MVE extension, which includes the
	following:

	- New M-profile XML feature m-profile-mve
	- MVE vector predication status and control register (VPR)
	- p0 pseudo register (contained in the VPR)
	- q0 ~ q7 pseudo vector registers
	- New feature bits
	- Documentation update

	Pseudo register p0 is the least significant bits of vpr and can be accessed
	as $p0 or displayed through $vpr.  For more information about the register
	layout, please refer to [1].

	The q0 ~ q7 registers map back to the d0 ~ d15 registers, two d registers
	per q register.

	The register dump looks like this:

	(gdb) info reg all
	r0             0x0                 0
	r1             0x0                 0
	r2             0x0                 0
	r3             0x0                 0
	r4             0x0                 0
	r5             0x0                 0
	r6             0x0                 0
	r7             0x0                 0
	r8             0x0                 0
	r9             0x0                 0
	r10            0x0                 0
	r11            0x0                 0
	r12            0x0                 0
	sp             0x0                 0x0 <__Vectors>
	lr             0xffffffff          -1
	pc             0xd0c               0xd0c <Reset_Handler>
	xpsr           0x1000000           16777216
	d0             0                   (raw 0x0000000000000000)
	d1             0                   (raw 0x0000000000000000)
	d2             0                   (raw 0x0000000000000000)
	d3             0                   (raw 0x0000000000000000)
	d4             0                   (raw 0x0000000000000000)
	d5             0                   (raw 0x0000000000000000)
	d6             0                   (raw 0x0000000000000000)
	d7             0                   (raw 0x0000000000000000)
	d8             0                   (raw 0x0000000000000000)
	d9             0                   (raw 0x0000000000000000)
	d10            0                   (raw 0x0000000000000000)
	d11            0                   (raw 0x0000000000000000)
	d12            0                   (raw 0x0000000000000000)
	d13            0                   (raw 0x0000000000000000)
	d14            0                   (raw 0x0000000000000000)
	d15            0                   (raw 0x0000000000000000)
	fpscr          0x0                 0
	vpr            0x0                 [ P0=0 MASK01=0 MASK23=0 ]
	s0             0                   (raw 0x00000000)
	s1             0                   (raw 0x00000000)
	s2             0                   (raw 0x00000000)
	s3             0                   (raw 0x00000000)
	s4             0                   (raw 0x00000000)
	s5             0                   (raw 0x00000000)
	s6             0                   (raw 0x00000000)
	s7             0                   (raw 0x00000000)
	s8             0                   (raw 0x00000000)
	s9             0                   (raw 0x00000000)
	s10            0                   (raw 0x00000000)
	s11            0                   (raw 0x00000000)
	s12            0                   (raw 0x00000000)
	s13            0                   (raw 0x00000000)
	s14            0                   (raw 0x00000000)
	s15            0                   (raw 0x00000000)
	s16            0                   (raw 0x00000000)
	s17            0                   (raw 0x00000000)
	s18            0                   (raw 0x00000000)
	s19            0                   (raw 0x00000000)
	s20            0                   (raw 0x00000000)
	s21            0                   (raw 0x00000000)
	s22            0                   (raw 0x00000000)
	s23            0                   (raw 0x00000000)
	s24            0                   (raw 0x00000000)
	s25            0                   (raw 0x00000000)
	s26            0                   (raw 0x00000000)
	s27            0                   (raw 0x00000000)
	s28            0                   (raw 0x00000000)
	s29            0                   (raw 0x00000000)
	s30            0                   (raw 0x00000000)
	s31            0                   (raw 0x00000000)
	q0             {u8 = {0x0 <repeats 16 times>}, u16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, u32 = {0x0, 0x0, 0x0, 0x0}, u64 = {0x0, 0x0}, f32 = {0x0, 0x0, 0x0, 0x0}, f64 = {0x0, 0x0}}
	q1             {u8 = {0x0 <repeats 16 times>}, u16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, u32 = {0x0, 0x0, 0x0, 0x0}, u64 = {0x0, 0x0}, f32 = {0x0, 0x0, 0x0, 0x0}, f64 = {0x0, 0x0}}
	q2             {u8 = {0x0 <repeats 16 times>}, u16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, u32 = {0x0, 0x0, 0x0, 0x0}, u64 = {0x0, 0x0}, f32 = {0x0, 0x0, 0x0, 0x0}, f64 = {0x0, 0x0}}
	q3             {u8 = {0x0 <repeats 16 times>}, u16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, u32 = {0x0, 0x0, 0x0, 0x0}, u64 = {0x0, 0x0}, f32 = {0x0, 0x0, 0x0, 0x0}, f64 = {0x0, 0x0}}
	q4             {u8 = {0x0 <repeats 16 times>}, u16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, u32 = {0x0, 0x0, 0x0, 0x0}, u64 = {0x0, 0x0}, f32 = {0x0, 0x0, 0x0, 0x0}, f64 = {0x0, 0x0}}
	q5             {u8 = {0x0 <repeats 16 times>}, u16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, u32 = {0x0, 0x0, 0x0, 0x0}, u64 = {0x0, 0x0}, f32 = {0x0, 0x0, 0x0, 0x0}, f64 = {0x0, 0x0}}
	q6             {u8 = {0x0 <repeats 16 times>}, u16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, u32 = {0x0, 0x0, 0x0, 0x0}, u64 = {0x0, 0x0}, f32 = {0x0, 0x0, 0x0, 0x0}, f64 = {0x0, 0x0}}
	q7             {u8 = {0x0 <repeats 16 times>}, u16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, u32 = {0x0, 0x0, 0x0, 0x0}, u64 = {0x0, 0x0}, f32 = {0x0, 0x0, 0x0, 0x0}, f64 = {0x0, 0x0}}
	p0             0x0                 0

	Built and regtested with a simulator.

	[1] https://developer.arm.com/documentation/ddi0553/bn

	Co-Authored-By: Luis Machado <luis.machado@linaro.org>

2021-10-11  Luis Machado  <luis.machado@linaro.org>

	[ARM] Refactor pseudo register numbering
	The pseudo register handling for ARM uses some hardcoded constants to
	determine types and names.  In preparation to the upcoming MVE support
	patch (that will add another pseudo register), this patch refactors and
	reorganizes things in order to simplify handling of future pseudo registers.

	We keep track of the first pseudo register number in a group and the number of
	pseudo registers in that group.

	Right now we only have the S and Q pseudo registers.

2021-10-11  Luis Machado  <luis.machado@linaro.org>

	[ARM] Small refactoring of arm gdbarch initialization
	This is in preparation to MVE support, where we will define another
	pseudo register. We need to define the pseudo register numbers *after*
	accounting for all the registers in the XML description, so move
	the call to tdesc_use_registers up.

	If we don't do it, GDB's register count won't consider registers contained
	in the XML but ignored by GDB, throwing the register numbering off.

2021-10-11  Luis Machado  <luis.machado@linaro.org>

	[ARM] Refactor some constants
	In preparation for the MVE extension patch, this one refactors some of
	the register-related constants we have for ARM.

	Basically I'm separating counting constants from numbering constants.

	For example, ARM_A1_REGNUM is a numbering constant, whereas ARM_NUM_ARG_REGS
	is a counting constant.

2021-10-11  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix FAIL in gdb.mi/mi-var-child-f.exp
	When running test-case gdb.mi/mi-var-child-f.exp on openSUSE Tumbleweed
	(with glibc 2.34) I run into:
	...
	(gdb) ^M
	PASS: gdb.mi/mi-var-child-f.exp: mi runto prog_array
	Expecting: ^(-var-create array \* array[^M
	]+)?(\^done,name="array",numchild="[0-9]+",value=".*",type=.*,has_more="0"[^M
	]+[(]gdb[)] ^M
	[ ]*)
	-var-create array * array^M
	&"Attempt to use a type name as an expression.\n"^M
	^error,msg="-var-create: unable to create variable object"^M
	(gdb) ^M
	FAIL: gdb.mi/mi-var-child-f.exp: create local variable array (unexpected output)
	...

	The problem is that the name array is used both:
	- as the name for a local variable
	- as the name of a type in glibc, in file malloc/dynarray-skeleton.c, as included
	  by nss/nss_files/files-hosts.c.

	Fix this by ignoring the shared lib symbols.

	Likewise in a couple of other fortran tests.

	Tested on x86_64-linux.

2021-10-11  Andrew Burgess  <andrew.burgess@embecosm.com>

	z80/disassembler: call memory_error_func when appropriate
	If a call to the read_memory_func fails then we should call the
	memory_error_func to notify the user of the disassembler of the
	address that was a problem.

	Without this GDB will report all memory errors as being at address
	0x0.

	opcodes/ChangeLog:

		* z80-dis.c (fetch_data): Call memory_error_func if the
		read_memory_func call fails.

2021-10-11  Andrew Burgess  <andrew.burgess@embecosm.com>

	s12z/disassembler: call memory_error_func when appropriate
	If a call to the read_memory_func fails then we should call the
	memory_error_func to notify the user of the disassembler of the
	address that was a problem.

	Without this GDB will report all memory errors as being at address
	0x0.

	opcodes/ChangeLog:

		* s12z-disc.c (abstract_read_memory): Call memory_error_func if
		the read_memory_func call fails.

2021-10-11  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix double debug info in gdb.dwarf2/dw2-ref-missing-frame.exp
	A mistake slipped in in commit a5ea23036d8 "[gdb/testsuite] Use function_range
	in gdb.dwarf2/dw2-ref-missing-frame.exp".

	Before the commit the main file was compiled with debug info, and the two
	others not:
	...
	if {[prepare_for_testing_full "failed to prepare" \
	        [list $testfile {} $srcfile {} $srcfuncfile {} \
	             $srcmainfile debug]]} {
	...

	After the commit, all were compiled with debug info, and consequently, there
	are two versions of debug info for $srcfuncfile.  This shows up as a FAIL when
	running the test-case with target boards readnow and cc-with-debug-names.

	Fix this by using prepare_for_testing_full, as before.

	Tested on x86_64-linux.

	Fixes: a5ea23036d8 ("[gdb/testsuite] Use function_range in
	       gdb.dwarf2/dw2-ref-missing-frame.exp")

2021-10-11  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Use require for ensure_gdb_index
	Replace:
	...
	if { [ensure_gdb_index $binfile] == -1 } {
	    return -1
	}
	...
	with:
	...
	require {ensure_gdb_index $binfile} != -1
	...
	and consequently, add a missing UNTESTED message.

	Tested on x86_64-linux, both with native and target board readnow.

2021-10-11  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Handle readnow in ensure_gdb_index
	When running test-case gdb.base/with-mf.exp with target board readnow, I run
	into:
	...
	FAIL: gdb.base/with-mf.exp: check if index present
	...
	This is since commit 6010fb0c49e "[gdb/testsuite] Fix full buffer in
	gdb.rust/dwindex.exp".

	Before that commit, the proc ensure_gdb_index would treat the line:
	...
	.gdb_index: faked for "readnow"^M
	...
	as proof that an index is already present (which is incorrect).

	Now, instead it generates aforementioned FAIL and continues to generate an
	index.

	Fix this by explicitly handling the readnow case in proc ensure_gdb_index,
	such that we bail out instead.

	Tested on x86_64-linux.

2021-10-11  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.dwarf2/gdb-add-index-symlink.exp
	The test-case gdb.dwarf2/gdb-add-index-symlink.exp interpretes a failure to
	add an index as a failure to add an index for a symlink:
	...
	if { [ensure_gdb_index $symlink] == -1 } {
	    fail "Unable to call gdb-add-index with a symlink to a symfile"
	    return -1
	}
	...

	However, it's possible that the gdb-add-index also fails with a regular
	file.  Add a check for that situation.

	Tested on x86_64-linux.

2021-10-11  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add proc require in lib/gdb.exp
	Add a new proc require in lib/gdb.exp, and use it to shorten:
	...
	if { [gdb_skip_xml_test] } {
	    # Valgrind gdbserver requires gdb with xml support.
	    untested "missing xml support"
	    return 0
	}
	...
	into:
	...
	require gdb_skip_xml_test 0
	...

	Tested on x86_64-linux, both with and without a trigger patch that forces
	gdb_skip_xml_test to return 1.

2021-10-11  Michael Forney  <mforney@mforney.org>

	bfd: Remove use of void pointer arithmetic
	This is not valid in ISO C. Instead, use a pointer to bfd_byte.

		* peicode.h (pe_bfd_object_p): Remove use of void pointer
		arithmetic.

2021-10-11  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-10  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-09  Tom de Vries  <tdevries@suse.de>

	[gdb] Make execute_command_to_string return string on throw
	The pattern for using execute_command_to_string is:
	...
	  std::string output;
	  output = execute_fn_to_string (fn, term_out);
	...

	This results in a problem when using it in a try/catch:
	...
	  try
	    {
	      output = execute_fn_to_string (fn, term_out)
	    }
	  catch (const gdb_exception &e)
	    {
	      /* Use output.  */
	    }
	...

	If an expection was thrown during execute_fn_to_string, then the output
	remains unassigned, while it could be worthwhile to known what output was
	generated by gdb before the expection was thrown.

	Fix this by returning the string using a parameter instead:
	...
	  execute_fn_to_string (output, fn, term_out)
	...

	Also add a variant without string parameter, to support places where the
	function is used while ignoring the result:
	...
	  execute_fn_to_string (fn, term_out)
	...

	Tested on x86_64-linux.

2021-10-09  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add check-readmore
	Consider the gdb output:
	...
	27        return SYSCALL_CANCEL (nanosleep, requested_time, remaining);^M
	(gdb) ^M
	Thread 2 "run-attach-whil" stopped.^M
	...

	When trying to match the gdb prompt using gdb_test which uses '$gdb_prompt $',
	it may pass or fail.

	This sort of thing needs to be fixed (see commit b0e2f96b56b), but there's
	currently no way to reliably find this type of FAILs.

	We have check-read1, but that one actually make the test pass reliably.

	We need something like the opposite of check-read1: something that makes
	expect read a bit slower, or more exhaustively.

	Add a new test target check-readmore that implements this.

	There are two methods of implementing this in read1.c:
	- the first method waits a bit before doing a read
	- the second method does a read and then decides whether to
	  return or to wait a bit and do another read, and so on.

	The second method is potentially faster, has less risc of timeout and could
	potentially detect more problems.  The first method has a simpler
	implementation.

	The second method is enabled by default.  The default waiting period is 10
	miliseconds.

	The first method can be enabled using:
	...
	$ export READMORE_METHOD=1
	...
	and the waiting period can be specified in miliseconds using:
	...
	$ export READMORE_SLEEP=9
	...

	Also a log file can be specified using:
	...
	$ export READMORE_LOG=$(pwd -P)/LOG
	...

	Tested on x86_64-linux.

	Testing with check-readmore showed these regressions:
	...
	FAIL: gdb.base/bp-cmds-continue-ctrl-c.exp: run: stop with control-c (continue)
	FAIL: gdb.base/bp-cmds-continue-ctrl-c.exp: attach: stop with control-c (continue)
	...

	I have not been able to find a problem in the test-case, and I think it's the
	nature of both the test-case and readmore that makes it run longer.  Make
	these pass by increasing the alarm timeout from 60 to 120 seconds.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=27957

2021-10-09  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix fortran module tests with stressed cpu
	When running these test-cases:
	- gdb.fortran/info-modules.exp
	- gdb.fortran/module.exp
	- gdb.mi/mi-fortran-modules.exp
	in conjunction with:
	...
	$ stress -c $(($(cat /proc/cpuinfo | grep -c "^processor") + 1))
	...
	I run into timeouts.

	Fix this by using:
	- "set auto-solib-add off" to avoid symbols of shared libs
	  (which doesn't work for libc, now that libpthread_name_p has been
	  updated to  match libc)
	- "nosharedlibrary" to avoid symbols of libc

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28133

2021-10-09  Guillermo E. Martinez  <guillermo.e.martinez@oracle.com>

	PR28415, invalid read in xtensa_read_table_entries
		PR 28415
		PR 28416
		* elf32-xtensa.c (xtensa_read_table_entries): Handle error
		return from retrieve_contents.

2021-10-09  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-08  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/info-types-c++.exp with stressed cpu
	When running test-case gdb.base/info-types-c++.exp in conjunction with:
	...
	$ stress -c $(($(cat /proc/cpuinfo | grep -c "^processor") + 1))
	...
	we get:
	...
	FAIL: gdb.base/info-types-c++.exp: info types (timeout)
	...

	Fix this by setting auto-solib-add to off.

	Tested on x86_64-linux.

2021-10-08  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/info_sources_2.exp with check-read1
	When running test-case gdb.base/info_sources_2.exp with check-read1, I run
	into:
	...
	FAIL: gdb.base/info_sources_2.exp: args: : info sources  (timeout)
	...

	Fix this by consuming a "$src1, $src2, ..., $srcn: line bit by bit rather than
	as one whole line.

	Also add the missing handling of "Objfile has no debug information".

	Tested on x86_64-linux.

2021-10-08  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.mi/gdb2549.exp with check-read1
	When running test-case gdb.mi/gdb2549.exp with check-read1, I run into:
	...
	FAIL: gdb.mi/gdb2549.exp: register values x (timeout)
	...

	Fix this by applying the same fix as for "register values t" in commit
	478e490a4df "[gdb/testsuite] Fix gdb.mi/gdb2549.exp with check-read1".

	Tested on x86_64-linux.

2021-10-08  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/bt-on-error-and-warning.exp with check-read1
	When running test-case gdb.base/bt-on-error-and-warning.exp with check-read1,
	I run into:
	...
	(gdb) maint internal-error foobar^M
	src/gdb/maint.c:82: internal-error: foobar^M
	A problem internal to GDB has been detectedFAIL: \
	  gdb.base/bt-on-error-and-warning.exp: problem=internal-error, mode=on: \
	  scan for backtrace (GDB internal error)
	Resyncing due to internal error.
	,^M
	...

	The corresponding gdb_test_multiple in the test-case contains:
	...
	           -early -re "^A problem internal to GDB has been detected,\r\n" {
	               incr header_lines
	               exp_continue
	           }
	...
	but instead this one triggers in gdb_test_multiple:
	...
	        -re ".*A problem internal to GDB has been detected" {
	            fail "$message (GDB internal error)"
	            gdb_internal_error_resync
	            set result -1
	        }
	...

	Fix this by likewise shortening the regexp to before the comma.

	Tested on x86_64-linux.

2021-10-08  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add nopie in two test-cases
	When running test-case gdb.dwarf2/dw2-restrict.exp on openSUSE Leap 15.2 with
	gcc-PIE installed (switching compiler default to -fPIE/-pie), I get:
	...
	gdb compile failed, ld: outputs/gdb.dwarf2/dw2-restrict/dw2-restrict0.o: \
	  warning: relocation in read-only section `.text'
	ld: warning: creating DT_TEXTREL in a PIE
	UNTESTED: gdb.dwarf2/dw2-restrict.exp: failed to prepare
	...

	This is due to using a hardcoded .S file that was generated with -fno-PIE.

	Fix this by adding the missing nopie.

	Likewise in gdb.arch/amd64-tailcall-noret.exp.

	Tested on x86_64-linux.

2021-10-08  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-07  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.threads/check-libthread-db.exp with glibc 2.34
	When running test-case gdb.threads/check-libthread-db.exp on openSUSE
	Tumbleweed (with glibc 2.34) I get:
	...
	(gdb) continue^M
	Continuing.^M
	[Thread debugging using libthread_db enabled]^M
	Using host libthread_db library "/lib64/libthread_db.so.1".^M
	Stopped due to shared library event:^M
	  Inferior loaded /lib64/libm.so.6^M
	    /lib64/libc.so.6^M
	(gdb) FAIL: gdb.threads/check-libthread-db.exp: user-initiated check: continue
	...

	The check expect the inferior to load libpthread, but since glibc 2.34
	libpthread has been integrated into glibc, and consequently it's no longer
	a dependency:
	...
	$ ldd outputs/gdb.threads/check-libthread-db/check-libthread-db
	        linux-vdso.so.1 (0x00007ffe4cae4000)
	        libm.so.6 => /lib64/libm.so.6 (0x00007f167c77c000)
	        libc.so.6 => /lib64/libc.so.6 (0x00007f167c572000)
	        /lib64/ld-linux-x86-64.so.2 (0x00007f167c86e000)
	...

	Fix this by updating the regexp to expect libpthread or libc.

	Tested on x86_64-linux.

2021-10-07  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.guile/scm-type.exp with gcc 4.8
	With gcc 7.5.0, I get:
	...
	(gdb) guile (print (type-range (field-type (type-field (value-type \
	  (value-dereference f)) "items"))))^M
	= (0 0)^M
	(gdb) PASS: gdb.guile/scm-type.exp: lang_cpp: test_range: \
	  on flexible array member: $cmd
	...
	but with gcc 4.8.5, I get instead:
	...
	(gdb) guile (print (type-range (field-type (type-field (value-type \
	  (value-dereference f)) "items"))))^M
	= (0 -1)^M
	(gdb) FAIL: gdb.guile/scm-type.exp: lang_cpp: test_range: \
	  on flexible array member: $cmd
	...

	There's a difference in debug info.  With gcc 4.8.5, we have:
	...
	 <2><224>: Abbrev Number: 15 (DW_TAG_member)
	    <225>   DW_AT_name        : items
	    <22b>   DW_AT_type        : <0x231>
	 <1><231>: Abbrev Number: 4 (DW_TAG_array_type)
	    <232>   DW_AT_type        : <0x105>
	 <2><23a>: Abbrev Number: 16 (DW_TAG_subrange_type)
	    <23b>   DW_AT_type        : <0x11a>
	    <23f>   DW_AT_upper_bound : 0xffffffffffffffff
	...
	and with gcc 7.5.0, we have instead:
	...
	 <2><89f>: Abbrev Number: 12 (DW_TAG_member)
	    <8a0>   DW_AT_name        : items
	    <8a6>   DW_AT_type        : <0x8ac>
	 <1><8ac>: Abbrev Number: 17 (DW_TAG_array_type)
	    <8ad>   DW_AT_type        : <0x29d>
	 <2><8b5>: Abbrev Number: 41 (DW_TAG_subrange_type)
	 <2><8b6>: Abbrev Number: 0
	...

	As mentioned in commit 858c8f2c1b9 "gdb/testsuite: adjust
	gdb.python/flexible-array-member.exp expected pattern":
	...
	Ideally, GDB would present a consistent and documented value for an
	array member declared with size 0, regardless of how the debug info
	looks like.
	...

	As in gdb.python/flexible-array-member.exp, change the test to accept the two
	values.

	Tested on x86_64-linux.

2021-10-07  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: add accessors for field (and call site) location
	Add accessors for the various location values in struct field.  This
	lets us assert that when we get a location value of a certain kind (say,
	bitpos), the field's location indeed contains a value of that kind.

	Remove the SET_FIELD_* macros, instead use the new setters directly.
	Update the FIELD_* macros used to access field locations to go through
	the getters.  They will be removed in a subsequent patch.

	There are places where the FIELD_* macros are used on call_site_target
	structures, because it contains members of the same name (loc_kind and
	loc).  For now, I have replicated the getters/setters in
	call_site_target.  But we could perhaps eventually factor them in a
	"location" structure that can be used at both places.

	Note that the field structure, being zero-initialized, defaults to a
	bitpos location with value 0.  While writing this patch, I tried to make
	it default to an "unset" location, to catch places where we would miss
	setting a field's location.  However, I found that some places relied on
	the default being "bitpos 0", so I left it as-is.  This change could
	always be done as follow-up work, making these places explicitly set the
	"bitpos 0" location.

	I found two issues to fix:

	 - I got some failures in the gdb.base/infcall-nested-structs-c++.exp
	   test.  They were caused by two functions in amd64-tdep.c using
	   TYPE_FIELD_BITPOS before checking if the location is of the bitpos
	   kind, which they do indirectly through `field_is_static`.  Simply
	   move getting the bitpos below the field_is_static call.

	 - I got a failure in gdb.xml/tdesc-regs.exp.  It turns out that in
	   make_gdb_type_enum, we set enum field values using SET_FIELD_BITPOS,
	   and later access them through FIELD_ENUMVAL.  Fix that by using
	   set_loc_enumval to set the value.

	Change-Id: I53d3734916c46457576ba11dd77df4049d2fc1e8

2021-10-07  Philipp Tomsich  <philipp.tomsich@vrull.eu>

	RISC-V: Support aliases for Zbs instructions
	Add aliases for the non-immediate mnemonics of b{set,clr,inv,ext} to
	yencode the respective immediate insn b{set,clr,inv,ext}i when the
	second source operand is an immediate.

	2021-01-11  Philipp Tomsich  <philipp.tomsich@vrull.eu>

	    gas/
		* testsuite/gas/riscv/b-ext.d: Add tests.
		* testsuite/gas/riscv/b-ext.s: Likewise.
		* testsuite/gas/riscv/b-ext-64.d: Likewise.
		* testsuite/gas/riscv/b-ext-64.s: Likewise.
	    opcodes/
	        * riscv-opc.c (riscv_opcodes): Add aliases for Zbs.

	Suggested-by: Jan Beulich <jbeulich@suse.com>

2021-10-07  Philipp Tomsich  <philipp.tomsich@vrull.eu>

	RISC-V: Add support for Zbs instructions
	This change adds the Zbs instructions from the Zbs 1.0.0 specification.
	See
	  https://github.com/riscv/riscv-bitmanip/releases/tag/1.0.0
	for the frozen specification.

	2021-01-09  Philipp Tomsich  <philipp.tomsich@vrull.eu>

	    bfd/
		* elfxx-riscv.c (riscv_supported_std_z_ext): Added zbs.
	    gas/
		* config/tc-riscv.c (riscv_multi_subset_supports): Handle INSN_CLASS_ZBS.
		* testsuite/gas/riscv/b-ext.d: Test Zbs instructions.
		* testsuite/gas/riscv/b-ext.s: Likewise.
		* testsuite/gas/riscv/b-ext-64.d: Likewise.
		* testsuite/gas/riscv/b-ext-64.s: Likewise.
	    include/
		* opcode/riscv-opc.h: Added MASK/MATCH/DECLARE_INSN for Zbs.
		* opcode/riscv.h (riscv_insn_class): Added INSN_CLASS_ZBS.
	    opcodes/
		* riscv-opc.c (riscv_supported_std_z_ext): Add zbs.

2021-10-07  Philipp Tomsich  <philipp.tomsich@vrull.eu>

	RISC-V: Update extension version for Zb[abc] to 1.0.0
	2021-10-06  Philipp Tomsich  <philipp.tomsich@vrull.eu>

	    bfd/
		* elfxx-riscv.c (riscv_supported_std_z_ext): Update the version
		number for zba, zbb and zbc to 1.0.0


	Version-changes: 3
	- Updated version numbers for zba, zbb and zbc to 1.0.0

2021-10-07  Philipp Tomsich  <philipp.tomsich@vrull.eu>

	RISC-V: Split Zb[abc] into commented sections
	The Zb[abc] opcodes are bundled just below the Privileged opcodes in
	riscv_opcodes, possibly giving the appearance that they are part of
	the Privileged spec for an uninitiated reader.  This separates them
	out and adds comments above each section to clearly identify them as
	Zba, Zbb or Zbc opcodes.

	2021-10-04  Philipp Tomsich  <philipp.tomsich@vrull.eu>

	    opcodes/
		* riscv-opc.c: Split of Zb[abc] instructions and add comments.

2021-10-07  Alan Modra  <amodra@gmail.com>

	PR28423, use-after-free in objdump
	XCOFF archives use a bi-directional linked list for file members.  So
	one member points to both the previous member and the next member.
	Members may not be sequentially ordered in the file.  This of course
	is over-engineered nonsense and an attractive target for fuzzers.
	(There is even a free list of members!)  The testcase in PR28423 is an
	XCOFF archive with one member pointing to itself, which results in
	lots of bad behaviour.  For example, "ar t" never terminates.

	The use-after-free with "objdump -r" happens like this:  The first
	archive element is opened, its symbols are read and "canonicalized"
	for objdump, then relocations are read and printed.  Those relocations
	use the canonicalized symbols, and also happen to be cached by the
	coff bfd backend support.  objdump frees the symbols.  The next
	archive element is then opened.  This must be done before the first
	element is closed, because finding the next element uses data held in
	the currect element.  Unfortunately the next element happens to be the
	original, so we aren't opening, we're reopening a bfd which has cached
	data.  When the relocations are printed they use the cached copy
	containing references to the freed canonical symbols.

	This patch adds a little sanity checking to the XCOFF "open next
	archive file" support, so that it rejects archive members pointing at
	themselves.  That is sufficient to cure this problem.  Anything more
	is overkill.  If someone deliberately fuzzes an XCOFF archive with an
	element loop then reports an "ar" bug when it runs forever, they will
	find their bug report closed WONTFIX.

		PR 28423
		* coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Save size occupied
		by member name in areltdata.extra_size.
		(_bfd_xcoff_openr_next_archived_file): Sanity check nextoff.
		* coff64-rs6000.c (xcoff64_openr_next_archived_file): Call
		_bfd_xcoff_openr_next_archived_file.

2021-10-07  Alan Modra  <amodra@gmail.com>

	PR28422, build_id use-after-free
	This fixes a bug in commit 5d9bbb73c1df.  All fields preserved from a
	bfd in struct bfd_preserve need to be cleared in bfd_reinit.

		PR 28422
		* format.c (bfd_reinit): Clear build_id.

2021-10-07  Alan Modra  <amodra@gmail.com>

	Change ridiculous section size error
	Rather than reporting "memory exhausted", report "file truncated".
	You can hit this error on small fuzzed object files, or on files that
	are actually truncated.  In either case sizes can be such that an out
	of memory error is a little confusing.

		* compress.c (bfd_get_full_section_contents): Set
		bfd_error_file_truncated rather than bfd_error_no_memory when
		section size exceeds file size.

2021-10-07  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix FAIL in gdb.base/annota1.exp
	On openSUSE tumbleweed I run into:
	...
	FAIL: gdb.base/annota1.exp: run until main breakpoint (timeout)
	...
	due to a message related to libthread_db:
	...
	^Z^Zstarting^M
	[Thread debugging using libthread_db enabled]^M
	Using host libthread_db library "/lib64/libthread_db.so.1".^M
	^M
	^Z^Zframes-invalid^M
	...
	which is not matched by the regexp.

	Fix this by updating the regexp.

	Tested on x86_64-linux.

2021-10-07  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Refactor regexp in gdb.base/annota1.exp
	Refactor regexp in gdb.base/annota1.exp to reduce indentation and repetition.

	Tested on x86_64-linux.

2021-10-07  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-06  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb/doc: improve 'show print elements' description
	The documentation for 'show print elements' contains the line:

	  If the number is 0, then the printing is unlimited.

	However, this line is now out of date as can be seen by this GDB
	session:

	  (gdb) set print elements 0
	  (gdb) show print elements
	  Limit on string chars or array elements to print is unlimited.

	The value 0 does indeed mean unlimited, and this is described in the
	'set print elements' section, however, for 'show print elements' the
	user will never see the value 0, so lets just remove that bit from the
	docs.

2021-10-06  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix FAIL in gdb.tui/corefile-run.exp
	When running test-case gdb.tui/corefile-run.exp on openSUSE Tumbleweed,
	I run into:
	...
	PASS: gdb.tui/corefile-run.exp: load corefile
	FAIL: gdb.tui/corefile-run.exp: run until the end
	...

	What's going on is easier to see when also doing dump_screen if
	check_contents passes, and inspecting state at the preceding PASS:
	...
	 +-------------------------------------------------------------------------+
	 exec No process In:                                           L??   PC: ??
	 [New LWP 16629]
	 [Thread debugging using libthread_db enabled]
	 Using host libthread_db library "/lib64/libthread_db.so.1".
	 Core was generated by `/data/gdb_versions/devel/build/gdb/testsuite/output
	 s/gdb.tui/corefile-run/corefi'.
	 Program terminated with signal SIGTRAP, Trace/breakpoint trap.
	 #0  main ()
	 --Type <RET> for more, q to quit, c to continue without paging--
	...

	The problem is that we're getting a pagination prompt, and the subsequent run
	command is interpreted as an answer to that prompt.

	Fix this by:
	- detecting the gdb prompt in response to "load corefile", such that
	  we detect the failure earlier, and
	- doing a "set pagination off" in Term::clean_restart.

	Tested on x86_64-linux.

2021-10-06  Alan Modra  <amodra@gmail.com>

	PR28420, ecoff fuzzing failures
		PR 28420
		* coff-mips.c (mips_adjust_reloc_in): Replace abort with error
		message and return.
		* ecoff.c (ecoff_slurp_reloc_table): Remove assertion and aborts,
		instead handle errors gracefully.

2021-10-06  Alan Modra  <amodra@gmail.com>

	PR28402, fail to allocate line number array
	This fixes a situation where the COFF code allocated memory for
	internal representaion arrays before reading the external file data.
	That meant the allocation didn't have any sanity check against file
	size.

		PR 28402
		* coffcode.h (buy_and_read): Malloc rather than alloc memory.
		(coff_slurp_line_table): Read native line number info before
		allocating memory for internal line number array.  Adjust error
		paths to suit.  Remove now unnecessary line number count check.
		(coff_slurp_reloc_table): Adjust to suit buy_and_read change.

2021-10-06  Alan Modra  <amodra@gmail.com>

	PR28403, null pointer dereference in disassemble_bytes
	Indexing of symbol and howto arrays wasn't checked in aout targets.

		PR 28403
		* aout-ns32k.c (MY (reloc_howto)): Sanity check howto_table index.
		Make r_index unsigned.
		(MY_swap_std_reloc_in): Make r_index unsigned.
		* aoutx.h (MOVE_ADDRESS): Sanity check symbol r_index.
		(aout_link_input_section_std): Make r_index unsigned.
		(aout_link_input_section_ext): Likewise.
		* i386lynx.c (MOVE_ADDRESS): Sanity check symbol r_index.
		(swap_ext_reloc_in, swap_std_reloc_in): Make r_index unsigned.
		* pdp11.c (MOVE_ADDRESS): Sanity check symbol r_index.

2021-10-06  Alan Modra  <amodra@gmail.com>

	PR28401, invalid section name lookup
	The PR28401 testcase has a section named "", ie. an empty string.
	This results in some silly behaviour in load_debug_section, and
	dump_dwarf_section.  Fix that.  Note that this patch doesn't correct
	the main complaint in PR28401, "failed to allocate", since malloc
	failures on sections having huge bogus sizes are to be expected.  We
	can't safely catch all such cases by comparing with file size, for
	example, where sections contain compressed data.

		PR 28401
		* objdump.c (load_debug_section): Don't attempt to retrieve
		empty name sections.
		(dump_dwarf_section): Likewise.

2021-10-06  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-06  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Make tui testing less verbose
	Currently, tui testing is rather verbose.  When using these RUNTESTFLAGS to
	pick up all tui tests (17 in total):
	...
	rtf=$(echo $(cd src/gdb/testsuite/; find gdb.* -type f -name *.exp* \
	  | xargs grep -l tuiterm_env) )
	...
	we have:
	...
	$ wc -l gdb.log
	120592 gdb.log
	...

	Most of the output is related to controlling the tui screen, but that does
	not give a top-level sense of how the test-case progresses.

	Put differently: a lot of bandwith is used to describe how we arrive at a
	certain tui screen state.  But we don't actually always show the state we
	arrive at, unless there's a FAIL.

	And if there's say, a PASS that should actually be FAILing, it's hard to
	detect.

	Fix this by:
	- dropping the -log on the call to verbose in _log.  We still can get the
	  same info back using runtest -v.
	- dumping the screen or box that we're checking, also when the test passes.

	Brings down verbosity to something more reasonable:
	...
	$ wc -l gdb.log
	3221 gdb.log
	...

	Tested on x86_64-linux.

2021-10-06  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add Term::dump_box in lib/tuiterm.exp
	Factor out new proc Term::get_region and use it to implement a
	new proc Term::dump_box, similar to Term::dump_screen.

	Tested on x86_64-linux.

2021-10-05  Lancelot SIX  <lsix@lancelotsix.com>

	gdb: Remove deprecated assertion in setting::get
	The commit 702991711a91bd47b209289562843a11e7009396 (gdb: Have setter
	and getter callbacks for settings) makes it possible for a setting not
	to be backed by a memory buffer but use callback functions instead to
	retrieve or set the setting's value.

	An assertion was not properly updated to take into account that the
	m_var member (which points to a memory buffer, if used) might be nullptr
	if the setting uses callback functions.  If the setting is backed by a
	memory buffer, the m_var has to be non nullptr, which is already checked
	before the pointer is dereferenced.

	This commit removes this assertion as it is not valid anymore.

2021-10-05  Tom Tromey  <tromey@adacore.com>

	Remove 'varsize-limit'
	This makes the Ada-specific "varsize-limit" a synonym for
	"max-value-size", and removes the Ada-specific checks of the limit.

	I am not certain of the history here, but it seems to me that this
	code is fully obsolete now.  And, removing this makes it possible to
	index large Ada arrays without triggering an error.  A new test case
	is included to demonstrate this.

2021-10-05  Tom Tromey  <tromey@adacore.com>

	Allow lazy 'zero' value
	This changes value_zero to create a lazy value.  In many cases,
	value_zero is called in expression evaluation to wrap a type in a
	non-eval context.  It seems senseless to allocate a buffer in these
	cases.

	A new 'is_zero' flag is added so we can preserve the existing
	assertions in value_fetch_lazy.

	A subsequent patch will add a test where creating a zero value would
	fail, due to the variable size check.  However, the contents of this
	value are never needed, and so creating a lazy value avoids the error
	case.

2021-10-05  Tom Tromey  <tromey@adacore.com>

	Add lval_funcs::is_optimized_out
	This adds an is_optimized_out function pointer to lval_funcs, and
	changes value_optimized_out to call it.  This new function lets gdb
	determine if a value is optimized out without necessarily fetching the
	value.  This is needed for a subsequent patch, where an attempt to
	access a lazy value would fail due to the value size limit -- however,
	the access was only needed to determine the optimized-out state.

2021-10-05  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix FAIL in gdb.mi/mi-nsmoribund.exp
	Since commit e36788d1354 "[gdb/testsuite] Fix handling of nr_args < 3 in
	mi_gdb_test" we run into:
	...
	PASS: gdb.mi/mi-nsmoribund.exp: print done = 1
	Expecting: ^(.*[^M
	]+)?([^
	]*^M
	\*running,thread-id="[0-9]+"^M
	\*running,thread-id="[0-9]+"^M
	\*running,thread-id="[0-9]+"^M
	\*running,thread-id="[0-9]+"^M
	\*running,thread-id="[0-9]+"^M
	\*running,thread-id="[0-9]+"^M
	\*running,thread-id="[0-9]+"^M
	\*running,thread-id="[0-9]+"^M
	\*running,thread-id="[0-9]+"^M
	\*running,thread-id="[0-9]+"[^M
	]+[(]gdb[)] ^M
	[ ]*)
	103-exec-continue --all^M
	=library-loaded,id="/lib64/libgcc_s.so.1",target-name="/lib64/libgcc_s.so.1",\
	  host-name="/lib64/libgcc_s.so.1",symbols-loaded="0",thread-group="i1",\
	  ranges=[{from="0x00007ffff22a5010",to="0x00007ffff22b6365"}]^M
	103^running^M
	*running,thread-id="5"^M
	(gdb) ^M
	FAIL: gdb.mi/mi-nsmoribund.exp: 103-exec-continue --all (unexpected output)
	...

	The regexp expect running messages for all threads, but we only get one for
	thread 5.

	The test-case uses non-stop mode, and when the exec-continue --all command is
	issued, thread 5 is stopped and all other threads are running.  Consequently,
	only thread 5 is resumed, and reported as running.

	Fix this by updating the regexp.

	Tested on x86_64-linux.

2021-10-05  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb/python: fix memory leak in python inferior code
	When a user creates a gdb.Inferior object for the first time a new
	Python object is created.  This object is then cached within GDB's
	inferior object using the registry mechanism (see
	inferior_to_inferior_object in py-inferior.c, specifically the calls
	to inferior_data and set_inferior_data).

	The Python Reference to the gdb.Inferior object held within the real
	inferior object ensures that the reference count on the Python
	gdb.Inferior object never reaches zero while the GDB inferior object
	continues to exist.

	At the same time, the gdb.Inferior object maintains a C++ pointer back
	to GDB's real inferior object.  We therefore end up with a system that
	looks like this:

	                   Python Reference
	                         |
	                         |
	    .----------.         |          .--------------.
	    |          |------------------->|              |
	    | inferior |                    | gdb.Inferior |
	    |          |<-------------------|              |
	    '----------'         |          '--------------'
	                         |
	                         |
	                    C++ Pointer

	When GDB's inferior object is deleted (say the inferior exits) then
	py_free_inferior is called (thanks to the registry system), this
	function looks up the Python gdb.Inferior object and sets the C++
	pointer to nullptr and finally reduces the reference count on the
	Python gdb.Inferior object.

	If at this point the user still holds a reference to the Python
	gdb.Inferior object then nothing happens.  However, the gdb.Inferior
	object is now in the non-valid state (see infpy_is_valid in
	py-inferior.c), but otherwise, everything is fine.

	However, if there are no further references to the Python gdb.Inferior
	object, or, once the user has given up all their references to the
	gdb.Inferior object, then infpy_dealloc is called.

	This function currently checks to see if the inferior pointer within
	the gdb.Inferior object is nullptr or not.  If the pointer is nullptr
	then infpy_dealloc immediately returns.

	Only when the inferior point in the gdb.Inferior is not nullptr do
	we (a) set the gdb.Inferior reference inside GDB's inferior to
	nullptr, and (b) call the underlying Python tp_free function.

	There are a number things wrong here:

	  1.  The Python gdb.Inferior reference within GDB's inferior object
	  holds a reference count, thus, setting this reference to nullptr
	  without first decrementing the reference count would leak a
	  reference, however...

	  2. As GDB's inferior holds a reference then infpy_dealloc will never
	  be called until GDB's inferior object is deleted.  Deleting a GDB
	  inferior ohject calls py_free_inferior, and so gives up the
	  reference.  At this point there is no longer a need to call
	  set_inferior_data to set the field back to NULL, that field must
	  have been cleared in order to get the reference count to zero, which
	  means...

	  3. If we know that py_free_inferior must be called before
	  infpy_dealloc, then we know that the inferior pointer in
	  gdb.Inferior will always be nullptr when infpy_dealloc is called,
	  this means that the call to the underlying tp_free function will
	  always be skipped.  Skipping this call will cause Python to leak the
	  memory associated with the gdb.Inferior object, which is what we
	  currently always do.

	Given all of the above, I assert that the C++ pointer within
	gdb.Inferior will always be nullptr when infpy_dealloc is called.
	That's what this patch does.

	I wrote a test for this issue making use of Pythons tracemalloc
	module, which allows us to spot this memory leak.

2021-10-05  Bhuvanendra Kumar N  <Bhuvanendra.KumarN@amd.com>

	[gdb/testsuite] Use function_range in gdb.dwarf2/dw2-ref-missing-frame.exp
	Following 2 test points are failing with clang compiler

	(gdb) FAIL: gdb.dwarf2/dw2-ref-missing-frame.exp: func_nofb print
	(gdb) FAIL: gdb.dwarf2/dw2-ref-missing-frame.exp: func_loopfb print

	As in commit f677852bbda "[gdb/testsuite] Use function_range in
	gdb.dwarf2/dw2-abs-hi-pc.exp", the problem is that the CU and functions
	have an empty address range, due to using asm labels in global scope,
	which is a known source of problems, as explained in the comment of proc
	function_range in gdb/testsuite/lib/dwarf.exp.  Hence fix this also by
	using function_range.

	Tested on x86_64-linux with gcc and clang.

2021-10-05  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb/python: add a new gdb_exiting event
	Add a new event, gdb.events.gdb_exiting, which is called once GDB
	decides it is going to exit.

	This event is not triggered in the case that GDB performs a hard
	abort, for example, when handling an internal error and the user
	decides to quit the debug session, or if GDB hits an unexpected,
	fatal, signal.

	This event is triggered if the user just types 'quit' at the command
	prompt, or if GDB is run with '-batch' and has processed all of the
	required commands.

	The new event type is gdb.GdbExitingEvent, and it has a single
	attribute exit_code, which is the value that GDB is about to exit
	with.

	The event is triggered before GDB starts dismantling any of its own
	internal state, so, my expectation is that most Python calls should
	work just fine at this point.

	When considering this functionality I wondered about using the
	'atexit' Python module.  However, this is triggered when the Python
	environment is shut down, which is done from a final cleanup.  At
	this point we don't know for sure what other GDB state has already
	been cleaned up.

2021-10-05  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb/python: update events test to handle missing exit_code
	The test gdb.python/py-events.exp sets up a handler for the gdb.exited
	event.  Unfortunately the handler is slightly broken, it assumes that
	the exit_code attribute will always be present.  This is not always
	the case.

	In a later commit I am going to add more tests to py-events.exp test
	script, and in so doing I expose the bug in our handling of gdb.exited
	events.

	Just to be clear, GDB itself is fine, it is the test that is not
	written correctly according to the Python Events API.

	So, in this commit I fix the Python code in the test, and extend the
	test case to exercise more paths through the Python code.

	Additionally, I noticed that the gdb.exited event is used as an
	example in the documentation for how to write an event handler.
	Unfortunately the same bug that we had in our test was also present in
	the example code in the manual.

	So I've fixed that too.

	After this commit there is no functional change to GDB.

2021-10-05  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-04  Tom Tromey  <tromey@adacore.com>

	Use unique_xmalloc_ptr<char> when demangling
	I noticed that some methods in language_defn could use
	unique_xmalloc_ptr<char> rather than a plain 'char *'.  This patch
	implements this change, fixing up the fallout and changing
	gdb_demangle to also return this type.  In one spot, std::string is
	used to simplify some related code, and in another, an auto_obstack is
	used to avoid manual management.

	Regression tested on x86-64 Fedora 34.

2021-10-04  Tom Tromey  <tromey@adacore.com>

	Minor boolean fix in windows-nat.c
	I noticed a spot in windows-nat.c that used '1' rather than the more
	appropriate 'true'.  This patch fixes it.

2021-10-04  Tom de Vries  <tdevries@suse.de>

	[gdb/build] Add CXX_DIALECT to CXX
	Say we use a gcc version that (while supporting c++11) does not support c++11
	by default, and needs an -std setting to enable it.

	If gdb would use the default AX_CXX_COMPILE_STDCXX from autoconf-archive, then
	we'd have:
	...
	CXX="g++ -std=gnu++11"
	...

	That mechanism however has the following problem (quoting from commit
	0bcda685399):
	...
	the top level Makefile passes CXX down to subdirs, and that overrides whatever
	gdb/Makefile may set CXX to.  The result would be that a make invocation from
	the build/gdb/ directory would use "g++ -std=gnu++11" as expected, while a
	make invocation at the top level would not.
	...

	Commit 0bcda685399 fixes this by using a custom AX_CXX_COMPILE_STDCXX which
	does:
	...
	CXX=g++
	CXX_DIALECT=-std=gnu++11
	...

	The problem reported in PR28318 is that using the custom instead of the
	default AX_CXX_COMPILE_STDCXX makes the configure test for std::thread
	support fail.

	We could simply add $CXX_DIALECT to the test for std::thread support, but
	that would have to be repeated for each added c++ support test.

	Instead, fix this by doing:
	...
	CXX="g++ -std=gnu++11"
	CXX_DIALECT=-std=gnu++11
	...

	This is somewhat awkward, since it results in -std=gnu++11 occuring twice in
	some situations:
	...
	$ touch src/gdb/dwarf2/read.c
	$ ( cd build/gdb; make V=1 dwarf2/read.o )
	g++-4.8 -std=gnu++11 -x c++ -std=gnu++11 ...
	...

	However, both settings are needed:
	 - the switch in CXX for the std::thread tests (and other tests)
	 - the switch in CXX_DIALECT so it can be appended in Makefiles, to
	   counteract the fact that the top-level Makefile overrides CXX

	The code added in gdb/ax_cxx_compile_stdcxx.m4 is copied from the default
	AX_CXX_COMPILE_STDCXX from autoconf-archive.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28318

2021-10-04  Simon Marchi  <simon.marchi@polymtl.ca>

	[gdb/symtab] Use unrelocated addresses in call_site
	Consider test-case gdb.trace/entry-values.exp with target board
	unix/-fPIE/-pie.

	Using this command we have an abbreviated version, and can see the correct
	@entry values for foo:
	...
	$ gdb -q -batch outputs/gdb.trace/entry-values/entry-values \
	  -ex start \
	  -ex "break foo" \
	  -ex "set print entry-values both" \
	  -ex continue
	Temporary breakpoint 1 at 0x679

	Temporary breakpoint 1, 0x0000555555554679 in main ()
	Breakpoint 2 at 0x55555555463e

	Breakpoint 2, 0x000055555555463e in foo (i=0, i@entry=2, j=2, j@entry=3)
	...

	Now, let's try the same again, but run directly to foo rather than stopping at
	main:
	...
	$ gdb -q -batch outputs/gdb.trace/entry-values/entry-values \
	  -ex "break foo" \
	  -ex "set print entry-values both" \
	  -ex run
	Breakpoint 1 at 0x63e

	Breakpoint 1, 0x000055555555463e in foo (i=0, i@entry=<optimized out>, \
	  j=2, j@entry=<optimized out>)
	...

	So, what explains the difference?  Noteworthy, this is a dwarf assembly
	test-case, with debug info for foo and bar, but not for main.

	In the first case:
	- we run to main
	- this does not trigger expanding debug info, because there's none for main
	- we set a breakpoint at foo
	- this triggers expanding debug info.  Relocated addresses are used in
	  call_site info (because the exec is started)
	- we continue to foo, and manage to find the call_site info

	In the second case:
	- we set a breakpoint at foo
	- this triggers expanding debug info.  Unrelocated addresses are used in
	  call_site info (because the exec is not started)
	- we run to foo
	- this triggers objfile_relocate1, but it doesn't update the call_site
	  info addresses
	- we don't manage to find the call_site info

	We could fix this by adding the missing call_site relocation in
	objfile_relocate1.

	This solution however is counter-trend in the sense that we're trying to
	work towards the situation where when starting two instances of an executable,
	we need only one instance of debug information, implying the use of
	unrelocated addresses.

	So, fix this instead by using unrelocated addresses in call_site info.

	Tested on x86_64-linux.

	This fixes all remaining unix/-fno-PIE/-no-pie vs unix/-fPIE/-pie
	regressions, like f.i. PR24892.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=24892

	Co-Authored-By: Tom de Vries <tdevries@suse.de>

2021-10-04  Simon Marchi  <simon.marchi@polymtl.ca>

	[gdb/symtab] C++-ify call_site
	- add constructor
	- add member function call_site::pc ()

	Tested on x86_64-linux.

	Co-Authored-By: Tom de Vries <tdevries@suse.de>

2021-10-04  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Add call_site_eq and call_site_hash
	In commit b4c919f7525 "[gdb/symtab] Fix htab_find_slot call in
	read_call_site_scope" , I removed the comment:
	...
	It must be the first field as we overload core_addr_hash and core_addr_eq for
	it.
	...
	for field pc of struct call_site.

	However, this was not tested, and when indeed moving field pc to the second
	location, we run into a testsuite failure in gdb.trace/entry-values.exp.

	This is caused by core_addr_eq (the eq_f function for the htab) being
	called with a pointer to the pc field (as passed into htab_find_slot) and a
	pointer to a hash table element.  Now that pc is no longer the first field,
	the pointer to hash table element no longer points to the pc field.

	This could be fixed by simply reinstating the comment, but we're trying to
	get rid of this kind of tricks that make refactoring more difficult.

	Instead, fix this by:
	- reverting commit b4c919f7525, apart from the comment removal, such that
	  we're passing a pointer to element to htab_find_slot
	- updating the htab_find_slot call in compunit_symtab::find_call_site
	  in a similar manner
	- adding a call_site_eq and call_site_hash, and using these in the hash table
	  instead of core_addr_eq and core_addr_hash.

	Tested on x86_64-linux, both with and without a trigger patch that moves pc to
	the second location in struct call_site.

2021-10-04  Tom Tromey  <tromey@adacore.com>

	Fix remote-sim.c compilation
	The change "make string-like set show commands use std::string
	variable" caused remote-sim.c to fail to build.  The issue is that the
	code does:

	  const std::string &sysroot = gdb_sysroot;
	  if (is_target_filename (sysroot))
	    sysroot += strlen (TARGET_SYSROOT_PREFIX);

	... which isn't valid.

	This patch changes this code to use a 'const char *' again, fixing the
	build.

2021-10-04  Bruno Larsen  <blarsen@redhat.com>

	[gdb/testsuite] update analyze-racy-logs.py to python3
	Since python 2 is no longer supported on most distributions, update the
	script to run under python while while still being runnable under
	python2.

2021-10-04  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdbsupport: remove attempt to define TARGET_WORD_SIZE
	In the gdbsupport configure.ac file, there is an attempt to define
	TARGET_WORD_SIZE.  This is done by running grep on the file
	../bfd/bfd-in3.h.

	The problem with this is, the file bfd-in3.h is generated into the bfd
	build directory when bfd is configured, and there is no dependency
	between the gdbsupport module and the bfd module, so, for example, if
	I do:

	  $ ../src/configure
	  $ make all-gdbsupport

	Then bfd will neither be configured, or built.  In this case
	TARGET_WORD_SIZE ends up being defined, but with no value because the
	grep on bfd-in3.h fails.

	However, it turns out that this doesn't matter; we don't actually use
	TARGET_WORD_SIZE anywhere.

	My proposal in this commit is to just remove the definition of
	TARGET_WORD_SIZE, the alternative would be to add a dependency between
	configure-gdbsupport and configure-bfd into Makefile.def, but adding a
	dependency for something we don't need seems pretty pointless.

2021-10-04  Mike Frysinger  <vapier@gentoo.org>

	sim: add --info-target for listing supported BFD targets
	It can be difficult to guess the exact bfd name, so add an option to
	list all the targets that the current build supports.  This aligns with
	other simulator options like --info-architecture.

2021-10-04  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-03  Lancelot SIX  <lsix@lancelotsix.com>

	gdb: Setting setter return a bool to tell if the value changed
	GDB can notify observers when a parameter is changed.

	To do that, do_set_command (in gdb/cli/cli-setshow.c) compares the new
	value against the old one before updating it, and based on that notifies
	observers.  This looks like something like:

	    int valuechanged = 0;
	    switch (cmd->var.type ())
	    {
	    case var_integer:
	      {
	        LONGEST new_val = parse_and_eval_long (arg)
	        if (new_val != cmd->var.get<int> ())
	        {
	          cmd->var.get<int> (new_val);
	          value_changes = 1;
	        }
	      }
	    case var_uinteger:
	    case var_zuinteger:
	      {
	        unsigned int val
	          = parse_cli_var_uinteger (c->var->type (), &arg, true);
	        if (c->var->get<unsigned int> () != val)
	          {
	            c->var->set<unsigned int> (val);
	            option_changed = true;
	          }
	      }
	    case...
	      /* And so on for all possible var_types.  */
	    }

	This comparison is done for each possible var_type, which leads to
	unnecessary logic duplication.

	In this patch I propose to move all those checks in one place within the
	setting setter method.  This limits the code duplication and simplifies
	the do_set_command implementation.

	This patch also changes slightly the way a value change is detected.
	Instead of comparing the user provided value against the current value
	of the setting, we compare the value of the setting before and after the
	set operation.  This is meant to handle edge cases where trying to set
	an unrecognized value would be equivalent to a noop (the actual value
	remains unchanged).  Doing this requires that the original value needs
	to be copied before the update, which can be non trivial for
	std::string.

	There should be no user visible change introduced by this commit.

	Tested on x86_64 GNU/Linux.

	[1] https://review.lttng.org/c/binutils-gdb/+/5831/41

	Change-Id: If064b9cede3eb56275aacd2b286f74eceb1aed11

2021-10-03  Lancelot SIX  <lsix@lancelotsix.com>
	    Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: Have setter and getter callbacks for settings
	The main motivation behind this improvement is to help the
	implementation of a patch Simon Marchi is preparing to fix a bug when
	MI or Python try to access parameters that are inferior dependent (see
	PR/28085).

	This commit extends the previous ones, which introduces the setting
	object to represent a static variable whose value can be set or shown
	with the appropriate commands.  This patch proposes that a setting can
	either contain a pointer to a static variable holding a setting, or
	pointers to a pair of setter and getter callback functions.

	The callbacks functions can be used to retrieve or change the value with
	custom logic.  This is useful when the source of truth for a given
	setting is not contained in the variable pointed to by the setting
	instance.

	Given that the callback function call is hidden within the setting
	abstraction introduced earlier, none of the sites accessing the setting
	needs to be updated.  The registered getter or setter is used whatever
	the way to access it is (through MI, Python, Guile, the "with" command
	and the $_gdb_setting / $_gdb_setting_str convenience functions).

	All the add_setshow_*_cmd are given a new overload that will accept the
	pair of function pointers (set / get functions) instead of the pointer
	to a global variable.

	Tested on GNU/Linux x86_64 with no regression observed.

	Change-Id: Ieb81fef57550632ff66e6aa85f637372a226be8c

2021-10-03  Simon Marchi  <simon.marchi@efficios.com>
	    Lancelot SIX  <lsix@lancelotsix.com>

	gdb: make string-like set show commands use std::string variable
	String-like settings (var_string, var_filename, var_optional_filename,
	var_string_noescape) currently take a pointer to a `char *` storage
	variable (typically global) that holds the setting's value.  I'd like to
	"mordernize" this by changing them to use an std::string for storage.

	An obvious reason is that string operations on std::string are often
	easier to write than with C strings.  And they avoid having to do any
	manual memory management.

	Another interesting reason is that, with `char *`, nullptr and an empty
	string often both have the same meaning of "no value".  String settings
	are initially nullptr (unless initialized otherwise).  But when doing
	"set foo" (where `foo` is a string setting), the setting now points to
	an empty string.  For example, solib_search_path is nullptr at startup,
	but points to an empty string after doing "set solib-search-path".  This
	leads to some code that needs to check for both to check for "no value".
	Or some code that converts back and forth between NULL and "" when
	getting or setting the value.  I find this very error-prone, because it
	is very easy to forget one or the other.  With std::string, we at least
	know that the variable is not "NULL".  There is only one way of
	representing an empty string setting, that is with an empty string.

	I was wondering whether the distinction between NULL and "" would be
	important for some setting, but it doesn't seem so.  If that ever
	happens, it would be more C++-y and self-descriptive to use
	optional<string> anyway.

	Actually, there's one spot where this distinction mattered, it's in
	init_history, for the test gdb.base/gdbinit-history.exp.  init_history
	sets the history filename to the default ".gdb_history" if it sees that
	the setting was never set - if history_filename is nullptr.  If
	history_filename is an empty string, it means the setting was explicitly
	cleared, so it leaves it as-is.  With the change to std::string, this
	distinction doesn't exist anymore.  This can be fixed by moving the code
	that chooses a good default value for history_filename to
	_initialize_top.  This is ran before -ex commands are processed, so an
	-ex command can then clear that value if needed (what
	gdb.base/gdbinit-history.exp tests).

	Another small improvement, in my opinion is that we can now easily
	give string parameters initial values, by simply initializing the global
	variables, instead of xstrdup-ing it in the _initialize function.

	In Python and Guile, when registering a string-like parameter, we
	allocate (with new) an std::string that is owned by the param_smob (in
	Guile) and the parmpy_object (in Python) objects.

	This patch started by changing all relevant add_setshow_* commands to
	take an `std::string *` instead of a `char **` and fixing everything
	that failed to build.  That includes of course all string setting
	variable and their uses.

	string_option_def now uses an std::string also, because there's a
	connection between options and settings (see
	add_setshow_cmds_for_options).

	The add_path function in source.c is really complex and twisted, I'd
	rather not try to change it to work on an std::string right now.
	Instead, I added an overload that copies the std:string to a `char *`
	and back.  This means more copying, but this is not used in a hot path
	at all, so I think it is acceptable.

	Change-Id: I92c50a1bdd8307141cdbacb388248e4e4fc08c93

2021-10-03  Lancelot SIX  <lsix@lancelotsix.com>
	    Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: Introduce setting construct within cmd_list_element
	cmd_list_element can contain a pointer to data that can be set and / or
	shown.  This is achieved with the void* VAR member which points to the
	data that can be accessed, while the VAR_TYPE member (of type enum
	var_types) indicates how to interpret the data pointed to.

	With this pattern, the user of the cmd_list_element needs to know what
	is the storage type associated with a given VAR_TYPES in order to do
	the proper casting.  No automatic safeguard is available to prevent
	miss-use of the pointer.  Client code typically looks something like:

		switch (c->var_type)
		{
		  case var_zuinteger:
		    unsigned int v = *(unsigned int*) c->var;
		    ...
		    break;
		  case var_boolean:
		    bool v = *(bool *) c->var;
		    ...
		    break;
		  ...
		}

	This patch proposes to add an abstraction around the var_types and void*
	pointer pair.  The abstraction is meant to prevent the user from having
	to handle the cast and verify that the data is read or written as a type
	that is coherent with the setting's var_type.  This is achieved by
	introducing the struct setting which exposes a set of templated get /
	set member functions.  The template parameter is the type of the
	variable that holds the referred variable.

	Using those accessors allows runtime checks to be inserted in order to
	ensure that the data pointed to has the expected type.  For example,
	instantiating the member functions with bool will yield something
	similar to:

		const bool &get<bool> () const
		{
		  gdb_assert (m_var_type == var_boolean);
		  gdb_assert (m_var != nullptr);
		  return *static_cast<bool *> (m_var);
		}
		void set<bool> (const bool &var)
		{
		  gdb_assert (m_var_type == var_boolean);
		  gdb_assert (m_var != nullptr);
		  *static_cast<bool *> (m_var) = var;
		}

	Using the new abstraction, our initial example becomes:

		switch (c->var_type)
		{
		  case var_zuinteger:
		    unsigned int v = c->var->get<unsigned int> ();
		    ...
		    break;
		  case var_boolean:
		    bool v = c->var->get<bool> ();
		    ...
		    break;
		  ...
		}

	While the call site is still similar, the introduction of runtime checks
	help ensure correct usage of the data.

	In order to avoid turning the bulk of add_setshow_cmd_full into a
	templated function, and following a suggestion from Pedro Alves, a
	setting can be constructed from a pre validated type erased reference to
	a variable.  This is what setting::erased_args is used for.

	Introducing an opaque abstraction to describe a setting will also make
	it possible to use callbacks to retrieve or set the value of the setting
	on the fly instead of pointing to a static chunk of memory.  This will
	be done added in a later commit.

	Given that a cmd_list_element may or may not reference a setting, the
	VAR and VAR_TYPES members of the struct are replaced with a
	gdb::optional<setting> named VAR.

	Few internal function signatures have been modified to take into account
	this new abstraction:

	-The functions value_from_setting, str_value_from_setting and
	 get_setshow_command_value_string used to have a 'cmd_list_element *'
	 parameter but only used it for the VAR and VAR_TYPE member. They now
	 take a 'const setting &' parameter instead.
	- Similarly, the 'void *' and a 'enum var_types' parameters of
	  pascm_param_value and gdbpy_parameter_value have been replaced with a
	  'const setting &' parameter.

	No user visible change is expected after this patch.

	Tested on GNU/Linux x86_64, with no regression noticed.

	Change-Id: Ie1d08c3ceb8b30b3d7bf1efe036eb8acffcd2f34

2021-10-03  Mike Frysinger  <vapier@gentoo.org>

	sim: filter out SIGSTKSZ [PR sim/28302]
	We map target signals to host signals so we can propagate signals
	between the host & simulated worlds.  That means we need to know
	the symbolic names & values of all signals that might be sent.

	The tools that generate that list use signal.h and include all
	symbols that start with "SIG" so as to automatically include any
	new symbols that the C library might add.  Unfortunately, this
	also picks up "SIGSTKSZ" which is not actually a signal itself,
	but a signal related setting -- it's the size of the stack when
	a signal is handled.

	By itself this doesn't super matter as we will never see a signal
	with that same value (since the range of valid signals tend to be
	way less than 1024, and the size of the default signal stack will
	never be that small).  But with recent glibc changes that make this
	into a dynamic value instead of a compile-time constant, some users
	see build failures when building the sim.

	As suggested by Adam Sampson, update our scripts to ignore this
	symbol to simplify everything and avoid the build failure.

	Bug: https://sourceware.org/PR28302

2021-10-03  Mike Frysinger  <vapier@gentoo.org>

	sim: ppc: fallback when ln is not available [PR sim/18864]
	Not all systems have easy access to hard links or symlinks, so add
	fallback logic to the run->psim build code to handle those.

	Bug: https://sourceware.org/PR18864

2021-10-03  Lancelot SIX  <lsix@lancelotsix.com>

	gdb: Fix comment in riscv_scan_prologue
	I found an inaccurate comment in riscv_scan_prologue.  This commit fixes
	it.

2021-10-03  Lancelot SIX  <lsix@lancelotsix.com>

	gdb: Support the c.mv insn in the riscv prologue scanner.
	While working on other problems, I encountered situations where GDB
	fails to properly unwind the stack because some functions use the C.MV
	instruction in the prologue.  The prologue scanner stops when it hits
	this instruction assuming its job is done at this point.  Unfortunately
	the prologue is not necessarily finished yet, preventing GDB to properly
	unwind.

	This commit adds support for handling such instruction in
	riscv_scan_prologue.

	Note that C.MV is part of the compressed instruction set.  The MV
	counterpart from the base ISA is a pseudo instruction that expands to
	'ADDI RD,RS1,0' which is already supported.

	Tested on riscv64-linux-gnu.

	All feedback are welcome.

2021-10-03  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-02  Simon Marchi  <simon.marchi@polymtl.ca>

	[gdb/symtab] Remove COMPUNIT_CALL_SITE_HTAB
	Remove macro COMPUNIT_CALL_SITE_HTAB, and provide access to the htab using
	member functions:
	- compunit_symtab::find_call_site
	- compunit_symtab::set_call_site_htab

	Tested on x86_64-linux.

	Co-Authored-By: Tom de Vries <tdevries@suse.de>

2021-10-02  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/python: fix a few flake8 warnings
	Fix these rather obvious warnings reported by flake8:

	    ./lib/gdb/FrameIterator.py:16:1: F401 'gdb' imported but unused
	    ./lib/gdb/FrameIterator.py:17:1: F401 'itertools' imported but unused
	    ./lib/gdb/command/prompt.py:55:26: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
	    ./lib/gdb/command/explore.py:526:9: F841 local variable 'has_explorable_fields' is assigned to but never used
	    ./lib/gdb/command/explore.py:697:56: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
	    ./lib/gdb/command/explore.py:736:62: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
	    ./lib/gdb/command/explore.py:767:61: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
	    ./lib/gdb/command/frame_filters.py:21:1: F401 'copy' imported but unused
	    ./lib/gdb/command/frame_filters.py:22:1: F401 'gdb.FrameIterator.FrameIterator' imported but unused
	    ./lib/gdb/command/frame_filters.py:23:1: F401 'gdb.FrameDecorator.FrameDecorator' imported but unused
	    ./lib/gdb/command/frame_filters.py:25:1: F401 'itertools' imported but unused
	    ./lib/gdb/command/frame_filters.py:179:17: E712 comparison to True should be 'if cond is True:' or 'if cond:'

	Change-Id: I4f49c0cb430359ee872222600c61d9c5283b09ab

2021-10-02  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-10-01  Luis Machado  <luis.machado@linaro.org>

	Fix build failure for 32-bit targets
	When building master GDB, I ran into the following:

	binutils-gdb/gdb/bt-utils.c: In function 'int libbacktrace_print(void*, uintptr_t, const char*, int, const char*)':
	binutils-gdb/gdb/bt-utils.c:93:44: error: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'uintptr_t {aka unsigned int}' [-Werror=format=]
	   snprintf (buf, sizeof (buf), "0x%lx ", pc);

	Fix this by using %PRIxPTR as opposed to %lx.

2021-10-01  Nick Clifton  <nickc@redhat.com>

	Fix mistake in RX assembler documentation (special section names)

2021-10-01  Simon Marchi  <simon.marchi@polymtl.ca>

	[gdb/symtab] Fix htab_find_slot call in read_call_site_scope
	In read_call_site_scope we have:
	...
	  call_site_local.pc = pc;
	  slot = htab_find_slot (cu->call_site_htab, &call_site_local, INSERT);
	...

	The call passes a call_site pointer as element.  OTOH, the hashtab is created
	using hash_f == core_addr_hash and eq_f == core_addr_eq, so the element
	will be accessed through a CORE_ADDR pointer.

	This is not wrong (at least in C), given that pc is the first field in
	call_site.

	Nevertheless, as in call_site_for_pc, make the htab_find_slot call match the
	used hash_f and eq_f by using &pc instead:
	...
	  slot = htab_find_slot (cu->call_site_htab, &pc, INSERT);
	...

	Tested on x86_64-linux.

	Co-Authored-By: Tom de Vries <tdevries@suse.de>

2021-10-01  Andrea Corallo  <andrea.corallo@arm.com>

	PATCH bfd: Fix linker warning for recently introduced arm attributes
	2021-09-27  Andrea Corallo  <andrea.corallo@arm.com>

		* elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Update value to cover
		'Tag_BTI_use' and 'Tag_PACRET_use'.

2021-10-01  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite/dwarf: use options for rnglists/loclists procs
	Change how rnglists and loclists procs to align them with how procs for
	aranges (and other things in the DWARF assembler) work.  Instead of
	using "args" (variable number of parameters in TCL) and command-line
	style option arguments, use one leading "option" parameters, used as a
	kind of key/value dictionary of options parsed using `parse_options`.

	Change-Id: I63e60d17ae16a020ce4d6de44baf3d152ea42a1a

2021-10-01  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite/dwarf: don't define nested procs for rnglists/loclists
	When I wrote support for rnglists and loclists in the testsuite's DWARF
	assembler, I made it with nested procs, for example proc "table" inside
	proc "rnglists".  The intention was that this proc "table" could only be
	used by the user while inside proc "rnglists"'s body.  I had chosen very
	simple names, thinking there was no chance of name clashes.  I recently
	learned that this is not how TCL works.  This ends up defining a proc
	"table" in the current namespace ("Dwarf" in this case).

	Things still work if you generate rnglists and loclists in the same
	file, as each redefines its own procedures when executing.  But if a
	user of the assembler happened to define a convenience "table" or
	"start_end" procedure, for example, it would get overriden.

	I'd like to change how this works to reduce the chances of a name clash.

	 - Move the procs out of each other, so they are not defined in a nested
	   fashion.
	 - Prefix them with "_rnglists_" or "_loclists_".
	 - While calling $body in the various procs, temporarily make the procs
	   available under their "short" name.  For example, while in rngllists'
	   body, make _rnglists_table available as just "table".  This allows
	   existing code to keep working and keeps it not too verbose.
	 - Modify with_override to allow the overriden proc to not exist.  In
	   that case, the temporary proc is deleted on exit.

	Note the non-conforming indentation when calling with_override in
	_loclists_list.  This is on purpose: as we implement more loclists (and
	rnglists) entry types, the indentation would otherwise get larger and
	larger without much value for readability.  So I think it's reasonable
	here to put them on the same level.

	Change-Id: I7bb48d26fcb0dba1ae4dada05c0c837212424328

2021-10-01  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove TYPE_FIELD_NAME and FIELD_NAME macros
	Remove the `TYPE_FIELD_NAME` and `FIELD_NAME` macros, changing all the
	call sites to use field::name directly.

	Change-Id: I6900ae4e1ffab1396e24fb3298e94bf123826ca6

2021-10-01  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: add field::name / field::set_name
	Add the `name` and `set_name` methods on `struct field`, in order to
	remove `FIELD_NAME` and `TYPE_FIELD_NAME` macros.  In this patch, the
	macros are changed to use `field::name`, so all the call sites that are
	used to set the field's name are changed to use `field::set_name`.
	The next patch will remove the macros completely.

	Note that because of the name clash between the existing field named
	`name` and the new method, I renamed the field `m_name`.  It is not
	private per-se, because we can't make `struct field` a non-POD yet, but
	it should be considered private anyway (not accessed outside `struct
	field`).

	Change-Id: If16ddbca4e0c39d0ff9da420bb5cdebe5b9b0896

2021-10-01  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-30  Sergio Durigan Junior  <sergiodj@sergiodj.net>

	[PR gdb/28369] Use get_shell on gdb/ser-pipe.c
	PR gdb/28369 reports that gdb/ser-pipe.c has an 'execl' function call
	with a hard-coded "/bin/sh" as its argument.  We've had 'get_shell'
	for a while now, which is conscious about the SHELL environment and a
	better alternative to always calling "/bin/sh".

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28369

2021-09-30  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add untested for missing xml support in gdb.base/valgrind*.exp
	Add untested in case missing xml support is detected in test-cases
	gdb.base/valgrind*.exp.

	Tested on x86_64-linux.

2021-09-30  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	arm: enable Cortex-R52+ CPU
	Patch is adding Cortex-R52+ as 'cortex-r52plus' command line
	flag for -mcpu option.

	bfd/

		* cpu-arm.c: New Cortex-R52+ CPU.

	gas/

		* NEWS: Update docs.
		* config/tc-arm.c: New Cortex-R52+ CPU.
		* doc/c-arm.texi: Update docs.
		* testsuite/gas/arm/cpu-cortex-r52plus.d: New test.

2021-09-30  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	aarch64: Enable Cortex-X2 CPU
	This patch is adding support for Cortex-X2 CPU.

	gas:

		* NEWS: Update docs.
		* config/tc-aarch64.c: Add Cortex-X2.
		* doc/c-aarch64.texi: Update docs.

2021-09-30  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	aarch64: Enable Cortex-A710 CPU
	This patch is adding support for Cortex-A710 CPU.

	gas/

	        * NEWS: Update docs.
	        * config/tc-aarch64.c: Add Cortex-A710.
	        * doc/c-aarch64.texi: Update docs.

2021-09-30  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	aarch64: Enable Cortex-A510 CPU
	This patch is adding support for Cortex-A510 CPU.

	gas/

		* NEWS: Update docs.
		* config/tc-aarch64.c: Add Cortex-A510.
		* doc/c-aarch64.texi: Update docs.

2021-09-30  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	aarch64: Update AArch64 features command line options docs 2/2
	Patch is only sorting by 'Extension` column 'Architecture Extension'
	table.

	gas/

		* doc/c-aarch64.texi: Update docs.

2021-09-30  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	aarch64: Update AArch64 features command line options docs 1/2
	Patch is improving entries in "Architecture extensions" table in GAS
	documentation.

	gas/

		* doc/c-aarch64.texi: Update docs.

2021-09-30  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	aarch64: add armv9-a architecture to -march
	Patch is adding new 'armv9-a` command line flag to -march for AArch64.

	gas/

		* config/tc-aarch64.c: Add 'armv9-a' command line flag.
		* docs/c-aarch64.text: Update docs.
		* NEWS: Update docs.

	include/

		* opcode/aarch64.h (AARCH64_FEATURE_V9): New define.
		(AARCH64_ARCH_V9): New define.

2021-09-30  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: make runto_main not pass no-message to runto
	As follow-up to this discussion:

	  https://sourceware.org/pipermail/gdb-patches/2020-August/171385.html

	... make runto_main not pass no-message to runto.  This means that if we
	fail to run to main, for some reason, we'll emit a FAIL.  This is the
	behavior we want the majority of (if not all) the time.

	Without this, we rely on tests logging a failure if runto_main fails,
	otherwise.  They do so in a very inconsisteny mannet, sometimes using
	"fail", "unsupported" or "untested".  The messages also vary widly.
	This patch removes all these messages as well.

	Also, remove a few "fail" where we call runto (and not runto_main).  by
	default (without an explicit no-message argument), runto prints a
	failure already.  In two places, gdb.multi/multi-re-run.exp and
	gdb.python/py-pp-registration.exp, remove "message" passed to runto.
	This removes a few PASSes that we don't care about (but FAILs will still
	be printed if we fail to run to where we want to).  This aligns their
	behavior with the rest of the testsuite.

	Change-Id: Ib763c98c5f4fb6898886b635210d7c34bd4b9023

2021-09-30  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbsupport: make gdb_mkostemp_cloexec return a scoped_fd
	This encourages the callers to use automatic file descriptor management.

	Change-Id: I137a81df6f3607b457e28c35aafde8ed6f3a3344

2021-09-30  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbsupport: make gdb_open_cloexec return scoped_fd
	Make gdb_open_cloexec return a scoped_fd, to encourage using automatic
	management of the file descriptor closing.  Except in the most trivial
	cases, I changed the callers to just release the fd, which retains their
	existing behavior.  That will allow the transition to using scoped_fd
	more to go gradually, one caller at a time.

	Change-Id: Ife022b403f96e71d5ebb4f1056ef6251b30fe554

2021-09-30  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbsupport: move gdb_file_up to its own file
	The following patches wants to change gdb_fopen_cloexec and
	gdb_mkostemp_cloexec to return a scoped_fd.  Doing this causes a cyclic
	include between scoped_fd.h and filestuff.h, that both want to include
	each other.  scoped_fd.h includes filestuff.h because of the
	scoped_fd::to_file method's return value.  filestuff.h would then
	include scoped_fd.h for gdb_fopen_cloexec's and gdb_mkostemp_cloexec's
	return values.

	To fix that, move gdb_file_up to its own file, gdb_file.h.

	Change-Id: Ic82a48914b2aacee8f14af535b7469245f88b93d

2021-09-30  Dimitar Dimitrov  <dimitar@dinux.eu>

	ld: pru: Fix resource_table output section alignment
	My commit 261980de18b added alignment for the resource table symbol.
	But it is wrong.  The Linux remoteproc driver loads and interprets the
	contents of the .resource_table ELF section, not of a table symbol.

	Without this patch, if the linker happens to output padding for symbol
	alignment, then the resource table contents as viewed by the kernel
	loader would "shift" and look corrupted.

	ld/ChangeLog:

		* scripttempl/pru.sc  (.resource_table): Align the output
		section, not the first symbol.

2021-09-30  Tom Tromey  <tromey@adacore.com>

	Fix Windows crash from stop_pc change
	The "make thread_suspend_state::stop_pc optional" patch caused a
	regression on Windows when using shared libraries.  I tracked this
	down to an unguarded use of stop_pc() in the TARGET_WAITKIND_LOADED
	case of handle_inferior_event.  This patch fixes the bug by ensuring
	that the stop PC is set at this point.

2021-09-30  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Use untested in gdb.debuginfod/fetch_src_and_symbols.exp
	With running test-case gdb.debuginfod/fetch_src_and_symbols.exp with target
	board unix/-bad, I get:
	...
	gcc: error: unrecognized command line option '-bad'^M
	compiler exited with status 1
	gdb compile failed, gcc: error: unrecognized command line option '-bad'
	FAIL: gdb.debuginfod/fetch_src_and_symbols.exp: compile
	...

	Replace the FAIL with the usual:
	...
	UNTESTED: gdb.debuginfod/fetch_src_and_symbols.exp: failed to compile
	...

	Tested on x86_64-linux.

2021-09-30  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Remove redundant FAIL in gdb.base/info-os.exp
	When running test-case gdb.base/info-os.exp with target board unix/-bad, I run
	into:
	...
	gdb compile failed, gcc: error: unrecognized command line option '-bad'
	UNTESTED: gdb.base/info-os.exp: failed to prepare
	FAIL: gdb.base/info-os.exp: cannot compile test program
	...

	Remove the redundant FAIL.

	Tested on x86_64-linux.

2021-09-30  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix DUPLICATE in gdb.base/info-os.exp
	When running test-case gdb.base/info-os.exp, I run into:
	...
	PASS: gdb.base/info-os.exp: get threads
	PASS: gdb.base/info-os.exp: get threads
	DUPLICATE: gdb.base/info-os.exp: get threads
	...

	Fix this not doing pass followed by exp_continue in gdb_test_multiple.

	Tested on x86_64-linux.

2021-09-30  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Check compilation result in gdb.dwarf2/dw2-opt-structptr.exp
	When running test-case gdb.dwarf2/dw2-opt-structptr.exp with target board
	unix/-bad, I get:
	...
	gdb compile failed, gcc: error: unrecognized command line option '-bad'
	UNTESTED: gdb.dwarf2/dw2-opt-structptr.exp: dw2-opt-structptr.exp
	UNTESTED: gdb.dwarf2/dw2-opt-structptr.exp: failed to compile
	ERROR: (dw2-opt-structptr) No such file or directory
	UNRESOLVED: gdb.dwarf2/dw2-opt-structptr.exp: console: set print object on
	...

	Merge the two UNTESTEDs.

	Fix the UNRESOLVED by checking result of compilation.

	Tested on x86_64-linux.

2021-09-30  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Check compilation result in gdb.base/structs.exp
	When running test-case gdb.base/structs.exp with target board unix/-bad, I
	get:
	...
	gdb compile failed, gcc: error: unrecognized command line option '-bad'
	UNTESTED: gdb.base/structs.exp: failed to prepare
	ERROR: tcl error sourcing src/gdb/testsuite/gdb.base/structs.exp.
	ERROR: can't read "use_gdb_stub": no such variable
	...

	Fix this by checking the compilation result.

	Fix the resulting DUPLICATEs using with_test_prefix.

	Tested on x86_64-linux.

2021-09-30  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Prepare nodebug exec in gdb.base/cvexpr.exp
	When running test-case gdb.base/cvexpr.exp with target board unix/-bad, I get:
	...
	gdb compile failed, gcc: error: unrecognized command line option '-bad'
	ERROR: tcl error sourcing src/gdb/testsuite/gdb.base/cvexpr.exp.
	ERROR: can't read "use_gdb_stub": no such variable
	...

	This is triggered in a part of the test that claims to require no debug
	information, but uses the exec containing either dwarf or ctf.

	Fix this by preparing another executable compiled with nodebug, and using
	that one instead.

	Also use with_test_prefix to mark the nodebug part, such that we have:
	...
	gdb compile failed, gcc: error: unrecognized command line option '-bad'
	UNTESTED: gdb.base/cvexpr.exp: dwarf: failed to prepare
	gdb compile failed, gcc: error: unrecognized command line option '-bad'
	UNTESTED: gdb.base/cvexpr.exp: nodebug: failed to prepare
	...

	Tested on x86_64-linux.

2021-09-30  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix DUPLICATE in gdb.base/cvexpr.exp
	Fix:
	...
	DUPLICATE: gdb.base/cvexpr.exp: ptype int * restrict
	...
	using with_test_prefix.

	Tested on x86_64-linux.

2021-09-30  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Check compilation result in gdb.base/call-sc.exp
	When running test-case gdb.base/call-sc.exp with target board unix/-bad, I
	get:
	...
	gdb compile failed, gcc: error: unrecognized command line option '-bad'
	UNTESTED: gdb.base/call-sc.exp: failed to prepare
	ERROR: tcl error sourcing src/gdb/testsuite/gdb.base/call-sc.exp.
	ERROR: can't read "use_gdb_stub": no such variable
	...

	Fix this by checking the compilation result.

	Fix the resulting DUPLICATE:
	...
	DUPLICATE: gdb.base/call-sc.exp: failed to prepare
	...
	using with_test_prefix.

	Tested on x86_64-linux.

2021-09-30  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix untested messages in gdb.mi/*.exp
	The effect of:
	...
	untested "y.exp"
	...
	in a gdb.x/y.exp is:
	...
	UNTESTED: gdb.x/y.exp: y.exp
	...
	which is a bit pointless.

	Replace these untested messages in gdb.mi/*.exp with the usual "failed to
	compile".

	Likewise for an:
	...
	untested $testname
	...
	where the variable is undefined.

	Tested on x86_64-linux.

2021-09-30  Nick Clifton  <nickc@redhat.com>

	make objcopy fail if it is asked to redefine symbols in an object file containing LTO information.
		* objcopy.c (filter_symbols): Fail if attempting to dredefine
		symbols in an LTO object file.

2021-09-30  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix full buffer in gdb.rust/dwindex.exp
	On ubuntu 18.04.5, I run into:
	...
	(gdb) mt print objfiles dwindex^M
	^M
	Object file build/gdb/testsuite/outputs/gdb.rust/dwindex/dwindex:  \
	  Objfile at 0x55dab0b87a50, bfd at 0x55dab0b0cfa0, 1095 minsyms^M
	^M
	Psymtabs:^M
	vendor/compiler_builtins/src/int/specialized_div_rem/mod.rs at 0x55dab0db0720^M
	  ...
	library/std/src/sys/unix/stdio.rs at 0x55dab0d96320^M
	ERROR: internal buffer is full.
	UNRESOLVED: gdb.rust/dwindex.exp: check if index present
	...

	Fix this by using -lbl in proc ensure_gdb_index.

	Tested on x86_64-linux.

2021-09-30  Libor Bukata  <libor.bukata@oracle.com>

	Add Solaris specific ELF note processing
	Add elfcore_grok_solaris_note function that enables to
	obtain process status, register values, and program info
	from Solaris's core files.

	bfd/
		* elf.c (elfcore_grok_solaris_note): Solaris specific ELF
		note parser. Better GDB's coredump analysis on Solaris...
		(elfcore_grok_solaris_note_impl): New function.
		(elfcore_grok_solaris_prstatus): New function.
		(elfcore_grok_solaris_info): New function.
		(elfcore_grok_solaris_lwpstatus): New function.
		(elf_parse_notes): Added "CORE" groker element.
	include/
		* elf/common.h: Add note segment constants for core files on
		Solaris systems.

2021-09-30  Frederic Cambus  <fred@statdns.com>

	Add support to readelf for reading OpenBSD ELF core notes.
		* readelf.c (get_openbsd_elfcore_note_type): New function.
		(process_note): Add support for OpenBSD core notes.

2021-09-30  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-29  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/break-interp.exp for ld.so without debug
	When running test-case gdb.base/break-interp.exp on openSUSE Leap 42.3, I get:
	...
	(gdb) info addr dl_main^M
	Symbol "dl_main" is at 0x1750 in a file compiled without debugging.^M
	(gdb) FAIL: gdb.base/break-interp.exp: info addr dl_main
	...
	while the regexp expects "Symbol \"dl_main\" is a function at address $hex\\."

	Fix this by also accepting this variant.

	Tested on x86_64-linux.

2021-09-29  H.J. Lu  <hjl.tools@gmail.com>

	Add a testcase for PR binutils/27202
		PR binutils/27202
		* testsuite/gas/elf/dwarf-5-loc0.d: New file.
		* testsuite/gas/elf/dwarf-5-loc0.s: Likewise.
		* testsuite/gas/elf/elf.exp: Run dwarf-5-loc0.

2021-09-29  Pedro Alves  <pedro@palves.net>

	Fix gdb.multi/multi-term-settings.exp race
	The gdb.multi/multi-term-settings.exp testcase sometimes fails like so:

	 Running /home/pedro/gdb/mygit/src/gdb/testsuite/gdb.multi/multi-term-settings.exp ...
	 FAIL: gdb.multi/multi-term-settings.exp: inf1_how=attach: inf2_how=attach: stop with control-c (SIGINT)

	It's easier to reproduce if you stress the machine at the same time, like e.g.:

	  $ stress -c 24

	Looking at gdb.log, we see:

	 (gdb) attach 60422
	 Attaching to program: build/gdb/testsuite/outputs/gdb.multi/multi-term-settings/multi-term-settings, process 60422
	 [New Thread 60422.60422]
	 Reading symbols from /lib/x86_64-linux-gnu/libc.so.6...
	 Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libc-2.31.so...
	 Reading symbols from /lib64/ld-linux-x86-64.so.2...
	 (No debugging symbols found in /lib64/ld-linux-x86-64.so.2)
	 0x00007f2fc2485334 in __GI___clock_nanosleep (clock_id=<optimized out>, clock_id@entry <mailto:clock_id@entry>=0, flags=flags@entry <mailto:flags@entry>=0, req=req@entry <mailto:req@entry>=0x7ffe23126940, rem=rem@entry <mailto:rem@entry>=0x0) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:78
	 78	../sysdeps/unix/sysv/linux/clock_nanosleep.c: No such file or directory.
	 (gdb) PASS: gdb.multi/multi-term-settings.exp: inf1_how=attach: inf2_how=attach: inf2: attach
	 set schedule-multiple on
	 (gdb) PASS: gdb.multi/multi-term-settings.exp: inf1_how=attach: inf2_how=attach: set schedule-multiple on
	 info inferiors
	   Num  Description       Connection                         Executable
	   1    process 60404     1 (extended-remote localhost:2349) build/gdb/testsuite/outputs/gdb.multi/multi-term-settings/multi-term-settings
	 * 2    process 60422     1 (extended-remote localhost:2349) build/gdb/testsuite/outputs/gdb.multi/multi-term-settings/multi-term-settings
	 (gdb) PASS: gdb.multi/multi-term-settings.exp: inf1_how=attach: inf2_how=attach: info inferiors
	 pid=60422, count=46
	 pid=60422, count=47
	 pid=60422, count=48
	 pid=60422, count=49
	 pid=60422, count=50
	 pid=60422, count=51
	 pid=60422, count=52
	 pid=60422, count=53
	 pid=60422, count=54
	 pid=60422, count=55
	 pid=60422, count=56
	 pid=60422, count=57
	 pid=60422, count=58
	 pid=60422, count=59
	 pid=60422, count=60
	 pid=60422, count=61
	 pid=60422, count=62
	 pid=60422, count=63
	 pid=60422, count=64
	 pid=60422, count=65
	 pid=60422, count=66
	 pid=60422, count=67
	 pid=60422, count=68
	 pid=60422, count=69
	 pid=60404, count=54
	 pid=60404, count=55
	 pid=60404, count=56
	 pid=60404, count=57
	 pid=60404, count=58
	 PASS: gdb.multi/multi-term-settings.exp: inf1_how=attach: inf2_how=attach: continue
	 Quit
	 (gdb) FAIL: gdb.multi/multi-term-settings.exp: inf1_how=attach: inf2_how=attach: stop with control-c (SIGINT)

	If you look at the testcase's sources, you'll see that the intention
	is to resumes the program with "continue", wait to see a few of those
	"pid=..., count=..." lines, and then interrupt the program with
	Ctrl-C.  But somehow, that resulted in GDB printing "Quit", instead of
	the Ctrl-C stopping the program with SIGINT.

	Here's what is happening:

	 #1 - those "pid=..., count=..." lines we see above weren't actually
	      output by the inferior after it has been continued (see #1).
	      Note that "inf1_how" and "inf2_how" are "attach".  What happened
	      is that those "pid=..., count=..." lines were output by the
	      inferiors _before_ they were attached to.  We see them at that
	      point instead of earlier, because that's where the testcase
	      reads from the inferiors' spawn_ids.

	 #2 - The testcase mistakenly thinks those "pid=..., count=..." lines
	      happened after the continue was processed by GDB, meaning it has
	      waited enough, and so sends the Ctrl-C.  GDB hasn't yet passed
	      the terminal to the inferior, so the Ctrl-C results in that
	      Quit.

	The fix here is twofold:

	 #1 - flush inferior output right after attaching

	 #2 - consume the "Continuing" printed by "continue", indicating the
	      inferior has the terminal.  This is the same as done throughout
	      the testsuite to handle this exact problem of sending Ctrl-C too
	      soon.

	gdb/testsuite/ChangeLog:
	yyyy-mm-dd  Pedro Alves  <pedro@palves.net <mailto:pedro@palves.net>>

		* gdb.multi/multi-term-settings.exp (create_inferior): Flush
		inferior output.
		(coretest): Use $gdb_test_name.  After issuing "continue", wait
		for "Continuing".

	Change-Id: Iba7671dfe1eee6b98d29cfdb05a1b9aa2f9defb9

2021-09-29  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Disable vgdb tests if xml not supported
	I build gdb without xml support using --without-expat, and ran into:
	...
	(gdb) target remote | vgdb --wait=2 --max-invoke-ms=2500 --pid=22032^M
	Remote debugging using | vgdb --wait=2 --max-invoke-ms=2500 --pid=22032^M
	relaying data between gdb and process 22032^M
	warning: Can not parse XML target description; XML support was disabled at \
	  compile time^M
	  ...
	(gdb) PASS: gdb.base/valgrind-infcall.exp: continue #1
	p gdb_test_infcall ()^M
	Remote 'g' packet reply is too long (expected 560 bytes, got 800 bytes): ...^M
	(gdb) FAIL: gdb.base/valgrind-infcall.exp: p gdb_test_infcall ()
	...

	After googling the error message with context valgrind gdbserver, I found
	indications that the Remote 'g' packet reply error is due to missing xml
	support.

	And here ( https://www.valgrind.org/docs/manual/manual-core-adv.html ) I
	found:
	...
	GDB version needed for ARM and PPC32/64.

	You must use a GDB version which is able to read XML target description sent
	by a gdbserver.  This is the standard setup if GDB was configured and built
	with the "expat" library.  If your GDB was not configured with XML support, it
	will report an error message when using the "target" command.  Debugging will
	not work because GDB will then not be able to fetch the registers from the
	Valgrind gdbserver.
	...

	So I guess I'm running into the same problem for x86_64.

	Fix this by skipping all gdb.base/valgrind-*.exp tests if xml support is not
	available.  Although only the gdb.base/valgrind-infcall*.exp produce fails,
	the Remote 'g' packet reply error occurs in all tests, so it seems prudent to
	disable them all.

	Tested on x86_64-linux.

2021-09-29  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.python/py-breakpoint.exp with python 2
	With a gdb build using python 2.7, I run into:
	...
	(gdb) python \
	  gdb.events.breakpoint_modified.connect(lambda bp: print(bp.enabled))^M
	  File "<string>", line 1^M
	    gdb.events.breakpoint_modified.connect(lambda bp: print(bp.enabled))^M
	                                                          ^^M
	SyntaxError: invalid syntax^M
	Error while executing Python code.^M
	(gdb) FAIL: gdb.python/py-breakpoint.exp: test_bkpt_auto_disable: \
	  trap breakpoint_modified event
	...

	This is caused by the following:
	- a lambda function body needs to be an expression
	- in python 2, print is a statement, while in python 3 it's a function
	- a function call is an expression, and a statement is not.

	Fix this by defining a function print_bp_enabled:
	...
	def print_bp_enabled (bp):
	    print (bp.enabled)
	end
	...
	and using that instead.

	Tested on x86_64-linux.

2021-09-29  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix breakpoint detection in gdb.gdb/python-helper.exp
	With a gdb configured to be somewhat minimal, while still supporting python:
	...
	$ gdb --configuration
	This GDB was configured as follows:
	   configure --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
	             --with-auto-load-dir=$debugdir:$datadir/auto-load
	             --with-auto-load-safe-path=$debugdir:$datadir/auto-load
	             --without-expat
	             --with-gdb-datadir=$install/share/gdb (relocatable)
	             --with-jit-reader-dir=$install/lib64/gdb (relocatable)
	             --without-libunwind-ia64
	             --without-lzma
	             --without-babeltrace
	             --without-intel-pt
	             --with-mpfr
	             --without-xxhash
	             --with-python=/usr
	             --with-python-libdir=/usr/lib
	             --with-debuginfod
	             --without-guile
	             --disable-source-highlight
	             --with-separate-debug-dir=/usr/lib/debug
	             --with-system-gdbinit=$devel/system-gdbinit
	...
	and using gcc 4.8 to build gdb (causing std::thread not to be used due to
	PR28318) I ran into:
	...
	(gdb) PASS: gdb.gdb/python-helper.exp: start inner gdb
	print 1^M
	^M
	Breakpoint 2, value_print () at src/gdb/valprint.c:1174^M
	1174      scoped_value_mark free_values;^M
	(xgdb) FAIL: gdb.gdb/python-helper.exp: hit breakpoint in inner gdb (timeout)
	...

	The problem is that the regexp expects "hit Breakpoint $decimal".  The "hit"
	part is missing.

	The "hit" is printed by maybe_print_thread_hit_breakpoint, when
	show_thread_that_caused_stop returns true:
	...
	int
	show_thread_that_caused_stop (void)
	{
	  return highest_thread_num > 1;
	}
	...
	Apparently, that's not the case.

	Fix this by removing "hit" from the regexp, making the regexp more similar to
	what is used in say, continue_to_breakpoint.

	Tested on x86_64-linux.

2021-09-29  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: fix build when libbacktrace and execinfo backtrace are not available
	In this commit:

	  commit abbbd4a3e0ca51132e7fb31a43f896d29894dae0
	  Date:   Wed Aug 11 13:24:33 2021 +0100

	      gdb: use libbacktrace to create a better backtrace for fatal signals

	The build of GDB was broken iff, the execinfo backtrace API is not
	available, and, libbacktrace is either disabled, or not usable.  In
	this case you'll see build errors like this:

	      CXX    bt-utils.o
	    /home/username/src/binutils-gdb/gdb/bt-utils.c: In function 'void gdb_internal_backtrace()':
	    /home/username/src/binutils-gdb/gdb/bt-utils.c:165:5: error: 'gdb_internal_backtrace_1' was not declared in this scope
	         gdb_internal_backtrace_1 ();
	         ^~~~~~~~~~~~~~~~~~~~~~~~

	This commit fixes the issue by guarding the call to
	gdb_internal_backtrace_1 with '#ifdef GDB_PRINT_INTERNAL_BACKTRACE',
	which is only defined when one of the backtrace libraries are
	available.

2021-09-29  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb/doc: use 'standard error stream' instead of 'stderr' in some places
	With this commit:

	  commit 91f2597bd24d171c1337a4629f8237aa47c59082
	  Date:   Thu Aug 12 18:24:59 2021 +0100

	      gdb: print backtrace for internal error/warning

	I included some references to 'stderr', which, it was pointed out,
	would be better written as 'standard error stream'.  See:

	  https://sourceware.org/pipermail/gdb-patches/2021-September/182225.html

	This commit replaces the two instances of 'stderr' that I introduced.

2021-09-29  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: fix manor -> manner typo in some comments
	In a recent commit I used 'manor' in some comments rather than
	'manner'.  This commit fixes those two mistakes.

	I also looked through the gdb/ tree and found one additional instance
	of this mistake that this commit also fixes.

2021-09-29  Alan Modra  <amodra@gmail.com>

	PR27202, readelf -wL doesn't work on ".loc 0"
	For DWARF revision 4 and earlier, display_debug_lines_decoded
	populates the file_table array with entries read from .debug_line
	after the directory table.  file_table[0] contains the first entry.
	DWARF rev 4 line number programs index this entry as file number one.
	DWARF revision 5 changes .debug_line format quite extensively, and in
	particular gives file number zero a meaning.

		PR 27202
		* dwarf.c (display_debug_lines_decoded): Correct indexing used
		for DWARF5 files.

2021-09-29  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: enable target_async around stop_all_threads call in process_initial_stop_replies
	The following scenario hangs:

	 - maint set target-non-stop on
	 - `gdbserver --attach`
	 - a multi-threaded program

	For example:

	Terminal 1:

	    $ gnome-calculator&
	    [1] 495731
	    $ ../gdbserver/gdbserver --once --attach :1234 495731
	    Attached; pid = 495731
	    Listening on port 1234

	Terminal 2:

	    $ ./gdb -nx -q --data-directory=data-directory /usr/bin/gnome-calculator -ex "maint set target-non-stop on" -ex "tar rem :1234"
	    Reading symbols from /usr/bin/gnome-calculator...
	    (No debugging symbols found in /usr/bin/gnome-calculator)
	    Remote debugging using :1234
	    * hangs *

	What happens is:

	 - The protocol between gdb and gdbserver is in non-stop mode, but the
	   user-visible behavior is all-stop
	 - On connect, gdbserver sends one stop reply for one thread that is
	   stops, the others stay running
	 - In process_initial_stop_replies, gdb calls stop_all_threads to stop
	   these other threads, because we are using the all-stop user-visible
	   mode
	 - stop_all_threads sends a stop request for all the running threads and
	   then waits for resulting events
	 - At this point, the remote target is in target_async(0) mode, which
	   makes stop_all_threads not consider it for events
	 - stop_all_threads loops indefinitely (it does not even block
	   indefinitely, it is in an infinite busy loop) because there are no
	   event sources.  wait_one_event returns a TARGET_WAITKIND_NO_RESUMED
	   wait status.

	Fix that by making the remote target async around the stop_all_threads
	call.

	I haven't implemented it because I'm not sure how to do it, but I think
	it would be a good idea to have, in stop_all_threads / wait_one /
	handle_one, an assert to check that if we are expecting one or more
	event, then there are some targets that are in a state where they can
	supply some events.  Otherwise, we'll necessarily be stuck in this
	infinite loop, and it's probably due to a bug in GDB.  I'm not too sure
	where to put this or how to express it though.  Perhaps in
	stop_all_threads, here:

		  for (int i = 0; i < waits_needed; i++)
		    {
		      wait_one_event event = wait_one ();
		      *here*
		      if (handle_one (event))
			break;
		    }

	If at that point, the returned event is TARGET_WAITKIND_NO_RESUMED,
	there's a problem.  We expect some event, because we've asked some
	threads to stop, but all targets are answering that they won't have any
	events for us.  That's a contradiction, and a sign that something has
	gone wrong.  It could perhaps event be:

	    gdb_assert (event.ws.kind != TARGET_WAITKIND_NO_RESUMED);

	in handle_one, as the idea is the same in prepare_for_detach.

	A bit more sophisticated would be: we know which targets we are
	expecting waits from, since we know which threads we have asked to
	stop.  So if any of these targets returns TARGET_WAITKIND_NO_RESUMED,
	something is fishy.

	Add a test that tests attaching with gdbserver's --attach flag to a
	multi-threaded program, and then connecting to it.  Without the fix, the
	test reproduces the hang.

	Change-Id: If6f6690a4887ca66693ef1af64791dda4c65f24f

2021-09-29  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-29  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: fix darwin-nat build (again)
	I made a mistake in the previous patch.  Adjust the format string to
	match the arguments.

	Change-Id: I4d45e0e0adb78eb3b5a06ba1a5287155940056ba

2021-09-29  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: fix darwin-nat build
	There are two errors of this kind:

	      CXX    darwin-nat.o
	    /Users/smarchi/src/binutils-gdb/gdb/darwin-nat.c:1175:19: error: format specifies type 'unsigned long' but the argument has type 'ULONGEST' (aka 'unsigned long long') [-Werror,-Wformat]
		 ptid.pid (), ptid.tid ());
			      ^~~~~~~~~~~

	Fix them by using ptid_t's to_string method.

	Change-Id: I52087d5f7ee0fc01ac8b3f87d4db0217cb0d7cc7

2021-09-29  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb.base/foll-fork.exp: accept "info breakpoints" output in any order
	The test currently requires the "inf 1" breakpoint to be before the "inf
	2" breakpoint.  This is not always the case:

	    info breakpoints 2
	    Num     Type           Disp Enb Address            What
	    2       breakpoint     keep y   <MULTIPLE>
	    2.1                         y   0x0000555555554730 in callee at /home/simark/src/binutils-gdb/gdb/testsuite/gdb.base/foll-fork.c:9 inf 2
	    2.2                         y   0x0000555555554730 in callee at /home/simark/src/binutils-gdb/gdb/testsuite/gdb.base/foll-fork.c:9 inf 1
	    (gdb) FAIL: gdb.base/foll-fork.exp: follow-fork-mode=parent: detach-on-fork=off: cmd=next 2: test_follow_fork: info breakpoints

	Since add_location_to_breakpoint uses only the address as a criterion to
	sort locations, the order of locations at the same address is not
	stable: it will depend on the insertion order.  Here, the insertion
	order comes from the order of SALs when creating the breakpoint, which
	can vary from machine to machine.  While it would be more user-friendly
	to have a more stable order for printed breakpoint locations, it doesn't
	really matter for this test, and it would be hard to define an order
	that will be the same everywhere, all the time.

	So, loosen the regexp to accept "inf 1" and "inf 2" in any order.

	Co-Authored-By: Pedro Alves <pedro@palves.net>
	Change-Id: I5ada2e0c6ad0669e0d161bfb6b767229c0970d16

2021-09-28  Cooper Qu  <cooper.qu@linux.alibaba.com>

	RISC-V: Fix wrong version number when arch contains 'p'.
	When specify a default version for p extension in
	riscv_supported_std_ext[](elfxx-riscv.c) and assembling with
	-march=rv32imacp, the c extension's version in attribute will become
	0p0, the expectation is 2p0.

	TODO: Remember to add testcase when we have supported standrad p in
	the future.

	bfd/
		PR gas/28372
		* elfxx-riscv.c (riscv_parsing_subset_version): Break if p
		represent the 'p' extension.

	Change-Id: Ia4e0cf26f3d7d07acaee8cefd86707ecac663a59

2021-09-28  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: Allow to add numbers in the prefixed extension names.
	We need to allow adding numbers in the prefixed extension names, since
	the zve<32,64><d,f,x> extensions are included in the forzen rvv v1.0 spec
	recently.  But there are two restrictions as follows,

	* The extension name ends with <number>p is invalid, since this may
	be confused with extension with <number>.0 version.  We report errors
	for this case.

	Invalid format: [z|h|s|zvm|x][0-9a-z]+[0-9]+p

	* The extension name ends with numbers is valid, but the numbers will
	be parsed as major version, so try to avoid naming extensions like this.

	bfd/
		* elfxx-riscv.c (riscv_recognized_prefixed_ext): Renamed from
		riscv_valid_prefixed_ext/
		(riscv_parsing_subset_version): The extensions end with <number>p
		is forbidden, we already report the detailed errors in the
		riscv_parse_prefixed_ext, so clean the code and unused parameters.
		(riscv_parse_std_ext): Updated.
		(riscv_parse_prefixed_ext): Rewrite the parser to allow numbers
		in the prefixed extension names.
	gas/
		* testsuite/gas/riscv/march-fail-invalid-x-01.d: New testcases.
		* testsuite/gas/riscv/march-fail-invalid-x-02.d: Likewise.
		* testsuite/gas/riscv/march-fail-invalid-z-01.d: Likewise.
		* testsuite/gas/riscv/march-fail-invalid-z-02.d: Likewise.
		* testsuite/gas/riscv/march-fail-invalid.l: Likewise.
		* testsuite/gas/riscv/march-fail-version-x.d: Removed.
		* testsuite/gas/riscv/march-fail-version-z.d: Likewise.
		* testsuite/gas/riscv/march-fail-version.l: Likewise.

2021-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: print backtrace for internal error/warning
	This commit builds on previous work to allow GDB to print a backtrace
	of itself when GDB encounters an internal-error or internal-warning.
	This fixes PR gdb/26377.

	There's not many places where we call internal_warning, and I guess in
	most cases the user would probably continue their debug session.  And
	so, in order to avoid cluttering up the output, by default, printing
	of a backtrace is off for internal-warnings.

	In contrast, printing of a backtrace is on by default for
	internal-errors, as I figure that in most cases hitting an
	internal-error is going to be the end of the debug session.

	Whether a backtrace is printed or not can be controlled with the new
	settings:

	  maintenance set internal-error backtrace on|off
	  maintenance show internal-error backtrace

	  maintenance set internal-warning backtrace on|off
	  maintenance show internal-warning backtrace

	Here is an example of what an internal-error now looks like with the
	backtrace included:

	  (gdb) maintenance internal-error blah
	  ../../src.dev-3/gdb/maint.c:82: internal-error: blah
	  A problem internal to GDB has been detected,
	  further debugging may prove unreliable.
	  ----- Backtrace -----
	  0x5c61ca gdb_internal_backtrace_1
	  	../../src.dev-3/gdb/bt-utils.c:123
	  0x5c626d _Z22gdb_internal_backtracev
	  	../../src.dev-3/gdb/bt-utils.c:165
	  0xe33237 internal_vproblem
	  	../../src.dev-3/gdb/utils.c:393
	  0xe33539 _Z15internal_verrorPKciS0_P13__va_list_tag
	  	../../src.dev-3/gdb/utils.c:470
	  0x1549652 _Z14internal_errorPKciS0_z
	  	../../src.dev-3/gdbsupport/errors.cc:55
	  0x9c7982 maintenance_internal_error
	  	../../src.dev-3/gdb/maint.c:82
	  0x636f57 do_simple_func
	  	../../src.dev-3/gdb/cli/cli-decode.c:97
	   .... snip, lots more backtrace lines ....
	  ---------------------
	  ../../src.dev-3/gdb/maint.c:82: internal-error: blah
	  A problem internal to GDB has been detected,
	  further debugging may prove unreliable.
	  Quit this debugging session? (y or n) y

	  This is a bug, please report it.  For instructions, see:
	  <https://www.gnu.org/software/gdb/bugs/>.

	  ../../src.dev-3/gdb/maint.c:82: internal-error: blah
	  A problem internal to GDB has been detected,
	  further debugging may prove unreliable.
	  Create a core file of GDB? (y or n) n

	My hope is that this backtrace might make it slightly easier to
	diagnose GDB issues if all that is provided is the console output, I
	find that we frequently get reports of an assert being hit that is
	located in pretty generic code (frame.c, value.c, etc) and it is not
	always obvious how we might have arrived at the assert.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=26377

2021-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: use libbacktrace to create a better backtrace for fatal signals
	GDB recently gained the ability to print a backtrace when a fatal
	signal is encountered.  This backtrace is produced using the backtrace
	and backtrace_symbols_fd API available in glibc.

	However, in order for this API to actually map addresses to symbol
	names it is required that the application (GDB) be compiled with
	-rdynamic, which GDB is not by default.

	As a result, the backtrace produced often looks like this:

	  Fatal signal: Bus error
	  ----- Backtrace -----
	  ./gdb/gdb[0x80ec00]
	  ./gdb/gdb[0x80ed56]
	  /lib64/libc.so.6(+0x3c6b0)[0x7fc2ce1936b0]
	  /lib64/libc.so.6(__poll+0x4f)[0x7fc2ce24da5f]
	  ./gdb/gdb[0x15495ba]
	  ./gdb/gdb[0x15489b8]
	  ./gdb/gdb[0x9b794d]
	  ./gdb/gdb[0x9b7a6d]
	  ./gdb/gdb[0x9b943b]
	  ./gdb/gdb[0x9b94a1]
	  ./gdb/gdb[0x4175dd]
	  /lib64/libc.so.6(__libc_start_main+0xf3)[0x7fc2ce17e1a3]
	  ./gdb/gdb[0x4174de]
	  ---------------------

	This is OK if you have access to the exact same build of GDB, you can
	manually map the addresses back to symbols, however, it is next to
	useless if all you have is a backtrace copied into a bug report.

	GCC uses libbacktrace for printing a backtrace when it encounters an
	error.  In recent commits I added this library into the binutils-gdb
	repository, and in this commit I allow this library to be used by
	GDB.  Now (when GDB is compiled with debug information) the backtrace
	looks like this:

	  ----- Backtrace -----
	  0x80ee08 gdb_internal_backtrace
	  	../../src/gdb/event-top.c:989
	  0x80ef0b handle_fatal_signal
	  	../../src/gdb/event-top.c:1036
	  0x7f24539dd6af ???
	  0x7f2453a97a5f ???
	  0x154976f gdb_wait_for_event
	  	../../src/gdbsupport/event-loop.cc:613
	  0x1548b6d _Z16gdb_do_one_eventv
	  	../../src/gdbsupport/event-loop.cc:237
	  0x9b7b02 start_event_loop
	  	../../src/gdb/main.c:421
	  0x9b7c22 captured_command_loop
	  	../../src/gdb/main.c:481
	  0x9b95f0 captured_main
	  	../../src/gdb/main.c:1353
	  0x9b9656 _Z8gdb_mainP18captured_main_args
	  	../../src/gdb/main.c:1368
	  0x4175ec main
	  	../../src/gdb/gdb.c:32
	  ---------------------

	Which seems much more useful.

	Use of libbacktrace is optional.  If GDB is configured with
	--disable-libbacktrace then the libbacktrace directory will not be
	built, and GDB will not try to use this library.  In this case GDB
	would try to use the old backtrace and backtrace_symbols_fd API.

	All of the functions related to writing the backtrace of GDB itself
	have been moved into the new files gdb/by-utils.{c,h}.

2021-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>

	src-release.sh: add libbacktrace to GDB_SUPPORT_DIRS
	After the previous commit that imported libbacktrace from gcc, this
	commit updates src-release.sh so that the libbacktrace directory is
	included in the gdb release tar file.

	ChangeLog:

		* src-release.sh (GDB_SUPPPORT_DIRS): Add libbacktrace.

2021-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>

	Copy in libbacktrace from gcc
	This copies in libbacktrace from the gcc repository as it was in the
	commit 62e420293a293608f383d9b9c7f2debd666e9fc9.  GDB is going to
	start using this library soon.

	A dependency between GDB and libbacktrace has already been added to
	the top level Makefile, so, after this commit, when building GDB,
	libbacktrace will be built first.  However, libbacktrace is not yet
	linked into GDB, or used by GDB in any way.

	It is possible to stop libbacktrace being built by configuring the
	tree with --disable-libbacktrace.

	This commit does NOT update src-release.sh, that will be done in the
	next commit, this commit ONLY imports libbacktrace from gcc.  This
	means that if you try to make a release of GDB from exactly this
	commit then the release tar file will not include libbacktrace.
	However, as libbacktrace is an optional dependency this is fine.

2021-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: Add a dependency between gdb and libbacktrace
	GDB is going to start using libbacktrace, so add a build dependency.

	ChangeLog:

		* Makefile.def: Add all-gdb dependency on all-libbacktrace.
		* Makefile.in: Regenerate.

2021-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>

	top-level configure: setup target_configdirs based on repository
	The top-level configure script is shared between the gcc repository
	and the binutils-gdb repository.

	The target_configdirs variable in the configure.ac script, defines
	sub-directories that contain components that should be built for the
	target using the target tools.

	Some components, e.g. zlib, are built as both host and target
	libraries.

	This causes problems for binutils-gdb.  If we run 'make all' in the
	binutils-gdb repository we end up trying to build a target version of
	the zlib library, which requires the target compiler be available.
	Often the target compiler isn't immediately available, and so the
	build fails.

	The problem with zlib impacted a previous attempt to synchronise the
	top-level configure scripts from gcc to binutils-gdb, see this thread:

	  https://sourceware.org/pipermail/binutils/2019-May/107094.html

	And I'm in the process of importing libbacktrace in to binutils-gdb,
	which is also a host and target library, and triggers the same issues.

	I believe that for binutils-gdb, at least at the moment, there are no
	target libraries that we need to build.

	In the configure script we build three lists of things we want to
	build, $configdirs, $build_configdirs, and $target_configdirs, we also
	build two lists of things we don't want to build, $skipdirs and
	$noconfigdirs.  We then remove anything that is in the lists of things
	not to build, from the list of things that should be built.

	My proposal is to add everything in target_configdirs into skipdirs,
	if the source tree doesn't contain a gcc/ sub-directory.  The result
	is that for binutils-gdb no target tools or libraries will be built,
	while for the gcc repository, nothing should change.

	If a user builds a unified source tree, then the target tools and
	libraries should still be built as the gcc/ directory will be present.

	I've tested a build of gcc on x86-64, and the same set of target
	libraries still seem to get built.  On binutils-gdb this change
	resolves the issues with 'make all'.

	ChangeLog:

		* configure: Regenerate.
		* configure.ac (skipdirs): Add the contents of target_configdirs if
		we are not building gcc.

2021-09-28  Gleb Fotengauer-Malinovskiy  <glebfm@altlinux.org>

	PR28391, strip/objcopy --preserve-dates *.a: cannot set time
	After commit 985e0264516 copy_archive function began to pass invalid
	values to the utimensat(2) function when it tries to preserve
	timestamps in ar archives.  This happens because the bfd_stat_arch_elt
	implementation for ar archives fills only the st_mtim.tv_sec part of
	the st_mtim timespec structure, but leaves the st_mtim.tv_nsec part
	and the whole st_atim timespec untouched leaving them uninitialized

		PR 28391
		* ar.c (extract_file): Clear buf for preserve_dates.
		* objcopy.c (copy_archive): Likewise.

2021-09-28  Mike Frysinger  <vapier@gentoo.org>

	sim: drop weak func attrs on module inits
	When I first wrote this, I was thinking we'd scan all source files
	that existed and generate a complete init list.  That means for any
	particular build, we'd probably have a few functions that didn't
	exist, so weak attributes was necessary.  What I ended up scanning
	though was only the source files that went into a particular build.

	There was another concern too: a source file might be included, but
	the build settings would cause all of its contents to be skipped
	(via CPP defines).  So scanning via naive grep would pick up names
	not actually available.  A check of the source tree shows that we
	never do this, and it's pretty easy to institute a policy that we
	don't start (by at the very least including a stub init func).

	The use of weak symbols ends up causing a problem in practice: for
	a few modules (like profiling), nothing else pulls it in, so the
	linker omits it entirely, which leads to the profiling module never
	being available.  So drop the weak markings since we know all these
	funcs will be available.

2021-09-28  Cui,Lili  <lili.cui@intel.com>

	x86: Print {bad} on invalid broadcast in OP_E_memory
	Don't print broadcast for scalar_mode, and print {bad} for invalid broadcast.

	gas/

		PR binutils/28381
		* testsuite/gas/i386/bad-bcast.s: Add a new testcase.
		* testsuite/gas/i386/bad-bcast.d: Likewise.
		* testsuite/gas/i386/bad-bcast-intel.d: New.

	opcodes/

		PR binutils/28381
		* i386-dis.c (static struct): Add no_broadcast.
		(OP_E_memory): Mark invalid broadcast with no_broadcast=1 and Print "{bad}"for it.
		(intel_operand_size): mark invalid broadcast with no_broadcast=1.
		(OP_XMM): Mark scalar_mode with no_broadcast=1.

2021-09-28  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: use intrusive_list for linux-nat lwp_list
	Replace the manually maintained linked list of lwp_info objects with
	intrusive_list.  Replace the ALL_LWPS macro with all_lwps, which returns
	a range.  Add all_lwps_safe as well, for use in iterate_over_lwps, which
	currently iterates in a safe manner.

	Change-Id: I355313502510acc0103f5eaf2fbde80897d6376c

2021-09-28  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: add destructor to lwp_info
	Replace the lwp_free function with a destructor.  Make lwp_info
	non-copyable, since there is now a destructor (we wouldn't want an
	lwp_info object getting copied and this->arch_private getting deleted
	twice).

	Change-Id: I09fcbe967e362566d3a06fed2abca2a9955570fa

2021-09-28  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: make lwp_info non-POD
	Initialize all fields in the class declaration directly.  This opens the
	door to using intrusive_list, done in the following patch.

	Change-Id: I38bb27410cd9ebf511d310bb86fe2ea1872c3b05

2021-09-28  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-27  Simon Marchi  <simon.marchi@efficios.com>

	gdb: don't share aspace/pspace on fork with "detach-on-fork on" and "follow-fork-mode child"
	We found that when handling forks, two inferiors can unexpectedly share
	their program space and address space.  To reproduce:

	 1. Using a test program that forks...
	 2. "set follow-fork-mode child"
	 3. "set detach-on-fork on" (the default)
	 4. run to a breakpoint somewhere after the fork

	Step 4 should have created a new inferior:

	    (gdb) info inferiors
	      Num  Description       Connection           Executable
	      1    <null>                                 /home/smarchi/build/wt/amd/gdb/fork
	    * 2    process 251425    1 (native)           /home/smarchi/build/wt/amd/gdb/fork

	By inspecting the state of GDB, we can see that the two inferiors now
	share one program space and one address space:

	Inferior 1:

	    (top-gdb) p inferior_list.m_front.num
	    $2 = 1
	    (top-gdb) p inferior_list.m_front.aspace
	    $3 = (struct address_space *) 0x5595e2520400
	    (top-gdb) p inferior_list.m_front.pspace
	    $4 = (struct program_space *) 0x5595e2520440

	Inferior 2:

	    (top-gdb) p inferior_list.m_front.next.num
	    $5 = 2
	    (top-gdb) p inferior_list.m_front.next.aspace
	    $6 = (struct address_space *) 0x5595e2520400
	    (top-gdb) p inferior_list.m_front.next.pspace
	    $7 = (struct program_space *) 0x5595e2520440

	You can then run inferior 1 again and the two inferiors will still
	erroneously share their spaces, but already at this point this is wrong.

	The cause of the bad {a,p}space sharing is in follow_fork_inferior.
	When following the child and detaching from the parent, we just re-use
	the parent's spaces, rather than cloning them.  When we switch back to
	inferior 1 and run again, we find ourselves with two unrelated inferiors
	sharing spaces.

	Fix that by creating new spaces for the parent after having moved them
	to the child.  My initial implementation created new spaces for the
	child instead.  Doing this breaks doing "next" over fork().  When "next"
	start, we record the symtab of the starting location.  When the program
	stops, we compare that symtab with the symtab the program has stopped
	at.  If the symtab or the line number has changed, we conclude the
	"next" is done.  If we create a new program space for the child and copy
	the parent's program space to it with clone_program_space, it creates
	new symtabs for the child as well.  When the child stop, but still on
	the fork() line, GDB thinks the "next" is done because the symtab
	pointers no longer match.  In reality they are two symtab instances that
	represent the same file.  But moving the spaces to the child and
	creating new spaces for the parent, we avoid this problem.

	Note that the problem described above happens today with "detach-on-fork
	off" and "follow-fork-mode child", because we create new spaces for the
	child.  This will have to be addressed later.

	Test-wise, improve gdb.base/foll-fork.exp to set a breakpoint that is
	expected to have a location in each inferiors.  Without the fix, when
	the two inferiors erroneously share a program space, GDB reports a
	single location.

	Change-Id: Ifea76e14f87b9f7321fc3a766217061190e71c6e

2021-09-27  Simon Marchi  <simon.marchi@efficios.com>

	gdb.base/foll-fork.exp: use foreach_with_prefix to handle prefixes
	No behavior change in the test expected, other than in the test names.

	Change-Id: I111137483858ab0f23138439f2930009779a2b3d

2021-09-27  Simon Marchi  <simon.marchi@efficios.com>

	gdb.base/foll-fork.exp: rename variables
	Rename the variables / parameters used to match the corresponding GDB
	setting name, I find that easier to follow.

	Change-Id: Idcbddbbb369279fcf1e808b11a8c478f21b2a946

2021-09-27  Simon Marchi  <simon.marchi@efficios.com>

	gdb.base/foll-fork.exp: refactor to restart GDB between each portion of the test
	This test is difficult to follow and modify because the state of GDB is
	preserved some tests.  Add a setup proc, which starts a new GDB and runs
	to main, and use it in all test procs.  Use proc_with_prefix to avoid
	duplicates.

	The check_fork_catchpoints proc also seems used to check for follow-fork
	support by checking if catchpoints are supported.  If they are not, it
	uses "return -code return", which makes its caller return.  I find this
	unnecessary complex, versus just returning a boolean.  Modify it to do
	so.

	Change-Id: I23e62b204286c5e9c5c86d2727f7d33fb126ed08

2021-09-27  Simon Marchi  <simon.marchi@efficios.com>

	gdb.base/foll-fork.exp: remove gating based on target triplet
	It looks like this test has some code to check at runtime the support of
	fork handling of the target (see check_fork_catchpoints).  So, it seems
	to me that the check based on target triplet at the beginning of the
	test is not needed.  This kind of gating is generally not desirable,
	because we wouldn't think of updating it when adding fork support to a
	target.  For example, FreeBSD supports fork, but it wasn't listed here.

	Change-Id: I6b55f2298edae6b37c3681fb8633d8ea1b5aabee

2021-09-27  Simon Marchi  <simon.marchi@efficios.com>

	gdb.base/foll-fork.exp: remove DUPLICATEs
	Remove DUPLICATEs, and and at the same time replace two uses of
	gdb_test_multiple with gdb_test.  I don't think using gdb_test_multiple
	is necessary here.

	Change-Id: I8dcf097c3364e92d4f0e11f0c0f05dbb88e86742

2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

	libctf, lookup: fix bounds of pptrtab lookup
	An off-by-one bug in the check for pptrtab lookup meant that we could
	access the pptrtab past its bounds (*well* past its bounds),
	particularly if we called ctf_lookup_by_name in a child dict with "*foo"
	where "foo" is a type that exists in the parent but not the child and no
	previous lookups by name have been carried out.  (Note that "*foo" is
	not even a valid thing to call ctf_lookup_by_name with: foo * is.
	Nonetheless, users sometimes do call ctf_lookup_by_name with invalid
	content, and it should return ECTF_NOTYPE, not crash.)

	ctf_pptrtab_len, as its name suggests (and as other tests of it in
	ctf-lookup.c confirm), is one higher than the maximum valid permissible
	index, so the comparison is wrong.

	(Test added, which should fail pretty reliably in the presence of this
	bug on any machine with 4KiB pages.)

	libctf/ChangeLog
	2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

		* ctf-lookup.c (ctf_lookup_by_name_internal): Fix pptrtab bounds.
		* testsuite/libctf-writable/pptrtab-writable-page-deep-lookup.*:
		New test.

2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

	libctf, testsuite: fix various warnings in tests
	These warnings are all off by default, but if they do fire you get
	spurious ERRORs when running make check-libctf.

	libctf/ChangeLog
	2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

		* testsuite/libctf-lookup/enum-symbol.c: Remove unused label.
		* testsuite/libctf-lookup/conflicting-type-syms.c: Remove unused
		variables.
		* testsuite/libctf-regression/pptrtab.c: Likewise.
		* testsuite/libctf-regression/type-add-unnamed-struct.c: Likewise.
		* testsuite/libctf-writable/pptrtab.c: Likewise.
		* testsuite/libctf-writable/reserialize-strtab-corruption.c:
		Likewise.
		* testsuite/libctf-regression/nonstatic-var-section-ld-r.c: Fix
		format string.
		* testsuite/libctf-regression/nonstatic-var-section-ld.c:
		Likewise.
		* testsuite/libctf-regression/nonstatic-var-section-ld.lk: Adjust.
		* testsuite/libctf-writable/symtypetab-nonlinker-writeout.c: Fix
		initializer.

2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

	libctf: fix handling of CTF symtypetab sections emitted by older GCC
	Older (pre-upstreaming) GCC emits a function symtypetab section of a
	format never read by any extant libctf.  We can detect such CTF dicts by
	the lack of the CTF_F_NEWFUNCINFO flag in their header, and we do so
	when reading in the symtypetab section -- but if the set of symbols with
	types is sufficiently sparse, even an older GCC will emit a function
	index section.

	In NEWFUNCINFO-capable compilers, this section will always be the exact
	same length as the corresponding function section (each is an array of
	uint32_t, associated 1:1 with each other). But this is not true for the
	older compiler, for which the sections are different lengths.  We check
	to see if the function symtypetab section and its index are the same
	length, but we fail to skip this check when this is not a NEWFUNCINFO
	dict, and emit a spurious corruption error for a CTF dict we could
	have perfectly well opened and used.

	Fix trivial: check the flag (and fix the terrible grammar of the error
	message at the same time).

	libctf/ChangeLog
	2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

		* ctf-open.c (ctf_bufopen_internal): Don't complain about corrupt
		function index symtypetab sections if this is an old-format
		function symtypetab section (which should be ignored in any case).
		Fix bad grammar.

2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

	configure: regenerate in all projects that use libtool.m4
	(including sim/, which has no changelog.)

	bfd/ChangeLog
	2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

		* configure: Regenerate.

	binutils/ChangeLog
	2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

		* configure: Regenerate.

	gas/ChangeLog
	2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

		* configure: Regenerate.

	gprof/ChangeLog
	2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

		* configure: Regenerate.

	ld/ChangeLog
	2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

		* configure: Regenerate.

	libctf/ChangeLog
	2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

		* configure: Regenerate.
		* Makefile.in: Regenerate.

	opcodes/ChangeLog
	2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

		* configure: Regenerate.

	zlib/ChangeLog
	2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

		* configure: Regenerate.

2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

	libctf: try several possibilities for linker versioning flags
	Checking for linker versioning by just grepping ld --help output for
	mentions of --version-script is inadequate now that Solaris 11.4
	implements a --version-script with different semantics.  Try linking a
	test program with a small wildcard-using version script with each
	supported set of flags in turn, to make sure that linker versioning is
	not only advertised but actually works.

	The Solaris "GNU-compatible" linker versioning is not quite
	GNU-compatible enough, but we can work around the differences by
	generating a new version script that removes the comments from the
	original (Solaris ld requires #-style comments), and making another
	version script for libctf-nonbfd in particular which doesn't mention any
	of the symbols that appear in libctf.la, to avoid Solaris ld introducing
	corresponding new NOTYPE symbols to match the version script.

	libctf/ChangeLog
	2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

		PR libctf/27967
		* configure.ac (VERSION_FLAGS): Replace with...
		(ac_cv_libctf_version_script): ... this multiple test.
		(VERSION_FLAGS_NOBFD): Substitute this too.
		* Makefile.am (libctf_nobfd_la_LDFLAGS): Use it.  Split out...
		(libctf_ldflags_nover): ... non-versioning flags here.
		(libctf_la_LDFLAGS): Use it.
		* libctf.ver: Give every symbol not in libctf-nobfd a comment on
		the same line noting as much.

2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

	libtool.m4: fix nm BSD flag detection
	Libtool needs to get BSD-format (or MS-format) output out of the system
	nm, so that it can scan generated object files for symbol names for
	-export-symbols-regex support.  Some nms need specific flags to turn on
	BSD-formatted output, so libtool checks for this in its AC_PATH_NM.
	Unfortunately the code to do this has a pair of interlocking flaws:

	 - it runs the test by doing an nm of /dev/null.  Some platforms
	   reasonably refuse to do an nm on a device file, but before now this
	   has only been worked around by assuming that the error message has a
	   specific textual form emitted by Tru64 nm, and that getting this
	   error means this is Tru64 nm and that nm -B would work to produce
	   BSD-format output, even though the test never actually got anything
	   but an error message out of nm -B.  This is fixable by nm'ing *nm
	   itself* (since we necessarily have a path to it).

	 - the test is entirely skipped if NM is set in the environment, on the
	   grounds that the user has overridden the test: but the user cannot
	   reasonably be expected to know that libtool wants not only nm but
	   also flags forcing BSD-format output.  Worse yet, one such "user" is
	   the top-level Cygnus configure script, which neither tests for
	   nor specifies any BSD-format flags.  So platforms needing BSD-format
	   flags always fail to set them when run in a Cygnus tree, breaking
	   -export-symbols-regex on such platforms.  Libtool also needs to
	   augment $LD on some platforms, but this is done unconditionally,
	   augmenting whatever the user specified: the nm check should do the
	   same.

	   One wrinkle: if the user has overridden $NM, a path might have been
	   provided: so we use the user-specified path if there was one, and
	   otherwise do the path search as usual.  (If the nm specified doesn't
	   work, this might lead to a few extra pointless path searches -- but
	   the test is going to fail anyway, so that's not a problem.)

	(Tested with NM unset, and set to nm, /usr/bin/nm, my-nm where my-nm is a
	symlink to /usr/bin/nm on the PATH, and /not-on-the-path/my-nm where
	*that* is a symlink to /usr/bin/nm.)

	ChangeLog
	2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

		PR libctf/27967
		* libtool.m4 (LT_PATH_NM): Try BSDization flags with a user-provided
		NM, if there is one.  Run nm on itself, not on /dev/null, to avoid
		errors from nms that refuse to work on non-regular files.  Remove
		other workarounds for this problem.  Strip out blank lines from the
		nm output.

2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

	libtool.m4: augment symcode for Solaris 11
	This reports common symbols like GNU nm, via a type code of 'C'.

	ChangeLog
	2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

		PR libctf/27967
		* libtool.m4 (lt_cv_sys_global_symbol_pipe): Augment symcode for
		Solaris 11.

2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

	libctf: link against libiberty before linking in libbfd or libctf-nobfd
	This ensures that the CTF_LIBADD, which always contains at least this
	when doing a shared link:

	-L`pwd`/../libiberty/pic -liberty

	appears in the link line before any requirements pulled in by libbfd.la,
	which include -liberty but because it is install-time do not include the
	-L`pwd`/../libiberty/pic portion (in an indirect dep like this, the path
	comes from the libbfd.la file, and is an install path).  libiberty also
	appears after libbfd in the link line by virtue of libctf-nobfd.la,
	because libctf-nobfd has to follow libbfd in the link line, and that
	needs symbols from libiberty too.

	Without this, an installed liberty might well be pulled in by libbfd,
	and if --enable-install-libiberty is not specified this libiberty might
	be completely incompatible with what is being installed and break either
	or boht of libbfd and libctf. (The specific problem observed here is
	that bsearch_r was not present, but other problems might easily be
	observed in future too.)

	Because ld links against libctf, this has a tendency to break the system
	linker at install time too, if installing with --prefix=/usr.  That's
	quite unpleasant to recover from.

	libctf/ChangeLog
	2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

		PR libctf/27360
		* Makefile.am (libctf_la_LIBADD): Link against libiberty
		before pulling in libbfd.la or pulling in libctf-nobfd.la.
		* Makefile.in: Regenerate.

2021-09-27  Tom de Vries  <tdevries@suse.de>

	[gdb/build] Fix build with g++-4.8
	When building g++-4.8, we run into:
	...
	src/gdb/dwarf2/read.c:919:5: error: multiple fields in union \
	  'partial_die_info::<anonymous union>' initialized
	...

	This is due to:
	...
	    union
	    {
	      struct
	      {
	       CORE_ADDR lowpc = 0;
	       CORE_ADDR highpc = 0;
	      };
	      ULONGEST ranges_offset;
	    };
	...

	The error looks incorrect, given that only one union member is initialized,
	and does not reproduce with newer g++.

	Nevertheless, work around this by moving the initialization to a constructor.

	[ I considered just removing the initialization, with the idea that access
	should be guarded by has_pc_info, but I ran into one failure in the testsuite,
	for gdb.base/check-psymtab.exp due to add_partial_symbol using lowpc without
	checking has_pc_info. ]

	Tested on x86_64-linux.

2021-09-27  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: add setting to disable reading source code files
	In some situations it is possible that a user might not want GDB to
	try and access source code files, for example, the source code might
	be stored on a slow to access network file system.

	It is almost certainly possible that using some combination of 'set
	directories' and/or 'set substitute-path' a user can trick GDB into
	being unable to find the source files, but this feels like a rather
	crude way to solve the problem.

	In this commit a new option is add that stops GDB from opening and
	reading the source files.  A user can run with source code reading
	disabled if this is required, then re-enable later if they decide
	that they now want to view the source code.

2021-09-27  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: remove duplicate cmd_list_element declarations
	For some reason we have two locations where cmd_list_elements are
	declared, cli/cli-cmds.h and gdbcmd.h.  Worse still there is
	duplication between these two locations.

	In this commit I have moved all of the cmd_list_element declarations
	from gdbcmd.h into cli/cli-cmds.h and removed the duplicates.

	There should be no user visible changes after this commit.

2021-09-27  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: prevent an assertion when computing the frame_id for an inline frame
	I ran into this assertion while GDB was trying to unwind the stack:

	  gdb/inline-frame.c:173: internal-error: void inline_frame_this_id(frame_info*, void**, frame_id*): Assertion `frame_id_p (*this_id)' failed.

	That is, when building the frame_id for an inline frame, GDB asks for
	the frame_id of the previous frame.  Unfortunately, no valid frame_id
	was returned for the previous frame, and so the assertion triggers.

	What is happening is this, I had a stack that looked something like
	this (the arrows '->' point from caller to callee):

	  normal_frame -> inline_frame

	However, for whatever reason (e.g. broken debug information, or
	corrupted stack contents in the inferior), when GDB tries to unwind
	"normal_frame", it ends up getting back effectively the same frame,
	thus the call stack looks like this to GDB:

	  .-> normal_frame -> inline_frame
	  |     |
	  '-----'

	Given such a situation we would expect GDB to terminate the stack with
	an error like this:

	  Backtrace stopped: previous frame identical to this frame (corrupt stack?)

	However, the inline_frame causes a problem, and here's why:

	When unwinding we start from the sentinel frame and call
	get_prev_frame.  We eventually end up in get_prev_frame_if_no_cycle,
	in here we create a raw frame, and as this is frame #0 we immediately
	return.

	However, eventually we will try to unwind the stack further.  When we
	do this we inevitably needing to know the frame_id for frame #0, and
	so, eventually, we end up in compute_frame_id.

	In compute_frame_id we first find the right unwinder for this frame,
	in our case (i.e. for inline_frame) the $pc is within the function
	normal_frame, but also within a block associated with the inlined
	function inline_frame, as such the inline frame unwinder claims this
	frame.

	Back in compute_frame_id we next compute the frame_id, for our
	inline_frame this means a call to inline_frame_this_id.

	The ID of an inline frame is based on the id of the previous frame, so
	from inline_frame_this_id we call get_prev_frame_always, this
	eventually calls get_prev_frame_if_no_cycle again, which creates
	another raw frame and calls compute_frame_id (for frames other than
	frame 0 we immediately compute the frame_id).

	In compute_frame_id we again identify the correct unwinder for this
	frame.  Our $pc is unchanged, however, the fact that the next frame is
	of type INLINE_FRAME prevents the inline frame unwinder from claiming
	this frame again, and so, the standard DWARF frame unwinder claims
	normal_frame.

	We return to compute_frame_id and call the standard DWARF function to
	build the frame_id for normal_frame.

	With the frame_id of normal_frame figured out we return to
	compute_frame_id, and then to get_prev_frame_if_no_cycle, where we add
	the ID for normal_frame into the frame_id cache, and return the frame
	back to inline_frame_this_id.

	From inline_frame_this_id we build a frame_id for inline_frame and
	return to compute_frame_id, and then to get_prev_frame_if_no_cycle,
	which adds the frame_id for inline_frame into the frame_id cache.

	So far, so good.

	However, as we are trying to unwind the complete stack, we eventually
	ask for the previous frame of normal_frame, remember, at this point
	GDB doesn't know the stack is corrupted (with a cycle), GDB still
	needs to figure that out.

	So, we eventually end up in get_prev_frame_if_no_cycle where we create
	a raw frame and call compute_frame_id, remember, this is for the frame
	before normal_frame.

	The first task for compute_frame_id is to find the unwinder for this
	frame, so all of the frame sniffers are tried in order, this includes
	the inline frame sniffer.

	The inline frame sniffer asks for the $pc, this request is sent up the
	stack to normal_frame, which, due to its cyclic behaviour, tells GDB
	that the $pc in the previous frame was the same as the $pc in
	normal_frame.

	GDB spots that this $pc corresponds to both the function normal_frame
	and also the inline function inline_frame.  As the next frame is not
	an INLINE_FRAME then GDB figures that we have not yet built a frame to
	cover inline_frame, and so the inline sniffer claims this new frame.
	Our stack is now looking like this:

	  inline_frame -> normal_frame -> inline_frame

	But, we have not yet computed the frame id for the outer most (on the
	left) inline_frame.  After the frame sniffer has claimed the inline
	frame GDB returns to compute_frame_id and calls inline_frame_this_id.

	In here GDB calls get_prev_frame_always, which eventually ends up
	in get_prev_frame_if_no_cycle again, where we create a raw frame and
	call compute_frame_id.

	Just like before, compute_frame_id tries to find an unwinder for this
	new frame, it sees that the $pc is within both normal_frame and
	inline_frame, but the next frame is, again, an INLINE_FRAME, so, just
	like before the standard DWARF unwinder claims this frame.  Back in
	compute_frame_id we again call the standard DWARF function to build
	the frame_id for this new copy of normal_frame.

	At this point the stack looks like this:

	  normal_frame -> inline_frame -> normal_frame -> inline_frame

	After compute_frame_id we return to get_prev_frame_if_no_cycle, where
	we try to add the frame_id for the new normal_frame into the frame_id
	cache, however, unlike before, we fail to add this frame_id as it is
	a duplicate of the previous normal_frame frame_id.  Having found a
	duplicate get_prev_frame_if_no_cycle unlinks the new frame from the
	stack, and returns nullptr, the stack now looks like this:

	  inline_frame -> normal_frame -> inline_frame

	The nullptr result from get_prev_frame_if_no_cycle is fed back to
	inline_frame_this_id, which forwards this to get_frame_id, which
	immediately returns null_frame_id.  As null_frame_id is not considered
	a valid frame_id, this is what triggers the assertion.

	In summary then:

	 - inline_frame_this_id currently assumes that as the inline frame
	   exists, we will always get a valid frame back from
	   get_prev_frame_always,

	 - get_prev_frame_if_no_cycle currently assumes that it is safe to
	   return nullptr when it sees a cycle.

	Notice that in frame.c:compute_frame_id, this code:

	  fi->this_id.value = outer_frame_id;
	  fi->unwind->this_id (fi, &fi->prologue_cache, &fi->this_id.value);
	  gdb_assert (frame_id_p (fi->this_id.value));

	The assertion makes it clear that the this_id function must always
	return a valid frame_id (e.g. null_frame_id is not a valid return
	value), and similarly in inline_frame.c:inline_frame_this_id this
	code:

	  *this_id = get_frame_id (get_prev_frame_always (this_frame));
	  /* snip comment */
	  gdb_assert (frame_id_p (*this_id));

	Makes it clear that every inline frame expects to be able to get a
	previous frame, which will have a valid frame_id.

	As I have discussed above, these assumptions don't currently hold in
	all cases.

	One possibility would be to move the call to get_prev_frame_always
	forward from inline_frame_this_id to inline_frame_sniffer, however,
	this falls foul of (in frame.c:frame_cleanup_after_sniffer) this
	assertion:

	  /* No sniffer should extend the frame chain; sniff based on what is
	     already certain.  */
	  gdb_assert (!frame->prev_p);

	This assert prohibits any sniffer from trying to get the previous
	frame, as getting the previous frame is likely to depend on the next
	frame, I can understand why this assertion is a good thing, and I'm in
	no rush to alter this rule.

	The solution proposed here takes onboard feedback from both Pedro, and
	Simon (see the links below).  The get_prev_frame_if_no_cycle function
	is renamed to get_prev_frame_maybe_check_cycle, and will now not do
	cycle detection for inline frames, even when we spot a duplicate frame
	it is still returned.  This is fine, as, if the normal frame has a
	duplicate frame-id then the inline frame will also have a duplicate
	frame-id.  And so, when we reject the inline frame, the duplicate
	normal frame, which is previous to the inline frame, will also be
	rejected.

	In inline-frame.c the call to get_prev_frame_always is no longer
	nested inside the call to get_frame_id.  There are reasons why
	get_prev_frame_always can return nullptr, for example, if there is a
	memory error while trying to get the previous frame, if this should
	happen then we now give a more informative error message.

	Historical Links:

	 Patch v2: https://sourceware.org/pipermail/gdb-patches/2021-June/180208.html
	 Feedback: https://sourceware.org/pipermail/gdb-patches/2021-July/180651.html
	           https://sourceware.org/pipermail/gdb-patches/2021-July/180663.html

	 Patch v3: https://sourceware.org/pipermail/gdb-patches/2021-July/181029.html
	 Feedback: https://sourceware.org/pipermail/gdb-patches/2021-July/181035.html

	 Additional input: https://sourceware.org/pipermail/gdb-patches/2021-September/182040.html

2021-09-27  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/dcache-flush.exp
	When running test-case gdb.base/dcache-flush.exp on ubuntu 18.04.5, I run into:
	...
	(gdb) PASS: gdb.base/dcache-flush.exp: p var2
	info dcache^M
	Dcache 4096 lines of 64 bytes each.^M
	Contains data for Thread 0x7ffff7fc6b80 (LWP 3551)^M
	Line 0: address 0x7fffffffd4c0 [47 hits]^M
	Line 1: address 0x7fffffffd500 [31 hits]^M
	Line 2: address 0x7fffffffd5c0 [7 hits]^M
	Cache state: 3 active lines, 85 hits^M
	(gdb) FAIL: gdb.base/dcache-flush.exp: check dcache before flushing
	...
	The regexp expects "Contains data for process $decimal".

	This is another case of thread_db_target::pid_to_str being used.

	Fix this by updating the regexp.

	Tested on x86_64-linux.

2021-09-27  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Test sw watchpoint in gdb.threads/process-dies-while-detaching.exp
	The test-case gdb.threads/process-dies-while-detaching.exp takes about 20s
	when using hw watchpoints, but when forcing sw watchpoints (using the patch
	mentioned in PR28375#c0), the test-case takes instead 3m14s.

	Also, it show a FAIL:
	...
	(gdb) continue^M
	Continuing.^M
	Cannot find user-level thread for LWP 10324: generic error^M
	(gdb) FAIL: gdb.threads/process-dies-while-detaching.exp: single-process:
	continue: watchpoint: continue
	...
	for which PR28375 was filed.

	Modify the test-case to:
	- add the hw/sw axis to the watchpoint testing, to ensure that we
	  observe the sw watchpoint behaviour also on can-use-hw-watchpoints
	  architectures.
	- skip the hw breakpoint testing if not supported
	- set the sw watchpoint later to avoid making the test
	  too slow.  This still triggers the same PR, but now takes just 24s.

	This patch adds a KFAIL for PR28375.

	Tested on x86_64-linux.

2021-09-27  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: fix indentation in gdbtypes.c
	Change-Id: I7bfbb9d349a1f474256800c45e28fe3b1de08771

2021-09-27  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-26  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-26  Peter Bergner  <bergner@linux.ibm.com>

	PowerPC: Enable mfppr mfppr32, mtppr and mtppr32 extended mnemonics on POWER5
	SPR 896 and the mfppr mfppr32, mtppr and mtppr32 extended mnemonics were added
	in ISA 2.03, so enable them on POWER5 and later.

	opcodes/
		* ppc-opc.c (powerpc_opcodes) <mfppr, mfppr32, mtppr, mtppr32>: Enable
		on POWER5 and later.

	gas/
		* testsuite/gas/ppc/power5.s: New test.
		* testsuite/gas/ppc/power5.d: Likewise.
		* testsuite/gas/ppc/ppc.exp: Run it.
		* testsuite/gas/ppc/power7.s: Remove tests for mfppr, mfppr32, mtppr
		and mtppr32.
		* testsuite/gas/ppc/power7.d: Likewise.

2021-09-25  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Minimize gdb restarts
	Minimize gdb restarts, applying the following rules:
	- don't use prepare_for_testing unless necessary
	- don't use clean_restart unless necessary

	Also, if possible, replace build_for_executable + clean_restart
	with prepare_for_testing for brevity.

	Touches 68 test-cases.

	Tested on x86_64-linux.

2021-09-25  Alan Modra  <amodra@gmail.com>

	PR28346, segfault attempting to disassemble raw binary
	Don't attempt to access elf_section_data for non-ELF sections.

		PR 28346
		* elf32-xtensa.c (xtensa_read_table_entries): Return zero entries
		for non-ELF.

2021-09-25  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-24  Hans-Peter Nilsson  <hp@axis.com>

	gas/testsuite/ld-elf/dwarf2-21.d: Pass -W
	Required for the expected "CU:" to be emitted for long
	source-paths.  See binutils/dwarf.c:

	 if (do_wide || strlen (directory) < 76)
	   printf (_("CU: %s/%s:\n"), directory, file_table[0].name);
	 else
	   printf ("%s:\n", file_table[0].name);

	See also commit 5f410aa50ce2c, "testsuite/ld-elf/pr26936.d:
	Pass -W."

	gas/ChangeLog:
		* testsuite/ld-elf/dwarf2-21.d: Pass -W.

2021-09-24  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: change thread_info::name to unique_xmalloc_ptr, add helper function
	This started out as changing thread_info::name to a unique_xmalloc_ptr.
	That showed that almost all users of that field had the same logic to
	get a thread's name: use thread_info::name if non-nullptr, else ask the
	target.  Factor out this logic in a new thread_name free function.  Make
	the field private (rename to m_name) and add some accessors.

	Change-Id: Iebdd95f4cd21fbefc505249bd1d05befc466a2fc

2021-09-24  Tom Tromey  <tom@tromey.com>

	Move value_true to value.h
	I noticed that value_true is declared in language.h and defined in
	language.c.  However, as part of the value API, I think it would be
	better in one of those files.  And, because it is very short, I
	changed it to be an inline function in value.h.  I've also removed a
	comment from the implementation, on the basis that it seems obsolete
	-- if the change it suggests was needed, it probably would have been
	done by now; and if it is needed in the future, odds are it would be
	done differently anyway.

	Finally, this patch also changes value_true and value_logical_not to
	return a bool, and updates some uses.

2021-09-24  Pedro Alves  <pedro@palves.net>

	Make dcache multi-target-safe
	By inspection, I noticed that this code in dcache.c is not
	multi-target-aware:

	  /* If this is a different inferior from what we've recorded,
	     flush the cache.  */

	  if (inferior_ptid != dcache->ptid)

	This doesn't take into account that threads of different targets may
	have the same ptid.

	Fixed by also storing/comparing the process_stratum_target.

	Tested on x86-64-linux-gnu, native and gdbserver.

	Change-Id: I4d9d74052c696b72d28cb1c77b697b911725c8d3

2021-09-24  Pedro Alves  <pedro@palves.net>

	Fix 'FAIL: gdb.perf/disassemble.exp: python Disassemble().run()'
	We currently have one FAIL while running "make check-perf":

	  PerfTest::assemble, run ...
	  python Disassemble().run()
	  Traceback (most recent call last):
	    File "<string>", line 1, in <module>
	    File "/home/pedro/rocm/gdb/src/gdb/testsuite/gdb.perf/lib/perftest/perftest.py", line 64, in run
	      self.warm_up()
	    File "<string>", line 25, in warm_up
	  gdb.error: No symbol "ada_evaluate_subexp" in current context.
	  Error while executing Python code.
	  (gdb) FAIL: gdb.perf/disassemble.exp: python Disassemble().run()
	  ...

	The gdb.perf/disassemble.exp testcase debugs GDB with itself, runs to
	main, and then disassembles a few GDB functions.  The problem is that
	most(!) functions it is trying to disassemble are now gone...

	This commit fixes the issue by simply picking some other functions to
	disassemble.

	It would perhaps be better to come up with some test program to
	disassemble, one that would stay the same throughout the years,
	instead of disassembling GDB itself.  I don't know why that wasn't
	done to begin with.  I'll have to leave that for another rainy day,
	though.

	gdb/testsuite/
	yyyy-mm-dd  Pedro Alves  <pedro@palves.net>

		* gdb.perf/disassemble.py (Disassemble::warm_up): Disassemble
		evaluate_subexp_do_call instead of ada_evaluate_subexp.
		(Disassemble::warm_up): Disassemble "captured_main",
		"run_inferior_call" and "update_global_location_list" instead of
		"evaluate_subexp_standard" and "c_parse_internal".

	Change-Id: I89d1cca89ce2e495dea5096e439685739cc0d3df

2021-09-24  Pedro Alves  <pedro@palves.net>

	Fix all PATH problems in testsuite/gdb.perf/
	Currently "make check-perf" triggers ~40 PATH messages in gdb.sum:

	  ...
	  PATH: gdb.perf/backtrace.exp: python sys.path.insert(0, os.path.abspath("/home/pedro/rocm/gdb/build/gdb/../../src/gdb/testsuite/gdb.perf/lib"))
	  PATH: gdb.perf/backtrace.exp: python exec (open ('/home/pedro/rocm/gdb/build/gdb/testsuite/outputs/gdb.perf/backtrace/backtrace.py').read ())
	  ...

	This commit fixes them.  E.g. before/after gdb.sum diff:

	 -PASS: gdb.perf/backtrace.exp: python import os, sys
	 -PASS: gdb.perf/backtrace.exp: python sys.path.insert(0, os.path.abspath("/home/pedro/rocm/gdb/build-master/gdb/../../src/gdb/testsuite/gdb.perf/lib"))
	 -PATH: gdb.perf/backtrace.exp: python sys.path.insert(0, os.path.abspath("/home/pedro/rocm/gdb/build-master/gdb/../../src/gdb/testsuite/gdb.perf/lib"))
	 -PASS: gdb.perf/backtrace.exp: python exec (open ('/home/pedro/rocm/gdb/build-master/gdb/testsuite/outputs/gdb.perf/backtrace/backtrace.py').read ())
	 -PATH: gdb.perf/backtrace.exp: python exec (open ('/home/pedro/rocm/gdb/build-master/gdb/testsuite/outputs/gdb.perf/backtrace/backtrace.py').read ())
	 +PASS: gdb.perf/backtrace.exp: setup perftest: python import os, sys
	 +PASS: gdb.perf/backtrace.exp: setup perftest: python sys.path.insert(0, os.path.abspath("${srcdir}/gdb.perf/lib"))
	 +PASS: gdb.perf/backtrace.exp: setup perftest: python exec (open ('${srcdir}/gdb.perf/backtrace.py').read ())

	gdb/testsuite/
	yyyy-mm-dd  Pedro Alves  <pedro@palves.net>

		* lib/perftest.exp (PerfTest::_setup_perftest): Use
		with_test_prefix.  Add explicit test names to python invocations,
		with "$srcdir" not expanded.

	Change-Id: I50a31b04b7abdea754139509e4a34ae9263118a4

2021-09-24  Pedro Alves  <pedro@palves.net>

	Fix all DUPLICATE problems in testsuite/gdb.perf/
	Currently running "make check-perf" shows:

	 ...
	 # of duplicate test names       6008
	 ...

	All those duplicate test names come from gdb.perf/skip-command.exp.
	This commit fixes them, using with_test_prefix.

	gdb/testsuite/
	yyyy-mm-dd  Pedro Alves  <pedro@palves.net>

		* gdb.perf/skip-command.exp (run_skip_bench): Wrap each for
		iteration in with_test_prefix.

	Change-Id: I38501cf70bc6b60306ee7228996ee7bcd858dc1b

2021-09-24  Tom Tromey  <tromey@adacore.com>

	Fix handling of DW_AT_data_bit_offset
	A newer version of GCC will now emit member locations using just
	DW_AT_data_bit_offset, like:

	 <3><14fe>: Abbrev Number: 1 (DW_TAG_member)
	    <14ff>   DW_AT_name        : (indirect string, offset: 0x215e): nb_bytes
	    <1503>   DW_AT_decl_file   : 1
	    <1503>   DW_AT_decl_line   : 10
	    <1504>   DW_AT_decl_column : 7
	    <1505>   DW_AT_type        : <0x150b>
	    <1509>   DW_AT_bit_size    : 31
	    <150a>   DW_AT_data_bit_offset: 64

	whereas earlier versions would emit something like:

	 <3><164f>: Abbrev Number: 7 (DW_TAG_member)
	    <1650>   DW_AT_name        : (indirect string, offset: 0x218d): nb_bytes
	    <1654>   DW_AT_decl_file   : 1
	    <1655>   DW_AT_decl_line   : 10
	    <1656>   DW_AT_decl_column : 7
	    <1657>   DW_AT_type        : <0x165f>
	    <165b>   DW_AT_byte_size   : 4
	    <165c>   DW_AT_bit_size    : 31
	    <165d>   DW_AT_bit_offset  : 1
	    <165e>   DW_AT_data_member_location: 8

	That is, DW_AT_data_member_location is not emitted any more.  This is
	a change due to the switch to DWARF 5 by default.

	This change pointed out an existing bug in gdb, namely that the
	attr_to_dynamic_prop depends on the presence of
	DW_AT_data_member_location.  This patch moves the handling of
	DW_AT_data_bit_offset into handle_data_member_location, and updates
	attr_to_dynamic_prop to handle this new case.

	A new test case is included.  This test fails with GCC 11, but passes
	with an earlier version of GCC.

2021-09-24  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Don't leave gdb instance running after function_range
	A typical dwarf assembly test-case start like this:
	...
	standard_testfile .c -debug.S

	set asm_file [standard_output_file $srcfile2]
	Dwarf::assemble $asm_file {
	  ...
	}

	if { [prepare_for_testing "failed to prepare" ${testfile} \
		  [list $srcfile $asm_file] {nodebug}] } {
	    return -1
	}
	...

	When accidentally using build_for_executable instead of
	prepare_for_testing (or intentionally using it but forgetting to add
	clean_restart $binfile or some such) the mistake may not be caught, because
	another gdb instance is still running, and we may silently end up testing
	compiler-generated DWARF.

	This can be caused by something relatively obvious, like an earlier
	prepare_for_testing or clean_restart, but also by something more obscure like
	function_range, which may even be triggered by dwarf assembly like this:
	...
	  {MACRO_AT_func {main}}
	...

	Fix this by calling gdb_exit at the end of function_range.

	Also fix the fallout of that in test-case gdb.dwarf2/dw2-bad-elf.exp, where a
	get_sizeof call used the gdb instance left lingering by function_range.

	[ A better and more complete fix would add a new proc get_exec_info, that would
	be called at the start of the dwarf assembly body:
	...
	Dwarf::assemble $asm_file {
	  get_exec_info {main foo} {int void*}
	...
	that would:
	- do a prepare_for_testing with $srcfile (roughtly equivalent to what
	  MACRO_AT_func does,
	- call function_range for all functions main and foo, without starting a
	  new gdb instance
	- set corresponding variables at the call-site: main_start, main_len,
	  main_end, foo_start, foo_len, foo_end.
	- get size for types int and void*
	- set corresponding variables at the call-site: int_size, void_ptr_size.
	- do a gdb_exit. ]

	Tested on x86_64-linux.

2021-09-24  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Use pie instead of -fpie/-pie
	I noticed two test-cases where -fpie is used.  Using the canonical pie option
	will usually get one -fPIE instead.

	That choice is justified here in gdb_compile:
	...
	  # For safety, use fPIE rather than fpie. On AArch64, m68k, PowerPC
	  # and SPARC, fpie can cause compile errors due to the GOT exceeding
	  # a maximum size.  On other architectures the two flags are
	  # identical (see the GCC manual). Note Debian9 and Ubuntu16.10
	  # onwards default GCC to using fPIE.  If you do require fpie, then
	  # it can be set using the pie_flag.
	  set flag "additional_flags=-fPIE"
	...

	There is no indication that using -fpie rather than -fPIE is on purpose, so
	use pie instead.

	Tested on x86_64-linux.

2021-09-24  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Factor out dump_info in gdb.testsuite/dump-system-info.exp
	Factor out new proc dump_info in test-case gdb.testsuite/dump-system-info.exp,
	and in the process:
	- fix a few typos
	- remove unnecessary "test -r /proc/cpuinfo"

	Tested on x86_64-linux.

	Co-Authored-By: Pedro Alves <pedro@palves.net>

2021-09-24  Pedro Alves  <pedro@palves.net>

	gdb/testsuite: Make it possible to use TCL variables in DWARF assembler loclists
	It is currently not possible to use variables in locations lists.  For
	example, with:

	  diff --git a/gdb/testsuite/gdb.dwarf2/loclists-multiple-cus.exp b/gdb/testsuite/gdb.dwarf2/loclists-multiple-cus.exp
	  index 6b4f5c8cbb8..cdbf948619f 100644
	  --- a/gdb/testsuite/gdb.dwarf2/loclists-multiple-cus.exp
	  +++ b/gdb/testsuite/gdb.dwarf2/loclists-multiple-cus.exp
	  @@ -30,6 +30,8 @@ if {![dwarf2_support]} {
	       return 0
	   }

	  +set myconst 0x123456
	  +
	   # Test with 32-bit and 64-bit DWARF.
	   foreach_with_prefix is_64 {false true} {
	       if { $is_64 } {
	  @@ -49,6 +51,7 @@ foreach_with_prefix is_64 {false true} {
		  global func1_addr func1_len
		  global func2_addr func2_len
		  global is_64
	  +       global myconst

		  # The CU uses the DW_FORM_loclistx form to refer to the .debug_loclists
		  # section.
	  @@ -107,7 +110,7 @@ foreach_with_prefix is_64 {false true} {
			  list_ {
			      # When in func1.
			      start_length $func1_addr $func1_len {
	  -                       DW_OP_constu 0x123456
	  +                       DW_OP_constu $myconst
				  DW_OP_stack_value
			      }

	we get:

	  $ make check TESTS="*/loclists-multiple-cus.exp"
	  ...
	  gdb compile failed, build/gdb/testsuite/outputs/gdb.dwarf2/loclists-multiple-cus/loclists-multiple-cus-dw32.S: Assembler messages:
	  build/gdb/testsuite/outputs/gdb.dwarf2/loclists-multiple-cus/loclists-multiple-cus-dw32.S:78: Error: leb128 operand is an undefined symbol: $myconst
	  ...

	That means $myconst was copied literally to the generated assembly
	file.

	This patch fixes it, by running subst on the location list body, in
	the context of the caller.  The fix is applied to both
	Dwarf::loclists::table::list_::start_length and
	Dwarf::loclists::table::list_::start_end.

	Reported-by: Zoran Zaric <Zoran.Zaric@amd.com>

	Change-Id: I615a64431857242d9f477d5699e3732df1b31322

2021-09-24  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix DUPLICATEs in gdb.dwarf2/implptr-64bit.exp
	When running test-case gdb.dwarf2/implptr-64bit.exp with target board
	unix/-m32, I noticed:
	...
	DUPLICATE: gdb.dwarf2/implptr-64bit.exp: failed to prepare
	...

	Fix this by using with_test_prefix.

	Tested on x86_64-linux.

2021-09-24  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix DUPLICATEs gdb.dwarf2/dw2-is-stmt.exp
	Fix these DUPLICATEs by using with_test_prefix:
	...
	DUPLICATE: gdb.dwarf2/dw2-is-stmt.exp: ensure we saw a valid line pattern, 1
	DUPLICATE: gdb.dwarf2/dw2-is-stmt.exp: ensure we saw a valid line pattern, 2
	...

	Tested on x86_64-linux.

2021-09-24  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix set $var val in gdb.dwarf2/dw2-is-stmt.exp
	When doing a testrun with:
	...
	$ make check RUNTESTFLAGS=$(cd $src/gdb/testsuite/; echo gdb.dwarf2/*.exp)
	...
	I ran into:
	...
	ERROR: tcl error sourcing gdb.dwarf2/dw2-is-stmt.exp.
	ERROR: expected integer but got "dw2-abs-hi-pc-world.c"
	    while executing
	"incr i"
	...

	The variable i is set in gdb.dwarf2/dw2-abs-hi-pc.exp, and leaks to
	gdb.dwarf2/dw2-is-stmt.exp.  It's not removed by gdb_cleanup_globals because i
	is set as global variable by runtest.exp, which does:
	...
	for { set i 0 } { $i < $argc } { incr i } {
	...
	at toplevel but forgets to unset the variable.

	Fix this by removing '$' in front of the variable name when doing set:
	...
	-set $i 0
	+set i 0
	...

	Tested on x86_64-linux.

2021-09-24  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix DUPLICATE in gdb.base/load-command.exp
	Fix this duplicate:
	...
	DUPLICATE: gdb.base/load-command.exp: check initial value of the_variable
	...
	by using with_test_prefix.

	Tested on x86_64-linux.

2021-09-24  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Use pie/nopie instead of ldflags=-pie/-no-pie
	I noticed two test-case that use ldflags=-pie and ldflags-no-pie, instead of
	the canonical pie and nopie options, which would typically also add
	additional_flags=-fPIE respectively additional_flags=-fno-pie.

	There is no indication that this is on purpose, so replace these with pie and
	nopie.

	Tested on x86_64-linux.

2021-09-24  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add gdb.testsuite/dump-system-info.exp
	When interpreting the testsuite results, it's often relevant what kind of
	machine the testsuite ran on.  On a local machine one can just do
	/proc/cpuinfo, but in case of running tests using a remote system
	that distributes test runs to other remote systems that are not directly
	accessible, that's not possible.

	Fix this by dumping /proc/cpuinfo into the gdb.log, as well as lsb_release -a
	and uname -a.

	We could do this at the start of each test run, by putting it into unix.exp
	or some such.  However, this might be too verbose, so we choose to put it into
	its own test-case, such that it get triggered in a full testrun, but not when
	running one or a subset of tests.

	We put the test-case into the gdb.testsuite directory, which is currently the
	only place in the testsuite where we do not test gdb.   [ Though perhaps this
	could be put into a new gdb.info directory, since the test-case doesn't
	actually test the testsuite. ]

	Tested on x86_64-linux.

2021-09-24  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-23  Tom Tromey  <tom@tromey.com>

	Change pointer_type to a method of struct type
	I noticed that pointer_type is declared in language.h and defined in
	language.c.  However, it really has to do with types, so it should
	have been in gdbtypes.h all along.

	This patch changes it to be a method on struct type.  And, I went
	through uses of TYPE_IS_REFERENCE and updated many spots to use the
	new method as well.  (I didn't update ones that were in arch-specific
	code, as I couldn't readily test that.)

2021-09-23  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Support -fPIE/-fno-PIE/-pie/-no-pie in gdb_compile_rust
	When running gdb.rust/*.exp test-cases with target board unix/-fPIE/-pie, I
	run into:
	...
	builtin_spawn -ignore SIGHUP rustc --color never gdb.rust/watch.rs \
	  -g -lm -fPIE -pie -o outputs/gdb.rust/watch/watch^M
	error: Unrecognized option: 'f'^M
	^M
	compiler exited with status 1
	...

	The problem is that -fPIE and -fpie are gcc options, but for rust we use
	rustc, which has different compilation options.

	Fix this by translating the gcc options to rustc options in gdb_compile_rust,
	similar to how that is done for ada in target_compile_ada_from_dir.

	Likewise for unix/-fno-PIE/-no-pie.

	Tested on x86_64-linux, with:
	- native
	- unix/-fPIE/-pie
	- unix/-fno-PIE/-no-pie
	specifically, on openSUSE Leap 15.2 both with package gcc-PIE:
	- installed (making gcc default to PIE)
	- uninstalled (making gcc default to non-PIE).
	and rustc 1.52.1.

2021-09-23  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Use pie instead of -fPIE -pie
	Replace {additional_flags=-fPIE ldflags=-pie} with {pie}.

	This makes sure that the test-cases properly error out when using target board
	unix/-fno-PIE/-no-pie.

	Tested on x86_64-linux.

2021-09-23  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix probe test in gdb.base/break-interp.exp
	When running test-case gdb.base/break-interp.exp on ubuntu 18.04.5, we have:
	...
	 (gdb) bt^M
	 #0  0x00007eff7ad5ae12 in ?? () from break-interp-LDprelinkNOdebugNO^M
	 #1  0x00007eff7ad71f50 in ?? () from break-interp-LDprelinkNOdebugNO^M
	 #2  0x00007eff7ad59128 in ?? () from break-interp-LDprelinkNOdebugNO^M
	 #3  0x00007eff7ad58098 in ?? () from break-interp-LDprelinkNOdebugNO^M
	 #4  0x0000000000000002 in ?? ()^M
	 #5  0x00007fff505d7a32 in ?? ()^M
	 #6  0x00007fff505d7a94 in ?? ()^M
	 #7  0x0000000000000000 in ?? ()^M
	 (gdb) FAIL: gdb.base/break-interp.exp: ldprelink=NO: ldsepdebug=NO: \
	         first backtrace: dl bt
	...

	Using the backtrace, the test-case tries to establish that we're stopped in
	dl_main.

	However, the backtrace only shows an address, because:
	- the dynamic linker contains no minimal symbols and no debug info, and
	- gdb is build without --with-separate-debug-dir so it can't find the
	  corresponding .debug file, which does contain the mimimal symbols and
	  debug info.

	As in "[gdb/testsuite] Improve probe detection in gdb.base/break-probes.exp",
	fix this by doing info probes and grepping for the address.

	Tested on x86_64-linux.

2021-09-23  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Improve probe detection in gdb.base/break-probes.exp
	When running test-case gdb.base/break-probes.exp on ubuntu 18.04.5, we have:
	...
	 (gdb) run^M
	 Starting program: break-probes^M
	 Stopped due to shared library event (no libraries added or removed)^M
	 (gdb) bt^M
	 #0  0x00007ffff7dd6e12 in ?? () from /lib64/ld-linux-x86-64.so.2^M
	 #1  0x00007ffff7dedf50 in ?? () from /lib64/ld-linux-x86-64.so.2^M
	 #2  0x00007ffff7dd5128 in ?? () from /lib64/ld-linux-x86-64.so.2^M
	 #3  0x00007ffff7dd4098 in ?? () from /lib64/ld-linux-x86-64.so.2^M
	 #4  0x0000000000000001 in ?? ()^M
	 #5  0x00007fffffffdaac in ?? ()^M
	 #6  0x0000000000000000 in ?? ()^M
	 (gdb) UNSUPPORTED: gdb.base/break-probes.exp: probes not present on this system
	...

	Using the backtrace, the test-case tries to establish that we're stopped in
	dl_main, which is used as proof that we're using probes.

	However, the backtrace only shows an address, because:
	- the dynamic linker contains no minimal symbols and no debug info, and
	- gdb is build without --with-separate-debug-dir so it can't find the
	  corresponding .debug file, which does contain the mimimal symbols and
	  debug info.

	Fix this by instead printing the pc and grepping for the value in the
	info probes output:
	...
	(gdb) p /x $pc^M
	$1 = 0x7ffff7dd6e12^M
	(gdb) info probes^M
	Type Provider Name           Where              Object                      ^M
	  ...
	stap rtld     init_start     0x00007ffff7dd6e12 /lib64/ld-linux-x86-64.so.2 ^M
	  ...
	(gdb)
	...

	Tested on x86_64-linux.

2021-09-23  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Handle failing probe detection in gdb.base/break-probes.exp
	When running test-case gdb.base/break-probes.exp on ubuntu 18.04.5, we have:
	...
	 (gdb) bt^M
	 #0  0x00007ffff7dd6e12 in ?? () from /lib64/ld-linux-x86-64.so.2^M
	 #1  0x00007ffff7dedf50 in ?? () from /lib64/ld-linux-x86-64.so.2^M
	 #2  0x00007ffff7dd5128 in ?? () from /lib64/ld-linux-x86-64.so.2^M
	 #3  0x00007ffff7dd4098 in ?? () from /lib64/ld-linux-x86-64.so.2^M
	 #4  0x0000000000000001 in ?? ()^M
	 #5  0x00007fffffffdaac in ?? ()^M
	 #6  0x0000000000000000 in ?? ()^M
	 (gdb) FAIL: gdb.base/break-probes.exp: ensure using probes
	...

	The test-case intends to emit an UNTESTED in this case, but fails to do so
	because it tries to do it in a regexp clause in a gdb_test_multiple, which
	doesn't trigger.  Instead, a default clause triggers which produces the FAIL.

	Also the use of UNTESTED is not appropriate, and we should use UNSUPPORTED
	instead.

	Fix this by silencing the FAIL, and emitting an UNSUPPORTED after the
	gdb_test_multiple:
	...
	 if { ! $using_probes } {
	+    unsupported "probes not present on this system"
	     return -1
	 }
	...

	Tested on x86_64-linux.

2021-09-23  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Use early-out style in gdb.base/break-probes.exp
	Reduce indentation and improve readability in test-case
	gdb.base/break-probes.exp by replacing:
	...
	if { <cond> } {
	  <lots-of-code>
	}
	...
	with:
	...
	if { ! <cond> } {
	  return -1
	}
	<lots-of-code>
	...

	Tested on x86_64-linux.

2021-09-23  Pedro Alves  <pedro@palves.net>

	Test that frame info/IDs are stable/consistent
	This adds a testcase that tests that the unwinder produces consistent
	frame info and frame IDs by making sure that "info frame" shows the
	same result when stopped at a function (level == 0), compared to when
	we find the same frame in the stack at a level > 0.

	E.g., on x86-64, right after running to main, we see:

	  (gdb) info frame
	  Stack level 0, frame at 0x7fffffffd340:
	   rip = 0x555555555168 in main (gdb.base/backtrace.c:41); saved rip = 0x7ffff7dd90b3
	   source language c.
	   Arglist at 0x7fffffffd330, args:
	   Locals at 0x7fffffffd330, Previous frame's sp is 0x7fffffffd340
	   Saved registers:
	    rbp at 0x7fffffffd330, rip at 0x7fffffffd338
	  (gdb)

	and then after continuing to a function called by main, and selecting
	the "main" frame again, we see:

	  (gdb) info frame
	  Stack level 3, frame at 0x7fffffffd340:
	   rip = 0x555555555172 in main (gdb.base/backtrace.c:41); saved rip = 0x7ffff7dd90b3
	   caller of frame at 0x7fffffffd330
	   source language c.
	   Arglist at 0x7fffffffd330, args:
	   Locals at 0x7fffffffd330, Previous frame's sp is 0x7fffffffd340
	   Saved registers:
	    rbp at 0x7fffffffd330, rip at 0x7fffffffd338
	  (gdb)

	The only differences should be in the stack level, the 'rip = '
	address, and the presence of the "caller of frame at" info.  All the
	rest should be the same.  If it isn't, it probably means that the
	frame base, the frame ID, etc. aren't stable & consistent.

	The testcase exercises both the DWARF and the heuristic unwinders,
	using "maint set dwarf unwinder on/off".

	Tested on {x86-64 -m64, x86-64 -m32, Aarch64, Power8} GNU/Linux.

	Change-Id: I795001c82cc70d543d197415e3f80ce5dc7f3452

2021-09-23  Tom Tromey  <tromey@adacore.com>

	Change get_ada_task_ptid parameter type
	get_ada_task_ptid currently takes a 'long' as its 'thread' parameter
	type.  However, on some platforms this is actually a pointer, and
	using 'long' can sometimes end up with the value being sign-extended.
	This sign extension can cause problems later, if the tid is then later
	used as an address again.

	This patch changes the parameter type to ULONGEST and updates all the
	uses.  This approach preserves sign extension on the targets where it
	is apparently intended, while avoiding it on others.

	Co-Authored-By: John Baldwin <jhb@FreeBSD.org>

2021-09-23  Tom Tromey  <tromey@adacore.com>

	Change ptid_t::tid to ULONGEST
	The ptid_t 'tid' member is normally used as an address in gdb -- both
	bsd-uthread and ravenscar-thread use it this way.  However, because
	the type is 'long', this can cause problems with sign extension.

	This patch changes the type to ULONGEST to ensure that sign extension
	does not occur.

2021-09-23  Tom Tromey  <tromey@adacore.com>

	Remove defaulted 'tid' parameter to ptid_t constructor
	I wanted to find, and potentially modify, all the spots where the
	'tid' parameter to the ptid_t constructor was used.  So, I temporarily
	removed this parameter and then rebuilt.

	In order to make it simpler to search through the "real" (nonzero)
	uses of this parameter, something I knew I'd have to do multiple
	times, I removed any ", 0" from constructor calls.

	Co-Authored-By: John Baldwin <jhb@FreeBSD.org>

2021-09-23  Tom Tromey  <tom@tromey.com>

	Style the "XXX" text in ptype/o
	This patch changes gdb to use the 'highlight' style on the "XXX" text
	in the output of ptype/o.

2021-09-23  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-22  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.python/py-events.exp
	With test-case gdb.python/py-events.exp on ubuntu 18.04.5 we run into:
	...
	(gdb) info threads^M
	  Id   Target Id                                     Frame ^M
	* 1    Thread 0x7ffff7fc3740 (LWP 31467) "py-events" do_nothing () at \
	         src/gdb/testsuite/gdb.python/py-events-shlib.c:19^M
	(gdb) FAIL: gdb.python/py-events.exp: get current thread
	...

	The info thread commands uses "Thread" instead of "process" because
	libpthread is already loaded:
	...
	new objfile name: /lib/x86_64-linux-gnu/libdl.so.2^M
	[Thread debugging using libthread_db enabled]^M
	Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".^M
	event type: new_objfile^M
	new objfile name: /lib/x86_64-linux-gnu/libpthread.so.0^M
	...
	and consequently thread_db_target::pid_to_str is used.

	Fix this by parsing the "Thread" expression.

	Tested on x86_64-linux.

2021-09-22  Tom de Vries  <tdevries@suse.de>

	[gdb] Add maint selftest -verbose option
	The print_one_insn selftest in gdb/disasm-selftests.c contains:
	...
	  /* If you want to see the disassembled instruction printed to gdb_stdout,
	     set verbose to true.  */
	  static const bool verbose = false;
	...

	Make this parameter available in the maint selftest command using a new option
	-verbose, such that we can do:
	...
	(gdb) maint selftest -verbose print_one_insn
	...

	Tested on x86_64-linux.

2021-09-22  Alan Modra  <amodra@gmail.com>

	dwarf2 sub-section test
	This is a testcase for the bug fixed by commit 5b4846283c3d.  When
	running the testcase on ia64 targets I found timeouts along with lots
	of memory being consumed, due to ia64 gas not tracking text
	sub-sections.  Trying to add nops for ".nop 16" in ".text 1" resulting
	in them being added to subsegment 0, with no increase to subsegment 1
	size.  This patch also fixes that problem.

	Note that the testcase fails on ft32-elf, mn10200-elf, score-elf,
	tic5x-elf, and xtensa-elf.  The first two are relocation errors, the
	last three appear to be the .nop directive failing to emit the right
	number of nops.  I didn't XFAIL any of them.

		* config/tc-ia64.c (md): Add last_text_subseg.
		(ia64_flush_insns, dot_endp): Use last_text_subseg.
		(ia64_frob_label, md_assemble): Set last_text_subseg.
		* testsuite/gas/elf/dwarf2-21.d,
		* testsuite/gas/elf/dwarf2-21.s: New test.
		* testsuite/gas/elf/elf.exp: Run it.

2021-09-22  Alan Modra  <amodra@gmail.com>

	Fix x86 "FAIL: TLS -fno-pic -shared"
	Fix a typo in commit 5d0869d9872a

		* testsuite/ld-i386/tlsnopic.rd: Typo fix.

2021-09-22  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-21  Nick Clifton  <nickc@redhat.com>

	Change the linker's heuristic for computing the entry point for binaries so that shared libraries default to an entry point of 0.
		* ldlang.c (lang_end): When computing the entry point, only
		try the start address of the entry section when creating an
		executable.
		* ld.texi (Entry point): Update description of heuristic used to
		choose the entry point.
		testsuite/ld-alpha/tlspic.rd: Update expected entry point address.
		testsuite/ld-arm/tls-gdesc-got.d: Likewise.
		testsuite/ld-i386/tlsnopic.rd: Likewise.
		testsuite/ld-ia64/tlspic.rd: Likewise.
		testsuite/ld-sparc/gotop32.rd: Likewise.
		testsuite/ld-sparc/gotop64.rd: Likewise.
		testsuite/ld-sparc/tlssunnopic32.rd: Likewise.
		testsuite/ld-sparc/tlssunnopic64.rd: Likewise.
		testsuite/ld-sparc/tlssunpic32.rd: Likewise.
		testsuite/ld-sparc/tlssunpic64.rd: Likewise.
		testsuite/ld-tic6x/shlib-1.rd: Likewise.
		testsuite/ld-tic6x/shlib-1b.rd: Likewise.
		testsuite/ld-tic6x/shlib-1r.rd: Likewise.
		testsuite/ld-tic6x/shlib-1rb.rd: Likewise.
		testsuite/ld-tic6x/shlib-noindex.rd: Likewise.
		testsuite/ld-x86-64/pr14207.d: Likewise.
		testsuite/ld-x86-64/tlsdesc.rd: Likewise.
		testsuite/ld-x86-64/tlspic.rd: Likewise.
		testsuite/ld-x86-64/tlspic2.rd: Likewise.

2021-09-21  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Handle supports_memtag in gdb.base/gdb-caching-proc.exp
	In test-case gdb.base/gdb-caching-proc.exp, we run all procs declared with
	gdb_caching_proc.  Some of these require a gdb instance, some not.

	We could just do a clean_restart every time, but that would amount to 44 gdb
	restarts.  We try to minimize this by doing this only for the few procs that
	need it, and hardcoding those in the test-case.

	For those procs, we do a clean_restart, execute the proc, and then do a
	gdb_exit, to make sure the gdb instance doesn't linger such that we detect
	procs that need a gdb instance but are not listed in the test-case.

	However, that doesn't work in the case of gnat_runtime_has_debug_info.  This
	proc doesn't require a gdb instance because it starts its own.  But it doesn't
	clean up the gdb instance, and since it's not listed, the test-case
	doesn't clean up the gdb instance eiter.  Consequently, the proc
	supports_memtag (which should be listed, but isn't) uses the gdb instance
	started by gnat_runtime_has_debug_info rather than throwing an error.  Well,
	unless gnat_runtime_has_debug_info fails before starting a gdb instance, in
	which case we do run into the error.

	Fix this by:
	- doing gdb_exit unconditionally
	- fixing the resulting error by adding supports_memtag in the test-case to
	  the "needing gdb instance" list

	Tested on x86_64-linux.

2021-09-21  Felix Willgerodt  <felix.willgerodt@intel.com>

	gdb, doc: Add ieee_half and bfloat16 to list of predefined target types.
	For some reason these two weren't added to the list when they were orginally
	added to GDB.

	gdb/doc/ChangeLog:
	2021-09-21  Felix Willgerodt  <felix.willgerodt@intel.com>

		* gdb.texinfo (Predefined Target Types): Mention ieee_half and bfloat16.

2021-09-21  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-20  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.ada/interface.exp with gcc-9
	When running test-case gdb.ada/interface.exp with gcc-9, we run into:
	...
	(gdb) info locals^M
	s = (x => 1, y => 2, w => 3, h => 4)^M
	r = (x => 1, y => 2, w => 3, h => 4)^M
	(gdb) FAIL: gdb.ada/interface.exp: info locals
	...

	The failure is caused by the regexp expecting variable r followed by
	variable s.

	Fix this by allowing variable s followed by variable r as well.

	Tested on x86_64-linux.

2021-09-20  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.ada/mi_prot.exp
	When running test-case gdb.ada/mi_prot.exp with gcc 8.5.0, we run into:
	...
	(gdb) ^M
	Expecting: ^(-stack-list-arguments --no-frame-filters 1[^M
	]+)?(\^done,stack=.*[^M
	]+[(]gdb[)] ^M
	[ ]*)
	-stack-list-arguments --no-frame-filters 1^M
	^done,stack-args=[frame={level="0",args=[{name="<_object>",value="(ceiling_priority =\
	> 97, local => 0)"},{name="v",value="5"},{name="<_objectO>",value="true"}]},frame={le\
	vel="1",args=[{name="v",value="5"},{name="<_objectO>",value="true"}]},frame={level="2\
	",args=[]}]^M
	(gdb) ^M
	FAIL: gdb.ada/mi_prot.exp: -stack-list-arguments --no-frame-filters 1 (unexpected out\
	put)
	...

	Fix this by updating the regexp to expect "^done,stack-args=" instead of
	"^done,stack=".

	Tested on x86_64-linux.

2021-09-20  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Register test for each arch separately in register_test_foreach_arch
	In gdb/disasm-selftests.c we have:
	...
	  selftests::register_test_foreach_arch ("print_one_insn",
	                                         selftests::print_one_insn_test);
	...
	and we get:
	...
	$ gdb -q -batch -ex "maint selftest print_one_insn" 2>&1 \
	  | grep ^Running
	Running selftest print_one_insn.
	$
	...

	Change the semantics register_test_foreach_arch such that a version of
	print_one_insn is registered for each architecture, such that we have:
	...
	$ gdb -q -batch -ex "maint selftest print_one_insn" 2>&1 \
	  | grep ^Running
	Running selftest print_one_insn::A6.
	Running selftest print_one_insn::A7.
	Running selftest print_one_insn::ARC600.
	  ...
	$
	...

	This makes it f.i. possible to do:
	...
	$ gdb -q -batch a.out -ex "maint selftest print_one_insn::armv8.1-m.main"
	Running selftest print_one_insn::armv8.1-m.main.
	Self test failed: self-test failed at src/gdb/disasm-selftests.c:165
	Ran 1 unit tests, 1 failed
	...

	Tested on x86_64-linux with an --enable-targets=all build.

2021-09-20  Tom de Vries  <tdevries@suse.de>

	[gdb] Change register_test to use std::function arg
	Change register_test to use std::function arg, such that we can do:
	...
	  register_test (test_name, [=] () { SELF_CHECK (...); });
	...

	Tested on x86_64-linux.

2021-09-20  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.ada/big_packed_array.exp xfail for -m32
	With test-case gdb.ada/big_packed_array.exp and target board unix/-m32 I run
	into:
	...
	(gdb) print bad^M
	$2 = (0 => 0 <repeats 24 times>, 160)^M
	(gdb) FAIL: gdb.ada/big_packed_array.exp: scenario=minimal: print bad
	...

	The problem is that while the variable is an array of 196 bits (== 24.5 bytes),
	the debug information describes it as 25 unsigned char.  This is PR
	gcc/101643, and the test-case contains an xfail for this, which catches only:
	...
	(gdb) print bad^M
	$2 = (0 => 0 <repeats 25 times>)^M
	...

	Fix this by updating the xfail pattern.

	Tested on x86_64-linux.

2021-09-20  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbsupport/gdb_proc_service.h: use decltype instead of typeof
	Bug 28341 shows that GDB fails to compile when built with -std=c++11.
	I don't know much about the use case, but according to the author of the
	bug:

	    I encountered the scenario where CXX is set to "g++ -std=c++11" when
	    I try to compile binutils under GCC as part of the GCC 3-stage
	    compilation, which is common for building a cross-compiler.

	The author of the bug suggests using __typeof__ instead of typeof.  But
	since we're using C++, we might as well use decltype, which is standard.
	This is what this patch does.

	The failure (and fix) can be observed by configuring GDB with CXX="g++
	-std=c++11":

	      CXX    linux-low.o
	    In file included from /home/simark/src/binutils-gdb/gdbserver/gdb_proc_service.h:22,
			     from /home/simark/src/binutils-gdb/gdbserver/linux-low.h:27,
			     from /home/simark/src/binutils-gdb/gdbserver/linux-low.cc:20:
	    /home/simark/src/binutils-gdb/gdbserver/../gdbsupport/gdb_proc_service.h:177:50: error: expected constructor, destructor, or type conversion before (token
	      177 |   __attribute__((visibility ("default"))) typeof (SYM) SYM
		  |                                                  ^
	    /home/simark/src/binutils-gdb/gdbserver/../gdbsupport/gdb_proc_service.h:179:1: note: in expansion of macro PS_EXPORT
	      179 | PS_EXPORT (ps_get_thread_area);
		  | ^~~~~~~~~

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28341
	Change-Id: I84fbaae938209d8d935ca08dec9b7e6a0dd1bda0

2021-09-20  Andrew Burgess  <andrew.burgess@embecosm.com>

	riscv: print .2byte or .4byte before an unknown instruction encoding
	When the RISC-V disassembler encounters an unknown instruction, it
	currently just prints the value of the bytes, like this:

	  Dump of assembler code for function custom_insn:
	     0x00010132 <+0>:	addi	sp,sp,-16
	     0x00010134 <+2>:	sw	s0,12(sp)
	     0x00010136 <+4>:	addi	s0,sp,16
	     0x00010138 <+6>:	0x52018b
	     0x0001013c <+10>:	0x9c45

	My proposal, in this patch, is to change the behaviour to this:

	  Dump of assembler code for function custom_insn:
	     0x00010132 <+0>:	addi	sp,sp,-16
	     0x00010134 <+2>:	sw	s0,12(sp)
	     0x00010136 <+4>:	addi	s0,sp,16
	     0x00010138 <+6>:	.4byte	0x52018b
	     0x0001013c <+10>:	.2byte	0x9c45

	Adding the .4byte and .2byte opcodes.  The benefit that I see here is
	that in the patched version of the tools, the disassembler output can
	be fed back into the assembler and it should assemble to the same
	binary format.  Before the patch, the disassembler output is invalid
	assembly.

	I've started a RISC-V specific test file under binutils so that I can
	add a test for this change.

	binutils/ChangeLog:

		* testsuite/binutils-all/riscv/riscv.exp: New file.
		* testsuite/binutils-all/riscv/unknown.d: New file.
		* testsuite/binutils-all/riscv/unknown.s: New file.

	opcodes/ChangeLog:

		* riscv-dis.c (riscv_disassemble_insn): Print a .%dbyte opcode
		before an unknown instruction, '%d' is replaced with the
		instruction length.

2021-09-20  Alan Modra  <amodra@gmail.com>

	Fix allocate_filenum last dir/file checks
		* dwarf2dbg.c (allocate_filenum) Correct use of last_used_dir_len.

2021-09-20  Alan Modra  <amodra@gmail.com>

	Re: PR28149, debug info with wrong file association
	Fixes segfaults when building aarch64-linux kernel, due to only doing
	part of the work necessary when allocating file numbers late.  I'd
	missed looping over subsegments, which resulted in some u.filename
	entries left around and later interpreted as u.view.

		PR 28149
		* dwarf2dbg.c (purge_generated_debug): Iterate over subsegs too.
		(dwarf2_finish): Call do_allocate_filenum for all subsegs too,
		in a separate loop before subsegs are chained.

2021-09-20  Alan Modra  <amodra@gmail.com>

	Move eelf_mipsel_haiki.c to ALL_64_EMULATION_SOURCES
	--enable-targets=all on a 32-bit host results in a link failure with
	undefined references due to elfxx-mips.c not being compiled.  This
	patch fixes that by putting eelf_mipsel_haiki.c in the correct
	EMULATION_SOURCES Makefile variable.  I've also added a bunch of
	missing file dependencies and sorted a few things so that it's easier
	to verify dependencies are present.

		* Makfile.am: Add missing haiku dependencies, sort.
		(ALL_EMULATION_SOURCES): Sort.  Move eelf_mipsel_haiku.c to..
		(ALL_64_EMULATION_SOURCES): ..here.  Sort.
		* Makfile.in: Regenerate.

2021-09-20  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-19  H.J. Lu  <hjl.tools@gmail.com>

	elf: Don't set version info on unversioned symbols
	Don't set version info on unversioned symbols when seeing a hidden
	versioned symbol after an unversioned definition and the default
	versioned symbol.

	bfd/

		PR ld/28348
		* elflink.c (elf_link_add_object_symbols): Don't set version info
		on unversioned symbols.

	ld/

		PR ld/28348
		* testsuite/ld-elf/pr28348.rd: New file.
		* testsuite/ld-elf/pr28348.t: Likewise.
		* testsuite/ld-elf/pr28348a.c: Likewise.
		* testsuite/ld-elf/pr28348b.c: Likewise.
		* testsuite/ld-elf/pr28348c.c: Likewise.
		* testsuite/ld-elf/shared.exp: Run PR ld/28348 tests.

2021-09-19  Mike Frysinger  <vapier@gentoo.org>

	gdb: manual: update @inforef to @xref
	The @inforef command is deprecated, and @xref does the samething.
	Also had to update the text capitalization to match current manual.
	Verified that info & HTML links work.

2021-09-19  Weimin Pan  <weimin.pan@oracle.com>

	CTF: multi-CU and archive support
	Now gdb is capable of debugging executable, which consists of multiple
	compilation units (CUs) with the CTF debug info. An executable could
	potentially have one or more archives, which, in CTF context, contain
	conflicting types.

	all changes were made in ctfread.c in which elfctf_build_psymtabs was
	modified to handle archives, via the ctf archive iterator and its callback
	build_ctf_archive_member and scan_partial_symbols was modified to scan
	archives, which are treated as subfiles, to build the psymtabs.

	Also changes were made to handle CTF's data object section and function
	info section which now share the same format of their contents - an array
	of type IDs. New functions ctf_psymtab_add_stt_entries, which is called by
	ctf_psymtab_add_stt_obj and ctf_psymtab_add_stt_func, and add_stt_entries,
	which is called by add_stt_obj and add_stt_func when setting up psymtabs
	and full symtab, respectively.

2021-09-19  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-18  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.server/server-kill.exp with -m32
	When running test-case gdb.server/server-kill.exp with target board unix/-m32,
	I run into:
	...
	0xf7fd6b20 in _start () from /lib/ld-linux.so.2^M
	(gdb) Executing on target: kill -9 13082    (timeout = 300)
	builtin_spawn -ignore SIGHUP kill -9 13082^M
	bt^M
	(gdb) FAIL: gdb.server/server-kill.exp: kill_pid_of=server: test_unwind_syms: bt
	...

	The test-case expects the backtrace command to trigger remote communication,
	which then should result in a "Remote connection closed" or similar.

	However, no remote communication is triggered, because we hit the "Check that
	this frame is unwindable" case in get_prev_frame_always_1.

	We don't hit this problem in the kill_pid_of=inferior case, because there we
	run to main before doing the backtrace.

	Fix this by doing the same in the kill_pid_of=server case.

	Tested on x86_64-linux.

2021-09-18  Tom de Vries  <tdevries@suse.de>

	[gdb/ada] Handle artificial local symbols
	With current master and gcc 7.5.0/8.5.0, we have this timeout:
	...
	(gdb) print s^M
	Multiple matches for s^M
	[0] cancel^M
	[1] s at src/gdb/testsuite/gdb.ada/interface/foo.adb:20^M
	[2] s at src/gdb/testsuite/gdb.ada/interface/foo.adb:?^M
	> FAIL: gdb.ada/interface.exp: print s (timeout)
	...

	[ The FAIL doesn't reproduce with gcc 9.3.1.  This difference in
	behaviour bisects to gcc commit d70ba0c10de.

	The FAIL with earlier gcc bisects to gdb commit ba8694b650b. ]

	The FAIL is caused by gcc generating this debug info describing a named
	artificial variable:
	...
	 <2><1204>: Abbrev Number: 31 (DW_TAG_variable)
	    <1205>   DW_AT_name        : s.14
	    <1209>   DW_AT_type        : <0x1213>
	    <120d>   DW_AT_artificial  : 1
	    <120d>   DW_AT_location    : 5 byte block: 91 e0 7d 23 18   \
	      (DW_OP_fbreg: -288; DW_OP_plus_uconst: 24)
	...

	An easy way to fix this would be to simply not put named artificial variables
	into the symbol table.  However, that causes regressions for Ada.  It relies
	on being able to get the value from such variables, using a named reference.

	Fix this instead by marking the symbol as artificial, and:
	- ignoring such symbols in ada_resolve_variable, which fixes the FAIL
	- ignoring such ada symbols in do_print_variable_and_value, which prevents
	  them from showing up in "info locals"

	Note that a fix for the latter was submitted here (
	https://sourceware.org/pipermail/gdb-patches/2008-January/054994.html ), and
	this patch borrows from it.

	Tested on x86_64-linux.

	Co-Authored-By: Joel Brobecker  <brobecker@adacore.com>

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28180

2021-09-18  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-17  Alan Modra  <amodra@gmail.com>

	PR28149 part 2, purge generated line info
	Mixing compiler generated line info with gas generated line info is
	generally just confusing.  Also .loc directives with non-zero view
	fields might reference a previous .loc.  It becomes a little more
	tricky to locate that previous .loc if there might be gas generated
	line info present too.  Mind you, we turn off gas generation of line
	info on seeing compiler generated line info, so any reference back
	won't hit gas generated line info.  At least, if the view info is
	sane.  Unfortunately, gas needs to handle mangled source.

		PR 28149
		* dwarf2dbg.c (purge_generated_debug): New function.
		(dwarf2_directive_filename): Call the above.
		(out_debug_line): Don't segfault after purging.
		* testsuite/gas/i386/dwarf2-line-4.d: Update expected output.
		* testsuite/gas/i386/dwarf4-line-1.d: Likewise.
		* testsuite/gas/i386/dwarf5-line-1.d: Likewise.
		* testsuite/gas/i386/dwarf5-line-2.d: Likewise.

2021-09-17  Alan Modra  <amodra@gmail.com>

	PR28149, debug info with wrong file association
	gcc-11 and gcc-12 pass -gdwarf-5 to gas, in order to prime gas for
	DWARF 5 level debug info.  Unfortunately it seems there are cases
	where the compiler does not emit a .file or .loc dwarf debug directive
	before any machine instructions.  (Note that the .file directive
	typically emitted as the first line of assembly output doesn't count as
	a dwarf debug directive.  The dwarf .file has a file number before the
	file name string.)

	This patch delays allocation of file numbers for gas generated line
	debug info until the end of assembly, thus avoiding any clashes with
	compiler generated file numbers.  Two fixes for test case source are
	necessary;  A .loc can't use a file number that hasn't already been
	specified with .file.

	A followup patch will remove all the gas generated line info on
	seeing a .file directive.

		PR 28149
		* dwarf2dbg.c (num_of_auto_assigned): Delete.
		(current): Update initialisation.
		(set_or_check_view): Replace all accesses to view with u.view.
		(dwarf2_consume_line_info): Likewise.
		(dwarf2_directive_loc): Likewise.  Assert that we aren't generating
		line info.
		(dwarf2_gen_line_info_1): Don't call set_or_check_view on
		gas generated line entries.
		(dwarf2_gen_line_info): Set and track filenames for gas generated
		line entries.  Simplify generation of labels.
		(get_directory_table_entry): Use filename_cmp when comparing dirs.
		(do_allocate_filenum): New function.
		(dwarf2_where): Set u.filename and filenum to -1 for gas generated
		line entries.
		(dwarf2_directive_filename): Remove num_of_auto_assigned handling.
		(process_entries): Update view field access.  Call
		do_allocate_filenum.
		* dwarf2dbg.h (struct dwarf2_line_info): Add filename field in
		union aliasing view.
		* testsuite/gas/i386/dwarf2-line-3.s: Add .file directive.
		* testsuite/gas/i386/dwarf2-line-4.s: Likewise.
		* testsuite/gas/i386/dwarf2-line-4.d: Update expected output.
		* testsuite/gas/i386/dwarf4-line-1.d: Likewise.
		* testsuite/gas/i386/dwarf5-line-1.d: Likewise.
		* testsuite/gas/i386/dwarf5-line-2.d: Likewise.

2021-09-17  Alan Modra  <amodra@gmail.com>

	[GOLD] PowerPC64 support for sym+addend GOT entries
	Pass addends to all the GOT handling functions, plus remove some
	extraneous asserts.

		PR 28192
		* powerpc.cc (Output_data_got_powerpc): Add addend parameter to
		all methods creating got entries.
		(Target_powerpc::Scan::local): Pass reloc addend to got handling
		functions, and when creating dynamic got relocations.
		(Target_powerpc::Scan::global): Likewise.
		(Target_powerpc::Relocate::relocate): Likewise.  Remove extraneous
		assertions.

2021-09-17  Alan Modra  <amodra@gmail.com>

	[GOLD] Got_entry::write addends
	This takes care of writing out GOT entries with addends.  The local
	symbol case was already largely handled, except for passing the addend
	to tls_offset_for_local which might need the addend in a
	local_got_offset call.  That's needed also in tls_offset_for_global.

	I'm assuming here that GOT entries for function symbols won't ever
	have addends, and in particular that a GOT entry referencing PLT call
	stub code won't want an offset into the code.

		PR 28192
		* output.cc (Output_data_got::Got_entry::write): Include addend
		in global symbol value.  Pass addend to tls_offset_for_*.
		* powerpc.cc (Target_powerpc::do_tls_offset_for_local): Handle addend.
		(Target_powerpc::do_tls_offset_for_global): Likewise.
		* s390.cc (Target_s390::do_tls_offset_for_local): Likewise.
		(Target_s390::do_tls_offset_for_global): Likewise.
		* target.h (Target::tls_offset_for_local): Add addend param.
		(Target::tls_offset_for_global): Likewise.
		(Target::do_tls_offset_for_local): Likewise.
		(Target::do_tls_offset_for_global): Likewise.

2021-09-17  Alan Modra  <amodra@gmail.com>

	[GOLD] Output_data_got create entry method addends
	This patch makes all the Output_data_got methods that create new
	entries accept an optional addend.

		PR 28192
		* output.h (Output_data_got::add_global): Add optional addend
		parameter.  Update comment.  Delete overload without addend.
		(Output_data_got::add_global_plt): Likewise.
		(Output_data_got::add_global_tls): Likewise.
		(Output_data_got::add_global_with_rel): Likewise.
		(Output_data_got::add_global_pair_with_rel): Likewise.
		(Output_data_got::add_local_plt): Likewise.
		(Output_data_got::add_local_tls): Likewise.
		(Output_data_got::add_local_tls_pair): Likewise.
		(Output_data_got::reserve_local): Likewise.
		(Output_data_got::reserve_global): Likewise.
		(Output_data_got::Got_entry): Include addend in global sym
		constructor.  Delete local sym constructor without addend.
		* output.cc (Output_data_got::add_global): Add addend param,
		pass to got handling methods.
		(Output_data_got::add_global_plt): Likewise.
		(Output_data_got::add_global_with_rel): Likewise.
		(Output_data_got::add_global_pair_with_rel): Likewise.
		(Output_data_got::add_local_plt): Likewise.
		(Output_data_got::add_local_tls_pair): Likewise.
		(Output_data_got::reserve_local): Likewise.
		(Output_data_got::reserve_global): Likewise.

2021-09-17  Alan Modra  <amodra@gmail.com>

	[GOLD] Output_data_got tidy
	Some Output_data_got methods already have support for addends, but
	were implemented as separate methods.  This removes unnecessary code
	duplication.

	Relobj::local_has_got_offset and others there get a similar treatment.
	Comments are removed since it should be obvious without a comment, and
	the existing comments are not precisely what the code does.  For
	example, a local_has_got_offset call without an addend does not return
	whether the local symbol has *a* GOT offset of type GOT_TYPE, it
	returns whether there is a GOT entry of type GOT_TYPE for the symbol
	with addend of zero.

		PR 28192
		* output.h (Output_data_got::add_local): Make addend optional.
		(Output_data_got::add_local_with_rel): Likewise.
		(Output_data_got::add_local_pair_with_rel): Likewise.
		* output.cc (Output_data_got::add_local): Delete overload
		without addend.
		(Output_data_got::add_local_with_rel): Likewise.
		(Output_data_got::add_local_pair_with_rel): Likewise.
		* object.h (Relobj::local_has_got_offset): Make addend optional.
		Delete overload without addend later.  Update comment.
		(Relobj::local_got_offset): Likewise.
		(Relobj::set_local_got_offset): Likewise.

2021-09-17  Alan Modra  <amodra@gmail.com>

	[GOLD] Remove addend from Local_got_entry_key
	This patch removes the addend from Local_got_entry_key, which is
	unnecessary now that Got_offset_list has an addend.  Note that it
	might be advantageous to keep the addend in Local_got_entry_key when
	linking objects containing a large number of section_sym+addend@got
	relocations.  I opted to save some memory by removing the field but
	left the class there in case we might need to restore {sym,addend}
	lookup.  That's also why this change is split out from the
	Got_offset_list change.

		PR 28192
		* object.h (Local_got_entry_key): Delete addend_ field.
		Adjust constructor and methods to suit.
		* object.cc (Sized_relobj::do_for_all_local_got_entries):
		Update key.

2021-09-17  Alan Modra  <amodra@gmail.com>

	[GOLD] Got_offset_list: addend field
	This is the first in a series of patches aimed at supporting GOT
	entries against symbol plus addend generally for PowerPC64 rather than
	just section symbol plus addend as gold has currently.

	This patch adds an addend field to Got_offset_list, so that both local
	and global symbols can have GOT entries with addend.

		PR 28192
		* object.h (Got_offset_list): Add addend_ field, init in both
		constructors.  Adjust all accessors to suit.
		(Sized_relobj::do_local_has_got_offset): Adjust to suit.
		(Sized_relobj::do_local_got_offset): Likewise.
		(Sized_relobj::do_set_local_got_offset): Likewise.
		* symtab.h (Symbol::has_got_offset): Add optional addend param.
		(Symbol::got_offset, Symbol::set_got_offset): Likewise.
		* incremental.cc (Local_got_offset_visitor::visit): Add unused
		uint64_t parameter with FIXME.
		(Global_got_offset_visitor::visit): Add unused uint64_t parameter.

2021-09-17  Henry Castro  <hcvcastro@gmail.com>

	Fix segfault when running ia16-elf-gdb
	"A problem internal to GDB has been detected,
	further debugging may prove unreliable."

	Segmentation fault

2021-09-17  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: Merged extension string tables and their version tables into one.
	There are two main reasons for this patch,

	* In the past we had two extension tables, one is used to record all
	supported extensions in bfd/elfxx-riscv.c, another is used to get the
	default extension versions in gas/config/tc-riscv.c.  It is hard to
	maintain lots of tables in different files, but in fact we can merge
	them into just one table.  Therefore, we now define many riscv_supported_std*
	tables, which record names and versions for all supported extensions.
	We not only use these tables to initialize the riscv_ext_order, but
	also use them to get the default versions of extensions, and decide if
	the extensions should be enbaled by default.

	* We add a new filed `default_enable' for the riscv_supported_std* tables,
	to decide if the extension should be enabled by default.  For now if the
	`default_enable' field of the extension is set to EXT_DEFAULT, then we
	should enable the extension when the -march and elf architecture attributes
	are not set.  In the future, I suppose the `default_enable' can be set
	to lots of EXT_<VENDOR>, each vendor can decide to open which extensions,
	when the target triple of vendor is chosen.

	The elf/linux regression tests of riscv-gnu-toolchain are passed.

	bfd/
		* elfnn-riscv.c (cpu-riscv.h): Removed sine it is included in
		bfd/elfxx-riscv.h.
		(riscv_merge_std_ext): Updated since the field of rpe is changed.
		* elfxx-riscv.c (cpu-riscv.h): Removed.
		(riscv_implicit_subsets): Added implicit extensions for g.
		(struct riscv_supported_ext): Used to be riscv_ext_version.  Moved
		from gas/config/tc-riscv.c, and added new field `default_enable' to
		decide if the extension should be enabled by default.
		(EXT_DEFAULT): Defined for `default_enable' field.
		(riscv_supported_std_ext): It used to return the supported standard
		architecture string, but now we move ext_version_table from
		gas/config/tc-riscv.c to here, and rename it to riscv_supported_std_ext.
		Currently we not only use the table to initialize riscv_ext_order, but
		also get the default versions of extensions, and decide if the extensions
		should be enbaled by default.
		(riscv_supported_std_z_ext): Likewise, but is used for z* extensions.
		(riscv_supported_std_s_ext): Likewise, but is used for s* extensions.
		(riscv_supported_std_h_ext): Likewise, but is used for h* extensions.
		(riscv_supported_std_zxm_ext): Likewise, but is used for zxm* extensions.
		(riscv_all_supported_ext): Includes all supported extension tables.
		(riscv_known_prefixed_ext): Updated.
		(riscv_valid_prefixed_ext): Updated.
		(riscv_init_ext_order): Init the riscv_ext_order table according to
		riscv_supported_std_ext.
		(riscv_get_default_ext_version): Moved from gas/config/tc-riscv.c.
		Get the versions of extensions from riscv_supported_std* tables.
		(riscv_parse_add_subset): Updated.
		(riscv_parse_std_ext): Updated.
		(riscv_set_default_arch): Set the default subset list according to
		the default_enable field of riscv_supported_*ext tables.
		(riscv_parse_subset): If the input ARCH is NULL, then we call
		riscv_set_default_arch to set the default subset list.
		* elfxx-riscv.h (cpu-riscv.h): Included.
		(riscv_parse_subset_t): Removed get_default_version field, and added
		isa_spec field to replace it.
		(extern riscv_supported_std_ext): Removed.
	gas/
		* (bfd/cpu-riscv.h): Removed.
		(struct riscv_ext_version): Renamed and moved to bfd/elfxx-riscv.c.
		(ext_version_table): Likewise.
		(riscv_get_default_ext_version): Likewise.
		(ext_version_hash): Removed.
		(init_ext_version_hash): Removed.
		(riscv_set_arch): Updated since the field of rps is changed.  Besides,
		report error when the architecture string is empty.
		(riscv_after_parse_args): Updated.

2021-09-17  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-16  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix interrupted sleep in multi-threaded test-cases
	When running test-case gdb.threads/continue-pending-status.exp with native, I
	have:
	...
	(gdb) continue^M
	Continuing.^M
	PASS: gdb.threads/continue-pending-status.exp: attempt 0: continue for ctrl-c
	^C^M
	Thread 1 "continue-pendin" received signal SIGINT, Interrupt.^M
	[Switching to Thread 0x7ffff7fc4740 (LWP 1276)]^M
	0x00007ffff758e4c0 in __GI___nanosleep () at nanosleep.c:27^M
	27        return SYSCALL_CANCEL (nanosleep, requested_time, remaining);^M
	(gdb) PASS: gdb.threads/continue-pending-status.exp: attempt 0: caught interrupt
	...
	but with target board unix/-m32, I run into:
	...
	(gdb) continue^M
	Continuing.^M
	PASS: gdb.threads/continue-pending-status.exp: attempt 0: continue for ctrl-c
	[Thread 0xf74aeb40 (LWP 31957) exited]^M
	[Thread 0xf7cafb40 (LWP 31956) exited]^M
	[Inferior 1 (process 31952) exited normally]^M
	(gdb) Quit^M
	...

	The problem is that the sleep (300) call at the end of main is interrupted,
	which causes the inferior to exit before the ctrl-c can be send.

	This problem is described at "Interrupted System Calls" in the docs, and the
	suggested solution (using a sleep loop) indeed fixes the problem.

	Fix this instead using the more prevalent:
	...
	  alarm (300);
	  ...
	  while (1) sleep (1);
	...
	which is roughly equivalent because the sleep is called at the end of main,
	but slightly better because it guards against hangs from the start rather than
	from the end of main.

	Likewise in gdb.base/watch_thread_num.exp.

	Likewise in gdb.btrace/enable-running.exp, but use the sleep loop there,
	because the sleep is not called at the end of main.

	Tested on x86_64-linux.

2021-09-16  Mike Frysinger  <vapier@gentoo.org>

	gdb: manual: fix werrors typo

2021-09-16  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-15  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Use function_range in gdb.dwarf2/dw2-abs-hi-pc.exp
	When I run test-case gdb.dwarf2/dw2-abs-hi-pc.exp with gcc, we have:
	...
	(gdb) break hello^M
	Breakpoint 1 at 0x4004c0: file dw2-abs-hi-pc-hello.c, line 24.^M
	(gdb) PASS: gdb.dwarf2/dw2-abs-hi-pc.exp: break hello
	...
	but with clang, I run into:
	...
	(gdb) break hello^M
	Breakpoint 1 at 0x4004e4^M
	(gdb) FAIL: gdb.dwarf2/dw2-abs-hi-pc.exp: break hello
	...

	The problem is that the CU and function both have an empty address range:
	...
	 <0><d2>: Abbrev Number: 1 (DW_TAG_compile_unit)
	    <108>   DW_AT_name        : dw2-abs-hi-pc-hello.c
	    <123>   DW_AT_low_pc      : 0x4004e0
	    <127>   DW_AT_high_pc     : 0x4004e0
	 <1><12f>: Abbrev Number: 2 (DW_TAG_subprogram)
	    <131>   DW_AT_name        : hello
	    <13a>   DW_AT_low_pc      : 0x4004e0
	    <13e>   DW_AT_high_pc     : 0x4004e0
	...

	The address ranges are set like this in dw2-abs-hi-pc-hello-dbg.S:
	...
	        .4byte  .hello_start    /* DW_AT_low_pc */
	        .4byte  .hello_end      /* DW_AT_high_pc */
	...
	where the labels refer to dw2-abs-hi-pc-hello.c:
	...
	extern int v;

	asm (".hello_start: .globl .hello_start\n");
	void
	hello (void)
	{
	asm (".hello0: .globl .hello0\n");
	  v++;
	asm (".hello1: .globl .hello1\n");
	}
	asm (".hello_end: .globl .hello_end\n");
	...

	Using asm labels in global scope is a known source of problems, as explained
	in the comment of proc function_range in gdb/testsuite/lib/dwarf.exp.

	Fix this by using function_range instead.

	Tested on x86_64-linux with gcc and clang-7 and clang-12.

2021-09-15  Claudiu Zissulescu  <claziss@synopsys.com>

	arc: Fix got-weak linker test
	Use regular expressions to fix the got-weak linker test.

	ld/
		* testsuite/got-weak.d: Update test.

2021-09-15  Andrew Burgess  <andrew.burgess@embecosm.com>

	bfd: fix incorrect type used in sizeof
	Noticed in passing that we used 'sizeof (char **)' when calculating
	the size of a list of 'char *' pointers.  Of course, this isn't really
	going to make a difference anywhere, but we may as well be correct.

	There should be no user visible changes after this commit.

	bfd/ChangeLog:

		* archures.c (bfd_arch_list): Use 'char *' instead of 'char **'
		when calculating space for a string list.

2021-09-15  Tom de Vries  <tdevries@suse.de>

	[gdb/doc] Fix typo in maint selftest entry
	Fix typo "will by" -> "will be".

2021-09-15  Tom de Vries  <tdevries@suse.de>

	[bfd] Ensure unique printable names for bfd archs
	Remove duplicate entry in bfd_ft32_arch and bfd_rx_arch.

	Fix printable name for bfd_mach_n1: "nh1" -> "n1".

		PR 28336
		* cpu-ft32.c (arch_info_struct): Remove "ft32" entry.
		* cpu-rx.c (arch_info_struct): Remove "rx" entry.
		* cpu-nds32.c (bfd_nds32_arch): Fix printable name for bfd_mach_n1
		entry.

2021-09-15  Alan Modra  <amodra@gmail.com>

	PR28328, dlltool ice
		PR 28328
		* archive.c (bfd_ar_hdr_from_filesystem): Don't use bfd_set_input_error
		here, our caller will do that.

2021-09-15  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-14  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb_load_no_complaints with gnu-debuglink
	When running test-case gdb.dwarf2/dw2-ranges-psym-warning.exp with target
	board gnu-debuglink I run into:
	...
	(gdb) file dw2-ranges-psym-warning^M
	Reading symbols from dw2-ranges-psym-warning...^M
	Reading symbols from .debug/dw2-ranges-psym-warning.debug...^M
	(gdb) FAIL: gdb.dwarf2/dw2-ranges-psym-warning.exp: No complaints
	...

	Fix this by updating the regexp in gdb_load_no_complaints.

	Tested on x86_64-linux.

2021-09-14  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Fix function range handling in psymtabs
	Consider the test-case from this patch.

	We run into:
	...
	(gdb) PASS: gdb.dwarf2/dw2-ranges-psym-warning.exp: continue
	bt^M
	warning: (Internal error: pc 0x4004b6 in read in psymtab, but not in symtab.)^M
	^M
	warning: (Internal error: pc 0x4004b6 in read in psymtab, but not in symtab.)^M
	^M
	warning: (Internal error: pc 0x4004b6 in read in psymtab, but not in symtab.)^M
	^M
	warning: (Internal error: pc 0x4004b6 in read in psymtab, but not in symtab.)^M
	^M
	warning: (Internal error: pc 0x4004b6 in read in psymtab, but not in symtab.)^M
	^M
	warning: (Internal error: pc 0x4004b6 in read in psymtab, but not in symtab.)^M
	^M
	  read in psymtab, but not in symtab.)^M
	^M
	)^M
	(gdb) FAIL: gdb.dwarf2/dw2-ranges-psym-warning.exp: bt
	...

	This happens as follows.

	The function foo:
	...
	 <1><31>: Abbrev Number: 4 (DW_TAG_subprogram)
	    <33>   DW_AT_name        : foo
	    <37>   DW_AT_ranges      : 0x0
	...
	has these ranges:
	...
	    00000000 00000000004004c1 00000000004004d2
	    00000000 00000000004004ae 00000000004004af
	    00000000 <End of list>
	...
	which have a hole at at [0x4004af,0x4004c1).

	However, the address map of the partial symtabs incorrectly maps addresses
	in the hole (such as 0x4004b6 in the backtrace) to the foo CU.

	The address map of the full symbol table of the foo CU however does not
	contain the addresses in the hole, which is what the warning / internal error
	complains about.

	Fix this by making sure that ranges of functions are read correctly.

	The patch adds a bit to struct partial_die_info, in this hole (shown for
	x86_64-linux):
	...
	/*   11: 7   |     4 */    unsigned int canonical_name : 1;
	/* XXX  4-byte hole  */
	/*   16      |     8 */    const char *raw_name;
	...
	So there's no increase in size for 64-bit, but AFAIU there will be an increase
	for 32-bit.

	Tested on x86_64-linux.

	gdb/ChangeLog:

	2021-08-10  Tom de Vries  <tdevries@suse.de>

		PR symtab/28200
		* dwarf2/read.c (struct partial_die_info): Add has_range_info and
		range_offset field.
		(add_partial_subprogram): Handle pdi->has_range_info.
		(partial_die_info::read): Set pdi->has_range_info.

	gdb/testsuite/ChangeLog:

	2021-08-10  Tom de Vries  <tdevries@suse.de>

		PR symtab/28200
		* gdb.dwarf2/dw2-ranges-psym-warning-main.c: New test.
		* gdb.dwarf2/dw2-ranges-psym-warning.c: New test.
		* gdb.dwarf2/dw2-ranges-psym-warning.exp: New file.

2021-09-14  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Fix CU list in .debug_names for dummy CUs
	With current trunk and target board cc-with-debug-names we have:
	...
	(gdb) file dw2-ranges-psym^M
	Reading symbols from dw2-ranges-psym...^M
	warning: Section .debug_names in dw2-ranges-psym has abbreviation_table of \
	  size 1 vs. written as 28, ignoring .debug_names.^M
	(gdb) set complaints 0^M
	(gdb) FAIL: gdb.dwarf2/dw2-ranges-psym.exp: No complaints
	...

	The executable has 8 compilation units:
	...
	$ readelf -wi dw2-ranges-psym | grep @
	  Compilation Unit @ offset 0x0:
	  Compilation Unit @ offset 0x2e:
	  Compilation Unit @ offset 0xa5:
	  Compilation Unit @ offset 0xc7:
	  Compilation Unit @ offset 0xd2:
	  Compilation Unit @ offset 0x145:
	  Compilation Unit @ offset 0x150:
	  Compilation Unit @ offset 0x308:
	...
	of which the ones at 0xc7 and 0x145 are dummy CUs (that is, they do not
	contain a single DIE), which were added by recent commit 5ef670d81fd
	"[gdb/testsuite] Add dummy start and end CUs in dwarf assembly".

	The .debug_names section contains this CU table:
	...
	[  0] 0x0
	[  1] 0x2e
	[  2] 0xa5
	[  3] 0xd2
	[  4] 0x150
	[  5] 0x308
	[  6] 0x1
	[  7] 0x0
	...
	The last two entries are incorrect, and the entries for the dummy CUs are
	missing.

	The last two entries are incorrect because here in write_debug_names we write
	the dimension of the CU list as 8:
	...
	  /* comp_unit_count - The number of CUs in the CU list.  */
	  header.append_uint (4, dwarf5_byte_order,
	                     per_objfile->per_bfd->all_comp_units.size ()
	                     - per_objfile->per_bfd->tu_stats.nr_tus);
	...
	while the actual dimension of the CU list is 6.

	The discrepancy is caused by this code which skips the dummy CUs:
	...
	  for (int i = 0; i < per_objfile->per_bfd->all_comp_units.size (); ++i)
	    {
	      ...
	      /* CU of a shared file from 'dwz -m' may be unused by this main
	        file.  It may be referenced from a local scope but in such
	        case it does not need to be present in .debug_names.  */
	      if (psymtab == NULL)
	       continue;
	...
	because they have a null partial symtab.

	We can fix this by writing the actual dimension of the CU list, but that still
	leaves the dummy CUs out of the CU list.  The purpose of having these is to
	delimit the end of preceding CUs.

	So, fix this by:
	- removing the code that skips the dummy CUs (note that the same change
	  was done for .gdb_index in commit efba5c2319d '[gdb/symtab] Handle PU
	  without import in "save gdb-index"'.
	- verifying that all units are represented in the CU/TU lists
	- using the actual CU list size when writing the dimension of the CU list
	  (and likewise for the TU list).

	Tested on x86_64-linux with native and target board cc-with-debug-names.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28261

2021-09-14  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Generate .debug_aranges in gdb.dwarf2/locexpr-data-member-location.exp
	When running test-case gdb.dwarf2/locexpr-data-member-location.exp with target
	board cc-with-debug-names, all tests pass but we run into PR28261:
	...
	(gdb) run ^M
	Starting program: locexpr-data-member-location ^M
	warning: Section .debug_names in locexpr-data-member-location-lib.so has \
	  abbreviation_table of size 1 vs. written as 37, ignoring .debug_names.^M
	...

	Using a patch that fixes PR28261, the warning is gone, but we run into:
	...
	FAIL: gdb.dwarf2/locexpr-data-member-location.exp: step into foo
	...

	This is due a missing .debug_aranges contribution for the CU declared in
	gdb.dwarf2/locexpr-data-member-location.exp.

	Fix this by adding the missing .debug_aranges contribution.

	Tested on x86_64-linux.

2021-09-14  Claudiu Zissulescu  <claziss@synopsys.com>

	arc: Fix potential invalid pointer access when fixing got symbols.
	When statically linking, it can arrive to an undefined weak symbol of
	which its value cannot be determined. However, we are having pieces of
	code which doesn't take this situation into account, leading to access
	a structure which may not be initialized. Fix this situation and add a
	test.

	bfd/
	xxxx-xx-xx  Cupertino Miranda  <cmiranda@synopsys.com>
	            Claudiu Zissulescu  <claziss@synopsys.com>

		* arc-got.h (arc_static_sym_data): New structure.
		(get_static_sym_data): New function.
		(relocate_fix_got_relocs_for_got_info): Move the computation fo
		symbol value and section to above introduced function, and use
		this new function.

	ld/testsuite/
	xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>

		* ld-arc/got-weak.d: New file.
		* ld-arc/got-weak.s: Likewise.


	fix

2021-09-14  Mike Frysinger  <vapier@gentoo.org>

	sim: bfin: add support for SDL2
	This probably should have been ported long ago, but better late than
	never.  We keep support for both versions for now since both projects
	tend to have long lifetimes.  Maybe consider dropping SDL1 in another
	ten years.

2021-09-14  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-14  Tom Tromey  <tom@tromey.com>

	Remove use of __CYGNUSCLIB__
	I found a check of __CYGNUSCLIB__ in dbxread.c.  I think this is dead
	code.  This patch removes it.

2021-09-13  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Check for valid test name
	When running gdb.base/batch-exit-status.exp I noticed that the test name
	contains a newline:
	...
	PASS: gdb.base/batch-exit-status.exp: : No such file or directory\.^M
	: No such file or directory\.: [lindex $result 2] == 0
	...

	Check for this in ::CheckTestNames::check, such that we have a warning:
	...
	PASS: gdb.base/batch-exit-status.exp: : No such file or directory\.^M
	: No such file or directory\.: [lindex $result 2] == 0
	WARNING: Newline in test name
	...

	Tested on x86_64-linux.

2021-09-13  Tom de Vries  <tdevries@suse.de>

	[gdb/tdep] Fix exec check in gdb_print_insn_arm
	With a gdb build with --enable-targets=all we run into a KFAIL:
	...
	KFAIL: gdb.gdb/unittest.exp: executable loaded: maintenance selftest, \
	  failed none (PRMS: gdb/27891)
	...
	due to:
	...
	Running selftest print_one_insn.^M
	Self test failed: arch armv8.1-m.main: self-test failed at \
	  disasm-selftests.c:165^M
	...

	The test fails because we expect disassembling of one arm insn to consume 4
	bytes and produce (using verbose = true in disasm-selftests.c):
	...
	arm mov r0, #0
	...
	but instead the disassembler uses thumb mode and only consumes 2
	bytes and produces:
	...
	arm movs        r0, r0
	...

	The failure does not show up in the "no executable loaded" variant because
	this code in gdb_print_insn_arm isn't triggered:
	...
	  if (current_program_space->exec_bfd () != NULL)
	    info->flags |= USER_SPECIFIED_MACHINE_TYPE;
	...
	and consequently we do this in print_insn:
	...
	      if ((info->flags & USER_SPECIFIED_MACHINE_TYPE) == 0)
	        info->mach = bfd_mach_arm_unknown;
	...
	and don't set force_thumb to true in select_arm_features.

	The code in gdb_print_insn_arm makes the assumption that the disassembly
	architecture matches the exec architecture, which in this case is incorrect,
	because the exec architecture is x86_64, and the disassembly architecture is
	armv8.1-m.main.  Fix that by explicitly checking it:
	...
	  if (current_program_space->exec_bfd () != NULL
	      && (current_program_space->exec_bfd ()->arch_info
		  == gdbarch_bfd_arch_info (gdbarch)))
	...

	This fixes the print_one_insn failure, so remove the KFAIL.

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=27891

2021-09-13  Tom de Vries  <tdevries@suse.de>

	[gdb/tdep] Reset force_thumb in parse_arm_disassembler_options
	With a gdb build with --enable-targets=all, we have 2 arch-specific failures
	in selftest print_one_insn:
	...
	$ gdb -q -batch a.out -ex "maint selftest print_one_insn" 2>&1 \
	  | grep "Self test failed: arch "
	Self test failed: arch armv8.1-m.main: self-test failed at \
	  disasm-selftests.c:165
	Self test failed: arch arm_any: self-test failed at disasm-selftests.c:165
	$
	...

	During the first failed test, force_thumb is set to true, and remains so until
	and during the second test, which causes the second failure.

	Fix this by resetting force_thumb to false in parse_arm_disassembler_options,
	such that we get just one failure:
	...
	$ gdb -q -batch a.out -ex "maint selftest print_one_insn" 2>&1 \
	  | grep "Self test failed: arch "
	Self test failed: arch armv8.1-m.main: self-test failed at \
	  disasm-selftests.c:165
	$
	...

	Tested on x86_64-linux.

2021-09-13  Tom Tromey  <tromey@adacore.com>

	Fix no-Python build
	A build without Python will currently fail, because
	selftests::test_python uses gdb_python_initialized, which is only
	conditionally defined.

	This patch fixes the build by making test_python also be conditionally
	defined.  I chose this approach because the selftest will fail if
	Python is not enabled, so it didn't seem useful to leave it defined.

2021-09-13  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: Update the assembler insn testcase.
	Since the 0x57 is preserved for the vadd.vv instruction in the integration
	branch, remove it to make sure the testcase can work.

	gas/
		* testsuite/gas/riscv/insn.d: Remove 0x57 since it is preserved
		for vadd.vv instruction.
		* testsuite/gas/riscv/insn.s: Likewise.

2021-09-13  Jan Beulich  <jbeulich@suse.com>

	MIPS: don't use get_symbol_name() for section parsing.  With s_change_section() later calling obj_elf_section(), it seems better to pre-parse the section name by the same function that will be used there. This way no differences in what is accepted will result.
	gas	* config/tc-mips.c (s_change_section): Use obj_elf_section_name to
		parse the section name.

	ia64: don't use get_symbol_name() for section parsing.  With cross_section() later calling obj_elf_section(), it seems better to pre-parse the section name by the same function that will be used there. This way no differences in what is accepted will result.
	gas	* config/tc-ia64.c (cross_section): Use obj_elf_section_name to
		parse the section name.

2021-09-13  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.gdb/selftest.exp
	With a gdb build with CFLAGS "-O2 -g -flto=auto", I run into:
	...
	 #7  gdb_main (args=0x7fffffffd220) at src/gdb/main.c:1368^M
	 #8  main (argc=<optimized out>, argv=<optimized out>) at src/gdb/gdb.c:32^M
	 (gdb) FAIL: gdb.gdb/selftest.exp: backtrace through signal handler
	...
	which means that this regexp in proc test_with_self fails:
	...
	  -re "#0.*(read|poll).*in main \\(.*\\) at .*gdb\\.c.*$gdb_prompt $" {
	...

	The problem is that gdb_main has been inlined into main, and consequently the
	backtrace uses:
	...
	 #x  <fn> ...
	...
	instead of
	...
	 #x  <address> in <fn> ...
	...

	Fix this by updating the regexp to not require "in" before " main".

	Tested on x86_64-linux.

2021-09-13  Alan Modra  <amodra@gmail.com>

	Re: Deprecate a.out support for NetBSD targets
		* config.bfd: Correct m68-*-*bsd* obsolete target match.

2021-09-13  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix test name in gdb.base/batch-exit-status.exp
	When running gdb.base/batch-exit-status.exp I noticed that the test name
	contains a newline:
	...
	PASS: gdb.base/batch-exit-status.exp: : No such file or directory\.^M
	: No such file or directory\.: [lindex $result 2] == 0
	...

	The mistake is that I passed an output regexp argument to a parameter
	interpreted as testname prefix.  Fix this by passing a testname prefix
	instead.

	Add support for checking output, to be able to handle the output regexp
	argument.

	Tested on x86_64-linux.

2021-09-13  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-12  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Set sysroot earlier in local-board.exp
	When running test-case gdb.base/batch-exit-status.exp for native, it passes.
	But with target board cc-with-debug-names, we run into (added missing double
	quotes for clarity):
	...
	builtin_spawn $build/gdb/testsuite/../../gdb/gdb -nw -nx \
	  -data-directory $build/gdb/testsuite/../data-directory \
	  -iex "set height 0" -iex "set width 0" -ex "set sysroot" -batch ""^M
	: No such file or directory.^M
	PASS: gdb.base/batch-exit-status.exp: \
	  : No such file or directory\.: [lindex $result 2] == 0
	FAIL: gdb.base/batch-exit-status.exp: \
	  : No such file or directory\.: [lindex $result 3] == $expect_status
	...

	The difference between the passing and failing case is that with native we
	have (leaving out set height/width for brevity):
	...
	$ gdb -batch ""; echo $?
	: No such file or directory.
	1
	...
	and with target board cc-with-debug-names:
	...
	$ gdb -ex "set sysroot" -batch ""; echo $?
	: No such file or directory.
	0
	...

	The difference is expected.  GDB returns the exit status of the last executed
	command.  In the former case that's 'file ""', which fails.  In the latter case,
	that's 'set sysroot', which succeeds.

	Fix this by setting sysroot using -iex instead of -ex in local-board.exp, such
	that we have the expected:
	...
	$ gdb -iex "set sysroot" -batch ""; echo $?
	: No such file or directory.
	1
	...

	Tested on x86_64-linux.

2021-09-12  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-11  Mike Frysinger  <vapier@gentoo.org>

	sim: run: change help short option to -h
	It's unclear why -H was picked over the more standard -h, but since
	-h is still not used, just change -H to -h to match pretty much every
	other tool in the sourceware tree.

2021-09-11  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-10  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Reimplement gdb.gdb/python-selftest.exp as unittest
	The test-case gdb.gdb/python-selftest.exp:
	- patches the gdb_python_initialized variable in gdb to 0
	- checks that the output of a python command is "Python not initialized"

	Reimplement gdb.gdb/python-selftest.exp as unittest, using:
	- execute_command_to_string to capture the output
	- try/catch to catch the "Python not initialized" exception.

	Tested on x86_64-linux.

2021-09-10  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix DUPLICATE in gdb.base/global-var-nested-by-dso.exp
	Fix DUPLICATE in gdb.base/global-var-nested-by-dso.exp by naming commands more
	uniquely.

2021-09-10  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix DUPLICATE in gdb.base/skip-solib.exp
	Fix DUPLICATE in gdb.base/skip-solib.exp by using with_test_prefix.

	Also fix indentation style and long lines, remove outdated question/answer
	bits, and use multi_line.

2021-09-10  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix handling of nr_args < 3 in mi_gdb_test
	The documentation of mi_gdb_test states that the command, pattern and message
	arguments are mandatory:
	...
	 # mi_gdb_test COMMAND PATTERN MESSAGE [IPATTERN] -- send a command to gdb;
	 #   test the result.
	...

	However, this is not checked, and when mi_gdb_test is called with less than 3
	arguments, it passes or fails silently.

	Fix this by using the following semantics:
	- if there are 1 or 2 arguments, use the command as the message.
	- if there is 1 argument, use ".*" as the pattern.
	- if there are no or too much arguments, error out.

	Fix a PATH issue in gdb.mi/mi-logging.exp, introduced by using the command as
	message.  Fix a few other trivial-looking FAILs.

	There are 11 less trivial-looking FAILs left in gdb.mi in test-cases:
	- mi-nsmoribund.exp
	- mi-breakpoint-changed.exp
	- mi-break.exp.

	Tested on x86_64-linux.

2021-09-10  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add string_list_to_regexp
	A regexp pattern with escapes like this is hard to read:
	...
	set re "~\"\[$\]$decimal = 1\\\\n\"\r\n\\^done"
	...

	We can make it more readable by spacing out parts (which allows us to also use
	the curly braces where that's convenient):
	...
	set re [list "~" {"} {[$]} $decimal " = 1" "\\\\" "n" {"} "\r\n" "\\^" "done"]
	set re [join $re ""]
	...
	or by using string_to_regexp:
	...
	set re [list \
	            [string_to_regexp {~"$}] \
	            $decimal \
	            [string_to_regexp " = 1\\n\"\r\n^done"]]
	set re [join $re ""]
	...
	Note: we have to avoid applying string_to_list to decimal, which is already a
	regexp.

	Add a proc string_list_to_regexp to make it easy to do both:
	...
	set re [list \
	            [string_list_to_regexp ~ {"} $] \
	            $decimal \
	            [string_list_to_regexp " = 1" \\ n {"} \r\n ^ done]]
	...

	Also add a test-case gdb.testsuite/string_to_regexp.exp.

2021-09-10  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Handle unrecognized command line option in gdb_compile_test
	When running the gdb testsuite with gnatmake-4.8, I get many fails of the
	following form:
	...
	gcc: error: unrecognized command line option '-fgnat-encodings=all'^M
	gnatmake: "gdb.ada/O2_float_param/foo.adb" compilation error^M
	compiler exited with status 1
	compilation failed: gcc ... gdb.ada/O2_float_param/foo.adb
	gcc: error: unrecognized command line option '-fgnat-encodings=all'
	gnatmake: "gdb.ada/O2_float_param/foo.adb" compilation error
	FAIL: gdb.ada/O2_float_param.exp: scenario=all: compilation foo.adb
	...

	Fix this by marking the test unsupported instead, such that we have:
	...
	UNSUPPORTED: gdb.ada/O2_float_param.exp: scenario=all: compilation foo.adb \
	  (unsupported option '-fgnat-encodings=all')
	...

	Tested on x86_64-linux.

2021-09-10  Alan Modra  <amodra@gmail.com>

	PowerPC, sanity check r_offset in relocate_section
	        * elf32-ppc.c (offset_in_range): New function.
		(ppc_elf_vle_split16): Sanity check r_offset before accessing
		section contents.  Return status.
	        (ppc_elf_relocate_section): Sanity check r_offset before
	        accessing section contents.  Don't segfault on NULL howto.

	Re: gas: Use the directory name in .file 0
		PR gas/28266
		* testsuite/gas/elf/dwarf-5-file0-2.s: Use %object rather than
		@object, .4byte instead of .long, and .asciz instead of .string.

2021-09-10  Mike Frysinger  <vapier@gentoo.org>

	etc: switch to automake
	There's no content in here currently, so switching to automake is
	pretty easy with a stub file.

	etc: rename configure.in to configure.ac
	The .in name has been deprecated for a long time in favor of .ac.

2021-09-10  H.J. Lu  <hjl.tools@gmail.com>

	gas: Use the directory name in .file 0
	DWARF5 allows .file 0 to take an optional directory name.  Set the entry
	0 of the directory table to the directory name in .file 0.

		PR gas/28266
		* dwarf2dbg.c (get_directory_table_entry): Add an argument for
		the directory name in .file 0 and use it, instead of PWD.
		(allocate_filenum): Pass NULL to get_directory_table_entry.
		(allocate_filename_to_slot): Pass the incoming dirname to
		get_directory_table_entry.
		* testsuite/gas/elf/dwarf-5-file0-2.d: New file.
		* testsuite/gas/elf/dwarf-5-file0-2.s: Likewise.
		* testsuite/gas/elf/elf.exp: Run dwarf-5-file0-2.

2021-09-10  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-09  Yoshinori Sato  <ysato@users.sourceforge.jp>

	gdb: Enable target rx-*-*linux.
	I added rx-*-linux in binutils few yaers ago.
	But missing this changes,

2021-09-09  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/coredump-filter-build-id.exp with older eu-unstrip
	On openSUSE Leap 42.3 with eu-unstrip 0.158, we run into:
	...
	(gdb) PASS: gdb.base/coredump-filter-build-id.exp: save corefile
	First line of eu-unstrip: \
	  0x400000+0x202000 f4ae8502bd6a14770182382316bc595e9dc6f08b@0x400284 - - [exe]
	FAIL: gdb.base/coredump-filter-build-id.exp: gcore dumped mapping with build-id
	...

	The test expects an actual file name instead of '[exe]', but that only got
	introduced with eu-unstrip 0.161.  Before it printed '[exe]' or '[pie]'.

	Fix this by updating the regexp.

	Tested on x86_64-linux.

2021-09-09  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix various issues in gdb.mi/mi-sym-info.exp
	I noticed this failure in gdb.mi/mi-sym-info.exp with gcc-4.8:
	...
	FAIL: gdb.mi/mi-sym-info.exp: -symbol-info-functions --max-results 1 \
	  (unexpected output)
	...
	due to function f2 instead of f3 being listed.

	AFAICT, this is caused by a difference in debug info:
	...
	$ readelf -wi outputs/gdb.mi/mi-sym-info/mi-sym-info1.o \
	  | egrep "DW_AT_name.*: f[1-3]"
	    <72>   DW_AT_name        : f1
	    <a1>   DW_AT_name        : f2
	    <d0>   DW_AT_name        : f3
	...
	vs:
	...
	$ readelf -wi outputs/gdb.mi/mi-sym-info/mi-sym-info1.o \
	  | egrep "DW_AT_name.*: f[1-3]"
	    <f4>   DW_AT_name        : f3
	    <123>   DW_AT_name        : f2
	    <152>   DW_AT_name        : f1
	...
	and the command documentation does not mention an imposed order, so fix this
	by allowing f2 as well.

	Doing this fix, it made sense to do a refactoring of adding f2_re and f3_re
	variables, in order to write (?:$f2_re|$f3_re), and I applied the same pattern
	overall.

	Furthermore, I found a silent FAIL due to calling mi_gdb_proc with 2 args, fix
	by updating the regexp.

	Then I ran with clang and found another FAIL, fix by updating the regexp.

	Tested on x86_64-linux with gcc-4.8.5, gcc-7.5.0, gcc-11.2.1, clang-7.0.1 and
	clang-12.0.1.

2021-09-09  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Reimplement gdb.gdb/complaints.exp as unittest
	When building gdb with "-Wall -O2 -g -flto=auto", I run into:
	...
	(gdb) call clear_complaints()^M
	No symbol "clear_complaints" in current context.^M
	(gdb) FAIL: gdb.gdb/complaints.exp: clear complaints
	...

	The problem is that lto has optimized away the clear_complaints function
	and consequently the selftest doesn't work.

	Fix this by reimplementing the selftest as a unit test.

	Factor out two new functions:
	- void
	  execute_fn_to_ui_file (struct ui_file *file, std::function<void(void)> fn);
	- std::string
	  execute_fn_to_string (std::function<void(void)> fn, bool term_out);
	and use the latter to capture the complaints output.

	Tested on x86_64-linux.

2021-09-09  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb/python: remove all uses of Py_TPFLAGS_HAVE_ITER
	Python 2 has a bit flag Py_TPFLAGS_HAVE_ITER which can be passed as
	part of the tp_flags field when defining a new object type.  This flag
	is not defined in Python 3 and so we define it to 0 in
	python-internal.h (when IS_PY3K is defined).

	The meaning of this flag is that the object has the fields tp_iter and
	tp_iternext.  Note the use of "has" here, the flag says nothing about
	the values in those fields, just that the type object has the fields.

	In early versions of Python 2 these fields were no part of the
	PyTypeObject struct, they were added in version 2.2 (see
	https://docs.python.org/release/2.3/api/type-structs.html).  And so,
	there could be a some code compiled out there which has a PyTypeObject
	structure within it that doesn't even have the tp_iter and tp_iternext
	fields, attempting to access these fields would be undefined
	behaviour.

	And so Python added the Py_TPFLAGS_HAVE_ITER flag.  If the flag is
	present then Python is free to access the tp_iter and tp_iternext
	fields.

	If we consider GDB then we always assume that the tp_iter and
	tp_iternext fields are part of PyTypeObject.  If someone was crazy
	enough to try and compile GDB against Python 2.1 then we'd get lots of
	build errors saying that we were passing too many fields when
	initializing PyTypeObject structures.  And so, I claim, we can be sure
	that GDB will always be compiled with a version of Python that has the
	tp_iter and tp_iternext fields in PyTypeObject.

	Next we can look at the Py_TPFLAGS_DEFAULT flag.  In Python 2, each
	time additional fields are added to PyTypeObject a new Py_TPFLAGS_*
	flag would be defined to indicate whether those flags are present or
	not.  And, those new flags would be added to Py_TPFLAGS_DEFAULT.  And
	so, in the latest version of Python 2 the Py_TPFLAGS_DEFAULT flag
	includes Py_TPFLAGS_HAVE_ITER (see
	https://docs.python.org/2.7/c-api/typeobj.html).

	In GDB we pass Py_TPFLAGS_DEFAULT as part of the tp_flags for all
	objects we define.

	And so, in this commit, I propose to remove all uses of
	Py_TPFLAGS_HAVE_ITER from GDB, it's simply not needed.

	There should be no user visible changes after this commit.

2021-09-09  Mike Frysinger  <vapier@gentoo.org>

	sim: accept -EB/-EL short options
	Many GNU tools accept -EB/-EL as short options for selecting big &
	little endian modes.  While the sim has an -E option, it requires
	spelling out "big" and "little".  Adding support for -EB & -EL is
	thus quite trivial, so lets round it out to be less annoying.

	sim: ppc: drop support for std-config.h overrides
	Only the ppc arch supports this kind of source file override logic.
	All the others expose knobs via configure flags, and for some of
	these, the ppc code does as well.  For others, it doesn't make sense
	to ever change them.  Since it's unlikely anyone is using this, drop
	it all to simplify the code (and to get us a little closer to the
	common sim code).

	sim: ppc: enable use of gnulib
	All other sim arches are using this now, so finish up the logic in
	the ppc arch to enable gnulib usage here too.

	sim: drop old O_NDELAY & FNBLOCK support
	We use these older names inconsistently in the sim codebase, and time
	has moved on long ago, so drop support for these non-standard names.
	POSIX provides O_NONBLOCK for us, so use it everywhere.

2021-09-09  Mike Frysinger  <vapier@gentoo.org>

	sim: dv-sockser: enable for mingw targets too
	We have enough functionality from gnulib now to build sockser on
	all platforms.

	Non-blocking I/O is supported when F_GETFL/F_SETFL are unavailable,
	but we can address that in a follow up commit.  This mirrors what
	is done in other places in the sim already.

2021-09-09  Mike Frysinger  <vapier@gentoo.org>

	sim: cgen: workaround Windows VOID define
	The cgen framework provides a "VOID" type for code to use, but this
	defines ends up conflicting with the standard Windows VOID define.
	Since they actually define to the same thing ("void"), undef it here
	to fix the Windows build.

	We might want to reconsider the need for "VOID" in cgen, but that
	will take larger discussion & coordination with the cgen project.

2021-09-09  Mike Frysinger  <vapier@gentoo.org>

	sim: dv-sockser: move sim-main.h include after system includes
	The sim-main.h header is a bit of a dumping ground.  Every arch can
	(and many do) define all sorts of weird & common names that end up
	conflicting with system headers.  So including it before the system
	headers sets us up for pain.  v850 is a good example of this -- when
	building for mingw, we see weird failures:

	$ i686-w64-mingw32-gcc ... -c -o dv-sockser.o ../../../../sim/v850/../common/dv-sockser.c
	In file included from ../../../../sim/v850/sim-main.h:11,
	                 from ../../../../sim/v850/../common/dv-sockser.c:24:
	../../../../sim/v850/../common/sim-base.h:97:32: error: expected ')' before '->' token
	  97 | # define STATE_CPU(sd, n) ((sd)->cpu[0])
	     |                                ^~

	While gcc is unhelpful at first, running it through the preprocessor
	by hand shows more details:

	$ i686-w64-mingw32-gcc ... -E -dD -o dv-sockser.i ../../../../sim/v850/../common/dv-sockser.c
	$ i686-w64-mingw32-gcc -c dv-sockser.i
	In file included from /usr/i686-w64-mingw32/usr/include/minwindef.h:163,
	                 from /usr/i686-w64-mingw32/usr/include/windef.h:9,
	                 from /usr/i686-w64-mingw32/usr/include/windows.h:69,
	                 from /usr/i686-w64-mingw32/usr/include/winsock2.h:23,
	                 from ../../gnulib/import/sys/socket.h:684,
	                 from ../../gnulib/import/netinet/in.h:43,
	                 from ../../../../sim/v850/../common/dv-sockser.c:39:
	/usr/i686-w64-mingw32/usr/include/winnt.h:4803:25: error: expected ')' before '->' token
	 4803 |       DWORD State;
	      |                         ^
	      |                         )

	This is because v850 sets up this common name:

	All of this needs cleaning up someday, but since the dv-sockser code
	definitely should be fixed in this way, lets do that now and unblock
	the v850 code.

2021-09-09  Mike Frysinger  <vapier@gentoo.org>

	sim: mips: delete unused PSIZE define
	It's unclear what this define is for as it appears to be unused, and
	has never been used in the history of the mips sim.  Delete it to tidy
	up, and to fix build errors for Windows targets that have a standard
	"PSIZE" struct in their system headers.  This doesn't show up yet as
	most sim files don't include many system headers, but enabling sockser
	code for mingw uncovers the conflict.

	Unfortunately the error produced by gcc is inscrutable, but running
	it through the preprocessor manually manages to provide a pointer to
	the underlying issue.

	$ i686-w64-mingw32-gcc ... -c -o dv-sockser.o ../../../../sim/mips/../common/dv-sockser.c
	<command-line>: error: expected identifier or '(' before numeric constant
	In file included from /usr/i686-w64-mingw32/usr/include/windows.h:71,
	                 from /usr/i686-w64-mingw32/usr/include/winsock2.h:23,
	                 from ../../gnulib/import/sys/socket.h:684,
	                 from ../../gnulib/import/netinet/in.h:43,
	                 from ../../../../sim/mips/../common/dv-sockser.c:39:
	/usr/i686-w64-mingw32/usr/include/wingdi.h:2934:59: error: unknown type name 'LPSIZE'; did you mean 'LPSIZEL'?
	 2934 |   WINGDIAPI WINBOOL WINAPI GetAspectRatioFilterEx(HDC hdc,LPSIZE lpsize);
	      |                                                           ^~~~~~
	      |                                                           LPSIZEL
	...

	$ i686-w64-mingw32-gcc ... -E -dD -o dv-sockser.i ../../../../sim/mips/../common/dv-sockser.c
	$ i686-w64-mingw32-gcc -c dv-sockser.i
	In file included from /usr/i686-w64-mingw32/usr/include/windows.h:69,
	                 from /usr/i686-w64-mingw32/usr/include/winsock2.h:23,
	                 from ../../gnulib/import/sys/socket.h:684,
	                 from ../../gnulib/import/netinet/in.h:43,
	                 from ../../../../sim/mips/../common/dv-sockser.c:39:
	/usr/i686-w64-mingw32/usr/include/windef.h:104:9: error: expected identifier or '(' before numeric constant
	  104 | } SIZE,*PSIZE,*LPSIZE;
	      |         ^~

2021-09-09  Mike Frysinger  <vapier@gentoo.org>

	sim: ppc: switch to common warning flags
	Now that the ppc code has been cleaned up enough to use the same set
	of warning flags as the common code, delete the ppc-specific configure
	logic so we can leverage what the common code already defined for us.

2021-09-09  Tom de Vries  <tdevries@suse.de>

	sim: ppc: enable -Wpointer-sign warnings
	When compiling with --enable-werror and CFLAGS="-O0 -g -Wall", we run into:
	...
	src/sim/ppc/hw_memory.c: In function 'hw_memory_init_address':
	src/sim/ppc/hw_memory.c:204:7: error: pointer targets in passing argument 4 \
	  of 'device_find_integer_array_property' differ in signedness \
	  [-Werror=pointer-sign]
	       &new_chunk->size);
	       ^
	...

	Fix these by adding an explicit pointer cast.  It's a bit ugly to use APIs
	based on signed integers to read out unsigned values, but in practice, this
	is par for the course in the ppc code.

	We already use signed APIs and assign the result to unsigned values a lot:
	see how device_find_integer_property returns a signed integer (cell), but
	then assign it to unsigned types.  The array APIs are not used that often
	which is why we don't see many warnings, and we disable warnings when we
	assign signed integers to unsigned integers in general.

	The dtc/libfdt project (which is the standard in other projects) processes
	the fdt blob as a series of bytes without any type information.  Typing is
	left to the caller.  They have core APIs that read/write bytes, and a few
	helper functions to cast/convert those bytes to the right value (e.g. u32).
	In this ppc sim code, the core APIs use signed integers, and the callers
	convert to unsigned, usually implicitly.

	We could add some core APIs to the ppc sim that deal with raw bytes and then
	add some helpers to convert to the right type, but that seems like a lot of
	lifting for what boils down to a cast, and is effectively equivalent to all
	the implicit assignments we use elsewhere.  Long term, a lot of the ppc code
	should either get converted to existing sim common code, or we should stand
	up proper APIs in the common code first, or use standard libraries to do all
	the processing (e.g. libfdt).  Either way, this device.c code would all get
	deleted, and callers (like these hw_*.c files) would get converted.  Which
	is also why we go with a cast rather new (but largely unused) APIs.

2021-09-09  Mike Frysinger  <vapier@gentoo.org>

	sim: ppc: enable -Wmissing-declarations & -Wmissing-prototypes
	This aligns with common code which already uses this flag.  We have
	to add another local prototype to fix the failure, and add another
	local decl for the SIM_DESC type.  Unwinding these will require a
	lot more work & conversions in the process, so going with the decl
	for now unblocks the warning unification.

2021-09-09  Mike Frysinger  <vapier@gentoo.org>

	sim: microblaze: replace custom basic types with common ones
	The basic "byte" type conflicts with Windows headers, and we already
	have common types that provide the right sizes.  So replace these with
	the common ones to avoid issues.

	  CC     dv-sockser.o
	In file included from /usr/i686-w64-mingw32/usr/include/wtypes.h:8,
	                 from /usr/i686-w64-mingw32/usr/include/winscard.h:10,
	                 from /usr/i686-w64-mingw32/usr/include/windows.h:97,
	                 from /usr/i686-w64-mingw32/usr/include/winsock2.h:23,
	                 from ../../gnulib/import/sys/socket.h:684,
	                 from ../../gnulib/import/netinet/in.h:43,
	                 from .../build/sim/../../../sim/microblaze/../common/dv-sockser.c:39:
	/usr/i686-w64-mingw32/usr/include/rpcndr.h:63:25: error: conflicting types for 'byte'; have 'unsigned char'
	   63 |   typedef unsigned char byte;
	      |                         ^~~~
	In file included from .../buildsim/../../../sim/microblaze/sim-main.h:21,
	                 from .../buildsim/../../../sim/microblaze/../common/dv-sockser.c:24:
	.../buildsim/../../../sim/microblaze/microblaze.h:94:25: note: previous declaration of 'byte' with type 'byte' {aka 'char'}
	   94 | typedef char            byte;
	      |                         ^~~~
	make: *** [Makefile:513: dv-sockser.o] Error 1

2021-09-09  Jim Wilson  <jimw@sifive.com>

	RISC-V: Pretty print values formed with lui and addiw.
	The disassembler has support to pretty print values created by an lui/addi
	pair, but there is no support for addiw.  There is also no support for
	c.addi and c.addiw.  This patch extends the pretty printing support to
	handle these 3 instructions in addition to addi.  Existing testcases serve
	as tests for the new feature.

		opcodes/
		* riscv-dis.c (maybe_print_address): New arg wide.  Sign extend when
		wide is true.
		(print_insn_args): Fix calls to maybe_print_address.  Add checks for
		c.addi, c.addiw, and addiw, and call maybe_print_address for them.

		gas/
		* testsuite/gas/riscv/insn.d: Update for disassembler change.
		* testsuite/gas/li32.d, testsuite/gas/li64.d: Likwise.
		* testsuite/gas/lla64.d: Likewise.

2021-09-09  Mike Frysinger  <vapier@gentoo.org>

	sim: ppc: align format string settings with common code
	This copies logic used in the common sim warning configure code to fix
	build errors for mingw targets.  Turning format warnings on triggers
	a failure in the debug.c file, so apply a minor fix at the same time.

	sim: ppc: drop unnecessary config includes
	This file is compiled for the --host & --build system which leads to
	including the configure generated config.h in both environments.
	This obviously doesn't work when the two targets don't look alike at
	all and can cause build failures here (e.g. a mingw host & a linux
	build).  Since we don't actually need any config settings in this
	very simple file, drop the includes entirely.

2021-09-09  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-08  Mike Frysinger  <vapier@gentoo.org>

	gnulib: import various network functions
	Some sim ports use these to provide networking functionality via the
	dv-sockser module or via direct emulation for a few ports.

	Gdb seems to build just fine still too.

2021-09-08  Tom Tromey  <tromey@adacore.com>

	Fix unit test build on Windows
	Like Tom de Vries' earlier patch to fix the no-CXX_STD_THREAD case in
	maint.c, this patch fixes a similar problem in
	parallel-for-selftests.c.  This fixes a build failure on Windows.

2021-09-08  Alan Modra  <amodra@gmail.com>

	PowerPC64, sanity check r_offset in relocate_section
	This hardens the powerpc64 linker code transformations.

		* elf64-ppc.c (is_8byte_reloc, offset_in_range): New functions.
		(ppc64_elf_relocate_section): Sanity check r_offset before
		accessing section contents for various code transformations.

2021-09-08  Alan Modra  <amodra@gmail.com>

	PowerPC64: Avoid useless work on R_PPC64_TPREL34
	_bfd_elf_ppc_at_tprel_transform doesn't handle prefix instructions,
	and I'm not inclined to implement code editing for them.

		* elf64-ppc.c (ppc64_elf_relocate_section): Don't attempt tprel
		transform for R_PPC64_TPREL34.

2021-09-08  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: make thread_suspend_state::stop_pc optional
	Currently the stop_pc field of thread_suspect_state is a CORE_ADDR and
	when we want to indicate that there is no stop_pc available we set
	this field back to a special value.

	There are actually two special values used, in post_create_inferior
	the stop_pc is set to 0.  This is a little unfortunate, there are
	plenty of embedded targets where 0 is a valid pc value.  The more
	common special value for stop_pc though, is set in
	thread_info::set_executing, where the value (~(CORE_ADDR) 0) is used.

	This commit changes things so that the stop_pc is instead a
	gdb::optional.  We can now explicitly reset the field to an
	uninitialised state, we also have asserts that we don't read the
	stop_pc when its in an uninitialised state (both in
	gdbsupport/gdb_optional.h, when compiling with _GLIBCXX_DEBUG
	defined, and in thread_info::stop_pc).

	One situation where a thread will not have a stop_pc value is when the
	thread is stopped as a consequence of GDB being in all stop mode, and
	some other thread stopped at an interesting event.  When GDB brings
	all the other threads to a stop those other threads will not have a
	stop_pc set (thus avoiding an unnecessary read of the pc register).

	Previously, when GDB passed through handle_one (in infrun.c) the
	threads executing flag was set to false and the stop_pc field was left
	unchanged, i.e. it would (previous) have been left as ~0.

	Now, handle_one leaves the stop_pc with no value.

	This caused a problem when we later try to set these threads running
	again, in proceed() we compare the current pc with the cached stop_pc.
	If the thread was stopped via handle_one then the stop_pc would have
	been left as ~0, and the compare (in proceed) would (likely) fail.
	Now however, this compare tries to read the stop_pc when it has no
	value and this would trigger an assert.

	To resolve this I've added thread_info::stop_pc_p() which returns true
	if the thread has a cached stop_pc.  We should only ever call
	thread_info::stop_pc() if we know that there is a cached stop_pc,
	however, this doesn't mean that every call to thread_info::stop_pc()
	needs to be guarded with a call to thread_info::stop_pc_p(), in most
	cases we know that the thread we are looking at stopped due to some
	interesting event in that thread, and so, we know that the stop_pc is
	valid.

	After running the testsuite I've seen no other situations where
	stop_pc is read uninitialised.

	There should be no user visible changes after this commit.

2021-09-08  Tom de Vries  <tdevries@suse.de>

	[gdb/build] Fix build with undefined CXX_STD_THREAD
	When building gdb on openSUSE Leap 42.3, we trigger the case that
	CXX_STD_THREAD is undefined, and run into:
	...
	gdb/maint.c: In function 'void maintenance_show_worker_threads \
	  (ui_file*, int, cmd_list_element*, const char*)':
	gdb/maint.c:877:14: error: 'gdb::thread_pool' has not been declared
	         gdb::thread_pool::g_thread_pool->thread_count ());
	              ^
	Makefile:1647: recipe for target 'maint.o' failed
	make[1]: *** [maint.o] Error 1
	...

	Fix this by handling the undefined CXX_STD_THREAD case in
	maintenance_show_worker_threads, such that we get:
	...
	$ gdb -q -batch -ex "maint show worker-thread"
	The number of worker threads GDB can use is 0.
	...

	Tested on x86_64-linux.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28312

2021-09-08  Mike Frysinger  <vapier@gentoo.org>

	sim: update configure target list
	Fix sorting of the list, and update the globs to match the list used
	in gdb's configure script.

	gdb: cris: enable sim integration
	The sim side is already ready to go for cris, so wire it up.

	gdb: aarch64: enable sim integration
	The sim side is already ready to go for aarch64, so wire it up.

	gdb: sim: consolidate configure settings
	Moving all the sim settings to one section makes it easier to track,
	and makes it easier to keep it aligned with the sim target tests.
	The gdb logic was duplicating this when handling different OS targets
	instead of having a single cpu check.  Now it's more obvious that the
	sim is tied to a cpu and not related to the OS.

2021-09-08  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-07  Tom Tromey  <tromey@adacore.com>

	Remove unused declaration from gdbserver/win32-low.h
	I noticed that gdbserver/win32-low.h has an unused declaration.  This
	code was changed a while ago, but this declaration slipped through.
	This patch removes it.  Tested by rebuilding.

2021-09-07  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: make use of std::string in utils.c
	Replace some of the manual string management (malloc/free) with
	std::string when creating commands in utils.c.

	Things are a little bit messy as, creating the prefix commands (using
	add_basic_prefix_cmd and add_show_prefix_cmd), doesn't copy the doc
	string, while creating the actual set/show commands (using
	add_setshow_enum_cmd) does copy the doc string.

	As a result, I have retained the use of xstrprintf when creating the
	prefix command doc strings, but switched to using std::string when
	creating the actual set/show commands.

	There should be no user visible changes after this commit.

2021-09-07  Luis Machado  <luis.machado@linaro.org>

	Revert: [AArch64] MTE corefile support
	        bfd     * elf.c (elfcore_make_memtag_note_section): New function.
	                (elfcore_grok_note): Handle NT_MEMTAG note types.

	        binutils* readelf.c (get_note_type): Handle NT_MEMTAG note types.

	        include * elf/common.h (NT_MEMTAG): New constant.
	                (NT_MEMTAG_TYPE_AARCH_MTE): New constant.

2021-09-07  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: use bool instead of int in struct internal_problem
	Change struct internal_problem (gdb/utils.c) to use bool instead of
	int, update the 3 static instances of this structure that we create to
	use true/false instead of 1/0.

	I've also updated the comments on struct internal_problem as the
	existing comment doesn't seem to be referring to the structure, it
	talks about returning something, which doesn't make sense in this
	context.

	There should be no user visible changes after this commit.

2021-09-07  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: make thread_info::executing private
	Rename thread_info::executing to thread_info::m_executing, and make it
	private.  Add a new get/set member functions, and convert GDB to make
	use of these.

	The only real change of interest in this patch is in thread.c where I
	have deleted the helper function set_executing_thread, and now just
	use the new set function thread_info::set_executing.  However, the old
	helper function set_executing_thread included some code to reset the
	thread's stop_pc, so I moved this code into the new function
	thread_info::set_executing.  However, I don't believe there is
	anywhere that this results in a change of behaviour, previously the
	executing flag was always set true through a call to
	set_executing_thread anyway.

2021-09-07  Nick Clifton  <nickc@redhat.com>

	Fix an illegal memory access triggered by an atempt to disassemble a corrupt xtensa binary.
		PR 28305
		* elf32-xtensa.c (elf_xtensa_do_reloc): Add check for put of range
		reloc.

2021-09-07  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb/python: new function to add values into GDB's history
	The guile API has (history-append! <value>) to add values into GDB's
	history list.  There is currently no equivalent in the Python API.

	This commit adds gdb.add_history(<value>) to the Python API, this
	function takes <value> a gdb.Value (or anything that can be passed to
	the constructor of gdb.Value), and adds the value it represents to
	GDB's history list.  The index of the newly added value is returned.

2021-09-07  Nick Clifton  <nickc@redhat.com>

	Fix illegal memory access triggered by an attempt to disassemble a corrupt RISC-V binary.
		PR 28303
		* elfxx-riscv.c (riscv_elf_add_sub_reloc): Add check for out of
		range relocs.

2021-09-07  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Handle internal-error in gdb_unload
	When reverting commit 5a20fadc841 and using gdb_unload instead of runto "bar"
	to trigger the internal-error in test-case
	gdb.dwarf2/locexpr-data-member-location.exp, we run into:
	...
	ERROR: couldn't unload file in $gdb (timeout).
	...
	and the test-case takes about 1 minute.

	Fix this by handling internal-error in gdb_unload, such that we have:
	...
	ERROR: Couldn't unload file in $gdb (GDB internal error).
	ERROR: Could not resync from internal error (eof)
	...
	within 2 seconds.

	Tested on x86_64-linux.

2021-09-07  Alan Modra  <amodra@gmail.com>

	PR28307, segfault in ppc64_elf_toc64_reloc
	Adds missing bfd_reloc_offset_in_range checks to various relocation
	special_functions.

		PR 28307
		* elf32-ppc.c (ppc_elf_addr16_ha_reloc): Range check reloc offset.
		* elf64-ppc.c (ppc64_elf_ha_reloc, ppc64_elf_brtaken_reloc): Likewise.
		(ppc64_elf_toc64_reloc, ppc64_elf_prefix_reloc): Likewise.

2021-09-07  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-07  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Handle internal-error in gdb_run_cmd
	When reverting commit 5a20fadc841 the test-case
	gdb.dwarf2/locexpr-data-member-location.exp fails like this:
	...
	FAIL: gdb.dwarf2/locexpr-data-member-location.exp: running to bar in runto \
	  (GDB internal error)
	ERROR: Could not resync from internal error (eof)
	...
	and takes 1 minute to run.

	The long running time is caused by running into a timeout in gdb_run_cmd, at
	this point:
	...
	(gdb) run ^M
	The program being debugged has been started already.^M
	Start it from the beginning? (y or n) y^M
	/home/vries/gdb_versions/devel/src/gdb/gdbtypes.c:5583: internal-error: \
	  Unexpected type field location kind: 4^M
	A problem internal to GDB has been detected,^M
	further debugging may prove unreliable.^M
	Quit this debugging session? (y or n)
	...

	Fix this by detecting the internal-error in gdb_run_cmd.  We don't handle it
	in gdb_run_cmd, but stash the gdb output back into the buffer using
	-notransfer, and let the caller proc runto deal with it.

	After the fix, the test-case just takes 2 seconds.

	Tested on x86_64-linux.

2021-09-06  Lancelot SIX  <lsix@lancelotsix.com>

	gdb: rename gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-ld-lw.c
	A previous commit added the
	gdb.arch/riscv64-unwind-prologue-with-ld-lw.exp testcase, but one of its
	associated file was named after a previous version of the test.

	This commit fixes this and makes sure that all the files linked to this
	testcase share the same prefix in the name.

	Tested on riscv64 GNU/Linux.

2021-09-06  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Handle eof in gdb_internal_error_resync
	Before commit 5a20fadc841 the test-case
	gdb.dwarf2/locexpr-data-member-location.exp fails like this:
	...
	FAIL: gdb.dwarf2/locexpr-data-member-location.exp: running to bar in runto \
	  (GDB internal error)
	ERROR: : spawn id exp9 not open
	    while executing
	"expect {
	-i exp9 -timeout 10
	            -re "Quit this debugging session\\? \\(y or n\\) $" {
	                send_gdb "n\n" answer
	                incr count
	            }
	            -re "Create ..."
	    ("uplevel" body line 1)
	    invoked from within
	"uplevel $body" NONE : spawn id exp9 not open
	ERROR: Could not resync from internal error (timeout)
	...

	Fix the:
	...
	ERROR: : spawn id exp9 not open
	...
	by handling eof in gdb_internal_error_resync, such that we have instead:
	...
	FAIL: gdb.dwarf2/locexpr-data-member-location.exp: running to bar in runto \
	  (GDB internal error)
	ERROR: Could not resync from internal error (eof)
	...

	Tested on x86_64-linux.

2021-09-06  Tom Tromey  <tom@tromey.com>

	Remove some complaints.h includes
	There are a few includes of complaints.h that aren't necessary.  This
	patch removes them.  Tested by rebuilding.

2021-09-06  Nick Clifton  <nickc@redhat.com>

	Fix an illegal memory access triggered by disassembling corrupt s390x binaries.
		PR 28304
		* elfxx-score7.c (score_elf_gprel15_reloc): If there is no output bfd
		treat the reloc as undefined.

	Fix potential use on an uninitialised vairable in the MCore assembler.

	Fix potential uninitialised variable in microblaze assembler code.

2021-09-06  Yinjun Zhang  <yinjun.zhang@corigine.com>

	Add a sanity check to the init_nfp6000_mecsr_sec() function in the NFP disassembler.

2021-09-06  Alexandra Hájková  <ahajkova@redhat.com>

	gdbtypes.c: Add the case for FIELD_LOC_KIND_DWARF_BLOCK
	The case for FIELD_LOC_KIND_DWARF_BLOCK was missing for
	switch TYPE_FIELD_LOC_KIND. Thas caused an internal-error
	under some circumstances.

	Fixes bug 28030.

2021-09-06  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-05  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-04  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Check avx support in gdb.arch/amd64-disp-step-avx.exp
	On a machine on Open Build Service I'm running into a SIGILL for test-case
	gdb.arch/amd64-disp-step-avx.exp:
	...
	Program received signal SIGILL, Illegal instruction.^M
	test_rip_vex2 () at gdb.arch/amd64-disp-step-avx.S:40^M
	40              vmovsd ro_var(%rip),%xmm0^M
	(gdb) FAIL: gdb.arch/amd64-disp-step-avx.exp: vex2: \
	  continue to test_rip_vex2_end
	...
	The SIGILL happens when trying to execute the first avx instruction in the
	executable.

	I can't directly access the machine, but looking at the log for test-case
	gdb.arch/i386-avx.exp, it seems that there's no avx support:
	...
	Breakpoint 1, main (argc=1, argv=0x7fffffffd6b8) at gdb.arch/i386-avx.c:68^M
	68        if (have_avx ())^M
	(gdb) print have_avx ()^M
	$1 = 0^M
	...

	Fix this by:
	- adding a gdb_caching_proc have_avx, similar to have_mpx, using the have_avx
	  function from gdb.arch/i386-avx.c
	- using proc have_avx in both gdb/testsuite/gdb.arch/amd64-disp-step-avx.exp
	  and gdb/testsuite/gdb.arch/i386-avx.exp.

	Tested on my x86_64-linux laptop with avx support, where both test-cases pass.

	gdb/testsuite/ChangeLog:

	2021-09-04  Tom de Vries  <tdevries@suse.de>

		PR testsuite/26950
		* gdb/testsuite/gdb.arch/i386-avx.c (main): Remove call to have_avx.
		(have_avx): Move ...
		* gdb/testsuite/lib/gdb.exp (have_avx): ... here.  New proc.
		* gdb/testsuite/gdb.arch/amd64-disp-step-avx.exp: Use have_avx.
		* gdb/testsuite/gdb.arch/i386-avx.exp: Same.

2021-09-04  Mike Frysinger  <vapier@gentoo.org>

	gnulib: import sys_wait
	A few sims use this to emulate process syscalls.
	Gdb builds seem to still be fine.

2021-09-04  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-03  Tom Tromey  <tromey@adacore.com>

	Use CORE_ADDR as return type from x86_dr_low_get_addr
	On a Windows build locally, watchpoints started failing.  I tracked
	this down to x86_dr_low_get_addr returning an 'unsigned long'... in
	this particular build, this is a 32-bit type, but the inferior is a
	64-bit program.

	This patch fixes the problem by changing the return type.  No other
	change is required, because this matches the function pointer in
	struct x86_dr_low_type.

2021-09-03  Kevin Buettner  <kevinb@redhat.com>

	Test case reproducing PR28030 bug
	The original reproducer for PR28030 required use of a specific
	compiler version - gcc-c++-11.1.1-3.fc34 is mentioned in the PR,
	though it seems probable that other gcc versions might also be able to
	reproduce the bug as well.  This commit introduces a test case which,
	using the DWARF assembler, provides a reproducer which is independent
	of the compiler version.  (Well, it'll work with whatever compilers
	the DWARF assembler works with.)

	To the best of my knowledge, it's also the first test case which uses
	the DWARF assembler to provide debug info for a shared object.  That
	being the case, I provided more than the usual commentary which should
	allow this case to be used as a template when a combo shared
	library / DWARF assembler test case is required in the future.

	I provide some details regarding the bug in a comment near the
	beginning of locexpr-dml.exp.

	This problem was difficult to reproduce; I found myself constantly
	referring to the backtrace while trying to figure out what (else) I
	might be missing while trying to create a reproducer.  Below is a
	partial backtrace which I include for posterity.

	 #0  internal_error (
	    file=0xc50110 "/ironwood1/sourceware-git/f34-pr28030/bld/../../worktree-pr28030/gdb/gdbtypes.c", line=5575,
	    fmt=0xc520c0 "Unexpected type field location kind: %d")
	    at /ironwood1/sourceware-git/f34-pr28030/bld/../../worktree-pr28030/gdbsupport/errors.cc:51
	 #1  0x00000000006ef0c5 in copy_type_recursive (objfile=0x1635930,
	    type=0x274c260, copied_types=0x30bb290)
	    at /ironwood1/sourceware-git/f34-pr28030/bld/../../worktree-pr28030/gdb/gdbtypes.c:5575
	 #2  0x00000000006ef382 in copy_type_recursive (objfile=0x1635930,
	    type=0x274ca10, copied_types=0x30bb290)
	    at /ironwood1/sourceware-git/f34-pr28030/bld/../../worktree-pr28030/gdb/gdbtypes.c:5602
	 #3  0x0000000000a7409a in preserve_one_value (value=0x24269f0,
	    objfile=0x1635930, copied_types=0x30bb290)
	    at /ironwood1/sourceware-git/f34-pr28030/bld/../../worktree-pr28030/gdb/value.c:2529
	 #4  0x000000000072012a in gdbscm_preserve_values (
	    extlang=0xc55720 <extension_language_guile>, objfile=0x1635930,
	    copied_types=0x30bb290)
	    at /ironwood1/sourceware-git/f34-pr28030/bld/../../worktree-pr28030/gdb/guile/scm-value.c:94
	 #5  0x00000000006a3f82 in preserve_ext_lang_values (objfile=0x1635930,
	    copied_types=0x30bb290)
	    at /ironwood1/sourceware-git/f34-pr28030/bld/../../worktree-pr28030/gdb/extension.c:568
	 #6  0x0000000000a7428d in preserve_values (objfile=0x1635930)
	    at /ironwood1/sourceware-git/f34-pr28030/bld/../../worktree-pr28030/gdb/value.c:2579
	 #7  0x000000000082d514 in objfile::~objfile (this=0x1635930,
	    __in_chrg=<optimized out>)
	    at /ironwood1/sourceware-git/f34-pr28030/bld/../../worktree-pr28030/gdb/objfiles.c:549
	 #8  0x0000000000831cc8 in std::_Sp_counted_ptr<objfile*, (__gnu_cxx::_Lock_policy)2>::_M_dispose (this=0x1654580)
	    at /usr/include/c++/11/bits/shared_ptr_base.h:348
	 #9  0x00000000004e6617 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x1654580) at /usr/include/c++/11/bits/shared_ptr_base.h:168
	 #10 0x00000000004e1d2f in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x190bb88, __in_chrg=<optimized out>)
	    at /usr/include/c++/11/bits/shared_ptr_base.h:705
	 #11 0x000000000082feee in std::__shared_ptr<objfile, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x190bb80, __in_chrg=<optimized out>)
	    at /usr/include/c++/11/bits/shared_ptr_base.h:1154
	 #12 0x000000000082ff0a in std::shared_ptr<objfile>::~shared_ptr (
	    this=0x190bb80, __in_chrg=<optimized out>)
	    at /usr/include/c++/11/bits/shared_ptr.h:122
	 #13 0x000000000085ed7e in __gnu_cxx::new_allocator<std::_List_node<std::shared_ptr<objfile> > >::destroy<std::shared_ptr<objfile> > (this=0x114bc00,
	    __p=0x190bb80) at /usr/include/c++/11/ext/new_allocator.h:168
	 #14 0x000000000085e88d in std::allocator_traits<std::allocator<std::_List_node<std::shared_ptr<objfile> > > >::destroy<std::shared_ptr<objfile> > (__a=...,
	    __p=0x190bb80) at /usr/include/c++/11/bits/alloc_traits.h:531
	 #15 0x000000000085e50c in std::__cxx11::list<std::shared_ptr<objfile>, std::allocator<std::shared_ptr<objfile> > >::_M_erase (this=0x114bc00, __position=
	  std::shared_ptr<objfile> (expired, weak count 1) = {get() = 0x1635930})
	    at /usr/include/c++/11/bits/stl_list.h:1925
	 #16 0x000000000085df0e in std::__cxx11::list<std::shared_ptr<objfile>, std::allocator<std::shared_ptr<objfile> > >::erase (this=0x114bc00, __position=
	  std::shared_ptr<objfile> (expired, weak count 1) = {get() = 0x1635930})
	    at /usr/include/c++/11/bits/list.tcc:158
	 #17 0x000000000085c748 in program_space::remove_objfile (this=0x114bbc0,
	    objfile=0x1635930)
	    at /ironwood1/sourceware-git/f34-pr28030/bld/../../worktree-pr28030/gdb/progspace.c:210
	 #18 0x000000000082d3ae in objfile::unlink (this=0x1635930)
	    at /ironwood1/sourceware-git/f34-pr28030/bld/../../worktree-pr28030/gdb/objfiles.c:487
	 #19 0x000000000082e68c in objfile_purge_solibs ()
	    at /ironwood1/sourceware-git/f34-pr28030/bld/../../worktree-pr28030/gdb/objfiles.c:875
	 #20 0x000000000092dd37 in no_shared_libraries (ignored=0x0, from_tty=1)
	    at /ironwood1/sourceware-git/f34-pr28030/bld/../../worktree-pr28030/gdb/solib.c:1236
	 #21 0x00000000009a37fe in target_pre_inferior (from_tty=1)
	    at /ironwood1/sourceware-git/f34-pr28030/bld/../../worktree-pr28030/gdb/target.c:2496
	 #22 0x00000000007454d6 in run_command_1 (args=0x0, from_tty=1,
	    run_how=RUN_NORMAL)
	    at /ironwood1/sourceware-git/f34-pr28030/bld/../../worktree-pr28030/gdb/infcmd.c:437

	I'll note a few points regarding this backtrace:

	Frame #1 is where the internal error occurs.  It's caused by an
	unhandled case for FIELD_LOC_KIND_DWARF_BLOCK.  The fix for this bug
	adds support for this case.

	Frame #22 - it's a partial backtrace - shows that GDB is attempting to
	(re)run the program.  You can see the exact command sequence that was
	used for reproducing this problem in the PR (at
	https://sourceware.org/bugzilla/show_bug.cgi?id=28030), but in a
	nutshell, after starting the program and advancing to the appropriate
	source line, GDB was asked to step into libstdc++; a "finish" command
	was issued, returning a value.  The fact that a value was returned is
	very important.  GDB was then used to step back into libstdc++.  A
	breakpoint was set on a source line in the library after which a "run"
	command was issued.

	Frame #19 shows a call to objfile_purge_solibs.  It's aptly named.

	Frame #7 is a call to the destructor for one of the objfile solibs; it
	turned out to be the one for libstdc++.

	Frames #6 thru #3 show various value preservation frames.  If you look
	at preserve_values() in gdb/value.c, the value history is preserved
	first, followed by internal variables, followed by values for the
	extension languages (python and guile).

2021-09-03  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add untested case in gdb.gdb/complaints.exp
	When building gdb with "-Wall -O2 -g -flto=auto", I run into:
	...
	(gdb) call clear_complaints()^M
	No symbol "clear_complaints" in current context.^M
	(gdb) FAIL: gdb.gdb/complaints.exp: clear complaints
	...

	The problem is that lto has optimized away clear_complaints, and consequently
	the selftests cannot run.

	Fix this by:
	- using info function to detect presence of clear_complaints
	- handling the absence of clear_complaints by calling untested
	...
	(gdb) UNTESTED: gdb.gdb/complaints.exp: \
	  Cannot find clear_complaints, skipping test
	...

	Tested on x86_64-linux.

	gdb/testsuite/ChangeLog:

	2021-09-03  Tom de Vries  <tdevries@suse.de>

		* gdb.gdb/complaints.exp: Use untested if clear_complaints cannot
		be found.

2021-09-03  Felix Willgerodt  <felix.willgerodt@intel.com>

	gdb: Enable finish command and inferior calls for _Float16 on amd64 and i386.
	Values of type _Float16 and _Float16 _Complex can now be used on CPUs with
	AVX512-FP16 support. Return values of those types are located in XMM0.
	Compiler support for gcc and clang is in progress, see e.g.:
	https://gcc.gnu.org/pipermail/gcc-patches/2021-July/574117.html

	gdb/ChangeLog:
	2021-07-21  Felix Willgerodt  <Felix.Willgerodt@intel.com>

		* amd64-tdep.c (amd64_classify): Classify _Float16 and
		_Float16 _Complex as AMD64_SSE.
		* i386-tdep.c (i386_extract_return_value): Read _Float16 and
		_Float16 _Complex from xmm0.

	gdb/testsuite/ChangeLog:
	2021-07-21  Felix Willgerodt  <Felix.Willgerodt@intel.com>

		* gdb.arch/x86-avx512fp16-abi.c: New file.
		* gdb.arch/x86-avx512fp16-abi.exp: New file.

2021-09-03  Felix Willgerodt  <felix.willgerodt@intel.com>

	Add half support for AVX512 register view.
	This adds support for the half datatype, FP16, to the AVX512 register printing.

	gdb/ChangeLog:
	2020-07-21  Felix Willgerodt  <Felix.Willgerodt@intel.com>

		* i386-tdep.c (i386_zmm_type) <v32_half>: New field.
		(i386_ymm_type) <v16_half>: New field.
		(i386_gdbarch_init): Add set_gdbarch_half_format.
		* features/i386/64bit-avx512.xml: Add half type.
		* features/i386/64bit-avx512.c: Regenerated.
		* features/i386/64bit-sse.xml: Add half type.
		* features/i386/64bit-sse.c: Regenerated.

	gdb/testsuite/ChangeLog:
	2021-07-21  Felix Willgerodt  <Felix.Willgerodt@intel.com>

		* gdb.arch/x86-avx512fp16.c: New file.
		* gdb.arch/x86-avx512fp16.exp: New file.
		* lib/gdb.exp (skip_avx512fp16_tests): New function.

2021-09-03  Felix Willgerodt  <felix.willgerodt@intel.com>

	gdb, i386: Enable AVX512-bfloat16 for i386 targets.
	Values of type bfloat16 can also be used on 32-bit targets, which was missed
	in the original enablement.  This also adjusts the testcase to pass with
	"unix/-m32", where only the lower 8 AVX registers are available.

	gdb/ChangeLog:
	2021-07-21  Felix Willgerodt  <Felix.Willgerodt@intel.com>

		* features/i386/32bit-sse.xml: Add bfloat16 type.
		* features/i386/32bit-sse.c: Regenerated.

	gdb/testsuite/ChangeLog:
	2021-07-21  Felix Willgerodt  <Felix.Willgerodt@intel.com>

		* gdb.arch/x86-avx512bf16.exp: Only use x/z/ymm 0-7.

2021-09-03  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add untested case in selftest_setup
	When building gdb with "-Wall -O2 -g -flto=auto", I run into:
	...
	FAIL: gdb.gdb/python-helper.exp: breakpoint in captured_main \
	  (got interactive prompt)
	FAIL: gdb.gdb/python-helper.exp: run until breakpoint at captured_main
	WARNING: Couldn't test self
	...
	and similar in gdb.gdb/selftest.exp.

	The first FAIL in more detail:
	...
	(gdb) break captured_main^M
	Function "captured_main" not defined.^M
	Make breakpoint pending on future shared library load? (y or [n]) n^M
	(gdb) FAIL: gdb.gdb/python-helper.exp: breakpoint in captured_main \
	  (got interactive prompt)
	...

	The problem is that lto has optimized away the captured_main function
	and consequently the selftests dependent on that cannot run.

	Fix this by:
	- using gdb_breakpoint to detect failure to set the breakpoint
	- handling the failure to set a breakpoint by calling untested
	- not emitting the warning if we've already got untested
	such that we have:
	...
	(gdb) UNTESTED: gdb.gdb/python-helper.exp: Cannot set breakpoint at \
	  captured_main, skipping testcase.
	...

	gdb/testsuite/ChangeLog:

	2021-09-02  Tom de Vries  <tdevries@suse.de>

		* lib/selftest-support.exp: Emit untested when not being able to set
		breakpoint.

2021-09-03  Alan Modra  <amodra@gmail.com>

	ld testsuite tidy
	Fixes a few issues:
	1) If you use "-fsanitize=address,undefined" in CFLAGS, the Makefile
	attempt to trim off -fsanitize options left us with ",undefined".
	2) ld_compile adds CFLAGS_FOR_TARGET itself, no need to pass it.
	3) CFLAGS might be needed linking bootstrap test.

		* Makefile.am (CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Trim off
		all -fsanitize=*.
		* Makefile.in: Regenerate.
		* testsuite/ld-bootstrap/bootstrap.exp: Use CFLAGS when linking.
		* testsuite/ld-cdtest/cdtest.exp: Use CFLAGS_FOR_TARGET when
		linking.
		* testsuite/ld-auto-import/auto-import.exp: Don't pass
		CFLAGS_FOR_TARGET to ld_compile.
		* testsuite/ld-cygwin/exe-export.exp: Likewise.
		* testsuite/ld-elfvers/vers.exp: Likewise.
		* testsuite/ld-elfvsb/elfvsb.exp: Likewise.
		* testsuite/ld-elfweak/elfweak.exp: Likewise.
		* testsuite/ld-gc/gc.exp: Likewise.
		* testsuite/ld-pe/pe-compile.exp: Likewise.
		* testsuite/ld-pe/pe-run.exp: Likewise.
		* testsuite/ld-pe/pe-run2.exp: Likewise.
		* testsuite/ld-plugin/plugin.exp: Likewise.
		* testsuite/ld-shared/shared.exp: Likewise.
		* testsuite/ld-elfcomm/elfcomm.exp: Likewise, and don't allow
		nios2 testing to trash CFLAGS_FOR_TARGET.
		* testsuite/ld-scripts/crossref.exp: Don't pass options in
		CC_FOR_TARGET, do so in CFLAGS_FOR_TARGET instead.
		* testsuite/ld-srec/srec.exp: Likewise, and for CXX.

2021-09-03  Alan Modra  <amodra@gmail.com>

	CC_FOR_TARGET et al
	The top level Makefile, the ld Makefile and others, define
	CC_FOR_TARGET to be a compiler for the binutils target machine.  This
	is the compiler that should be used for almost all tests with C
	source.  There are _FOR_TARGET versions of CFLAGS, CXX, and CXXFLAGS
	too.  This was all supposed to work with the testsuite .exp files
	using CC for the target compiler, and CC_FOR_HOST for the host
	compiler, with the makefiles passing CC=$CC_FOR_TARGET and
	CC_FOR_HOST=$CC to the runtest invocation.

	One exception to the rule of using CC_FOR_TARGET is the native-only ld
	bootstrap test, which uses the newly built ld to link a copy of
	itself.  Since the files being linked were created with the host
	compiler, the boostrap test should use CC and CFLAGS, in case some
	host compiler option provides needed libraries automatically.
	However, bootstrap.exp used CC where it should have used CC_FOR_HOST.
	I set about fixing that problem, then decided that playing games in
	the makefiles with CC was a bad idea.  Not only is it confusing, but
	other dejagnu code knows about CC_FOR_TARGET.  See dejagnu/target.exp.

	So this patch gets rid of the makefile variable renaming and changes
	all the .exp files to use the correct _FOR_TARGET variables.
	CC_FOR_HOST and CFLAGS_FOR_HOST disappear.  A followup patch will
	correct bootstrap.exp to use CFLAGS, and a number of other things I
	noticed.

	binutils/
		* testsuite/lib/binutils-common.exp (run_dump_test): Use
		CC_FOR_TARGET and CFLAGS_FOR_TARGET rather than CC and CFLAGS.
	ld/
		* Makefile.am (check-DEJAGNU): Don't set CC to CC_FOR_TARGET
		and similar.  Pass variables with unchanged names.  Don't set
		CC_FOR_HOST or CFLAGS_FOR_HOST.
		* Makefile.in: Regenerate.
		* testsuite/config/default.exp: Update default CC and similar.
		(compiler_supports, plug_opt): Use CC_FOR_TARGET.
		* testsuite/ld-cdtest/cdtest.exp: Replace all uses of CC with
		CC_FOR_TARGET, and similarly for CFLAGS, CXX and CXXFLAGS.
		* testsuite/ld-auto-import/auto-import.exp: Likewise.
		* testsuite/ld-cygwin/exe-export.exp: Likewise.
		* testsuite/ld-elf/dwarf.exp: Likewise.
		* testsuite/ld-elf/indirect.exp: Likewise.
		* testsuite/ld-elf/shared.exp: Likewise.
		* testsuite/ld-elfcomm/elfcomm.exp: Likewise.
		* testsuite/ld-elfvers/vers.exp: Likewise.
		* testsuite/ld-elfvsb/elfvsb.exp: Likewise.
		* testsuite/ld-elfweak/elfweak.exp: Likewise.
		* testsuite/ld-gc/gc.exp: Likewise.
		* testsuite/ld-ifunc/ifunc.exp: Likewise.
		* testsuite/ld-mn10300/mn10300.exp: Likewise.
		* testsuite/ld-pe/pe-compile.exp: Likewise.
		* testsuite/ld-pe/pe-run.exp: Likewise.
		* testsuite/ld-pe/pe-run2.exp: Likewise.
		* testsuite/ld-pie/pie.exp: Likewise.
		* testsuite/ld-plugin/lto.exp: Likewise.
		* testsuite/ld-plugin/plugin.exp: Likewise.
		* testsuite/ld-scripts/crossref.exp: Likewise.
		* testsuite/ld-selective/selective.exp: Likewise.
		* testsuite/ld-sh/sh.exp: Likewise.
		* testsuite/ld-shared/shared.exp: Likewise.
		* testsuite/ld-srec/srec.exp: Likewise.
		* testsuite/ld-undefined/undefined.exp: Likewise.
		* testsuite/ld-unique/unique.exp: Likewise.
		* testsuite/ld-x86-64/tls.exp: Likewise.
		* testsuite/lib/ld-lib.exp: Likewise.
	libctf/
		* Makefile.am (check-DEJAGNU): Don't set CC to CC_FOR_TARGET.
		Pass CC and CC_FOR_TARGET.  Don't set CC_FOR_HOST.
		* Makefile.in: Regenerate.
		* testsuite/config/default.exp: Update default CC and similar.
		* testsuite/lib/ctf-lib.exp (run_native_host_cmd): Use CC rather
		than CC_FOR_HOST.
		(run_lookup_test): Use CC_FOR_TARGET and CFLAGS_FOR_TARGET.

2021-09-03  Alan Modra  <amodra@gmail.com>

	pj: asan: out of bounds, ubsan: left shift of negative
		* pj-dis.c: Include libiberty.h.
		(print_insn_pj): Don't index op->arg past array bound.  Don't
		left shift negative int.

	ubsan: alpha: member access within null pointer
		* elf64-alpha.c (elf64_alpha_relax_with_lituse): Avoid UB.

	ubsan: libctf: applying zero offset to null pointer
		* ctf-open.c (init_symtab): Avoid ubsan error.

2021-09-03  Alan Modra  <amodra@gmail.com>

	haiku tidy
	--enable-maintainer-mode showed a number of files needing to be
	regenerated, and in the case of ld/Makefile.in that the file was
	regenerated by hand.  Nothing to see here really.

	ld/
		* Makefile.am (ALL_64_EMULATION_SOURCES): Sort haiku entry.
		* Makefile.in: Regenerate.
		* po/BLD-POTFILES.in: Regenerate.
	libctf/
		* configure: Regenerate.
	zlib/
		* configure: Regenerate.

2021-09-03  Fangrui Song  <maskray@google.com>

	gold: --export-dynamic-symbol: don't imply -u
	to match GNU ld.

	gold/
		* archive.cc (Library_base::should_include_member): Don't handle
		--export-dynamic-symbol.
		* symtab.cc (Symbol_table::do_add_undefined_symbols_from_command_line):
		Likewise.

2021-09-03  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-02  Alexander von Gluck IV  <kallisti5@unixzen.com>

	Add support for the haiku operating system.  These are the os support patches we have been grooming and maintaining for quite a few years over on git.haiku-os.org.  All of these architectures are working and most have been stable for quite some time.

2021-09-02  Nick Clifton  <nickc@redhat.com>

	Fix the V850 assembler's generation of relocations for the st.b instruction.
		PR 28292
	gas	* config/tc-v850.c (handle_lo16): Also accept
		BFD_RELOC_V850_LO16_SPLIT_OFFSET.
		* testsuite/gas/v850/split-lo16.s: Add extra line.
		* testsuite/gas/v850/split-lo16.d: Update expected disassembly.

	opcodes	* v850-opc.c (D16): Use BFD_RELOC_V850_LO16_SPLIT_OFFSET in place
		of BFD_RELOC_16.

2021-09-02  Alan Modra  <amodra@gmail.com>

	SHT_SYMTAB_SHNDX handling
	.symtab_shndx section contents is an array, one entry for each symbol
	in .symtab, present when the number of symbols exceeds a little less
	than 64k.  Since the mapping is 1-1 with symbols there is no need to
	keep both dest_index and destshndx_index in elf_sym_strtab.  Instead,
	just make sure that the shndx pointers to the swap functions are kept
	NULL when .symtab_shndx does not exist.  Also, strtabcount in the
	linker's elf hash table is incremented in lock-step with the output
	symcount, so that can disappear too.

2021-09-02  Alan Modra  <amodra@gmail.com>

	PTR_ADD and NPTR_ADD for bfd.h
	This defines a couple of macros used to avoid ubsan complaints about
	calculations involving NULL pointers.  PTR_ADD should be used in the
	case where it is known that the offset is always zero with a NULL
	pointer, and you'd like to know if a non-zero offset is ever used.
	NPTR_ADD should be rarely used, but is defined for cases where a
	non-zero offset is expected and should be ignored if the pointer is
	NULL.

	bfd/
		* bfd-in.h (PTR_ADD, NPTR_ADD): Define.
		* bfd-in2.h: Regenerate.
		* elf-eh-frame.c (adjust_eh_frame_local_symbols): Avoid NULL
		pointer calculations.
		* elflink.c (_bfd_elf_strip_zero_sized_dynamic_sections): Likewise.
		(bfd_elf_add_dt_needed_tag, elf_finalize_dynstr): Likewise.
		(elf_link_add_object_symbols, elf_link_input_bfd): Likewise.
		(bfd_elf_final_link, bfd_elf_gc_record_vtinherit): Likewise.
	binutils/
		* objdump.c (disassemble_section): Use PTR_ADD for rel_ppend.

2021-09-02  Alan Modra  <amodra@gmail.com>

	obstack.h __PTR_ALIGN vs. ubsan
	Current ubsan complains on every use of __PTR_ALIGN (when ptrdiff_t is
	as large as a pointer), due to making calculations relative to a NULL
	pointer.  This patch avoids the problem by extracting out and
	simplifying __BPTR_ALIGN for the usual case.  I've continued to use
	ptrdiff_t here, where it might be better to throw away __BPTR_ALIGN
	entirely and just assume uintptr_t exists.

		* obstack.h (__PTR_ALIGN): Expand and simplify __BPTR_ALIGN
		rather than calculating relative to a NULL pointer.

2021-09-02  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-09-01  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix dwo path in fission-*.S
	[ Using $build for /home/vries/gdb_versions/devel/build to make things a bit
	more readable. ]

	When using make check// to run test-case gdb.dwarf2/fission-base.exp:
	...
	( cd $build/gdb; make check//unix RUNTESTFLAGS="fission-base.exp" )
	...
	we run into:
	...
	(gdb) file \
	  $build/gdb/testsuite.unix/outputs/gdb.dwarf2/fission-base/fission-base^M
	Reading symbols from \
	  $build/gdb/testsuite.unix/outputs/gdb.dwarf2/fission-base/fission-base...^M
	warning: Could not find DWO CU \
	  $build/gdb/testsuite.1/outputs/gdb.dwarf2/fission-base/fission-base.dwo \
	  (0x807060504030201) referenced by CU at offset 0xc7 [in module \
	  $build/gdb/testsuite.unix/outputs/gdb.dwarf2/fission-base/fission-base]^M
	...

	The problem is that the executable refers to the dwo file using path name
	$build/gdb/testsuite.1/outputs/gdb.dwarf2/fission-base/fission-base.dwo,
	while the actual dwo file is at
	$build/gdb/testsuite.unix/outputs/gdb.dwarf2/fission-base/fission-base.dwo.

	This is caused by this trick in fission-base.S:
	...
	 #define XSTR(s) STR(s)
	 #define STR(s) #s
	   ...
	   .asciz XSTR(DWO)        # DW_AT_GNU_dwo_name
	...
	and:
	...
	$ echo | gcc -E -dD - | grep "define unix"
	...

	I used this trick to avoid doing additional_flags=-DDWO=\"$dwo\", since I was
	concerned that there could be quoting issues.

	However, I've found other uses of this pattern, f.i. in
	gdb/testsuite/gdb.base/corefile-buildid.exp:
	...
	  additional_flags=-DSHLIB_NAME=\"$dlopen_lib\"]
	...

	So, fix this by:
	- using additional_flags=-DDWO=\"$dwo\" and
	- using plain DWO instead of XSTR(DWO)

	Likewise in other gdb.dwarf2/fission*.exp test-cases.

	Tested on x86_64-linux, using make check//unix.

	gdb/testsuite/ChangeLog:

	2021-09-01  Tom de Vries  <tdevries@suse.de>

		PR testsuite/28298
		* gdb.dwarf2/fission-base.S: Use DWO instead of XSTR(DWO).
		* gdb.dwarf2/fission-loclists-pie.S: Same.
		* gdb.dwarf2/fission-loclists.S: Same.
		* gdb.dwarf2/fission-reread.S: Same.
		* gdb.dwarf2/fission-base.exp: Use additional_flags=-DDWO=\"$dwo\".
		* gdb.dwarf2/fission-loclists-pie.exp: Same.
		* gdb.dwarf2/fission-loclists.exp: Same.
		* gdb.dwarf2/fission-reread.exp: Same.

2021-09-01  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.fortran/call-no-debug.exp symbol search
	On openSUSE Tumbleweed I ran into:
	...
	(gdb) ptype outstring_func.part^M
	No symbol "outstring_func" in current context.^M
	(gdb) FAIL: gdb.fortran/call-no-debug.exp: ptype outstring_func.part
	...
	while on openSUSE Leap 15.2 I have instead:
	...
	(gdb) ptype string_func_^M
	type = <unknown return type> ()^M
	(gdb) PASS: gdb.fortran/call-no-debug.exp: ptype string_func_
	...

	The difference is caused by the result for "info function string_func", which
	is this for the latter:
	...
	(gdb) info function string_func^M
	All functions matching regular expression "string_func":^M
	^M
	Non-debugging symbols:^M
	0x000000000040089c  string_func_^M
	...
	but this for the former:
	...
	(gdb) info function string_func^M
	All functions matching regular expression "string_func":^M
	^M
	Non-debugging symbols:^M
	0x00000000004012bb  string_func_^M
	0x00007ffff7bac5b0  outstring_func.part^M
	0x00007ffff7bb1a00  outstring_func.part^M
	...

	The extra symbols are part of glibc:
	...
	$ nm /lib64/libc.so.6 | grep string_func
	00000000000695b0 t outstring_func.part.0
	000000000006ea00 t outstring_func.part.0
	...

	If glibc debug info is installed, we get instead:
	...
	(gdb) info function string_func^M
	All functions matching regular expression "string_func":^M
	^M
	File /usr/src/debug/glibc-2.33-9.1.x86_64/stdio-common/vfprintf-internal.c:^M
	236:    static int outstring_func(int, size_t, const unsigned int *, FILE *);^M
	^M
	File vfprintf-internal.c:^M
	236:    static int outstring_func(int, size_t, const unsigned char *, FILE *);^M
	^M
	Non-debugging symbols:^M
	0x00000000004012bb  string_func_^M
	...
	and the FAIL doesn't trigger.

	Fix this by calling "info function string_func" before starting the exec, such
	that only symbols of the exec are taken into account.

	Tested on x86_64-linux.

	gdb/testsuite/ChangeLog:

	2021-09-01  Tom de Vries  <tdevries@suse.de>

		* gdb.fortran/call-no-debug.exp: Avoid shared lib symbols for
		find_mangled_name calls.

2021-09-01  Yinjun Zhang  <yinjun.zhang@corigine.com>

	nfp: add validity check of island and me
	AddressSanitizer detects heap-buffer-overflow when running
	"objdump -D" for nfp .nffw files.

		PR 27854
		* nfp-dis.c (_NFP_ISLAND_MAX, _NFP_ME_MAX): Define.
		(nfp_priv_data): ..and use here.
		(_print_instrs): Sanity check island and menum.

2021-09-01  Alan Modra  <amodra@gmail.com>

	PR28250, Null pointer dereference in debug_class_type_samep
	Typo fix, obviously should be m1->variants != NULL, not
	m1->variants == NULL.

		PR 28250
		* debug.c (debug_class_type_samep): Correct m1->variants test.

2021-09-01  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-31  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove breakpoint_find_if
	Remove breakpoint_find_if, replace its sole usage with using
	all_breakpoints directly instead.  At the same time, change return
	types to use bool.

	Change-Id: I9ec392236b4804b362d16ab563330b9c07311106

2021-08-31  Nick Clifton  <nickc@redhat.com>

	Update the how-to-make-a-release document so that a check for empty manual pages is included.  cf PR 28144

2021-08-31  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: Extend .insn directive to support hardcode encoding.
	The .insn directive can let users use their own instructions, or
	some new instruction, which haven't supported in the old binutils.
	For example, if users want to use sifive cache instruction, they
	cannot just write "cflush.d1.l1" in the assembly code, they should
	use ".insn i SYSTEM, 0, x0, x10, -0x40".  But the .insn directive
	may not easy to use for some cases, and not so friendly to users.
	Therefore, I believe most of the users will use ".word 0xfc050073",
	to encode the instructions directly, rather than use .insn.  But
	once we have supported the mapping symbols, the .word directives
	are marked as data, so disassembler won't dump them as instructions
	as usual.  I have discussed this with Kito many times, we all think
	extend the .insn direcitve to support the hardcode encoding, is the
	easiest way to resolve the problem.  Therefore, there are two more
	.insn formats are proposed as follows,

	(original) .insn <type>, <operand1>, <operand2>, ...
	           .insn <insn-length>, <value>
	           .insn <value>

	The <type> is string, and the <insn-length> and <value> are constants.

	gas/
		* config/tc-riscv.c (riscv_ip_hardcode): Similar to riscv_ip,
		but assembles an instruction according to the hardcode values
		of .insn directive.
		* doc/c-riscv.texi: Document two new .insn formats.
		* testsuite/gas/riscv/insn-fail.d: New testcases.
		* testsuite/gas/riscv/insn-fail.l: Likewise.
		* testsuite/gas/riscv/insn-fail.s: Likewise.
		* testsuite/gas/riscv/insn.d: Updated.
		* testsuite/gas/riscv/insn.s: Likewise.

2021-08-31  John Baldwin  <jhb@FreeBSD.org>

	Use gdbfmt for vprintf_filtered.
	gdbfmt was already used for printf_filtered, so using it for
	vprintf_filtered is more consistent.

	As a result, all callers of vfprintf_maybe_filtered now use gdbfmt, so
	the function can be simplified to assume the gdbfmt case and remove
	the associated bool argument.  Similary, vprintf_filtered is now a
	simple wrapper around vfprintf_filtered.

2021-08-31  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-30  John Baldwin  <jhb@FreeBSD.org>

	fbsd-nat: Don't use '%jd' and '%ju' with printf_filtered.
	The handler for 'info proc status' for native processes on FreeBSD
	uses the 'j' size modifier along with uintmax_t / intmax_t casts to
	output integer values for types such as off_t that are not aliases of
	a basic C type such as 'int' or 'long'.  printf_filtered does not
	support the 'j' modifer, so this resulted in runtime errors in
	practice:

	(gdb) info proc stat
	process 8674
	Name: ls
	State: T (stopped)
	Parent process: 8673
	Process group: 8674
	Session id: 2779
	Unrecognized format specifier 'j' in printf

	Instead, use plongest and pulongest to generate the output strings of
	these integer values.

2021-08-30  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: fix build error in unittests/parallel-for-selftests.c
	We get this error when building GDB on some platforms.  I get it using
	g++-10 on Ubuntu 20.04 (installed using the distro package).  It was
	also reported by John Baldwin, using a clang that uses libc++.

	      CXX    unittests/parallel-for-selftests.o
	    cc1plus: warning: command line option '-Wmissing-prototypes' is valid for C/ObjC but not for C++
	    /home/smarchi/src/binutils-gdb/gdb/unittests/parallel-for-selftests.c: In function 'void selftests::parallel_for::test(int)':
	    /home/smarchi/src/binutils-gdb/gdb/unittests/parallel-for-selftests.c:53:30: error: use of deleted function 'std::atomic<int>::atomic(const std::atomic<int>&)'
	       53 |   std::atomic<int> counter = 0;
	          |                              ^
	    In file included from /usr/include/c++/9/future:42,
	                     from /home/smarchi/src/binutils-gdb/gdb/../gdbsupport/thread-pool.h:29,
	                     from /home/smarchi/src/binutils-gdb/gdb/../gdbsupport/parallel-for.h:26,
	                     from /home/smarchi/src/binutils-gdb/gdb/unittests/parallel-for-selftests.c:22:
	    /usr/include/c++/9/atomic:755:7: note: declared here
	      755 |       atomic(const atomic&) = delete;
	          |       ^~~~~~
	    /usr/include/c++/9/atomic:759:17: note:   after user-defined conversion: 'constexpr std::atomic<int>::atomic(std::atomic<int>::__integral_type)'
	      759 |       constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { }
	          |                 ^~~~~~

	I haven't dug to know why it does not happen everywhere, but this patch
	fixes it by using the constructor to initialize the variable, rather
	than the assignment operator.

	Change-Id: I6b27958171bf6187f6a875657395fd10441db7e6

2021-08-30  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: PR28291, Fix the gdb fails that PR27916 caused.
	* According to PR28291, we get the following unexpected gdb behavior,

	(gdb) disassemble 0x0,+4
	Dump of assembler code from 0x0 to 0x4:
	   0x0000000000000000:
	   0x0000000000000001:
	   0x0000000000000002:
	   0x0000000000000003:
	End of assembler dump.

	* This patch should fix it to the right behavior,

	(gdb) disassemble 0x0,+4
	Dump of assembler code from 0x0 to 0x4:
	   0x0000000000000000:  Cannot access memory at address 0x0

	opcodes/
	    pr 28291
	    * riscv-dis.c (print_insn_riscv): Return STATUS if it is not zero.

2021-08-30  Tom Tromey  <tom@tromey.com>

	Add some parallel_for_each tests
	Tom de Vries noticed that a patch in the DWARF scanner rewrite series
	caused a regression in parallel_for_each -- it started crashing in the
	case where the number of threads is 0 (there was an unchecked use of
	"n-1" that was used to size an array).

	He also pointed out that there were no tests of parallel_for_each.
	This adds a few tests of parallel_for_each, primarily testing that
	different settings for the number of threads will work.  This test
	catches the bug that he found in that series.

2021-08-30  Tom Tromey  <tom@tromey.com>

	Add a show function for "maint show worker-threads"
	I wanted to see how many threads gdb thought it was using, but
	"maint show worker-threads" only reported "unlimited".  This patch
	adds a show function so that it will now report the number of threads
	gdb has started.

	Regression tested on x86-64 Fedora 34.

2021-08-30  Tom de Vries  <tdevries@suse.de>

	[gdb/cli] Don't assert on empty string for core-file
	With current gdb we run into:
	...
	$ gdb -batch '' ''
	: No such file or directory.
	pathstuff.cc:132: internal-error: \
	  gdb::unique_xmalloc_ptr<char> gdb_abspath(const char*): \
	  Assertion `path != NULL && path[0] != '\0'' failed.
	...

	Fix this by skipping the call to gdb_abspath in core_target_open in the
	empty-string case, such that we have instead:
	...
	$ gdb -batch '' ''
	: No such file or directory.
	: No such file or directory.
	$
	...

	Tested on x86_64-linux.

	gdb/ChangeLog:

	2021-08-30  Tom de Vries  <tdevries@suse.de>

		PR cli/28290
		* gdb/corelow.c (core_target_open): Skip call to gdb_abspath in the
		empty-string case.

	gdb/testsuite/ChangeLog:

	2021-08-30  Tom de Vries  <tdevries@suse.de>

		PR cli/28290
		* gdb.base/batch-exit-status.exp: Add gdb '' and gdb '' '' tests.

2021-08-30  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: PR27916, Support mapping symbols.
	Similar to ARM/AARCH64, we add mapping symbols in the symbol table,
	to mark the start addresses of data and instructions.  The $d means
	data, and the $x means instruction.  Then the disassembler uses these
	symbols to decide whether we should dump data or instruction.

	Consider the mapping-04 test case,
	$ cat tmp.s
	  .text
	  .option norelax
	  .option norvc
	  .fill 2, 4, 0x1001
	  .byte 1
	  .word 0
	  .balign 8
	  add a0, a0, a0
	  .fill 5, 2, 0x2002
	  add a1, a1, a1
	  .data
	  .word 0x1             # No need to add mapping symbols.
	  .word 0x2

	$ riscv64-unknown-elf-as tmp.s -o tmp.o
	$ riscv64-unknown-elf-objdump -d tmp.o

	Disassembly of section .text:

	0000000000000000 <.text>:
	   0:   00001001         .word   0x00001001  # Marked $d, .fill directive.
	   4:   00001001         .word   0x00001001
	   8:   00000001         .word   0x00000001  # .byte + part of .word.
	   c:   00               .byte   0x00        # remaining .word.
	   d:   00               .byte   0x00        # Marked $d, odd byte of alignment.
	   e:   0001             nop                 # Marked $x, nops for alignment.
	  10:   00a50533         add     a0,a0,a0
	  14:   20022002         .word   0x20022002  # Marked $d, .fill directive.
	  18:   20022002         .word   0x20022002
	  1c:   2002             .short  0x2002
	  1e:   00b585b3         add     a1,a1,a1    # Marked $x.
	  22:   0001             nop                 # Section tail alignment.
	  24:   00000013         nop

	* Use $d and $x to mark the distribution of data and instructions.
	  Alignments of code are recognized as instructions, since we usually
	  fill nops for them.

	* If the alignment have odd bytes, then we cannot just fill the nops
	  into the spaces.  We always fill an odd byte 0x00 at the start of
	  the spaces.  Therefore, add a $d mapping symbol for the odd byte,
	  to tell disassembler that it isn't an instruction.  The behavior
	  is same as Arm and Aarch64.

	The elf/linux toolchain regressions all passed.  Besides, I also
	disable the mapping symbols internally, but use the new objudmp, the
	regressions passed, too.  Therefore, the new objudmp should dump
	the objects corretly, even if they don't have any mapping symbols.

	bfd/
		pr 27916
		* cpu-riscv.c (riscv_elf_is_mapping_symbols): Define mapping symbols.
		* cpu-riscv.h: extern riscv_elf_is_mapping_symbols.
		* elfnn-riscv.c (riscv_maybe_function_sym): Do not choose mapping
		symbols as a function name.
		(riscv_elf_is_target_special_symbol): Add mapping symbols.
	binutils/
		pr 27916
		* testsuite/binutils-all/readelf.s: Updated.
		* testsuite/binutils-all/readelf.s-64: Likewise.
		* testsuite/binutils-all/readelf.s-64-unused: Likewise.
		* testsuite/binutils-all/readelf.ss: Likewise.
		* testsuite/binutils-all/readelf.ss-64: Likewise.
		* testsuite/binutils-all/readelf.ss-64-unused: Likewise.
	gas/
		pr 27916
		* config/tc-riscv.c (make_mapping_symbol): Create a new mapping symbol.
		(riscv_mapping_state): Decide whether to create mapping symbol for
		frag_now.  Only add the mapping symbols to text sections.
		(riscv_add_odd_padding_symbol): Add the mapping symbols for the
		riscv_handle_align, which have odd bytes spaces.
		(riscv_check_mapping_symbols): Remove any excess mapping symbols.
		(md_assemble): Marked as MAP_INSN.
		(riscv_frag_align_code): Marked as MAP_INSN.
		(riscv_init_frag): Add mapping symbols for frag, it usually called
		by frag_var.  Marked as MAP_DATA for rs_align and rs_fill, and
		marked as MAP_INSN for rs_align_code.
		(s_riscv_insn): Marked as MAP_INSN.
		(riscv_adjust_symtab): Call riscv_check_mapping_symbols.
		* config/tc-riscv.h (md_cons_align): Defined to riscv_mapping_state
		with MAP_DATA.
		(TC_SEGMENT_INFO_TYPE): Record mapping state for each segment.
		(TC_FRAG_TYPE): Record the first and last mapping symbols for the
		fragments.  The first mapping symbol must be placed at the start
		of the fragment.
		(TC_FRAG_INIT): Defined to riscv_init_frag.
		* testsuite/gas/riscv/mapping-01.s: New testcase.
		* testsuite/gas/riscv/mapping-01a.d: Likewise.
		* testsuite/gas/riscv/mapping-01b.d: Likewise.
		* testsuite/gas/riscv/mapping-02.s: Likewise.
		* testsuite/gas/riscv/mapping-02a.d: Likewise.
		* testsuite/gas/riscv/mapping-02b.d: Likewise.
		* testsuite/gas/riscv/mapping-03.s: Likewise.
		* testsuite/gas/riscv/mapping-03a.d: Likewise.
		* testsuite/gas/riscv/mapping-03b.d: Likewise.
		* testsuite/gas/riscv/mapping-04.s: Likewise.
		* testsuite/gas/riscv/mapping-04a.d: Likewise.
		* testsuite/gas/riscv/mapping-04b.d: Likewise.
		* testsuite/gas/riscv/mapping-norelax-04a.d: Likewise.
		* testsuite/gas/riscv/mapping-norelax-04b.d: Likewise.
		* testsuite/gas/riscv/no-relax-align.d: Updated.
		* testsuite/gas/riscv/no-relax-align-2.d: Likewise.
	include/
		pr 27916
		* opcode/riscv.h (enum riscv_seg_mstate): Added.

	opcodes/
		pr 27916
		* riscv-dis.c (last_map_symbol, last_stop_offset, last_map_state):
		Added to dump sections with mapping symbols.
		(riscv_get_map_state): Get the mapping state from the symbol.
		(riscv_search_mapping_symbol): Check the sorted symbol table, and
		then find the suitable mapping symbol.
		(riscv_data_length): Decide which data size we should print.
		(riscv_disassemble_data): Dump the data contents.
		(print_insn_riscv): Handle the mapping symbols.
		(riscv_symbol_is_valid): Marked mapping symbols as invalid.

2021-08-30  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Improve argument syntax of proc arange
	The current syntax of proc arange is:
	...
	  proc arange { arange_start arange_length {comment ""} {seg_sel ""} } {
	...
	and a typical call looks like:
	...
	  arange $start $len
	...

	This style is somewhat annoying because if you want to specify the last
	parameter, you need to give the default values of all the other optional ones
	before as well:
	...
	  arange $start $len "" $seg_sel
	...

	Update the syntax to:
	...
	    proc arange { options arange_start arange_length } {
	       parse_options {
	           { comment "" }
	           { seg_sel "" }
	       }
	...
	such that a typical call looks like:
	...
	  arange {} $start $len
	...
	and a call using seg_sel looks like:
	...
	  arange {
	    seg_sel $seg_sel
	  } $start $len
	...

	Also update proc aranges, which already has an options argument, to use the
	new proc parse_options.

	Tested on x86_64-linux.

	Co-Authored-By: Simon Marchi <simon.marchi@polymtl.ca>

2021-08-30  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-29  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-28  H.J. Lu  <hjl.tools@gmail.com>

	ld: Change indirect symbol from IR to undefined
	bfd/

		PR ld/28264
		* elflink.c (_bfd_elf_merge_symbol): Change indirect symbol from
		IR to undefined.

	ld/

		PR ld/28264
		* testsuite/ld-plugin/lto.exp: Run PR ld/28264 test.
		* testsuite/ld-plugin/pr28264-1.d: New file.
		* testsuite/ld-plugin/pr28264-2.d: Likewise.
		* testsuite/ld-plugin/pr28264-3.d: Likewise.
		* testsuite/ld-plugin/pr28264-4.d: Likewise.
		* testsuite/ld-plugin/pr28264.c: Likewise.
		* testsuite/ld-plugin/pr28264.ver: Likewise.

2021-08-28  Alan Modra  <amodra@gmail.com>

	PR28264, ld.bfd crash on linking efivar with LTO
		PR 28264
		PR 26978
		* linker.c (_bfd_generic_link_add_one_symbol <MIND>): Check
		that string is non-NULL.

2021-08-28  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-27  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Don't write .gdb_index symbol table with empty entries
	When comparing the sizes of the index files generated for shlib
	outputs/gdb.dwarf2/dw2-zero-range/shr1.sl, I noticed a large difference
	between .debug_names:
	...
	$ gdb -q -batch $shlib -ex "save gdb-index -dwarf-5 ."
	$ du -b -h shr1.sl.debug_names shr1.sl.debug_str
	61      shr1.sl.debug_names
	0       shr1.sl.debug_str
	...
	and .gdb_index:
	...
	$ gdb -q -batch $shlib -ex "save gdb-index ."
	$ du -b -h shr1.sl.gdb-index
	8.2K    shr1.sl.gdb-index
	...

	The problem is that the .gdb_index contains a non-empty symbol table with only
	empty entries.

	Fix this by making the symbol table empty, such that we have instead:
	...
	$ du -b -h shr1.sl.gdb-index
	184     shr1.sl.gdb-index
	...

	Tested on x86_64-linux.

2021-08-27  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Generate .debug_aranges in gdb.dlang/watch-loc.exp
	Before commit 5ef670d81fd "[gdb/testsuite] Add dummy start and end CUs in
	dwarf assembly" we had in exec outputs/gdb.dlang/watch-loc/watch-loc a D
	compilation unit at offset 0xc7:
	...
	  Compilation Unit @ offset 0xc7:
	   Length:        0x4c (32-bit)
	   Version:       4
	   Abbrev Offset: 0x64
	   Pointer Size:  8
	 <0><d2>: Abbrev Number: 2 (DW_TAG_compile_unit)
	    <d3>   DW_AT_language    : 19       (D)
	...
	with a corresponding .debug_aranges entry:
	...
	Offset into .debug_info:  0xc7
	  Pointer Size:             4
	  Segment Size:             0

	    Address    Length
	    004004a7 0000000b
	    00000000 00000000
	...

	After that commit we have a dummy CU at offset 0xc7 and the D compilation unit
	at offset 0xd2:
	...
	  Compilation Unit @ offset 0xc7:
	   Length:        0x7 (32-bit)
	   Version:       4
	   Abbrev Offset: 0x64
	   Pointer Size:  8
	  Compilation Unit @ offset 0xd2:
	   Length:        0x4c (32-bit)
	   Version:       4
	   Abbrev Offset: 0x65
	   Pointer Size:  8
	 <0><dd>: Abbrev Number: 2 (DW_TAG_compile_unit)
	    <de>   DW_AT_language    : 19       (D)
	...
	while the .debug_aranges entry still points to 0xc7.

	The problem is that the test-case uses a hack (quoting from
	commit 75f06e9dc59):
	...
	[ Note: this is a non-trivial test-case.  The file watch-loc-dw.S contains a
	.debug_info section, but not an .debug_aranges section or any actual code.
	The file watch-loc.c contains code and a .debug_aranges section, but no other
	debug section.  So, the intent for the .debug_aranges section in watch-loc.c
	is to refer to a compilation unit in the .debug_info section in
	watch-loc-dw.S. ]
	...
	and adding the dummy CU caused that hack to stop working.

	Fix this by moving the generation of .debug_aranges from watch-loc.c to
	watch-loc.exp, such that we have:
	...
	  Offset into .debug_info:  0xd2
	  Pointer Size:             4
	  Segment Size:             0

	    Address    Length
	    004004a7 0000000b
	    00000000 00000000
	...

	Tested on x86_64-linux.

2021-08-27  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Generate .debug_aranges entry for dummy CU
	A best practise for DWARF [1] is to generate .debug_aranges entries for CUs
	even if they have no address range.

	Generate .debug_arange entries for the dummy CUs added by the DWARF assembler.

	Tested on x86_64-linux.

	[1] http://wiki.dwarfstd.org/index.php?title=Best_Practices

2021-08-27  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add .debug_aranges in more test-cases
	A couple of test-cases fail when run with target board cc-with-debug-names due
	to missing .debug_aranges entries for the CUs added by the dwarf assembler.

	Add a .debug_aranges entry for those CUs.

	Tested on x86_64-linux.

2021-08-27  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Support .debug_aranges in dwarf assembly
	Add a proc aranges such that we can generate .debug_aranges sections in dwarf
	assembly using:
	...
	  cu { label cu_label } {
	  ...
	  }

	  aranges {} cu_label {
	    arange $addr $len [<comment>] [$segment_selector]
	  }
	...

	Tested on x86_64-linux.

2021-08-27  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add label option to proc cu
	We can use current dwarf assembly infrastructure to declare a label that marks
	the start of the CU header:
	...
	  declare_labels header_start_cu_a
	  _section ".debug_info"
	  header_start_cu_a : cu {} {
	  }
	  _section ".debug_info"
	  header_start_cu_b : cu {} {
	  }
	...
	on the condition that we switch to the .debug_info section before, which makes
	this style of use fragile.

	Another way to achieve the same is to use the label as generated by the cu
	proc itself:
	...
	  variable _cu_label
	  cu {} {
	  }
	  set header_start_cu_a $_cu_label
	  cu {} {
	  }
	  set header_start_cu_b $_cu_label
	...
	but again that seems fragile given that adding a new CU inbetween will
	silently result in the wrong value for the label.

	Add a label option to proc cu such that we can simply do:
	...
	  cu { label header_start_cu_a } {
	  }
	  cu { label header_start_cu_b } {
	  }
	...

	Tested on x86_64-linux.

2021-08-27  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-26  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: remove some stray newlines in debug output
	I spotted a couple of stray newlines that were left at the end of
	debug message during conversion to the new debug output scheme.  These
	messages are part of the 'set debug lin-lwp 1' output.

2021-08-26  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-25  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-24  Tom Tromey  <tom@tromey.com>

	Fix two regressions caused by CU / TU merging
	PR symtab/28160 and PR symtab/27893 concern GDB crashes in the test
	suite when using the "fission" target board.  They are both caused by
	the patches that merge the list of CUs with the list of TUs (and to a
	lesser degree by the patches to share DWARF data across objfiles), and
	the underlying issue is the same: it turns out that reading a DWO can
	cause new type units to be created.  This means that the list of
	dwarf2_per_cu_data objects depends on precisely which CUs have been
	expanded.  However, because the type units can be created while
	expanding a CU means that the vector of CUs can expand while it is
	being iterated over -- a classic mistake.  Also, because a TU can be
	added later, it means the resize_symtabs approach is incorrect.

	This patch fixes resize_symtabs by removing it, and having set_symtab
	resize the vector on demand.  It fixes the iteration problem by
	introducing a safe (index-based) iterator and changing the relevant
	spots to use it.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28160
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=27893

2021-08-24  Alan Modra  <amodra@gmail.com>

	Real programmers don't configure gcc using --with-ld
		* testsuite/lib/ld-lib.exp (run_host_cmd): Give a clue as to why
		gcc -B doesn't pick up the ld under test.

2021-08-24  Alan Modra  <amodra@gmail.com>

	objdump -S test fail on mingw
	FAIL: objdump -S
	FAIL: objdump --source-comment
	is seen on mingw for the simple reason that gcc adds a .exe suffix on
	the output file if not already present.  Fix that, and tidy some objcopy
	tests.

		* testsuite/lib/binutils-common.exp (exeext): New proc.
		* testsuite/binutils-all/objcopy.exp (exe, test_prog): Use it here.
		(objcopy_remove_relocations_from_executable): Catch objcopy errors.
		Only run on ELF targets.
		* testsuite/binutils-all/objdump.exp (exe): Set variable.
		(test_build_id_debuglink, test_objdump_S): Use exe file suffix.

2021-08-24  James Bowman (FTDI-UK)  <james.bowman@ftdichip.com>

	FT32: Remove recursion in ft32_opcode
	The function ft32_opcode used recursion.  This could cause a stack
	overflow.  Replaced with a pair of non-recursive functions.

		PR 28169
	        * ft32-dis.c: Formatting.
		(ft32_opcode1): Split out from..
		(ft32_opcode): ..here.

2021-08-24  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-23  Tom Tromey  <tom@tromey.com>

	Fix a latent bug in dw2-ranges-overlap.exp
	dw2-ranges-overlap.exp creates a program where a psymtab has two
	address ranges, and a function without debug info whose address is
	between these two ranges.  Then it sets a breakpoint on this function
	and runs to it, expecting that the language should remain "auto; c"
	when stopped.

	However, this test case also has a "main" function described (briefly)
	in the DWARF, and this function is given language C++.  Also, a
	breakpoint stop sets the current language to the language that was
	used when setting the breakpoint.

	My new DWARF scanner decides that this "main" is the main program and
	sets the current language to C++ at startup, causing this test to
	fail.

	This patch fixes the test in a simple way, by introducing a new
	function that takes the place of "main" in the DWARF.  I think this
	still exercises the original problem, but also avoids problems with my
	branch.

	It seemed safe to me to submit this separately.

2021-08-23  Tom de Vries  <tdevries@suse.de>

	[gdb] Fix 'not in executable format' error message
	With trying to load a non-executable file into gdb, we run into PR26880:
	...
	$ gdb -q -batch test.c
	"0x7ffc87bfc8d0s": not in executable format: \
	  file format not recognized
	...

	The problem is caused by using %ps in combination with the error function
	(note that confusingly, it does work in combination with the warning
	function).

	Fix this by using plain "%s" instead.

	Tested on x86_64-linux.

	gdb/ChangeLog:

	2021-08-22  Tom de Vries  <tdevries@suse.de>

		PR gdb/26880
		* gdb/exec.c (exec_file_attach): Use %s instead of %ps in call to
		error function.

	gdb/testsuite/ChangeLog:

	2021-08-22  Tom de Vries  <tdevries@suse.de>

		PR gdb/26880
		* gdb.base/non-executable.exp: New file.

2021-08-23  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Use compiler-generated instead of gas-generated stabs
	The test-case gdb.dwarf2/dw2-ranges.exp is the only one in the gdb testsuite
	that uses gas-generated stabs.

	While the use seems natural alongside the use of gas-generated dwarf in the
	same test-case, there are a few known issues, filed on the gdb side as:
	- PR symtab/12497 - "stabs: PIE relocation does not work"
	- PR symtab/28221 - "[readnow, stabs] FAIL: gdb.dwarf2/dw2-ranges.exp: \
	  info line func"
	and on the gas side as:
	- PR gas/28233 - "[gas, --gstabs] Generate stabs more similar to gcc"

	The test-case contains a KFAIL for PR12497, but it's outdated and fails to
	trigger.

	The intention of the test-case is to test gas-generated dwarf, and using
	gcc-generated stabs instead of gas-generated stabs works fine.

	Supporting compiler-generated stabs is already a corner-case for gdb, and
	there's no current commitment/incentive to support/workaround gas-generated
	stabs, which can be considered a corner-case of a corner-case.

	Work around these problem by using compiler-generated stabs in the test-case.

	Tested on x86_64-linux.

	gdb/testsuite/ChangeLog:

	2021-08-22  Tom de Vries  <tdevries@suse.de>

		* gdb.dwarf2/dw2-ranges.exp: Use compiler-generated stabs.

2021-08-23  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add dummy start and end CUs in dwarf assembly
	Say one compiles a hello.c:
	...
	$ gcc -g hello.c
	...

	On openSUSE Leap 15.2 and Tumbleweed, the CU for hello.c is typically not the
	first in .debug_info, nor the last, due to presence of debug information in
	objects for sources like:
	- ../sysdeps/x86_64/start.S
	- init.c
	- ../sysdeps/x86_64/crti.S
	- elf-init.c
	- ../sysdeps/x86_64/crtn.S.

	On other systems, say ubuntu 18.04.5, the CU for hello.c is typically the
	first and the last in .debug_info.

	This difference has caused me to find some errors in the dwarf assembly
	using openSUSE, that didn't show up on other platforms.

	Force the same situation on other platforms by adding a dummy start
	and end CU.

	Tested on x86_64-linux.

	gdb/testsuite/ChangeLog:

	2021-08-22  Tom de Vries  <tdevries@suse.de>

		PR testsuite/28235
		* lib/dwarf.exp (Dwarf::dummy_cu): New proc.
		(Dwarf::assemble): Add dummy start and end CU.

2021-08-23  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix dw2-ranges-psym.exp with -readnow
	When running test-case gdb.dwarf2/dw2-ranges-psym.exp with target board
	-readnow, I run into:
	...
	(gdb) file dw2-ranges-psym^M
	Reading symbols from dw2-ranges-psym...^M
	Expanding full symbols from dw2-ranges-psym...^M
	(gdb) set complaints 0^M
	(gdb) FAIL: gdb.dwarf2/dw2-ranges-psym.exp: No complaints
	...

	The problem is that the regexp expects a gdb prompt immediately after the
	"Reading symbols" line.

	Fix this by updating the regexp.

	Tested on x86_64-linux.

	gdb/testsuite/ChangeLog:

	2021-08-22  Tom de Vries  <tdevries@suse.de>

		* lib/gdb.exp (gdb_load_no_complaints): Update regexp to allow
		"Expanding full symbols" Line.

2021-08-23  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-22  Mike Frysinger  <vapier@gentoo.org>

	sim: m32r: add __linux__ hack for non-Linux hosts
	The m32r Linux syscall emulation logic assumes the host environment
	directly matches -- it's being run on 32-bit little endian Linux.
	This breaks building for non-Linux systems, so put all the code in
	__linux__ ifdef checks.  This code needs a lot of love to make it
	work everywhere, but let's at least unbreak it for non-Linux hosts.

2021-08-22  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-21  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-20  Mike Frysinger  <vapier@gentoo.org>

	sim: nltvals: switch output mode to a directory
	In preparation for this script generating more files, change the output
	argument to specify a directory.  This drops the stdout behavior, but
	since no one really runs this tool directly, it's not a big deal.

2021-08-20  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-19  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: use bool in notify_command_param_changed_p and do_set_command
	Trivial patch to use bool instead of int.

	Change-Id: I9e5f8ee4305272a6671cbaaaf2f0484eff0d1ea5

2021-08-19  H.J. Lu  <hjl.tools@gmail.com>

	x86: Put back 3 aborts in OP_E_memory
	Put back 3 aborts where invalid lengths should have been filtered out.

	gas/

		PR binutils/28247
		* testsuite/gas/i386/bad-bcast.s: Add a comment.

	opcodes/

		PR binutils/28247
		* * i386-dis.c (OP_E_memory): Put back 3 aborts.

2021-08-19  H.J. Lu  <hjl.tools@gmail.com>

	x86: Avoid abort on invalid broadcast
	Print "{bad}" on invalid broadcast instead of abort.

	gas/

		PR binutils/28247
		* testsuite/gas/i386/bad-bcast.d: New file.
		* testsuite/gas/i386/bad-bcast.s: Likewise.
		* testsuite/gas/i386/i386.exp: Run bad-bcast.

	opcodes/

		PR binutils/28247
		* i386-dis.c (OP_E_memory): Print "{bad}" on invalid broadcast
		instead of abort.

2021-08-19  Aaron Merey  <amerey@redhat.com>

	gdb/solib: Refactor scan_dyntag
	scan_dyntag is unnecessarily duplicated in solib-svr4.c and solib-dsbt.c.

	Move this function to solib.c and rename it to gdb_bfd_scan_elf_dyntag.
	Also add it to solib.h so it is included in both solib-svr4 and solib-dsbt.

2021-08-19  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-18  Will Schmidt  <will_schmidt@vnet.ibm.com>

	[gdb] [rs6000] Add ppc64_linux_gcc_target_options method.
	Add a method to set the gcc target options for the ppc64 targets.
	This change sets an empty value, which allows the gcc
	default values (-mcmodel=medium) be used, instead of -mcmodel=large
	which is set by the default_gcc_target_options hook.

	[gdb] [rs6000] Add ppc64*_gnu_triplet_regexp methods.
	Add methods to set the target triplet so we can
	find the proper gcc when our gcc is named of
	the form powerpc64{le}-<foo>-gcc or ppc64{le}-<foo>-gcc.

2021-08-18  Alan Modra  <amodra@gmail.com>

	Re: as: Replace the removed symbol with the versioned symbol
	Some targets, typically embedded without shared libraries, replace the
	relocation symbol with a section symbol (see tc_fix_adjustable).
	Allow the test to pass for such targets.  Fixes the following.

	avr-elf  +FAIL: symver symver16
	d10v-elf  +FAIL: symver symver16
	dlx-elf  +FAIL: symver symver16
	ip2k-elf  +FAIL: symver symver16
	m68k-elf  +FAIL: symver symver16
	mcore-elf  +FAIL: symver symver16
	pj-elf  +FAIL: symver symver16
	s12z-elf  +FAIL: symver symver16
	visium-elf  +FAIL: symver symver16
	z80-elf  +FAIL: symver symver16

		PR gas/28157
		* testsuite/gas/symver/symver16.d: Relax reloc match.

2021-08-18  Alan Modra  <amodra@gmail.com>

	[GOLD] PowerPC64 relocation overflow for -Os register save/restore funcs
	Fixes a silly mistake in calculating the address of -Os out-of-line
	register save/restore function copies.  Copies of these linker defined
	functions are added to stub sections when the original (in
	target->savres_section) can't be reached.

		* powerpc.cc (Target_powerpc::Relocate::relocate): Correct address
		calculation of out-of-line save/restore function copies.

2021-08-18  Alan Modra  <amodra@gmail.com>

	Another ld script backtrack
		* ldgram.y (length_spec): Throw away look-ahead NAME.

2021-08-18  Mike Frysinger  <vapier@gentoo.org>

	gdb: fix spacing on CCLD silent rules

	sim: nltvals: localize TARGET_<ERRNO> defines
	Code should not be using these directly, instead they should be
	resolving these dynamically via cb_host_to_target_errno maps.
	Fix the Blackfin code and remove the defines out of the header
	so no new code can rely on them.

2021-08-18  Mike Frysinger  <vapier@gentoo.org>

	sim: rename ChangeLog files to ChangeLog-2021
	Now that ChangeLog entries are no longer used for sim patches,
	this commit renames all relevant sim ChangeLog to ChangeLog-2021,
	similar to what we would do in the context of the "Start of New
	Year" procedure.

	The purpose of this change is to avoid people merging ChangeLog
	entries by mistake when applying existing commits that they are
	currently working on.

	Also throw in a .gitignore entry to keep people from adding new
	ChangeLog files anywhere in the sim tree.

2021-08-18  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-17  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: fix thread_step_over_chain_length
	If I debug a single-thread program and look at the infrun debug logs, I
	see:

	    [infrun] start_step_over: stealing global queue of threads to step, length = 2

	That makes no sense... turns out there's a buglet in
	thread_step_over_chain_length, "num" should be initialized to 0.  I
	think this bug is a leftover from an earlier version of the code (not
	merged upstream) that manually walked the list, where the first item was
	implicitly counted (hence the 1).

	Change-Id: I0af03aa93509aed36528be5076894dc156a0b5ce

2021-08-17  Shahab Vahedi  <shahab@synopsys.com>

	opcodes: Fix the auxiliary register numbers for ARC HS
	The numbers for the auxiliary registers "tlbindex" and
	"tlbcommand" of ARCv2HS are incorrect.  This patch makes
	the following changes to correct that error.

	 ,------------.-----------------.---------------.
	 | aux. reg.  | old (incorrect) | new (correct) |
	 |------------+-----------------+---------------|
	 | tlbindex   |      0x463      |     0x464     |
	 | tlbcommand |      0x464      |     0x465     |
	 `------------^-----------------^---------------'

	opcodes/
	2021-08-17  Shahab Vahedi <shahab@synopsys.com>

		* arc-regs.h (DEF): Fix the register numbers.

2021-08-17  H.J. Lu  <hjl.tools@gmail.com>

	gdb: Don't assume r_ldsomap when r_version > 1 on Linux
	The r_ldsomap field is specific to Solaris (part of librtld_db), and
	should never be accessed for Linux.  glibc is planning to add a field
	to support multiple namespaces.  But there will be no r_ldsomap when
	r_version is bumped to 2.  Add linux_[ilp32|lp64]_fetch_link_map_offsets
	to set r_ldsomap_offset to -1 and use them for Linux targets.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28236

2021-08-17  H.J. Lu  <hjl.tools@gmail.com>

	gdbserver: Check r_version < 1 for Linux debugger interface
	Update gdbserver to check r_version < 1 instead of r_version != 1 so
	that r_version can be bumped for a new field in the glibc debugger
	interface to support multiple namespaces.  Since so far, the gdbserver
	only reads fields defined for r_version == 1, it is compatible with
	r_version >= 1.

	All future glibc debugger interface changes will be backward compatible.
	If there is ever the need for backward incompatible change to the glibc
	debugger interface, a new DT_XXX element will be provided to access the
	new incompatible interface.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=11839

2021-08-17  Andrea Corallo  <andrea.corallo@arm.com>

	PATCH [4/4] arm: Add Tag_PACRET_use build attribute
	bfd/
	2021-07-06  Andrea Corallo  <andrea.corallo@arm.com>

		* elf32-arm.c (elf32_arm_merge_eabi_attributes): Add
		'Tag_PACRET_use' case.

	binutils/
	2021-07-06  Andrea Corallo  <andrea.corallo@arm.com>

		* readelf.c (arm_attr_tag_PAC_extension): Declare.
		(arm_attr_public_tags): Add 'PAC_extension' lookup.

	elfcpp/
	2021-07-06  Andrea Corallo  <andrea.corallo@arm.com>

		* arm.h: Define 'Tag_PACRET_use' enum.

	gas/
	2021-07-06  Andrea Corallo  <andrea.corallo@arm.com>

		* config/tc-arm.c (arm_convert_symbolic_attribute): Add
		'Tag_PACRET_use' to the attribute_table.

	include/
	2021-07-06  Andrea Corallo  <andrea.corallo@arm.com>

		* elf/arm.h (elf_arm_reloc_type): Add 'Tag_PACRET_use'.

2021-08-17  Andrea Corallo  <andrea.corallo@arm.com>

	PATCH [3/4] arm: Add Tag_BTI_use build attribute
	bfd/
	2021-07-06  Andrea Corallo  <andrea.corallo@arm.com>

		* elf32-arm.c (elf32_arm_merge_eabi_attributes): Add
		'Tag_BTI_use' case.

	binutils/
	2021-07-06  Andrea Corallo  <andrea.corallo@arm.com>

		* readelf.c (arm_attr_tag_PAC_extension): Declare.
		(arm_attr_public_tags): Add 'PAC_extension' lookup.

	elfcpp/
	2021-07-06  Andrea Corallo  <andrea.corallo@arm.com>

		* arm.h: Define 'Tag_BTI_use' enum.

	gas/
	2021-07-06  Andrea Corallo  <andrea.corallo@arm.com>

		* config/tc-arm.c (arm_convert_symbolic_attribute): Add
		'Tag_BTI_use' to the attribute_table.

	include/
	2021-07-06  Andrea Corallo  <andrea.corallo@arm.com>

		* elf/arm.h (elf_arm_reloc_type): Add 'Tag_BTI_use'.

2021-08-17  Andrea Corallo  <andrea.corallo@arm.com>

	PATCH [2/4] arm: Add Tag_BTI_extension build attribute
	bfd/
	2021-07-06  Andrea Corallo  <andrea.corallo@arm.com>

		* elf32-arm.c (elf32_arm_merge_eabi_attributes): Add
		'Tag_BTI_extension' case.

	binutils/
	2021-07-06  Andrea Corallo  <andrea.corallo@arm.com>

		* readelf.c (arm_attr_tag_PAC_extension): Declare.
		(arm_attr_public_tags): Add 'PAC_extension' lookup.

	elfcpp/
	2021-07-06  Andrea Corallo  <andrea.corallo@arm.com>

		* arm.h: Define 'Tag_BTI_extension' enum.

	gas/
	2021-07-06  Andrea Corallo  <andrea.corallo@arm.com>

		* config/tc-arm.c (arm_convert_symbolic_attribute): Add
		'Tag_BTI_extension' to the attribute_table.

	include/
	2021-07-06  Andrea Corallo  <andrea.corallo@arm.com>

		* elf/arm.h (elf_arm_reloc_type): Add 'Tag_BTI_extension'.

2021-08-17  Andrea Corallo  <andrea.corallo@arm.com>

	PATCH [1/4] arm: Add Tag_PAC_extension build attribute
	bfd/
	2021-07-06  Andrea Corallo  <andrea.corallo@arm.com>

		* elf32-arm.c (elf32_arm_merge_eabi_attributes): Add
		'Tag_PAC_extension' case.

	binutils/
	2021-07-06  Andrea Corallo  <andrea.corallo@arm.com>

		* readelf.c (arm_attr_tag_PAC_extension): Declare.
		(arm_attr_public_tags): Add 'PAC_extension' lookup.

	elfcpp/
	2021-07-06  Andrea Corallo  <andrea.corallo@arm.com>

		* arm.h: Define 'Tag_PAC_extension' enum.

	gas/
	2021-07-06  Andrea Corallo  <andrea.corallo@arm.com>

		* config/tc-arm.c (arm_convert_symbolic_attribute): Add
		'Tag_PAC_extension' to the attribute_table.

	include/
	2021-07-06  Andrea Corallo  <andrea.corallo@arm.com>

		* elf/arm.h (elf_arm_reloc_type): Add 'Tag_PAC_extension'.

2021-08-17  H.J. Lu  <hjl.tools@gmail.com>

	x86: Always run fp tests
	Always run fp tests since the size of .tfloat, .ds.x, .dc.x and .dcb.x
	directive outputs is always 10 bytes.  There is no need for fp-elf32 nor
	fp-elf64.

		PR gas/28230
		* testsuite/gas/i386/fp-elf32.d: Removed.
		* testsuite/gas/i386/fp-elf64.d: Likewise.
		* testsuite/gas/i386/fp.s: Remove NO_TFLOAT_PADDING codes.
		* testsuite/gas/i386/i386.exp: Don't run fp-elf32 nor fp-elf64.
		Always run fp.

2021-08-17  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-16  H.J. Lu  <hjl.tools@gmail.com>

	x86: Don't pad .tfloat directive output
	.tfloat output should always be 10 bytes without padding, independent
	of psABIs.  In glibc, x86 assembly codes expect 10-byte .tfloat output.
	This also reduces .ds.x output and .tfloat output with hex input from
	12 bytes to 10 bytes to match .tfloat output.

		PR gas/28230
		* NEWS: Mention changes of .ds.x output and .tfloat output with
		hex input.
		* config/tc-i386.c (x86_tfloat_pad): Removed.
		* config/tc-i386.h (X_PRECISION_PAD): Changed to 0.
		(x86_tfloat_pad): Removed.
		* testsuite/gas/i386/fp.s: If NO_TFLOAT_PADDING isn't defined,
		add explicit paddings after .tfloat, .ds.x, .dc.x and .dcb.x
		directives.
		* testsuite/gas/i386/i386.exp (ASFLAGS): Append
		"--defsym NO_TFLOAT_PADDING=1" when running the fp test.

2021-08-16  Tom Tromey  <tromey@adacore.com>

	Fix register regression in DWARF evaluator
	On an internal test case, using an arm-elf target, commit ba5bc3e5a92
	("Make DWARF evaluator return a single struct value") causes a
	regression.  (It doesn't happen for any of the other cross targets
	that I test when importing upstream gdb.)

	I don't know if there's an upstream gdb test case showing the same
	problem... I can only really run native tests with dejagnu AFAIK.

	The failure manifests like this:

	    Breakpoint 1, file_1.export_1 (param_1=<error reading variable: Unable to access DWARF register number 64>, str=...) at [...]/file_1.adb:5

	Whereas when it works it looks like:

	    Breakpoint 1, file_1.export_1 (param_1=99.0, str=...) at [...]/file_1.adb:5

	The difference is that the new code uses the passed-in gdbarch,
	whereas the old code used the frame's gdbarch, when handling
	DWARF_VALUE_REGISTER.

	This patch restores the use of the frame's arch.

2021-08-16  Tom Tromey  <tromey@adacore.com>

	Fix Ada regression due to DWARF expression series
	Commit 0579205aec4 ("Simplify dwarf_expr_context class interface")
	caused a regression in the internal AdaCore test suite.  I didn't try
	to reproduce this with the GDB test suite, but the test is identical
	to gdb.dwarf2/dynarr-ptr.exp.

	The problem is that this change:

	 	case DW_OP_push_object_address:
	 	  /* Return the address of the object we are currently observing.  */
	-	  if (this->data_view.data () == nullptr
	-	      && this->obj_address == 0)
	+	  if (this->m_addr_info == nullptr)

	... slightly changes the logic here.  In particular, it's possible for
	the caller to pass in a non-NULL m_addr_info, but one that looks like:

	    (top) p *this.m_addr_info
	    $15 = {
	      type = 0x29b7a70,
	      valaddr = {
		m_array = 0x0,
		m_size = 0
	      },
	      addr = 0,
	      next = 0x0
	    }

	In this case, an additional check is needed.  With the current code,
	what happens instead is that the computation computes an incorrect
	address -- but one that does not fail in read_memory, due to the
	precise memory map of the embedded target in question.

	This patch restores the old logic.

2021-08-16  Patrick Monnerat  <patrick@monnerat.net>

	Notify observer of breakpoint auto-disabling
	As breakpoint_modified observer is currently notified upon breakpoint stop
	before handling auto-disabling when enable count is reached, the observer
	is never notified of the disabling.

	The problem affects:
	- The MI interpreter enabled= value when reporting =breakpoint-modified
	- A Python event handler for breakpoint_modified using the "enabled"
	  member of its parameter
	- insight: breakpoint GUI window is not properly updated upon auto-disable

	This patch moves the observer notification after the auto-disabling
	code and implements corresponding tests for the MI and Python cases.

	Fixes https://sourceware.org/bugzilla/show_bug.cgi?id=23336

	Change-Id: I0c50df4789334071e5390cb46b3ca0d4a7f83c61

2021-08-16  H.J. Lu  <hjl.tools@gmail.com>

	as: Replace the removed symbol with the versioned symbol
	When a symbol removed by .symver is used in relocation and there is one
	and only one versioned symbol, don't remove the symbol.  Instead, mark
	it to be removed and replace the removed symbol used in relocation with
	the versioned symbol before generating relocation.

		PR gas/28157
		* symbols.c (symbol_flags): Add removed.
		(symbol_entry_find): Updated.
		(symbol_mark_removed): New function.
		(symbol_removed_p): Likewise.
		* symbols.h (symbol_mark_removed): New prototype.
		(symbol_removed_p): Likewise.
		* write.c (write_relocs): Call obj_fixup_removed_symbol on
		removed fixp->fx_addsy and fixp->fx_subsy if defined.
		(set_symtab): Don't add a symbol if symbol_removed_p returns true.
		* config/obj-elf.c (elf_frob_symbol):  Don't remove the symbol
		if it is used on relocation.  Instead, mark it as to be removed
		and issue an error if the symbol has more than one versioned name.
		(elf_fixup_removed_symbol): New function.
		* config/obj-elf.h (elf_fixup_removed_symbol): New prototype.
		(obj_fixup_removed_symbol): New.
		* testsuite/gas/symver/symver11.d: Updated expected error
		message.
		* testsuite/gas/symver/symver16.d: New file.
		* testsuite/gas/symver/symver16.s: Likewise.

2021-08-16  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-15  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-14  Alan Modra  <amodra@gmail.com>

	ld script fill pattern expression
	It turns out we do need to backtrack when parsing after all.  The
	fill_opt component in the section rule swiches to EXPRESSION and back
	to SCRIPT, and to find the end of an expression it is necessary to
	look ahead one token.

		* ldgram.y (section): Throw away lookahead NAME token.
		(overlay_section): Likewise.
		* testsuite/ld-elf/overlay.t: Add fill pattern on overlays.
		Test fill pattern before stupidly named normal sections too,
		and before /DISCARD/.

2021-08-14  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-13  Alan Modra  <amodra@gmail.com>

	ld lexer tidy, possibly break the world
	This tidies the states in which ld lexer rules are enabled.
	This change will quite likely trip over issues similar to those
	mentioned in the new ldlex.l comments, so please test it out.

		* ldgram.y (wildcard_name): Remove now unnecessary components.
		* ldlex.l: Restrict many rules' states.  Remove -l expression
		state rule.  Comment on lookahead state madness and need for
		/DISCARD/ in expression state.

2021-08-13  Alan Modra  <amodra@gmail.com>

	ld script lower-case absolute and sizeof_headers
	I think these happened by accident, so let's see what breaks if they
	are removed.

		* ldlex.l: Remove lower case "absolute" and "sizeof_headers"
		in non-mri mode.
		* ld.texi: Remove sizeof_headers index.
		* testsuite/ld-mmix/mmohdr1.ld: Use SIZEOF_HEADERS.

2021-08-13  Alan Modra  <amodra@gmail.com>

	tidy mri script extern
	MRI mode generally doesn't flip lexer states, so let's make MRI mode
	"extern" not do so either.

		* ldgram.y (extern_name_list): Don't change lex state here.
		(ifile_p1): Change state here on EXTERN instead.

2021-08-13  Alan Modra  <amodra@gmail.com>

	Re: PR28217, Syntax error when memory region contains a hyphen
	I discovered some more errors when tightening up the lexer rules.
	Just because we INCLUDE a file doesn't mean we've switched states.

		PR 28217
		* ldgram.y (statement): Don't switch lexer state on INCLUDE.
		(mri_script_command, ifile_p1, memory_spec, section): Likewise.

2021-08-13  Lifang Xia  <lifang_xia@c-sky.com>

	PR28168: [CSKY] Fix stack overflow in disassembler
	PR 28168:
	Stack overflow with a large float. %f is not a goot choice for this.
	%f should be replaced with %.7g.

	gas/
		* testsuite/gas/csky/pr28168.d: New testcase for PR 28168.
		* testsuite/gas/csky/pr28168.s: Likewise.
		* testsuite/gas/csky/v2_float_part2.d: Following the new format.
		* opcodes/csky-dis.c (csky_output_operand): %.7g replaces %f.

2021-08-13  Alan Modra  <amodra@gmail.com>

	PR28217, Syntax error when memory region contains a hyphen
	The saga of commit 40726f16a8d7 continues.  This attacks the problem
	of switching between SCRIPT and EXPRESSION state lexing by removing
	the need to do so for phdrs like ":text".  Instead {WILDCHAR}*
	matching, the reason why ":text" lexed as one token, is restricted to
	within the braces of a section or overlay statement.  The new WILD
	lexer state is switched at the non-optional brace tokens, so
	ldlex_backup is no longer needed.  I've also removed the BOTH state,
	which doesn't seem to be needed any more.  Besides rules involving
	error reporting, there was just one place where SCRIPT appeared
	without BOTH, the {WILDCHAR}* rule, three where BOTH appears without
	SCRIPT for tokens that only need EXPRESSION state, and two where BOTH
	appears alongside INPUT_LIST.  (Since I'm editing the wild and
	filename rules, removing BOTH and adding WILD can also be seen as
	renaming the old BOTH state to SCRIPT and renaming the old SCRIPT
	state to WILD with a reduced scope.)

	As a followup, I'll look at removing EXPRESSION state from some lexer
	rules that no longer need it due to this cleanup.

		PR 28217
		* ldgram.y (exp <ORIGIN, LENGTH>): Use paren_script_name.
		(section): Parse within braces of section in wild mode, and
		after brace back in script mode.  Remove ldlex_backup call.
		Similarly for OVERLAY.
		(overlay_section): Similarly.
		(script_file): Replace ldlex_both with ldlex_script.
		* ldlex.h (ldlex_wild): Declare.
		(ldlex_both): Delete.
		* ldlex.l (BOTH): Delete.  Remove state from all rules.
		(WILD): New state.  Enable many tokens in this state.
		Enable filename match in SCRIPT mode.  Enable WILDCHAR match
		in WILD state, disable in SCRIPT mode.
		(ldlex_wild): New function.
		* ldfile.c (ldfile_try_open_bfd): Replace ldlex_both call with
		ldlex_script.

2021-08-13  Alan Modra  <amodra@gmail.com>

	ns32k configury
	Since ns32k-netbsd is as yet not removed, just marked obsolete,
	the target should still be accepted with --enable-obsolete.

	I also enabled ns32k-openbsd in ld since there doesn't seem to be a
	good reason why that target is not supported there but is elsewhere.

	bfd/
		* config.bfd: Allow ns32k-netbsd.
	ld/
		* configure.tgt: Allow ns32k-openbsd.

2021-08-13  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-13  Lancelot SIX  <lsix@lancelotsix.com>

	gdb: riscv_scan_prologue: handle LD and LW instructions
	While working on the testsuite, I ended up noticing that GDB fails to
	produce a full backtrace from a thread waiting in pthread_join.  When
	selecting the waiting thread and using the 'bt' command, the following
	result can be observed:

		(gdb) bt
		#0  0x0000003ff7fccd20 in __futex_abstimed_wait_common64 () from /lib/riscv64-linux-gnu/libpthread.so.0
		#1  0x0000003ff7fc43da in __pthread_clockjoin_ex () from /lib/riscv64-linux-gnu/libpthread.so.0
		Backtrace stopped: frame did not save the PC

	On my platform, I do not have debug symbols for glibc, so I need to rely
	on prologue analysis in order to unwind stack.

	Here is what the function prologue looks like:

		(gdb) disassemble __pthread_clockjoin_ex
		Dump of assembler code for function __pthread_clockjoin_ex:
		   0x0000003ff7fc42de <+0>:     addi    sp,sp,-144
		   0x0000003ff7fc42e0 <+2>:     sd      s5,88(sp)
		   0x0000003ff7fc42e2 <+4>:     auipc   s5,0xd
		   0x0000003ff7fc42e6 <+8>:     ld      s5,-2(s5) # 0x3ff7fd12e0
		   0x0000003ff7fc42ea <+12>:    ld      a5,0(s5)
		   0x0000003ff7fc42ee <+16>:    sd      ra,136(sp)
		   0x0000003ff7fc42f0 <+18>:    sd      s0,128(sp)
		   0x0000003ff7fc42f2 <+20>:    sd      s1,120(sp)
		   0x0000003ff7fc42f4 <+22>:    sd      s2,112(sp)
		   0x0000003ff7fc42f6 <+24>:    sd      s3,104(sp)
		   0x0000003ff7fc42f8 <+26>:    sd      s4,96(sp)
		   0x0000003ff7fc42fa <+28>:    sd      s6,80(sp)
		   0x0000003ff7fc42fc <+30>:    sd      s7,72(sp)
		   0x0000003ff7fc42fe <+32>:    sd      s8,64(sp)
		   0x0000003ff7fc4300 <+34>:    sd      s9,56(sp)
		   0x0000003ff7fc4302 <+36>:    sd      a5,40(sp)

	As far as prologue analysis is concerned, the most interesting part is
	done at address 0x0000003ff7fc42ee (<+16>): 'sd ra,136(sp)'. This stores
	the RA (return address) register on the stack, which is the information
	we are looking for in order to identify the caller.

	In the current implementation of the prologue scanner, GDB stops when
	hitting 0x0000003ff7fc42e6 (<+8>) because it does not know what to do
	with the 'ld' instruction.  GDB thinks it reached the end of the
	prologue but have not yet reached the important part, which explain
	GDB's inability to unwind past this point.

	The section of the prologue starting at <+4> until <+12> is used to load
	the stack canary[1], which will then be placed on the stack at <+36> at
	the end of the prologue.

	In order to have the prologue properly handled, this commit proposes to
	add support for the ld instruction in the RISC-V prologue scanner.
	I guess riscv32 would use lw in such situation so this patch also adds
	support for this instruction.

	With this patch applied, gdb is now able to unwind past pthread_join:

		(gdb) bt
		#0  0x0000003ff7fccd20 in __futex_abstimed_wait_common64 () from /lib/riscv64-linux-gnu/libpthread.so.0
		#1  0x0000003ff7fc43da in __pthread_clockjoin_ex () from /lib/riscv64-linux-gnu/libpthread.so.0
		#2  0x0000002aaaaaa88e in bar() ()
		#3  0x0000002aaaaaa8c4 in foo() ()
		#4  0x0000002aaaaaa8da in main ()

	I have had a look to see if I could reproduce this easily, but in my
	simple testcases using '-fstack-protector-all', the canary is loaded
	after the RA register is saved.  I do not have a reliable way of
	generating a prologue similar to the problematic one so I forged one
	instead.

	The testsuite have been run on riscv64 ubuntu 21.01 with no regression
	observed.

	[1] https://en.wikipedia.org/wiki/Buffer_overflow_protection#Canaries

2021-08-12  Tom Tromey  <tromey@adacore.com>

	Update documentation to mention Pygments
	Philippe Blain pointed out that the gdb documentation does not mention
	that Pygments may be used for source highlighting.  This patch updates
	the docs to reflect how highlighting is actually done.

2021-08-12  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: make gdbarch_printable_names return a vector
	I noticed that gdbarch_selftest::operator() leaked the value returned by
	gdbarch_printable_names.  Make gdbarch_printable_names return an
	std::vector and update callers.  That makes it easier for everyone
	involved, less manual memory management.

	Change-Id: Ia8fc028bdb91f787410cca34f10bf3c5a6da1498

2021-08-12  Carl Love  <cel@us.ibm.com>

	Improve forward progress test in python.exp
	The test steps into func2 and than does an up to get back to the previous
	frame. The test checks that the line number you are at after the up command
	is greater than the line where the function was called from. The
	assembly/codegen for the powerpc target includes a NOP after the
	branch-link.

	func2 (); /* Break at func2 call site. /
	10000694: 59 00 00 48 bl 100006ec
	10000698: 00 00 00 60 nop
	return 0; / Break to end. */
	1000069c: 00 00 20 39 li r9,0

	The PC at the instruction following the branch-link is 0x10000698 which
	GDB.find_pc_line() maps to the same line number as the bl instruction.
	GDB did move past the branch-link location thus making forward progress.

	The following proposed fix adds an additional PC check to see if forward
	progress was made.  The line test is changed from greater than to greater
	than or equal.

2021-08-12  Jiangshuai Li  <jiangshuai_li@c-sky.com>

	gdb:csky rm tdesc_has_registers in csky_register_name
	As CSKY arch has not parsed target-description.xml in csky_gdbarch_init,
	when a remote server, like csky-qemu or gdbserver, send a target-description.xml
	to gdb, tdesc_has_registers will return ture, but tdesc_register_name (gdbarch, 0)
	will return NULL, so a cmd "info registers r0" will not work.

	Function of parsing target-description.xml will be add later for CSKY arch,
	now it is temporarily removed to allow me to do other supported tests.

	2021-07-15 Jiangshuai Li  <jiangshuai_li@c-sky.com>

	            * csky-tdep.c : not using tdesc funtions in csky_register_name

2021-08-12  Alan Modra  <amodra@gmail.com>

	Re: gas: support NaN flavors
	Fixes tic4x-coff FAIL: simple FP constants

		* testsuite/gas/all/float.s: Make NaN tests conditional on hasnan.
		* testsuite/gas/all/gas.exp: Define hasnan.

2021-08-12  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-11  H.J. Lu  <hjl.tools@gmail.com>

	ld: Update the pass and fail strings of PR ld/28138 test
		PR ld/28138
		* testsuite/ld-plugin/lto.exp: Update the pass and fail strings
		of PR ld/28138 test to indicate which part of the test passed
		and failed.

2021-08-11  Darius Galis  <darius.galis@cyberthorstudios.com>

	Fix a typo in the RX asse,bler.  The Double-precision floating-point exception handling control register name is DECNT not DCENT.
		* config/rx-parse.y (DECNT): Fixed typo.
		* testsuite/gas/rx/dpopm.sm (DECNT): Fixed typo.
		* testsuite/gas/rx/dpushm.sm (DECNT): Fixed typo.
		* testsuite/gas/rx/macros.inc (DECNT): Fixed typo.

2021-08-11  Nick Clifton  <nickc@redhat.com>

	Fix an internal error in the CSKY assembler when asked to resolve an overlarge constant.
		PR 28215
		* config/tc-csky.c (md_apply_fix): Correctly handle a fixup that
		involves an overlarge constant.

2021-08-11  Luis Machado  <luis.machado@linaro.org>

	Add 3 new PAC-related ARM note types
	The following patch synchronizes includes/objdump/readelf with the Linux
	Kernel in terms of ARM regset notes.

	We're currently missing 3 of them:

	NT_ARM_PACA_KEYS
	NT_ARM_PACG_KEYS
	NT_ARM_PAC_ENABLED_KEYS

	We don't need GDB to bother with this at the moment, so this doesn't update
	bfd/elf.c. If needed, we can do it in the future.

	binutils/

		* readelf.c (get_note_type): Handle new ARM PAC notes.

	include/elf/

		* common.h (NT_ARM_PACA_KEYS, NT_ARM_PACG_KEYS)
		(NT_ARM_PAC_ENABLED_KEYS): New constants.

2021-08-11  Nick Clifton  <nickc@redhat.com>

	Updated Portuguese translation for the binutils sub-directory.

2021-08-11  John Ericson  <git@JohnEricson.me>

	Deprecate a.out support for NetBSD targets.
	As discussed previously, a.out support is now quite deprecated, and in
	some cases removed, in both Binutils itself and NetBSD, so this legacy
	default makes little sense. `netbsdelf*` and `netbsdaout*` still work
	allowing the user to be explicit about there choice. Additionally, the
	configure script warns about the change as Nick Clifton requested.

	One possible concern was the status of NetBSD on NS32K, where only a.out
	was supported. But per [1] NetBSD has removed support, and if it were to
	come back, it would be with ELF. The binutils implementation is
	therefore marked obsolete, per the instructions in the last message.

	With that patch and this one applied, I have confirmed the following:

	--target=i686-unknown-netbsd
	--target=i686-unknown-netbsdelf
	  builds completely

	--target=i686-unknown-netbsdaout
	  properly fails because target is deprecated.

	--target=vax-unknown-netbsdaout builds completely except for gas, where
	the target is deprecated.

	[1]: https://mail-index.netbsd.org/tech-toolchain/2021/07/19/msg004025.html
	---
	 bfd/config.bfd                             | 43 +++++++++++++--------
	 bfd/configure.ac                           |  5 +--
	 binutils/testsuite/binutils-all/nm.exp     |  2 +-
	 binutils/testsuite/lib/binutils-common.exp |  7 +---
	 config/picflag.m4                          |  4 +-
	 gas/configure.tgt                          |  9 +++--
	 gas/testsuite/gas/arm/blx-bl-convert.d     |  2 +-
	 gas/testsuite/gas/arm/blx-local-thumb.d    |  2 +-
	 gas/testsuite/gas/sh/basic.exp             |  2 +-
	 gdb/configure.host                         | 34 +++++++----------
	 gdb/configure.tgt                          |  2 +-
	 gdb/testsuite/gdb.asm/asm-source.exp       |  6 +--
	 intl/configure                             |  2 +-
	 ld/configure.tgt                           | 44 +++++++++++-----------
	 ld/testsuite/ld-arm/arm-elf.exp            |  4 +-
	 ld/testsuite/ld-elf/elf.exp                |  2 +-
	 ld/testsuite/ld-elf/shared.exp             |  4 +-
	 libiberty/configure                        |  4 +-

2021-08-11  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: don't print backtrace when dumping core after an internal error
	Currently, when GDB hits an internal error, and the user selects to
	dump core, the recently added feature to write a backtrace to the
	console will kick in, and print a backtrace as well as dumping the
	core.

	This was certainly not my intention when adding the backtrace on fatal
	signal functionality, this feature was intended to produce a backtrace
	when GDB crashes due to some fatal signal, internal errors should have
	continued to behave as they did before, unchanged.

	In this commit I set the signal disposition of SIGABRT back to SIG_DFL
	just prior to the call to abort() that GDB uses to trigger the core
	dump, this prevents GDB reaching the code that writes the backtrace to
	the console.

	I've also added a test that checks we don't see a backtrace on the
	console after an internal error.

2021-08-11  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: register SIGBUS, SIGFPE, and SIGABRT handlers
	Register handlers for SIGBUS, SIGFPE, and SIGABRT.  All of these
	signals are setup as fatal signals that will cause GDB to terminate.
	However, by passing these signals through the handle_fatal_signal
	function, a user can arrange to see a backtrace when GDB
	terminates (see maint set backtrace-on-fatal-signal).

	In normal use of GDB there should be no user visible changes after
	this commit.  Only if GDB terminates with one of the above signals
	will GDB change slightly, potentially printing a backtrace before
	aborting.

	I've added new tests for SIGFPE, SIGBUS, and SIGABRT.

2021-08-11  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: print backtrace on fatal SIGSEGV
	This commit adds a new maintenance feature, the ability to print
	a (limited) backtrace if GDB dies due to a fatal signal.

	The backtrace is produced using the backtrace and backtrace_symbols_fd
	functions which are declared in the execinfo.h header, and both of
	which are async signal safe.  A configure check has been added to
	check for these features, if they are not available then the new code
	is not compiled into GDB and the backtrace will not be printed.

	The motivation for this new feature is to aid in debugging GDB in
	situations where GDB has crashed at a users site, but the user is
	reluctant to share core files, possibly due to concerns about what
	might be in the memory image within the core file.  Such a user might
	be happy to share a simple backtrace that was written to stderr.

	The production of the backtrace is on by default, but can switched off
	using the new commands:

	  maintenance set backtrace-on-fatal-signal on|off
	  maintenance show backtrace-on-fatal-signal

	Right now, I have hooked this feature in to GDB's existing handling of
	SIGSEGV only, but this will be extended to more signals in a later
	commit.

	One additional change I have made in this commit is that, when we
	decide GDB should terminate due to the fatal signal, we now
	raise the same fatal signal rather than raising SIGABRT.

	Currently, this is only effecting our handling of SIGSEGV.  So,
	previously, if GDB hit a SEGV then we would terminate GDB with a
	SIGABRT.  After this commit we will terminate GDB with a SIGSEGV.

	This feels like an improvement to me, we should still get a core dump,
	but in many shells, the user will see a more specific message once GDB
	exits, in bash for example "Segmentation fault" rather than "Aborted".

	Finally then, here is an example of the output a user would see if GDB
	should hit an internal SIGSEGV:

	  Fatal signal: Segmentation fault
	  ----- Backtrace -----
	  ./gdb/gdb[0x8078e6]
	  ./gdb/gdb[0x807b20]
	  /lib64/libpthread.so.0(+0x14b20)[0x7f6648c92b20]
	  /lib64/libc.so.6(__poll+0x4f)[0x7f66484d3a5f]
	  ./gdb/gdb[0x1540f4c]
	  ./gdb/gdb[0x154034a]
	  ./gdb/gdb[0x9b002d]
	  ./gdb/gdb[0x9b014d]
	  ./gdb/gdb[0x9b1aa6]
	  ./gdb/gdb[0x9b1b0c]
	  ./gdb/gdb[0x41756d]
	  /lib64/libc.so.6(__libc_start_main+0xf3)[0x7f66484041a3]
	  ./gdb/gdb[0x41746e]
	  ---------------------
	  A fatal error internal to GDB has been detected, further
	  debugging is not possible.  GDB will now terminate.

	  This is a bug, please report it.  For instructions, see:
	  <https://www.gnu.org/software/gdb/bugs/>.

	  Segmentation fault (core dumped)

	It is disappointing that backtrace_symbols_fd does not actually map
	the addresses back to symbols, this appears, in part, to be due to GDB
	not being built with -rdynamic as the manual page for
	backtrace_symbols_fd suggests, however, even when I do add -rdynamic
	to the build of GDB I only see symbols for some addresses.

	We could potentially look at alternative libraries to provide the
	backtrace (e.g. libunwind) however, the solution presented here, which
	is available as part of glibc is probably a good baseline from which
	we might improve things in future.

2021-08-11  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: rename async_init_signals to gdb_init_signals
	The async_init_signals has, for some time, dealt with async and sync
	signals, so removing the async prefix makes sense I think.

	Additionally, as pointed out by Pedro:

	  .....

	The comments relating to SIGTRAP and SIGQUIT within this function are
	out of date.

	The comments for SIGTRAP talk about the signal disposition (SIG_IGN)
	being passed to the inferior, meaning the signal disposition being
	inherited by GDB's fork children.  However, we now call
	restore_original_signals_state prior to forking, so the comment on
	SIGTRAP is redundant.

	The comments for SIGQUIT are similarly out of date, further, the
	comment on SIGQUIT talks about problems with BSD4.3 and vfork,
	however, we have not supported BSD4.3 for several years now.

	Given the above, it seems that changing the disposition of SIGTRAP is
	no longer needed, so I've deleted the signal() call for SIGTRAP.

	Finally, the header comment on the function now called
	gdb_init_signals was getting quite out of date, so I've updated it
	to (hopefully) better reflect reality.

	There should be no user visible change after this commit.

2021-08-11  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: register signal handler after setting up event token
	This commit fixes the smallest of small possible bug related to signal
	handling.  If we look in async_init_signals we see code like this:

	  signal (SIGQUIT, handle_sigquit);
	  sigquit_token =
	    create_async_signal_handler (async_do_nothing, NULL, "sigquit");

	Then if we look in handle_sigquit we see code like this:

	  mark_async_signal_handler (sigquit_token);
	  signal (sig, handle_sigquit);

	Finally, in mark_async_signal_handler we have:

	  async_handler_ptr->ready = 1;

	Where async_handler_ptr will be sigquit_token.

	What this means is that if a SIGQUIT arrive in async_init_signals
	after handle_sigquit has been registered, but before sigquit_token has
	been initialised, then GDB will most likely crash.

	The chance of this happening is tiny, but fixing this is trivial, just
	ensure we call create_async_signal_handler before calling signal, so
	lets do that.

	There are no tests for this.  Trying to land a signal in the right
	spot is pretty hit and miss.  I did try changing the current HEAD GDB
	like this:

	  signal (SIGQUIT, handle_sigquit);
	  raise (SIGQUIT);
	  sigquit_token =
	    create_async_signal_handler (async_do_nothing, NULL, "sigquit");

	And confirmed that this did result in a crash, after my change I tried
	this:

	  sigquit_token =
	    create_async_signal_handler (async_do_nothing, NULL, "sigquit");
	  signal (SIGQUIT, handle_sigquit);
	  raise (SIGQUIT);

	And GDB now starts up just fine.

	gdb/ChangeLog:

		* event-top.c (async_init_signals): For each signal, call signal
		only after calling create_async_signal_handler.

2021-08-11  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: terminate upon receipt of SIGFPE
	GDB's SIGFPE handling is broken, this is PR gdb/16505 and
	PR gdb/17891.

	We currently try to use an async event token to process SIGFPE.  So,
	when a SIGFPE arrives the signal handler calls
	mark_async_signal_handler then returns, effectively ignoring the
	signal (for now).

	The intention is that later the event loop will see that the async
	token associated with SIGFPE has been marked and will call the async
	handler, which just throws an error.

	The problem is that SIGFPE is not safe to ignore.  Ignoring a
	SIGFPE (unless it is generated artificially, e.g. by raise()) is
	undefined behaviour, after ignoring the signal on many targets we
	return to the instruction that caused the SIGFPE to be raised, which
	immediately causes another SIGFPE to be raised, we get stuck in an
	infinite loop.  The behaviour is certainly true on x86-64.

	To view this behaviour I simply added some dummy code to GDB that
	performed an integer divide by zero, compiled this on x86-64
	GNU/Linux, ran GDB and saw GDB hang.

	In this commit, I propose to remove all special handling of SIGFPE and
	instead just let GDB make use of the default SIGFPE action, that is,
	to terminate the process.

	The only user visible change here should be:

	  - If a user sends a SIGFPE to GDB using something like kill,
	    previously GDB would just print an error and remain alive, now GDB
	    will terminate.  This is inline with what happens if the user
	    sends GDB a SIGSEGV from kill though, so I don't see this as an
	    issue.

	  - If a bug in GDB causes a real SIGFPE, previously the users GDB
	    session would hang.  Now the GDB session will terminate.  Again,
	    this is inline with what happens if GDB receives a SIGSEGV due to
	    an internal bug.

	In bug gdb/16505 there is mention that it would be nice if GDB did
	more than just terminate when receiving a fatal signal.  I haven't
	done that in this commit, but later commits will move in that
	direction.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=16505
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=17891

2021-08-11  Alan Modra  <amodra@gmail.com>

	PR28198, Support # as linker script comment marker
		PR 28198
		* ldlex.l: Combine rules for handling newline, whitespace and
		comments.  Extend # comment handling to all states.

2021-08-11  Alan Modra  <amodra@gmail.com>

	ldgram.y tidies
	I've been tripped up before thinking the "end" rule was the "END"
	token.  Let's use a better name.  The formatting changes are for
	consistency within rules, and making it a little easier to visually
	separate tokens from mid-rule actions.

		* ldgram.y (separator): Rename from "end".  Update uses.
		(statement): Formatting.  Move ';' match to beginning.
		(paren_script_name): Formatting.  Simplify.
		(must_be_exp, section): Formatting.

2021-08-11  Alan Modra  <amodra@gmail.com>

	Mention whitespace in script expressions
	Inside an output section statement, ld's parser can't tell whether a
	line
	    .+=4;
	is an assignment to dot or a file named ".+=4".

		* ld.texi (expressions): Mention need for whitespace.

2021-08-11  Matt Jacobson  <mhjacobson@me.com>

	Add a -mno-dollar-line-separator command line option to the AVR assembler.
	Some frontends, like the gcc Objective-C frontend, emit symbols with $
	characters in them.  The AVR target code in gas treats $ as a line separator,
	so the code doesn?t assemble correctly.

	Provide a machine-specific option to disable treating $ as a line separator.

		* config/tc-avr.c (enum options): Add option flag.
		(struct option): Add option -mno-dollar-line-separator.
		(md_parse_option): Adjust treatment of $ when option is present.
		* config/tc-avr.h: Use avr_line_separator_chars.

2021-08-11  Nick Clifton  <nickc@redhat.com>

	Fix typo in previous delta

2021-08-11  Jan Beulich  <jbeulich@suse.com>

	gas: fold IEEE encoding of -Inf with that of +Inf
	The respective results differ only by the sign bits - there's no need to
	have basically identical (partially even arch-specific) logic twice.
	Simply set the sign bit at the end of encoding the various formats.

2021-08-11  Jan Beulich  <jbeulich@suse.com>

	gas: support NaN flavors
	Like for infinity, there isn't just a single NaN. The sign bit may be
	of interest and, going beyond infinity, whether the value is quiet or
	signalling may be even more relevant to be able to encode.

	Note that an anomaly with x86'es double extended precision NaN values
	gets taken care of at the same time: For all other formats a positive
	value with all mantissa bits set was used, while here a negative value
	with all non-significant mantissa bits clear was chose for an unknown
	reason.

	For m68k, since I don't know their X_PRECISION floating point value
	layout, a warning gets issued if any of the new flavors was attempted
	to be encoded that way. However likely it may be that, given that the
	code lives in a source file supposedly implementing IEEE-compliant
	formats, the bit patterns of the individual words match x86'es, I didn't
	want to guess so. And my very, very old paper doc doesn't even mention
	floating point formats other than single and double.

2021-08-11  Jan Beulich  <jbeulich@suse.com>

	Arm64: leave .bfloat16 processing to common code
	With x86 support having been implemented by extending atof-ieee.c, avoid
	unnecessary code duplication in md_atof(). This will then also allow to
	take advantage of adjustments made there without needing to mirror them
	here.

	Arm32: leave more .bfloat16 processing to common code
	With x86 support having been implemented by extending atof-ieee.c, avoid
	unnecessary code duplication in md_atof(). This will then also allow to
	take advantage of adjustments made there without needing to mirror them
	here.

	gas: make 2nd argument of .dcb.* consistently optional
	Unlike the forms consuming/producing integer data, the floating point
	ones so far required the 2nd argument to be present, contrary to
	documentation. To avoid code duplication, split float_length() out of
	hex_float() (taking the opportunity to adjust error message wording).

2021-08-11  Jan Beulich  <jbeulich@suse.com>

	x86: introduce .bfloat16 directive
	This is to be able to generate data acted upon by AVX512-BF16 and
	AMX-BF16 insns. While not part of the IEEE standard, the format is
	sufficiently standardized to warrant handling in config/atof-ieee.c.
	Arm, where custom handling was implemented, may want to leverage this as
	well. To be able to also use the hex forms supported for other floating
	point formats, a small addition to the generic hex_float() is needed.

	Extend existing x86 testcases.

2021-08-11  Jan Beulich  <jbeulich@suse.com>

	x86: introduce .hfloat directive
	This is to be able to generate data passed to {,V}CVTPH2PS and acted
	upon by AVX512-FP16 insns. To be able to also use the hex forms
	supported for other floating point formats, a small addition to the
	generic hex_float() is needed.

	Extend existing x86 testcases.

2021-08-11  Jan Beulich  <jbeulich@suse.com>

	x86/ELF: fix .tfloat output with hex input
	The ELF psABI-s are quite clear here: On 32-bit the data type is 12
	bytes long (with 2 bytes of trailing padding), while on 64-bit it is 16
	bytes long (with 6 bytes of padding). Make hex_float() capable of
	handling such padding.

	Note that this brings the emitted data size of .dc.x / .dcb.x in line
	also for non-ELF targets; so far they were different depending on input
	format (dec vs hex).

	Extend the existing x86 testcases.

2021-08-11  Jan Beulich  <jbeulich@suse.com>

	x86/ELF: fix .ds.x output
	The ELF psABI-s are quite clear here: On 32-bit the underlying data type
	is 12 bytes long (with 2 bytes of trailing padding), while on 64-bit it
	is 16 bytes long (with 6 bytes of padding). Make s_space() capable of
	handling 'x' (and 'p') type floating point being other than 12 bytes
	wide (also adjusting documentation). This requires duplicating the
	definition of X_PRECISION in the target speciifc header; the compiler
	would complain if this was out of sync with config/atof-ieee.c.

	Note that for now padding space doesn't get separated from actual
	storage, which means that things will work correctly only for little-
	endian cases, and which also means that by specifying large enough
	numbers padding space can be set to non-zero. Since the logic is needed
	for a single little-endian architecture only for now, I'm hoping that
	this might be acceptable for the time being; otherwise the change will
	become more intrusive.

	Note also that this brings the emitted data size of .ds.x vs .tfloat in
	line for non-ELF targets as well; the issue will be even more obvious
	when further taking into account a subsequent patch fixing .dc.x/.dcb.x
	(where output sizes currently differ depending on input format).

	Extend existing x86 testcases.

2021-08-11  Jan Beulich  <jbeulich@suse.com>

	x86/ELF: fix .tfloat output
	The ELF psABI-s are quite clear here: On 32-bit the data type is 12
	bytes long (with 2 bytes of trailing padding), while on 64-bit it is 16
	bytes long (with 6 bytes of padding). Make ieee_md_atof() capable of
	handling such padding, and specify the needed padding for x86 (leaving
	non-ELF targets alone for now). Split the existing x86 testcase.

	x86: have non-PE/COFF BEOS be recognized as ELF
	BEOS, unless explicitly requesting *-*-beospe* targets, uses standard
	ELF. None of the newly enabled tests in the testsuite fail for me.

2021-08-11  Alan Modra  <amodra@gmail.com>

	PR28163, Segment fault in function rl78_special_reloc
	Relocation offset checks were completely missing in the rl78 backend,
	allowing a relocation to write over memory anywhere.  This was true
	for rl78_special_reloc, a function primarily used when applying debug
	relocations, and in rl78_elf_relocate_section used by the linker.

	This patch fixes those problems by correcting inaccuracies in the
	relocation howtos, then uses those howtos to sanity check relocation
	offsets before applying relocations.  In addition, the patch
	implements overflow checking using the howto information rather than
	the ad-hoc scheme implemented in relocate_section.  I implemented the
	overflow checking in rl78_special_reloc too.

		* elf32-rl78.c (RL78REL, RL78_OP_REL): Add mask parameter.
		(rl78_elf_howto_table): Set destination masks.  Correct size and
		bitsize of DIR32_REV.  Correct complain_on_overflow for many relocs
		as per tests in relocate_section.  Add RH_SFR.  Correct bitsize
		for RH_SADDR.  Set size to 3 and bitsize to 0 for all OP relocs.
		(check_overflow): New function.
		(rl78_special_reloc): Check that reloc address is within section.
		Apply relocations using reloc howto.  Check for overflow.
		(RANGE): Delete.
		(rl78_elf_relocate_section): Sanity check r_offset.  Perform
		overflow checking using reloc howto.

2021-08-11  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-10  Tom Tromey  <tom@tromey.com>

	Ignore .debug_types when reading .debug_aranges
	I noticed that the fission-reread.exp test case can cause a complaint
	when run with --target_board=cc-with-debug-names:

	warning: Section .debug_aranges in [...]/fission-reread has duplicate debug_info_offset 0x0, ignoring .debug_aranges.

	The bug here is that this executable has both .debug_info and
	.debug_types, and both have a CU at offset 0x0.  This triggers the
	duplicate warning.

	Because .debug_types doesn't provide any address ranges, these CUs can
	be ignored.  That is, this bug turns out to be another regression from
	the info/types merger patch.

	This patch fixes the problem by having this loop igore type units.
	fission-reread.exp is updated to test for the bug.

2021-08-10  Tom Tromey  <tom@tromey.com>

	Generalize addrmap dumping
	While debugging another patch series, I wanted to dump an addrmap.  I
	came up with this patch, which generalizes the addrmap-dumping code
	from psymtab.c and moves it to addrmap.c.  psymtab.c is changed to use
	the new code.

2021-08-10  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: iterate only on vfork parent threads in handle_vfork_child_exec_or_exit
	I spotted what I think is a buglet in proceed_after_vfork_done.  After a
	vfork child exits or execs, we resume all the threads of the parent.  To
	do so, we iterate on all threads using iterate_over_threads with the
	proceed_after_vfork_done callback.  Each thread is resumed if the
	following condition is true:

	    if (thread->ptid.pid () == pid
		&& thread->state == THREAD_RUNNING
		&& !thread->executing
		&& !thread->stop_requested
		&& thread->stop_signal () == GDB_SIGNAL_0)

	where `pid` is the pid of the vfork parent.  This is not multi-target
	aware: since it only filters on pid, if there is an inferior with the
	same pid in another target, we could end up resuming a thread of that
	other inferior.  The chances of the stars aligning for this to happen
	are tiny, but still.

	Fix that by iterating only on the vfork parent's threads, instead of on
	all threads.  This is more efficient, as we iterate on just the required
	threads (inferiors have their own thread list), and we can drop the pid
	check.  The resulting code is also more straightforward in my opinion,
	so it's a win-win.

	Change-Id: I14647da72e2bf65592e82fbe6efb77a413a4be3a

2021-08-10  Nick Clifton  <nickc@redhat.com>

	Updated Serbian and Russian translations for various sub-directories

2021-08-10  George Barrett  <bob@bob131.so>

	guile: fix smob exports
	Before Guile v2.1 [1], calls to `scm_make_smob_type' implicitly added
	the created class to the exports list of (oop goops); v2.1+ does not
	implicitly create bindings in any modules. This means that the GDB
	manual subsection documenting exported types is not quite right when GDB
	is linked against Guile <v2.1 (types are exported from (oop goops))
	instead of (gdb)) and incorrect when linked against Guile v2.1+ (types
	are not bound to any variables at all!).

	There is a range of cases in which it's necessary or convenient to be
	able to refer to a GDB smob type, for instance:

	 - Pattern matching based on the type of a value.
	 - Defining GOOPS methods handling values from GDB (GOOPS methods
	   typically use dynamic dispatch based on the types of the arguments).
	 - Type-checking assertions when applying some defensive programming on
	   an interface.
	 - Generally any other situation one might encounter in a dynamically
	   typed language that might need some introspection.

	If you're more familiar with Python, it would be quite similar to being
	unable to refer to the classes exported from the GDB module (which is to
	say: not crippling for the most part, but makes certain tasks more
	difficult than necessary).

	This commit makes a small change to GDB's smob registration machinery
	to make sure registered smobs get exported from the current
	module. This will likely cause warnings to the user about conflicting
	exports if they load both (gdb) and (oop goops) from a GDB linked
	against Guile v2.0, but it shouldn't impact functionality (and seemed
	preferable to trying to un-export bindings from (oop goops) if v2.0
	was detected).

	[1]: This changed with Guile commit
	     28d0871b553a3959a6c59e2e4caec1c1509f8595

	gdb/ChangeLog:

	2021-06-07  George Barrett  <bob@bob131.so>

		* guile/scm-gsmob.c (gdbscm_make_smob_type): Export registered
		smob type from the current module.

	gdb/testsuite/ChangeLog:

	2021-06-07  George Barrett  <bob@bob131.so>

		* gdb.guile/scm-gsmob.exp (test exports): Add tests to make
		sure the smob types currently listed in the GDB manual get
		exported from the (gdb) module.

	Change-Id: I7dcd791276b48dfc9edb64fc71170bbb42a6f6e7

2021-08-10  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-09  Nick Clifton  <nickc@redhat.com>

	GAS: DWARF-5: Ensure that the 0'th entry in the directory table contains the current working directory.
		* dwarf2dbg.c (get_directory_table_entry): Ensure that dir[0]
		contains current working directory.
		(out_dir_and_file_list): Likewise.
		* testsuite/gas/elf/dwarf-5-dir0.s: New test source file.
		* testsuite/gas/elf/dwarf-5-dir0.d: New test driver.
		* testsuite/gas/elf/elf.exp: Run the new test.
		* testsuite/gas/elf/dwarf-5-file0.d: Adjust expected output.
		* testsuite/gas/i386/dwarf5-line-1.d: Likewise.
		* testsuite/gas/i386/dwarf5-line-2.d: Likewise.

2021-08-09  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-08  Tom Tromey  <tom@tromey.com>

	Include objfiles.h in a few .c files
	I found a few .c files that rely on objfiles.h, but that only include
	it indirectly, via dwarf2/read.h -> psympriv.h.  If that include is
	removed (something my new DWARF indexer series does), then the build
	will break.

	It seemed harmless and correct to add these includes now, making the
	eventual series a little smaller.

2021-08-08  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-07  Alan Modra  <amodra@gmail.com>

	PR28186, SEGV elf.c:7991:30 in _bfd_elf_fixup_group_sections
		PR 28186
		* elf.c (_bfd_elf_fixup_group_sections): Don't segfault on
		objcopy/strip with NULL output_section.

2021-08-07  Alan Modra  <amodra@gmail.com>

	PR28176, rl78 complex reloc divide by zero
	This is a bit more than just preventing the divide by zero.  Most of
	the patch is tidying up error reporting, so that for example, linking
	an object file with a reloc stack underflow produces a linker error
	rather than just displaying a message that might be ignored.

		PR 28176
		* elf32-rl78.c (RL78_STACK_PUSH, RL78_STACK_POP): Delete.
		(rl78_stack_push, rl78_stack_pop): New inline functions.
		(rl78_compute_complex_reloc): Add status and error message params.
		Use new inline stack handling functions.  Report stack overflow
		or underflow, and divide by zero.
		(rl78_special_reloc): Return status and error message from
		rl78_compute_complex_reloc.
		(rl78_elf_relocate_section): Similarly.  Modernise reloc error
		reporting.  Delete unused bfd_reloc_other case.  Don't assume
		DIR24S_PCREL overflow is due to undefined function.
		(rl78_offset_for_reloc): Adjust to suit rl78_compute_complex_reloc.

2021-08-07  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-06  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Recognize .gdb_index symbol table with empty entries as empty
	When reading a .gdb_index that contains a non-empty symbol table with only
	empty entries, gdb doesn't recognize it as empty.

	Fix this by recognizing that the constant pool is empty, and then setting the
	symbol table to empty.

	Tested on x86_64-linux.

	gdb/ChangeLog:

	2021-08-01  Tom de Vries  <tdevries@suse.de>

		PR symtab/28159
		* dwarf2/read.c (read_gdb_index_from_buffer): Handle symbol table
		filled with empty entries.

	gdb/testsuite/ChangeLog:

	2021-08-01  Tom de Vries  <tdevries@suse.de>

		PR symtab/28159
		* gdb.dwarf2/dw2-zero-range.exp: Remove kfail.

2021-08-06  Tom Tromey  <tromey@adacore.com>

	Unconditionally define _initialize_addrmap
	The way that init.c is generated does not allow for an initialization
	function to be conditionally defined -- doing so will result in a link
	error.

	This patch fixes a build problem that arises from such a conditional
	definition.  It can be reproduce with --disable-unit-tests.

2021-08-06  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Fix zero address complaint for shlib
	In PR28004 the following warning / Internal error is reported:
	...
	$ gdb -q -batch \
	    -iex "set sysroot $(pwd -P)/repro" \
	    ./repro/gdb \
	    ./repro/core \
	    -ex bt
	  ...
	 Program terminated with signal SIGABRT, Aborted.
	 #0  0x00007ff8fe8e5d22 in raise () from repro/usr/lib/libc.so.6
	 [Current thread is 1 (LWP 1762498)]
	 #1  0x00007ff8fe8cf862 in abort () from repro/usr/lib/libc.so.6
	 warning: (Internal error: pc 0x7ff8feb2c21d in read in psymtab, \
	           but not in symtab.)
	 warning: (Internal error: pc 0x7ff8feb2c218 in read in psymtab, \
	           but not in symtab.)
	  ...
	 #2  0x00007ff8feb2c21e in __gnu_debug::_Error_formatter::_M_error() const \
	   [clone .cold] (warning: (Internal error: pc 0x7ff8feb2c21d in read in \
	   psymtab, but not in symtab.)

	) from repro/usr/lib/libstdc++.so.6
	...

	The warning is about the following:
	- in find_pc_sect_compunit_symtab we try to find the address
	  (0x7ff8feb2c218 / 0x7ff8feb2c21d) in the symtabs.
	- that fails, so we try again in the partial symtabs.
	- we find a matching partial symtab
	- however, the partial symtab has a full symtab, so
	  we should have found a matching symtab in the first step.

	The addresses are:
	...
	(gdb) info sym 0x7ff8feb2c218
	__gnu_debug::_Error_formatter::_M_error() const [clone .cold] in \
	  section .text of repro/usr/lib/libstdc++.so.6
	(gdb) info sym 0x7ff8feb2c21d
	__gnu_debug::_Error_formatter::_M_error() const [clone .cold] + 5 in \
	  section .text of repro/usr/lib/libstdc++.so.6
	...
	which correspond to unrelocated addresses 0x9c218 and 0x9c21d:
	...
	$ nm -C  repro/usr/lib/libstdc++.so.6.0.29 | grep 000000000009c218
	000000000009c218 t __gnu_debug::_Error_formatter::_M_error() const \
	  [clone .cold]
	...
	which belong to function __gnu_debug::_Error_formatter::_M_error() in
	/build/gcc/src/gcc/libstdc++-v3/src/c++11/debug.cc.

	The partial symtab that is found for the addresses is instead the one for
	/build/gcc/src/gcc/libstdc++-v3/src/c++98/bitmap_allocator.cc, which is
	incorrect.

	This happens as follows.

	The bitmap_allocator.cc CU has DW_AT_ranges at .debug_rnglist offset 0x4b50:
	...
	    00004b50 0000000000000000 0000000000000056
	    00004b5a 00000000000a4790 00000000000a479c
	    00004b64 00000000000a47a0 00000000000a47ac
	...

	When reading the first range 0x0..0x56, it doesn't trigger the "start address
	of zero" complaint here:
	...
	      /* A not-uncommon case of bad debug info.
	         Don't pollute the addrmap with bad data.  */
	      if (range_beginning + baseaddr == 0
	          && !per_objfile->per_bfd->has_section_at_zero)
	        {
	          complaint (_(".debug_rnglists entry has start address of zero"
	                       " [in module %s]"), objfile_name (objfile));
	          continue;
	        }
	...
	because baseaddr != 0, which seems incorrect given that when loading the
	shared library individually in gdb (and consequently baseaddr == 0), we do see
	the complaint.

	Consequently, we run into this case in dwarf2_get_pc_bounds:
	...
	  if (low == 0 && !per_objfile->per_bfd->has_section_at_zero)
	    return PC_BOUNDS_INVALID;
	...
	which then results in this code in process_psymtab_comp_unit_reader being
	called with cu_bounds_kind == PC_BOUNDS_INVALID, which sets the set_addrmap
	argument to 1:
	...
	      scan_partial_symbols (first_die, &lowpc, &highpc,
	                            cu_bounds_kind <= PC_BOUNDS_INVALID, cu);
	...
	and consequently, the CU addrmap gets build using address info from the
	functions.

	During that process, addrmap_set_empty is called with a range that includes
	0x9c218 and 0x9c21d:
	...
	(gdb) p /x start
	$7 = 0x9989c
	(gdb) p /x end_inclusive
	$8 = 0xb200d
	...
	but it's called for a function at DIE 0x54153 with DW_AT_ranges at 0x40ae:
	...
	    000040ae 00000000000b1ee0 00000000000b200e
	    000040b9 000000000009989c 00000000000998c4
	    000040c3 <End of list>
	...
	and neither range includes 0x9c218 and 0x9c21d.

	This is caused by this code in partial_die_info::read:
	...
	            if (dwarf2_ranges_read (ranges_offset, &lowpc, &highpc, cu,
	                                    nullptr, tag))
	             has_pc_info = 1;
	...
	which pretends that the function is located at addresses 0x9989c..0xb200d,
	which is indeed not the case.

	This patch fixes the first problem encountered: fix the "start address of
	zero" complaint warning by removing the baseaddr part from the condition.
	Same for dwarf2_ranges_process.

	The effect is that:
	- the complaint is triggered, and
	- the warning / Internal error is no longer triggered.

	This does not fix the observed problem in partial_die_info::read, which is
	filed as PR28200.

	Tested on x86_64-linux.

	Co-Authored-By: Simon Marchi <simon.marchi@polymtl.ca>

	gdb/ChangeLog:

	2021-07-29  Simon Marchi  <simon.marchi@polymtl.ca>
		    Tom de Vries  <tdevries@suse.de>

		PR symtab/28004
		* gdb/dwarf2/read.c (dwarf2_rnglists_process, dwarf2_ranges_process):
		Fix zero address complaint.
		* gdb/testsuite/gdb.dwarf2/dw2-zero-range-shlib.c: New test.
		* gdb/testsuite/gdb.dwarf2/dw2-zero-range.c: New test.
		* gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp: New file.

2021-08-06  Alan Modra  <amodra@gmail.com>

	Re: Add tests for Intel AVX512_FP16 instructions
		* testsuite/gas/i386/x86-64-avx512_fp16_pseudo_ops.d: Pass with
		mingw section padding.

2021-08-06  Alan Modra  <amodra@gmail.com>

	chew ubsan warning
	It matters not at all if pc is incremented from its initial NULL
	value, but avoid this silly runtime ubsan error.

		* doc/chew.c (perform): Avoid incrementing NULL pc.

2021-08-06  Alan Modra  <amodra@gmail.com>

	bfd_reloc_offset_in_range overflow
	This patch is more about the style of bounds checking we ought to use,
	rather than a real problem.  An overflow of "octet + reloc_size" can
	only happen with huge sections which would certainly cause out of
	memory errors.

		* reloc.c (bfd_reloc_offset_in_range): Avoid possible overflow.

2021-08-06  Alan Modra  <amodra@gmail.com>

	PR28175, Segment fault in coff-tic30.c reloc_processing
	The obj_convert table shouldn't be accessed without first checking the
	index against the table size.

		PR 28175
		* coff-tic30.c (reloc_processing): Sanity check reloc symbol index.
		* coff-z80.c (reloc_processing): Likewise.
		* coff-z8k.c (reloc_processing): Likewise.

2021-08-06  Alan Modra  <amodra@gmail.com>

	PR28173, nds32_elf_howto_table index out of bounds
	Indexing the howto table was seriously broken by a missing entry, and
	use of assertions about user input rather than testing the input.

		PR 28173
		* elf32-nds32.c (nds32_elf_howto_table): Add missing empty howto.
		(bfd_elf32_bfd_reloc_type_table_lookup): Replace assertions with
		range checks.  Return NULL if unsupported reloc type.  Remove
		dead code.  Take an unsigned int param.
		(nds32_info_to_howto_rel): Test for NULL howto or howto name
		return from lookup.  Remove assertion.
		(nds32_info_to_howto): Remove unnecessary ATTRIBUTE_UNUSED.
		Test for NULL howto or howto name return from lookup.

2021-08-06  Alan Modra  <amodra@gmail.com>

	PR28172, bfin_pcrel24_reloc heap-buffer-overflow
	bfin pcrel24 relocs are weird, they apply to the reloc address minus
	two.  That means reloc addresses of 0 and 1 are invalid.  Check that,
	and fix other reloc range checking.

		PR 28172
		* elf32-bfin.c (bfin_pcrel24_reloc): Correct reloc range check.
		(bfin_imm16_reloc, bfin_byte4_reloc, bfin_bfd_reloc): Likewise.
		(bfin_final_link_relocate): Likewise.

2021-08-06  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-05  Will Schmidt  <will_schmidt@vnet.ibm.com>

	[PATCH] GDB Testsuite, update compile-cplus.exp
	[PATCH] GDB Testsuite, update compile-cplus.exp

	Update the gdb.compile/compile-cplus.exp test to
	handle errors generated when passing bad arguments
	into the gdb-compile command.
	This matches changes made to gdb.compile/compile.exp
	in the past as part of
	"Migrate rest of compile commands to new options framework"
	         e6ed716cd5514c08b9d7c469d185b1aa177dbc22

2021-08-05  Will Schmidt  <will_schmidt@vnet.ibm.com>

	[gdb] Handle .TOC. sections during gdb-compile for rs6000 target.
	[gdb] Handle .TOC. sections during gdb-compile for rs6000 target.

	  When we encounter a .TOC. symbol in the object we are loading,
	we need to associate this with the .toc section in order to
	properly resolve other symbols in the object.  IF a .toc section
	is not found, iterate the sections until we find one with the
	SEC_ALLOC flag.  If that also fails, fall back to using
	the *ABS* section, pointed to by bfd_abs_section_ptr.

2021-08-05  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: gdb.base/attach.exp: expose bug when testing with native-extended-gdbserver
	In gdb.base/attach.exp, proc do_attach_failure_tests, we attach to a
	process.  When then try to attach to the same process in another
	inferior, expecting it to fail.  We then come back to the first inferior
	and try to kill it, to clean up the test.  When using the
	native-extended-gdbserver board, this "kill" test passes, even though it
	didn't actually work:

	    add-inferior
	    [New inferior 2]
	    Added inferior 2 on connection 1 (extended-remote localhost:2347)
	    (gdb) PASS: gdb.base/attach.exp: do_attach_failure_tests: add empty inferior 2
	    inferior 2
	    [Switching to inferior 2 [<null>] (<noexec>)]
	    (gdb) PASS: gdb.base/attach.exp: do_attach_failure_tests: switch to inferior 2
	    attach 817032
	    Attaching to process 817032
	    Attaching to process 817032 failed
	    (gdb) PASS: gdb.base/attach.exp: do_attach_failure_tests: fail to attach again
	    inferior 1
	    [Switching to inferior 1 [process 817032] (/home/simark/build/binutils-gdb/gdb/testsuite/outputs/gdb.base/attach/attach)]
	    [Switching to thread 1.1 (Thread 817032.817032)]
	    #0  main () at /home/simark/src/binutils-gdb/gdb/testsuite/gdb.base/attach.c:19
	    19	  while (! should_exit)
	    (gdb) PASS: gdb.base/attach.exp: do_attach_failure_tests: switch to inferior 1
	    kill
	    Kill the program being debugged? (y or n) y
	    Remote connection closed  <==== That's unexpected
	    (gdb) PASS: gdb.base/attach.exp: do_attach_failure_tests: exit after attach failures

	When the second attach fails, gdbserver seems to break the connection
	(it hangs up on the existing remote target) and start listening again
	for incoming connections.  This is documented in PR 19558 [1].

	Make the expected output regexp for the kill command tighter (it
	currently accepts anything).  Use "set confirm off" so we don't have to
	deal with the confirmation.  And to be really sure the extended-remote
	target still works, try to run the inferior again after killing.  The
	now tests are kfail'ed when the target is gdbserver.

	[1] https://sourceware.org/bugzilla/show_bug.cgi?id=19558

	gdb/testsuite/ChangeLog:

		* gdb.base/attach.exp (do_attach_failure_tests): Make kill
		regexp tighter, run inferior after killing it.  Kfail when
		target is gdbserver.

	Change-Id: I99c5cd3968ce2ec962ace35b016f842a243b7a0d

2021-08-05  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: gdb.base/attach.exp: fix support check in test_command_line_attach_run
	When running this test with the native-extended-gdbserver, we get:

	    main () at /home/simark/src/binutils-gdb/gdb/testsuite/gdb.base/attach.c:19
	    19	  while (! should_exit)
	    The program being debugged has been started already.
	    Start it from the beginning? (y or n) PASS: gdb.base/attach.exp: cmdline attach run: run to prompt
	    y
	    Don't know how to run.  Try "help target".
	    (gdb) FAIL: gdb.base/attach.exp: cmdline attach run: run to main

	This test tests using both "-p <pid>" and "-ex start" on the command line,
	making sure that we first attach and then run.

	Normally, after that "y", we should see the program running again.
	However, a particuliarity of the native-extended-gdbserver is that it
	uses "set auto-connect-native-target off" on the command line.  The full
	GDB command line is:

	    ./gdb -nw -nx -data-directory /home/simark/build/binutils-gdb/gdb/testsuite/../data-directory \
	          -iex set height 0 -iex set width 0 -ex set auto-connect-native-target off \
		  -ex set sysroot -quiet -iex set height 0 -iex set width 0 --pid=536609 -ex start

	The attach succeeds.  I guess it is done before "set
	auto-connect-native-target off", or it somehow bypasses it.  When the
	"start" is executed, the native target is unpushed, while killing the
	existing process, but not re-pushed, due to "set
	auto-connect-native-target off".  So we get that "Don't know how to run"
	message.

	Really, I think it's a case of the test doing things incompatible with
	the board, I think it should just be skipped.  And as we can see with
	the current code, there were some attempts at doing this, just using the
	wrong checks:

	 - isnative: this is a dejagnu proc which checks if the target board has
	   the same triplet as the build machine.  In the case of
	   native-extended-gdbserver, it does.
	 - is_remote target: this checks whether the target board is remote, as
	   in executing on a different machin.  native-extended-gdbserver is not
	   remote.

	Since the --pid option specifically attaches to a process using the
	native target, change the test to use gdb_is_target_native instead.

	gdb/testsuite/ChangeLog:

		* gdb.base/attach.exp (test_command_line_attach_run): Use
		gdb_is_target_native to check if test is supported.

	Change-Id: I762e127f39623889999dc9ed2185540a0951bfb0

2021-08-05  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: target_waitstatus_to_string: print extra info for FORKED, VFORKED, EXECD
	Print the extra information contained in target_waitstatus for these
	events.  For TARGET_WAITKIND_{FORKED,VFORKED}, the extra information is
	contained in related_pid, and is the ptid of the new process.  For
	TARGET_WAITKIND_EXECD, it,s the exec'd path name in execd_pathname.
	Print it using the same format used for TARGET_WAITKIND_STOPPED and
	others.

	Here are sample outputs for all three events:

	    [infrun] print_target_wait_results: target_wait (-1.0.0 [process -1], status) =
	    [infrun] print_target_wait_results:   726890.726890.0 [process 726890],
	    [infrun] print_target_wait_results:   status->kind = vforked, related_pid = 726894.726894.0

	    [infrun] print_target_wait_results: target_wait (-1.0.0 [process -1], status) =
	    [infrun] print_target_wait_results:   727045.727045.0 [process 727045],
	    [infrun] print_target_wait_results:   status->kind = forked, related_pid = 727049.727049.0

	    [infrun] print_target_wait_results: target_wait (-1.0.0 [process -1], status) =
	    [infrun] print_target_wait_results:   727119.727119.0 [process 727119],
	    [infrun] print_target_wait_results:   status->kind = execd, execd_pathname = /usr/bin/ls

	Change-Id: I4416a74e3bf792a625a68bf26c51689e170f2184

2021-08-05  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: use ptid_t::to_string in print_target_wait_results
	The ptid_t::to_string method was introduced recently, to format a ptid_t
	for debug purposes.  It formats the ptid exactly as is done in
	print_target_wait_results, so make print_target_wait_results use it.

	Change-Id: I0a81c8040d3e1858fb304cb28366b34d94eefe4d

2021-08-05  Zoran Zaric  <Zoran.Zaric@amd.com>

	Add as_lval argument to expression evaluator
	There are cases where the result of the expression evaluation is
	expected to be in a form of a value and not location description.

	One place that has this requirement is dwarf_entry_parameter_to_value
	function, but more are expected in the future. Until now, this
	requirement was fulfilled by extending the evaluated expression with
	a DW_OP_stack_value operation at the end.

	New implementation, introduces a new evaluation argument instead.

		* dwarf2/expr.c (dwarf_expr_context::fetch_result): Add as_lval
		argument.
		(dwarf_expr_context::eval_exp): Add as_lval argument.
		* dwarf2/expr.h (struct dwarf_expr_context): Add as_lval
		argument to fetch_result and eval_exp methods.
		* dwarf2/frame.c (execute_stack_op): Add as_lval argument.
		* dwarf2/loc.c (dwarf_entry_parameter_to_value): Remove
		DWARF expression extension.
		(dwarf2_evaluate_loc_desc_full): Add as_lval argument support.
		(dwarf2_evaluate_loc_desc): Add as_lval argument support.
		(dwarf2_locexpr_baton_eval): Add as_lval argument support.

2021-08-05  Zoran Zaric  <zoran.zaric@amd.com>

	Simplify dwarf_expr_context class interface
	Idea of this patch is to get a clean and simple public interface for
	the dwarf_expr_context class, looking like:

	- constructor,
	- destructor,
	- push_address method and
	- evaluate method.

	Where constructor should only ever require a target architecture
	information. This information is held in per object file
	(dwarf2_per_objfile) structure, so it makes sense to keep that
	structure as a constructor argument. It also makes sense to get the
	address size from that structure, but unfortunately that interface
	doesn't exist at the moment, so the dwarf_expr_context class user
	needs to provide that information.

	The push_address method is used to push a CORE_ADDR as a value on
	top of the DWARF stack before the evaluation. This method can be
	later changed to push any struct value object on the stack.

	The evaluate method is the method that evaluates a DWARF expression
	and provides the evaluation result, in a form of a single struct
	value object that describes a location. To do this, the method requires
	a context of the evaluation, as well as expected result type
	information. If the type information is not provided, the DWARF generic
	type will be used instead.

	To avoid storing the gdbarch information in the evaluator object, that
	information is now always acquired from the per_objfile object.

	All data members are now private and only visible to the evaluator
	class, so a m_ prefix was added to all of their names to reflect that.
	To make this distinction clear, they are also accessed through objects
	this pointer, wherever that was not the case before.

	gdb/ChangeLog:

		* dwarf2/expr.c (dwarf_expr_context::dwarf_expr_context): Add
		address size argument.
		(dwarf_expr_context::read_mem): Change to use property_addr_info
		structure.
		(dwarf_expr_context::evaluate): New function.
		(dwarf_expr_context::execute_stack_op): Change to use
		property_addr_info structure.
		* dwarf2/expr.h (struct dwarf_expr_context): New evaluate
		declaration. Change eval and fetch_result method to private.
	        (dwarf_expr_context::gdbarch): Remove member.
	        (dwarf_expr_context::stack): Make private and add m_ prefix.
	        (dwarf_expr_context::addr_size): Make private and add
	        m_ prefix.
	        (dwarf_expr_context::recursion_depth): Make private and add
	        m_ prefix.
	        (dwarf_expr_context::max_recursion_depth): Make private and
	        add m_ prefix.
	        (dwarf_expr_context::len): Make private and add m_ prefix.
	        (dwarf_expr_context::data): Make private and add m_ prefix.
	        (dwarf_expr_context::initialized): Make private and add
	        m_ prefix.
	        (dwarf_expr_context::pieces): Make private and add m_ prefix.
	        (dwarf_expr_context::per_objfile): Make private and add
	        m_ prefix.
	        (dwarf_expr_context::frame): Make private and add m_ prefix.
	        (dwarf_expr_context::per_cu): Make private and add m_ prefix.
	        (dwarf_expr_context::addr_info): Make private and add
	        m_ prefix.
		* dwarf2/frame.c (execute_stack_op): Change to call evaluate
		method.
		* dwarf2/loc.c (dwarf2_evaluate_loc_desc_full): Change to call
		evaluate method.
		(dwarf2_locexpr_baton_eval): Change to call evaluate method.

2021-08-05  Zoran Zaric  <zoran.zaric@amd.com>

	Make DWARF evaluator return a single struct value
	The patch is addressing the issue of class users writing and reading
	the internal data of the dwarf_expr_context class.

	At this point, all conditions are met for the DWARF evaluator to return
	an evaluation result in a form of a single struct value object.

	gdb/ChangeLog:

		* dwarf2/expr.c (pieced_value_funcs): Chenge to static
		function.
		(allocate_piece_closure): Change to static function.
		(dwarf_expr_context::fetch_result): New function.
		* dwarf2/expr.h (struct piece_closure): Remove declaration.
		(struct dwarf_expr_context): fetch_result new declaration.
		fetch, fetch_address and fetch_in_stack_memory members move
		to private.
		(allocate_piece_closure): Remove.
		* dwarf2/frame.c (execute_stack_op): Change to use
		fetch_result.
		* dwarf2/loc.c (dwarf2_evaluate_loc_desc_full): Change to use
		fetch_result.
		(dwarf2_locexpr_baton_eval): Change to use fetch_result.
	        * dwarf2/loc.h (invalid_synthetic_pointer): Expose function.

2021-08-05  Zoran Zaric  <Zoran.Zaric@amd.com>

	Make value_copy also copy the stack data member
	Fixing a bug where the value_copy function did not copy the stack data
	and initialized members of the struct value. This is needed for the
	next patch where the DWARF expression evaluator is changed to return a
	single struct value object.

	        * value.c (value_copy): Change to also copy the stack data
	          and initialized members.

2021-08-05  Zoran Zaric  <zoran.zaric@amd.com>

	Move piece_closure and its support to expr.c
	Following 5 patches series is trying to clean up the interface of the
	DWARF expression evaluator class (dwarf_expr_context).

	After merging all expression evaluators into one class, the next
	logical step is to make a clean user interface for that class. To do
	that, we first need to address the issue of class users writing and
	reading the internal data of the class directly.

	Fixing the case of writing is simple, it makes sense for an evaluator
	instance to be per architecture basis. Currently, the best separation
	seems to be per object file, so having that data (dwarf2_per_objfile)
	as a constructor argument makes sense. It also makes sense to get the
	address size from that object file, but unfortunately that interface
	does not exist at the moment.

	Luckily, address size information is already available to the users
	through other means. As a result, the address size also needs to be a
	class constructor argument, at least until a better interface for
	acquiring that information from an object file is implemented.

	The rest of the user written data comes down to a context of an
	evaluated expression (compilation unit context, frame context and
	passed in buffer context) and a source type information that a result
	of evaluating expression is representing. So, it makes sense for all of
	these to be arguments of an evaluation method.

	To address the problem of reading the dwarf_expr_context class
	internal data, we first need to understand why it is implemented that
	way?

	This is actualy a question of which existing class can be used to
	represent both values and a location descriptions and why it is not
	used currently?

	The answer is in a struct value class/structure, but the problem is
	that before the evaluators were merged, only one evaluator had an
	infrastructure to resolve composite and implicit pointer location
	descriptions.

	After the merge, we are now able to use the struct value to represent
	any result of the expression evaluation. It also makes sense to move
	all infrastructure for those location descriptions to the expr.c file
	considering that that is the only place using that infrastructure.

	What we are left with in the end is a clean public interface of the
	dwarf_expr_context class containing:

	- constructor,
	- destructor,
	- push_address method and
	- eval_exp method.

	The idea with this particular patch is to move piece_closure structure
	and the interface that handles it (lval_funcs) to expr.c file.

	While implicit pointer location descriptions are still not useful in
	the CFI context (of the AMD's DWARF standard extensions), the composite
	location descriptions are certainly necessary to describe a results of
	specific compiler optimizations.

	Considering that a piece_closure structure is used to represent both,
	there was no benefit in splitting them.

	gdb/ChangeLog:

		* dwarf2/expr.c (struct piece_closure): Add from loc.c.
		(allocate_piece_closure): Add from loc.c.
		(bits_to_bytes): Add from loc.c.
		(rw_pieced_value): Add from loc.c.
		(read_pieced_value): Add from loc.c.
		(write_pieced_value): Add from loc.c.
		(check_pieced_synthetic_pointer): Add from loc.c.
		(indirect_pieced_value): Add from loc.c.
		(coerce_pieced_ref): Add from loc.c.
		(copy_pieced_value_closure): Add from loc.c.
		(free_pieced_value_closure): Add from loc.c.
		(sect_variable_value): Add from loc.c.
		* dwarf2/loc.c (sect_variable_value): Move to expr.c.
		(struct piece_closure): Move to expr.c.
		(allocate_piece_closure): Move to expr.c.
		(bits_to_bytes): Move to expr.c.
		(rw_pieced_value): Move to expr.c.
		(read_pieced_value): Move to expr.c.
		(write_pieced_value): Move to expr.c.
		(check_pieced_synthetic_pointer): Move to expr.c.
		(indirect_pieced_value): Move to expr.c.
		(coerce_pieced_ref): Move to expr.c.
		(copy_pieced_value_closure): Move to expr.c.
		(free_pieced_value_closure): Move to expr.c.

2021-08-05  Zoran Zaric  <zoran.zaric@amd.com>

	Merge evaluate_for_locexpr_baton evaluator
	The evaluate_for_locexpr_baton is the last derived class from the
	dwarf_expr_context class. It's purpose is to support the passed in
	buffer functionality.

	Although, it is not really necessary to merge this class with it's
	base class, doing that simplifies new expression evaluator design.

	Considering that this functionality is going around the DWARF standard,
	it is also reasonable to expect that with a new evaluator design and
	extending the push object address functionality to accept any location
	description, there will be no need to support passed in buffers.

	Alternatively, it would also makes sense to abstract the interaction
	between the evaluator and a given resource in the near future. The
	passed in buffer would then be a specialization of that abstraction.

	gdb/ChangeLog:

		* dwarf2/expr.c (dwarf_expr_context::read_mem): Merge with
		evaluate_for_locexpr_baton implementation.
		* dwarf2/loc.c (class evaluate_for_locexpr_baton): Remove
		class.
		(evaluate_for_locexpr_baton::read_mem): Move to
		dwarf_expr_context.
		(dwarf2_locexpr_baton_eval): Instantiate dwarf_expr_context
		instead of evaluate_for_locexpr_baton class.

2021-08-05  Zoran Zaric  <zoran.zaric@amd.com>

	Remove empty frame and full evaluators
	There are no virtual methods that require different specialization in
	dwarf_expr_context class. This means that derived classes
	dwarf_expr_executor and dwarf_evaluate_loc_desc are not needed any
	more.

	As a result of this, the  evaluate_for_locexpr_baton class base class
	is now the dwarf_expr_context class.

	There might be a need for a better class hierarchy when we know more
	about the direction of the future DWARF versions and gdb extensions,
	but that is out of the scope of this patch series.

	gdb/ChangeLog:

		* dwarf2/frame.c (class dwarf_expr_executor): Remove class.
		(execute_stack_op): Instantiate dwarf_expr_context instead of
		dwarf_evaluate_loc_desc class.
		* dwarf2/loc.c (class dwarf_evaluate_loc_desc): Remove class.
		(dwarf2_evaluate_loc_desc_full): Instantiate dwarf_expr_context
		instead of dwarf_evaluate_loc_desc class.
		(struct evaluate_for_locexpr_baton): Derive from
		dwarf_expr_context.

2021-08-05  Zoran Zaric  <Zoran.Zaric@amd.com>

	Inline get_reg_value method of dwarf_expr_context
	The get_reg_value method is a small function that is only called once,
	so it can be inlined to simplify the dwarf_expr_context class.

	gdb/ChangeLog:

		* dwarf2/expr.c (dwarf_expr_context::get_reg_value): Remove
		method.
		(dwarf_expr_context::execute_stack_op): Inline get_reg_value
		method.
		* dwarf2/expr.h (dwarf_expr_context::get_reg_value): Remove
		method.

2021-08-05  Zoran Zaric  <zoran.zaric@amd.com>

	Move push_dwarf_reg_entry_value to expr.c
	Following the idea of merging the evaluators, the
	push_dwarf_reg_entry_value method can be moved from
	dwarf_expr_executor and dwarf_evaluate_loc_desc classes
	to their base class dwarf_expr_context.

	gdb/ChangeLog:

		* dwarf2/expr.c
	        (dwarf_expr_context::push_dwarf_reg_entry_value): Move from
		dwarf_evaluate_loc_desc.
		* dwarf2/frame.c
		(dwarf_expr_executor::push_dwarf_reg_entry_value): Remove
		method.
		* dwarf2/loc.c (dwarf_expr_reg_to_entry_parameter): Expose
		function.
		(dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value): Move to
		dwarf_expr_context.
		* dwarf2/loc.h (dwarf_expr_reg_to_entry_parameter): Expose
		function.

2021-08-05  Zoran Zaric  <zoran.zaric@amd.com>

	Move read_mem to dwarf_expr_context
	Following the idea of merging the evaluators, the read_mem method can
	be moved from dwarf_expr_executor and dwarf_evaluate_loc_desc classes
	to their base class dwarf_expr_context.

	gdb/ChangeLog:

		* dwarf2/expr.c (dwarf_expr_context::read_mem): Move from
		dwarf_evaluate_loc_desc.
		* dwarf2/frame.c (dwarf_expr_executor::read_mem): Remove
		method.
		* dwarf2/loc.c (dwarf_evaluate_loc_desc::read_mem): Move to
		dwarf_expr_context.

2021-08-05  Zoran Zaric  <Zoran.Zaric@amd.com>

	Move get_object_address to dwarf_expr_context
	Following the idea of merging the evaluators, the get_object_address
	and can be moved from dwarf_expr_executor and dwarf_evaluate_loc_desc
	classes to their base class dwarf_expr_context.

	gdb/ChangeLog:

		* dwarf2/expr.c (dwarf_expr_context::get_object_address): Move
		from dwarf_evaluate_loc_desc.
		(class dwarf_expr_context): Add object address member to
		dwarf_expr_context.
		* dwarf2/expr.h (dwarf_expr_context::get_frame_pc): Remove
		method.
		* dwarf2/frame.c (dwarf_expr_executor::get_object_address):
		Remove method.
		* dwarf2/loc.c (dwarf_evaluate_loc_desc::get_object_address):
		move to dwarf_expr_context.
		(class dwarf_evaluate_loc_desc): Move object address member to
		dwarf_expr_context.

2021-08-05  Zoran Zaric  <zoran.zaric@amd.com>

	Move dwarf_call to dwarf_expr_context
	Following the idea of merging the evaluators, the dwarf_call and
	get_frame_pc method can be moved from dwarf_expr_executor and
	dwarf_evaluate_loc_desc classes to their base class dwarf_expr_context.
	Once this is done, the get_frame_pc can be replace with lambda
	function.

	gdb/ChangeLog:

		* dwarf2/expr.c (dwarf_expr_context::dwarf_call): Move from
		dwarf_evaluate_loc_desc.
		(dwarf_expr_context::get_frame_pc): Replace with lambda.
		* dwarf2/expr.h (dwarf_expr_context::get_frame_pc): Remove
		method.
		* dwarf2/frame.c (dwarf_expr_executor::dwarf_call): Remove
		method.
		(dwarf_expr_executor::get_frame_pc): Remove method.
		* dwarf2/loc.c (dwarf_evaluate_loc_desc::get_frame_pc): Remove
		method.
		(dwarf_evaluate_loc_desc::dwarf_call): Move to
		dwarf_expr_context.
		(per_cu_dwarf_call): Inline function.

2021-08-05  Zoran Zaric  <zoran.zaric@amd.com>

	Move compilation unit info to dwarf_expr_context
	This patch moves the compilation unit context information and support
	from dwarf_expr_executor and dwarf_evaluate_loc_desc to
	dwarf_expr_context evaluator. The idea is to report an error when a
	given operation requires a compilation unit information to be resolved,
	which is not available.

	With this change, it also makes sense to always acquire ref_addr_size
	information from the compilation unit context, considering that all
	DWARF operations that refer to that information require a compilation
	unit context to be present during their evaluation.

	gdb/ChangeLog:

		* dwarf2/expr.c (ensure_have_per_cu): New function.
		(dwarf_expr_context::dwarf_expr_context): Add compilation unit
		context information.
		(dwarf_expr_context::get_base_type): Move from
		dwarf_evaluate_loc_desc.
		(dwarf_expr_context::get_addr_index): Remove method.
		(dwarf_expr_context::dwarf_variable_value): Remove method.
		(dwarf_expr_context::execute_stack_op): Call compilation unit
		context info check. Inline get_addr_index and
		dwarf_variable_value methods.
		* dwarf2/expr.h (struct dwarf_expr_context): Add compilation
		context info.
	        (dwarf_expr_context::get_addr_index): Remove method.
	        (dwarf_expr_context::dwarf_variable_value): Remove method.
	        (dwarf_expr_context::ref_addr_size): Remove member.
		* dwarf2/frame.c (dwarf_expr_executor::get_addr_index): Remove
		method.
		(dwarf_expr_executor::dwarf_variable_value): Remove method.
		* dwarf2/loc.c (sect_variable_value): Expose function.
		(dwarf_evaluate_loc_desc::get_addr_index): Remove method.
		(dwarf_evaluate_loc_desc::dwarf_variable_value): Remove method.
		(class dwarf_evaluate_loc_desc): Move compilation unit context
		information to dwarf_expr_context class.
		* dwarf2/loc.h (sect_variable_value): Expose function.

2021-08-05  Zoran Zaric  <Zoran.Zaric@amd.com>

	Remove get_frame_cfa from dwarf_expr_context
	Following the idea of merging the evaluators, the get_frame_cfa method
	can be moved from dwarf_expr_executor and dwarf_evaluate_loc_desc
	classes to their base class dwarf_expr_context. Once this is done,
	it becomes apparent that the method is only called once and it can be
	inlined.

	It is also necessary to check if the frame context information was
	provided before the DW_OP_call_frame_cfa operation is executed.

	gdb/ChangeLog:

		* dwarf2/expr.c (dwarf_expr_context::get_frame_cfa): Remove
		method.
		(dwarf_expr_context::execute_stack_op): Call frame context info
		check for DW_OP_call_frame_cfa. Remove use of get_frame_cfa.
		* dwarf2/expr.h (dwarf_expr_context::get_frame_cfa): Remove
		method.
		* dwarf2/frame.c (dwarf_expr_context::get_frame_cfa): Remove
		method.
		* dwarf2/loc.c (dwarf_expr_context::get_frame_cfa): Remove
		method.

2021-08-05  Zoran Zaric  <zoran.zaric@amd.com>

	Move frame context info to dwarf_expr_context
	Following 15 patches in this patch series is cleaning up the design of
	the DWARF expression evaluator (dwarf_expr_context) to make future
	extensions of that evaluator easier and cleaner to implement.

	There are three subclasses of the dwarf_expr_context class
	(dwarf_expr_executor, dwarf_evaluate_loc_desc and
	evaluate_for_locexpr_baton). Here is a short description of each class:

	- dwarf_expr_executor is evaluating a DWARF expression in a context
	  of a Call Frame Information. The overridden methods of this subclass
	  report an error if a specific DWARF operation, represented by that
	  method, is not allowed in a CFI context. The source code of this
	  subclass lacks the support for composite as well as implicit pointer
	  location description.

	- dwarf_evaluate_loc_desc can evaluate any expression with no
	  restrictions. All of the methods that this subclass overrides are
	  actually doing what they are intended to do. This subclass contains
	  a full support for all location description types.

	- evaluate_for_locexpr_baton subclass is a specialization of the
	  dwarf_evaluate_loc_desc subclass and it's function is to add
	  support for passed in buffers. This seems to be a way to go around
	  the fact that DWARF standard lacks a bit offset support for memory
	  location descriptions as well as using any location description for
	  the push object address functionality.

	It all comes down to this question: what is a function of a DWARF
	expression evaluator?

	Is it to evaluate the expression in a given context or to check the
	correctness of that expression in that context?

	Currently, the only reason why there is a dwarf_expr_executor subclass
	is to report an invalid DWARF expression in a context of a CFI, but is
	that what the evaluator is supposed to do considering that the evaluator
	is not tied to a given DWARF version?

	There are more and more vendor and GNU extensions that are not part of
	the DWARF standard, so is it that impossible to expect that some of the
	extensions could actually lift the previously imposed restrictions of
	the CFI context? Not to mention that every new DWARF version is lifting
	some restrictions anyway.

	The thing that makes more sense for an evaluator to do, is to take the
	context of an evaluation and checks the requirements of every operation
	evaluated against that context. With this approach, the evaluator would
	report an error only if parts of the context, necessary for the
	evaluation, are missing.

	If this approach is taken, then the unification of the
	dwarf_evaluate_loc_desc, dwarf_expr_executor and dwarf_expr_context
	is the next logical step. This makes a design of the DWARF expression
	evaluator cleaner and allows more flexibility when supporting future
	vendor and GNU extensions.

	Additional benefit here is that now all evaluators have access to all
	location description types, which means that a vendor extended CFI
	rules could support composite location description as well. This also
	means that a new evaluator interface can be changed to return a single
	struct value (that describes the result of the evaluation) instead of
	a caller poking around the dwarf_expr_context internal data for answers
	(like it is done currently).

	This patch starts the merging process by moving the frame context
	information and support from dwarf_expr_executor and
	dwarf_evaluate_loc_desc to dwarf_expr_context evaluator. The idea
	is to report an error when a given operation requires a frame
	information to be resolved, if that information is not present.

	gdb/ChangeLog:

		* dwarf2/expr.c (ensure_have_frame): New function.
		(read_addr_from_reg): Add from frame.c.
		(dwarf_expr_context::dwarf_expr_context): Add frame info to
		dwarf_expr_context.
		(dwarf_expr_context::read_addr_from_reg): Remove.
		(dwarf_expr_context::get_reg_value): Move from
		dwarf_evaluate_loc_desc.
		(dwarf_expr_context::get_frame_base): Move from
		dwarf_evaluate_loc_desc.
		(dwarf_expr_context::execute_stack_op): Call frame context info
		check. Remove use of read_addr_from_reg method.
		* dwarf2/expr.h (struct dwarf_expr_context): Add frame info
		member, read_addr_from_reg, get_reg_value and get_frame_base
		declaration.
		(read_addr_from_reg): Move to expr.c.
		* dwarf2/frame.c (read_addr_from_reg): Move to
		dwarf_expr_context.
		(dwarf_expr_executor::read_addr_from_reg): Remove.
		(dwarf_expr_executor::get_frame_base): Remove.
		(dwarf_expr_executor::get_reg_value): Remove.
		(execute_stack_op): Use read_addr_from_reg function instead of
		read_addr_from_reg method.
		* dwarf2/loc.c (dwarf_evaluate_loc_desc::get_frame_base): Move
		to dwarf_expr_context.
		(dwarf_evaluate_loc_desc::get_reg_value): Move to
		dwarf_expr_context.
		(dwarf_evaluate_loc_desc::read_addr_from_reg): Remove.
		(dwarf2_locexpr_baton_eval):Use read_addr_from_reg function
		instead of read_addr_from_reg method.

2021-08-05  Zoran Zaric  <Zoran.Zaric@amd.com>

	Cleanup of the dwarf_expr_context constructor
	Move the initial values for dwarf_expr_context class data members
	to the class declaration in expr.h.

	gdb/ChangeLog:

	        * dwarf2/expr.c (dwarf_expr_context::dwarf_expr_context):
	        Remove initial data members values.
	        * dwarf2/expr.h (dwarf_expr_context): Add initial values
	        to the class data members.

2021-08-05  Zoran Zaric  <Zoran.Zaric@amd.com>

	Replace the symbol needs evaluator with a parser
	This patch addresses a design problem with the symbol_needs_eval_context
	class. It exposes the problem by introducing two new testsuite test
	cases.

	To explain the issue, I first need to explain the dwarf_expr_context
	class that the symbol_needs_eval_context class derives from.

	The intention behind the dwarf_expr_context class is to commonize the
	DWARF expression evaluation mechanism for different evaluation
	contexts. Currently in gdb, the evaluation context can contain some or
	all of the following information: architecture, object file, frame and
	compilation unit.

	Depending on the information needed to evaluate a given expression,
	there are currently three distinct DWARF expression evaluators:

	 - Frame: designed to evaluate an expression in the context of a call
	   frame information (dwarf_expr_executor class). This evaluator doesn't
	   need a compilation unit information.

	 - Location description: designed to evaluate an expression in the
	   context of a source level information (dwarf_evaluate_loc_desc
	   class). This evaluator expects all information needed for the
	   evaluation of the given expression to be present.

	 - Symbol needs: designed to answer a question about the parts of the
	   context information required to evaluate a DWARF expression behind a
	   given symbol (symbol_needs_eval_context class). This evaluator
	   doesn't need a frame information.

	The functional difference between the symbol needs evaluator and the
	others is that this evaluator is not meant to interact with the actual
	target. Instead, it is supposed to check which parts of the context
	information are needed for the given DWARF expression to be evaluated by
	the location description evaluator.

	The idea is to take advantage of the existing dwarf_expr_context
	evaluation mechanism and to fake all required interactions with the
	actual target, by returning back dummy values. The evaluation result is
	returned as one of three possible values, based on operations found in a
	given expression:

	- SYMBOL_NEEDS_NONE,
	- SYMBOL_NEEDS_REGISTERS and
	- SYMBOL_NEEDS_FRAME.

	The problem here is that faking results of target interactions can yield
	an incorrect evaluation result.

	For example, if we have a conditional DWARF expression, where the
	condition depends on a value read from an actual target, and the true
	branch of the condition requires a frame information to be evaluated,
	while the false branch doesn't, fake target reads could conclude that a
	frame information is not needed, where in fact it is. This wrong
	information would then cause the expression to be actually evaluated (by
	the location description evaluator) with a missing frame information.
	This would then crash the debugger.

	The gdb.dwarf2/symbol_needs_eval_fail.exp test introduces this
	scenario, with the following DWARF expression:

	                   DW_OP_addr $some_variable
	                   DW_OP_deref

	                   # conditional jump to DW_OP_bregx
	                   DW_OP_bra 4
	                   DW_OP_lit0

	                   # jump to DW_OP_stack_value
	                   DW_OP_skip 3
	                   DW_OP_bregx $dwarf_regnum 0
	                   DW_OP_stack_value

	This expression describes a case where some variable dictates the
	location of another variable. Depending on a value of some_variable, the
	variable whose location is described by this expression is either read
	from a register or it is defined as a constant value 0. In both cases,
	the value will be returned as an implicit location description on the
	DWARF stack.

	Currently, when the symbol needs evaluator fakes a memory read from the
	address behind the some_variable variable, the constant value 0 is used
	as the value of the variable A, and the check returns the
	SYMBOL_NEEDS_NONE result.

	This is clearly a wrong result and it causes the debugger to crash.

	The scenario might sound strange to some people, but it comes from a
	SIMD/SIMT architecture where $some_variable is an execution mask.  In
	any case, it is a valid DWARF expression, and GDB shouldn't crash while
	evaluating it. Also, a similar example could be made based on a
	condition of the frame base value, where if that value is concluded to
	be 0, the variable location could be defaulted to a TLS based memory
	address.

	The gdb.dwarf2/symbol_needs_eval_timeout.exp test introduces a second
	scenario. This scenario is a bit more abstract due to the DWARF
	assembler lacking the CFI support, but it exposes a different
	manifestation of the same problem. Like in the previous scenario, the
	DWARF expression used in the test is valid:

	                       DW_OP_lit1
	                       DW_OP_addr $some_variable
	                       DW_OP_deref

	                       # jump to DW_OP_fbreg
	                       DW_OP_skip 4
	                       DW_OP_drop
	                       DW_OP_fbreg 0
	                       DW_OP_dup
	                       DW_OP_lit0
	                       DW_OP_eq

	                       # conditional jump to DW_OP_drop
	                       DW_OP_bra -9
	                       DW_OP_stack_value

	Similarly to the previous scenario, the location of a variable A is an
	implicit location description with a constant value that depends on a
	value held by a global variable. The difference from the previous case
	is that DWARF expression contains a loop instead of just one branch. The
	end condition of that loop depends on the expectation that a frame base
	value is never zero. Currently, the act of faking the target reads will
	cause the symbol needs evaluator to get stuck in an infinite loop.

	Somebody could argue that we could change the fake reads to return
	something else, but that would only hide the real problem.

	The general impression seems to be that the desired design is to have
	one class that deals with parsing of the DWARF expression, while there
	are virtual methods that deal with specifics of some operations.

	Using an evaluator mechanism here doesn't seem to be correct, because
	the act of evaluation relies on accessing the data from the actual
	target with the possibility of skipping the evaluation of some parts of
	the expression.

	To better explain the proposed solution for the issue, I first need to
	explain a couple more details behind the current design:

	There are multiple places in gdb that handle DWARF expression parsing
	for different purposes. Some are in charge of converting the expression
	to some other internal representation (decode_location_expression,
	disassemble_dwarf_expression and dwarf2_compile_expr_to_ax), some are
	analysing the expression for specific information
	(compute_stack_depth_worker) and some are in charge of evaluating the
	expression in a given context (dwarf_expr_context::execute_stack_op
	and decode_locdesc).

	The problem is that all those functions have a similar (large) switch
	statement that handles each DWARF expression operation. The result of
	this is a code duplication and harder maintenance.

	As a step into the right direction to solve this problem (at least for
	the purpose of a DWARF expression evaluation) the expression parsing was
	commonized inside of an evaluator base class (dwarf_expr_context). This
	makes sense for all derived classes, except for the symbol needs
	evaluator (symbol_needs_eval_context) class.

	As described previously the problem with this evaluator is that if the
	evaluator is not allowed to access the actual target, it is not really
	evaluating.

	Instead, the desired function of a symbol needs evaluator seems to fall
	more into expression analysis category. This means that a more natural
	fit for this evaluator is to be a symbol needs analysis, similar to the
	existing compute_stack_depth_worker analysis.

	Another problem is that using a heavyweight mechanism of an evaluator
	to do an expression analysis seems to be an unneeded overhead. It also
	requires a more complicated design of the parent class to support fake
	target reads.

	The reality is that the whole symbol_needs_eval_context class can be
	replaced with a lightweight recursive analysis function, that will give
	more correct result without compromising the design of the
	dwarf_expr_context class. The analysis treats the expression byte
	stream as a DWARF operation graph, where each graph node can be
	visited only once and each operation can decide if the frame context
	is needed for their evaluation.

	The downside of this approach is adding of one more similar switch
	statement, but at least this way the new symbol needs analysis will be
	a lightweight mechnism and it will provide a correct result for any
	given DWARF expression.

	A more desired long term design would be to have one class that deals
	with parsing of the DWARF expression, while there would be a virtual
	methods that deal with specifics of some DWARF operations. Then that
	class would be used as a base for all DWARF expression parsing mentioned
	at the beginning.

	This however, requires a far bigger changes that are out of the scope
	of this patch series.

	The new analysis requires the DWARF location description for the
	argc argument of the main function to change in the assembly file
	gdb.python/amd64-py-framefilter-invalidarg.S. Originally, expression
	ended with a 0 value byte, which was never reached by the symbol needs
	evaluator, because it was detecting a stack underflow when evaluating
	the operation before. The new approach does not simulate a DWARF
	stack anymore, so the 0 value byte needs to be removed because it
	makes the DWARF expression invalid.

	gdb/ChangeLog:

	        * dwarf2/loc.c (class symbol_needs_eval_context): Remove.
	        (dwarf2_get_symbol_read_needs): New function.
	        (dwarf2_loc_desc_get_symbol_read_needs): Remove.
	        (locexpr_get_symbol_read_needs): Use
	        dwarf2_get_symbol_read_needs.

	gdb/testsuite/ChangeLog:

	        * gdb.python/amd64-py-framefilter-invalidarg.S : Update argc
	          DWARF location expression.
	        * lib/dwarf.exp (_location): Handle DW_OP_fbreg.
	        * gdb.dwarf2/symbol_needs_eval.c: New file.
	        * gdb.dwarf2/symbol_needs_eval_fail.exp: New file.
	        * gdb.dwarf2/symbol_needs_eval_timeout.exp: New file.

2021-08-05  Cui,Lili  <lili.cui@intel.com>

	[PATCH 2/2] Add tests for Intel AVX512_FP16 instructions
	Intel AVX512 FP16 instructions use maps 3, 5 and 6. Maps 5 and 6 use 3 bits
	in the EVEX.mmm field (0b101, 0b110). Map 5 is for instructions that were FP32
	in map 1 (0Fxx). Map 6 is for instructions that were FP32 in map 2 (0F38xx).
	There are some exceptions to this rule. Some things in map 1 (0Fxx) with imm8
	operands predated our current conventions; those instructions moved to map 3.
	FP32 things in map 3 (0F3Axx) found new opcodes in map3 for FP16 because map3
	is very sparsely populated. Most of the FP16 instructions share opcodes and
	prefix (EVEX.pp) bits with the related FP32 operations.

	Intel AVX512 FP16 instructions has new displacements scaling rules, please refer
	to the public software developer manual for detail information.

	gas/

	2021-08-05  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
	            H.J. Lu  <hongjiu.lu@intel.com>
	            Wei Xiao <wei3.xiao@intel.com>
	            Lili Cui  <lili.cui@intel.com>

		* testsuite/gas/i386/i386.exp: Run FP16 tests.
		* testsuite/gas/i386/avx512_fp16-intel.d: New test.
		* testsuite/gas/i386/avx512_fp16-inval-bcast.l: Ditto.
		* testsuite/gas/i386/avx512_fp16-inval-bcast.s: Ditto.
		* testsuite/gas/i386/avx512_fp16.d: Ditto.
		* testsuite/gas/i386/avx512_fp16.s: Ditto.
		* testsuite/gas/i386/avx512_fp16_pseudo_ops.d: Ditto.
		* testsuite/gas/i386/avx512_fp16_pseudo_ops.s: Ditto.
		* testsuite/gas/i386/avx512_fp16_vl-intel.d: Ditto.
		* testsuite/gas/i386/avx512_fp16_vl.d: Ditto.
		* testsuite/gas/i386/avx512_fp16_vl.s: Ditto.
		* testsuite/gas/i386/x86-64-avx512_fp16-intel.d: Ditto.
		* testsuite/gas/i386/x86-64-avx512_fp16-inval-bcast.l: Ditto.
		* testsuite/gas/i386/x86-64-avx512_fp16-inval-bcast.s: Ditto.
		* testsuite/gas/i386/x86-64-avx512_fp16.d: Ditto.
		* testsuite/gas/i386/x86-64-avx512_fp16.s: Ditto.
		* testsuite/gas/i386/x86-64-avx512_fp16_pseudo_ops.d: Ditto.
		* testsuite/gas/i386/x86-64-avx512_fp16_pseudo_ops.s: Ditto.
		* testsuite/gas/i386/x86-64-avx512_fp16_vl-intel.d: Ditto.
		* testsuite/gas/i386/x86-64-avx512_fp16_vl.d: Ditto.
		* testsuite/gas/i386/x86-64-avx512_fp16_vl.s: Ditto.
		* testsuite/gas/i386/x86-64-avx512_fp16-inval-register.l: Ditto.
		* testsuite/gas/i386/x86-64-avx512_fp16-inval-register.s: Ditto.
		* testsuite/gas/i386/x86-64-avx512_fp16-bad.d: Ditto.
		* testsuite/gas/i386/x86-64-avx512_fp16-bad.s: Ditto.
		* testsuite/gas/i386/x86-64-default-suffix-avx.d: Add new testcase.
		* testsuite/gas/i386/x86-64-default-suffix.d: Ditto.
		* testsuite/gas/i386/x86-64-default-suffix.s: Ditto.
		* testsuite/gas/i386/xmmword.l: Ditto.
		* testsuite/gas/i386/xmmword.s: Ditto.

2021-08-05  Cui,Lili  <lili.cui@intel.com>

	[PATCH 1/2] Enable Intel AVX512_FP16 instructions
	Intel AVX512 FP16 instructions use maps 3, 5 and 6. Maps 5 and 6 use 3 bits
	in the EVEX.mmm field (0b101, 0b110). Map 5 is for instructions that were FP32
	in map 1 (0Fxx). Map 6 is for instructions that were FP32 in map 2 (0F38xx).
	There are some exceptions to this rule. Some things in map 1 (0Fxx) with imm8
	operands predated our current conventions; those instructions moved to map 3.
	FP32 things in map 3 (0F3Axx) found new opcodes in map3 for FP16 because map3
	is very sparsely populated. Most of the FP16 instructions share opcodes and
	prefix (EVEX.pp) bits with the related FP32 operations.

	Intel AVX512 FP16 instructions has new displacements scaling rules, please refer
	to the public software developer manual for detail information.

	gas/

	2021-08-05  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
	            H.J. Lu  <hongjiu.lu@intel.com>
	            Wei Xiao <wei3.xiao@intel.com>
	            Lili Cui  <lili.cui@intel.com>

		* config/tc-i386.c (struct Broadcast_Operation): Adjust comment.
		(cpu_arch): Add .avx512_fp16.
		(cpu_noarch): Add noavx512_fp16.
		(pte): Add evexmap5 and evexmap6.
		(build_evex_prefix): Handle EVEXMAP5 and EVEXMAP6.
		(check_VecOperations): Handle {1to32}.
		(check_VecOperands): Handle CheckRegNumb.
		(check_word_reg): Handle Toqword.
		(i386_error): Add invalid_dest_and_src_register_set.
		(match_template): Handle invalid_dest_and_src_register_set.
		* doc/c-i386.texi: Document avx512_fp16, noavx512_fp16.

	opcodes/

	2021-08-05  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
	            H.J. Lu  <hongjiu.lu@intel.com>
	            Wei Xiao <wei3.xiao@intel.com>
	            Lili Cui  <lili.cui@intel.com>

		* i386-dis.c (EXwScalarS): New.
		(EXxh): Ditto.
		(EXxhc): Ditto.
		(EXxmmqh): Ditto.
		(EXxmmqdh): Ditto.
		(EXEvexXwb): Ditto.
		(DistinctDest_Fixup): Ditto.
		(enum): Add xh_mode, evex_half_bcst_xmmqh_mode, evex_half_bcst_xmmqdh_mode
		and w_swap_mode.
		(enum): Add PREFIX_EVEX_0F3A08_W_0, PREFIX_EVEX_0F3A0A_W_0,
		PREFIX_EVEX_0F3A26, PREFIX_EVEX_0F3A27, PREFIX_EVEX_0F3A56,
		PREFIX_EVEX_0F3A57, PREFIX_EVEX_0F3A66, PREFIX_EVEX_0F3A67,
		PREFIX_EVEX_0F3AC2, PREFIX_EVEX_MAP5_10, PREFIX_EVEX_MAP5_11,
		PREFIX_EVEX_MAP5_1D, PREFIX_EVEX_MAP5_2A, PREFIX_EVEX_MAP5_2C,
		PREFIX_EVEX_MAP5_2D, PREFIX_EVEX_MAP5_2E, PREFIX_EVEX_MAP5_2F,
		PREFIX_EVEX_MAP5_51, PREFIX_EVEX_MAP5_58, PREFIX_EVEX_MAP5_59,
		PREFIX_EVEX_MAP5_5A_W_0, PREFIX_EVEX_MAP5_5A_W_1,
		PREFIX_EVEX_MAP5_5B_W_0, PREFIX_EVEX_MAP5_5B_W_1,
		PREFIX_EVEX_MAP5_5C, PREFIX_EVEX_MAP5_5D, PREFIX_EVEX_MAP5_5E,
		PREFIX_EVEX_MAP5_5F, PREFIX_EVEX_MAP5_78, PREFIX_EVEX_MAP5_79,
		PREFIX_EVEX_MAP5_7A, PREFIX_EVEX_MAP5_7B, PREFIX_EVEX_MAP5_7C,
		PREFIX_EVEX_MAP5_7D_W_0, PREFIX_EVEX_MAP6_13, PREFIX_EVEX_MAP6_56,
		PREFIX_EVEX_MAP6_57, PREFIX_EVEX_MAP6_D6, PREFIX_EVEX_MAP6_D7
		(enum): Add EVEX_MAP5 and EVEX_MAP6.
		(enum): Add EVEX_W_MAP5_5A, EVEX_W_MAP5_5B,
		EVEX_W_MAP5_78_P_0, EVEX_W_MAP5_78_P_2, EVEX_W_MAP5_79_P_0,
		EVEX_W_MAP5_79_P_2, EVEX_W_MAP5_7A_P_2, EVEX_W_MAP5_7A_P_3,
		EVEX_W_MAP5_7B_P_2, EVEX_W_MAP5_7C_P_0, EVEX_W_MAP5_7C_P_2,
		EVEX_W_MAP5_7D, EVEX_W_MAP6_13_P_0, EVEX_W_MAP6_13_P_2,
		(get_valid_dis386): Properly handle new instructions.
		(intel_operand_size): Handle new modes.
		(OP_E_memory): Ditto.
		(OP_EX): Ditto.
		* i386-dis-evex.h: Updated for AVX512_FP16.
		* i386-dis-evex-mod.h: Updated for AVX512_FP16.
		* i386-dis-evex-prefix.h: Updated for AVX512_FP16.
		* i386-dis-evex-reg.h : Updated for AVX512_FP16.
		* i386-dis-evex-w.h : Updated for AVX512_FP16.
		* i386-gen.c (cpu_flag_init): Add CPU_AVX512_FP16_FLAGS,
		and CPU_ANY_AVX512_FP16_FLAGS. Update CPU_ANY_AVX512F_FLAGS
		and CPU_ANY_AVX512BW_FLAGS.
		(cpu_flags): Add CpuAVX512_FP16.
		(opcode_modifiers): Add DistinctDest.
		* i386-opc.h (enum): (AVX512_FP16): New.
		(i386_opcode_modifier): Add reqdistinctreg.
		(i386_cpu_flags): Add cpuavx512_fp16.
		(EVEXMAP5): Defined as a macro.
		(EVEXMAP6): Ditto.
		* i386-opc.tbl: Add Intel AVX512_FP16 instructions.
		* i386-init.h: Regenerated.
		* i386-tbl.h: Ditto.

2021-08-05  Alan Modra  <amodra@gmail.com>

	PR28167, vms-alpha build_module_list
		PR 28167
		* vms-alpha.c (build_module_list): Malloc and free section contents.
		Don't read past end of section.

2021-08-05  Alan Modra  <amodra@gmail.com>

	PR28166, _bfd_elf_mips_get_relocated_section_contents
	Some of the code paths unpacking mips relocs left arelent->sym_ptr_ptr
	uninitialised.

		PR 28166
		* elf64-mips.c (mips_elf64_slurp_one_reloc_table): Don't leave
		sym_ptr_ptr uninitialised.

2021-08-05  Alan Modra  <amodra@gmail.com>

	PR28165, buffer overflow in elf32-rx.c:rx_info_to_howto_rela
		PR 28165
		* elf32-rx.c (rx_elf_howto_table): Add missing empty entries.
		(rx_info_to_howto_rela): Assert rx_elf_howto_table is correct size.
		Use actual size when sanity checking r_type.

2021-08-05  Alan Modra  <amodra@gmail.com>

	Re: elf: Treat undefined version as hidden
	Fix fallout in cris testsuite

		PR binutils/28158
		* ld-cris/libdso-1c.d: Update for version display change.
		* ld-cris/libdso-15b.d: Likewise.

2021-08-05  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb/testsuite: update test gdb.base/step-over-syscall.exp
	I was looking at PR gdb/19675 and the related test
	gdb.base/step-over-syscall.exp.  This test includes a call to kfail
	when we are testing a displaced step over a clone syscall.

	While looking at the test I removed the call to kfail and ran the
	test, and was surprised that the test passed.

	I ran the test a few times and it does sometimes fail, but mostly it
	passed fine.

	PR gdb/19675 describes how, when we displaced step over a clone, the
	new thread is created with a $pc in the displaced step buffer.  GDB
	then fails to "fix" this $pc (for the new thread), and the thread will
	be set running with its current $pc value.  This means that the new
	thread will just start executing from whatever happens to be after the
	displaced stepping buffer.

	In the original PR gdb/19675 bug report Yao Qi was seeing the new
	thread cause a segfault, the problem is, what actually happens is
	totally undefined.

	On my machine, I'm seeing the new thread reenter main, it then starts
	trying to run the test again (in the new thread).  This just happens
	to be safe enough (in this simple test) that most of the time the
	inferior doesn't crash.

	In this commit I try to make the test slightly more likely to fail by
	doing a couple of things.

	First, I added a static variable to main, this is set true when the
	first thread enters main, if a second thread ever enters main then I
	force an abort.

	Second, when the test is finishing I want to ensure that the new
	threads have had a chance to do "something bad" if they are going to.
	So I added a global counter, as each thread starts successfully it
	decrements the counter.  The main thread does not proceed to the final
	marker function (where GDB has placed a breakpoint) until all threads
	have started successfully.  This means that if the newly created
	thread doesn't successfully enter clone_fn then the counter will never
	reach zero and the test will timeout.

	With these two changes my hope is that the test should fail more
	reliably, and so, I have also changed the test to call setup_kfail
	before the specific steps that we expect to misbehave instead of just
	calling kfail and skipping parts of the test completely.  The benefit
	of this is that if/when we fix GDB this test will start to KPASS and
	we'll know to update this test to remove the setup_kfail call.

2021-08-05  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-05  Lancelot SIX  <lsix@lancelotsix.com>

	gdb: Use unwinder name in frame_info::to_string
	While working on a stack unwinding issue using 'set debug frame on', I
	noticed the frame_info::to_string method could be slightly improved.

	Unwinders have been given a name in
	a154d838a70e96d888620c072e2d6ea8bdf044ca.  Before this patch, frame_info
	debug output prints the host address of the used unwinder, which is not
	easy to interpret.  This patch proposes to use the unwinder name
	instead since we now have it.

	Before the patch:

	    {level=1,type=NORMAL_FRAME,unwind=0x2ac1763ec0,pc=0x3ff7fc3460,id={stack=0x3ff7ea79b0,code=0x0000003ff7fc33ac,!special},func=0x3ff7fc33ac}

	With the patch:

	    {level=1,type=NORMAL_FRAME,unwinder="riscv prologue",pc=0x3ff7fc3460,id={stack=0x3ff7ea79b0,code=0x0000003ff7fc33ac,!special},func=0x3ff7fc33ac}

	Tested on riscv64-linux-gnu.

2021-08-04  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: fix gdb.base/info-macros.exp with clang
	The test gdb.base/info-macros.exp says that it doesn't pass the "debug"
	option to prepare_for_testing because that would cause -g to appear
	after -g3 on the command line, and that would cause some gcc versions to
	not include macro info.  I don't know what gcc versions this refers to.
	I tested with gcc 4.8, and that works fine with -g after -g3.

	The current state is problematic when testing with CC_FOR_TARGET=clang,
	because then only -fdebug-macro is included.  No -g switch if included,
	meaning we get a binary without any debug info, and the test fails.

	One way to fix it would be to add "debug" to the options when the
	compiler is clang.

	However, the solution I chose was to specify "debug" in any case, even
	for gcc.  Other macro tests such as gdb.base/macscp.exp do perfectly
	fine with it.  Also, this lets the test use the debug flag specified by
	the board file.  For example, we can test with GCC and DWARF 5, with:

	    $ make check RUNTESTFLAGS="--target_board unix/gdb:debug_flags=-gdwarf-5" TESTS="gdb.base/info-macros.exp"

	With the hard-coded -g3, this wouldn't actually test with DWARF 5.

	Change-Id: I33fa92ee545007d3ae9c52c4bb2d5be6b5b698f1

2021-08-04  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: avoid dereferencing empty str_offsets_base optional in dwarf_decode_macros
	Since 4d7188abfdf2 ("gdbsupport: add debug assertions in
	gdb::optional::get"), some macro-related tests fail on Ubuntu 20.04 with
	the system gcc 9.3.0 compiler when building with _GLIBCXX_DEBUG.  For
	example, gdb.base/info-macros.exp results in:

	   (gdb) break -qualified main
	   /home/smarchi/src/binutils-gdb/gdb/../gdbsupport/gdb_optional.h:206: internal-error: T& gdb::optional<T>::get() [with T = long unsigned int]: Assertion `this->has_value ()' failed.

	The binary contains DWARF 4 debug info and includes a pre-standard
	(pre-DWARF 5) .debug_macro section.  The CU doesn't have a
	DW_AT_str_offsets_base attribute (which doesn't exist in DWARF 4).  The
	field dwarf2_cu::str_offsets_base is therefore empty.  At
	dwarf2/read.c:24138, we unconditionally read the value in the optional,
	which triggers the assertion shown above.

	The same thing happens when building the test program with DWARF 5 with
	the same gcc compiler, as that version of gcc doesn't use indirect
	string forms, even with DWARF 5.  So it still doesn't add a
	DW_AT_str_offsets_base attribute on the CU.

	Fix that by propagating down a gdb::optional<ULONGEST> for the str
	offsets base instead of ULONGEST.  That value is only used in
	dwarf_decode_macro_bytes, when encountering an "strx" macro operation
	(DW_MACRO_define_strx or DW_MACRO_undef_strx).  Add a check there that
	we indeed have a value in the optional before reading it.  This is
	unlikely to happen, but could happen in theory with an erroneous file
	that uses DW_MACRO_define_strx but does not provide a
	DW_AT_str_offsets_base (in practice, some things would probably have
	failed before and stopped processing of debug info).  I tested the
	complaint by inverting the condition and using a clang-compiled binary,
	which uses the strx operators.  This is the result:

	    During symbol reading: use of DW_MACRO_define_strx with unknown string offsets base [in module /home/simark/build/binutils-gdb/gdb/testsuite/outputs/gdb.base/info-macros/info-macros]

	The test now passes cleanly with the setup mentioned above, and the
	testsuite looks on par with how it was before 4d7188abfdf2.

	Change-Id: I7ebd2724beb7b9b4178872374c2a177aea696e77

2021-08-04  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: fix typo in complaint in dwarf2/macro.c
	I saw this complaint when my code had some bug, and spotted the typo.
	Fix it, and while at it mention DW_MACRO as well (it would be confusing
	to only see DW_MACINFO with a file that uses a DWARF 5 .debug_macro
	section).  I contemplated the idea of passing the knowledge of whether
	we are dealing with a .debug_macro section or .debug_macinfo section, to
	print only the right one.  But in the end, I don't think that trouble is
	necessary for a complaint nobody is going to see.

	Change-Id: I276ce8da65c3eac5304f64a1e246358ed29cdbbc

2021-08-04  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: fix warnings in bsd-kvm.c
	Building on OpenBSD, I get warnings like:

	      CXX    bsd-kvm.o
	    /home/simark/src/binutils-gdb/gdb/bsd-kvm.c:241:18: error: ISO C++11 does not allow conversion from string literal to 'char *' [-Werror,-Wwritable-strings]
	      nl[0].n_name = "_dumppcb";
	                     ^

	Silence those by adding casts.

	Change-Id: I2bef4eebcc306762a4e3e5b5c52f67ecf2820503

2021-08-04  Andreas Krebbel  <krebbel@linux.ibm.com>

	IBM Z: Remove lpswey parameter
	opcodes/
		* s390-opc.c (INSTR_SIY_RD): New instruction format.
		(MASK_SIY_RD): New instruction mask.
		* s390-opc.txt: Change instruction format of lpswey to SIY_RD.

	gas/
		* testsuite/gas/s390/zarch-arch14.d: Remove last operand of
		lpswey.
		* testsuite/gas/s390/zarch-arch14.s: Likewise.

2021-08-04  Alan Modra  <amodra@gmail.com>

	PR28162, segment fault in mips_elf_assign_gp
	For the testcase in the PR, _bfd_mips_elf32_gprel16_reloc is passed a
	NULL output_bfd.  As expected for reloc special functions if called by
	objdump or when final linking.  The function attempts to find the
	output by
	  output_bfd = symbol->section->output_section->owner;
	That makes some sense, since when handling a gp-relative reloc we need
	the relevant gp to which the symbol is relative.  Possibly the gp
	value can be one for a shared library?  But that doesn't seem useful
	or supported by the various abi docs and won't work as written.
	Symbols defined in shared libraries have section->output_section
	NULL, and what's more the code in mips_elf_assign_gp isn't set up to
	look at shared library symbols.

	Also, if the symbol is a SHN_ABS one the owner of *ABS* section is
	NULL, which will result in the testcase segfault.  The only gp to
	which an absolute symbol can be relative is the linker output bfd when
	linking, or the input bfd when not.  This patch arranges to do that
	for all gp-relative reloc symbols.

		* elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Don't use the
		section symbol to find the output bfd, use input_section.
		(mips_elf_gprel32_reloc, mips16_gprel_reloc): Likewise.
		* elf64-mips.c (mips_elf64_gprel16_reloc): Likewise.
		(mips_elf64_literal_reloc, mips_elf64_gprel32_reloc): Likewise.
		(mips16_gprel_reloc): Likewise.

2021-08-04  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Use lambda function instead of addrmap_foreach_check
	Use a lambda function instead of addrmap_foreach_check,
	which removes the need for static variables.

	Also remove unnecessary static on local var temp_obstack in test_addrmap.

	gdb/ChangeLog:

	2021-08-04  Tom de Vries  <tdevries@suse.de>

		* addrmap.c (addrmap_foreach_check): Remove.
		(array, val1, val2): Move ...
		(test_addrmap): ... here.  Remove static on temp_obstack.  Use lambda
		function instead of addrmap_foreach_check.

2021-08-04  H.J. Lu  <hjl.tools@gmail.com>

	elf: Treat undefined version as hidden
	Since undefined version can't be used to resolve any references without
	the original definition, treat it as hidden.

	bfd/

		PR binutils/28158
		* elf.c (_bfd_elf_get_symbol_version_string): Treat undefined
		version as hidden.

	ld/

		PR binutils/28158
		* testsuite/ld-elf/linux-x86.exp: Run PR binutils/28158 tests.
		* testsuite/ld-elf/pr28158-1.c: New file.
		* testsuite/ld-elf/pr28158-2.S: Likewise.
		* testsuite/ld-elf/pr28158.nd: Likewise.
		* testsuite/ld-elf/pr28158.rd: Likewise.
		* testsuite/ld-elf/pr28158.t: Likewise.
		* testsuite/ld-elfvers/vers2.dsym: Updated.
		* testsuite/ld-elfvers/vers3.dsym: Likewise.
		* testsuite/ld-elfvers/vers6.dsym: Likewise.
		* testsuite/ld-elfvers/vers19.dsym: Likewise.
		* testsuite/ld-elfvers/vers22.dsym: Likewise.
		* testsuite/ld-elfvers/vers23.dsym: Likewise.
		* testsuite/ld-elfvers/vers23d.dsym: Likewise.
		* testsuite/ld-elfvers/vers27d4.dsym: Likewise.
		* testsuite/ld-elfvers/vers28c.dsym: Likewise.

2021-08-04  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Implement addrmap_mutable_find
	Currently addrmap_mutable_find is not implemented:
	...
	static void *
	addrmap_mutable_find (struct addrmap *self, CORE_ADDR addr)
	{
	  /* Not needed yet.  */
	  internal_error (__FILE__, __LINE__,
	                  _("addrmap_find is not implemented yet "
	                    "for mutable addrmaps"));
	}
	...

	I implemented this because I needed it during debugging, to be able to do:
	...
	(gdb) p ((dwarf2_psymtab *)addrmap_find (map, addr))->filename
	...
	before and after a call to addrmap_set_empty.

	Since this is not used otherwise, added addrmap unit test.

	Build on x86_64-linux, tested by doing:
	...
	$ gdb -q -batch -ex "maint selftest addrmap"
	Running selftest addrmap.
	Ran 1 unit tests, 0 failed
	...

	gdb/ChangeLog:

	2021-08-03  Tom de Vries  <tdevries@suse.de>

	        * gdb/addrmap.c (addrmap_mutable_find): Implement
	        [GDB_SELF_TESTS] (CHECK_ADDRMAP_FIND): New macro.
	        [GDB_SELF_TESTS] (core_addr, addrmap_foreach_check, test_addrmap)
		(_initialize_addrmap): New function.

2021-08-04  Clément Chigot  <clement.chigot@atos.net>

	gas: correctly output XCOFF tbss symbols with XTY_CM type.
	Global tbss symbols weren't correctly handled and were generating
	a symbol with XTY_SD instead of XTY_CM as expected.

	gas/
		* config/tc-ppc.c (ppc_frog_symbol): Generate a XTY_CM when
		a symbol has a storage class of XMC_UL.

2021-08-04  Clément Chigot  <clement.chigot@atos.net>

	gas: always add dummy symbols when creating XCOFF sections.
	Most of the algorithms for XCOFF in tc-ppc.c assume that
	the csects field of a ppc_xcoff_section isn't NULL.
	This was already made for most of the sections with the creation
	of a dummy symbol.
	This patch simply mades it default when creating a xcoff_section.

	gas/
		* config/tc-ppc.c (ppc_init_xcoff_section): Always create
		the dummy symbol.
		(md_begin): Adjust ppc_init_xcoff_section call.
		(ppc_comm): Likewise.
		(ppc_change_csect): Likewise.

2021-08-04  Alan Modra  <amodra@gmail.com>

	PR28156, rename.c doesn't compile with MinGW
	Guard against lack of struct timespec definition.

		PR 28156
		* rename.c (get_stat_atime, get_stat_mtime): Don't compile
		unless HAVE_UTIMENSAT is defined.

2021-08-04  Alan Modra  <amodra@gmail.com>

	PR28155, Superfluous "the" in the man page
		PR 28155
		* ld.texi (Options <runtime library name>): Correct grammar.

	revise PE IMAGE_SCN_LNK_NRELOC_OVFL test
		* coffcode.h (coff_set_alignment_hook): Test that the resulting
		reloc count is not less than 0xffff.

2021-08-04  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: follow-fork: push target and add thread in target_follow_fork
	In the context of ROCm-gdb [1], the ROCm target sits on top of the
	linux-nat target.  when a process forks, it needs to carry over some
	data from the forking inferior to the fork child inferior.  Ideally, the
	ROCm target would implement the follow_fork target_ops method, but there
	are some small problems.  This patch fixes these, which helps the ROCm
	target, but also makes things more consistent and a bit nicer in
	general, I believe.

	The main problem is: when follow-fork-mode is "parent",
	target_follow_fork is called with the parent as the current inferior.
	When it's "child", target_follow_fork is called with the child as the
	current inferior.  This means that target_follow_fork is sometimes
	called on the parent's target stack and sometimes on the child's target
	stack.

	The parent's target stack may contain targets above the process target,
	such as the ROCm target.  So if follow-fork-child is "parent", the ROCm
	target would get notified of the fork and do whatever is needed.  But
	the child's target stack, at that moment, only contains the exec and
	process target copied over from the parent.  The child's target stack is
	set up by follow_fork_inferior, before calling target_follow_fork.  In
	that case, the ROCm target wouldn't get notified of the fork.

	For consistency, I think it would be good to always call
	target_follow_fork on the parent inferior's target stack.  I think it
	makes sense as a way to indicate "this inferior has called fork, do
	whatever is needed".  The desired outcome of the fork (whether an
	inferior is created for the child, do we need to detach from the child)
	can be indicated by passed parameter.

	I therefore propose these changes:

	 - make follow_fork_inferior always call target_follow_fork with the
	   parent as the current inferior.  That lets all targets present on the
	   parent's target stack do some fork-related handling and push
	   themselves on the fork child's target stack if needed.

	   For this purpose, pass the child inferior down to target_follow_fork
	   and follow_fork implementations.  This is nullptr if no inferior is
	   created for the child, because we want to detach from it.

	 - as a result, in follow_fork_inferior, detach from the parent inferior
	   (if needed) only after the target_follow_fork call.  This is needed
	   because we want to call target_follow_fork before the parent's
	   target stack is torn down.

	 - hand over to the targets in the parent's target stack (including the
	   process target) the responsibility to push themselves, if needed, to
	   the child's target stack.  Also hand over the responsibility to the
	   process target, at the same time, to create the child's initial
	   thread (just like we do for follow_exec).

	 - pass the child inferior to exec_on_vfork, so we don't need to swap
	   the current inferior between parent and child.  Nothing in
	   exec_on_vfork depends on the current inferior, after this change.

	   Although this could perhaps be replaced with just having the exec
	   target implement follow_fork and push itself in the child's target
	   stack, like the process target does... We would just need to make
	   sure the process target calls beneath()->follow_fork(...).  I'm not
	   sure about this one.

	gdb/ChangeLog:

		* target.h (struct target_ops) <follow_fork>: Add inferior*
		parameter.
		(target_follow_fork): Likewise.
		* target.c (default_follow_fork): Likewise.
		(target_follow_fork): Likewise.
		* fbsd-nat.h (class fbsd_nat_target) <follow_fork>: Likewise.
		(fbsd_nat_target::follow_fork): Likewise, and call
		inf_ptrace_target::follow_fork.
		* linux-nat.h (class linux_nat_target) <follow_fork>: Likewise.
		* linux-nat.c (linux_nat_target::follow_fork): Likewise, and
		call inf_ptrace_target::follow_fork.
		* obsd-nat.h (obsd_nat_target) <follow_fork>: Likewise.
		* obsd-nat.c (obsd_nat_target::follow_fork): Likewise, and call
		inf_ptrace_target::follow_fork.
		* remote.c (class remote_target) <follow_fork>: Likewise.
		(remote_target::follow_fork): Likewise, and call
		process_stratum_target::follow_fork.
		* process-stratum-target.h (class process_stratum_target)
		<follow_fork>: New.
		* process-stratum-target.c
		(process_stratum_target::follow_fork): New.
		* target-delegates.c: Re-generate.

	[1] https://github.com/ROCm-Developer-Tools/ROCgdb

	Change-Id: I460bd0af850f0485e8aed4b24c6d8262a4c69929

2021-08-04  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-03  Carl Love  <cel@us.ibm.com>

	Fixes for mi-fortran-modules.exp fixes
	Output has additional information for a given filename.

	gdb/testsuite/ChangeLog
		* gdb.mi/mi-fortran-modules.exp (system_modules_pattern,
		system_module_symbols_pattern): Add check for additional symbols
		on the line

2021-08-03  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbsupport: add debug assertions in gdb::optional::get
	The libstdc++ version of optional contains some runtime checks enabled
	when _GLIBCXX_DEBUG is defined.  I think it would be useful if our
	version contained similar checks.

	Add checks in the two `get` methods, also conditional on _GLIBCXX_DEBUG.
	I think it's simpler to use that macro rather than introducing a new
	GDB-specific one, as I think that if somebody is interested in enabling
	these runtime checks, they'll also be interested in enabling the
	libstdc++ runtime checks (and vice-versa).

	I implemented these checks using gdb_assert.  Note that gdb_assert
	throws (after querying the user), and we are in noexcept methods.  That
	means that std::terminate / abort will immediately be called.  I think
	this is ok, since if those were "real" _GLIBCXX_DEBUG checks, abort
	would be called straight away.

	If I add a dummy failure, it looks like so:

	    $ ./gdb -q -nx --data-directory=data-directory
	    /home/simark/src/binutils-gdb/gdb/../gdbsupport/gdb_optional.h:206: internal-error: T& gdb::optional<T>::get() [with T = int]: Assertion `this->has_value ()' failed.
	    A problem internal to GDB has been detected,
	    further debugging may prove unreliable.
	    Quit this debugging session? (y or n) n
	    [1]    658767 abort (core dumped)  ./gdb -q -nx --data-directory=data-directory

	Change-Id: Iadfdcd131425bd2ca6a2de30d7b22e9b3cc67793

2021-08-03  Alok Kumar Sharma  <AlokKumar.Sharma@amd.com>

	[gdb/testsuite] templates.exp to accept clang++ output
	Please consider below testcase with intended error.
	``````````
	    constexpr const char cstring[] = "Eta";
	    template <const char*, typename T> class Column {};
	    using quick = Column<cstring,double>; // cstring without '&'

	    void lookup() {
	      quick c1;
	      c1.ls();
	    }
	``````````
	It produces below error.
	``````````
	no member named 'ls' in 'Column<&cstring, double>'.
	``````````
	Please note that error message contains '&' for cstring, which is absent
	in actual program.
	Clang++ does not generate & in such cases and this should also be
	accepted as correct output.

	gdb/testsuite/ChangeLog:

		* gdb.cp/templates.exp: Accept different but correct output
		from the Clang++ compiled binary also.

2021-08-03  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-02  Tom Tromey  <tromey@adacore.com>

	Handle compiler-generated suffixes in Ada names
	The compiler may add a suffix to a mangled name.  A typical example
	would be splitting a function and creating a ".cold" variant.

	This patch changes Ada decoding (aka demangling) to handle these
	suffixes.  It also changes the encoding process to handle them as
	well.

	A symbol like "function.cold" will now be displayed to the user as
	"function[cold]".  The "." is not simply preserved because that is
	already used in Ada.

2021-08-02  Tom Tromey  <tromey@adacore.com>

	Remove uses of fprintf_symbol_filtered
	I believe that many calls to fprintf_symbol_filtered are incorrect.
	In particular, there are some that pass a symbol's print name, like:

	  fprintf_symbol_filtered (gdb_stdout, sym->print_name (),
				   current_language->la_language, DMGL_ANSI);

	fprintf_symbol_filtered uses the "demangle" global to decide whether
	or not to demangle -- but print_name does this as well.  This can lead
	to double-demangling.  Normally this could be innocuous, except I also
	plan to change Ada demangling in a way that causes this to fail.

2021-08-02  Tom Tromey  <tromey@adacore.com>

	Handle type qualifier for enumeration name
	Pierre-Marie noticed that the Ada expression "TYPE'(NAME)" resolved
	incorrectly when "TYPE" was an enumeration type.  Here, "NAME" should
	be unambiguous.

	This patch fixes this problem.  Note that the patch is not perfect --
	it does not give an error if TYPE is an enumeration type but NAME is
	not an enumerator but does have some other meaning in scope.  Fixing
	this proved difficult, and so I've left it out.

2021-08-02  Tom Tromey  <tromey@adacore.com>

	Remove the type_qualifier global
	The type_qualifier global is no longer needed in the Ada expression
	parser, so this removes it.

2021-08-02  Tom Tromey  <tromey@adacore.com>

	Defer Ada character literal resolution
	In Ada, an enumeration type can use a character literal as one of the
	enumerators.  The Ada expression parser handles the appropriate
	conversion.

	It turns out, though, that this conversion was handled incorrectly.
	For an expression like TYPE'(EXP), the conversion would be done for
	any such literal appearing in EXP -- but only the outermost such
	expression should really be affected.

	This patch defers the conversion until the resolution phase, fixing
	the bug.

2021-08-02  Tom Tromey  <tromey@adacore.com>

	Refactor Ada resolution
	In a subsequent patch, it will be convenient if an Ada expression
	operation can supply its own replacement object.  This patch refactors
	Ada expression resolution to make this possible.

	Remove add_symbols_from_enclosing_procs
	I noticed that add_symbols_from_enclosing_procs is empty, and can be
	removed.  The one caller, ada_add_local_symbols, can also be
	simplified, removing some code that, I think, was an incorrect attempt
	to handle nested functions.

2021-08-02  Tom Tromey  <tromey@adacore.com>

	Avoid crash in varobj deletion
	PR varobj/28131 points out a crash in the varobj deletion code.  It
	took a while to reproduce this, but essentially what happens is that a
	top-level varobj deletes its root object, then deletes the "dynamic"
	object.  However, deletion of the dynamic object may cause
	~py_varobj_iter to run, which in turn uses gdbpy_enter_varobj:

	gdbpy_enter_varobj::gdbpy_enter_varobj (const struct varobj *var)
	: gdbpy_enter (var->root->exp->gdbarch, var->root->exp->language_defn)
	{
	}

	However, because var->root has already been destroyed, this is
	invalid.

	I've added a new test case.  This doesn't reliably crash, but the
	problem can easily be seen under valgrind (and, I presume, with ASAN,
	though I did not try this).

	Tested on x86-64 Fedora 32.  I also propose putting this on the GDB 11
	branch, with a suitable ChangeLog entry of course.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28131

2021-08-02  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.dwarf2/dw2-using-debug-str.exp with cc-with-dwz-m
	When running with target board cc-with-dwz-m, we run into:
	...
	(gdb) file dw2-using-debug-str-no-debug-str^M
	Reading symbols from dw2-using-debug-str-no-debug-str...^M
	(gdb) FAIL: gdb.dwarf2/dw2-using-debug-str.exp: file dw2-using-debug-str
	...

	With native, the .debug_str section is present in the
	dw2-using-debug-str executable, and removed from the
	dw2-using-debug-str-no-debug-str executable.  When loading the latter, a dwarf
	error is triggered.

	With cc-with-dwz-m, the .debug_str section is not present in the
	dw2-using-debug-str executable, because it's already moved to
	.tmp/dw2-using-debug-str.dwz.  Consequently, the removal has no effect, and no
	dwarf error is triggered, which causes the FAIL.

	The same problem arises with target board cc-with-gnu-debuglink.

	Fix this by detecting whether the .debug_str section is missing, and skipping
	the remainder of the test-case.

	Tested on x86_64-linux.

	gdb/testsuite/ChangeLog:

	2021-08-02  Tom de Vries  <tdevries@suse.de>

		* gdb.dwarf2/dw2-using-debug-str.exp: Handle missing .debug_str
		section in dw2-using-debug-str.

2021-08-02  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.dwarf2/dw2-using-debug-str.exp with cc-with-gdb-index
	When running with target board cc-with-gdb-index, we run into:
	...
	(gdb) file dw2-using-debug-str-no-debug-str^M
	Reading symbols from dw2-using-debug-str-no-debug-str...^M
	Dwarf Error: DW_FORM_strp used without required section^M
	(gdb) FAIL: gdb.dwarf2/dw2-using-debug-str.exp: file dw2-using-debug-str
	...

	The test expects the dwarf error, but has no matching pattern for the entire
	output.

	Fix this by updating the regexp.

	Tested on x86_64-linux.

	gdb/testsuite/ChangeLog:

	2021-08-02  Tom de Vries  <tdevries@suse.de>

		* gdb.dwarf2/dw2-using-debug-str.exp: Update regexp to match
		cc-with-gdb-index output.

2021-08-02  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.dwarf2/per-bfd-sharing.exp with cc-with-gdb-index
	When running with target board cc-with-gdb-index, we run into:
	...
	rm: cannot remove '/tmp/tmp.JmYTeiuFjj/*.gdb-index': \
	  No such file or directory^M
	FAIL: gdb.dwarf2/per-bfd-sharing.exp: \
	  couldn't remove files in temporary cache dir
	...

	Fix this, as in gdb.base/index-cache.exp, by only FAILing when
	$expecting_index_cache_use.

	Tested on x86_64-linux.

	gdb/testsuite/ChangeLog:

	2021-08-02  Tom de Vries  <tdevries@suse.de>

		* gdb.dwarf2/per-bfd-sharing.exp: Only expect index-cache files
		when $expecting_index_cache_use.

2021-08-02  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.dwarf2/gdb-index-nodebug.exp with cc-with-gdb-index
	When running with target board cc-with-gdb-index, we run into:
	...
	(gdb) save gdb-index .^M
	Error while writing index for `gdb-index-nodebug': \
	  Cannot use an index to create the index^M
	(gdb) FAIL: gdb.dwarf2/gdb-index-nodebug.exp: try to save gdb index
	...

	Fix this by detecting an already present index, and marking the test
	unsupported.

	Tested on x86_64-linux.

	gdb/testsuite/ChangeLog:

	2021-08-02  Tom de Vries  <tdevries@suse.de>

		* gdb.dwarf2/gdb-index-nodebug.exp: Mark unsupported when index
		already present.

2021-08-02  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.dwarf2/fission-relative-dwo.exp with cc-with-gdb-index
	When running with target board cc-with-gdb-index, we run into:
	...
	gdb compile failed, warning: Could not find DWO CU \
	  fission-relative-dwo.dwo(0x1234) referenced by CU at offset 0xc7 \
	  [in module outputs/gdb.dwarf2/fission-relative-dwo/.tmp/fission-relative-dwo]
	UNTESTED: gdb.dwarf2/fission-relative-dwo.exp: fission-relative-dwo.exp
	ERROR: failed to compile fission-relative-dwo
	...

	The problem is that:
	- the .dwo file is found relative to the executable, and
	- cc-with-tweaks.sh moves the executable to a temp dir, but not
	  the .dwo file.

	Fix this by copying the .dwo file alongside the executable in the temp dir.

	Verified changes using shellcheck.

	Tested on x86_64-linux.

	gdb/ChangeLog:

	2021-08-02  Tom de Vries  <tdevries@suse.de>

		* contrib/cc-with-tweaks.sh: Copy .dwo files alongside executable.

2021-08-02  Shahab Vahedi  <shahab@synopsys.com>

	gdb: Make the builtin "boolean" type an unsigned type
	When printing the fields of a register that is of a custom struct type,
	the "unpack_bits_as_long ()" function is used:

	    do_val_print (...)
	      cp_print_value_fields (...)
	        value_field_bitfield (...)
	          unpack_value_bitfield (...)
	            unpack_bits_as_long (...)

	This function may sign-extend the extracted field while returning it:

	    val >>= lsbcount;

	    if (...)
	      {
	        valmask = (((ULONGEST) 1) << bitsize) - 1;
	        val &= valmask;
	        if (!field_type->is_unsigned ())
	  	  if (val & (valmask ^ (valmask >> 1)))
	  	      val |= ~valmask;
	      }

	    return val;

	lsbcount:   Number of lower bits to get rid of.
	bitsize:    The bit length of the field to be extracted.
	val:        The register value.
	field_type: The type of field that is being handled.

	While the logic here is correct, there is a problem when it is
	handling "field_type"s of "boolean".  Those types are NOT marked
	as "unsigned" and therefore they end up being sign extended.
	Although this is not a problem for "false" (0), it definitely
	causes trouble for "true".

	This patch constructs the builtin boolean type as such that it is
	marked as an "unsigned" entity.

	The issue tackled here was first encountered for arc-elf32 target
	running on an x86_64 machine.  The unit-test introduced in this change
	has passed for all the targets (--enable-targets=all) running on the
	same x86_64 host.

	Fixes: https://sourceware.org/PR28104

2021-08-02  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-08-01  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/maint.exp with cc-with-gdb-index
	With target board cc-with-gdb-index we run into:
	...
	FAIL: gdb.base/maint.exp: maint print statistics
	...

	The output that is checked is:
	...
	Statistics for 'maint':^M
	  Number of "minimal" symbols read: 53^M
	  Number of "full" symbols read: 40^M
	  Number of "types" defined: 60^M
	  Number of symbol tables: 7^M
	  Number of symbol tables with line tables: 2^M
	  Number of symbol tables with blockvectors: 2^M
	  Number of read CUs: 2^M
	  Number of unread CUs: 5^M
	  Total memory used for objfile obstack: 20320^M
	  Total memory used for BFD obstack: 4064^M
	  Total memory used for string cache: 4064^M
	...
	and the regexp doesn't match because it expects the "Number of read/unread
	CUs" lines in a different place.

	Fix this by updating the regexp.

	Tested on x86_64-linux.

	gdb/testsuite/ChangeLog:

	2021-08-01  Tom de Vries  <tdevries@suse.de>

		* gdb.base/maint.exp: Update "maint print statistics" to match
		output with target board cc-with-gdb-index.

2021-08-01  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/index-cache.exp with cc-with-gdb-index
	With target board cc-with-gdb-index we run into:
	...
	FAIL: gdb.base/index-cache.exp: couldn't remove files in temporary cache dir
	...

	The problem is that there are no files to remove, because the index cache
	isn't used, as indicated by $expecting_index_cache_use.

	Fix this by only FAILing when $expecting_index_cache_use.

	Tested on x86_64-linux.

	gdb/testsuite/ChangeLog:

	2021-08-01  Tom de Vries  <tdevries@suse.de>

		* gdb.base/index-cache.exp:

2021-08-01  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-31  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-30  Tom Tromey  <tom@tromey.com>

	Use iterator_range in more places
	This changes a couple of spots to replace custom iterator range
	classes with a specialization of iterator_range.

	Regression tested on x86-64 Fedora 34.

2021-07-30  Tom Tromey  <tom@tromey.com>

	Replace exception_print_same with operator!=
	I noticed that exception_print_same is only used in a single spot, and
	it seemed to be better as an operator!= method attached to
	gdb_exception.

	Regression tested on x86-64 Fedora 34.

2021-07-30  Tom de Vries  <tdevries@suse.de>

	[gdb/build] Disable attribute nonnull
	With trunk gcc (12.0) we're running into a -Werror=nonnull-compare build
	breaker in gdb, which caused a broader review of the usage of the nonnull
	attribute.

	The current conclusion is that it's best to disable this.  This is explained
	at length in the gdbsupport/common-defs.h comment.

	Tested by building with trunk gcc.

	gdb/ChangeLog:

	2021-07-29  Tom de Vries  <tdevries@suse.de>

		* gdbsupport/common-defs.h (ATTRIBUTE_NONNULL): Disable.

2021-07-30  Clément Chigot  <clement.chigot@atos.net>

	gas: ensure XCOFF DWARF subsection are initialized to 0
	debug_abbrev doesn't use end_exp to compute its size. However, it must
	be NULL. Otherwise, ppc_xcoff_end might try to access uninitialized
	memory.

	gas/
		* config/tc-ppc.c (ppc_dwsect): Use XCNEW instead of XNEW when creating
		a new subsection.

2021-07-30  Clément Chigot  <clement.chigot@atos.net>

	bfd: ensure that symbols targeted by DWARF relocations are kept in XCOFF
	This patch improves XCOFF garbage collector pass, in order to keep
	symbols being referenced only by special sections like DWARF sections.

	bfd/
		* xcofflink.c (xcoff_mark): Replace SEC_MARK by gc_mark.
		Look through relocations even if xcoff_section_data is NULL.
		(xcoff_sweep): Check if any sections of a file is kept before
		adding its special sections.
		Call xcoff_mark for special sessions being kept instead of just
		marking them.
		(SEC_MARK): Remove
		(xcoff_mark_symbol): Replace SEC_MARK by gc_mark.
		(xcoff_keep_symbol_p): Likewise.
		(bfd_xcoff_size_dynamic_sections): Likewise.
		(xcoff_find_tc0): Likewise.

2021-07-30  Clément Chigot  <clement.chigot@atos.net>

	bfd: avoid a crash when debug_section isn't created in XCOFF
	bfd/
		* xcofflink.c (bfd_xcoff_size_dynamic_sections):
		Add check to know if debug_section is initialized.

2021-07-30  Alan Modra  <amodra@gmail.com>

	readelf: catch archive_file_size of -1
	Fuzzers might put -1 in arhdr.ar_size.  If the size is rounded up to
	and even number of bytes we get zero.

		* readelf.c (process_archive): Don't round up archive_file_size.
		Do round up next_arhdr_offset calculation.

2021-07-30  Alan Modra  <amodra@gmail.com>

	reloc_upper_bound size calculations
	Section reloc_count is an unsigned int.  Adding one for a NULL
	terminator to an array of arelent pointers can wrap the count to
	zero.  Avoid that by doing the addition as longs.

		* coffgen.c (coff_get_reloc_upper_bound): Don't overflow unsigned
		int expression.
		* elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
		* elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
		* mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
		* vms-alpha.c (alpha_vms_get_reloc_upper_bound): Likewise.

2021-07-30  Alan Modra  <amodra@gmail.com>

	Sanity check _bfd_coff_read_string_table
		* coffgen.c (_bfd_coff_read_string_table): Catch overflows
		when calculating string table file location.

2021-07-30  Alan Modra  <amodra@gmail.com>

	IMAGE_SCN_LNK_NRELOC_OVFL
	From microsoft docs: It is an error if IMAGE_SCN_LNK_NRELOC_OVFL is
	set and there are fewer than 0xffff relocations in the section.

		* coffcode.h (coff_set_alignment_hook): Sanity check overflow
		reloc count.

2021-07-30  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: fix nr_bits gdb_assert in append_flags_type_field
	The assertion

	    gdb_assert (nr_bits >= 1 && nr_bits <= type_bitsize);

	is not correct.  Well, it's correct in that we do want the number of
	bits to be in the range [1, type_bitsize].  But we don't check anywhere
	that the end of the specified flag is within the containing type.

	The following code should generate a failed assertion, as the flag goes
	past the 32 bits of the underlying type, but it's currently not caught:

	    static void
	    test_print_flag (gdbarch *arch)
	    {
	      type *flags_type = arch_flags_type (arch, "test_type", 32);
	      type *field_type = builtin_type (arch)->builtin_uint32;
	      append_flags_type_field (flags_type, 31, 2, field_type, "invalid");
	    }

	(You can test this by registering it as a selftest using
	selftests::register_test_foreach_arc and running.)

	Change the assertion to verify that the end bit is within the range of
	the underlying type.  This implicitly verifies that nr_bits is not
	too big as well, so we don't need a separate assertion for that.

	Change-Id: I9be79e5fd7a5917bf25b03b598727e6274c892e8
	Co-Authored-By: Tony Tye <Tony.Tye@amd.com>

2021-07-30  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-29  John Baldwin  <jhb@FreeBSD.org>

	obsd-nat: Report both thread and PID in ::pid_to_str.
	This improves the output of info threads when debugging multiple
	inferiors (e.g. after a fork with detach_on_fork disabled).

2021-07-29  John Baldwin  <jhb@FreeBSD.org>

	obsd-nat: Various fixes for fork following.
	- Don't use #ifdef's on ptrace ops.  obsd-nat.h didn't include
	  <sys/ptrace.h>, so the virtual methods weren't always overridden
	  causing the fork following to not work.  In addition, the thread and
	  fork code is intertwined in ::wait and and the lack of #ifdef's
	  there already assumed both were present.  Finally, both of these
	  ptrace ops have been present in OpenBSD for at least 10 years.

	- Move duplicated code to enable PTRACE_FORK event reporting to a
	  single function and invoke it on new child processes reported via
	  PTRACE_FORK.

	- Don't return early from PTRACE_FORK handling, but instead reset
	  wptid to the correct ptid if the child reports its event before the
	  parent.  This allows the ptid fixup code to add thread IDs if the
	  first event for a process is a PTRACE_FORK event.  This also
	  properly returns ptid's with thread IDs when reporting PTRACE_FORK
	  events.

	- Handle detach_fork by skipping the PT_DETACH.

2021-07-29  John Baldwin  <jhb@FreeBSD.org>

	obsd-nat: Various fixes to obsd_nat_target::wait.
	- Call inf_ptrace_target::wait instead of duplicating the code.
	  Replace a check for WIFSTOPPED on the returned status from waitpid
	  by checking for TARGET_WAITKIND_STOPPED in the parsed status as is
	  done in fbsd_nat_target::wait.

	- Don't use inferior_ptid when deciding if a new process is a child vs
	  parent of the fork.  Instead, use find_inferior_pid and assume that
	  if an inferior already exists, the pid in question is the parent;
	  otherwise, the pid is the child.

	- Don't use inferior_ptid when deciding if the ptid of the process
	  needs to be updated with an LWP ID, or if this is a new thread.
	  Instead, use the approach from fbsd-nat which is to check if a ptid
	  without an LWP exists and if so update the ptid of that thread
	  instead of adding a new thread.

2021-07-29  John Baldwin  <jhb@FreeBSD.org>

	x86-bsd-nat: Only define gdb_ptrace when using debug registers.
	This fixes an unused function warning on OpenBSD which does not
	support PT_GETDBREGS.

2021-07-29  John Baldwin  <jhb@FreeBSD.org>

	Don't compile x86 debug register support on OpenBSD.
	Simon Marchi tried gdb on OpenBSD, and it immediately segfaults when
	running a program.  Simon tracked down the problem to x86_dr_low.get_status
	being nullptr at this point:

	    (lldb) print x86_dr_low.get_status
	    (unsigned long (*)()) $0 = 0x0000000000000000
	    (lldb) bt
	    * thread #1, stop reason = step over
	      * frame #0: 0x0000033b64b764aa gdb`x86_dr_stopped_data_address(state=0x0000033d7162a310, addr_p=0x00007f7ffffc5688) at x86-dregs.c:645:12
	        frame #1: 0x0000033b64b766de gdb`x86_dr_stopped_by_watchpoint(state=0x0000033d7162a310) at x86-dregs.c:687:10
	        frame #2: 0x0000033b64ea5f72 gdb`x86_stopped_by_watchpoint() at x86-nat.c:206:10
	        frame #3: 0x0000033b64637fbb gdb`x86_nat_target<obsd_nat_target>::stopped_by_watchpoint(this=0x0000033b65252820) at x86-nat.h:100:12
	        frame #4: 0x0000033b64d3ff11 gdb`target_stopped_by_watchpoint() at target.c:468:46
	        frame #5: 0x0000033b6469b001 gdb`watchpoints_triggered(ws=0x00007f7ffffc61c8) at breakpoint.c:4790:32
	        frame #6: 0x0000033b64a8bb8b gdb`handle_signal_stop(ecs=0x00007f7ffffc61a0) at infrun.c:6072:29
	        frame #7: 0x0000033b64a7e3a7 gdb`handle_inferior_event(ecs=0x00007f7ffffc61a0) at infrun.c:5694:7
	        frame #8: 0x0000033b64a7c1a0 gdb`fetch_inferior_event() at infrun.c:4090:5
	        frame #9: 0x0000033b64a51921 gdb`inferior_event_handler(event_type=INF_REG_EVENT) at inf-loop.c:41:7
	        frame #10: 0x0000033b64a827c9 gdb`infrun_async_inferior_event_handler(data=0x0000000000000000) at infrun.c:9384:3
	        frame #11: 0x0000033b6465bd4f gdb`check_async_event_handlers() at async-event.c:335:4
	        frame #12: 0x0000033b65070917 gdb`gdb_do_one_event() at event-loop.cc:216:10
	        frame #13: 0x0000033b64af0db1 gdb`start_event_loop() at main.c:421:13
	        frame #14: 0x0000033b64aefe9a gdb`captured_command_loop() at main.c:481:3
	        frame #15: 0x0000033b64aed5c2 gdb`captured_main(data=0x00007f7ffffc6470) at main.c:1353:4
	        frame #16: 0x0000033b64aed4f2 gdb`gdb_main(args=0x00007f7ffffc6470) at main.c:1368:7
	        frame #17: 0x0000033b6459d787 gdb`main(argc=5, argv=0x00007f7ffffc6518) at gdb.c:32:10
	        frame #18: 0x0000033b6459d521 gdb`___start + 321

	On BSDs, get_status is set in _initialize_x86_bsd_nat, but only if
	HAVE_PT_GETDBREGS is defined.  PT_GETDBREGS doesn't exist on OpenBSD, so
	get_status (and the other fields of x86_dr_low) are left as nullptr.

	OpenBSD doesn't support getting or setting the x86 debug registers, so
	fix by omitting debug register support entirely on OpenBSD:

	- Change x86bsd_nat_target to only inherit from x86_nat_target if
	  PT_GETDBREGS is supported.

	- Don't include x86-nat.o and nat/x86-dregs.o for OpenBSD/amd64.  They
	  were already omitted for OpenBSD/i386.

2021-07-29  Carl Love  <cel@us.ibm.com>

	Fix for gdb.tui/tui-layout-asm.exp
	The width of the window is too narrow to display the entire assembly line.
	The width of the columns in the window changes as the test walks thru the
	terminal window output.  The column change results in the first and second
	reads of the same line to differ thus causing the test to fail.  Increasing
	the width of the window keeps the column width consistent thru the test.

	If the test fails, the added check prints an message to the log file if
	the failure may be due to the window being too narrow.

	gdb/testsuite/ChangeLog

		* gdb.tui/tui-layout-asm.exp: Replace window width of 80 with the
		tui_asm_window_width variable for the width. Add if
		count_whitespace check.
		(count_whitespace): New proc

2021-07-29  George Barrett  <bob@bob131.so>

	guile/scm-math: indentation fixes
	Changes the indenting of a few expressions in
	vlscm_convert_typed_number to be better in line with the prevailing
	code style.

	gdb/ChangeLog:

	2021-07-30  George Barrett  <bob@bob131.so>

		* guile/scm-math.c (vlscm_convert_typed_number): Fix the
		indentation of calls to gdbscm_make_out_of_range_error.

	Change-Id: I7463998b77c17a00e88058e89b52fa029ee40e03

2021-07-29  George Barrett  <bob@bob131.so>

	guile: fix make-value with pointer type
	Calling the `make-value' procedure with an integer value and a pointer
	type for the #:type argument triggers a failed assertion in
	`get_unsigned_type_max', as that function doesn't consider pointers to
	be an unsigned type. This commit fixes the issue by adding a separate
	code path for pointers.

	As previously suggested, range checking is done using a new helper
	function in gdbtypes.

	gdb/ChangeLog:

	2021-07-30  George Barrett  <bob@bob131.so>

		* gdbtypes.h (get_pointer_type_max): Add declaration.
		* gdbtypes.c (get_pointer_type_max): Add definition for new
		helper function.
		* guile/scm-math.c (vlscm_convert_typed_number): Add code path
		for handling conversions to pointer types without failing an
		assert.

	gdb/testsuite/ChangeLog:

	2021-07-30  George Barrett  <bob@bob131.so>

		* gdb.guile/scm-math.exp (test_value_numeric_ops): Add test
		for creating pointers with make-value.
		(test_make_pointer_value, test_pointer_numeric_range): Add
		test procedures containing checks for integer-to-pointer
		validation.

	Change-Id: I9994dd1c848840a3d995f745e6d72867732049f0

2021-07-29  George Barrett  <bob@bob131.so>

	gdbtypes: return value from get_unsigned_type_max
	Changes the signature of get_unsigned_type_max to return the computed
	value rather than returning void and writing the value into a pointer
	passed by the caller.

	gdb/ChangeLog:

	2021-07-30  George Barrett  <bob@bob131.so>

		* gdbtypes.h (get_unsigned_type_max): Change signature to
		return the result instead of accepting a pointer argument in
		which to store the result.
		* gdbtypes.c (get_unsigned_type_max): Likewise.
		* guile/scm-math.c (vlscm_convert_typed_number): Update caller
		of get_unsigned_type_max.
		(vlscm_integer_fits_p): Likewise.

	Change-Id: Ibb1bf0c0fa181fac7853147dfde082a7d1ae2323

2021-07-29  Clément Chigot  <clement.chigot@atos.net>

	gas: improve C_BSTAT and C_STSYM symbols handling on XCOFF
	A C_BSTAT debug symbol specifies the beginning of a static block.
	Its n_value is the index of the csect containing static symbols.
	A C_STSYM debug symbol represents the stabstring of a statically
	allocated symbol. Its n_value is the offset in the csect pointed
	by the containing C_BSTAT.

	These two special n_value were not correctly handled both when
	generating object files with gas or when reading them with objdump.
	This patch tries to improve that and, above all, to allow gas-generated
	object files with such symbols to be accepted by AIX ld.

	bfd/
		* coff-bfd.c (bfd_coff_get_syment): Adjust n_value of symbols
		having fix_value = 1 in order to be an index and not a memory
		offset.
		* coffgen.c (coff_get_symbol_info): Likewize.
		(coff_print_symbol): Likewize.

	gas/
		* config/tc-ppc.c (ppc_frob_label): Don't change within if
		already set.
		(ppc_stabx): Remove workaround changing exp.X_add_symbol's
		within.
		* config/tc-ppc.h (struct ppc_tc_sy): Update comments.
		* symbols.c (resolve_symbol_value): Remove symbol update
		when final_val is 0 and it's an AIX debug symbol.
		* testsuite/gas/ppc/aix.exp: Add new tests.
		* testsuite/gas/ppc/xcoff-stsym-32.d: New test.
		* testsuite/gas/ppc/xcoff-stsym-64.d: New test.
		* testsuite/gas/ppc/xcoff-stsym.s: New test.

2021-07-29  George Barrett  <bob@bob131.so>

	Guile: temporary breakpoints
	Adds API to the Guile bindings for creating temporary breakpoints and
	querying whether an existing breakpoint object is temporary. This is
	effectively a transliteration of the Python implementation.

	It's worth noting that the added `is_temporary' flag is ignored in the
	watchpoint registration path. This replicates the behaviour of the
	Python implementation, but might be a bit surprising for users.

	gdb/ChangeLog:

	2021-06-09  George Barrett  <bob@bob131.so>

		* guile/scm-breakpoint.c (gdbscm_breakpoint_object::spec): Add
		is_temporary field.
		(temporary_keyword): Add keyword object for make-breakpoint
		argument parsing.
		(gdbscm_make_breakpoint): Accept #:temporary keyword argument
		and store the value in the allocated object's
		spec.is_temporary.
		(gdbscm_register_breakpoint_x): Pass the breakpoint's
		spec.is_temporary value to create_breakpoint.
		(gdbscm_breakpoint_temporary): Add breakpoint-temporary?
		procedure implementation.
		(breakpoint_functions::make-breakpoint): Update documentation
		string and fix a typo.
		(breakpoint_functions::breakpoint-temporary?): Add
		breakpoint-temporary? procedure.
		(gdbscm_initialize_breakpoints): Initialise temporary_keyword
		variable.
		NEWS (Guile API): Mention new temporary breakpoints API.

	gdb/doc/ChangeLog:

	2021-06-09  George Barrett  <bob@bob131.so>

		* guile.texi (Breakpoints In Guile): Update make-breakpoint
		documentation to reflect new #:temporary argument.
		Add documentation for new breakpoint-temporary? procedure.

	gdb/testsuite/ChangeLog:

	2021-06-09  George Barrett  <bob@bob131.so>

		* gdb.guile/scm-breakpoint.exp: Add additional tests for
		temporary breakpoints.

	Change-Id: I2de332ee7c256f5591d7141ab3ad50d31b871d17

2021-07-29  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-28  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: clean up some things in features/Makefile
	Clean up some things I noticed:

	 - we generate a regformats/microblaze-with-stack-protect.dat file.  I
	   don't think this is used.  It could be used by a GDBserver built for
	   Microblaze, but GDBserver isn't ported to Microblaze.  So I don't
	   think that's used at all.  Remove the entry in features/Makefile and
	   the file itself.

	 - There are a bunch of *-expedite values in features/Makefile for
	   architectures for which we don't generate dat files.  AFAIK, these
	   *-expedite values are only used when generating dat files.  Remove
	   those that are not necessary.

	 - 32bit-segments.xml is not listed in the Makfile, but it's used.  This
	   means that it wouldn't get re-generated if we were to change how C
	   files are generated from the XML.  It looks like it was simply
	   forgotten, add it.

	Change-Id: I112d00db317102270e1df924473c37122ccb6c3a

2021-07-28  H.J. Lu  <hjl.tools@gmail.com>

	x86: Simplify check for distinct TMM register operands
	If any pair of operands in AMX instructions with 3 TMM register operands
	are the same, the instruction will UD.  Don't call register_number to
	check for distinct TMM register operands since all TMM register operands
	have the same size.

		* config/tc-i386.c (check_VecOperands): Remove register_number
		call when checking for distinct TMM register operands.

2021-07-28  H.J. Lu  <hjl.tools@gmail.com>

	ld: Run tmpdir/pr28138 only for native build
		* PR ld/28138
		* testsuite/ld-plugin/lto.exp: Run tmpdir/pr28138 only for
		native build.

2021-07-28  H.J. Lu  <hjl.tools@gmail.com>

	bfd: Close the file descriptor if there is no archive fd
	Close the file descriptor if there is no archive plugin file descriptor
	to avoid running out of file descriptors on thin archives with many
	archive members.

	bfd/

		PR ld/28138
		* plugin.c (bfd_plugin_close_file_descriptor): Close the file
		descriptor there is no archive plugin file descriptor.

	ld/

		PR ld/28138
		* testsuite/ld-plugin/lto.exp: Run ld/28138 tests.
		* testsuite/ld-plugin/pr28138.c: New file.
		* testsuite/ld-plugin/pr28138-1.c: Likewise.
		* testsuite/ld-plugin/pr28138-2.c: Likewise.
		* testsuite/ld-plugin/pr28138-3.c: Likewise.
		* testsuite/ld-plugin/pr28138-4.c: Likewise.
		* testsuite/ld-plugin/pr28138-5.c: Likewise.
		* testsuite/ld-plugin/pr28138-6.c: Likewise.
		* testsuite/ld-plugin/pr28138-7.c: Likewise.

2021-07-28  H.J. Lu  <hjl.tools@gmail.com>

	ld: Report error reason when a library cannot be found
	With "ulimit -n 20", report:

	ld: cannot find -lgcc: Too many open files

	instead of

	ld: cannot find -lgcc

		* ldfile.c (ldfile_open_file): Rport error reason when a library
		cannot be found.

2021-07-28  Sergei Trofimovich  <siarheit@google.com>

	texi2pod.pl: add no-op --no-split option support [PR28144]
	Change 2faf902da ("generate single html manual page by default")
	added use of --no-split option to makeinfo. binutils reuses
	makeinfo options for texi2pod.pl wrapper. Unsupported option
	led to silent manpage truncation.

	The change adds no-op option support.

	etc/

		* texi2pod.pl: Handle no-op --no-split option.

2021-07-28  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: fix missing space in some info variables output
	Fixes PR gdb/28121.  When a user declares an array like this:

	  int * const foo_1[3];

	And in GDB the user does this:

	  (gdb) info variables foo
	  All variables matching regular expression "foo":

	  File test.c:
	  1:	int * constfoo_1[3];

	Notice the missing space between 'const' and 'foo_1'.  This is fixed
	in c_type_print_varspec_prefix (c-typeprint.c) by passing through the
	flag that indicates if a trailing space is needed, rather than hard
	coding the flag to false as we currently do.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28121

2021-07-28  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Fix unhandled dwarf expression opcode with gcc-11 -gdwarf-5
	[ I've confused things by forgetting to add -gdwarf-4 in $subject of
	commit 0057a7ee0d9 "[gdb/testsuite] Add KFAILs for gdb.ada FAILs with
	gcc-11".  So I'm adding here -gdwarf-5 in $subject, even though -gdwarf-5 is
	the default for gcc-11.  I keep getting confused because of working with a
	system gcc-11 compiler that was patched to switch the default back to
	-gdwarf-4. ]

	When running test-case gdb.ada/arrayptr.exp with gcc-11 (and default
	-gdwarf-5), I run into:
	...
	(gdb) print pa_ptr.all^M
	Unhandled dwarf expression opcode 0xff^M
	(gdb) FAIL: gdb.ada/arrayptr.exp: scenario=all: print pa_ptr.all
	...

	What happens is that pa_ptr:
	...
	 <2><1523>: Abbrev Number: 3 (DW_TAG_variable)
	    <1524>   DW_AT_name        : pa_ptr
	    <1529>   DW_AT_type        : <0x14fa>
	...
	has type:
	...
	 <2><14fa>: Abbrev Number: 2 (DW_TAG_typedef)
	    <14fb>   DW_AT_name        : foo__packed_array_ptr
	    <1500>   DW_AT_type        : <0x1504>
	 <2><1504>: Abbrev Number: 4 (DW_TAG_pointer_type)
	    <1505>   DW_AT_byte_size   : 8
	    <1505>   DW_AT_type        : <0x1509>
	...
	which is a pointer to a subrange:
	...
	 <2><1509>: Abbrev Number: 12 (DW_TAG_subrange_type)
	    <150a>   DW_AT_lower_bound : 0
	    <150b>   DW_AT_upper_bound : 0x3fffffffffffffffff
	    <151b>   DW_AT_name        : foo__packed_array
	    <151f>   DW_AT_type        : <0x15cc>
	    <1523>   DW_AT_artificial  : 1
	 <1><15cc>: Abbrev Number: 5 (DW_TAG_base_type)
	    <15cd>   DW_AT_byte_size   : 16
	    <15ce>   DW_AT_encoding    : 7      (unsigned)
	    <15cf>   DW_AT_name        : long_long_long_unsigned
	    <15d3>   DW_AT_artificial  : 1
	...
	with upper bound of form DW_FORM_data16.

	In gdb/dwarf/attribute.h we have:
	...
	  /* Return non-zero if ATTR's value falls in the 'constant' class, or
	     zero otherwise.  When this function returns true, you can apply
	     the constant_value method to it.
	     ...
	     DW_FORM_data16 is not considered as constant_value cannot handle
	     that.  */
	  bool form_is_constant () const;
	...
	so instead we have attribute::form_is_block (DW_FORM_data16) == true.

	Then in attr_to_dynamic_prop for the upper bound, we get a PROC_LOCEXPR
	instead of a PROP_CONST and end up trying to evaluate the constant
	0x3fffffffffffffffff as if it were a locexpr, which causes the
	"Unhandled dwarf expression opcode 0xff".

	In contrast, with -gdwarf-4 we have:
	...
	    <164c>   DW_AT_upper_bound : 18 byte block: \
	      9e 10 ff ff ff ff ff ff ff ff 3f 0 0 0 0 0 0 0 \
	      (DW_OP_implicit_value 16 byte block: \
	        ff ff ff ff ff ff ff ff 3f 0 0 0 0 0 0 0 )
	...

	Fix the dwarf error by translating the DW_FORM_data16 constant into a
	PROC_LOCEXPR, effectively by prepending 0x9e 0x10, such that we have same
	result as with -gdwarf-4:
	...
	(gdb) print pa_ptr.all^M
	That operation is not available on integers of more than 8 bytes.^M
	(gdb) KFAIL: gdb.ada/arrayptr.exp: scenario=all: print pa_ptr.all \
	  (PRMS: gdb/20991)
	...

	Tested on x86_64-linux, with gcc-11 and target board
	unix/gdb:debug_flags=-gdwarf-5.

	gdb/ChangeLog:

	2021-07-25  Tom de Vries  <tdevries@suse.de>

		* dwarf2/read.c (attr_to_dynamic_prop): Handle DW_FORM_data16.

2021-07-28  will schmidt  <will_schmidt@vnet.ibm.com>

	Externalize the _bfd_set_gp_value function
	This change adds an external-visible wrapper for the _bfd_set_gp_value
	function.  This is a prerequisite for some gdb patches that better
	handle powerpc64le relocations against ".TOC.".

		* bfd.c (bfd_set_gp_value): New externally visible wrapper
		for _bfd_set_gp_value.
		* bfd-in2.h: Regenerate.

2021-07-28  Alan Modra  <amodra@gmail.com>

	PowerPC: ignore sticky options for .machine
	PowerPC gas and objdump for a long time have allowed certain -m/-M
	options that extend a base cpu with extra functional units to be
	specified before the base cpu.  For example, "-maltivec -mpower4" is
	the same as "-mpower4 -maltivec".  See
	https://sourceware.org/pipermail/binutils/2008-January/054935.html

	It doesn't make as much sense that .machine keep any of these
	"sticky" flags when handling a new base cpu.  See gcc PR101393.  I
	think that instead .machine ought to override the command line.
	That's what this patch does.  It is still possible to extend cpu
	functionality with .machine.  For example the following can be
	assembled when selecting a basic -mppc on the command line:
		.machine power5
		.machine altivec
		frin 1,2
		lvsr 3,4,5
	Here, ".machine altivec" extends the ".machine power5" so that both
	the power5 "frin" instruction and the altivec "lvsr" instruction are
	enabled.  Swapping the two ".machine" directives would result in
	failure to assemble "lvsr".

	This change will expose some assembly errors, such as the one in
	glibc/sysdeps/powerpc/powerpc64/tst-ucontext-ppc64-vscr.c, a file
	compiled with -maltivec but containing
	  asm volatile (".machine push;\n"
			".machine \"power5\";\n"
			"vspltisb %0,0;\n"
			"vspltisb %1,-1;\n"
			"vpkuwus %0,%0,%1;\n"
			"mfvscr %0;\n"
			"stvx %0,0,%2;\n"
			".machine pop;"
			: "=v" (v0), "=v" (v1)
			: "r" (vscr_ptr)
			: "memory");
	It's just wrong to choose power5 for a bunch of altivec instructions
	and in fact all of those .machine directives are unnecessary.

		* config/tc-ppc.c (ppc_machine): Don't use command line
		sticky options.

2021-07-28  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-27  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add xfail for PR gcc/101643
	With gcc 8.5.0 I run into:
	...
	(gdb) print bad^M
	$2 = (0 => 0 <repeats 25 times>)^M
	(gdb) FAIL: gdb.ada/big_packed_array.exp: scenario=minimal: print bad
	...
	while with gcc 9.3.1 we have instead:
	...
	(gdb) print bad^M
	$2 = (false <repeats 196 times>)^M
	(gdb) PASS: gdb.ada/big_packed_array.exp: scenario=minimal: print bad
	...

	This is caused by gcc PR, which I've filed at
	https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101643 "[debug, ada] packed array
	not described as packed".

	Fix by marking this as XFAIL.

	Tested on x86_64-linux.

	gdb/ChangeLog:

	2021-07-27  Tom de Vries  <tdevries@suse.de>

		PR testsuite/26904
		* gdb/testsuite/gdb.ada/big_packed_array.exp: Add xfail.

2021-07-27  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add xfail for PR gcc/101633
	With gcc 7.5.0, I run into:
	...
	(gdb) print objects^M
	$1 = ((tag => object, values => ()), (tag => unused))^M
	(gdb) FAIL: gdb.ada/array_of_variant.exp: scenario=minimal: print entire array
	...
	while with gcc 8.5.0 we have:
	...
	(gdb) print objects^M
	$1 = ((tag => object, values => (2, 2, 2, 2, 2)), (tag => unused))^M
	(gdb) PASS: gdb.ada/array_of_variant.exp: scenario=minimal: print entire array
	...

	This is due to a gcc PR, which I've filed at
	https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101633 "Bug 101633 - [debug]
	DW_TAG_subrange_type missing DW_AT_upper_bound".

	Fix by marking this and related FAILs as XFAIL.

	Tested on x86_64-linux.

	gdb/ChangeLog:

	2021-07-27  Tom de Vries  <tdevries@suse.de>

		PR testsuite/26903
		* gdb/testsuite/gdb.ada/array_of_variant.exp: Add xfails.

2021-07-27  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: remove VALUE_FRAME_ID and fix another frame debug issue
	This commit was originally part of this patch series:

	  (v1): https://sourceware.org/pipermail/gdb-patches/2021-May/179357.html
	  (v2): https://sourceware.org/pipermail/gdb-patches/2021-June/180208.html
	  (v3): https://sourceware.org/pipermail/gdb-patches/2021-July/181028.html

	However, that series is being held up in review, so I wanted to break
	out some of the non-related fixes in order to get these merged.

	This commit addresses two semi-related issues, both of which are
	problems exposed by using 'set debug frame on'.

	The first issue is in frame.c in get_prev_frame_always_1, and was
	introduced by this commit:

	  commit a05a883fbaba69d0f80806e46a9457727fcbe74c
	  Date:   Tue Jun 29 12:03:50 2021 -0400

	      gdb: introduce frame_debug_printf

	This commit replaced fprint_frame with frame_info::to_string.
	However, the former could handle taking a nullptr while the later, a
	member function, obviously requires a non-nullptr in order to make the
	function call.  In one place we are not-guaranteed to have a
	non-nullptr, and so, there is the possibility of triggering undefined
	behaviour.

	The second issue addressed in this commit has existed for a while in
	GDB, and would cause this assertion:

	  gdb/frame.c:622: internal-error: frame_id get_frame_id(frame_info*): Assertion `fi->this_id.p != frame_id_status::COMPUTING' failed.

	We attempt to get the frame_id for a frame while we are computing the
	frame_id for that same frame.

	What happens is that when GDB stops we create a frame_info object for
	the sentinel frame (frame #-1) and then we attempt to unwind this
	frame to create a frame_info object for frame #0.

	In the test case used here to expose the issue we have created a
	Python frame unwinder.  In the Python unwinder we attemt to read the
	program counter register.

	Reading this register will initially create a lazy register value.
	The frame-id stored in the lazy register value will be for the
	sentinel frame (lazy register values hold the frame-id for the frame
	from which the register will be unwound).

	However, the Python unwinder does actually want to examine the value
	of the program counter, and so the lazy register value is resolved
	into a non-lazy value.  This sends GDB into value_fetch_lazy_register
	in value.c.

	Now, inside this function, if 'set debug frame on' is in effect, then
	we want to print something like:

	  frame=%d, regnum=%d(%s), ....

	Where 'frame=%d' will be the relative frame level of the frame for
	which the register is being fetched, so, in this case we would expect
	to see 'frame=0', i.e. we are reading a register as it would be in
	frame #0.  But, remember, the lazy register value actually holds the
	frame-id for frame #-1 (the sentinel frame).

	So, to get the frame_info for frame #0 we used to call:

	  frame = frame_find_by_id (VALUE_FRAME_ID (val));

	Where VALUE_FRAME_ID is:

	  #define VALUE_FRAME_ID(val) (get_prev_frame_id_by_id (VALUE_NEXT_FRAME_ID (val)))

	That is, we start with the frame-id for the next frame as obtained by
	VALUE_NEXT_FRAME_ID, then call get_prev_frame_id_by_id to get the
	frame-id of the previous frame.

	The get_prev_frame_id_by_id function finds the frame_info for the
	given frame-id (in this case frame #-1), calls get_prev_frame to get
	the previous frame, and then calls get_frame_id.

	The problem here is that calling get_frame_id requires that we know
	the frame unwinder, so then have to try each frame unwinder in turn,
	which would include the Python unwinder.... which is where we started,
	and thus we have a loop!

	To prevent this loop GDB has an assertion in place, which is what
	actually triggers.

	Solving the assertion failure is pretty easy, if we consider the code
	in value_fetch_lazy_register and get_prev_frame_id_by_id then what we
	do is:

	  1. Start with a frame_id taken from a value,
	  2. Lookup the corresponding frame,
	  3. Find the previous frame,
	  4. Get the frame_id for that frame, and
	  5. Lookup the corresponding frame
	  6. Print the frame's level

	Notice that steps 3 and 5 give us the exact same result, step 4 is
	just wasted effort.  We could shorten this process such that we drop
	steps 4 and 5, thus:

	  1. Start with a frame_id taken from a value,
	  2. Lookup the corresponding frame,
	  3. Find the previous frame,
	  6. Print the frame's level

	This will give the exact same frame as a result, and this is what I
	have done in this patch by removing the use of VALUE_FRAME_ID from
	value_fetch_lazy_register.

	Out of curiosity I looked to see how widely VALUE_FRAME_ID was used,
	and saw it was only used in one other place in valops.c:value_assign,
	where, once again, we take the result of VALUE_FRAME_ID and pass it to
	frame_find_by_id, thus introducing a redundant frame_id lookup.

	I don't think the value_assign case risks triggering the assertion
	though, as we are unlikely to call value_assign while computing the
	frame_id for a frame, however, we could make value_assign slightly
	more efficient, with no real additional complexity, by removing the
	use of VALUE_FRAME_ID.

	So, in this commit, I completely remove VALUE_FRAME_ID, and replace it
	with a use of VALUE_NEXT_FRAME_ID, followed by a direct call to
	get_prev_frame_always, this should make no difference in either case,
	and resolves the assertion issue from value.c.

	As I said, this patch was originally part of another series, the
	original test relied on the fixes in that original series.  However, I
	was able to create an alternative test for this issue by enabling
	frame debug within an existing test script.

	This commit probably fixes bug PR gdb/27938, though the bug doesn't
	have a reproducer attached so it is not possible to know for sure.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=27938

2021-07-27  Chenghua Xu  <xuchenghua@loongson.cn>

	Correct gs264e bfd_mach in mips_arch_choices.
	opcodes/
	    * mips-dis.c (mips_arch_choices): Correct gs264e bfd_mach.

2021-07-27  Roland McGrath  <mcgrathr@google.com>

	Fix ld test case that assumes --enable-textrel-check
	ld/
		* testsuite/ld-x86-64/x86-64.exp (Build textrel-1): Use --warn-textrel.

2021-07-27  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-27  H.J. Lu  <hjl.tools@gmail.com>

	bfd: Set error to bfd_error_malformed_archive only if unset
	When reading an archive member, set error to bfd_error_malformed_archive
	on open_nested_file failure only if the error is unset.

		PR ld/28138
		* archive.c (_bfd_get_elt_at_filepos): Don't set error to
		bfd_error_malformed_archive if it has been set.

2021-07-26  Carl Love  <cel@us.ibm.com>

	Fix for mi-reverse.exp
	This test fails on PPC64 because PPC64 prints the value of 3.5 with
	more significant digits than on Intel. The patch updates the regular
	expression to allow for more significant digits on the constant.

	gdb/testsuite/ChangeLog

		* gdb.mi/mi-reverse.exp: mi_execute_to exec-step reverse add check
		for additional digits.

2021-07-26  Tom Tromey  <tromey@adacore.com>

	Fix the Windows build
	The gdb build was broken on Windows after the patch to change
	get_inferior_cwd.  This patch fixes the build.

2021-07-26  Shahab Vahedi  <shahab@synopsys.com>

	gdb: Fix numerical field extraction for target description "flags"
	The "val_print_type_code_flags ()" function is responsible for
	extraction of fields for "flags" data type.  These data types are
	used when describing a custom register type in a target description
	XML.  The logic used for the extraction though is not sound:

	    unsigned field_len = TYPE_FIELD_BITSIZE (type, field);
	    ULONGEST field_val
	      = val >> (TYPE_FIELD_BITPOS (type, field) - field_len + 1);

	TYPE_FIELD_BITSIZE: The bit length of the field to be extracted.
	TYPE_FIELD_BITPOS:  The starting position of the field; 0 is LSB.
	val:                The register value.

	Imagine you have a field that starts at position 1 and its length
	is 4 bits.  According to the third line of the code snippet the
	shifting right would become "val >> -2", or "val >> 0xfff...fe"
	to be precise.  That will result in a "field_val" of 0.

	The correct extraction should be:

	    ULONGEST field_val = val >> TYPE_FIELD_BITPOS (type, field);

	The rest of the algorithm that masks out the higher bits is OK.

	Co-Authored-By: Simon Marchi <simon.marchi@efficios.com>

2021-07-26  Andrea Corallo  <andrea.corallo@arm.com>

	PATCH [10/10] arm: Alias 'ra_auth_code' to r12 for pacbti.
	gas/
	2021-06-11  Andrea Corallo  <andrea.corallo@arm.com>

		* config/tc-arm.c (reg_names): Alias 'ra_auth_code' to r12.

2021-07-26  Andrea Corallo  <andrea.corallo@arm.com>

	PATCH [9/10] arm: add 'pacg' instruction for Armv8.1-M pacbti extension
	gas/
	2021-06-11  Andrea Corallo  <andrea.corallo@arm.com>

		* config/tc-arm.c (T16_32_TAB): Add '_pacg'.
		(do_t_pacbti_pacg): New function.
		(insns): Define 'pacg' insn.
		* testsuite/gas/arm/armv8_1-m-pacbti.d: Add 'pacg' test.
		* testsuite/gas/arm/armv8_1-m-pacbti.s: Likewise.

	opcodes/
	2021-06-11  Andrea Corallo  <andrea.corallo@arm.com>

		* arm-dis.c (thumb32_opcodes): Add 'pacg'.

2021-07-26  Andrea Corallo  <andrea.corallo@arm.com>

	PATCH [8/10] arm: add 'autg' instruction for Armv8.1-M pacbti extension
	gas/
	2021-06-11  Andrea Corallo  <andrea.corallo@arm.com>

		* config/tc-arm.c (T16_32_TAB): Add '_autg'.
		(insns): Define 'autg' insn.
		* testsuite/gas/arm/armv8_1-m-pacbti.d: Add autg test.
		* testsuite/gas/arm/armv8_1-m-pacbti.s: Likewise.

	opcodes/
	2021-06-11  Andrea Corallo  <andrea.corallo@arm.com>

		* arm-dis.c (thumb32_opcodes): Add 'autg'.

2021-07-26  Andrea Corallo  <andrea.corallo@arm.com>

	PATCH [7/10] arm: add 'bxaut' instruction for Armv8.1-M pacbti extension
	gas/
	2021-06-11  Andrea Corallo  <andrea.corallo@arm.com>

		* config/tc-arm.c (T16_32_TAB): Add '_bxaut'.
		(do_t_pacbti_nonop): New function.
		(insns): Define 'bxaut' insn.
		* testsuite/gas/arm/armv8_1-m-pacbti.d: Add 'bxaut' test.
		* testsuite/gas/arm/armv8_1-m-pacbti.s: Likewise.

	opcodes/
	2021-06-11  Andrea Corallo  <andrea.corallo@arm.com>

		* arm-dis.c (thumb32_opcodes): Add 'bxaut'.

2021-07-26  Andrea Corallo  <andrea.corallo@arm.com>

	PATCH [6/10] arm: Add -march=armv8.1-m.main+pacbti flag
	gas/
	2021-06-11  Andrea Corallo  <andrea.corallo@arm.com>

		* config/tc-arm.c (pacbti_ext): Define.
		(BAD_PACBTI): New macro.
		(armv8_1m_main_ext_table): Add 'pacbti' extension.

	include/
	2021-06-11  Andrea Corallo  <andrea.corallo@arm.com>

		* opcode/arm.h (ARM_EXT3_PACBTI, ARM_AEXT3_V8_1M_MAIN_PACBTI): New
		macro.

2021-07-26  Andrea Corallo  <andrea.corallo@arm.com>

	PATCH [5/10] arm: Extend again arm_feature_set struct to provide more bits
	include/
	2021-06-11  Andrea Corallo  <andrea.corallo@arm.com>

		* opcode/arm.h (arm_feature_set): Extend 'core' field.
		(ARM_CPU_HAS_FEATURE, ARM_FSET_CPU_SUBSET, ARM_CPU_IS_ANY)
		(ARM_MERGE_FEATURE_SETS, ARM_CLEAR_FEATURE, ARM_FEATURE_EQUAL)
		(ARM_FEATURE_ZERO, ARM_FEATURE_CORE_EQUAL): Account for
		'core[2]'.
		(ARM_FEATURE_CORE_HIGH_HIGH): New macro.

2021-07-26  Andrea Corallo  <andrea.corallo@arm.com>

	PATCH [4/10] arm: add 'pac' instruction for Armv8.1-M pacbti extension
	gas/
	2021-06-11  Andrea Corallo  <andrea.corallo@arm.com>

		* config/tc-arm.c (T16_32_TAB): Add '_pac'.
		(insns): Add 'pac' insn.
		* testsuite/gas/arm/armv8_1-m-pacbti-bad.l: Add pac tests.
		* testsuite/gas/arm/armv8_1-m-pacbti-bad.s: Likewise.
		* testsuite/gas/arm/armv8_1-m-pacbti.d: Likewise.
		* testsuite/gas/arm/armv8_1-m-pacbti.s: Likewise.

	opcodes/
	2021-06-11  Andrea Corallo  <andrea.corallo@arm.com>

		* arm-dis.c (thumb32_opcodes): Add 'pac'.

2021-07-26  Andrea Corallo  <andrea.corallo@arm.com>

	PATCH [3/10] arm: add 'aut' instruction for Armv8.1-M pacbti extension
	gas/
	2021-06-11  Andrea Corallo  <andrea.corallo@arm.com>

		* config/tc-arm.c (insns): Add 'aut.'
		(T16_32_TAB): Add '_aut'.
		* testsuite/gas/arm/armv8_1-m-pacbti-bad.l: Add 'aut' tests.
		* testsuite/gas/arm/armv8_1-m-pacbti-bad.s: Likewise.
		* testsuite/gas/arm/armv8_1-m-pacbti.d: Likewise.
		* testsuite/gas/arm/armv8_1-m-pacbti.s: Likewise.

	opcodes/
	2021-06-11  Andrea Corallo  <andrea.corallo@arm.com>

		* arm-dis.c (thumb32_opcodes): Add 'aut'.

2021-07-26  Andrea Corallo  <andrea.corallo@arm.com>

	PATCH [2/10] arm: add 'pacbti' instruction for Armv8.1-M pacbti extension
	gas/
	2021-06-11  Andrea Corallo  <andrea.corallo@arm.com>

		* config/tc-arm.c
		(enum operand_parse_code): Add OP_SP and OP_R12.
		(parse_operands): Add switch cases for OP_SP and OP_R12.
		(T16_32_TAB): Add '_pacbti'.
		(do_t_pacbti): New function.
		(insns): Add 'pacbti'.
		* testsuite/gas/arm/armv8_1-m-pacbti-bad.d: New file.
		* testsuite/gas/arm/armv8_1-m-pacbti-bad.l: Likewise.
		* testsuite/gas/arm/armv8_1-m-pacbti-bad.s: Likewise.
		* testsuite/gas/arm/armv8_1-m-pacbti.d: Add 'pacbti' to testcase.
		* testsuite/gas/arm/armv8_1-m-pacbti.s: Likewise.

	opcodes/
	2021-06-11  Andrea Corallo  <andrea.corallo@arm.com>

		* arm-dis.c (thumb32_opcodes): Add 'pacbti' instruction.

2021-07-26  Andrea Corallo  <andrea.corallo@arm.com>

	PATCH [1/10] arm: add 'bti' instruction for Armv8.1-M pacbti extension
	gas/
	2021-06-11  Andrea Corallo  <andrea.corallo@arm.com>

		* config/tc-arm.c (insns): Add 'bti' insn.
		* testsuite/gas/arm/armv8_1-m-pacbti.d: New file.
		* testsuite/gas/arm/armv8_1-m-pacbti.s: Likewise.

	opcodes/
	2021-06-11  Andrea Corallo  <andrea.corallo@arm.com>

		* arm-dis.c (thumb32_opcodes): Add bti instruction.

2021-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb: move remaining ChangeLogs to legacy files
	In commit:

	  commit f069ea46a03ae868581d1c852da28e979ea1245a
	  Date:   Sat Jul 3 16:29:08 2021 -0700

	      Rename gdb/ChangeLog to gdb/ChangeLog-2021

	The gdb/ChangeLog file was renamed, but all of the other ChangeLog
	files relating to gdb were left in place.

	As I understand things, the no ChangeLogs policy applies to all the
	GDB related directories, so this commit renames all of the remaining
	GDB related ChangeLog files.

	As with the original commit, the intention behind this commit is to
	hopefully stop people merging ChangeLog entries by mistake.

	The renames carried out in this commit are:

	    gdb/doc/ChangeLog -> gdb/doc/ChangeLog-1991-2021
	    gdb/stubs/ChangeLog -> gdb/stubs/ChangeLog-2012-2020
	    gdb/testsuite/ChangeLog -> gdb/testsuite/ChangeLog-2014-2021
	    gdbserver/ChangeLog -> gdbserver/ChangeLog-2002-2021
	    gdbsupport/ChangeLog -> gdbsupport/ChangeLog-2020-2021

2021-07-26  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

	gdb/mi: handle no condition argument case for -break-condition
	As reported in PR gdb/28076 [1], passing no condition argument to the
	-break-condition command (e.g.: "-break-condition 2") should clear the
	condition for breakpoint 2, just like CLI's "condition 2", but instead
	an error message is returned:

	  ^error,msg="-break-condition: Missing the <number> and/or <expr> argument"

	The current implementation of the -break-condition command's argument
	handling (79aabb7308c "gdb/mi: add a '--force' flag to the
	'-break-condition' command") was done according to the documentation,
	where the condition argument seemed mandatory.  However, the
	-break-condition command originally (i.e. before the 79aabb7308c
	patch) used the CLI's "cond" command, and back then not passing a
	condition argument was clearing out the condition.  So, this is a
	regression in terms of the behavior.

	Fix the argument handling of the -break-condition command to allow not
	having a condition argument, and also update the document to make the
	behavior clear.  Also add test cases to test the scenarios which were
	previously not covered.

	[1] https://sourceware.org/bugzilla/show_bug.cgi?id=28076

2021-07-26  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-25  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-24  Alan Modra  <amodra@gmail.com>

	Revert: PowerPC: Don't generate unused section symbols
	Blindly following x86 broke linux kernel builds.

	bfd/
		* elf32-ppc.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define as true.
		* elf64-ppc.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Likewise.
	gas/
		* testsuite/gas/ppc/power4.d: Adjust for section sym change.
		* testsuite/gas/ppc/test1elf32.d: Likewise.
		* testsuite/gas/ppc/test1elf64.d: Likewise.
	ld/
		* testsuite/ld-powerpc/tlsexe.r: Adjust for section sym change.
		* testsuite/ld-powerpc/tlsexe32.r: Likewise.
		* testsuite/ld-powerpc/tlsexe32no.r: Likewise.
		* testsuite/ld-powerpc/tlsexeno.r: Likewise.
		* testsuite/ld-powerpc/tlsexenors.r: Likewise.
		* testsuite/ld-powerpc/tlsexers.r: Likewise.
		* testsuite/ld-powerpc/tlsexetoc.r: Likewise.
		* testsuite/ld-powerpc/tlsexetocrs.r: Likewise.
		* testsuite/ld-powerpc/tlsget.d: Likewise.
		* testsuite/ld-powerpc/tlsget.wf: Likewise.
		* testsuite/ld-powerpc/tlsget2.d: Likewise.
		* testsuite/ld-powerpc/tlsget2.wf: Likewise.
		* testsuite/ld-powerpc/tlsso.r: Likewise.
		* testsuite/ld-powerpc/tlsso32.r: Likewise.
		* testsuite/ld-powerpc/tlstocso.r: Likewise.

2021-07-24  Alan Modra  <amodra@gmail.com>

	Re: ld script expression parsing
	Commit 40726f16a8d7 broke references to sections within ADDR(), and
	overlays with weird section names.

		* ldgram.y (paren_script_name): New rule.
		(exp): Use it for ALIGNOF, SIZEOF, ADDR, and LOADADDR.  Similarly
		ensure script mode parsing for section name in SEGMENT_START.
		(overlay_section): Delete unnecessary ldlex_script call.  Backup
		on a lookahead NAME parsed in expression mode.
		* testsuite/ld-elf/overlay.s: Add more sections.
		* testsuite/ld-elf/overlay.t: Test '-' in section names.

2021-07-24  Frederic Cambus  <fred@statdns.com>

	Update the NetBSD system call table to match NetBSD-current.
	Generated from sys/sys/syscall.h revision 1.319.

	We can safely remove the _lwp_gettid syscall, which was never exposed
	in libc and never made it into a release.

	gdb/ChangeLog:

	2021-07-23  Frederic Cambus  <fred@statdns.com>

		* syscalls/netbsd.xml: Regenerate.

2021-07-24  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-23  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: test get/set value of unregistered Guile parameter
	When creating a parameter in Guile, you have to create it using
	make-parameter and then register it with GDB with register-parameter!.
	In between, it's still possible (though not documented) to set the
	parameter's value.  I broke this use case by mistake while writing this
	series, so thought it would be good to have a test for it.

	I suppose that people could use this "feature" to give their parameter
	an initial value, even though make-parameter has an initial-value
	parameter for this.  Nevertheless, changing this behavior could break
	some scripts, which is why I think it's important for it to be tested.

	Change-Id: I5b2103e3cec0cfdcccf7ffb00eb05fed8626e66d

2021-07-23  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove cmd_list_element::function::sfunc
	I don't understand what the sfunc function type in
	cmd_list_element::function is for.  Compared to cmd_simple_func_ftype,
	it has an extra cmd_list_element parameter, giving the callback access
	to the cmd_list_element for the command being invoked.  This allows
	registering the same callback with many commands, and alter the behavior
	using the cmd_list_element's context.

	From the comment in cmd_list_element, it sounds like at some point it
	was the callback function type for set and show functions, hence the
	"s".  But nowadays, it's used for many more commands that need to access
	the cmd_list_element object (see add_catch_command for example).

	I don't really see the point of having sfunc at all, since do_sfunc is
	just a trivial shim that changes the order of the arguments.  All
	commands using sfunc could just as well set cmd_list_element::func to
	their callback directly.

	Therefore, remove the sfunc field in cmd_list_element and everything
	that goes with it.  Rename cmd_const_sfunc_ftype to cmd_func_ftype and
	use it for cmd_list_element::func, as well as for the add_setshow
	commands.

	Change-Id: I1eb96326c9b511c293c76996cea0ebc51c70fac0

2021-07-23  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: rename cfunc to simple_func
	After browsing the CLI code for quite a while and trying really hard, I
	reached the conclusion that I can't give a meaningful explanation of
	what "sfunc" and "cfunc" functions are, in cmd_list_element.  I don't
	see a logic at all.  That makes it very difficult to do any kind of
	change.  Unless somebody can make sense out of all that, I'd like to try
	to retro-fit some logic in the cmd_list_element callback function code
	so that we can understand what is going on, do some cleanups and add new
	features.

	The first change is about "cfunc".  I can't figure out what the "c" in
	cfunc means.  It's not const, because there's already "const" in
	"cmd_const_cfunc_ftype", and the previous "cmd_cfunc_ftype" had nothing
	const..  It's not "cmd" or "command", because there's already "cmd" in
	"cmd_const_cfunc_ftype".

	The "main" command callback, cmd_list_element::func, has three
	parameters, whereas cfunc has two.  It is missing the cmd_list_element
	parameter.  So the only reason I see for cfunc to exist is to be a shim
	between the three and two parameter versions.  Most commands don't need
	to receive the cmd_list_element object, so adding it everywhere would be
	long and would just add more unnecessary boilerplate.  So since this is
	the "simple" version of the callback, compared to the "full", I suggest
	renaming cmd_const_cfunc_ftype into cmd_simple_func_ftype, as well as
	everything (like the utility functions) that goes with it.

	Change-Id: I4e46cacfd77a66bc1cbf683f6a362072504b7868

2021-07-23  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: make inferior::m_terminal an std::string
	Same idea as the previous patch, but for m_terminal.

	Change-Id: If9367d5db8c976a4336680adca4ea5bc31ab64d2

2021-07-23  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: make inferior::m_cwd an std::string
	Same idea as the previous patch, but for m_cwd.

	To keep things consistent across the board, change get_inferior_cwd as
	well, which is shared with GDBserver.  So update the related GDBserver
	code too.

	Change-Id: Ia2c047fda738d45f3d18bc999eb67ceb8400ce4e

2021-07-23  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: make inferior::m_args an std::string
	With the current code, both a NULL pointer and an empty string can mean
	"no arguments".  We don't need this distinction.  Changing to a string
	has the advantage that there is now a single state for that (an empty
	string), which makes the code a bit simpler in my opinion.

	Change-Id: Icdc622820f7869478791dbaa84b4a1c7fec21ced

2021-07-23  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: add setter/getter for inferior cwd
	Add cwd/set_cwd to the inferior class, remove set_inferior_args.
	Keep get_inferior_args, because it is used from fork_inferior, in shared
	code.  The cwd could eventually be passed as a parameter eventually,
	though, I think that would be cleaner.

	Change-Id: Ifb72ea865d7e6f9a491308f0d5c1595579d8427e

2021-07-23  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: add setter/getter for inferior arguments
	Add args/set_args to the inferior class, remove the set_inferior_args
	and get_inferior_args functions, that would just be wrappers around
	them.

	Change-Id: If87d52f3402ce08be26c32897ae8915d9f6d1ea3

2021-07-23  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: remove inferior::{argc,argv}
	There are currently two states that the inferior args can be stored.
	The main one is the `args` field, where they are stored as a single
	string.  The other one is the `argc`/`argv` fields.

	This last one is only used for arguments passed in GDB's
	command line.  And the only outcome is that when get_inferior_args is
	called, `argc`/`argv` are serialized into `args`.  So really,
	`argc`/`argv` is just a staging area before moving the arguments in
	`args`.

	Simplify this by only keeping the `args` field.  Change
	set_inferior_args_vector to immediately serialize the arguments into
	`args`, work that would be done in get_inferior_args later anyway.

	The only time where this work would be "wasted" is when the user passes
	some arguments on the command line, but does not end up running the
	program.  But that just seems unlikely.  And it's not that much work.

	Change-Id: Ica0b9859397c095f6530350c8fb3c36905f2044a

2021-07-23  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: un-share set_inferior_cwd declaration
	The declaration of set_inferior_cwd is currently shared between gdb and
	gdbserver, in gdbsupport/common-inferior.h.  It doesn't need to be, as
	set_inferior_cwd is not called from common code.  Only get_inferior_cwd
	needs to.

	The motivation for this is that a future patch will change the prototype
	of set_inferior_cwd in gdb, and I don't want to change it for gdbserver
	unnecessarily.  I see this as a good cleanup in any case, to reduce to
	just the essential what is shared between GDB and GDBserver.

	Change-Id: I3127d27d078f0503ebf5ccc6fddf14f212426a73

2021-07-23  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb.base/setshow.exp: fix duplicate test name
	Fix:

	    DUPLICATE: gdb.base/setshow.exp: test_setshow_args: show args

	by giving some explicit test names.

	Change-Id: I2a738d3d3675ab9b45929e71f5aee0ea6bf92072

2021-07-23  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb.base/setshow.exp: split in procs
	Split in multiple procs, one per topic, and start with a fresh GDB in
	each.  I find it easier to work on a test with multiple smaller
	independent test procedures.  For example, it's possible to comment all
	but one when working on one.  It's also easier to add things without
	having to think about the impact on existing tests, and vice-versa.

	Change-Id: I19691eed8f9bcb975b2eeff7577cac66251bcbe2

2021-07-23  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb.base/setshow.exp: use save_vars to save/restore gdb_prompt
	Using save_vars is a bit better than what we have now, as it ensures the
	variable gets restored if the code within it throws an error.

	Change-Id: I3bd6836e5b7efb61b078acadff1a1c8182c19a27

2021-07-23  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: split gdb.python/py-parameter.exp in procs
	Split the file into multiple independent test procs, where each proc
	starts with a fresh GDB.  I find it easier to understand what a test is
	doing when each part of the test is isolated and self-contained.  It
	makes it easier to comment out some parts of the test while working /
	debugging a specific part.  It also makes it easier to add new things
	(which a subsequent patch will do) without fear of impacting another part
	of the test.

	Change-Id: I8b4d52ac82b1492d79b679e13914ed177d8a836d

2021-07-23  Carl Love  <cel@us.ibm.com>

	Fix for gdb.python/py-breakpoint.exp
	Not all systems have hardware breakpoint support.  Add a check
	to see if the system supports hardware breakpoints.

	gdb/testsuite/ChangeLog

		* gdb.python/py-breakpoint.exp (test_hardware_breakpoints): Add
		check for hardware breakpoint support.

2021-07-23  Andrew Burgess  <andrew.burgess@embecosm.com>

	gdb/testsuite: don't error when trying to unset last_spawn_tty_name
	In spawn_capture_tty_name (lib/gdb.exp) we either set or unset
	last_spawn_tty_name depending on whether spawn_out(slave,name) exists
	or not.

	One situation that might cause spawn_out(slave,name) to not exists is
	if the spawn function is called with the argument -leaveopen, which is
	how it is called when processes are created as part of a pipeline, the
	created process has no tty, instead its output is written to a file
	descriptor.

	If a pipeline is created consisting of multiple processes then there
	will be multiple sequential calls to spawn, all using -leaveopen.  The
	first of these calls is fine, spawn_out(slave,name) is not set, and so
	in spawn_capture_tty_name we unset last_spawn_tty_name.  However, on
	the second call to spawn, spawn_out(slave,name) is still not set and
	so in spawn_capture_tty_name we again try to unset
	last_spawn_tty_name, this now throws an error (as last_spawn_tty_name
	is already unset).

	Fix this issue by using -nocomplain with the call to unset in
	spawn_capture_tty_name.

	Before this commit I was seeing gdb.base/gnu-debugdata.exp report 1
	pass, and 1 unsupported test.  After this commit I now see 16 passes
	from this test script.

	I have also improved the code that used to do this:

	    if { [info exists spawn_out] } {
		set ::last_spawn_tty_name $spawn_out(slave,name)
	    } else {
	        ...
	    }

	The problem here is that we check for the existence of spawn_out, and
	then unconditionally read spawn_out(slave,name).  A situation could
	arise where some other element of spawn_out is set,
	e.g. spawn_out(foo), in which case we would enter the if block and try
	to read a non-existent variable.  After this commit we now check
	specifically for spawn_out(slave,name).

	Finally, it is worth noting that before this issue was fixed runtest
	itself, or rather the expect process behind runtest, would segfault
	while exiting.  I haven't looked at all into what the problem is here
	that caused expect to crash, as fixing the bug in GDB's testing
	scripts made the segfault go away.

2021-07-23  Jan Beulich  <jbeulich@suse.com>

	x86: express unduly set rounding control bits in disassembly
	While EVEX.L'L are indeed ignored when EVEX.b stands for just SAE,
	EVEX.b itself is not ignored when an insn permits neither rounding
	control nor SAE.

	While changing this aspect of EVEX.b handling, also alter unduly set
	embedded broadcast: Don't call BadOp(), screwing up subsequent
	disassembly, but emit "{bad}" instead.

2021-07-23  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-22  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix FAILs due to PR gcc/101575
	When running test-case gdb.ada/formatted_ref.exp with gcc-11 and target board
	unix/gdb:debug_flags=-gdwarf-4 we run into:
	...
	(gdb) print/x s^M
	No definition of "s" in current context.^M
	(gdb) FAIL: gdb.ada/formatted_ref.exp: print/x s
	...
	which is caused by "runto defs.adb:20" taking us to defs__struct1IP:
	...
	(gdb) break defs.adb:20^M
	Breakpoint 1 at 0x402cfd: defs.adb:20. (2 locations)^M
	(gdb) run ^M
	Starting program: formatted_ref ^M
	^M
	Breakpoint 1, defs__struct1IP () at defs.adb:20^M
	20            return s.x;                   -- Set breakpoint marker here.^M
	(gdb) print s1'access^M
	...
	instead of the expected defs.f1:
	...
	(gdb) break defs.adb:20^M
	Breakpoint 1 at 0x402d0e: file defs.adb, line 20.^M
	(gdb) run ^M
	Starting program: formatted_ref ^M
	^M
	Breakpoint 1, defs.f1 (s=...) at defs.adb:20^M
	20            return s.x;                   -- Set breakpoint marker here.^M
	...

	This is caused by incorrect line info due to gcc PR 101575 - "[gcc-11,
	-gdwarf-4] Missing .file <n> directive causes invalid line info".

	Fix this by when landing in defs__struct1IP:
	- xfailing the runto, and
	- issuing a continue to land in defs.f1.

	Likewise in a few other test-cases.

	Tested on x86_64-linux, with:
	- system gcc.
	- gcc-11 and target boards unix/gdb:debug_flags=-gdwarf-4 and
	  unix/gdb:debug_flags=-gdwarf-5.

	gdb/testsuite/ChangeLog:

	2021-07-22  Tom de Vries  <tdevries@suse.de>

		* gdb.ada/formatted_ref.exp: Add xfail for PR gcc/101575.
		* gdb.ada/iwide.exp: Same.
		* gdb.ada/pkd_arr_elem.exp: Same.

2021-07-22  Jan Beulich  <jbeulich@suse.com>

	x86: drop dq{b,d}_mode
	Their sole use is for {,V}EXTRACTPS / {,V}P{EXT,INS}RB respectively; for
	consistency also limit use of dqw_mode to Jdqw. 64-bit disassembly
	reflecting REX.W / VEX.W is not in line with the assembler's opcode
	table having NoRex64 / VexWIG in all respective templates, i.e. assembly
	input isn't being honored there either. Obviously the 0FC5 encodings of
	{,V}PEXTRW then also need adjustment for consistency reasons.

	x86: drop vex_scalar_w_dq_mode
	It has only a single use and can easily be represented by dq_mode
	instead. Plus its handling in intel_operand_size() was duplicating
	that of vex_vsib_{d,q}_w_dq_mode anyway.

	x86: drop xmm_m{b,w,d,q}_mode
	They're effectively redundant with {b,w,d,q}_mode.

	x86: fold duplicate vector register printing code
	The bulk of OP_XMM() can be easily reused also for OP_EX(). Break the
	shared logic out of the function, and invoke the new helper from both
	places.

	x86: drop vex_mode and vex_scalar_mode
	These are fully redundant with, respectively, x_mode and scalar_mode.

	x86: correct EVEX.V' handling outside of 64-bit mode
	Unlike the high bit of VEX.vvvv / EVEX.vvvv, EVEX.V' is not ignored
	outside of 64-bit mode. Oddly enough there already are tests for these
	cases, but their expectations were wrong. (This may have been based on
	an old SDM version, where the restriction wasn't properly spelled out.)

	x86: fold duplicate code in MOVSXD_Fixup()
	There's no need to have two paths printing the "xd" mnemonic suffix.

	x86: fold duplicate register printing code
	What so far was OP_E_register() can be easily reused also for OP_G().
	Add suitable parameters to the function and move the invocation of
	swap_operand() to OP_E(). Adjust MOVSXD's first operand: There never was
	a need to use movsxd_mode there, and its use gets in the way of the code
	folding.

	x86-64: properly bounds-check %bnd<N> in OP_G()
	The restriction to %bnd0-%bnd3 requires to also check REX.R is clear,
	just like OP_E_Register() also includes REX.B in its check.

	x86-64: generalize OP_G()'s EVEX.R' handling
	EVEX.R' is invalid to be clear not only for mask registers, but also for
	GPRs - IOW everything handled in this function.

2021-07-22  Jan Beulich  <jbeulich@suse.com>

	x86: correct VCVT{,U}SI2SD rounding mode handling
	With EVEX.W clear the instruction doesn't ignore the rounding mode, but
	(like for other insns without rounding semantics) EVEX.b set causes #UD.
	Hence the handling of EVEX.W needs to be done when processing
	evex_rounding_64_mode, not at the decode stages.

	Derive a new 64-bit testcase from the 32-bit one to cover the different
	EVEX.W treatment in both cases.

2021-07-22  Jan Beulich  <jbeulich@suse.com>

	x86: drop OP_Mask()
	By moving its vex.r check there it becomes fully redundant with OP_G().

2021-07-22  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-21  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.cp/step-and-next-inline.exp with gcc-11
	When running test-case gdb.cp/step-and-next-inline.exp with gcc-11, I run
	into:
	...
	KPASS: gdb.cp/step-and-next-inline.exp: no_header: next step 1 \
	  (PRMS symtab/25507)
	FAIL: gdb.cp/step-and-next-inline.exp: no_header: next step 2
	KPASS: gdb.cp/step-and-next-inline.exp: no_header: next step 3 \
	  (PRMS symtab/25507)
	...

	[ Note that I get the same result with gcc-11 and target board
	unix/gdb:debug_flags=-gdwarf-4, so this is not a dwarf 4 vs 5 issue. ]

	With gcc-10, I have this trace:
	...
	64        get_alias_set (&xx);
	get_alias_set (t=0x601038 <xx>) at step-and-next-inline.cc:51
	51        if (t != NULL
	40        if (t->x != i)
	52            && TREE_TYPE (t).z != 1
	43        return x;
	53            && TREE_TYPE (t).z != 2
	43        return x;
	54            && TREE_TYPE (t).z != 3)
	43        return x;
	main () at step-and-next-inline.cc:65
	65        return 0;
	...
	and with gcc-11, I have instead:
	...
	64        get_alias_set (&xx);
	get_alias_set (t=0x601038 <xx>) at step-and-next-inline.cc:51
	51        if (t != NULL
	52            && TREE_TYPE (t).z != 1
	43        return x;
	53            && TREE_TYPE (t).z != 2
	43        return x;
	54            && TREE_TYPE (t).z != 3)
	43        return x;
	main () at step-and-next-inline.cc:65
	65        return 0;
	...
	and with clang-10, I have instead:
	...
	64        get_alias_set (&xx);
	get_alias_set (t=0x601034 <xx>) at step-and-next-inline.cc:51
	51        if (t != NULL
	52            && TREE_TYPE (t).z != 1
	53            && TREE_TYPE (t).z != 2
	54            && TREE_TYPE (t).z != 3)
	51        if (t != NULL
	57      }
	main () at step-and-next-inline.cc:65
	65        return 0;
	...

	The test-case tries to verify that we don't step into inlined function
	tree_check (lines 40-43) (so, with the clang trace we get that right).

	The test-case then tries to kfail the problems when using gcc, but this is
	done in such a way that the testing still gets out of sync after a failure.
	That is: the "next step 2" check that is supposed to match
	"TREE_TYPE (t).z != 2" is actually matching "TREE_TYPE (t).z != 1":
	...
	(gdb) next^M
	52            && TREE_TYPE (t).z != 1^M
	(gdb) PASS: gdb.cp/step-and-next-inline.exp: no_header: next step 2
	...

	Fix this by issuing extra nexts to arrive at the required lines.

	Tested on x86_64-linux, with gcc-8, gcc-9, gcc-10, gcc-11, clang-8, clang-10
	and clang-12.

	gdb/testsuite/ChangeLog:

	2021-07-20  Tom de Vries  <tdevries@suse.de>

		* gdb.cp/step-and-next-inline.cc (tree_check, get_alias_set, main):
		Tag closing brace with comment.
		* gdb.cp/step-and-next-inline.h: Update to keep identical with
		step-and-next-inline.cc.
		* gdb.cp/step-and-next-inline.exp: Issue extra next when required.

2021-07-21  Nick Clifton  <nickc@redhat.com>

	Updated Russian translation for the bfd library

2021-07-21  Luca Boccassi  <luca.boccassi@microsoft.com>

	Allows linker scripts to set the SEC_READONLY flag.
	* ld.texi: Document new output section type.
	* ldgram.y: Add new token.
	* ldlang.c: Handle the new flag.
	* ldlang.h: Add readonly_section to list of section types.
	* ldlex.l: Add a new identifier.
	* testsuite/ld-scripts/output-section-types.t: New example linker script.
	* testsuite/ld-scripts/output-section-types.d: Test driver.
	* testsyute/ld-scripts/script.exp: Run the new test.

2021-07-21  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix FAILs due to PR gcc/101452
	When running test-case gdb.base/ptype-offsets.exp with gcc-11 (with -gdwarf-5
	default) or gcc-10 with target board unix/gdb:debug_flags=-gdwarf-5 we run
	into this regression:
	...
	 (gdb) ptype/o static_member^M
	 /* offset      |    size */  type = struct static_member {^M
	-                               static static_member Empty;^M
	 /*      0      |       4 */    int abc;^M
	 ^M
	                                /* total size (bytes):    4 */^M
	                              }^M
	-(gdb) PASS: gdb.base/ptype-offsets.exp: ptype/o static_member
	+(gdb) FAIL: gdb.base/ptype-offsets.exp: ptype/o static_member
	...

	This is caused by missing debug info, which I filed as gcc PR101452 - "[debug,
	dwarf-5] undefined static member removed by
	-feliminate-unused-debug-symbols".

	It's not clear yet whether this is a bug or a feature, but work around this in
	the test-cases by:
	- defining the static member
	- adding additional_flags=-fno-eliminate-unused-debug-types.

	Tested on x86_64-linux.

	gdb/testsuite/ChangeLog:

	2021-07-20  Tom de Vries  <tdevries@suse.de>

		* lib/gdb.exp (gcc_major_version): New proc.
		* gdb.base/ptype-offsets.cc: Define static member static_member::Empty.
		* gdb.cp/templates.exp: Define static member using -DGCC_BUG.
		* gdb.cp/m-static.exp: Add
		additional_flags=-fno-eliminate-unused-debug-types.
		* gdb.cp/pr-574.exp: Same.
		* gdb.cp/pr9167.exp: Same.

2021-07-21  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add KFAILs for gdb.ada FAILs with gcc-11
	With gcc-11 we run into:
	...
	(gdb) print pa_ptr.all^M
	That operation is not available on integers of more than 8 bytes.^M
	(gdb) KFAIL: gdb.ada/arrayptr.exp: scenario=all: print pa_ptr.all (PRMS: gdb/20991)
	...

	This is due to PR exp/20991 - "__int128 type support".  Mark this and similar
	FAILs as KFAIL.

	Also mark this FAIL:
	....
	(gdb) print pa_ptr(3)^M
	cannot subscript or call something of type `foo__packed_array_ptr'^M
	(gdb) FAIL: gdb.ada/arrayptr.exp: scenario=minimal: print pa_ptr(3)
	...
	as a KFAIL for PR ada/28115 - "Support packed array encoded as
	DW_TAG_subrange_type".

	Tested on x86_64-linux, with gcc-10 and gcc-11.

	gdb/testsuite/ChangeLog:

	2021-07-21  Tom de Vries  <tdevries@suse.de>

		* gdb.ada/arrayptr.exp: Add KFAILs for PR20991 and PR28115.
		* gdb.ada/exprs.exp: Add KFAILs for PR20991.
		* gdb.ada/packed_array_assign.exp: Same.

2021-07-21  Alan Modra  <amodra@gmail.com>

	as_bad_subtract
	Many places report errors of the nature "can't resolve a - b".
	This provides a utility function to report such errors consistently.
	I removed the section reporting and quotes around symbol names while I
	was at it.  Compare
	ifunc-2.s:4: Error: can't resolve `bar1' {.text.1 section} - `foo1' {.text.1 section}
	with
	ifunc-2.s:4: Error: can't resolve bar1 - foo1

	In many cases the section names don't help the user very much in
	figuring out what went wrong, and the quotes if present arguably ought
	to be placed around the entire expression:
	can't resolve `bar1 - foo1'

	The patch also tidies some tc_get_reloc functions that leak memory on
	error paths.

		* write.h (as_bad_subtract): Declare.
		* write.c (as_bad_subtract): New function.
		(fixup_segment): Use as_bad_subtract.
		* config/tc-arc.c (md_apply_fix): Likewise.
		* config/tc-avr.c (md_apply_fix, tc_gen_reloc): Likewise.
		* config/tc-cris.c (md_apply_fix): Likewise.
		* config/tc-d10v.c (md_apply_fix): Likewise.
		* config/tc-d30v.c (md_apply_fix): Likewise.
		* config/tc-ft32.c (md_apply_fix): Likewise.
		* config/tc-h8300.c (tc_gen_reloc): Likewise.
		* config/tc-m68hc11.c (md_apply_fix): Likewise.
		* config/tc-mmix.c (mmix_frob_file): Likewise.
		* config/tc-mn10200.c (tc_gen_reloc): Likewise.
		* config/tc-nds32.c (nds32_apply_fix): Likewise.
		* config/tc-pru.c (md_apply_fix): Likewise.
		* config/tc-riscv.c (md_apply_fix): Likewise.
		* config/tc-s12z.c (md_apply_fix): Likewise.
		* config/tc-s390.c (md_apply_fix): Likewise.
		* config/tc-tilegx.c (md_apply_fix): Likewise.
		* config/tc-tilepro.c (md_apply_fix): Likewise.
		* config/tc-v850.c (md_apply_fix): Likewise.
		* config/tc-vax.c (md_apply_fix): Likewise.
		* config/tc-xc16x.c (tc_gen_reloc): Likewise.
		* config/tc-xgate.c (md_apply_fix): Likewise.
		* config/tc-xstormy16.c (xstormy16_md_apply_fix): Likewise.
		* config/tc-xtensa.c (md_apply_fix): Likewise.
		* config/tc-z80.c (tc_gen_reloc): Likewise.
		* config/tc-spu.c (md_apply_fix): Likewise.
		(tc_gen_reloc): Delete dead code.  Free memory on error.
		* config/tc-cr16.c (tc_gen_reloc): Use as_bad_subtract.  Free
		on error.
		* config/tc-crx.c (tc_gen_reloc): Likewise.
		* config/tc-ppc.c (tc_gen_reloc): Likewise.
		* testsuite/gas/i386/ifunc-2.l: Adjust to suit changed error message.
		* testsuite/gas/mips/lui-2.l: Likewise.
		* testsuite/gas/tic6x/reloc-bad-1.l: Likewise.

2021-07-21  John Ericson  <git@JohnEricson.me>

	Remove `netbsdpe` support
	netbsdpe was deprecated in c2ce831330e10dab4703094491f80b6b9a5c2289.
	Since then, a release has passed (2.37), and it was marked obselete in
	5c9cbf07f3f972ecffe13d858010b3179df17b32. Unless I am mistaken, that
	means we can now remove support altogether.

	All branches in the "active" code are remove, and the target is
	additionally marked as obsolete next to the other removed ones for
	libbfd and gdb.

	Per [1] from the NetBSD toolchain list, PE/COFF support was removed a
	decade ago. Furthermore, the sole mention of this target in the binutils
	commit history was in 2002. Together, I'm led to believe this target
	hasn't seen much attention in quite a while.

	[1]: https://mail-index.netbsd.org/tech-toolchain/2021/06/16/msg003996.html

	bfd/
		* config.bfd: Remove netbsdpe entry.
	binutils/
		* configure.ac: Remove netbsdpe entry.
		* testsuite/lib/binutils-common.exp (is_pecoff_format): Likewise.
		* configure: Regenerate.
	gas/
		* configure.tgt: Remove netbsdpe entry.
	gdb/
		* configure.tgt: Add netbsdpe to removed targets.
	ld/
		* configure.tgt: Remove netbsdpe entry.
		* testsuite/ld-bootstrap/bootstrap.exp: Likewise.

2021-07-21  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-20  Alan Modra  <amodra@gmail.com>

	PR28106, build of 2.37 fails on FreeBSD and Clang
	https://en.cppreference.com/w/cpp/types/NULL says NULL might be
	defined as nullptr.
	https://en.cppreference.com/w/cpp/language/reinterpret_cast says
	reinterpret_cast can't be used on nullptr.

		PR gold/28106
		PR gold/27815
		* gc.h (gc_process_relocs): Use static_cast in Section_id constructor.

2021-07-20  Luis Machado  <luis.machado@linaro.org>

	Fix printing of non-address types when memory tagging is enabled
	When the architecture supports memory tagging, we handle
	pointer/reference types in a special way, so we can validate tags and
	show mismatches.

	Unfortunately, the currently implementation errors out when the user
	prints non-address values: composite types, floats, references, member
	functions and other things.

	Vector registers:

	 (gdb) p $v0
	 Value can't be converted to integer.

	Non-existent internal variables:

	 (gdb) p $foo
	 Value can't be converted to integer.

	The same happens for complex types and printing struct/union types.

	There are a few problems here.

	The first one is that after print_command_1 evaluates the expression
	to print, the tag validation code call value_as_address
	unconditionally, without making sure we have have a suitable type
	where it makes to sense to call it.  That results in value_as_address
	(if it isn't given a pointer-like type) trying to treat the value as
	an integer and convert it to an address, which #1 - doesn't make sense
	(i.e., no sense in validating tags after "print 1"), and throws for
	non-integer-convertible types.  We fix this by making sure we have a
	pointer or reference type first, and only if so then proceed to check
	if the address-like value has tags.

	The second is that we're calling value_as_address even if we have an
	optimized out or unavailable value, which throws, because the value's
	contents aren't fully accessible/readable.  This error currently
	escapes out and aborts the print.  This case is fixed by checking for
	optimized out / unavailable explicitly.

	Third, the tag checking process does not gracefully handle exceptions.
	If any exception is thrown from the tag validation code, we abort the
	print.  E.g., the target may fail to access tags via a running thread.
	Or the needed /proc files aren't available.  Or some other untold
	reason.  This is a bit too rigid.  This commit changes print_command_1
	to catch errors, print them, and still continue with the normal
	expression printing path instead of erroring out and printing nothing
	useful.

	With this patch, printing works correctly again:

	 (gdb) p $v0
	 $1 = {d = {f = {2.0546950501119882e-81, 2.0546950501119882e-81}, u = {3399988123389603631, 3399988123389603631}, s = {
	       3399988123389603631, 3399988123389603631}}, s = {f = {1.59329203e-10, 1.59329203e-10, 1.59329203e-10, 1.59329203e-10}, u = {
	       791621423, 791621423, 791621423, 791621423}, s = {791621423, 791621423, 791621423, 791621423}}, h = {bf = {1.592e-10,
	       1.592e-10, 1.592e-10, 1.592e-10, 1.592e-10, 1.592e-10, 1.592e-10, 1.592e-10}, f = {0.11224, 0.11224, 0.11224, 0.11224, 0.11224,
	       0.11224, 0.11224, 0.11224}, u = {12079, 12079, 12079, 12079, 12079, 12079, 12079, 12079}, s = {12079, 12079, 12079, 12079,
	       12079, 12079, 12079, 12079}}, b = {u = {47 <repeats 16 times>}, s = {47 <repeats 16 times>}}, q = {u = {
	       62718710765820030520700417840365121327}, s = {62718710765820030520700417840365121327}}}
	 (gdb) p $foo
	 $2 = void
	 (gdb) p 2 + 2i
	 $3 = 2 + 2i

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28110

2021-07-20  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: Minor updates for architecture parser.
	* Two add subset functions is redundant.  Keep the riscv_add_implicit_subset,
	and renamed it to riscv_add_subset.  Besides, if the subset is added in order,
	then we just add it at the tail of the subset list.

	* Removed the "-march:" prefix from the error messages.  Since not only the
	-march= option will use the parser, but also the architecture elf attributes,
	the default architecture setting and linker will use the same parser.

	* Use a function, riscv_parse_check_conflicts, to check the conflicts
	of extensions, including the rv64e and rv32q.

	The rv32emc-elf/rv32i-elf/rv32gc-linux/rv64gc-elf/rv64gc-linux regressions
	are tested and passed.

	bfd/
		* elfxx-riscv.c (riscv_lookup_subset): Check the subset tail list
		first.  If the subset is added in order, then we can just add it to
		the tail without searching the whole list.
		(riscv_add_subset): Replaced by riscv_add_implicit_subset.
		(riscv_add_implicit_subset): Renamed to riscv_add_subset.
		(riscv_parse_add_subset): Updated.
		(riscv_parsing_subset_version): Removed the "-march:" prefix from
		the error message.
		(riscv_parse_prefixed_ext): Likewise.
		(riscv_parse_std_ext): Likewise.  And move the rv<xlen>e check
		to riscv_parse_check_conflicts.
		(riscv_parse_check_conflicts): New function used to check conflicts.
		(riscv_parse_subset): Updated.
	gas/
		* testsuite/gas/riscv/march-fail-base-02.l: Updated.
		* testsuite/gas/riscv/march-fail-unknown-std.l: Likewise.

2021-07-20  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-19  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: set current thread in btrace_compute_ftrace_{bts,pt}
	As documented in bug 28086, test gdb.btrace/enable-new-thread.exp
	started failing with commit 0618ae414979 ("gdb: optimize
	all_matching_threads_iterator"):

	    (gdb) record btrace^M
	    (gdb) PASS: gdb.btrace/enable-new-thread.exp: record btrace
	    break 24^M
	    Breakpoint 2 at 0x555555555175: file /home/smarchi/src/binutils-gdb/gdb/testsuite/gdb.btrace/enable-new-thread.c, line 24.^M
	    (gdb) continue^M
	    Continuing.^M
	    /home/smarchi/src/binutils-gdb/gdb/inferior.c:303: internal-error: inferior* find_inferior_pid(process_stratum_target*, int): Assertion `pid != 0' failed.^M
	    A problem internal to GDB has been detected,^M
	    further debugging may prove unreliable.^M
	    Quit this debugging session? (y or n) FAIL: gdb.btrace/enable-new-thread.exp: continue to breakpoint: cont to bp.1 (GDB internal error)

	Note that I only see the failure if GDB is compiled without libipt
	support.  This is because GDB then makes use BTS instead of PT, so
	exercises different code paths.

	I think that the commit above just exposed an existing problem.  The
	stack trace of the internal error is:

	    #8  0x0000561cb81e404e in internal_error (file=0x561cb83aa2f8 "/home/smarchi/src/binutils-gdb/gdb/inferior.c", line=303, fmt=0x561cb83aa099 "%s: Assertion `%s' failed.") at /home/smarchi/src/binutils-gdb/gdbsupport/errors.cc:55
	    #9  0x0000561cb7b5c031 in find_inferior_pid (targ=0x561cb8aafb60 <the_amd64_linux_nat_target>, pid=0) at /home/smarchi/src/binutils-gdb/gdb/inferior.c:303
	    #10 0x0000561cb7b5c102 in find_inferior_ptid (targ=0x561cb8aafb60 <the_amd64_linux_nat_target>, ptid=...) at /home/smarchi/src/binutils-gdb/gdb/inferior.c:317
	    #11 0x0000561cb7f1d1c3 in find_thread_ptid (targ=0x561cb8aafb60 <the_amd64_linux_nat_target>, ptid=...) at /home/smarchi/src/binutils-gdb/gdb/thread.c:487
	    #12 0x0000561cb7f1b921 in all_matching_threads_iterator::all_matching_threads_iterator (this=0x7ffc4ee34678, filter_target=0x561cb8aafb60 <the_amd64_linux_nat_target>, filter_ptid=...) at /home/smarchi/src/binutils-gdb/gdb/thread-iter.c:125
	    #13 0x0000561cb77bc462 in filtered_iterator<all_matching_threads_iterator, non_exited_thread_filter>::filtered_iterator<process_stratum_target* const&, ptid_t const&> (this=0x7ffc4ee34670) at /home/smarchi/src/binutils-gdb/gdb/../gdbsupport/filtered-iterator.h:42
	    #14 0x0000561cb77b97cb in all_non_exited_threads_range::begin (this=0x7ffc4ee34650) at /home/smarchi/src/binutils-gdb/gdb/thread-iter.h:243
	    #15 0x0000561cb7d8ba30 in record_btrace_target::record_is_replaying (this=0x561cb8aa6250 <record_btrace_ops>, ptid=...) at /home/smarchi/src/binutils-gdb/gdb/record-btrace.c:1411
	    #16 0x0000561cb7d8bb83 in record_btrace_target::xfer_partial (this=0x561cb8aa6250 <record_btrace_ops>, object=TARGET_OBJECT_MEMORY, annex=0x0, readbuf=0x7ffc4ee34c58 "\260g\343N\374\177", writebuf=0x0, offset=140737352774277, len=1, xfered_len=0x7ffc4ee34ad8) at /home/smarchi/src/binutils-gdb/gdb/record-btrace.c:1437
	    #17 0x0000561cb7ef73a9 in raw_memory_xfer_partial (ops=0x561cb8aa6250 <record_btrace_ops>, readbuf=0x7ffc4ee34c58 "\260g\343N\374\177", writebuf=0x0, memaddr=140737352774277, len=1, xfered_len=0x7ffc4ee34ad8) at /home/smarchi/src/binutils-gdb/gdb/target.c:1504
	    #18 0x0000561cb7ef77da in memory_xfer_partial_1 (ops=0x561cb8aa6250 <record_btrace_ops>, object=TARGET_OBJECT_CODE_MEMORY, readbuf=0x7ffc4ee34c58 "\260g\343N\374\177", writebuf=0x0, memaddr=140737352774277, len=1, xfered_len=0x7ffc4ee34ad8) at /home/smarchi/src/binutils-gdb/gdb/target.c:1635
	    #19 0x0000561cb7ef78b5 in memory_xfer_partial (ops=0x561cb8aa6250 <record_btrace_ops>, object=TARGET_OBJECT_CODE_MEMORY, readbuf=0x7ffc4ee34c58 "\260g\343N\374\177", writebuf=0x0, memaddr=140737352774277, len=1, xfered_len=0x7ffc4ee34ad8) at /home/smarchi/src/binutils-gdb/gdb/target.c:1664
	    #20 0x0000561cb7ef7ba4 in target_xfer_partial (ops=0x561cb8aa6250 <record_btrace_ops>, object=TARGET_OBJECT_CODE_MEMORY, annex=0x0, readbuf=0x7ffc4ee34c58 "\260g\343N\374\177", writebuf=0x0, offset=140737352774277, len=1, xfered_len=0x7ffc4ee34ad8) at /home/smarchi/src/binutils-gdb/gdb/target.c:1721
	    #21 0x0000561cb7ef8503 in target_read_partial (ops=0x561cb8aa6250 <record_btrace_ops>, object=TARGET_OBJECT_CODE_MEMORY, annex=0x0, buf=0x7ffc4ee34c58 "\260g\343N\374\177", offset=140737352774277, len=1, xfered_len=0x7ffc4ee34ad8) at /home/smarchi/src/binutils-gdb/gdb/target.c:1974
	    #22 0x0000561cb7ef861f in target_read (ops=0x561cb8aa6250 <record_btrace_ops>, object=TARGET_OBJECT_CODE_MEMORY, annex=0x0, buf=0x7ffc4ee34c58 "\260g\343N\374\177", offset=140737352774277, len=1) at /home/smarchi/src/binutils-gdb/gdb/target.c:2014
	    #23 0x0000561cb7ef809f in target_read_code (memaddr=140737352774277, myaddr=0x7ffc4ee34c58 "\260g\343N\374\177", len=1) at /home/smarchi/src/binutils-gdb/gdb/target.c:1869
	    #24 0x0000561cb7937f4d in gdb_disassembler::dis_asm_read_memory (memaddr=140737352774277, myaddr=0x7ffc4ee34c58 "\260g\343N\374\177", len=1, info=0x7ffc4ee34e88) at /home/smarchi/src/binutils-gdb/gdb/disasm.c:139
	    #25 0x0000561cb80ab66d in fetch_data (info=0x7ffc4ee34e88, addr=0x7ffc4ee34c59 "g\343N\374\177") at /home/smarchi/src/binutils-gdb/opcodes/i386-dis.c:194
	    #26 0x0000561cb80ab7e2 in ckprefix () at /home/smarchi/src/binutils-gdb/opcodes/i386-dis.c:8628
	    #27 0x0000561cb80adbd8 in print_insn (pc=140737352774277, info=0x7ffc4ee34e88) at /home/smarchi/src/binutils-gdb/opcodes/i386-dis.c:9587
	    #28 0x0000561cb80abe4f in print_insn_i386 (pc=140737352774277, info=0x7ffc4ee34e88) at /home/smarchi/src/binutils-gdb/opcodes/i386-dis.c:8894
	    #29 0x0000561cb7744a19 in default_print_insn (memaddr=140737352774277, info=0x7ffc4ee34e88) at /home/smarchi/src/binutils-gdb/gdb/arch-utils.c:1029
	    #30 0x0000561cb7b33067 in i386_print_insn (pc=140737352774277, info=0x7ffc4ee34e88) at /home/smarchi/src/binutils-gdb/gdb/i386-tdep.c:4013
	    #31 0x0000561cb7acd8f4 in gdbarch_print_insn (gdbarch=0x561cbae2fb60, vma=140737352774277, info=0x7ffc4ee34e88) at /home/smarchi/src/binutils-gdb/gdb/gdbarch.c:3478
	    #32 0x0000561cb793a32d in gdb_disassembler::print_insn (this=0x7ffc4ee34e80, memaddr=140737352774277, branch_delay_insns=0x0) at /home/smarchi/src/binutils-gdb/gdb/disasm.c:795
	    #33 0x0000561cb793a5b0 in gdb_print_insn (gdbarch=0x561cbae2fb60, memaddr=140737352774277, stream=0x561cb8ac99f8 <null_stream>, branch_delay_insns=0x0) at /home/smarchi/src/binutils-gdb/gdb/disasm.c:850
	    #34 0x0000561cb793a631 in gdb_insn_length (gdbarch=0x561cbae2fb60, addr=140737352774277) at /home/smarchi/src/binutils-gdb/gdb/disasm.c:859
	    #35 0x0000561cb77f53f4 in btrace_compute_ftrace_bts (tp=0x561cbba11210, btrace=0x7ffc4ee35188, gaps=...) at /home/smarchi/src/binutils-gdb/gdb/btrace.c:1107
	    #36 0x0000561cb77f55f5 in btrace_compute_ftrace_1 (tp=0x561cbba11210, btrace=0x7ffc4ee35180, cpu=0x0, gaps=...) at /home/smarchi/src/binutils-gdb/gdb/btrace.c:1527
	    #37 0x0000561cb77f5705 in btrace_compute_ftrace (tp=0x561cbba11210, btrace=0x7ffc4ee35180, cpu=0x0) at /home/smarchi/src/binutils-gdb/gdb/btrace.c:1560
	    #38 0x0000561cb77f583b in btrace_add_pc (tp=0x561cbba11210) at /home/smarchi/src/binutils-gdb/gdb/btrace.c:1589
	    #39 0x0000561cb77f5a86 in btrace_enable (tp=0x561cbba11210, conf=0x561cb8ac6878 <record_btrace_conf>) at /home/smarchi/src/binutils-gdb/gdb/btrace.c:1629
	    #40 0x0000561cb7d88d26 in record_btrace_enable_warn (tp=0x561cbba11210) at /home/smarchi/src/binutils-gdb/gdb/record-btrace.c:294
	    #41 0x0000561cb7c603dc in std::__invoke_impl<void, void (*&)(thread_info*), thread_info*> (__f=@0x561cbb6c4878: 0x561cb7d88cdc <record_btrace_enable_warn(thread_info*)>) at /usr/include/c++/10/bits/invoke.h:60
	    #42 0x0000561cb7c5e5a6 in std::__invoke_r<void, void (*&)(thread_info*), thread_info*> (__fn=@0x561cbb6c4878: 0x561cb7d88cdc <record_btrace_enable_warn(thread_info*)>) at /usr/include/c++/10/bits/invoke.h:153
	    #43 0x0000561cb7c5dc92 in std::_Function_handler<void (thread_info*), void (*)(thread_info*)>::_M_invoke(std::_Any_data const&, thread_info*&&) (__functor=..., __args#0=@0x7ffc4ee35310: 0x561cbba11210) at /usr/include/c++/10/bits/std_function.h:291
	    #44 0x0000561cb7f2600f in std::function<void (thread_info*)>::operator()(thread_info*) const (this=0x561cbb6c4878, __args#0=0x561cbba11210) at /usr/include/c++/10/bits/std_function.h:622
	    #45 0x0000561cb7f23dc8 in gdb::observers::observable<thread_info*>::notify (this=0x561cb8ac5aa0 <gdb::observers::new_thread>, args#0=0x561cbba11210) at /home/smarchi/src/binutils-gdb/gdb/../gdbsupport/observable.h:150
	    #46 0x0000561cb7f1c436 in add_thread_silent (targ=0x561cb8aafb60 <the_amd64_linux_nat_target>, ptid=...) at /home/smarchi/src/binutils-gdb/gdb/thread.c:263
	    #47 0x0000561cb7f1c479 in add_thread_with_info (targ=0x561cb8aafb60 <the_amd64_linux_nat_target>, ptid=..., priv=0x561cbb3f7ab0) at /home/smarchi/src/binutils-gdb/gdb/thread.c:272
	    #48 0x0000561cb7bfa1d0 in record_thread (info=0x561cbb0413a0, tp=0x0, ptid=..., th_p=0x7ffc4ee35610, ti_p=0x7ffc4ee35620) at /home/smarchi/src/binutils-gdb/gdb/linux-thread-db.c:1380
	    #49 0x0000561cb7bf7a2a in thread_from_lwp (stopped=0x561cba81db20, ptid=...) at /home/smarchi/src/binutils-gdb/gdb/linux-thread-db.c:429
	    #50 0x0000561cb7bf7ac5 in thread_db_notice_clone (parent=..., child=...) at /home/smarchi/src/binutils-gdb/gdb/linux-thread-db.c:447
	    #51 0x0000561cb7bdc9a2 in linux_handle_extended_wait (lp=0x561cbae25720, status=4991) at /home/smarchi/src/binutils-gdb/gdb/linux-nat.c:1981
	    #52 0x0000561cb7bdf0f3 in linux_nat_filter_event (lwpid=435403, status=198015) at /home/smarchi/src/binutils-gdb/gdb/linux-nat.c:2920
	    #53 0x0000561cb7bdfed6 in linux_nat_wait_1 (ptid=..., ourstatus=0x7ffc4ee36398, target_options=...) at /home/smarchi/src/binutils-gdb/gdb/linux-nat.c:3202
	    #54 0x0000561cb7be0b68 in linux_nat_target::wait (this=0x561cb8aafb60 <the_amd64_linux_nat_target>, ptid=..., ourstatus=0x7ffc4ee36398, target_options=...) at /home/smarchi/src/binutils-gdb/gdb/linux-nat.c:3440
	    #55 0x0000561cb7bfa2fc in thread_db_target::wait (this=0x561cb8a9acd0 <the_thread_db_target>, ptid=..., ourstatus=0x7ffc4ee36398, options=...) at /home/smarchi/src/binutils-gdb/gdb/linux-thread-db.c:1412
	    #56 0x0000561cb7d8e356 in record_btrace_target::wait (this=0x561cb8aa6250 <record_btrace_ops>, ptid=..., status=0x7ffc4ee36398, options=...) at /home/smarchi/src/binutils-gdb/gdb/record-btrace.c:2547
	    #57 0x0000561cb7ef996d in target_wait (ptid=..., status=0x7ffc4ee36398, options=...) at /home/smarchi/src/binutils-gdb/gdb/target.c:2608
	    #58 0x0000561cb7b6d297 in do_target_wait_1 (inf=0x561cba6d8780, ptid=..., status=0x7ffc4ee36398, options=...) at /home/smarchi/src/binutils-gdb/gdb/infrun.c:3640
	    #59 0x0000561cb7b6d43e in operator() (__closure=0x7ffc4ee36190, inf=0x561cba6d8780) at /home/smarchi/src/binutils-gdb/gdb/infrun.c:3701
	    #60 0x0000561cb7b6d7b2 in do_target_wait (ecs=0x7ffc4ee36370, options=...) at /home/smarchi/src/binutils-gdb/gdb/infrun.c:3720
	    #61 0x0000561cb7b6e67d in fetch_inferior_event () at /home/smarchi/src/binutils-gdb/gdb/infrun.c:4069
	    #62 0x0000561cb7b4659b in inferior_event_handler (event_type=INF_REG_EVENT) at /home/smarchi/src/binutils-gdb/gdb/inf-loop.c:41
	    #63 0x0000561cb7be25f7 in handle_target_event (error=0, client_data=0x0) at /home/smarchi/src/binutils-gdb/gdb/linux-nat.c:4227
	    #64 0x0000561cb81e4ee2 in handle_file_event (file_ptr=0x561cbae24e10, ready_mask=1) at /home/smarchi/src/binutils-gdb/gdbsupport/event-loop.cc:575
	    #65 0x0000561cb81e5490 in gdb_wait_for_event (block=0) at /home/smarchi/src/binutils-gdb/gdbsupport/event-loop.cc:701
	    #66 0x0000561cb81e41be in gdb_do_one_event () at /home/smarchi/src/binutils-gdb/gdbsupport/event-loop.cc:212
	    #67 0x0000561cb7c18096 in start_event_loop () at /home/smarchi/src/binutils-gdb/gdb/main.c:421
	    #68 0x0000561cb7c181e0 in captured_command_loop () at /home/smarchi/src/binutils-gdb/gdb/main.c:481
	    #69 0x0000561cb7c19d7e in captured_main (data=0x7ffc4ee366a0) at /home/smarchi/src/binutils-gdb/gdb/main.c:1353
	    #70 0x0000561cb7c19df0 in gdb_main (args=0x7ffc4ee366a0) at /home/smarchi/src/binutils-gdb/gdb/main.c:1368
	    #71 0x0000561cb7693186 in main (argc=11, argv=0x7ffc4ee367b8) at /home/smarchi/src/binutils-gdb/gdb/gdb.c:32

	At frame 45, the new_thread observable is fired.  At this moment, the
	new thread isn't the current thread, inferior_ptid is null_ptid.  I
	think this is ok: the new_thread observable doesn't give any guarantee
	on the global context when observers are invoked.  Frame 35,
	btrace_compute_ftrace_bts, calls gdb_insn_length.  gdb_insn_length
	doesn't have a thread_info or other parameter what could indicate where
	to read memory from, it implicitly uses the global context
	(inferior_ptid).

	So we reach the all_non_exited_threads_range in
	record_btrace_target::record_is_replaying with a null inferior_ptid.
	The previous implemention of all_non_exited_threads_range didn't care,
	but the new one does.  The problem of calling gdb_insn_length and
	ultimately trying to read memory with a null inferior_ptid already
	existed, but the commit mentioned above made it visible.

	Something between frames 40 (record_btrace_enable_warn) and 35
	(btrace_compute_ftrace_bts) needs to be switching the global context to
	make TP the current thread.  Since btrace_compute_ftrace_bts takes the
	thread_info to work with as a parameter, that typically means that it
	doesn't require its caller to also set the global current context
	(current thread) when calling.  If it needs to call other functions
	that do require the global current thread to be set, then it needs to
	temporarily change the current thread while calling these other
	functions.  Therefore, switch and restore the current thread in
	btrace_compute_ftrace_bts.

	By inspection, it looks like btrace_compute_ftrace_pt may also call
	functions sensitive to the global context: it installs the
	btrace_pt_readmem_callback callback in the PT instruction decoder.  When
	this function gets called, inferior_ptid must be set appropriately.  Add
	a switch and restore in there too.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28086
	Change-Id: I407fbfe41aab990068bd102491aa3709b0a034b3

2021-07-19  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-18  Nick Clifton  <nickc@redhat.com>

	Move pending-obsolesence targets onto the obsolete list.
		* config.bfd: Move pending obsoletion targets to obsolete list.

	Update how-to-make-a-release checklist with latest changes from 2.37 release

2021-07-18  Michael Krasnyk  <mkrasnyk@argo.ai>

	PR28098 Skip R_*_NONE relocation entries with zero r_sym without counting
		PR gold/28098
		* reloc.cc (Track_relocs::advance): Skip R_*_NONE relocation entries
		with r_sym of zero without counting in advance method.

2021-07-18  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: convert nat/x86-dregs.c macros to functions
	I'm debugging why GDB crashes on OpenBSD/amd64, turns out it's because
	x86_dr_low.get_status is nullptr.  It would have been useful to be able
	to break on x86_dr_low_get_status, so I thought it would be a good
	reason to convert these function-like macros into functions.

	Change-Id: Ic200b50ef8455b4697bc518da0fa2bb704cf4721

2021-07-18  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-17  Tom Tromey  <tom@tromey.com>

	Fix file-name handling regression with DWARF index
	When run with the gdb-index or debug-names target boards, dup-psym.exp
	fails.  This came up for me because my new DWARF scanner reuses this
	part of the existing index code, and so it registers as a regression.
	This is PR symtab/25834.

	Looking into this, I found that the DWARF index code here is fairly
	different from the psymtab code.  I don't think there's a deep reason
	for this, and in fact, it seemed to me that the index code could
	simply mimic what the psymtab code already does.

	That is what this patch implements.  The DW_AT_name and DW_AT_comp_dir
	are now stored in the quick file names table.  This may require
	allocating a quick file names table even when DW_AT_stmt_list does not
	exist.  Then, the functions that work with this data are changed to
	use find_source_or_rewrite, just as the psymbol code does.  Finally,
	line_header::file_full_name is removed, as it is no longer needed.

	Currently, the index maintains a hash table of "quick file names".
	The hash table uses a deletion function to free the "real name"
	components when necessary.  There's also a second such function to
	implement the forget_cached_source_info method.

	This bug fix patch will create a quick file name object even when
	there is no DW_AT_stmt_list, meaning that the object won't be entered
	in the hash table.  So, this patch changes the memory management
	approach so that the entries are cleared when the per-BFD object is
	destroyed.  (A dwarf2_per_cu_data destructor is not introduced,
	because we have been avoiding adding a vtable to that class.)

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=25834

2021-07-17  Tom Tromey  <tom@tromey.com>

	Check for debug-types in map_symbol_filenames
	map_symbol_filenames can skip type units -- in fact I think it has to,
	due to the assertion at the top of dw2_get_file_names.  This may be a
	regression due to the TU/CU unification patch, I did not check.

	Simplify DWARF file name caching
	The DWARF index file name caching code only records when a line table
	has been read and the reading failed.  However, the code would be
	simpler if it recorded any attempt, which is what this patch
	implements.

	Introduce find_source_or_rewrite
	The final bug fix in this series would duplicate the logic in
	psymtab_to_fullname, so this patch extracts the body of this function
	into a new function.

	Simplify file_and_directory storage management
	file_and_directory carries a std::string in case the compilation
	directory is computed, but a subsequent patch wants to preserve this
	string without also having to maintain the storage for it.  So, this
	patch arranges for the compilation directory string to be stored in
	the per-BFD string bcache instead.

	Pass file_and_directory through DWARF line-decoding code
	This patch removes the redundant "comp_unit" parameter from
	compute_include_file_name, and arranges to pass a file_and_directory
	object from the readers down to this function.  It also changes the
	partial symtab reader to use find_file_and_directory, rather than
	reimplement this functionality by hand.

	Rename and refactor psymtab_include_file_name
	In order to fix an index-related regression, I want to use
	psymtab_include_file_name in the DWARF index file-handling code.  This
	patch renames this function and changes it to no longer require a
	partial symtab to be passed in.  A subsequent patch will further
	refactor this code to remove the redundant parameter (which was always
	there but is now more obvious).

2021-07-17  Sergey Belyashov  <Sergey.Belyashov@gmail.com>

	Add basic Z80 CPU support
	Supported ISAs:
	- Z80 (all undocumented instructions)
	- Z180
	- eZ80 (Z80 mode only)

	Datasheets:
	Z80: https://www.zilog.com/manage_directlink.php?filepath=docs/z80/um0080&extn=.pdf
	Z180: https://www.zilog.com/manage_directlink.php?filepath=docs/z180/ps0140&extn=.pdf
	eZ80: http://www.zilog.com/force_download.php?filepath=YUhSMGNEb3ZMM2QzZHk1NmFXeHZaeTVqYjIwdlpHOWpjeTlWVFRBd056Y3VjR1Jt

	To debug Z80 programs using GDB you must configure and embed
	z80-stub.c to your program (SDCC compiler is required). Or
	you may use some simulator with GDB support.

	gdb/ChangeLog:

		* Makefile.in (ALL_TARGET_OBS): Add z80-tdep.c.
		* NEWS: Mention z80 support.
		* configure.tgt: Handle z80*.
		* features/Makefile (XMLTOC): Add z80.xml.
		* features/z80-cpu.xml: New.
		* features/z80.c: Generate.
		* features/z80.xml: New.
		* z80-tdep.c: New file.
		* z80-tdep.h: New file.

	gdb/stubs/ChangeLog:

		* z80-stub.c: New file.

	Change-Id: Id0b7a6e210c3f93c6853c5e3031b7bcee47d0db9

2021-07-17  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: make all_inferiors_safe actually work
	The test gdb.threads/fork-plus-threads.exp fails since 08bdefb58b78
	("gdb: make inferior_list use intrusive_list"):

	    FAIL: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: only inferior 1 left

	Looking at the log, we see that we are left with a bunch of inferiors in
	the detach-on-fork=off case:

	    info inferiors^M
	      Num  Description       Connection           Executable        ^M
	    * 1    <null>                                 <snip>/fork-plus-threads ^M
	      2    <null>                                 <snip>/fork-plus-threads ^M
	      3    <null>                                 <snip>/fork-plus-threads ^M
	      4    <null>                                 <snip>/fork-plus-threads ^M
	      5    <null>                                 <snip>/fork-plus-threads ^M
	      6    <null>                                 <snip>/fork-plus-threads ^M
	      7    <null>                                 <snip>/fork-plus-threads ^M
	      8    <null>                                 <snip>/fork-plus-threads ^M
	      9    <null>                                 <snip>/fork-plus-threads ^M
	      10   <null>                                 <snip>/fork-plus-threads ^M
	      11   <null>                                 <snip>/fork-plus-threads ^M
	    (gdb) FAIL: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: only inferior 1 left

	when we expect to have just one.  The problem is prune_inferiors not
	pruning inferiors.  And this is caused by all_inferiors_safe not
	actually iterating on inferiors.  The current implementation:

	  inline all_inferiors_safe_range
	  all_inferiors_safe ()
	  {
	    return {};
	  }

	default-constructs an all_inferiors_safe_range, which default-constructs
	an all_inferiors_safe_iterator as its m_begin field, which
	default-constructs a all_inferiors_iterator.  A default-constructed
	all_inferiors_iterator is an end iterator, which means we have
	constructed an (end,end) all_inferiors_safe_range.

	We actually need to pass down the list on which we want to iterator
	(that is the inferior_list global), so that all_inferiors_iterator's
	first constructor is chosen.  We also pass nullptr as the proc_target
	filter.  In this case, we don't do any filtering, but if in the future
	all_inferiors_safe needed to allow filtering on process target (like
	all_inferiors does), we could pass down a process target pointer.

	basic_safe_iterator's constructor needs to be changed to allow
	constructing the wrapped iterator with multiple arguments, not just one.

	With this, gdb.threads/fork-plus-threads.exp is passing once again for
	me.

	Change-Id: I650552ede596e3590c4b7606ce403690a0278a01

2021-07-17  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-16  Lancelot SIX  <lsix@lancelotsix.com>

	gdb: Support stepping out from signal handler on riscv*-linux
	Currently, gdb cannot step outside of a signal handler on RISC-V
	platforms.  This causes multiple failures in gdb.base/sigstep.exp:

		FAIL: gdb.base/sigstep.exp: continue to handler, nothing in handler, step from handler: leave handler (timeout)
		FAIL: gdb.base/sigstep.exp: continue to handler, si+advance in handler, step from handler: leave handler (timeout)
		FAIL: gdb.base/sigstep.exp: continue to handler, nothing in handler, next from handler: leave handler (timeout)
		FAIL: gdb.base/sigstep.exp: continue to handler, si+advance in handler, next from handler: leave handler (timeout)
		FAIL: gdb.base/sigstep.exp: stepi from handleri: leave signal trampoline
		FAIL: gdb.base/sigstep.exp: nexti from handleri: leave signal trampoline

		                === gdb Summary ===

		# of expected passes            587
		# of unexpected failures        6

	This patch adds support for stepping outside of a signal handler on
	riscv*-*-linux*.

	Implementation is heavily inspired from mips_linux_syscall_next_pc and
	surroundings as advised by Pedro Alves.

	After this patch, all tests in gdb.base/sigstep.exp pass.

	Build and tested on riscv64-linux-gnu.

2021-07-16  Lancelot SIX  <lsix@lancelotsix.com>

	gdb/testsuite: Declare that riscv*-*-linux* cannot hardware_single_step
	Many tests fail in gdb/testsuite/gdb.base/sigstep.exp on
	riscv64-linux-gnu.  Those tests check that when stepping, if the
	debuggee received a signal it should step inside the signal handler.

	This feature requires hardware support for single stepping (or at least
	kernel support), but none are available on riscv*-linux-gnu hosts, at
	the moment at least.

	This patch adds RISC-V to the list of configurations that does not
	have hardware single step capability, disabling tests relying on such
	feature.

	Tested on riscv64-linux-gnu.

2021-07-16  Tom Tromey  <tom@tromey.com>

	Document quick_symbol_functions::expand_symtabs_matching invariant
	While working on my series to replace the DWARF psymbol reader, I
	noticed that the expand_symtabs_matching has an undocumented
	invariant.  I think that, if this invariant is not followed, then GDB
	will crash.  So, this patch documents this in the relevant spots and
	introduces some asserts to make it clear.

	Regression tested on x86-64 Fedora 32.

2021-07-16  Tom Tromey  <tromey@adacore.com>

	Fix array stride bug
	Investigation of using the Python API with an Ada program showed that
	an array of dynamic types was not being handled properly.  I tracked
	this down to an oddity of how array strides are handled.

	In gdb, an array stride can be attached to the range type, via the
	range_bounds object.  However, the stride can also be put into the
	array's first field.  From create_range_type_with_stride:

	  else if (bit_stride > 0)
	    TYPE_FIELD_BITSIZE (result_type, 0) = bit_stride;

	It's hard to be sure why this is done, but I would guess a combination
	of historical reasons plus a desire (mentioned in a comment somewhere)
	to avoid modifying the range type.

	This patch fixes the problem by changing type::bit_stride to
	understand this convention.  It also fixes one spot that reproduces
	this logic.

	Regression tested on x86-64 Fedora 32.

2021-07-16  Giulio Benetti  <giulio.benetti@benettiengineering.com>

	or1k: fix pc-relative relocation against dynamic on PC relative 26 bit relocation.
	bfd	* elf32-or1k.c (or1k_elf_relocate_section): Use a separate entry
		in switch case R_OR1K_INSN_REL_26 where we need to check for
		!SYMBOL_CALLS_LOCAL() instead of !SYMBOL_REFERENCES_LOCAL().

2021-07-16  Nick Clifton  <nickc@redhat.com>

	Updated Swedish translation for the binutils sub-directory

2021-07-16  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-15  Tom Tromey  <tromey@adacore.com>

	Avoid expression parsing crash with unknown language
	PR gdb/28093 points out that gdb crashes when language is set to
	"unknown" and expression parsing is attempted.  At first I thought
	this was a regression due to the expression rewrite, but it turns out
	that older versions crash as well.

	This patch avoids the crash by changing the default expression parser
	to throw an exception.  I think this is preferable -- the current
	behavior of silently doing nothing does not really make sense.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28093

2021-07-15  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: pass child_ptid and fork kind to target_ops::follow_fork
	This is a small cleanup I think would be nice, that I spotted while
	doing the following patch.

	gdb/ChangeLog:

		* target.h (struct target_ops) <follow_fork>: Add ptid and
		target_waitkind parameters.
		(target_follow_fork): Likewise.
		* target.c (default_follow_fork): Likewise.
		(target_follow_fork): Likewise.
		* fbsd-nat.h (class fbsd_nat_target) <follow_fork>: Likewise.
		* fbsd-nat.c (fbsd_nat_target::follow_fork): Likewise.
		* linux-nat.h (class linux_nat_target) <follow_fork>: Likewise.
		* linux-nat.c (linux_nat_target::follow_fork): Likewise.
		* obsd-nat.h (class obsd_nat_target) <follow_fork>: Likewise.
		* obsd-nat.c (obsd_nat_target::follow_fork): Likewise.
		* remote.c (class remote_target) <follow_fork>: Likewise.
		* target-debug.h (target_debug_print_target_waitkind): New.
		* target-delegates.c: Re-generate.

	Change-Id: I5421a542f2e19100a22b74cc333d2b235d0de3c8

2021-07-15  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: call post_create_inferior at end of follow_fork_inferior
	GDB doesn't handle well the case of an inferior using the JIT interface
	to register JIT-ed objfiles and forking.  If an inferior registers a
	code object using the JIT interface and then forks, the child process
	conceptually has the same code object loaded, so GDB should look it up
	and learn about it (it currently doesn't).

	To achieve this, I think it would make sense to have the
	inferior_created observable called when an inferior is created due to a
	fork in follow_fork_inferior.  The inferior_created observable is
	currently called both after starting a new inferior and after attaching
	to an inferior, allowing various sub-components to learn about that new
	executing inferior.  We can see handling a fork child just like
	attaching to it, so any work done when attaching should also be done in
	the case of a fork child.

	Instead of just calling the inferior_created observable, this patch
	makes follow_fork_inferior call the whole post_create_inferior function.
	This way, the attach and follow-fork code code paths are more alike.

	Given that post_create_inferior calls solib_create_inferior_hook,
	follow_fork_inferior doesn't need to do it itself, so those calls to
	solib_create_inferior_hook are removed.

	One question you may have: why not just call post_create_inferior at the
	places where solib_create_inferior_hook is currently called, instead of
	after target_follow_fork?

	 - there's something fishy for the second solib_create_inferior_hook
	   call site: at this point we have switched the current program space
	   to the child's, but not the current inferior nor the current thread.
	   So solib_create_inferior_hook (and everything under, including
	   check_for_thread_db, for example) is called with inferior 1 as the
	   current inferior and inferior 2's program space as the current
	   program space.  I think that's wrong, because at this point we are
	   setting up inferior 2, and all that code relies on the current
	   inferior.  We could just add a switch_to_thread call before it to
	   make inferior 2 the current one, but there are other problems (see
	   below).

	 - solib_create_inferior_hook is currently not called on the
	   `follow_child && detach_fork` path.  I think we need to call it,
	   because we still get a new inferior in that case (even though we
	   detach the parent).  If we only call post_create_inferior where
	   solib_create_inferior_hook used to be called, then the JIT
	   subcomponent doesn't get informed about the new inferior, and that
	   introduces a failure in the new gdb.base/jit-elf-fork.exp test.

	 - if we try to put the post_create_inferior just after the
	   switch_to_thread that was originally at line 662, or just before the
	   call to target_follow_fork, we introduce a subtle failure in
	   gdb.threads/fork-thread-pending.exp.  What happens then is that
	   libthread_db gets loaded (somewhere under post_create_inferior)
	   before the linux-nat target learns about the LWPs (which happens in
	   linux_nat_target::follow_fork).  As a result, the ALL_LWPS loop in
	   try_thread_db_load_1 doesn't see the child LWP, and the thread-db
	   target doesn't have the chance to fill in thread_info::priv.  A bit
	   later, when the test does "info threads", and
	   thread_db_target::pid_to_str is called, the thread-db target doesn't
	   recognize the thread as one of its own, and delegates the request to
	   the target below.  Because the pid_to_str output is not the expected
	   one, the test fails.

	   This tells me that we need to call the process target's follow_fork
	   first, to make the process target create the necessary LWP and thread
	   structures.  Then, we can call post_create_inferior to let the other
	   components of GDB do their thing.

	   But then you may ask: check_for_thread_db is already called today,
	   somewhere under solib_create_inferior_hook, and that is before
	   target_follow_fork, why don't we see this ordering problem!?  Well,
	   because of the first bullet point: when check_for_thread_db /
	   thread_db_load are called, the current inferior is (erroneously)
	   inferior 1, the parent.  Because libthread_db is already loaded for
	   the parent, thread_db_load early returns.  check_for_thread_db later
	   gets called by linux_nat_target::follow_fork.  At this point, the
	   current inferior is the correct one and the child's LWP exists, so
	   all is well.

	Since we now call post_create_inferior after target_follow_fork, which
	calls the inferior_created observable, which calls check_for_thread_db,
	I don't think linux_nat_target needs to explicitly call
	check_for_thread_db itself, so that is removed.

	In terms of testing, this patch adds a new gdb.base/jit-elf-fork.exp
	test.  It makes an inferior register a JIT code object and then fork.
	It then verifies that whatever the detach-on-fork and follow-fork-child
	parameters are, GDB knows about the JIT code object in all the inferiors
	that survive the fork.  It verifies that the inferiors can unload that
	code object.

	There isn't currently a way to get visibility into GDB's idea of the JIT
	code objects for each inferior.  For the purpose of this test, add the
	"maintenance info jit" command.  There isn't much we can print about the
	JIT code objects except their load address.  So the output looks a bit
	bare, but it's good enough for the test.

	gdb/ChangeLog:

		* NEWS: Mention "maint info jit" command.
		* infrun.c (follow_fork_inferior): Don't call
		solib_create_inferior_hook, call post_create_inferior if a new
		inferior was created.
		* jit.c (maint_info_jit_cmd): New.
		(_initialize_jit): Register new command.
		* linux-nat.c (linux_nat_target::follow_fork): Don't call
		check_for_thread_db.
		* linux-nat.h (check_for_thread_db): Remove declaration.
		* linux-thread-db.c (check_thread_signals): Make static.

	gdb/doc/ChangeLog:

		* gdb.texinfo (Maintenance Commands): Mention "maint info jit".

	gdb/testsuite/ChangeLog:

		* gdb.base/jit-elf-fork-main.c: New test.
		* gdb.base/jit-elf-fork-solib.c: New test.
		* gdb.base/jit-elf-fork.exp: New test.

	Change-Id: I9a192e55b8a451c00e88100669283fc9ca60de5c

2021-07-15  Libor Bukata  <libor.bukata@oracle.com>

	[gdb/procfs.c] Fix build failure in find_stop_signal
	It fixes a regression caused by commit
	1edb66d856c82c389edfd7610143236a68c76846 where thread_info::suspend was
	made private.

	The public thread_info API has to be used to get stop signal and avoid
	build failures.

	gdb/ChangeLog:

	2021-07-14  Libor Bukata <libor.bukata@oracle.com>

	  * gdb/procfs.c (find_stop_signal): Use thread_info API.

	Change-Id: I53bc57a05cd0eca5f28ef0726d6faeeb306e7904

2021-07-15  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-14  H.J. Lu  <hjl.tools@gmail.com>

	x86: Add int1 as one byte opcode 0xf1
	Also change the x86 disassembler to disassemble 0xf1 as int1, instead of
	icebp.

	gas/

		PR gas/28088
		* testsuite/gas/i386/opcode.s: Add int1.
		* testsuite/gas/i386/x86-64-opcode.s: Add int1, int3 and int.
		* testsuite/gas/i386/opcode-intel.d: Updated.
		* testsuite/gas/i386/opcode-suffix.d: Likewise.
		* testsuite/gas/i386/opcode.d: Likewise.
		* testsuite/gas/i386/x86-64-opcode.d: Likewise.

	opcodes/

		PR gas/28088
		* i386-dis.c (dis386): Replace icebp with int1.
		* i386-opc.tbl: Add int1.
		* i386-tbl.h: Regenerate.

2021-07-14  Alan Modra  <amodra@gmail.com>

	gas: default TC_VALIDATE_FIX_SUB to 0
	gas/write.c provides a fallback TC_VALIDATE_FIX_SUB define that can be
	a problem for some targets, the problem being that a non-zero
	definition of TC_VALIDATE_FIX_SUB says that some uses of fx_subsy are
	OK, in effect that the target will handle fx_subsy in md_apply_fix
	and/or tc_gen_reloc.  A lot of targets don't have the necessary
	md_apply_fix and tc_gen_reloc support.  So a safer default is to
	disallow fx_subsy by default.

	I've had a good look over target usage of fx_subsy, and think I've
	caught all the cases where targets need TC_VALIDATE_FIX_SUB.  Possible
	failures would be limited to alpha, microblaze, ppc and s390 (the
	targets that define UNDEFINED_DIFFERENCE_OK), or targets that generate
	fixups with BFD_RELOC_GPREL32/16 and use a syntax explicitly showing
	a difference expression.

		* write.c (TC_VALIDATE_FIX_SUB): Default to 0.
		* config/tc-hppa.h (TC_VALIDATE_FIX_SUB): Define.
		* config/tc-microblaze.h (TC_VALIDATE_FIX_SUB): Define.
		* config/tc-alpha.h (TC_VALIDATE_FIX_SUB): Define for ECOFF.
		* config/tc-ppc.h (TC_VALIDATE_FIX_SUB): Don't define for ELF.
		Do define for XCOFF.

2021-07-14  Clément Chigot  <clement.chigot@atos.net>

	objdump: add DWARF support for AIX
	DWARF sections have special names on AIX which need be handled
	by objdump in order to correctly print them.
	This patch also adds the correlation in bfd for future uses.

	bfd/
		* libxcoff.h (struct xcoff_dwsect_name): Add DWARF name.
		* coff-rs6000.c (xcoff_dwsect_names): Update.
		* coffcode.h (sec_to_styp_flags): Likewise.
		(coff_new_section_hook): Likewise.
	binutils/
		* dwarf.h (struct dwarf_section): Add XCOFF name.
		* dwarf.c (struct dwarf_section_display): Update.
		* objdump.c (load_debug_section): Add XCOFF name handler.
		(dump_dwarf_section): Likewise.
	gas/
		* config/tc-ppc.c (ppc_change_debug_section): Update to
		match new name's field.

2021-07-14  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.base/gold-gdb-index.exp
	When running test-case gdb.base/gold-gdb-index.exp on openSUSE Tumbleweed,
	I run into:
	...
	FAIL: gdb.base/gold-gdb-index.exp: maint info symtabs
	...

	This is due to a dummy .gdb_index:
	...
	Contents of the .gdb_index section:

	Version 7

	CU table:

	TU table:

	Address table:

	Symbol table:
	...

	The dummy .gdb_index is ignored when loading the symbols, and instead partial
	symbols are used.  Consequently, we get the same result as if we'd removed
	-Wl,--gdb-index from the compilation.

	Presumably, gold fails to generate a proper .gdb_index because it lacks
	DWARF5 support.

	Anyway, without a proper .gdb_index we can't test the gdb behaviour we're
	trying to excercise.  Fix this by detecting whether we actually used a
	.gdb_index for symbol loading.

	Tested on x86_64-linux.

	gdb/testsuite/ChangeLog:

	2021-07-14  Tom de Vries  <tdevries@suse.de>

		* lib/gdb.exp (have_index): New proc.
		* gdb.base/gold-gdb-index.exp: Use have_index.

2021-07-14  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Add missing skip_tui_tests
	When building gdb with --disable-tui, we run into:
	...
	(gdb) frame apply all -- -^M
	Undefined command: "-".  Try "help".^M
	(gdb) ERROR: Undefined command "frame apply all -- -".
	UNRESOLVED: gdb.base/options.exp: test-frame-apply: frame apply all -- -
	...

	Fix this by detecting whether tui is supported, and skipping the tui-related
	tests otherwise.  Same in some gdb.tui test-cases.

	Tested on x86_64-linux.

	gdb/testsuite/ChangeLog:

	2021-07-13  Tom de Vries  <tdevries@suse.de>

		* gdb.base/options.exp: Skip tui-related tests when tui is not
		supported.
		* gdb.python/tui-window-disabled.exp: Same.
		* gdb.python/tui-window.exp: Same.

2021-07-14  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-13  Lancelot SIX  <lsix@lancelotsix.com>

	Use /bin/sh as shebang in gdb/make-init-c
	While testing the NixOS[1] packaging for gdb-11.0.90.tar.xz, I got the
	following error:

	  [...]
	  CXX    aarch32-tdep.o
	  CXX    gdb.o
	  GEN    init.c
	  /nix/store/26a78ync552m8j4sbjavhvkmnqir8c9y-bash-4.4-p23/bin/bash: ./make-init-c: /usr/bin/env: bad interpreter: No such file or directory
	  make[2]: *** [Makefile:1866: stamp-init] Error 126
	  make[2]: *** Waiting for unfinished jobs....
	  make[2]: Leaving directory '/build/gdb-11.0.90/gdb'
	  make[1]: *** [Makefile:9814: all-gdb] Error 2
	  make[1]: Leaving directory '/build/gdb-11.0.90'
	  make: *** [Makefile:903: all] Error 2
	  builder for '/nix/store/xs8my3rrc3l4kdlbpx0azh6q0v0jxphr-gdb-gdb-11.0.90.drv' failed with exit code 2
	  error: build of '/nix/store/xs8my3rrc3l4kdlbpx0azh6q0v0jxphr-gdb-gdb-11.0.90.drv' failed

	In the nix build environment, /usr/bin/env is not present, only /bin/sh
	is.  This patch makes sure that gdb/make-init-c uses '/bin/sh' as
	interpreter as this is the only one available on this platform.

	I do not think this change will cause regressions on any other
	configuration.

	[1] https://nixos.org/

	gdb/Changelog

		* make-init-c: Use /bin/sh as shebang.

2021-07-13  John Baldwin  <jhb@FreeBSD.org>

	arm-fbsd-nat: Use fetch_register_set and store_register_set.

	aarch64-fbsd-nat: Use fetch_register_set and store_register_set.

	riscv-fbsd-nat: Use fetch_register_set and store_register_set.

	fbsd-nat: Add helper functions to fetch and store register sets.
	In particular, this supports register sets described by a regcache_map
	which are fetched and stored with dedicated ptrace operations.  These
	functions are intended to be used in architecture-specific
	fetch_registers and store_registers target methods.

	Add regcache_map_supplies helper routine.
	This helper can be used in the fetch_registers and store_registers
	target methods to determine if a register set includes a specific
	register.

2021-07-13  Pedro Alves  <pedro@palves.net>

	Avoid letting exceptions escape gdb_bfd_iovec_fileio_close (PR gdb/28080)
	Before PR gdb/28080 was fixed by the previous patch, GDB was crashing
	like this:

	 (gdb) detach
	 Detaching from program: target:/any/program, process 3671843
	 Detaching from process 3671843
	 Ending remote debugging.
	 [Inferior 1 (process 3671843) detached]
	 In main
	 terminate called after throwing an instance of 'gdb_exception_error'
	 Aborted (core dumped)

	Here's the exception above being thrown:

	 (top-gdb) bt
	 #0  throw_error (error=TARGET_CLOSE_ERROR, fmt=0x555556035588 "Remote connection closed") at src/gdbsupport/common-exceptions.cc:222
	 #1  0x0000555555bbaa46 in remote_target::readchar (this=0x555556a11040, timeout=10000) at src/gdb/remote.c:9440
	 #2  0x0000555555bbb9e5 in remote_target::getpkt_or_notif_sane_1 (this=0x555556a11040, buf=0x555556a11058, forever=0, expecting_notif=0, is_notif=0x0) at src/gdb/remote.c:9928
	 #3  0x0000555555bbbda9 in remote_target::getpkt_sane (this=0x555556a11040, buf=0x555556a11058, forever=0) at src/gdb/remote.c:10030
	 #4  0x0000555555bc0e75 in remote_target::remote_hostio_send_command (this=0x555556a11040, command_bytes=13, which_packet=14, remote_errno=0x7fffffffcfd0, attachment=0x0, attachment_len=0x0) at src/gdb/remote.c:12137
	 #5  0x0000555555bc1b6c in remote_target::remote_hostio_close (this=0x555556a11040, fd=8, remote_errno=0x7fffffffcfd0) at src/gdb/remote.c:12455
	 #6  0x0000555555bc1bb4 in remote_target::fileio_close (During symbol reading: .debug_line address at offset 0x64f417 is 0 [in module build/gdb/gdb]
	 this=0x555556a11040, fd=8, remote_errno=0x7fffffffcfd0) at src/gdb/remote.c:12462
	 #7  0x0000555555c9274c in target_fileio_close (fd=3, target_errno=0x7fffffffcfd0) at src/gdb/target.c:3365
	 #8  0x000055555595a19d in gdb_bfd_iovec_fileio_close (abfd=0x555556b9f8a0, stream=0x555556b11530) at src/gdb/gdb_bfd.c:439
	 #9  0x0000555555e09e3f in opncls_bclose (abfd=0x555556b9f8a0) at src/bfd/opncls.c:599
	 #10 0x0000555555e0a2c7 in bfd_close_all_done (abfd=0x555556b9f8a0) at src/bfd/opncls.c:847
	 #11 0x0000555555e0a27a in bfd_close (abfd=0x555556b9f8a0) at src/bfd/opncls.c:814
	 #12 0x000055555595a9d3 in gdb_bfd_close_or_warn (abfd=0x555556b9f8a0) at src/gdb/gdb_bfd.c:626
	 #13 0x000055555595ad29 in gdb_bfd_unref (abfd=0x555556b9f8a0) at src/gdb/gdb_bfd.c:715
	 #14 0x0000555555ae4730 in objfile::~objfile (this=0x555556515540, __in_chrg=<optimized out>) at src/gdb/objfiles.c:573
	 #15 0x0000555555ae955a in std::_Sp_counted_ptr<objfile*, (__gnu_cxx::_Lock_policy)2>::_M_dispose (this=0x555556c20db0) at /usr/include/c++/9/bits/shared_ptr_base.h:377
	 #16 0x000055555572b7c8 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x555556c20db0) at /usr/include/c++/9/bits/shared_ptr_base.h:155
	 #17 0x00005555557263c3 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x555556bf0588, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/shared_ptr_base.h:730
	 #18 0x0000555555ae745e in std::__shared_ptr<objfile, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x555556bf0580, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/shared_ptr_base.h:1169
	 #19 0x0000555555ae747e in std::shared_ptr<objfile>::~shared_ptr (this=0x555556bf0580, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/shared_ptr.h:103
	 #20 0x0000555555b1c1dc in __gnu_cxx::new_allocator<std::_List_node<std::shared_ptr<objfile> > >::destroy<std::shared_ptr<objfile> > (this=0x5555564cdd60, __p=0x555556bf0580) at /usr/include/c++/9/ext/new_allocator.h:153
	 #21 0x0000555555b1bb1d in std::allocator_traits<std::allocator<std::_List_node<std::shared_ptr<objfile> > > >::destroy<std::shared_ptr<objfile> > (__a=..., __p=0x555556bf0580) at /usr/include/c++/9/bits/alloc_traits.h:497
	 #22 0x0000555555b1b73e in std::__cxx11::list<std::shared_ptr<objfile>, std::allocator<std::shared_ptr<objfile> > >::_M_erase (this=0x5555564cdd60, __position=std::shared_ptr<objfile> (expired, weak count 1) = {get() = 0x555556515540}) at /usr/include/c++/9/bits/stl_list.h:1921
	 #23 0x0000555555b1afeb in std::__cxx11::list<std::shared_ptr<objfile>, std::allocator<std::shared_ptr<objfile> > >::erase (this=0x5555564cdd60, __position=std::shared_ptr<objfile> (expired, weak count 1) = {get() = 0x555556515540}) at /usr/include/c++/9/bits/list.tcc:158
	 #24 0x0000555555b19576 in program_space::remove_objfile (this=0x5555564cdd20, objfile=0x555556515540) at src/gdb/progspace.c:210
	 #25 0x0000555555ae4502 in objfile::unlink (this=0x555556515540) at src/gdb/objfiles.c:487
	 #26 0x0000555555ae5a12 in objfile_purge_solibs () at src/gdb/objfiles.c:875
	 #27 0x0000555555c09686 in no_shared_libraries (ignored=0x0, from_tty=1) at src/gdb/solib.c:1236
	 #28 0x00005555559e3f5f in detach_command (args=0x0, from_tty=1) at src/gdb/infcmd.c:2769

	Note frame #14:

	 #14 0x0000555555ae4730 in objfile::~objfile (this=0x555556515540, __in_chrg=<optimized out>) at src/gdb/objfiles.c:573

	That's a dtor, thus noexcept.  That's the reason for the
	std::terminate.

	The previous patch fixed things such that the exception above isn't
	thrown anymore.  However, it's possible that e.g., the remote
	connection drops just while a user types "nosharedlibrary", or some
	other reason that leads to objfile::~objfile, and then we end up the
	same std::terminate problem.

	Also notice that frames #9-#11 are BFD frames:

	 #9  0x0000555555e09e3f in opncls_bclose (abfd=0x555556bc27e0) at src/bfd/opncls.c:599
	 #10 0x0000555555e0a2c7 in bfd_close_all_done (abfd=0x555556bc27e0) at src/bfd/opncls.c:847
	 #11 0x0000555555e0a27a in bfd_close (abfd=0x555556bc27e0) at src/bfd/opncls.c:814

	BFD is written in C and thus throwing exceptions over such frames may
	either not clean up properly, or, may abort if bfd is not compiled
	with -fasynchronous-unwind-tables (x86-64 defaults that on, but not
	all GCC ports do).

	Thus frame #8 seems like a good place to swallow exceptions.  More so
	since in this spot we already ignore target_fileio_close return
	errors.  That's what this commit does.  Without the previous fix, we'd
	see:

	 (gdb) detach
	 Detaching from program: target:/any/program, process 2197701
	 Ending remote debugging.
	 [Inferior 1 (process 2197701) detached]
	 warning: cannot close "target:/lib64/ld-linux-x86-64.so.2": Remote connection closed

	Note it prints a warning, which would still be a regression compared
	to GDB 10, if it weren't for the previous fix.

	gdb/ChangeLog:
	yyyy-mm-dd  Pedro Alves  <pedro@palves.net>

		PR gdb/28080
		* gdb_bfd.c (gdb_bfd_close_warning): New.
		(gdb_bfd_iovec_fileio_close): Wrap target_fileio_close in
		try/catch and print warning on exception.
		(gdb_bfd_close_or_warn): Use gdb_bfd_close_warning.

	Change-Id: Ic7a26ddba0a4444e3377b0e7c1c89934a84545d7

2021-07-13  Pedro Alves  <pedro@palves.net>

	Fix detach with target remote (PR gdb/28080)
	Commit 408f66864a1a823591b26420410c982174c239a2 ("detach in all-stop
	with threads running") regressed "detach" with "target remote":

	 (gdb) detach
	 Detaching from program: target:/any/program, process 3671843
	 Detaching from process 3671843
	 Ending remote debugging.
	 [Inferior 1 (process 3671843) detached]
	 In main
	 terminate called after throwing an instance of 'gdb_exception_error'
	 Aborted (core dumped)

	Here's the exception above being thrown:

	 (top-gdb) bt
	 #0  throw_error (error=TARGET_CLOSE_ERROR, fmt=0x555556035588 "Remote connection closed") at src/gdbsupport/common-exceptions.cc:222
	 #1  0x0000555555bbaa46 in remote_target::readchar (this=0x555556a11040, timeout=10000) at src/gdb/remote.c:9440
	 #2  0x0000555555bbb9e5 in remote_target::getpkt_or_notif_sane_1 (this=0x555556a11040, buf=0x555556a11058, forever=0, expecting_notif=0, is_notif=0x0) at src/gdb/remote.c:9928
	 #3  0x0000555555bbbda9 in remote_target::getpkt_sane (this=0x555556a11040, buf=0x555556a11058, forever=0) at src/gdb/remote.c:10030
	 #4  0x0000555555bc0e75 in remote_target::remote_hostio_send_command (this=0x555556a11040, command_bytes=13, which_packet=14, remote_errno=0x7fffffffcfd0, attachment=0x0, attachment_len=0x0) at src/gdb/remote.c:12137
	 #5  0x0000555555bc1b6c in remote_target::remote_hostio_close (this=0x555556a11040, fd=8, remote_errno=0x7fffffffcfd0) at src/gdb/remote.c:12455
	 #6  0x0000555555bc1bb4 in remote_target::fileio_close (During symbol reading: .debug_line address at offset 0x64f417 is 0 [in module build/gdb/gdb]
	 this=0x555556a11040, fd=8, remote_errno=0x7fffffffcfd0) at src/gdb/remote.c:12462
	 #7  0x0000555555c9274c in target_fileio_close (fd=3, target_errno=0x7fffffffcfd0) at src/gdb/target.c:3365
	 #8  0x000055555595a19d in gdb_bfd_iovec_fileio_close (abfd=0x555556b9f8a0, stream=0x555556b11530) at src/gdb/gdb_bfd.c:439
	 #9  0x0000555555e09e3f in opncls_bclose (abfd=0x555556b9f8a0) at src/bfd/opncls.c:599
	 #10 0x0000555555e0a2c7 in bfd_close_all_done (abfd=0x555556b9f8a0) at src/bfd/opncls.c:847
	 #11 0x0000555555e0a27a in bfd_close (abfd=0x555556b9f8a0) at src/bfd/opncls.c:814
	 #12 0x000055555595a9d3 in gdb_bfd_close_or_warn (abfd=0x555556b9f8a0) at src/gdb/gdb_bfd.c:626
	 #13 0x000055555595ad29 in gdb_bfd_unref (abfd=0x555556b9f8a0) at src/gdb/gdb_bfd.c:715
	 #14 0x0000555555ae4730 in objfile::~objfile (this=0x555556515540, __in_chrg=<optimized out>) at src/gdb/objfiles.c:573
	 #15 0x0000555555ae955a in std::_Sp_counted_ptr<objfile*, (__gnu_cxx::_Lock_policy)2>::_M_dispose (this=0x555556c20db0) at /usr/include/c++/9/bits/shared_ptr_base.h:377
	 #16 0x000055555572b7c8 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x555556c20db0) at /usr/include/c++/9/bits/shared_ptr_base.h:155
	 #17 0x00005555557263c3 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x555556bf0588, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/shared_ptr_base.h:730
	 #18 0x0000555555ae745e in std::__shared_ptr<objfile, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x555556bf0580, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/shared_ptr_base.h:1169
	 #19 0x0000555555ae747e in std::shared_ptr<objfile>::~shared_ptr (this=0x555556bf0580, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/shared_ptr.h:103
	 #20 0x0000555555b1c1dc in __gnu_cxx::new_allocator<std::_List_node<std::shared_ptr<objfile> > >::destroy<std::shared_ptr<objfile> > (this=0x5555564cdd60, __p=0x555556bf0580) at /usr/include/c++/9/ext/new_allocator.h:153
	 #21 0x0000555555b1bb1d in std::allocator_traits<std::allocator<std::_List_node<std::shared_ptr<objfile> > > >::destroy<std::shared_ptr<objfile> > (__a=..., __p=0x555556bf0580) at /usr/include/c++/9/bits/alloc_traits.h:497
	 #22 0x0000555555b1b73e in std::__cxx11::list<std::shared_ptr<objfile>, std::allocator<std::shared_ptr<objfile> > >::_M_erase (this=0x5555564cdd60, __position=std::shared_ptr<objfile> (expired, weak count 1) = {get() = 0x555556515540}) at /usr/include/c++/9/bits/stl_list.h:1921
	 #23 0x0000555555b1afeb in std::__cxx11::list<std::shared_ptr<objfile>, std::allocator<std::shared_ptr<objfile> > >::erase (this=0x5555564cdd60, __position=std::shared_ptr<objfile> (expired, weak count 1) = {get() = 0x555556515540}) at /usr/include/c++/9/bits/list.tcc:158
	 #24 0x0000555555b19576 in program_space::remove_objfile (this=0x5555564cdd20, objfile=0x555556515540) at src/gdb/progspace.c:210
	 #25 0x0000555555ae4502 in objfile::unlink (this=0x555556515540) at src/gdb/objfiles.c:487
	 #26 0x0000555555ae5a12 in objfile_purge_solibs () at src/gdb/objfiles.c:875
	 #27 0x0000555555c09686 in no_shared_libraries (ignored=0x0, from_tty=1) at src/gdb/solib.c:1236
	 #28 0x00005555559e3f5f in detach_command (args=0x0, from_tty=1) at src/gdb/infcmd.c:2769

	So frame #28 already detached the remote process, and then we're
	purging the shared libraries.  GDB had opened remote shared libraries
	via the target: sysroot, so it tries closing them.  GDBserver is
	tearing down already, so remote communication breaks down and we close
	the remote target and throw TARGET_CLOSE_ERROR.

	Note frame #14:

	 #14 0x0000555555ae4730 in objfile::~objfile (this=0x555556515540, __in_chrg=<optimized out>) at src/gdb/objfiles.c:573

	That's a dtor, thus noexcept.  That's the reason for the
	std::terminate.

	Stepping back a bit, why do we still have open remote files if we've
	managed to detach already, and, we're debugging with "target remote"?
	The reason is that commit 408f66864a1a823591b26420410c982174c239a2
	makes detach_command hold a reference to the target, so the remote
	target won't be finally closed until frame #28 returns.  It's closing
	the target that invalidates target file I/O handles.

	This commit fixes the issue by not relying on target_close to
	invalidate the target file I/O handles, instead invalidate them
	immediately in remote_unpush_target.  So when GDB purges the solibs,
	and we end up in target_fileio_close (frame #7 above), there's nothing
	to do, and we don't try to talk with the remote target anymore.

	The regression isn't seen when testing with
	--target_board=native-gdbserver, because that does "set sysroot" to
	disable the "target:" sysroot, for test run speed reasons.  So this
	commit adds a testcase that explicitly tests detach with "set sysroot
	target:".

	gdb/ChangeLog:
	yyyy-mm-dd  Pedro Alves  <pedro@palves.net>

		PR gdb/28080
		* remote.c (remote_unpush_target): Invalidate file I/O target
		handles.
		* target.c (fileio_handles_invalidate_target): Make extern.
		* target.h (fileio_handles_invalidate_target): Declare.

	gdb/testsuite/ChangeLog:
	yyyy-mm-dd  Pedro Alves  <pedro@palves.net>

		PR gdb/28080
		* gdb.base/detach-sysroot-target.exp: New.
		* gdb.base/detach-sysroot-target.c: New.

	Reported-By: Jonah Graham <jonah@kichwacoders.com>

	Change-Id: I851234910172f42a1b30e731161376c344d2727d

2021-07-13  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix check-libthread-db.exp FAILs with glibc 2.33
	When running test-case gdb.threads/check-libthread-db.exp on openSUSE
	Tumbleweed with glibc 2.33, I get:
	...
	(gdb) maint check libthread-db^M
	Running libthread_db integrity checks:^M
	  Got thread 0x7ffff7c79b80 => 9354 => 0x7ffff7c79b80; errno = 0 ... OK^M
	libthread_db integrity checks passed.^M
	(gdb) FAIL: gdb.threads/check-libthread-db.exp: user-initiated check: \
	  libpthread.so not initialized (pattern 2)
	...

	The test-case expects instead:
	...
	  Got thread 0x0 => 9354 => 0x0 ... OK^M
	...
	which is what I get on openSUSE Leap 15.2 with glibc 2.26, and what is
	described in the test-case like this:
	...
	    # libthread_db should fake a single thread with th_unique == NULL.
	...

	Using a breakpoint on check_thread_db_callback we can compare the two
	scenarios, and find that in the latter case we hit this code in glibc function
	iterate_thread_list in nptl_db/td_ta_thr_iter.c:
	...
	  if (next == 0 && fake_empty)
	    {
	      /* __pthread_initialize_minimal has not run.  There is just the main
	         thread to return.  We cannot rely on its thread register.  They
	         sometimes contain garbage that would confuse us, left by the
	         kernel at exec.  So if it looks like initialization is incomplete,
	         we only fake a special descriptor for the initial thread.  */
	      td_thrhandle_t th = { ta, 0 };
	      return callback (&th, cbdata_p) != 0 ? TD_DBERR : TD_OK;
	    }
	...
	while in the former case we don't because this preceding statement doesn't
	result in next == 0:
	...
	  err = DB_GET_FIELD (next, ta, head, list_t, next, 0);
	...

	Note that the comment mentions __pthread_initialize_minimal, but in both cases
	it has already run before we hit the callback, so it's possible the comment is
	no longer accurate.

	The change in behaviour bisect to glibc commit 1daccf403b "nptl: Move stack
	list variables into _rtld_global", which moves the initialization of stack
	list variables such as __stack_user to an earlier moment, which explains well
	enough the observed difference.

	Fix this by updating the regexp patterns to agree with what libthread-db is
	telling us.

	Tested on x86_64-linux, both with glibc 2.33 and 2.26.

	gdb/testsuite/ChangeLog:

	2021-07-07  Tom de Vries  <tdevries@suse.de>

		PR testsuite/27690
		* gdb.threads/check-libthread-db.exp: Update patterns for glibc 2.33.

2021-07-13  Felix Willgerodt  <felix.willgerodt@intel.com>

	gdb, dwarf: Don't follow the parent of a subprogram to get a prefix.
	During prefix resolution, if the parent is a subprogram, there is no need
	to go to the parent of the subprogram.  The DIE will be local.

	For a program like:
	~~~
	  class F1
	  {
	  public:
	    int a;
	    int
	    vvv ()
	    {
	      class F2
	      {
		int f;
	      };
	      F2 abcd;
	      return 1;
	    }
	  };
	~~~

	The class F2 should not be seen as a member of F1.

	Before:
	~~~
	(gdb) ptype abcd
	type = class F1::F2 {
	  private:
	    int f;
	}
	~~~

	After:
	~~~
	(gdb) ptype abcd
	type = class F2 {
	  private:
	    int f;
	}
	~~~

	gdb/ChangeLog:
	2021-06-23  Felix Willgerodt  <felix.willgerodt@intel.com>

		* dwarf2/read.c (determine_prefix): Return an empty prefix if the
		parent is a subprogram.

	gdb/testsuite/ChangeLog:
	2021-06-23  Felix Willgerodt  <felix.willgerodt@intel.com>

		* gdb.cp/nested-class-func-class.cc: New file.
		* gdb.cp/nested-class-func-class.exp: New file.

2021-07-13  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: disable commit-resumed on -exec-interrupt --thread-group
	As reported in PR gdb/28077, we hit an internal error when using
	-exec-interrupt with --thread-group:

	    info threads
	    &"info threads\n"
	    ~"  Id   Target Id             Frame \n"
	    ~"* 1    process 403312 \"loop\" (running)\n"
	    ^done
	    (gdb)
	    -exec-interrupt --thread-group i1
	    ~"/home/simark/src/binutils-gdb/gdb/target.c:3768: internal-error: void target_stop(ptid_t): Assertion `!proc_target->commit_resumed_state' failed.\nA problem internal to GDB has been detected,\nfurther debugging may prove unreliable.\nQuit this debugging session? (y or n) "

	This is because this code path never disables commit-resumed (a
	requirement for calling target_stop, as documented in
	process_stratum_target::»commit_resumed_state) before calling
	target_stop.

	The other 3 code paths in mi_cmd_exec_interrupt use interrupt_target_1,
	which does it.  But the --thread-group code path uses its own thing
	which doesn't do it.  Fix this by adding a scoped_disable_commit_resumed
	in this code path.

	Calling -exec-interrupt with --thread-group is apparently not tested at
	the moment (which is why this bug could creep in).  Add a new test for
	that.  The test runs two inferiors and tries to interrupt them with
	"-exec-interrupt --thread-group X".

	This will need to be merged in the gdb-11-branch, so here are ChangeLog
	entries:

	gdb/ChangeLog:

		* mi/mi-main.c (mi_cmd_exec_interrupt): Use
		scoped_disable_commit_resumed in the --thread-group case.

	gdb/testsuite/ChangeLog:

		* gdb.mi/interrupt-thread-group.c: New.
		* gdb.mi/interrupt-thread-group.exp: New.

	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28077
	Change-Id: I615efefcbcaf2c15d47caf5e4b9d82854b2a2fcb

2021-07-13  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: Enable elf attributes when default configure option isn't set.
	Since gcc commit, 3c70b3ca1ef58f302bf8c16d9e7c7bb8626408bf, we now enable
	elf attributes for all riscv targets by default in gcc.  Therefore, I
	think binutils should have the same behavior, in case users are writing
	assembly files.  If --enable-default-riscv-attribute isn't set, then we
	enable the elf attributes for all riscv targets by default.

	ChangLog:

	binutils/

		* testsuite/binutils-all/readelf.s: Add comments for riscv.
		* testsuite/binutils-all/readelf.s-64: Likewise.
		* testsuite/binutils-all/readelf.s-64-unused: Likewise.
		* testsuite/binutils-all/readelf.ss: Likewise.
		* testsuite/binutils-all/readelf.ss-64: Likewise.
		* testsuite/binutils-all/readelf.ss-64-unused: Likewise.

	gas/

		* configure.ac: If --enable-default-riscv-attribute isn't set,
		then we enable the elf attributes for all riscv targets by
		default.
		* configure: Regenerated.

2021-07-13  John Ericson  <git@JohnEricson.me>

	Fix some dangling references to `netbsd-tdep`
	These files were renamed in 1b71cfcfdc3e13a655fefa6566b5564cec044c10,
	but evidentially a few dangling references were left behind. This causes
	builds to fail:

	    $ ./configure --target i686-netbsdelf
	    $ make
	    make: *** No rule to make target 'nbsd-tdep.c', needed by 'nbsd-tdep.o'.  Stop.

2021-07-13  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: optimize all_matching_threads_iterator
	all_matching_threads_iterator is used extensively in some pretty fast
	paths, often under the all_non_exited_threads function.

	If a filter target and thread-specific ptid are given, it iterates on
	all threads of all inferiors of that target, to ultimately yield exactly
	on thread.  And this happens quite often, which means we unnecessarily
	spend time iterating on threads to find the one we are looking for.  The
	same thing happens if an inferior-specific ptid is given, although there
	the iterator yields all the threads of that inferior.

	In those cases, the callers of all_non_exited_threads could have
	different behaviors depending on the kind of ptid, to avoid this
	inefficiency, but that would be very tedious.  Using
	all_non_exited_threads has the advantage that one simple implementation
	can work seamlessly on multiple threads or on one specific thread, just
	by playing with the ptid.

	Instead, optimize all_matching_threads_iterator directly to detect these
	different cases and limiting what we iterate on to just what we need.

	 - if filter_ptid is minus_one_ptid, do as we do now: filter inferiors
	   based on filter_target, iterate on all of the matching inferiors'
	   threads
	 - if filter_ptid is a pid-only ptid (then a filter_target must
	   necessarily be given), look up that inferior and iterate on all its
	   threads
	 - otherwise, filter_ptid is a thread-specific ptid, so look up that
	   specific thread and "iterate" only on it

	For the last case, what was an iteration on all threads of the filter
	target now becomes a call to find_thread_ptid, which is quite efficient
	now thanks to inferior::ptid_thread_map.

	gdb/ChangeLog:

		* thread-iter.h (class all_matching_threads_iterator)
		<all_matching_threads_iterator>: Use default.
		<enum class mode>: New.
		<m_inf, m_thr>: Initialize.
		<m_filter_ptid>: Remove.
		* thread-iter.c (all_matching_threads_iterator::m_inf_matches):
		Don't filter on m_filter_ptid.
		(all_matching_threads_iterator::all_matching_threads_iterator):
		Choose path based on filter_ptid (all threads, all threads of
		inferior, single thread).
		(all_matching_threads_iterator::advance): Likewise.

	Change-Id: Ic6a19845f5f760fa1b8eac8145793c0ff431bbc9

2021-07-13  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: maintain ptid -> thread map, optimize find_thread_ptid
	When debugging a large number of threads (thousands), looking up a
	thread by ptid_t using the inferior::thread_list linked list can add up.

	Add inferior::thread_map, an std::unordered_map indexed by ptid_t, and
	change the find_thread_ptid function to look up a thread using
	std::unordered_map::find, instead of iterating on all of the
	inferior's threads.  This should make it faster to look up a thread
	from its ptid.

	Change-Id: I3a8da0a839e18dee5bb98b8b7dbeb7f3dfa8ae1c
	Co-Authored-By: Pedro Alves <pedro@palves.net>

2021-07-13  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: optimize selection of resumed thread with pending event
	Consider a case where many threads (thousands) keep hitting a breakpoint
	whose condition evaluates to false.  random_pending_event_thread is
	responsible for selecting a thread from an inferior among all that are
	resumed with a pending wait status.  It is currently implemented by
	walking the inferior's thread list twice: once to count the number of
	candidates and once to select a random one.

	Since we now maintain a per target list of resumed threads with pending
	event, we can implement this more efficiently by walking that list and
	selecting the first thread that matches the criteria
	(random_pending_event_thread looks for an thread from a specific
	inferior, and possibly a filter ptid).  It will be faster especially in
	the common case where there isn't any resumed thread with pending
	event.  Currently, we have to iterate the thread list to figure this
	out.  With this patch, the list of resumed threads with pending event
	will be empty, so it's quick to figure out.

	The random selection is kept, but is moved to
	process_stratum_target::random_resumed_with_pending_wait_status.  The
	same technique is used: do a first pass to count the number of
	candidates, and do a second pass to select a random one.  But given that
	the list of resumed threads with pending wait statuses will generally be
	short, or at least shorter than the full thread list, it should be
	quicker.

	Note that this isn't completely true, in case there are multiple
	inferiors on the same target.  Imagine that inferior A has 10k resumed
	threads with pending wait statuses, and random_pending_event_thread is
	called with inferior B.  We'll need to go through the list that contains
	inferior A's threads to realize that inferior B has no resumed threads
	with pending wait status.  But I think that this is a corner /
	pathological case.  And a possible fix for this situation would be to
	make random_pending_event_thread work per-process-target, rather than
	per-inferior.

	Change-Id: I1b71d01beaa500a148b5b9797745103e13917325

2021-07-13  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: optimize check for resumed threads with pending wait status in maybe_set_commit_resumed_all_targets
	Consider a test case where many threads (thousands) keep hitting a
	breakpoint whose condition evaluates to false.
	maybe_set_commit_resumed_all_targets is called at each handled event,
	when the scoped_disable_commit_resumed object in fetch_inferior_event is
	reset_and_commit-ed.  One particularly expensive check in there is
	whether the target has at least one resumed thread with a pending wait
	status (in which case, we don't want to commit the resumed threads, as
	we want to consume this status first).  It is currently implemented as
	walking all threads of the target.

	Since we now maintain a per-target list of resumed threads with pending
	status, we can do this check efficiently, by checking whether that list
	is empty or not.

	Add the process_stratum_target::has_resumed_with_pending_wait_status
	method for this, and use it in maybe_set_commit_resumed_all_targets.

	Change-Id: Ia1595baa1b358338f94fc3cb3af7f27092dad5b6

2021-07-13  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: maintain per-process-target list of resumed threads with pending wait status
	Looking up threads that are both resumed and have a pending wait
	status to report is something that we do quite often in the fast path
	and is expensive if there are many threads, since it currently requires
	walking whole thread lists.

	The first instance is in maybe_set_commit_resumed_all_targets.  This is
	called after handling each event in fetch_inferior_event, to see if we
	should ask targets to commit their resumed threads or not.  If at least
	one thread is resumed but has a pending wait status, we don't ask the
	targets to commit their resumed threads, because we want to consume and
	handle the pending wait status first.

	The second instance is in random_pending_event_thread, where we want to
	select a random thread among all those that are resumed and have a
	pending wait status.  This is called every time we try to consume
	events, to see if there are any pending events that we we want to
	consume, before asking the targets for more events.

	To allow optimizing these cases, maintain a per-process-target list of
	threads that are resumed and have a pending wait status.

	In maybe_set_commit_resumed_all_targets, we'll be able to check in O(1)
	if there are any such threads simply by checking whether the list is
	empty.

	In random_pending_event_thread, we'll be able to use that list, which
	will be quicker than iterating the list of threads, especially when
	there are no resumed with pending wait status threads.

	About implementation details: using the new setters on class
	thread_info, it's relatively easy to maintain that list.  Any time the
	"resumed" or "pending wait status" property is changed, we check whether
	that should cause the thread to be added or removed from the list.

	In set_thread_exited, we try to remove the thread from the list, because
	keeping an exited thread in that list would make no sense (especially if
	the thread is freed).  My first implementation assumed that a process
	stratum target was always present when set_thread_exited is called.
	That's however, not the case: in some cases, targets unpush themselves
	from an inferior and then call "exit_inferior", which exits all the
	threads.  If the target is unpushed before set_thread_exited is called
	on the threads, it means we could mistakenly leave some threads in the
	list.  I tried to see how hard it would be to make it such that targets
	have to exit all threads before unpushing themselves from the inferior
	(that would seem logical to me, we don't want threads belonging to an
	inferior that has no process target).  That seemed quite difficult and
	not worth the time at the moment.  Instead, I changed
	inferior::unpush_target to remove all threads of that inferior from the
	list.

	As of this patch, the list is not used, this is done in the subsequent
	patches.

	The debug messages in process-stratum-target.c need to print some ptids.
	However, they can't use target_pid_to_str to print them without
	introducing a dependency on the current inferior (the current inferior
	is used to get the current target stack).  For debug messages, I find it
	clearer to print the spelled out ptid anyway (the pid, lwp and tid
	values).  Add a ptid_t::to_string method that returns a string
	representation of the ptid that is meant for debug messages, a bit like
	we already have frame_id::to_string.

	Change-Id: Iad8f93db2d13984dd5aa5867db940ed1169dbb67

2021-07-13  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: make thread_info::suspend private, add getters / setters
	A following patch will want to take some action when a pending wait
	status is set on or removed from a thread.  Add a getter and a setter on
	thread_info for the pending waitstatus, so that we can add some code in
	the setter later.

	The thing is, the pending wait status field is in the
	thread_suspend_state, along with other fields that we need to backup
	before and restore after the thread does an inferior function call.
	Therefore, make the thread_suspend_state member private
	(thread_info::suspend becomes thread_info::m_suspend), and add getters /
	setters for all of its fields:

	 - pending wait status
	 - stop signal
	 - stop reason
	 - stop pc

	For the pending wait status, add the additional has_pending_waitstatus
	and clear_pending_waitstatus methods.

	I think this makes the thread_info interface a bit nicer, because we
	now access the fields as:

	  thread->stop_pc ()

	rather than

	  thread->suspend.stop_pc

	The stop_pc field being in the `suspend` structure is an implementation
	detail of thread_info that callers don't need to be aware of.

	For the backup / restore of the thread_suspend_state structure, add
	save_suspend_to and restore_suspend_from methods.  You might wonder why
	`save_suspend_to`, as opposed to a simple getter like

	  thread_suspend_state &suspend ();

	I want to make it clear that this is to be used only for backing up and
	restoring the suspend state, _not_ to access fields like:

	  thread->suspend ()->stop_pc

	Adding some getters / setters allows adding some assertions.  I find
	that this helps understand how things are supposed to work.  Add:

	 - When getting the pending status (pending_waitstatus method), ensure
	   that there is a pending status.
	 - When setting a pending status (set_pending_waitstatus method), ensure
	   there is no pending status.

	There is one case I found where this wasn't true - in
	remote_target::process_initial_stop_replies - which needed adjustments
	to respect that contract.  I think it's because
	process_initial_stop_replies is kind of (ab)using the
	thread_info::suspend::waitstatus to store some statuses temporarily, for
	its internal use (statuses it doesn't intent on leaving pending).

	process_initial_stop_replies pulls out stop replies received during the
	initial connection using target_wait.  It always stores the received
	event in `evthread->suspend.waitstatus`.  But it only sets
	waitstatus_pending_p, if it deems the event interesting enough to leave
	pending, to be reported to the core:

	      if (ws.kind != TARGET_WAITKIND_STOPPED
		  || ws.value.sig != GDB_SIGNAL_0)
		evthread->suspend.waitstatus_pending_p = 1;

	It later uses this flag a bit below, to choose which thread to make the
	"selected" one:

	      if (selected == NULL
		  && thread->suspend.waitstatus_pending_p)
		selected = thread;

	And ultimately that's used if the user-visible mode is all-stop, so that
	we print the stop for that interesting thread:

	  /* In all-stop, we only print the status of one thread, and leave
	     others with their status pending.  */
	  if (!non_stop)
	    {
	      thread_info *thread = selected;
	      if (thread == NULL)
		thread = lowest_stopped;
	      if (thread == NULL)
		thread = first;

	      print_one_stopped_thread (thread);
	    }

	But in any case (all-stop or non-stop), print_one_stopped_thread needs
	to access the waitstatus value of these threads that don't have a
	pending waitstatus (those that had TARGET_WAITKIND_STOPPED +
	GDB_SIGNAL_0).  This doesn't work with the assertions I've
	put.

	So, change the code to only set the thread's wait status if it is an
	interesting one that we are going to leave pending.  If the thread
	stopped due to a non-interesting event (TARGET_WAITKIND_STOPPED +
	GDB_SIGNAL_0), don't store it.  Adjust print_one_stopped_thread to
	understand that if a thread has no pending waitstatus, it's because it
	stopped with TARGET_WAITKIND_STOPPED + GDB_SIGNAL_0.

	The call to set_last_target_status also uses the pending waitstatus.
	However, given that the pending waitstatus for the thread may have been
	cleared in print_one_stopped_thread (and that there might not even be a
	pending waitstatus in the first place, as explained above), it is no
	longer possible to do it at this point.  To fix that, move the call to
	set_last_target_status in print_one_stopped_thread.  I think this will
	preserve the existing behavior, because set_last_target_status is
	currently using the current thread's wait status.  And the current
	thread is the last one for which print_one_stopped_thread is called.  So
	by calling set_last_target_status in print_one_stopped_thread, we'll get
	the same result.  set_last_target_status will possibly be called
	multiple times, but only the last call will matter.  It just means
	possibly more calls to set_last_target_status, but those are cheap.

	Change-Id: Iedab9653238eaf8231abcf0baa20145acc8b77a7

2021-07-13  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: add setter / getter for thread_info resumed state
	A following patch will want to do things when a thread's resumed state
	changes.  Make the `resumed` field private (renamed to `m_resumed`) and
	add a getter and a setter for it.  The following patch in question will
	therefore be able to add some code to the setter.

	Change-Id: I360c48cc55a036503174313261ce4e757d795319

2021-07-13  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: use intrusive list for step-over chain
	The threads that need a step-over are currently linked using an
	hand-written intrusive doubly-linked list, so that seems a very good
	candidate for intrusive_list, convert it.

	For this, we have a use case of appending a list to another one (in
	start_step_over).  Based on the std::list and Boost APIs, add a splice
	method.  However, only support splicing the other list at the end of the
	`this` list, since that's all we need.

	Add explicit default assignment operators to
	reference_to_pointer_iterator, which are otherwise implicitly deleted.
	This is needed because to define thread_step_over_list_safe_iterator, we
	wrap reference_to_pointer_iterator inside a basic_safe_iterator, and
	basic_safe_iterator needs to be able to copy-assign the wrapped
	iterator.  The move-assignment operator is therefore not needed, only
	the copy-assignment operator is.  But for completeness, add both.

	Change-Id: I31b2ff67c7b78251314646b31887ef1dfebe510c

2021-07-13  Pedro Alves  <pedro@palves.net>

	gdb: make inferior_list use intrusive_list
	Change inferior_list, the global list of inferiors, to use
	intrusive_list.  I think most other changes are somewhat obvious
	fallouts from this change.

	There is a small change in behavior in scoped_mock_context.  Before this
	patch, constructing a scoped_mock_context would replace the whole
	inferior list with only the new mock inferior.  Tests using two
	scoped_mock_contexts therefore needed to manually link the two inferiors
	together, as the second scoped_mock_context would bump the first mock
	inferior from the thread list.  With this patch, a scoped_mock_context
	adds its mock inferior to the inferior list on construction, and removes
	it on destruction.  This means that tests run with mock inferiors in the
	inferior list in addition to any pre-existing inferiors (there is always
	at least one).  There is no possible pid clash problem, since each
	scoped mock inferior uses its own process target, and pids are per
	process target.

	Co-Authored-By: Simon Marchi <simon.marchi@efficios.com>
	Change-Id: I7eb6a8f867d4dcf8b8cd2dcffd118f7270756018

2021-07-13  Pedro Alves  <pedro@palves.net>

	gdb: introduce intrusive_list, make thread_info use it
	GDB currently has several objects that are put in a singly linked list,
	by having the object's type have a "next" pointer directly.  For
	example, struct thread_info and struct inferior.  Because these are
	simply-linked lists, and we don't keep track of a "tail" pointer, when
	we want to append a new element on the list, we need to walk the whole
	list to find the current tail.  It would be nice to get rid of that
	walk.  Removing elements from such lists also requires a walk, to find
	the "previous" position relative to the element being removed.  To
	eliminate the need for that walk, we could make those lists
	doubly-linked, by adding a "prev" pointer alongside "next".  It would be
	nice to avoid the boilerplate associated with maintaining such a list
	manually, though.  That is what the new intrusive_list type addresses.

	With an intrusive list, it's also possible to move items out of the
	list without destroying them, which is interesting in our case for
	example for threads, when we exit them, but can't destroy them
	immediately.  We currently keep exited threads on the thread list, but
	we could change that which would simplify some things.

	Note that with std::list, element removal is O(N).  I.e., with
	std::list, we need to walk the list to find the iterator pointing to
	the position to remove.  However, we could store a list iterator
	inside the object as soon as we put the object in the list, to address
	it, because std::list iterators are not invalidated when other
	elements are added/removed.  However, if you need to put the same
	object in more than one list, then std::list<object> doesn't work.
	You need to instead use std::list<object *>, which is less efficient
	for requiring extra memory allocations.  For an example of an object
	in multiple lists, see the step_over_next/step_over_prev fields in
	thread_info:

	  /* Step-over chain.  A thread is in the step-over queue if these are
	     non-NULL.  If only a single thread is in the chain, then these
	     fields point to self.  */
	  struct thread_info *step_over_prev = NULL;
	  struct thread_info *step_over_next = NULL;

	The new intrusive_list type gives us the advantages of an intrusive
	linked list, while avoiding the boilerplate associated with manually
	maintaining it.

	intrusive_list's API follows the standard container interface, and thus
	std::list's interface.  It is based the API of Boost's intrusive list,
	here:

	 https://www.boost.org/doc/libs/1_73_0/doc/html/boost/intrusive/list.html

	Our implementation is relatively simple, while Boost's is complicated
	and intertwined due to a lot of customization options, which our version
	doesn't have.

	The easiest way to use an intrusive_list is to make the list's element
	type inherit from intrusive_node.  This adds a prev/next pointers to
	the element type.  However, to support putting the same object in more
	than one list, intrusive_list supports putting the "node" info as a
	field member, so you can have more than one such nodes, one per list.

	As a first guinea pig, this patch makes the per-inferior thread list use
	intrusive_list using the base class method.

	Unlike Boost's implementation, ours is not a circular list.  An earlier
	version of the patch was circular: the intrusive_list type included an
	intrusive_list_node "head".  In this design, a node contained pointers
	to the previous and next nodes, not the previous and next elements.
	This wasn't great for when debugging GDB with GDB, as it was difficult
	to get from a pointer to the node to a pointer to the element.  With the
	design proposed in this patch, nodes contain pointers to the previous
	and next elements, making it easy to traverse the list by hand and
	inspect each element.

	The intrusive_list object contains pointers to the first and last
	elements of the list.  They are nullptr if the list is empty.
	Each element's node contains a pointer to the previous and next
	elements.  The first element's previous pointer is nullptr and the last
	element's next pointer is nullptr.  Therefore, if there's a single
	element in the list, both its previous and next pointers are nullptr.
	To differentiate such an element from an element that is not linked into
	a list, the previous and next pointers contain a special value (-1) when
	the node is not linked.  This is necessary to be able to reliably tell
	if a given node is currently linked or not.

	A begin() iterator points to the first item in the list.  An end()
	iterator contains nullptr.  This makes iteration until end naturally
	work, as advancing past the last element will make the iterator contain
	nullptr, making it equal to the end iterator.  If the list is empty,
	a begin() iterator will contain nullptr from the start, and therefore be
	immediately equal to the end.

	Iterating on an intrusive_list yields references to objects (e.g.
	`thread_info&`).  The rest of GDB currently expects iterators and ranges
	to yield pointers (e.g. `thread_info*`).  To bridge the gap, add the
	reference_to_pointer_iterator type.  It is used to define
	inf_threads_iterator.

	Add a Python pretty-printer, to help inspecting intrusive lists when
	debugging GDB with GDB.  Here's an example of the output:

	    (top-gdb) p current_inferior_.m_obj.thread_list
	    $1 = intrusive list of thread_info = {0x61700002c000, 0x617000069080, 0x617000069400, 0x61700006d680, 0x61700006eb80}

	It's not possible with current master, but with this patch [1] that I
	hope will be merged eventually, it's possible to index the list and
	access the pretty-printed value's children:

	    (top-gdb) p current_inferior_.m_obj.thread_list[1]
	    $2 = (thread_info *) 0x617000069080
	    (top-gdb) p current_inferior_.m_obj.thread_list[1].ptid
	    $3 = {
	      m_pid = 406499,
	      m_lwp = 406503,
	      m_tid = 0
	    }

	Even though iterating the list in C++ yields references, the Python
	pretty-printer yields pointers.  The reason for this is that the output
	of printing the thread list above would be unreadable, IMO, if each
	thread_info object was printed in-line, since they contain so much
	information.  I think it's more useful to print pointers, and let the
	user drill down as needed.

	[1] https://sourceware.org/pipermail/gdb-patches/2021-April/178050.html

	Co-Authored-By: Simon Marchi <simon.marchi@efficios.com>
	Change-Id: I3412a14dc77f25876d742dab8f44e0ba7c7586c0

2021-07-13  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-12  Tucker  <tuckkern@sourceware@gmail.com>

	Add the SEC_ELF_OCTETS flag to debug sections created by the assembler.
		PR 28054
	gas	* config/obj-elf.c (obj_elf_change_section): Set the
		SEF_ELF_OCTETS flag on debug sections.

2021-07-12  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.btrace/tsx.exp on system with tsx disabled in microcode
	Recently I started to see this fail with trunk:
	...
	(gdb) record instruction-history^M
	1          0x00000000004004ab <main+4>: call   0x4004b7 <test>^M
	2          0x00000000004004c6 <test+15>:        mov    $0x1,%eax^M
	3          0x00000000004004cb <test+20>:        ret    ^M
	(gdb) FAIL: gdb.btrace/tsx.exp: speculation indication
	...

	This is due to an intel microcode update (1) that disables Intel TSX by default.

	Fix this by updating the pattern.

	Tested on x86_64-linux, with both gcc 7.5.0 and clang 12.0.1.

	[1] https://www.intel.com/content/www/us/en/support/articles/000059422/processors.html

	gdb/testsuite/ChangeLog:

	2021-07-12  Tom de Vries  <tdevries@suse.de>

		PR testsuite/28057
		* gdb.btrace/tsx.exp: Add pattern for system with tsx disabled in
		microcode.

2021-07-12  Nick Clifton  <nickc@redhat.com>

	Updated French translation for the binutils sub-directory

	Fix a translation problem for the text generated by readelf at the start of a dump of a dynamic section.
		PR 28072
	binutils * readelf.c (process_dynamic_section): Use ngettext to help with translation of header text.

2021-07-12  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.mi/mi-info-sources.exp for extra debug info
	When running test-case gdb.mi/mi-info-sources.exp, I run into:
	...
	Running src/gdb/testsuite/gdb.mi/mi-info-sources.exp ...
	ERROR: internal buffer is full.
	...
	due to extra debug info from the shared libraries.

	Fix this by using "nosharedlibrary".

	Then I run into these FAILs:
	...
	FAIL: gdb.mi/mi-info-sources.exp: debug_read=false: \
	  -file-list-exec-source-files (unexpected output)
	FAIL: gdb.mi/mi-info-sources.exp: debug_read=true: \
	  -file-list-exec-source-files (unexpected output)
	FAIL: gdb.mi/mi-info-sources.exp: debug_read=true: \
	  -file-list-exec-source-files --group-by-objfile, look for \
	  mi-info-sources.c (unexpected output)
	FAIL: gdb.mi/mi-info-sources.exp: debug_read=true: \
	  -file-list-exec-source-files --group-by-objfile, look for \
	  mi-info-sources-base.c (unexpected output)
	...
	due to openSUSE executables which have debug info for objects from sources
	like sysdeps/x86_64/crtn.S.

	Fix these by updating the patterns, and adding "maint expand-symtabs" to
	reliably get fully-read objfiles.

	Then I run into FAILs when using the readnow target board.  Fix these by
	skipping the relevant tests.

	Then I run into FAILs when using the cc-with-gnu-debuglink board.  Fix these
	by updating the patterns.

	Tested on x86_64-linux, with native, check-read1, readnow, cc-with-gdb-index,
	cc-with-debug-names, cc-with-gnu-debuglink, cc-with-dwz, cc-with-dwz-m.

	gdb/testsuite/ChangeLog:

	2021-07-05  Tom de Vries  <tdevries@suse.de>

		* lib/mi-support.exp (mi_readnow): New proc.
		* gdb.mi/mi-info-sources.exp: Use nosharedlibrary.  Update patterns.
		Skip tests for readnow.  Use "maint expand-symtabs".

2021-07-12  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

	testsuite: fix whitespace problems in gdb.mi/mi-break.exp
	Replace leading 8-spaces with tab and remove trailing space in
	gdb.mi/mi-break.exp.

2021-07-12  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-11  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-10  Alan Modra  <amodra@gmail.com>

	Tidy commit 49910fd88dcd
	Pointer range checking is UB if the values compared are outside the
	underlying array elements (plus one).

		* dwarf2.c (read_address): Remove accidental commit.
		(read_ranges): Compare offset rather than pointers.

2021-07-10  Alan Modra  <amodra@gmail.com>

	PR28069, assertion fail in dwarf.c:display_discr_list
	We shouldn't be asserting on anything to do with leb128 values, or
	reporting file and line numbers when something unexpected happens.
	leb128 data is of indeterminate length, perfect for fuzzer mayhem.
	It would only make sense to assert or report dwarf.c/readelf.c source
	lines if the code had already sized and sanity checked the leb128
	values.

	After removing the assertions, the testcase then gave:

	    <37>   DW_AT_discr_list  : 5 byte block: 0 0 0 0 0 	(label 0, label 0, label 0, label 0, <corrupt>
	readelf: Warning: corrupt discr_list - unrecognized discriminant byte 0x5

	    <3d>   DW_AT_encoding    : 0	(void)
	    <3e>   DW_AT_identifier_case: 0	(case_sensitive)
	    <3f>   DW_AT_virtuality  : 0	(none)
	    <40>   DW_AT_decimal_sign: 5	(trailing separate)

	So the DW_AT_discr_list was showing more data than just the 5 byte
	block.  That happened due to "end" pointing a long way past the end of
	block, and uvalue decrementing past zero on one of the leb128 bytes.

		PR 28069
		* dwarf.c (display_discr_list): Remove assertions.  Delete "end"
		parameter, use initial "data" pointer as the end.  Formatting.
		Don't count down bytes as they are read.
		(read_and_display_attr_value): Adjust display_discr_list call.
		(read_and_print_leb128): Don't pass __FILE__ and __LINE__ to
		report_leb_status.
		* dwarf.h (report_leb_status): Don't report file and line
		numbers.  Delete file and lnum parameters,
		(READ_ULEB, READ_SLEB): Adjust.

2021-07-10  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-09  H.J. Lu  <hjl.tools@gmail.com>

	ld/NEWS: Clarify -z [no]indirect-extern-access
	-z [no]indirect-extern-access are only for x86 ELF linker.

2021-07-09  H.J. Lu  <hjl.tools@gmail.com>

	elf: Limits 2 GNU_PROPERTY_1_NEEDED tests to Linux/x86
	Run property-1_needed-1b.d and property-1_needed-1c.d, which pass
	-z [no]indirect-extern-access to linker, only run for Linux/x86 targets.

		* testsuite/ld-elf/property-1_needed-1b.d: Only run for
		Linux/x86 targets.
		* testsuite/ld-elf/property-1_needed-1c.d: Likewise.

2021-07-09  H.J. Lu  <hjl.tools@gmail.com>

	elf: Add GNU_PROPERTY_1_NEEDED check
	If GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS is set on any input
	relocatable files:

	1. Don't generate copy relocations.
	2. Turn off extern_protected_data since it implies
	GNU_PROPERTY_NO_COPY_ON_PROTECTED.
	3. Treate reference to protected symbols with indirect external access
	as local.
	4. Set GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS on output.
	5. When generating executable, clear this bit when there are non-GOT or
	non-PLT relocations in input relocatable files without the bit set.
	6. Add -z [no]indirect-extern-access to control indirect external access.

	bfd/

		* elf-bfd (elf_obj_tdata): Add has_indirect_extern_access.
		(elf_has_indirect_extern_access): New.
		* elf-properties.c (_bfd_elf_parse_gnu_properties): Set
		elf_has_indirect_extern_access and elf_has_no_copy_on_protected
		when seeing GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS.
		(elf_write_gnu_propertie): Add an argument to pass link_info.
		Set needed_1_p for GNU_PROPERTY_1_NEEDED in memory.
		(_bfd_elf_link_setup_gnu_properties): Handle
		GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS for
		-z indirect-extern-access.  Set nocopyreloc to true and
		extern_protected_data to false for indirect external access.
		(_bfd_elf_convert_gnu_properties): Updated.
		* elf32-i386.c (elf_i386_check_relocs): Set
		non_got_ref_without_indirect_extern_access on legacy non-GOT or
		non-PLT references.
		* elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
		* elflink.c (_bfd_elf_symbol_refs_local_p): Return true for
		STV_PROTECTED symbols with indirect external access.
		* elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): Clear
		indirect_extern_access for legacy non-GOT/non-PLT references.
		* elfxx-x86.h (elf_x86_link_hash_entry): Add
		non_got_ref_without_indirect_extern_access.

	include/

		* bfdlink.h (bfd_link_info): Add indirect_extern_access and
		needed_1_p.  Change nocopyreloc to int.

	ld/

		* NEWS: Mention -z [no]indirect-extern-access
		* ld.texi: Document -z [no]indirect-extern-access
		* ldmain.c (main): Initialize link_info.indirect_extern_access
		to -1.
		* emulparams/extern_protected_data.sh: Support
		-z [no]indirect-extern-access.
		* testsuite/ld-elf/indirect-extern-access-1.rd: New file
		* testsuite/ld-elf/indirect-extern-access-1a.c: Likewise.
		* testsuite/ld-elf/indirect-extern-access-1b.c: Likewise.
		* testsuite/ld-elf/indirect-extern-access-2.rd: Likewise.
		* testsuite/ld-elf/indirect-extern-access-2a.c: Likewise.
		* testsuite/ld-elf/indirect-extern-access-2b.c: Likewise.
		* testsuite/ld-elf/indirect-extern-access-3.rd: Likewise.
		* testsuite/ld-elf/indirect-extern-access.S: Likewise.
		* testsuite/ld-elf/property-1_needed-1b.d: Likewise.
		* testsuite/ld-elf/property-1_needed-1c.d: Likewise.
		* testsuite/ld-x86-64/indirect-extern-access.rd: Likewise.
		* testsuite/ld-x86-64/protected-data-1.h: Likewise.
		* testsuite/ld-x86-64/protected-data-1a.c: Likewise.
		* testsuite/ld-x86-64/protected-data-1b.c: Likewise.
		* testsuite/ld-x86-64/protected-data-2a.S: Likewise.
		* testsuite/ld-x86-64/protected-data-2b.S: Likewise.
		* testsuite/ld-x86-64/protected-func-2a.S: Likewise.
		* testsuite/ld-x86-64/protected-func-2b.S: Likewise.
		* testsuite/ld-x86-64/protected-func-2c.c: Likewise.
		* testsuite/ld-elf/linux-x86.exp: Run test with
		GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS.
		* testsuite/ld-x86-64/x86-64.exp: Run tests for protected
		function and data with indirect external access.

2021-07-09  H.J. Lu  <hjl.tools@gmail.com>

	elf: Add GNU_PROPERTY_1_NEEDED
	Add GNU_PROPERTY_1_NEEDED:

	 #define GNU_PROPERTY_1_NEEDED      GNU_PROPERTY_UINT32_OR_LO

	to indicate the needed properties by the object file.

	Add GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS:

	 #define GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS  (1U << 0)

	to indicate that the object file requires canonical function pointers and
	cannot be used with copy relocation.

	binutils/

		* readelf.c (decode_1_needed): New.
		(print_gnu_property_note): Handle GNU_PROPERTY_1_NEEDED.

	include/

		* elf/common.h (GNU_PROPERTY_1_NEEDED): New.
		(GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS): Likewise.

	ld/

		* testsuite/ld-elf/property-1_needed-1a.d: New file.
		* testsuite/ld-elf/property-1_needed-1.s: Likewise.

2021-07-09  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-09  Lancelot SIX  <lsix@lancelotsix.com>

	Remove unused parameter in maybe_software_singlestep
	While working around, I noticed that the last parameter of
	maybe_software_singlestep is never used.  This path removes
	it.

	Built on x86_64-linux-gnu and riscv64-linux-gnu.

	gdb/ChangeLog:

		* infrun.c (maybe_software_singlestep): Remove unused PC
		parameter.
		(resume_1): Update calls to maybe_software_singlestep.

2021-07-08  H.J. Lu  <hjl.tools@gmail.com>

	x86-64: Disallow PC reloc against weak undefined symbols in PIE
	Disallow PC relocations against weak undefined symbols in PIE since they
	can lead to non-zero address at run-time.

	bfd/

		PR ld/21782
		* elf64-x86-64.c (elf_x86_64_relocate_section): Disallow PC
		relocations against weak undefined symbols in PIE.

	ld/

		PR ld/21782
		* testsuite/ld-x86-64/pie3.d: Expect linker error.

2021-07-08  H.J. Lu  <hjl.tools@gmail.com>

	ld: Limit cache size and add --max-cache-size=SIZE
	When link_info.keep_memory is true, linker caches the relocation
	information and symbol tables of input files in memory.  When there
	are many input files with many relocations, we may run out of memory.
	Add --max-cache-size=SIZE to set the maximum cache size.

	bfd/

		PR ld/18028
		* bfd.c (bfd): Add alloc_size.
		* elf-bfd.h (_bfd_elf_link_info_read_relocs): New.
		* elf32-i386.c (elf_i386_check_relocs): Use _bfd_link_keep_memory.
		Update cache_size.
		* elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
		* elflink.c (_bfd_elf_link_read_relocs): Renamed to ...
		(_bfd_elf_link_info_read_relocs): This.  Update cache_size.
		(_bfd_elf_link_read_relocs): New.
		(_bfd_elf_link_check_relocs): Call _bfd_elf_link_info_read_relocs
		instead of _bfd_elf_link_read_relocs.
		(elf_link_add_object_symbols): Likewise.
		(elf_link_input_bfd): Likewise.
		(init_reloc_cookie_rels): Likewise.
		(init_reloc_cookie): Update cache_size.  Call
		_bfd_elf_link_info_read_relocs instead of
		_bfd_elf_link_read_relocs.
		(link_info_ok): New.
		(elf_gc_smash_unused_vtentry_relocs): Updated.  Call
		_bfd_elf_link_info_read_relocs instead of
		_bfd_elf_link_read_relocs.
		(bfd_elf_gc_sections): Use link_info_ok.  Pass &link_info_ok
		to elf_gc_smash_unused_vtentry_relocs.
		* libbfd-in.h (_bfd_link_keep_memory): New.
		* linker.c (_bfd_link_keep_memory): New.
		* opncls.c (bfd_alloc): Update alloc_size.
		* bfd-in2.h: Regenerated.
		* libbfd.h: Likewise.

	include/

		PR ld/18028
		* bfdlink.h (bfd_link_info): Add cache_size and max_cache_size.

	ld/

		PR ld/18028
		* NEWS: Mention --max-cache-size=SIZE.
		* ld.texi: Document --max-cache-size=SIZE.
		* ldlex.h (option_values): Add OPTION_MAX_CACHE_SIZE.
		* ldmain.c: (main): Set link_info.max_cache_size to -1.
		* lexsup.c (ld_options): Add --max-cache-size=SIZE.
		(parse_args): Support OPTION_MAX_CACHE_SIZE.
		* testsuite/ld-bootstrap/bootstrap.exp: Add test for
		--max-cache-size=-1.

2021-07-08  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: don't set Linux-specific displaced stepping methods in s390_gdbarch_init
	According to bug 28056, running an s390x binary gives:

	    (gdb) run
	    Starting program: /usr/bin/ls
	    /home/ubuntu/tmp/gdb-11.0.90.20210705/gdb/linux-tdep.c:2550: internal-error: displaced_step_prepare_status linux_displaced_step_prepare(gdbarch*, thread_info*, CORE_ADDR&): Assertion `gdbarch_data->num_disp_step_buffers > 0' failed.

	This is because the s390 architecture registers some Linux-specific
	displaced stepping callbacks in the OS-agnostic s390_gdbarch_init:

	    set_gdbarch_displaced_step_prepare (gdbarch, linux_displaced_step_prepare);
	    set_gdbarch_displaced_step_finish (gdbarch, linux_displaced_step_finish);
	    set_gdbarch_displaced_step_restore_all_in_ptid
	      (gdbarch, linux_displaced_step_restore_all_in_ptid);

	But then the Linux-specific s390_linux_init_abi_any passes
	num_disp_step_buffers=0 to linux_init_abi:

	    linux_init_abi (info, gdbarch, 0);

	The problem happens when linux_displaced_step_prepare is called for the
	first time.  It tries to allocate the displaced stepping buffers, but
	sees that the number of displaced stepping buffers for that architecture
	is 0, which is unexpected / invalid.

	s390_gdbarch_init should not register the linux_* callbacks, that is
	expected to be done by linux_init_abi.  If debugging a bare-metal s390
	program, or an s390 program on another OS GDB doesn't know about, we
	wouldn't want to use them.  We would either register no callbacks, if
	displaced stepping isn't supported, or register a different set of
	callbacks if we wanted to support displaced stepping in those cases.

	The commit that refactored the displaced stepping machinery and
	introduced these set_gdbarch_displaced_step_* calls is 187b041e2514
	("gdb: move displaced stepping logic to gdbarch, allow starting
	concurrent displaced steps").  However, even before that,
	s390_gdbarch_init did:

	  set_gdbarch_displaced_step_location (gdbarch, linux_displaced_step_location);

	... which already seemed wrong.  The Linux-specific callback was used
	even for non-Linux system.  Maybe that was on purpose, because it would
	also happen to work in some other non-Linux case, or maybe it was simply
	a mistake.  I'll assume that this was a small mistake when
	s390-tdep.{h,c} where factored out of s390-linux-tdep.c, in d6e589456475
	("s390: Split up s390-linux-tdep.c into two files").

	Fix this by removing the setting of these displaced step callbacks from
	s390_gdbarch_init.  Instead, pass num_disp_step_buffers=1 to
	linux_init_abi, in s390_linux_init_abi_any.  Doing so will cause
	linux_init_abi to register these same callbacks.  It will also mean that
	when debugging a bare-metal s390 executable or an executable on another
	OS that GDB doesn't know about, gdbarch_displaced_step_prepare won't be
	set, so displaced stepping won't be used.

	This patch will need to be merged in the gdb-11-branch, since this is a
	GDB 11 regression, so here's the ChangeLog entry:

	gdb/ChangeLog:

		* s390-linux-tdep.c (s390_linux_init_abi_any): Pass 1 (number
		of displaced stepping buffers to linux_init_abi.
		* s390-tdep.c (s390_gdbarch_init): Don't set the Linux-specific
		displaced-stepping gdbarch callbacks.

	Change-Id: Ieab2f8990c78fde845ce7378d6fd4ee2833800d5
	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28056

2021-07-08  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/Makefile.in: remove testsuite from SUBDIRS
	When distclean-ing a configured / built gdb directory, like so:

	    $ ./configure && make all-gdb && make distclean

	The distclean operation fails with:

	    Missing testsuite/Makefile

	If we look at the SUBDIRS variable in the generated gdb/Makefile,
	testsuite is there twice:

	    SUBDIRS = doc  testsuite data-directory testsuite

	So we try distclean-ing the testsuite directory twice.  The second time,
	gdb/testsuite/Makefile doesn't exist, so it fails.

	The first "testsuite" comes from the @subdirs@ replacement, because of
	the `AC_CONFIG_SUBDIRS` macro in gdb/configure.ac.  The second one is
	hard-coded in gdb/Makefile.in:

	    SUBDIRS = doc @subdirs@ data-directory testsuite

	The hard-coded was added by:

	    bdbbcd577460 ("Always build 'all' in gdb/testsuite")

	which came after `testsuite` was removed from @subdirs@ by:

	    f99d1d37496f ("Remove gdb/testsuite/configure")

	My commit a100a94530eb ("gdb/testsuite: restore configure script")
	should have removed the hard-coded `testsuite`, since it added it back
	as a "subdir", but I missed it because I only looked f99d1d37496f to
	write my patch.

	Fix this by removing the hard-coded one.

	This patch should be pushed to both master and gdb-11-branch, hence the
	ChangeLog entry:

	gdb/ChangeLog:

		* Makefile.in (SUBDIRS): Remove testsuite.

	Change-Id: I63e5590b1a08673c646510b3ecc74600eae9f92d

2021-07-08  Nick Clifton  <nickc@redhat.com>

	Updated Portuguese translation for the BFD sub-directory

2021-07-08  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix gdb.guile/scm-breakpoint.exp with guile 3.0
	When running test-case gdb.guile/scm-breakpoint.exp on openSUSE Tumbleweed
	with guile 3.0, I run into:
	...
	(gdb) guile (define cp (make-breakpoint "syscall" #:type BP_CATCHPOINT))^M
	ERROR: In procedure make-breakpoint:^M
	In procedure gdbscm_make_breakpoint: unsupported breakpoint type in \
	  position 3: "BP_CATCHPOINT"^M
	Error while executing Scheme code.^M
	(gdb) FAIL: gdb.guile/scm-breakpoint.exp: test_catchpoints: \
	  create a catchpoint via the api
	...

	The same test passes on openSUSE Leap 15.2 with guile 2.0, where the second
	line of the error message starts with the same prefix as the first:
	...
	ERROR: In procedure gdbscm_make_breakpoint: unsupported breakpoint type in \
	  position 3: "BP_CATCHPOINT"^M
	...

	I observe the same difference in many other tests, f.i.:
	...
	(gdb) gu (print (value-add i '()))^M
	ERROR: In procedure value-add:^M
	In procedure gdbscm_value_add: Wrong type argument in position 2: ()^M
	Error while executing Scheme code.^M
	(gdb) PASS: gdb.guile/scm-math.exp: catch error in guile type conversion
	...
	but it doesn't cause FAILs anywhere else.

	Fix this by updating the regexp to make the "ERROR: " prefix optional.

	Tested on x86_64-linux, with both guile 2.0 and 3.0.

	gdb/testsuite/ChangeLog:

	2021-07-07  Tom de Vries  <tdevries@suse.de>

		* gdb.guile/scm-breakpoint.exp: Make additional "ERROR: " prefix in
		exception printing optional.

2021-07-08  Mike Frysinger  <vapier@gentoo.org>

	sim: erc32: use libsim.a for common objects
	We're starting to move more objects to the common build that sis did
	not need before, so linking them is causing problems (when common
	objects end up needing symbols from non-common objects).  Switch it
	to the libsim.a archive which will allow the link to pull out only
	what it needs.

2021-07-08  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-07  Nick Clifton  <nickc@redhat.com>

	Remove an accidental change to elfcode.h included as part of commit 6e0dfbf420.
		PR 27659
		* elfcode.h (elf_swap_symbol_out): Revert accidental change that
		removed an abort if the shndx pointer is NULL.

2021-07-07  H.J. Lu  <hjl.tools@gmail.com>

	ld: Check archive only for archive member
	Since plugin_maybe_claim calls bfd_close on the original input BFD if it
	isn't an archive member, pass NULL to bfd_plugin_close_file_descriptor
	to indicate that the BFD isn't an archive member.

	bfd/

		PR ld/18028
		* plugin.c (bfd_plugin_close_file_descriptor): Check archive
		only of abfd != NULL.
		(try_claim): Pass NULL to bfd_plugin_close_file_descriptor if
		it isn't an archive member.

	ld/

		PR ld/18028
		* plugin.c (plugin_input_file): Add comments for abfd and ibfd.
		(plugin_object_p): Set input->ibfd to NULL if it isn't an
		archive member.

2021-07-07  Andreas Krebbel  <krebbel@linux.ibm.com>

	Add changelog entries for last commit

2021-07-07  Andreas Krebbel  <krebbel@linux.ibm.com>

	IBM Z: Add another arch14 instruction
	opcodes/

		* opcodes/s390-opc.txt: Add qpaci.

	gas/

		* testsuite/gas/s390/zarch-arch14.d: Add qpaci.
		* testsuite/gas/s390/zarch-arch14.s: Add qpaci.

2021-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	Fix Solaris gprof build with --disable-nls
	gprof fails to compile on Solaris 10 and 11.3 with --disable-nls:

	In file included from /vol/src/gnu/binutils/hg/binutils-2.37-branch/git/gprof/gprof.h:33,
	                 from /vol/src/gnu/binutils/hg/binutils-2.37-branch/git/gprof/basic_blocks.c:24:
	/usr/include/libintl.h:45:14: error: expected identifier or '(' before 'const'
	   45 | extern char *dcgettext(const char *, const char *, const int);
	      |              ^~~~~~~~~
	/usr/include/libintl.h:46:14: error: expected identifier or '(' before 'const'
	   46 | extern char *dgettext(const char *, const char *);
	      |              ^~~~~~~~
	/usr/include/libintl.h:47:14: error: expected identifier or '(' before 'const'
	   47 | extern char *gettext(const char *);
	      |              ^~~~~~~
	/vol/src/gnu/binutils/hg/binutils-2.37-branch/git/gprof/../bfd/sysdep.h:165:33:
	error: expected identifier or '(' before 'do'
	  165 | # define textdomain(Domainname) do {} while (0)
	      |                                 ^~
	/vol/src/gnu/binutils/hg/binutils-2.37-branch/git/gprof/../bfd/sysdep.h:165:39:
	error: expected identifier or '(' before 'while'
	  165 | # define textdomain(Domainname) do {} while (0)
	      |                                       ^~~~~
	/vol/src/gnu/binutils/hg/binutils-2.37-branch/git/gprof/../bfd/sysdep.h:166:46:
	error: expected identifier or '(' before 'do'
	  166 | # define bindtextdomain(Domainname, Dirname) do {} while (0)
	      |                                              ^~
	/vol/src/gnu/binutils/hg/binutils-2.37-branch/git/gprof/../bfd/sysdep.h:166:52:
	error: expected identifier or '(' before 'while'
	  166 | # define bindtextdomain(Domainname, Dirname) do {} while (0)
	      |                                                    ^~~~~
	/usr/include/libintl.h:55:14: error: expected identifier or '(' before 'unsigned'
	   55 | extern char *dcngettext(const char *, const char *,
	      |              ^~~~~~~~~~
	/usr/include/libintl.h:57:14: error: expected identifier or '(' before 'unsigned'
	   57 | extern char *dngettext(const char *, const char *,
	      |              ^~~~~~~~~
	/usr/include/libintl.h:59:14: error: expected identifier or '(' before 'unsigned'
	   59 | extern char *ngettext(const char *, const char *, unsigned long int);
	      |              ^~~~~~~~

	This is a known issue already partially fixed in binutils/sysdep.h.  For
	gprof, the same fix needs to be applied in bfd/sysdep.h, as the
	following patch does.  Tested on i386-pc-solaris2.10 and
	i386-pc-solaris2.11.

	2021-07-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

		bfd:
		* sysdep.h [!ENABLE_NLS]: Prevent inclusion of <libintl.h> on
		Solaris.

2021-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	Check for strnlen declaration to fix Solaris 10 build
	binutils currently fails to compile on Solaris 10:

	/vol/src/gnu/binutils/hg/binutils-2.37-branch/git/bfd/opncls.c: In function 'bfd_get_debug_link_info_1':
	/vol/src/gnu/binutils/hg/binutils-2.37-branch/git/bfd/opncls.c:1231:16: error: implicit declaration of function 'strnlen' [-Werror=implicit-function-declaration]
	 1231 |	  crc_offset = strnlen (name, size) + 1;
	      |		       ^~~~~~~
	/vol/src/gnu/binutils/hg/binutils-2.37-branch/git/bfd/opncls.c:1231:16: error: incompatible implicit declaration of built-in function 'strnlen' [-Werror]
	/vol/src/gnu/binutils/hg/binutils-2.37-branch/git/bfd/opncls.c: In function 'bfd_get_alt_debug_link_info':
	/vol/src/gnu/binutils/hg/binutils-2.37-branch/git/bfd/opncls.c:1319:20: error: incompatible implicit declaration of built-in function 'strnlen' [-Werror]
	 1319 |	  buildid_offset = strnlen (name, size) + 1;
	      |			   ^~~~~~~

	and in a couple of other places.  The platform lacks strnlen, and while
	libiberty.h can provide a fallback declaration, the necessary configure
	test isn't run.

	Fixed with the following patch.  Tested on i386-pc-solaris2.10.

	2021-07-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

		bfd:
		* configure.ac: Check for strnlen declaration.
		* configure, config.in: Regenerate.

		binutils:
		* configure.ac: Check for strnlen declaration.
		* configure, config.in: Regenerate.

2021-07-07  Nick Clifton  <nickc@redhat.com>

	Fix problems translating messages when a percentage sign appears at the end of a string.
		PR 28051
	gas	* config/tc-i386.c (offset_in_range): Reformat error messages in
		order to fix problems when translating.
		(md_assemble): Likewise.
		* messages.c (as_internal_value_out_of_range): Likewise.
		* read.c (emit_expr_with_reloc): Likewise.
		* testsuite/gas/all/overflow.l Change expected output format.
		* po/gas.pot: Regenerate.

	bfd	* coff-rs6000.c (xcoff_reloc_type_tls): Reformat error messages in
		order to fix problems when translating.
		* cofflink.c (_bfd_coff_write_global_sym): Likewise.
		* elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
		Likewise.
		* po/bfd.pot: Regenerate.

2021-07-07  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-06  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: introduce iterator_range, remove next_adapter
	I was always a bit confused by next_adapter, because it kind of mixes
	the element type and the iterator type.  In reality, it is not much more
	than a class that wraps two iterators (begin and end).  However, it
	assumes that:

	 - you can construct the begin iterator by passing a pointer to the
	   first element of the iterable
	 - you can default-construct iterator to make the end iterator

	I think that by generalizing it a little bit, we can re-use it at more
	places.

	Rename it to "iterator_range".  I think it describes a bit better: it's
	a range made by wrapping a begin and end iterator.  Move it to its own
	file, since it's not related to next_iterator anymore.

	iterator_range has two constructors.  The variadic one, where arguments
	are forwarded to construct the underlying begin iterator.  The end
	iterator is constructed through default construction.  This is a
	generalization of what we have today.

	There is another constructor which receives already constructed begin
	and end iterators, useful if the end iterator can't be obtained by
	default-construction.  Or, if you wanted to make a range that does not
	end at the end of the container, you could pass any iterator as the
	"end".

	This generalization allows removing some "range" classes, like
	all_inferiors_range.  These classes existed only to pass some arguments
	when constructing the begin iterator.  With iterator_range, those same
	arguments are passed to the iterator_range constructed and then
	forwarded to the constructed begin iterator.

	There is a small functional difference in how iterator_range works
	compared to next_adapter.  next_adapter stored the pointer it received
	as argument and constructeur an iterator in the `begin` method.
	iterator_range constructs the begin iterator and stores it as a member.
	Its `begin` method returns a copy of that iterator.

	With just iterator_range, uses of next_adapter<foo> would be replaced
	with:

	  using foo_iterator = next_iterator<foo>;
	  using foo_range = iterator_range<foo_iterator>;

	However, I added a `next_range` wrapper as a direct replacement for
	next_adapter<foo>.  IMO, next_range is a slightly better name than
	next_adapter.

	The rest of the changes are applications of this new class.

	gdbsupport/ChangeLog:

		* next-iterator.h (class next_adapter): Remove.
		* iterator-range.h: New.

	gdb/ChangeLog:

		* breakpoint.h (bp_locations_range): Remove.
		(bp_location_range): New.
		(struct breakpoint) <locations>: Adjust type.
		(breakpoint_range): Use iterator_range.
		(tracepoint_range): Use iterator_range.
		* breakpoint.c (breakpoint::locations): Adjust return type.
		* gdb_bfd.h (gdb_bfd_section_range): Use iterator_range.
		* gdbthread.h (all_threads_safe): Pass argument to
		all_threads_safe_range.
		* inferior-iter.h (all_inferiors_range): Use iterator_range.
		(all_inferiors_safe_range): Use iterator_range.
		(all_non_exited_inferiors_range): Use iterator_range.
		* inferior.h (all_inferiors, all_non_exited_inferiors): Pass
		inferior_list as argument.
		* objfiles.h (struct objfile) <compunits_range>: Remove.
		<compunits>: Return compunit_symtab_range.
		* progspace.h (unwrapping_objfile_iterator)
		<unwrapping_objfile_iterator>: Take parameter by value.
		(unwrapping_objfile_range): Use iterator_range.
		(struct program_space) <objfiles_range>: Define with "using".
		<objfiles>: Adjust.
		<objfiles_safe_range>: Define with "using".
		<objfiles_safe>: Adjust.
		<solibs>: Return so_list_range, define here.
		* progspace.c (program_space::solibs): Remove.
		* psymtab.h (class psymtab_storage) <partial_symtab_iterator>:
		New.
		<partial_symtab_range>: Use iterator_range.
		* solist.h (so_list_range): New.
		* symtab.h (compunit_symtab_range):
		New.
		(symtab_range): New.
		(compunit_filetabs): Change to a function.
		* thread-iter.h (inf_threads_range,
		inf_non_exited_threads_range, safe_inf_threads_range,
		all_threads_safe_range): Use iterator_range.
		* top.h (ui_range): New.
		(all_uis): Use ui_range.

	Change-Id: Ib7a9d2a3547f45f01aa1c6b24536ba159db9b854

2021-07-06  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb/testsuite: restore configure script
	Commit f99d1d37496f ("Remove gdb/testsuite/configure") removed
	gdb/testsuite/configure, as anything gdb/testsuite/configure did could
	be done by gdb/configure.

	There is however one use case that popped up when this changed
	propagated to downstream consumers, to run the testsuite on an already
	built GDB.  In the workflow of ROCm-GDB at AMD, a GDB package is built
	in a CI job.  This GDB package is then tested on different machines /
	hardware configurations as part of other CI jobs.  To achieve this,
	those CI jobs only configure the testsuite directory and run "make
	check" with an appropriate board file.

	In light of this use case, the way I see it is that gdb/testsuite could
	be considered its own project.  It could be stored in a completely
	different repo if we want to, it just happens to be stored inside gdb/.

	Since the only downside of having gdb/testsuite/configure is that it
	takes a few more seconds to run, but on the other hand it's quite useful
	for some people, I propose re-adding it.

	In a sense, this is revert of f99d1d37496f, but it's not a direct
	git-revert, as some things have changed since.

	gdb/ChangeLog:

		* configure.ac: Remove things that were moved from
		testsuite/configure.ac.
		* configure: Re-generate.

	gdb/testsuite/ChangeLog:

		* configure.ac: Restore.
		* configure: Re-generate.
		* aclocal.m4: Re-generate.
		* Makefile.in (distclean): Add config.status.
		(Makefile): Adjust paths.
		(lib/pdtrace): Adjust paths.
		(config.status): Add.

	Change-Id: Ic38c79485e1835712d9c99649c9dfb59667254f1

2021-07-06  Joel Brobecker  <brobecker@adacore.com>

	Rename gdb/ChangeLog to gdb/ChangeLog-2021
	Now that ChangeLog entries are no longer used for GDB patches,
	this commit renames the file gdb/ChangeLog to gdb/ChangeLog-2021,
	similar to what we would do in the context of the "Start of New
	Year" procedure.

	The purpose of this change is to avoid people merging ChangeLog
	entries by mistake when applying existing commits that they are
	currently working on.

2021-07-06  Dan Streetman  <ddstreet@canonical.com>

	sim: ppc: add missing empty targets
	These are copied from sim/common/Make-common.in.

	On ppc the build fails without at least the 'info' target, e.g.:

	Making info in ppc
	make[4]: Entering directory '/<<BUILDDIR>>/gdb-10.2.2974.g5b45e89f56d+21.10.20210510155809/build/default/sim/ppc'
	make[4]: *** No rule to make target 'info'.  Stop.

2021-07-06  Yuri Chornoivan  <yurchor@ukr.net>

	PR 28053: Fix spelling mistakes: usupported -> unsupported and relocatation -> relocation.

2021-07-06  Michael Matz  <matz@suse.de>

	elf/riscv: Fix relaxation with aliases [PR28021]
	the fix for PR22756 only changed behaviour for hidden aliases,
	but the same situation exists for non-hidden aliases: sym_hashes[]
	can contain multiple entries pointing to the same symbol structure
	leading to relaxation adjustment to be applied twice.

	Fix this by testing for duplicates for everything that looks like it
	has a version.

	PR ld/28021

	bfd/
		* elfnn-riscv.c (riscv_relax_delete_bytes): Check for any
		versioning.

	ld/
		* testsuite/ld-riscv-elf/relax-twice.ver: New.
		* testsuite/ld-riscv-elf/relax-twice-1.s: New.
		* testsuite/ld-riscv-elf/relax-twice-2.s: New.
		* testsuite/ld-riscv-elf/ld-riscv-elf.exp
		(run_relax_twice_test): New, and call it.

2021-07-06  Pedro Alves  <pedro@palves.net>
	    Qingchuan Shi  <qingchuan.shi@amd.com>

	Update gdb performance testsuite to be compatible with Python 3.8
	Running "make check-perf" on a system with Python 3.8 (e.g., Ubuntu
	20.04) runs into this Python problem:

	  Traceback (most recent call last):
	    File "<string>", line 1, in <module>
	    File "/home/pedro/rocm/gdb/src/gdb/testsuite/gdb.perf/lib/perftest/perftest.py", line 65, in run
	      self.execute_test()
	    File "<string>", line 35, in execute_test
	    File "/home/pedro/rocm/gdb/src/gdb/testsuite/gdb.perf/lib/perftest/measure.py", line 45, in measure
	      m.start(id)
	    File "/home/pedro/rocm/gdb/src/gdb/testsuite/gdb.perf/lib/perftest/measure.py", line 102, in start
	      self.start_time = time.clock()
	  AttributeError: module 'time' has no attribute 'clock'
	  Error while executing Python code.
	  (gdb) FAIL: gdb.perf/single-step.exp: python SingleStep(1000).run()

	... many times over.

	The problem is that the testsuite is using time.clock(), deprecated in
	Python 3.3 and finaly removed in Python 3.8.  The guidelines say to
	use time.perf_counter() or time.process_time() instead depending on
	requirements.  Looking at the current description of those functions,
	at:

	   https://docs.python.org/3.10/library/time.html

	we have:

	   time.perf_counter() -> float

	       Return the value (in fractional seconds) of a performance
	       counter, i.e. a clock with the highest available resolution to
	       measure a short duration. It does include time elapsed during
	       sleep and is system-wide. (...)

	   time.process_time() -> float

	       Return the value (in fractional seconds) of the sum of the
	       system and user CPU time of the current process. It does not
	       include time elapsed during sleep. It is process-wide by
	       definition. (...)

	I'm thinking that it's just best to record both instead of picking
	one.  So this patch replaces the MeasurementCpuTime measurement class
	with two new classes -- MeasurementPerfCounter and
	MeasurementProcessTime.  Correspondingly, this changes the reports in
	testsuite/perftest.log -- we have two new "perf_counter" and
	"process_time" measurements and the "cpu_time" measurement is gone.  I
	don't suppose breaking backward compatibility here is a big problem.
	I suspect no one is really tracking long term performance using the
	perf testsuite today.  And if they are, it shouldn't be hard to adjust.

	For backward compatility, with Python < 3.3, both perf_counter and
	process_time use the old time.clock.

	gdb/testsuite/ChangeLog:
	yyyy-mm-dd  Qingchuan Shi  <qingchuan.shi@amd.com>
		    Pedro Alves  <pedro@palves.net>

		* gdb.perf/lib/perftest/perftest.py: Import sys.
		(time.perf_counter, time.process_time): Map to time.clock on
		Python < 3.3.
		(MeasurementCpuTime): Delete, replaced by...
		(MeasurementPerfCounter, MeasurementProcessTime): .. these two new
		classes.
		* gdb.perf/lib/perftest/perftest.py: Import MeasurementPerfCounter
		and MeasurementProcessTime instead of MeasurementCpuTime.
		(TestCaseWithBasicMeasurements): Use MeasurementPerfCounter and
		MeasurementProcessTime instead of MeasurementCpuTime.


	Change-Id: Ia850c05d5ce57d2dada70ba5b0061f566444aa2b

2021-07-06  Pedro Alves  <pedro@palves.net>

	gdb.perf/: FAIL on Python errors, avoid "ERROR: internal buffer is full"
	Currently, if you run make check-perf on a system with Python 3.8,
	tests seen to PASS, but they actually test a lot less than intended,
	due to:

	 PerfTest::assemble, run ...
	 python BackTrace(64).run()
	 Traceback (most recent call last):
	   File "<string>", line 1, in <module>
	   File "/home/pedro/rocm/gdb/src/gdb/testsuite/gdb.perf/lib/perftest/perftest.py", line 65, in run
	     self.execute_test()
	   File "<string>", line 49, in execute_test
	   File "/home/pedro/rocm/gdb/src/gdb/testsuite/gdb.perf/lib/perftest/measure.py", line 45, in measure
	     m.start(id)
	   File "/home/pedro/rocm/gdb/src/gdb/testsuite/gdb.perf/lib/perftest/measure.py", line 102, in start
	     self.start_time = time.clock()
	 AttributeError: module 'time' has no attribute 'clock'
	 Error while executing Python code.
	 (gdb) PASS: gdb.perf/backtrace.exp: python BackTrace(64).run()

	And then, after fixing the above Python compatibility issues (which
	will be a separate patch), I get 86 instances of overflowing expect's
	buffer, like:

	  ERROR: internal buffer is full.
	  UNRESOLVED: gdb.perf/single-step.exp: python SingleStep(1000).run()

	This patch fixes both problems by adding & using a gdb_test_python_run
	routine that:

	 - checks for Python errors
	 - consumes output line by line

	gdb/testsuite/ChangeLog:
	yyyy-mm-dd  Pedro Alves  <pedro@palves.net>

		* gdb.perf/backtrace.exp: Use gdb_test_python_run.
		* gdb.perf/disassemble.exp: Use gdb_test_python_run.
		* gdb.perf/single-step.exp: Use gdb_test_python_run.
		* gdb.perf/skip-command.exp: Use gdb_test_python_run.
		* gdb.perf/skip-prologue.exp: Use gdb_test_python_run.
		* gdb.perf/solib.exp: Use gdb_test_python_run.
		* gdb.perf/template-breakpoints.exp: Use gdb_test_python_run.
		* lib/perftest.exp (gdb_test_python_run): New.

	Change-Id: I007af36f164b3f4cda41033616eaaa4e268dfd2f

2021-07-06  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Remove read1 timeout factor from gdb.base/info-macros.exp
	At the moment some check-read1 timeouts are handled like this in
	gdb.base/info-macros.exp:
	...
	gdb_test_multiple_with_read1_timeout_factor 10 "$test" $testname {
	  -re "$r1$r2$r3" {
	     pass $testname
	  }
	  -re ".*#define TWO.*\r\n$gdb_prompt" {
	     fail $testname
	  }
	  -re ".*#define THREE.*\r\n$gdb_prompt" {
	     fail $testname
	  }
	  -re ".*#define FOUR.*\r\n$gdb_prompt" {
	     fail $testname
	  }
	}
	...
	which is not ideal.

	We could use gdb_test_lines, but it currently doesn't support verifying
	the absence of regexps, which is done using the clauses above calling fail.

	Fix this by using gdb_test_lines and adding a -re-not syntax to
	gdb_test_lines, such that we can do:
	...
	gdb_test_lines $test $testname $r1.*$r2 \
	    -re-not "#define TWO" \
	    -re-not "#define THREE" \
	    -re-not "#define FOUR"
	...

	Tested on x86_64-linux, whith make targets check and check-read1.

	Also observed that check-read1 execution time is reduced from 6m35s to 13s.

	gdb/testsuite/ChangeLog:

	2021-07-06  Tom de Vries  <tdevries@suse.de>

		* gdb.base/info-macros.exp: Replace use of
		gdb_test_multiple_with_read1_timeout_factor with gdb_test_lines.
		(gdb_test_multiple_with_read1_timeout_factor): Remove.
		* lib/gdb.exp (gdb_test_lines): Add handling or -re-not <regexp>.

2021-07-06  Nelson Chu  <nelson.chu@sifive.com>

	RISC-V: Fix the build broken with -Werror.
	ChangeLog:

	bfd/

		* elfnn-riscv.c(riscv_elf_additional_program_headers): Removed the
		unused variable s.
		(riscv_elf_modify_segment_map): Added ATTRIBUTE_UNUSED for the
		unused parameter info.

2021-07-06  Tom de Vries  <tdevries@suse.de>

	[gdb/symtab] Fix skipping of import of C++ CU
	Tom Tromey observed that when changing the language in
	gdb.dwarf2/imported-unit-bp.exp from c to c++, the test failed.

	This is due to this code in process_imported_unit_die:
	...
	      /* We're importing a C++ compilation unit with tag DW_TAG_compile_unit
	         into another compilation unit, at root level.  Regard this as a hint,
	         and ignore it.  */
	      if (die->parent && die->parent->parent == NULL
	          && per_cu->unit_type == DW_UT_compile
	          && per_cu->lang == language_cplus)
	        return;
	...
	which should have a partial symtabs counterpart.

	Add the missing counterpart in process_psymtab_comp_unit.

	Tested on x86_64-linux (openSUSE Leap 15.2), no regressions for config:
	- using default gcc version 7.5.0
	  (with 5 unexpected FAILs)
	- gcc 10.3.0 and target board
	  unix/-flto/-O0/-flto-partition=none/-ffat-lto-objects
	  (with 1000 unexpected FAILs)

	gdb/ChangeLog:

	2021-07-06  Tom de Vries  <tdevries@suse.de>

		* dwarf2/read.c (scan_partial_symbols): Skip top-level imports of
		c++ CU.
		* testsuite/gdb.dwarf2/imported-unit-bp.exp: Moved to ...
		* testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl: ... here.
		* testsuite/gdb.dwarf2/imported-unit-bp-c++.exp: New test.
		* testsuite/gdb.dwarf2/imported-unit-bp-c.exp: New test.
		* testsuite/gdb.dwarf2/imported-unit.exp: Update.

2021-07-06  Kito Cheng  <kito.cheng@sifive.com>

	RISC-V: Add PT_RISCV_ATTRIBUTES and add it to PHDR.
	We added PT_RISCV_ATTRIBUTES to program header to make
	.riscv.attribute easier to find in dynamic loader or kernel.

	Ref:
	https://github.com/riscv/riscv-elf-psabi-doc/pull/71

	ChangeLog:

	bfd/

		* elfnn-riscv.c(RISCV_ATTRIBUTES_SECTION_NAME): New.
		(riscv_elf_additional_program_headers): Ditto.
		(riscv_elf_modify_segment_map): Ditto.
		(elf_backend_additional_program_headers): Ditto.
		(elf_backend_modify_segment_map): Ditto.
		(elf_backend_obj_attrs_section): Use RISCV_ATTRIBUTES_SECTION_NAME
		rather than string literal.

	binutils/

		* readelf.c(get_riscv_segment_type): New.
		(get_segment_type): Handle EM_RISCV.

	include/

		* elf/riscv.h (PT_RISCV_ATTRIBUTES): New.
		* testsuite/ld-elf/orphan-region.ld: Discard .riscv.attributes
		section for simplify testcase.
		* testsuite/ld-riscv-elf/attr-phdr.d: New.
		* testsuite/ld-riscv-elf/attr-phdr.s: Ditto.
		* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Add attr-phdr to
		testcase.

2021-07-06  Alan Modra  <amodra@gmail.com>

	Re: PR28055, segfault in bpf special reloc function
		PR 28055
		* elf64-bpf.c (bpf_elf_generic_reloc): Add missing ATTRIBUTE_UNUSED.

2021-07-06  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-05  Tom Tromey  <tom@tromey.com>

	Simplify debug_names index writing
	This changes the .debug_names writer to find the TU indices in the
	main loop over all CUs and TUs.  (An earlier patch applied this same
	treatment to the .gdb_index writer.)

	Simplify gdb_index writing
	write_gdbindex writes the CUs first, then walks the signatured type
	hash table to write out the TUs.  However, now that CUs and TUs are
	unified in the DWARF reader, it's simpler to handle both of these in
	the same loop.

	Minor cleanup to addrmap_index_data::previous_valid
	This changes addrmap_index_data::previous_valid to a bool, and
	initializes it inline.

2021-07-05  Tom Tromey  <tom@tromey.com>

	Fix oddity in write_gdbindex
	My recent patch to unify CUs and TUs introduced an oddity in
	write_gdbindex.  Here, we pass 'i' to recursively_write_psymbols, but
	we must instead pass 'counter', to handle the situation where a TU is
	mixed in with the CUs.

	I am not sure a test case for this is possible.  I think it can only
	happen when using DWARF 5, where a TU appears in .debug_info.
	However, this situation is already not handled correctly by
	.gdb_index.  I filed a bug about this.

2021-07-05  Tom Tromey  <tom@tromey.com>

	Fix warning in symtab.c
	The compiler gives this warning when building symtab.c:

	../../binutils-gdb/gdb/symtab.c:4247:28: warning: 'to_match' may be used uninitialized in this function [-Wmaybe-uninitialized]

	This patch fixes the warning by adding a gdb_assert_not_reached.

2021-07-05  H.J. Lu  <hjl.tools@gmail.com>

	ld: Cache and reuse the IR archive file descriptor
	Linker plugin_object_p opens the IR archive for each IR archive member.
	For GCC plugin, plugin_object_p closes the archive file descriptor.  But
	for LLVM plugin, the archive file descriptor remains open.  If there are
	3000 IR archive members, there are 3000 file descriptors for them.  We
	can run out of file descriptors petty easily.

	1. Add archive_plugin_fd and archive_plugin_fd_open_count to bfd so that
	we can cache and reuse the IR archive file descriptor for all IR archive
	members in the archive.
	2. Add bfd_plugin_close_file_descriptor to properly close the IR archive
	file descriptor.

	bfd/

		PR ld/28040
		* archive.c (_bfd_archive_close_and_cleanup): Close the archive
		plugin file descriptor if needed.
		* bfd.c (bfd): Add archive_plugin_fd and
		archive_plugin_fd_open_count.
		* opncls.c (_bfd_new_bfd): Initialize to -1.
		* plugin.c (bfd_plugin_open_input): Cache and reuse the archive
		plugin file descriptor.
		(bfd_plugin_close_file_descriptor): New function.
		(try_claim): Call bfd_plugin_close_file_descriptor.
		* plugin.h (bfd_plugin_close_file_descriptor): New.
		* bfd-in2.h: Regenerated.

	ld/

		PR ld/28040
		* plugin.c (plugin_input_file): Add ibfd.
		(release_plugin_file_descriptor): New function.
		(release_input_file): Call release_plugin_file_descriptor to
		close input->fd.
		(plugin_object_p): Call release_plugin_file_descriptor to close
		input->fd.  Also call release_plugin_file_descriptor if not
		claimed.
		* testsuite/config/default.exp (RANLIB): New.
		* testsuite/ld-plugin/lto.exp: Run ranlib test.

2021-07-05  Nick Clifton  <nickc@redhat.com>

	Restore the libiberty component of commit 50ad1254d5030d0804cbf89c758359ae202e8d55.
	This commit has not yet been applied to the master sources in the gcc repository.
	It was submitted here: https://gcc.gnu.org/pipermail/gcc-patches/2021-July/574405.html
	The commit allows options to be set for the AR and RANLIB programs used when building libiberty, which in turn allows building with LTO enabled.

	Updated translations (mainly Ukranian and French) triggered by creation of 2.37 branch.

2021-07-05  Tom de Vries  <tdevries@suse.de>

	[gdb/testsuite] Fix fail in gdb.fortran/ptype-on-functions.exp with gcc-7
	Since commit 05b85772061 "gdb/fortran: Add type info of formal parameter for
	clang" I see:
	...
	(gdb) ptype say_string^M
	type = void (character*(*), integer(kind=4))^M
	(gdb) FAIL: gdb.fortran/ptype-on-functions.exp: ptype say_string
	...

	The part of the commit causing the fail is:
	...
	 gdb_test "ptype say_string" \
	-    "type = void \\(character\\*\\(\\*\\), integer\\(kind=\\d+\\)\\)"
	+    "type = void \\(character\[^,\]+, $integer8\\)"
	...
	which fails to take into account that for gcc-7 and before, the type for
	string length of a string argument is int, not size_t.

	Fix this by allowing both $integer8 and $integer4.

	Tested on x86_64-linux, with gcc-7 and gcc-10.

	gdb/testsuite/ChangeLog:

	2021-07-05  Tom de Vries  <tdevries@suse.de>

		* gdb.fortran/ptype-on-functions.exp: Allow both $integer8 and
		$integer4 for size of string length.

2021-07-05  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: fall back on sigpending + sigwait if sigtimedwait is not available
	The macOS platform does not provide sigtimedwait, so we get:

	      CXX    compile/compile.o
	    In file included from /Users/smarchi/src/binutils-gdb/gdb/compile/compile.c:46:
	    /Users/smarchi/src/binutils-gdb/gdb/../gdbsupport/scoped_ignore_signal.h:69:4: error: use of undeclared identifier 'sigtimedwait'
	              sigtimedwait (&set, nullptr, &zero_timeout);
	              ^

	An alternative to sigtimedwait with a timeout of 0 is to use sigpending,
	to first check which signals are pending, and then sigwait, to consume
	them.  Since that's slightly more expensive (2 syscalls instead of 1),
	keep using sigtimedwait for the platforms that provide it, and fall back
	to sigpending + sigwait for the others.

	gdbsupport/ChangeLog:

		* scoped_ignore_signal.h (struct scoped_ignore_signal)
		<~scoped_ignore_signal>: Use sigtimedwait if HAVE_SIGTIMEDWAIT
		is defined, else use sigpending + sigwait.

	Change-Id: I2a72798337e81dd1bbd21214736a139dd350af87
	Co-Authored-By: John Baldwin <jhb@FreeBSD.org>

2021-07-05  Simon Marchi  <simon.marchi@polymtl.ca>

	gdbsupport/common.m4: check for sigtimedwait
	The next patch will make the use of sigtimedwait conditional to whether
	the platform provides it.  Start by adding a configure check for it.

	gdbsupport/ChangeLog:

		* common.m4 (GDB_AC_COMMON): Check for sigtimedwait.
		* config.in, configure: Re-generate.

	gdb/ChangeLog:

		* config.in, configure: Re-generate.

	gdbserver/ChangeLog:

		* config.in, configure: Re-generate.

	Change-Id: Ic7613fe14521b966b4d991bbcd0933ab14629c05

2021-07-05  Alan Modra  <amodra@gmail.com>

	Re: opcodes: constify & local meps macros
	Commit f375d32b35ce changed a generated file.  Edit the source instead.

		* mep.opc (macros): Make static and const.
		(lookup_macro): Return and use const pointer.
		(expand_macro): Make mac param const.
		(expand_string): Make pmacro const.

2021-07-05  Alan Modra  <amodra@gmail.com>

	PR28055, segfault in bpf special reloc function
	The testcase in this PR tickled two bugs fixed here.  output_bfd is
	NULL when a reloc special_function is called for final linking and
	when called from bfd_generic_get_relocated_section_contents.  Clearly
	using output_bfd is wrong as it results in segfaults.  Not only that,
	the endianness of the reloc field really should be that of the input.
	The second bug was not checking that the entire reloc field was
	contained in the section contents.

		PR 28055
		* elf64-bpf.c (bpf_elf_generic_reloc): Use correct bfd for bfd_put
		and bfd_put_32 calls.  Correct section limit checks.

2021-07-05  Alan Modra  <amodra@gmail.com>

	PR28047, readelf crash due to assertion failure
	DW_FORM_ref1, DW_FORM_ref2, DW_FORM_ref4, DW_FORM_ref1, and
	DW_FORM_ref_udata are all supposed to be within the containing unit.

		PR 28047
		* dwarf.c (get_type_abbrev_from_form): Add cu_end parameter.
		Check DW_FORM_ref1 etc. arg against cu_end rather than end of
		section.  Adjust all callers.

2021-07-05  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-04  Simon Marchi  <simon.marchi@polymtl.ca>

	gdb: return early if no execution in darwin_solib_create_inferior_hook
	When loading a file using the file command on macOS, we get:

	    $ ./gdb -nx --data-directory=data-directory -q -ex "file ./test"
	    Reading symbols from ./test...
	    Reading symbols from /Users/smarchi/build/binutils-gdb/gdb/test.dSYM/Contents/Resources/DWARF/test...
	    /Users/smarchi/src/binutils-gdb/gdb/thread.c:72: internal-error: struct thread_info *inferior_thread(): Assertion `current_thread_ != nullptr' failed.
	    A problem internal to GDB has been detected,
	    further debugging may prove unreliable.
	    Quit this debugging session? (y or n)

	The backtrace is:

	    * frame #0: 0x0000000101fcb826 gdb`internal_error(file="/Users/smarchi/src/binutils-gdb/gdb/thread.c", line=72, fmt="%s: Assertion `%s' failed.") at errors.cc:52:3
	      frame #1: 0x00000001018a2584 gdb`inferior_thread() at thread.c:72:3
	      frame #2: 0x0000000101469c09 gdb`get_current_regcache() at regcache.c:421:31
	      frame #3: 0x00000001015f9812 gdb`darwin_solib_get_all_image_info_addr_at_init(info=0x0000603000006d00) at solib-darwin.c:464:34
	      frame #4: 0x00000001015f7a04 gdb`darwin_solib_create_inferior_hook(from_tty=1) at solib-darwin.c:515:5
	      frame #5: 0x000000010161205e gdb`solib_create_inferior_hook(from_tty=1) at solib.c:1200:3
	      frame #6: 0x00000001016d8f76 gdb`symbol_file_command(args="./test", from_tty=1) at symfile.c:1650:7
	      frame #7: 0x0000000100abab17 gdb`file_command(arg="./test", from_tty=1) at exec.c:555:3
	      frame #8: 0x00000001004dc799 gdb`do_const_cfunc(c=0x000061100000c340, args="./test", from_tty=1) at cli-decode.c:102:3
	      frame #9: 0x00000001004ea042 gdb`cmd_func(cmd=0x000061100000c340, args="./test", from_tty=1) at cli-decode.c:2160:7
	      frame #10: 0x00000001018d4f59 gdb`execute_command(p="t", from_tty=1) at top.c:674:2
	      frame #11: 0x0000000100eee430 gdb`catch_command_errors(command=(gdb`execute_command(char const*, int) at top.c:561), arg="file ./test", from_tty=1, do_bp_actions=true)(char const*, int), char const*, int, bool) at main.c:523:7
	      frame #12: 0x0000000100eee902 gdb`execute_cmdargs(cmdarg_vec=0x00007ffeefbfeba0 size=1, file_type=CMDARG_FILE, cmd_type=CMDARG_COMMAND, ret=0x00007ffeefbfec20) at main.c:618:9
	      frame #13: 0x0000000100eed3a4 gdb`captured_main_1(context=0x00007ffeefbff780) at main.c:1322:3
	      frame #14: 0x0000000100ee810d gdb`captured_main(data=0x00007ffeefbff780) at main.c:1343:3
	      frame #15: 0x0000000100ee8025 gdb`gdb_main(args=0x00007ffeefbff780) at main.c:1368:7
	      frame #16: 0x00000001000044f1 gdb`main(argc=6, argv=0x00007ffeefbff8a0) at gdb.c:32:10
	      frame #17: 0x00007fff20558f5d libdyld.dylib`start + 1

	The solib_create_inferior_hook call in symbol_file_command was added by
	commit ea142fbfc9c1 ("Fix breakpoints on file reloads for PIE
	binaries").  It causes solib_create_inferior_hook to be called while
	the inferior is not running, which darwin_solib_create_inferior_hook
	does not expect.  darwin_solib_get_all_image_info_addr_at_init, in
	particular, assumes that there is a current thread, as it tries to get
	the current thread's regcache.

	Fix it by adding a target_has_execution check and returning early.  Note
	that there is a similar check in svr4_solib_create_inferior_hook.

	gdb/ChangeLog:

		* solib-darwin.c (darwin_solib_create_inferior_hook): Return
		early if no execution.

	Change-Id: Ia11dd983a1e29786e5ce663d0fcaa6846dc611bb

2021-07-04  GDB Administrator  <gdbadmin@sourceware.org>

	Automatic date update in version.in

2021-07-03  H.J. Lu  <hjl.tools@gmail.com>

	gprof: Regenerate configure
		* configure: Regenerated.

2021-07-03  Joel Brobecker  <brobecker@adacore.com>

	Update NEWS post GDB 11 branch creation.
	gdb/ChangeLog:

		* NEWS: Create a new section for the next release branch.
		Rename the section of the current branch, now that it has
		been cut.

2021-07-03  Joel Brobecker  <brobecker@adacore.com>

	Bump version to 12.0.50.DATE-git.
	Now that the GDB 11 branch has been created, we can
	bump the version number.

	gdb/ChangeLog:

		GDB 11 branch created (4b51505e33441c6165e7789fa2b6d21930242927):
		* version.in: Bump version to 12.0.50.DATE-git.

	gdb/testsuite/ChangeLog:

		* gdb.base/default.exp: Change $_gdb_major to 12.

2021-07-03  Tom Tromey  <tom@tromey.com>

	Use 'bool' more idiomatically in dwarf_decode_lines
	I noticed a couple of spots related to dwarf_decode_lines where the
	'include_p' field was not being used idiomatically -- it is of type
	bool now, so treat it as such.

	gdb/ChangeLog
	2021-07-03  Tom Tromey  <tom@tromey.com>

		* dwarf2/read.c (lnp_state_machine::record_line): Use 'true'.
		(dwarf_decode_lines): Remove '=='.

2021-07-03  Nick Clifton  <nickc@redhat.com>

	More minor updates to the how-to-make-a-release documentation

	Update version number and regenerate files

	Add markers for 2.37 branch