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
|
2009-07-08 Dmitry V. Levin <ldv@altlinux.org>
Clean up spacing to fix warnings reported by git diff --check.
* ChangeLog: Fix spaces before tab in indent.
* bjm.c: Likewise.
* debian/changelog: Likewise.
* strace-graph: Likewise.
* syscall.c: Likewise.
* INSTALL: Fix trailing blank lines.
* README-linux: Likewise.
* README-svr4: Likewise.
* linux/sparc/gen.pl: Likewise.
* linux/sparc/syscall1.h: Likewise.
* linux/sparc64/syscall1.h: Likewise.
* linux/x86_64/gentab.pl: Likewise.
* sunos4/syscall.h: Likewise.
* test/Makefile: Likewise.
* debian/rules: Fix trailing whitespaces.
* desc.c: Likewise.
* svr4/syscallent.h: Likewise.
* test/childthread.c: Likewise.
* test/leaderkill.c: Likewise.
2009-07-07 Dmitry V. Levin <ldv@altlinux.org>
* .cvsignore: Remove.
* README-CVS: Rename to README-hacking.
* Makefile.am (EXTRA_DIST): Remove README-CVS.
2009-06-01 Dmitry V. Levin <ldv@altlinux.org>
* bjm.c (sys_query_module): Fix format warning reported by
gcc -Wformat-security.
* file.c (tprint_open_modes): Likewise.
* process.c (printargv): Likewise.
* signal.c (printsignal): Likewise.
Clean up header checks.
* configure.ac: Reformat AC_CHECK_HEADERS to keep it sorted and
easily updated, and reduce merging errors in the future.
* system.c: Convert all non-standard #ifdef checks for specific
headers to regular #ifdef HAVE_*_H checks.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-04-20 Denys Vlasenko <dvlasenk@redhat.com>
* file.c (printstatsol, printstat_sparc64):
Remove NULL/error check for addr parameter.
(printoldstat, printstat, printoldstat64):
Move NULL/error check for addr parameter
so that it happens before printstatsol/printstat_sparc64 calls.
2009-04-16 Denys Vlasenko <dvlasenk@redhat.com>
* file.c (print_dirfd): Use int for file descriptor, not a long.
* process.c (printwaitn): Use int for PID, not a long.
2009-04-15 Denys Vlasenko <dvlasenk@redhat.com>
* signal (sys_rt_sigtimedwait): Fix sigtimedwait syscall decoding.
2009-04-15 Denys Vlasenko <dvlasenk@redhat.com>
* signal (sys_rt_sigaction): Print struct sigaction correctly
in 32/64 environment.
* desc.c (printflock): Add #ifdefs around earlier flock 32/64 fix
so that we don't waste time on arches with one personality.
2009-04-14 Denys Vlasenko <dvlasenk@redhat.com>
* signal.c: Whitespace, comment, and style fixes, no code changes.
* file.c: Ditto.
* time.c: Ditto.
* process.c: Ditto.
* resource.c: Ditto.
2009-03-23 Denys Vlasenko <dvlasenk@redhat.com>
* system.c (sram_alloc_flag): Add L2_SRAM constant.
by Mike Frysinger (vapier AT gentoo.org).
(sys_sram_alloc): Fix improperly used %zu:
tcp->u_arg is not a size_t, it is a long.
* net.c (printcmsghdr): Fix improperly used %zu:
struct cmsghdr::cmsg_len is not a size_t.
2009-03-10 Denys Vlasenko <dvlasenk@redhat.com>
Decode fcntl's F_{GET,SET}LEASE, F_NOTIFY, and F_DUPFD_CLOEXEC.
By Mike Frysinger (vapier AT gentoo.org)
* desc.c: Add F_SETLEASE, F_GETLEASE, F_NOTIFY,
F_DUPFD_CLOEXEC to fcntlcmds[]. Create notifyflags[] array.
(sys_fcntl): Handle new flags.
Optimize printing of open modes.
* defs.h: Declare sprint_open_modes(),
remove unused parameter in tprint_open_modes().
* desc.c (sprint_open_modes): Move fuction definition from here...
* file.c (sprint_open_modes): To here.
(tprint_open_modes): Use sprint_open_modes(), it already
generates needed string.
* ipc.c: Remove unused parameter from calls
to tprint_open_modes().
2009-02-27 Denys Vlasenko <dvlasenk@redhat.com>
AVR32 support by Hans-Christian Egtvedt
(hans-christian.egtvedt AT atmel.com).
* configure.ac: Make it recognize avr32.
* defs.h: Define LINUX_AVR32.
* linux/avr32/syscallent.h: New file.
* Makefile.am: Reference linux/avr32/syscallent.h.
* proc.c (change_syscall, setarg): Add support for avr32.
(struct xlat struct_user_offsets[]): Ditto.
* syscall.c (get_scno): Ditto.
(get_error, force_result, syscall_enter): Ditto.
* util.c (getpc, printcall): Ditto.
2009-02-25 Denys Vlasenko <dvlasenk@redhat.com>
CRIS support by Hinko Kocevar (hinko.kocevar AT cetrtapot.si)
* configure.ac: Make it recognize cris.
* process.c: Define ARG_xxx constants for cris.
(change_syscall): Add support for cris.
(struct_user_offsets): Add cris-specific data.
* signal.c (sys_sigreturn): Add support for cris.
* syscall.c (get_scno): Add support for cris.
(syscall_fixup): Add support for cris.
(get_error): Add support for cris.
(syscall_enter): Add support for cris.
(force_result): While at it, fix cpp directives indentation.
* util.c (printcall): Add support for cris.
2009-02-24 Denys Vlasenko <dvlasenk@redhat.com>
* process.c: Indent preprocessor directives so that nesting
can be figured out. Add PTRACE_SET_SYSCALL to ptrace_cmds[].
* ioctlent.sh: Improved by Mike Frysinger.
* HACKING-scripts: New file by Mike Frysinger.
2009-02-20 Denys Vlasenko <dvlasenk@redhat.com>
Further signalent.h cleanup.
* linux/ia64/signalent.h: Remove, it is identical to common signalent.h
sans "SIGRTnn" definitions which are redundant.
* linux/powerpc/signalent.h: Remove, it is identical to common signalent.h
sans outdated "SIGUNUSED" which should be "SIGSYS".
* linux/s390/signalent.h: Ditto.
* linux/s390x/signalent.h: Ditto.
* Makefile.am: Remove references to the above files.
2009-02-20 Denys Vlasenko <dvlasenk@redhat.com>
Patch by Mike Frysinger (vapier AT gentoo.org).
* linux/ioctlent.sh: Update sed machinery to parse _IOC() macros
with two constants.
2009-02-20 Denys Vlasenko <dvlasenk@redhat.com>
Patch by Mike Frysinger (vapier AT gentoo.org).
* Makefile.am: Remove reference to linux/sh/signalent.h.
* linux/sh/signalent.h: Remove, it is identical to common signalent.h.
2009-02-20 Denys Vlasenko <dvlasenk@redhat.com>
Patch by Mike Frysinger (vapier AT gentoo.org).
* linux/errnoent.h: Make ERRNO_58 show EDEADLOCK for POWERPC.
* Makefile.am: Remove reference to linux/powerpc/errnoent.h.
* linux/powerpc/errnoent.h: Remove, we can use common errnoent.h now.
2009-02-20 Denys Vlasenko <dvlasenk@redhat.com>
Patch by Mike Frysinger (vapier AT gentoo.org).
Removing redundant errnoent.h files.
* Makefile.am: Remove reference to linux/ia64/errnoent.h,
linux/s390/errnoent.h, linux/s390x/errnoent.h and linux/sh/errnoent.h.
* linux/ia64/errnoent.h: Remove, this arch uses common errnoent.h.
* linux/s390/errnoent.h: Ditto.
* linux/s390x/errnoent.h: Ditto.
* linux/sh/errnoent.h: Ditto.
2009-02-10 Roland McGrath <roland@redhat.com>
* configure.ac: Check for struct sigcontext.
* signal.c [LINUX] [M68K] (struct sigcontext): Don't define it if
[HAVE_STRUCT_SIGCONTEXT].
From Muttley Meen <muttley.meen@gmail.com>.
2009-02-09 Denys Vlasenko <dvlasenk@redhat.com>
* defs.h: Correct the comment about TCB_SUSPENDED.
* strace.c: Fix misplaced #endif.
* util.c: Indent preprocessor directives, mark code parts
which can never be reached by compilation because of
the combination of #if directives. These are likely dead code,
I want to remove them later.
2009-01-29 Denys Vlasenko <dvlasenk@redhat.com>
* strace.c (newoutf): Prevent -o FILENAME overflowing the stack.
(startup_attach): Fix wrong pid in "Process <PID> attached".
(handle_group_exit): Do not consider exit to be spurious if
tcb has TCB_STARTUP bit set - we can attach to the task
right before its death, it can legitimately happen.
(handle_stopped_tcbs): Ditto.
2009-01-26 Denys Vlasenko <dvlasenk@redhat.com>
* process.c (printwaitn): Add comment about wait4() pid expansion.
Use #ifdef ALPHA instead of LINUX_64BIT, it was misleading
(by implying "any 64-bit platform").
* defs.h: Remove now-unused LINUX_64BIT define.
* resource.c (sys_osf_getrusage): Fix indentation.
2009-01-26 Denys Vlasenko <dvlasenk@redhat.com>
* process.c (internal_clone): Fix fallout from tcb table expansion
simplification. Due to overlooked else, I forgot to group
fork_tcb(tcp) and alloctcb(pid) in a block.
2009-01-23 Michal Nowak <mnowak@redhat.com>
* syscall.c (get_scno): Fix warnings about unused variable 'pid'.
2009-01-23 Michal Nowak <mnowak@redhat.com>
* mem.c (print_ldt_entry): Fix warning:
Format '%#08lx' expects type 'long unsigned int', but
argument 2 was type 'unsigned int'.
2009-01-17 Denys Vlasenko <dvlasenk@redhat.com>
Two cleanups: tcb table expansion failure is not really a survivable
event, we do not have any viable way to continue. No wonder most
places where that is detected have FIXMEs.
It's way simpler to treat as fatal failure, and handle it inside
tcb table expansion finctions.
Second cleanup: tidy up haphazard locations of a few externs.
* defs.h: Change return type of expand_tcbtab() to void.
Declare change_syscall().
* process.c: Change all callsites of alloctcb(), alloc_tcb() and
fork_tcb(), removing now-redundant error checks.
(fork_tcb): Change return type to void - it can't fail now.
* strace.c: Move extern declarations out of function bodies.
Change all callsites of alloctcb(), alloc_tcb() and
fork_tcb(), removing now-redundant error checks.
(expand_tcbtab): Change return type to void - it can't fail now.
On failure to expand, print a message, clean up, and exit.
(alloc_tcb): On failure to expand, print a message, clean up, and exit.
* util.c (setbpt): Remove extern declaration from function body.
2009-01-14 Denys Vlasenko <dvlasenk@redhat.com>
* linux/bfin/syscallent.h: sys_futex has 6 parameters, not 5.
2009-01-13 Denys Vlasenko <dvlasenk@redhat.com>
Fixes for ptrace() argument parsing.
* process.c: Add parsing of PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG,
PTRACE_GETSIGINFO, PTRACE_SETSIGINFO.
* defs.h: Declare several "extern const struct xlat" arrays here.
* desc.c: Remove open_mode_flags[] and open_access_modes[]
extern declarations.
* net.c: Remove open_mode_flags[] extern declaration.
* sock.c: Remove addrfams[] extern declaration.
* util.c: Remove struct_user_offsets[] extern declaration.
* signal.c: Remove open_mode_flags[] extern declaration.
2009-01-06 Denys Vlasenko <dvlasenk@redhat.com>
Output format fixes, improving the situation after recent
change which added beeter handling of processes suddenly
disappearing. Now we often do not finish last line
before exiting in those cases.
The only change affecting something other than output
is change in umovestr where we were calling
abort() on ptrace error.
* strace.c (trace): If trace_syscall() failed with ESRCH,
finish current output line with " <unfinished ...>".
(mp_ioctl): While we are at it, fix gross style mismatch
in this function definition. No code chages.
* syscall.c (trace_syscall): If decode fails on syscall exit,
finish current output line with "= ? <unavailable>".
* util.c (umoven): Do not complain if error is ESRCH.
(umovestr): Do not complain and do not abort() if error is ESRCH.
* defs.h: Remove unused tcp parameter from printtrailer().
* process.c: Adjust printtrailer() calls accordingly.
* strace.c: Adjust printtrailer() calls accordingly.
* syscall.c: Adjust printtrailer() calls accordingly.
2009-01-06 Denys Vlasenko <dvlasenk@redhat.com>
* desc.c (printflock): Fix display of fcntl(F_SETLK) on
non-native 32-bit architecture.
Fixes RH#471169 "format fcntl64() system calls for
32 bit application incorrect".
* desc.c: const'ify two static struct xlat vector[]'s,
convert all remaining old style C parameter declarations
in this file.
2008-11-13 Kirill A. Shutemov <kirill@shutemov.name>
* linux/arm/syscallent.h: Update syscalls.
Based on patch by Enrico Scholz.
* linux/arm/syscallent.h: Fix build on ARM EABI which does not
provide syscalls socketcall and ipc.
2009-01-01 Andreas Schwab <schwab@suse.de>
* net.c (sys_accept): Properly decode third argument as pointer to
int.
2008-12-30 Denys Vlasenko <dvlasenk@redhat.com>
Experimental support for -D option.
Unlike normal case, with -D *grandparent* process exec's,
becoming a traced process. Child exits (this prevents traced process
from having children it doesn't expect to have), and grandchild
attaches to grandparent similarly to strace -p PID.
This allows for more transparent interaction in cases
when process and its parent are communicating via signals,
wait() etc. Without -D, strace process gets lodged in between,
disrupting parent<->child link.
* strace.c: Add global flag variable daemonized_tracer for -D option.
(startup_attach): If -D, fork and block parent in pause().
In this case we are already a child, we in fact created a grandchild.
After attaching to grandparent, grandchild SIGKILLs parent.
(startup_child): If -D, parent blocks in wait(), then
execs the program to strace. Normally (w/o -D), it is child
who execs the program.
(main): Detect -D option, call startup_attach() if it is given.
2008-12-30 Kirill A. Shutemov <kirill@shutemov.name>
Fix some warnings on ARM build.
* defs.h: include <sys/ptrace.h> on arm too.
* syscall.c: EABI arm does not need decode_subcall(),
ifdef it out.
2008-12-29 Nick Black <dankamongmen@acm.org>
* linux/syscallent.h: Mark sendfile(2) as network syscall.
* linux/*/syscallent.h: Same, for all architectures.
2008-12-17 Denys Vlasenko <dvlasenk@redhat.com>
Make strace detect when traced process suddenly disappeared
(prime example is randomly arriving SIGKILL).
* defs.h (do_ptrace, ptrace_restart): Declare new functions
* process.c: Use ptrace_restart instead of bare ptrace.
This catches and records ESRCH errors.
Print "<unavailable>" if syscall decode or result can't be
determined because of an earlier error in ptrace()
* syscall.c (trace_syscall): Stop indiscriminately bailing out
on errors, print "syscall(????" or even "????(????" but continue.
* util.c (do_ptrace, ptrace_restart): Define new functions.
(upeek): use do_ptrace in order to catch and record ESRCH.
Do not print error message in this case.
Fixes RH#472053.
2008-12-17 Denys Vlasenko <dvlasenk@redhat.com>
* signal.c (sys_sigaction, sys_rt_sigaction): Fix typo
in (sa_handler == SIG_IGN) comparison, it was using SIG_DFL
instead.
2008-12-16 Denys Vlasenko <dvlasenk@redhat.com>
* defs.h: Modify declaration of upeek to take struct tcb *
parameter instead of pid_t.
* process.c: Change all upeek calls accordingly.
* signal.c: Likewise.
* strace.c: Likewise.
* syscall.c: Likewise.
* util.c: Likewise.
2008-11-11 Dmitry V. Levin <ldv@altlinux.org>
* sock.c [LINUX] (sock_ioctl): Parse more SIOCS* ioctls.
2008-12-09 Roland McGrath <roland@redhat.com>
* strace.1 (DIAGNOSTICS): New section, describe exit behavior.
2008-11-09 Dmitry V. Levin <ldv@altlinux.org>
* process.c (prctl_options): Update constants from linux 2.6.27.
* system.c (capabilities): Add more capability values.
* util.c (string_quote): Fix support for NUL-terminated string.
Add comments.
(printpathn): Fix the case when "..." was appended to the output
but no truncation was actually made. Add comments.
(printstr): Fix memory allocation. Fix two cases when "..." was
appended to the output but no truncation was actually made.
Add comments.
Fixes RH#470529.
2008-10-23 Dmitry V. Levin <ldv@altlinux.org>
Implement parsers for new linux syscalls.
* desc.c (do_dup2, [LINUX] sys_dup3): New functions.
(sys_dup2): Use do_dup2.
[LINUX] (sys_epoll_create1): New function.
[LINUX] (do_eventfd, sys_eventfd2): New functions.
[LINUX] (sys_eventfd): Use do_eventfd.
* net.c (do_pipe, [LINUX] sys_pipe2): New functions.
(sys_pipe): Use do_pipe.
* signal.c [LINUX] (do_signalfd, sys_signalfd4): New functions.
[LINUX] (sys_signalfd): Use do_signalfd.
* linux/syscall.h: Declare new sys_* functions.
* linux/syscallent.h: Hook up signalfd4, eventfd2, epoll_create1,
dup3, pipe2, inotify_init1.
* linux/x86_64/syscallent.h: Hook up paccept, signalfd4, eventfd2,
epoll_create1, dup3, pipe2, inotify_init1.
2008-10-23 Mike Frysinger <vapier@gentoo.org>
Port strace to the Blackfin architecture.
* configure.ac: Add bfin to supported architectures.
* process.c: Skip u_fpvalid/u_fpstate for Blackfin architecture.
(change_syscall): Support Blackfin architecture.
* syscall.c: Declare r0 for Blackfin architecture.
(get_scno): Decode Blackfin syscall number.
(syscall_fixup): Extract Blackfin return value.
(get_error): Decode Blackfin return value.
(force_result): Poke Blackfin return value.
(syscall_enter): Extract Blackfin syscall arguments.
* defs.h: Define TCB_WAITEXECVE for Blackfin architecture.
* linux/syscall.h (sys_sram_alloc): Declare for Blackfin
architecture.
* system.c (sys_sram_alloc): Decode Blackfin sram_alloc() syscall.
* util.c (getpc): Handle PC on Blackfin architecture.
(printcall): Likewise.
* linux/bfin/ioctlent.h, linux/bfin/syscallent.h: New Blackfin
headers.
* Makefile.am (EXTRA_DIST): Add linux/bfin/ioctlent.h and
linux/bfin/syscallent.h.
2008-09-18 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Accept uclinux hosts as linux.
2008-10-22 Dmitry V. Levin <ldv@altlinux.org>
Handle socket type flags introduced in linux 2.6.27.
* net.c (socktypes): Add SOCK_DCCP.
(sock_type_flags): New xlat structure.
(tprint_sock_type): New function.
(sys_socket, sys_socketpair): Use it to parse socket type and
socket type flags.
2008-09-29 Dmitry V. Levin <ldv@altlinux.org>
* strace.c (startup_child): Save child pid for future use.
(main): Exit/kill ourself with straced child's exitcode/signal.
(trace): If signalled process pid matches the saved child pid,
save the signal number. If terminated process pid matches the
saved child pid, save its exit status.
Patch from Denys Vlasenko <dvlasenk@redhat.com>
Fixes RH#105371.
2008-09-12 Tomas Pospisek <tpo@sourcepole.ch>
Jan Kratochvil <jan.kratochvil@redhat.com>
* strace.1 (DESCRIPTION): New description of unfinished system calls
and system calls restarting.
2008-09-03 Dmitry V. Levin <ldv@altlinux.org>
* desc.c (sys_fcntl): Do not initialize auxstr for failed syscall.
* process.c (sys_fork, sys_rfork) [USE_PROCFS]: Likewise.
* signal.c (sys_signal): Likewise.
* stream.c (internal_stream_ioctl): Likewise.
* time.c (sys_adjtimex): Likewise.
* syscall.c (trace_syscall): If RVAL_STR is set, then
print auxstr for failed syscall as well.
* syscall.c (is_restart_error): New function.
* defs.h (is_restart_error): Declare it.
* linux/dummy.h (sys_nanosleep): Uncouple from sys_adjtime().
* time.c (sys_nanosleep): New function, based on is_restart_error().
* process.c (sys_prctl): Decode PR_SET_PDEATHSIG, PR_GET_PDEATHSIG,
PR_SET_DUMPABLE, PR_GET_DUMPABLE, PR_SET_KEEPCAPS, PR_GET_KEEPCAPS.
Fix PR_GET_UNALIGN decoder.
(prctl_options): Add more constants.
* linux/syscallent.h: Use sys_prctl() decoder for "prctl" syscall.
* linux/alpha/syscallent.h: Likewise.
* linux/arm/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
2008-09-02 Dmitry V. Levin <ldv@altlinux.org>
* linux/x86_64/syscallent.h: Fix syscall numbers for "tee" and
"sync_file_range".
From Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
2008-08-28 Roland McGrath <roland@redhat.com>
* strace.1 (BUGS): New section, mention SIGTRAP interference.
* strace.spec (%ifarch %{strace64_arches}): Use cp -p instead of ln
for %{rhel} < 6.
* configure.ac, NEWS: Version 4.5.18.
* strace.spec: 4.5.18-1.
2008-08-24 Roland McGrath <roland@redhat.com>
* linux/syscall.h (SYS_socket_subcall et al, SYS_ipc_subcall et al):
Don't define these if [__ARM_EABI__].
Reported by Johannes Stezenbach <js@sig21.net>.
* syscall.c (trace_syscall): Conditionalize on [SYS_socket_subcall]
and [SYS_ipc_subcall] individually.
* linux/powerpc/syscallent.h: Handle subpage_prot.
* mem.c [LINUX && POWERPC] (sys_subpage_prot): New function.
* linux/syscall.h [POWERPC]: Declare it.
From Simon Murray <simon@transitive.com>.
* mem.c (mmap_prot): Handle PROT_SAO.
From Simon Murray <simon@transitive.com>.
* mem.c (madvise_flags): Typo fixes. Rename to madvise_cmds.
(sys_madvise): Use printxval, not printflags.
Reported by Rajeev V. Pillai <rajeevvp@gmail.com>.
2008-08-19 Roland McGrath <roland@redhat.com>
* signal.c (sys_sigaction, sys_rt_sigaction): Don't omit the rest of
the struct after sa_handler is a known constant. Some sa_flags bits
have meaning even for SIG_IGN/SIG_DFL.
2008-08-06 Jan Kratochvil <jan.kratochvil@redhat.com>
* util.c (CLONE_VM): Define if not defined already.
(setbpt): Clear CLONE_VM in the case we already clear CLONE_VFORK for
SYS_clone and SYS_clone2.
Reported by Michal Nowak.
Fixes RH#455078.
2008-08-06 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix compiler warnings.
* signal.c (sys_signal): Cast to SIG_* to the matching type LONG.
* strace.c (trace): Variables PSR and PC are now signed.
* syscall.c (syscall_enter): Variable RBS_END is now signed long.
Remove/add the RBS_END casts appropriately.
* util.c [IA64] (arg_setup): Variable BSP is now signed long.
Remove/add the BSP casts appropriately.
<ia32>: Initialize *STATE.
2008-07-31 Roland McGrath <roland@redhat.com>
* Makefile.am (EXTRA_DIST): Add new linux/arm/ files.
* file.c [LINUX] (struct kernel_dirent): Define it locally,
do not use <linux/dirent.h>.
Fixes RH#457291.
* configure.ac: Add AC_HEADER_STDBOOL.
* defs.h [HAVE_STDBOOL_H]: #include <stdbool.h>.
Fixes Debian#492774.
2008-07-24 Dmitry V. Levin <ldv@altlinux.org>
* strace.c (main): Fix -F option backwards compatibility.
2008-07-22 Roland McGrath <roland@redhat.com>
* Makefile.am (EXTRA_DIST): Add new debian/ files.
2008-07-21 Roland McGrath <roland@redhat.com>
* configure.ac: Version 4.5.17.
* strace.spec: 4.5.17-1.
* defs.h [LINUXSPARC]: Don't #include <linux/a.out.h>.
2008-07-19 Frederik Schüler <fs@debian.org>
* debian/control: Add strace64 package.
* debian/rules: Use debhelper flag --same-arch instead of --arch in
order to build strace64 only on the specified architectures.
* debian/strace64.install: New file, list for dh_install.
* debian/strace64.manpages: New file, list for dh_install.
* debian/changelog: Add prereleases entries.
Fixes Debian#491167, Debian#491188.
2008-07-18 Andreas Schwab <schwab@suse.de>
* linux/ia64/syscallent.h: Decode mincore syscall.
* linux/powerpc/syscallent.h: Fix argument count for request_key.
* term.c (term_ioctl): Decode indirect parameter as int, not long.
2008-07-17 Roland McGrath <roland@redhat.com>
* NEWS, strace.spec: Updates in preparation for release.
* process.c (printwaitn): When current personality's wordsize is
smaller than native, sign-extend the PID argument from 32 bits.
* process.c (futexops): Update table.
(sys_futex): Handle FUTEX_WAIT_BITSET correctly.
From Ulrich Drepper <drepper@redhat.com>.
Fixes RH#448628.
* linux/syscallent.h: Fix "futex" argument count.
* linux/alpha/syscallent.h: Likewise.
* linux/arm/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
From Ulrich Drepper <drepper@redhat.com>.
Fixes RH#448629.
* signal.c (sigact_flags): Prefer SA_NODEFER to SA_NOMASK,
SA_RESETHAND to SA_ONESHOT.
Fixes RH#455821.
2008-07-09 Frederik Schüler <fs@debian.org>
* debian/rules: Remove the broken udeb creation routines, and redo the
complete install procedure using debhelper.
* debian/strace.docs: New file, list for dh_installdocs.
* debian/strace.examples: New file, list for dh_installexamples.
* debian/strace.install: New file, list for dh_install.
* debian/strace-udeb.install: New file, list for dh_install.
* debian/strace.manpages : New file, list for dh_installmanpages.
* debian/copyright: Update.
* debian/control: Fix libc6 build dependency for alpha and ia64.
(strace-udeb: XC-Package-Type): Add header.
* debian/changelog: Cosmetic changes.
2008-07-03 Jan Kratochvil <jan.kratochvil@redhat.com>
Trace vfork under -f on all the platforms.
* strace.1 <-f>: Describe Linux catches new children immediately.
<-F>: Make the option obsolete. Move the SunOS VFORK comment to the
`-f' option description.
* defs.h (followvfork): Declaration removed.
* strace.c (followvfork): Variable removed.
(main) <-F>: Merge with the `-f' option.
(trace): Make !FOLLOWVFORK unconditional.
* process.c (internal_fork): Make !FOLLOWVFORK unconditional.
2008-07-01 Frederik Schüler <fs@debian.org>
* debian/changelog: List all bugs closed since the last release.
* debian/control: Remove Wichert Akkerman from uploaders list.
* debian/control: Bump standards version to 3.8.0.
* debian/control: Add Homepage field.
* debian/rules: Fix dpkg-gencontrol call.
* debian/compat: New file, set to compatibility level 5.
* debian/rules: Call dh_clean on clean target.
* debian/rules: Add dh_md5sums call.
Fixes Debian#439428.
2008-06-30 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix ia64 `-f' on clone2 formerly crashing the child.
* util.c [IA64] (restore_arg0, restore_arg1): Define as empty.
Fixes RH#453438.
2008-06-27 Jan Kratochvil <jan.kratochvil@redhat.com>
* util.c (CLONE_VFORK): Define if not defined already.
(setbpt): Clear CLONE_VFORK for SYS_clone and SYS_clone2.
Reported by Vitaly Mayatskikh.
Fixes RH#455078.
2008-06-29 Dmitry V. Levin <ldv@altlinux.org>
* linux/x86_64/syscallent.h: Remove duplicate syscall entries
for #283 and #284.
2008-06-27 Jan Kratochvil <jan.kratochvil@redhat.com>
* linux/syscallent.h: Remove a duplicite syscall stub #326.
2008-05-27 Roland McGrath <roland@redhat.com>
* syscall.c [LINUX] (is_negated_errno): New function.
(get_error) [LINUX]: Use it for all such cases.
Fixes RH#447587.
2008-05-19 Roland McGrath <roland@redhat.com>
* linux/x86_64/syscallent.h: Update entries for timerfd_* and fallocate.
* file.c (sys_fallocate): New function.
* linux/syscall.h: Declare it.
* linux/syscallent.h: Update entry.
From Kyle McMartin <kyle@mcmartin.ca>.
* time.c (sys_timerfd_create): New function.
(sys_timerfd_settime, sys_timerfd_gettime): New functions.
* linux/syscall.h: Declare them.
* linux/syscallent.h: Update entries for those syscalls.
From Kyle McMartin <kyle@mcmartin.ca>.
* debian/rules (binary-arch): Fix chmod/chown typo.
Fixes Debian#459255.
* debian/rules (binary-arch): Install strace-graph in examples/
directory under package doc.
Fixes Debian#469068.
* signal.c (sys_kill): When current personality's wordsize is smaller
than native, sign-extend the PID argument from 32 bits.
Fixes RH#430585.
* configure.ac: Add check for struct sigcontext_struct in <signal.h>.
* signal.c [! HAVE_ASM_SIGCONTEXT_H] [I386] (struct sigcontext_struct):
Conditionalize definition on !HAVE_STRUCT_SIGCONTEXT_STRUCT.
Fixes Debian#456879.
* util.c [LINUX] (setbpt): Use correct SYS_clone number for current
personality.
Fixes RH#447475.
2008-05-08 David S. Miller <davem@davemloft.net>
* syscall.c (socket_map, sparc_socket_decode): Delete.
(trace_syscall): Use common socketcall and ipc subcall
support on sparc.
* linux/sparc/syscall.h (sys_semtimedop): Declare.
(SYS_socket_subcall, SYS_sub_socket, SYS_sub_bind,
SYS_sub_connect, SYS_sub_listen, SYS_sub_accept,
SYS_sub_getsockname, SYS_sub_getpeername,
SYS_sub_socketpair, SYS_sub_send, SYS_sub_recv,
SYS_sub_sendto, SYS_sub_recvfrom, SYS_sub_shutdown,
SYS_sub_setsockopt, SYS_sub_getsockopt, SYS_sub_sendmsg,
SYS_sub_recvmsg, SYS_socket_nsubcalls, SYS_ipc_subcall,
SYS_sub_semop, SYS_sub_semget, SYS_sub_semctl,
SYS_sub_semtimedop, SYS_sub_msgsnd, SYS_sub_msgrcv,
SYS_sub_msgget, SYS_sub_msgctl, SYS_sub_shmat,
SYS_sub_shmdt, SYS_sub_shmget, SYS_sub_shmctl,
SYS_ipc_nsubcalls): Define
* linux/sparc/syscallent.h: Add socketcall and ipc entries.
2008-01-25 Bruna Moreira <bruna.moreira@indt.org>
* defs.h [ARM]: Define SUPPORTED_PERSONALITIES to 2.
* syscall.c (get_scno) [ARM]: Add support for architecture specific
syscalls.
* linux/arm/syscallent.h: Update network syscalls list.
* linux/arm/syscallent1.h: New file. Add new architecture specific
syscalls.
* linux/arm/errnoent1.h: New file.
* linux/arm/ioctlent1.h: New file.
* linux/arm/signalent1.h: New file.
Fixes Debian#441000.
2008-01-07 Paul Mundt <lethal@linux-sh.org>
* linux/sh64/syscallent.h: Update numerous calls, fix others.
2007-08-26 Daniel Jacobowitz <dan@codesourcery.com>
* defs.h [MIPS]: Include <sgidefs.h>.
(MAX_QUALS): Update for MIPS.
(LINUX_MIPSO32, LINUX_MIPSN32, LINUX_MIPSN64, LINUX_MIPS64): Define.
(struct tcb): Add ext_arg for MIPS N32.
(TCB_WAITEXECVE): Define for MIPS.
(ALIGN64): Use LINUX_MIPSO32.
* file.c (sys_lseek): Use ext_arg for MIPS N32.
(sys_readahead, sys_fadvise64_64): Likewise.
* io.c (sys_pread64, sys_pwrite64): Likewise.
* mem.c (print_mmap): Take OFFSET argument.
(sys_old_mmap): Update call to print_mmap.
(sys_mmap): Use ext_arg for MIPS N32.
* process.c (struct_user_offsets): Add MIPS registers.
* signal.c (sys_sigreturn): Handle MIPS N32 and MIPS N64. Correct
MIPS O32 call to sprintsigmask.
* syscall.c (internal_syscall): Handle MIPS N32. Check for
TCB_WAITEXECVE on MIPS.
(force_result): Add a comment about MIPS N32.
(syscall_enter): Handle MIPS N32 and MIPS N64.
* linux/syscall.h (sys_pread64, sys_pwrite64): Declare.
* linux/mips/syscallent.h: Include "dummy.h". Handle alternate
MIPS ABIs.
2008-04-19 Dmitry V. Levin <ldv@altlinux.org>
* file.c [_LFS64_LARGEFILE] (sys_getdents64): Do the same
d_reclen check as in sys_getdents: warn if d_reclen is 0 rather
than looping forever.
[FREEBSD] (sys_getdirentries): Likewise.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* file.c [LINUXSPARC] (printstatsol): Fix sprinttime()
invocation. The sprinttime() function takes a time_t argument,
but timestruct_t argument was given.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* file.c (sprinttime): Check localtime() return value, to avoid
potential NULL dereference due to invalid time structures.
Signed-off-by: Harald van Dijk <truedfx@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* linux/errnoent.h: Update errno list based on latest
linux/errno.h and asm-generic/errno*.h files.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* signalent.sh: Fix sort(1) old-style options.
* syscallent.sh: Likewise.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* count.c (call_summary_pers): Check calloc() return value.
Signed-off-by: "Yang Zhiguo" <yzgcsu@cn.fujitsu.com>
2008-03-26 Roland McGrath <roland@redhat.com>
* strace.spec (strace64_arches): Add sparc64.
2007-11-20 Roland McGrath <roland@redhat.com>
* CREDITS, ChangeLog: Converted contents to UTF8.
2007-11-19 Roland McGrath <roland@redhat.com>
* strace.spec: Add BuildRequires on libaio-devel, libacl-devel.
2007-11-19 Andreas Schwab <schwab@suse.de>
* process.c (sys_ptrace) [IA64]: For PTRACE_PEEKDATA,
PTRACE_PEEKTEXT and PTRACE_PEEKUSER the data is returned directly.
* linux/syscallent.h: Fix argument count for getdents64.
* linux/arm/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Use sys_getdents64.
* linux/sh/syscallent.h: Likewise.
2007-11-06 Jan Kratochvil <jan.kratochvil@redhat.com>
* strace.c [LINUX] (droptcb): Recurse on TCP->parent if it is a
TCB_EXITING zombie group leader.
* test/childthread.c: New file.
* test/.cvsignore, test/Makefile: Add it.
Code advisory: Roland McGrath
Fixes RH#354261.
2007-11-03 Roland McGrath <roland@redhat.com>
* process.c (prctl_options): Add numerous constants.
From Sami Farin <safari@u.safari.iki.fi>.
Fixes RH#364401.
2007-11-03 Jan Kratochvil <jan.kratochvil@redhat.com>
* strace.c (main): Move the STARTUP_CHILD call before setting up the
signal handlers. New comment about the valid internal states.
2007-11-02 Thiemo Seufer <ths@networkno.de>
* signal.c (m_siginfo_t): Add for MIPS.
(sys_sigreturn): struct sigcontext on MIPS has no sigset_t member,
acquire the signal mask with the same trick as on Sparc.
Fixes Debian#448802.
2007-11-01 Roland McGrath <roland@redhat.com>
* util.c (string_quote): Return nonzero if the string was unterminated.
(printstr): Use that value instead of just our own test.
(printpathn): Likewise.
Fixes RH#358241.
* linux/mips/syscallent.h: Fix argument count for fadvise64_64.
From Paul Mundt <lethal@linux-sh.org>.
* linux/mips/syscallent.h: Fix argument count for lookup_dcookie.
From Paul Mundt <lethal@linux-sh.org>.
* linux/sh64/syscallent.h: Fix SYS_socket_subcall check.
From Paul Mundt <lethal@linux-sh.org>.
* linux/sh/syscallent.h: Update numerous calls.
From Paul Mundt <lethal@linux-sh.org>.
2007-09-22 Dmitry V. Levin <ldv@altlinux.org>
* desc.c (sys_pselect6): Decode signal mask when entering syscall.
Relax signal mask size check.
* time.c (print_timespec, sprint_timespec): New functions.
* defs.h (print_timespec, sprint_timespec): Declare them.
* desc.c (sys_io_getevents): Use print_timespec.
* stream.c (sys_ppoll): Likewise.
(decode_poll): Use sprint_timespec.
2007-09-22 Alan Curry <pacman@world.std.com>
Dmitry V. Levin <ldv@altlinux.org>
* stream.c (decode_poll): Rearrange so that arguments are decoded
and printed on syscall entry, except for revents and the output
timespec which are now printed in the auxstr.
(sys_poll): Print the input timeout argument on syscall entry.
[LINUX] (sys_ppoll): Likewise.
Fixes Debian#369651.
2007-09-22 Dmitry V. Levin <ldv@altlinux.org>
* desc.c (sprintflags): Remove static qualifier, add "prefix"
argument, move function to ...
* util.c (sprintflags): ... here.
* defs.h (sprintflags): Declare it.
2007-11-01 Roland McGrath <roland@redhat.com>
* syscall.c (get_scno) [ARM]: Check TCB_WAITEXECVE.
Reported by Bernhard Fischer <rep.dot.nop@gmail.com>.
* net.c (sockpacketoptions): Make PACKET_ADD_MEMBERSHIP and
PACKET_DROP_MEMBERSHIP conditional.
From Bernhard Fischer <rep.dot.nop@gmail.com>.
* configure.ac: Match sh64* for SH64, sh* for SH.
Reported by Bernhard Fischer <rep.dot.nop@gmail.com>.
2007-10-01 Dmitry V. Levin <ldv@altlinux.org>
* net.c (printsock): Output AF_UNIX socket address using
printpathn() to avoid unprintable characters in output.
Suggested by Neil Campbell.
2007-10-01 Dmitry V. Levin <ldv@altlinux.org>
* util.c (string_quote): Move quoting code from ...
(printstr) ... here. Use string_quote.
(printpathn): Update for new string_quote interface.
(printpath): Use printpathn.
2007-09-25 Dmitry V. Levin <ldv@altlinux.org>
* strace.c (main): Use calloc for tcbtab allocation.
Check calloc return value.
Reported by Bai Weidong.
2007-09-11 Roland McGrath <roland@redhat.com>
* linux/sparc/syscall.h: Add missing decls.
* linux/sparc/syscallent.h: Correct entries for setgroups32,
getgroups32, sys_getdents64.
From Jakub Bogusz <qboosh@pld-linux.org>.
* linux/alpha/syscallent.h: Correct entries for madvise, setresgid,
getresgid, pivot_root, mincore, pciconfig_iobase, getdents64.
From Jakub Bogusz <qboosh@pld-linux.org>.
* linux/syscallent.h: Fix getegid32 entry.
From Jakub Bogusz <qboosh@pld-linux.org>.
* defs.h [LINUXSPARC]: Use asm/psrcompat.h for [SPARC64], not asm/psr.h.
From Jakub Bogusz <qboosh@pld-linux.org>.
* mem.c (sys_getpagesize): Define for [SPARC || SPARC64] too.
From Jakub Bogusz <qboosh@pld-linux.org>.
2007-08-20 Dmitry V. Levin <ldv@altlinux.org>
* syscall.c (qual_syscall, qualify): Fix nsyscalls and MAX_QUALS misuse.
Reported by Xiaoning Ding.
2007-08-06 Jan Kratochvil <jan.kratochvil@redhat.com>
Roland McGrath <roland@redhat.com>
* file.c [!HAVE_STAT64 && LINUX && X86_64] (struct stat64): Define it.
[!HAVE_STAT64 && LINUX && X86_64] (HAVE_STAT64, STAT64_SIZE): Define.
[HAVE_STAT64] (printstat64) [STAT64_SIZE]: Add compile-time assertion.
Fixes RH#222275.
* file.c (printstat64): Test [HAVE_LONG_LONG] for st_size printing
and cast to widest type available.
2007-08-03 Ulrich Drepper <drepper@redhat.com>
* file.c (open_mode_flags): Add O_CLOEXEC.
* net.c (msg_flags): Add MSG_CMSG_CLOEXEC.
Fixes RH#365781.
2007-08-03 Roland McGrath <roland@redhat.com>
* configure.ac, NEWS: Version 4.5.16.
* debian/changelog, strace.spec: 4.5.16-1.
* debian/control (Build-Depends): Replace libc6-dev-s390x and
libc6-dev-sparc64 with gcc-multilib.
* debian/rules: Replace sparc-linux, s390-linux conditionals with
general "arch64_map" hair, handle x86_64 and powerpc64 too.
From Matthias Klose <doko@cs.tu-berlin.de>.
Fixes Debian#435303.
2007-08-02 Jan Kratochvil <jan.kratochvil@redhat.com>
* strace.c (detach): Moved the resume notification code to ...
(resume_from_tcp): ... a new function here.
(handle_group_exit): No longer detach also the thread group leader.
(trace): Fixed panic on exit of the TCB_GROUP_EXITING leader itself.
Fixes RH#247907.
* test/leaderkill.c (start): Renamed to ...
(start0): ... here.
(start1): New function.
(main): Created a new spare thread.
2007-08-01 Roland McGrath <roland@redhat.com>
* util.c (umoven): Don't perror for EIO.
(umovestr): Likewise.
* process.c (printargv): Handle boundary cases correctly.
Handle biarch fetching correctly.
* util.c (printstr): Don't print ... if the string matches the length
limit exactly.
* linux/sparc64/syscallent.h: Just #include the sparc file.
* linux/sparc64/syscallent1.h: Likewise.
* linux/sparc64/syscallent2.h: Likewise.
* linux/arm/syscallent.h: Add entry for getcpu.
* linux/hppa/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/arm/syscallent.h: Add entry for eventfd.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/arm/syscallent.h: Add entry for timerfd.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/arm/syscallent.h: Add entry for signalfd.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Add entry for epoll_pwait.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
2007-07-23 Ulrich Drepper <drepper@redhat.com>
* process.c (sys_getcpu): New function.
* linux/syscall.h: Declare sys_getcpu.
* linux/syscallent.h: Add entry for getcpu.
* desc.c (sys_eventfd): New function.
* linux/syscall.h: Declare sys_eventfd.
* linux/syscallent.h: Add entry for eventfd.
* linux/x86_64/syscallent.h: Likewise.
* time.c (printitv_bitness): Add missing braces to enclose
conditional code.
(TDF_TIMER_ABSTIME): Define if not already.
(timerfdflags): New variable.
(sys_timerfd): New function.
* linux/syscall.h: Declare sys_timerfd.
* linux/syscallent.h: Add timerfd entry.
* linux/x86_64/syscallent.h: Likewise.
* linux/syscall.h: Declare sys_signalfd.
* linux/syscallent.h: Add entry for signalfd.
* linux/x86_64/syscallent.h: Likewise.
* signal.c (sys_signalfd): New function.
* desc.c (sys_epoll_wait): Move body of function to ...
(epoll_wait_common): ...here. New function.
(sys_epoll_pwait): New function.
* linux/syscall.h: Declare sys_epoll_pwait.
* linux/syscallent.h: Add entry for epoll_pwait.
* linux/x86_64/syscallent.h: Likewise.
2007-07-23 Roland McGrath <roland@redhat.com>
* time.c (printtv_bitness): SPECIAL only counts when tv_sec == 0.
* linux/arm/syscallent.h: Add move_pages.
* linux/hppa/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/syscallent.h: move_pages takes 6 args, not 5.
* linux/x86_64/syscallent.h: Likewise.
2007-07-23 Ulrich Drepper <drepper@redhat.com>
* defs.h: Add new parameter to printtv_bitness prototype.
(printttv): Pass zero for the new parameter.
(printtv_special): New macro.
* desc.c (decode_select): Pass zero for the new parameter of
printtv_bitness.
* file.c (utimensatflags): New macro.
(sys_osf_utimes): Pass zero for the new parameter of
printtv_bitness.
(sys_utimes): Likewise.
(sys_futimesat): Likewise.
(decode_utimes): Add new parameter. Pass it to the
printtv_bitness calls. Fix printing of time values.
(sys_utimensat): New function.
* time.c (UTIME_NOW, UTIME_OMIT): Define if not already
happened.
(printtv_bitness): Add new parameter. Print special UTIME_*
values as strings if set.
(sys_osf_gettimeofday): Pass zero for the new parameter of
printtv_bitness.
(sys_osf_settimeofday): Likewise.
* linux/syscall.h: Declare sys_utimensat.
* linux/syscallent.h: Add utimensat entry.
* linux/x86_64/syscallent.h: Likewise.
* mem.c (move_pages_flags): New variable.
(sys_move_pages): New function.
* linux/syscall.h: Declare sys_move_pages.
* linux/syscallent.h: Add entry for sys_move_pages.
* linux/x86_64/syscallent.h: Likewise.
* mem.c (MPOL_MF_MOVE, MPOL_MF_MOVE_ALL): Define.
(mbindflags): Add MPOL_MF_MOVE and MPOL_MF_MOVE_ALL entries.
2007-07-23 Roland McGrath <roland@redhat.com>
* util.c (tv_add): Fix rounding comparison.
Reported by Bai Weidong <baiwd@cn.fujitsu.com>.
2007-07-11 Roland McGrath <roland@redhat.com>
* count.c (call_summary_pers): Use tv_float conversion for output of
cumulative time, in case it is negative from bogus -O value.
From Lai JiangShan <laijs@cn.fujitsu.com>.
* strace.c (handle_group_exit): Detach TCP before LEADER.
Don't use PTRACE_KILL on LEADER.
* util.c (printstr): Fix size calculation for outstr allocation.
* configure.ac (struct sigcontext.sc_hi2): Use #ifdef around
<asm/sigcontext.h> to match signal.c include conditions.
2007-07-05 Roland McGrath <roland@redhat.com>
* debian/rules: Use debian/$(package) instead of debian/tmp as temp dir.
* configure.ac: Use <stddef.h> before <linux/socket.h>.
* debian/changelog: Harmonize with debian version.
* debian/control (Uploaders): Fix surname spelling.
(Build-Depends): Make debhelper requirement (>= 5.0.0).
(Standards-Version): Update to 3.7.2.
* .cvsignore: Add some automake-created files.
* file.c (sys_utime): Use personality_wordsize to handle biarch.
Fixes RH#247185.
* signal.c (sys_sigreturn) [MIPS]: Pass 3rd arg to sprintsigmask.
From Zhang Le <zhilg@users.sourceforge.net>.
* strace.c (strace_fopen): [_LFS64_LARGEFILE]: Use fopen64.
Fixes Debian#385310.
* strace.c (main): Fix error message for unfound -u user.
From Srinivasa Ds <srinivasa@in.ibm.com>.
Fixes RH#247170.
* debian/control (Architecture): Add armel.
* linux/syscallent.h: Fix sys_delete_module arg count.
* linux/alpha/syscallent.h: Likewise.
* linux/arm/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/sparc64/syscallent2.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/dummy.h (sys_delete_module): Use sys_open.
From Johannes Stezenbach <js@linuxtv.org>.
* configure.ac: Check for struct sigcontext.sc_hi2.
* signal.c (sys_sigreturn) [MIPS]: Use sc_hi2 vs sc_sigset if found.
* process.c [LINUX] (futexops): Add many new values.
[LINUX] (futexwakeops, futexwakecmps): New tables.
[LINUX] (sys_futex): Use them.
From Ulrich Drepper <drepper@redhat.com>.
Fixes RH#241467.
2007-07-05 Jan Kratochvil <jan.kratochvil@redhat.com>
* strace.c (detach): New prototype. Extended the function comment.
[LINUX] (detach): Call droptcb() instead of the wrongly parametrized
detach() call.
(handle_group_exit): Call droptcb() instead of the wrongly parametrized
detach() call. Always call detach() only once from the group leader.
Comment the leader killing known bug tested by `test/leaderkill.c'.
Code advisory: Roland McGrath
Fixes RH#240961.
* test/leaderkill.c: New file.
* test/.cvsignore, test/Makefile: Add it.
2007-03-21 Andreas Schwab <schwab@suse.de>
* file.c (sys_newfstatat): Don't use printstat64 on ppc64.
2007-03-29 Vladimir Nadvornik <nadvornik@suse.cz>
Dmitry V. Levin <ldv@altlinux.org>
Trace linux SG_IO ioctl arguments and results.
* scsi.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* defs.h (scsi_ioctl): New function.
* ioctl.c (ioctl_decode): Use scsi_ioctl().
2007-06-28 Dmitry V. Levin <ldv@altlinux.org>
* util.c (tv_mul): Multiply tv_usec properly.
Patch from Cai Fei <caifei@cn.fujitsu.com>.
2007-06-11 Jan Kratochvil <jan.kratochvil@redhat.com>
Never interrupt when the attached traced process would be left stopped.
* strace.c (main): `-p' attaching moved to ...
(startup_attach): ... a new function, renamed a variable C to TCBI.
Block interrupting signals since the first tracee has been attached.
New comment about INTERRUPTED in the nonthreaded case.
[LINUX] (startup_attach): Check INTERRUPTED after each attached thread.
(main): Command spawning moved to ...
(startup_child): ... a new function, replaced RETURN with EXIT.
[LINUX] (detach): New variable CATCH_SIGSTOP, do not signal
new SIGSTOP for processes still in TCB_STARTUP.
(main): Move signals and BLOCKED_SET init before the tracees attaching,
[SUNOS4] (trace): Removed fixvfork () call as a dead code, SIGSTOP must
have been already caught before clearing TCB_STARTUP.
(trace): Removed the `!WIFSTOPPED(status)' dead code.
Clear TCB_STARTUP only in the case the received signal was SIGSTOP.
New comment when `TCB_BPTSET && TCB_STARTUP' combination can be set.
Code advisory: Roland McGrath
Fixes RH#240986.
2007-05-24 Jan Kratochvil <jan.kratochvil@redhat.com>
* strace.c [LINUX] (my_tgkill): New macro.
[LINUX] (detach): Use my_tgkill () instead of kill(2).
Fixes RH#240962.
2007-03-30 Dmitry V. Levin <ldv@altlinux.org>
* mem.c (mmap_flags): Add MAP_32BIT.
Reported by Kirill A. Shutemov.
2007-01-12 Dmitry V. Levin <ldv@altlinux.org>
* sock.c (sock_ioctl): Check umove() return code.
[LINUX]: Handle SIOCGIFTXQLEN and SIOCGIFMAP.
2007-03-16 Roland McGrath <roland@redhat.com>
* linux/s390/syscallent.h: Use sys_restart_syscall for 7.
* linux/s390x/syscallent.h: Likewise.
2007-02-18 Roland McGrath <roland@redhat.com>
* strace.spec (Summary): Remove trailing period.
(%files): Add %doc files.
(%changelog): Double %s in text.
(BuildRoot): Change to Fedora canonical.
(%install): Don't use %makeinstall macro.
(%build): Use %{?_smp_mflags}.
2007-01-16 Roland McGrath <roland@redhat.com>
* configure.ac, NEWS: Version 4.5.15.
* debian/changelog, strace.spec: 4.5.15-1.
2007-01-16 Dmitry V. Levin <ldv@altlinux.org>
Update mount parser to match kernel behaviour.
* system.c [LINUX] (MS_VERBOSE): Rename to MS_SILENT.
[LINUX] (MS_UNBINDABLE, MS_PRIVATE, MS_SLAVE, MS_SHARED):
New macros.
[LINUX] (mount_flags): Add them.
[LINUX] (MS_MGC_MSK): New macro.
[LINUX] (sys_mount): Update parser to match kernel behaviour:
discard MS_MGC_VAL magic, do not decode type and/or data
strings when specified flags do not imply valid strings.
2007-01-12 Dmitry V. Levin <ldv@altlinux.org>
* time.c [LINUX] (tprint_timex32, tprint_timex): Decode adjtimex
modes as flags.
2007-01-11 Dmitry V. Levin <ldv@altlinux.org>
Update umount parser.
* system.c [LINUX] (MNT_FORCE, MNT_DETACH, MNT_EXPIRE): New macros.
[LINUX] (umount_flags): New xlat structure with MNT_* entries.
[LINUX] (sys_umount2): Use umount_flags.
Fix open(2) flags parser.
* defs.h (tprint_open_modes): New function.
* desc.c (sprint_open_modes): New function.
(sys_fcntl): Use tprint_open_modes() and sprint_open_modes().
* file.c (openmodes): Split xlat into open_access_modes and
open_mode_flags.
(tprint_open_modes): New function.
(decode_open): Use it.
* ipc.c (sys_mq_open, printmqattr): Likewise.
Fixes RH#222385.
2007-01-11 Roland McGrath <roland@redhat.com>
* configure.ac, NEWS: Version 4.5.15.
* debian/changelog, strace.spec: 4.5.15-1.
* debian/control (Uploaders): Add Frederik Schueler <fs@debian.org>.
* strace.spec (Release): Use %{?dist}.
* system.c [LINUX] (CTL_CPU): Define in case header is missing it.
2006-12-27 Dmitry V. Levin <ldv@altlinux.org>
Add const qualifier to xlookup() return value.
* defs.h (xlookup): Add const qualifier to return value.
* desc.c (sprintflags): Likewise.
* process.c (printpriv): Update xlookup() use.
* signal.c (sprintsigmask): Add const qualifier to first argument and
return value.
* util.c (xlookup): Add const qualifier to return value.
(printxval): Update xlookup() use.
2006-12-21 Dmitry V. Levin <ldv@altlinux.org>
Move counts code to separate file.
* count.c: New file.
* Makefile.am (strace_SOURCES): Add count.c.
* syscall.c (call_counts, countv, counts, shortest, time_cmp,
syscall_cmp, count_cmp, sortfun, overhead, set_sortby,
set_overhead, call_summary_pers, call_summary): Move to count.c
* count.c (count_syscall): New function.
* defs.h (count_syscall): Declare it.
* syscall.c (trace_syscall): Use it.
2006-12-20 Dmitry V. Levin <ldv@altlinux.org>
* syscall.c (internal_syscall): Change conditions for internal_exit,
internal_fork, internal_clone, internal_exec and internal_wait
calls from switching on known scno values to switching on known
sysent[tcp->scno].sys_func values.
Fixes RH#179740.
Show system call summary for each personality.
* syscall.c (countv): New call_counts pointers array.
(counts): Convert to macro wrapper around countv.
(call_summary_pers): New function.
(call_summary): Use it for each personality.
Fixes RH#192193.
2006-12-12 Dmitry V. Levin <ldv@altlinux.org>
Fix -ff -o behaviour. Fix piping trace output.
* defs.h (newoutf): Remove.
(alloctcb): Rename to alloc_tcb. Add alloctcb() macro wrapper
around alloc_tcb().
* process.c [!USE_PROCFS] (internal_clone, internal_fork):
Remove newoutf() call.
* strace.c (set_cloexec_flag, strace_fopen, strace_popen,
swap_uid): New functions.
(popen_pid): New variable.
(newoutf): Make static, use strace_fopen().
(main): Use strace_fopen() and strace_popen(), remove uids
swapping. Do not open outfname when followfork > 1.
Reinitialize tcp->outf properly.
(alloctcb): Rename to alloc_tcb. Use newoutf().
(trace): Check popen_pid. Remove newoutf() call.
[USE_PROCFS] (proc_open, proc_poll_open): Use set_cloexec_flag().
Fixes RH#204950, RH#218435, Debian#353935.
2006-12-10 Dmitry V. Levin <ldv@altlinux.org>
Add biarch support for "struct sigevent".
* time.c [LINUX && SUPPORTED_PERSONALITIES > 1] (printsigevent32):
New function.
[LINUX] (printsigevent): [SUPPORTED_PERSONALITIES > 1]
Handle 32-bit personality.
Add biarch support for "struct timex".
* time.c [LINUX && SUPPORTED_PERSONALITIES > 1] (tprint_timex32):
New function.
[LINUX] (tprint_timex): New function.
[LINUX] (sys_adjtimex): Use it.
Enhance adjtimex parser.
* time.c [LINUX] (adjtimex_modes, adjtimex_status,
adjtimex_state): New xlat structures.
[LINUX] (sys_adjtimex): Print the whole struct timex.
Decode modes, status and return code.
Add biarch support for "struct itimerval".
* time.c (printitv): Rename to printitv_bitness().
Add printitv() macro wrapper around printitv_bitness().
(printitv_bitness): Handle 32-bit personality.
[ALPHA] (sys_osf_getitimer, sys_osf_setitimer):
Use printitv_bitness().
(tprint_timeval, tprint_timeval32): New functions.
(printtv_bitness, printitv_bitness, sys_adjtimex): Use them.
(printitv32): Remove.
Add biarch support for "struct timeval".
* defs.h (bitness_t): New enum type.
(printtv_bitness, sprinttv): New function prototypes.
(printtv): Convert to macro wrapper around printtv_bitness().
(printtv32): Remove.
* desc.c (decode_select): Use printtv_bitness() and sprinttv().
(sys_oldselect, sys_osf_select, sys_select, sys_pselect6):
Update decode_select() use.
* file.c [ALPHA] (sys_osf_utimes): Use printtv_bitness().
* time.c (printtv_bitness, sprinttv): New functions.
(printtv, printtv32): Remove.
[ALPHA] (sys_osf_settimeofday, sys_osf_settimeofday):
Use printtv_bitness().
Fixes RH#171626, RH#173050.
Add biarch support for "struct iovec".
* defs.h (personality_wordsize): Add.
* io.c [HAVE_SYS_UIO_H] (tprint_iov): [LINUX &&
SUPPORTED_PERSONALITIES > 1] Handle 32-bit personality.
* util.c [HAVE_SYS_UIO_H] (dumpiov): [LINUX &&
SUPPORTED_PERSONALITIES > 1] Likewise.
Patch from Jakub Jelinek.
Fixes RH#218433.
* time.c (sys_timer_create): Check umove() return code.
Make several global variables static.
#ifdef definitions of rarely unused functions.
* defs.h (rflag, tflag, outfname): Remove.
* strace.c (iflag, interactive, pflag_seen, rflag, tflag,
outfname, username): Make static.
* desc.c (sys_getdtablesize): Define only for
ALPHA || FREEBSD || SUNOS4.
* file.c (sys_fchroot): Define only for SUNOS4 || SVR4.
(sys_mkfifo): Define only for FREEBSD.
* mem.c (sys_sbrk): Define only for FREEBSD || SUNOS4.
(sys_getpagesize): Define only for
ALPHA || FREEBSD || IA64 || SUNOS4 || SVR4.
* net.c (sys_so_socket): Define only for SVR4.
* process.c (sys_gethostid): Define only for
FREEBSD || SUNOS4 || SVR4.
(sys_gethostname): Define only for
ALPHA || FREEBSD || SUNOS4 || SVR4.
(sys_setpgrp): Define only for ALPHA || SUNOS4 || SVR4.
(sys_execv): Define only for SPARC || SPARC64 || SUNOS4.
* signal.c (sys_sigblock): Define only for FREEBSD || SUNOS4.
(sys_sighold, sys_sigwait): Define only for SVR4.
(sys_killpg): Define only for FREEBSD || SUNOS4.
* stream.c (sys_getmsg): Define only for
SPARC || SPARC64 || SUNOS4 || SVR4.
* syscall.c (sys_indir): Define only for SUNOS4.
2006-11-27 Dmitry V. Levin <ldv@altlinux.org>
* system.c [LINUX]: Define CTL_PROC, since Linux 2.6.18+ headers
removed CTL_PROC enum. Patch from Jakub Jelinek.
[LINUX] (sysctl_root): Add CTL_BUS, CTL_ABI and CTL_CPU.
2006-11-20 Jakub Jelinek <jakub@redhat.com>
* linux/ia64/syscallent.h: Add #if check to make sure that
SYS_socket_subcall adjustment isn't forgotten again.
2006-10-16 Dmitry V. Levin <ldv@altlinux.org>
Implement comprehensive quotactl(2) parser for Linux.
* Makefile.am (strace_SOURCES): Add quota.c.
* quota.c: New file.
* resource.c: Remove old quotactl(2) parser.
Fixes RH#118696.
2006-10-14 Dmitry V. Levin <ldv@altlinux.org>
* configure.ac (AC_CHECK_HEADERS): Add inttypes.h.
* file.c [_LFS64_LARGEFILE && (LINUX || SVR4)]:
Include <inttypes.h>.
(sys_getdents64): Use PRIu64/PRId64 to avoid gcc warnings on
64-bit platforms.
* strace.c (main): Check getcwd() return code.
2006-10-13 Ulrich Drepper <drepper@redhat.com>
Bernhard Kaindl <bk@suse.de>
Dmitry V. Levin <ldv@altlinux.org>
Michael Holzheu <holzheu@de.ibm.com>
Add hooks for new syscalls. Add decoders for *at, inotify*,
pselect6, ppoll and unshare syscalls.
* defs.h: Declare print_sigset.
* desc.c (sys_pselect6): New function.
* file.c (decode_open, decode_access, decode_mkdir,
decode_readlink, decode_chmod, decode_utimes, decode_mknod):
New functions.
(sys_open, sys_access, sys_mkdir, sys_readlink, sys_chmod,
sys_utimes, sys_mknod): Use them.
[LINUX] (fstatatflags, unlinkatflags, inotify_modes): New
variables.
[LINUX] (print_dirfd, sys_openat, sys_faccessat,
sys_newfstatat, sys_mkdirat, sys_linkat, sys_unlinkat,
sys_symlinkat, sys_readlinkat, sys_renameat, sys_fchownat,
sys_fchmodat, sys_futimesat, sys_mknodat, sys_inotify_add_watch,
sys_inotify_rm_watch): New functions.
* process.c [LINUX] (sys_unshare): New function.
* signal.c (print_sigset): New function.
(sys_sigprocmask): Use it.
* stream.c (decode_poll): New function.
(sys_poll): Use it.
[LINUX] (sys_ppoll): New function.
* linux/syscall.h: Delcare new syscall handlers.
* linux/syscallent.h: Hook up new syscalls.
* linux/alpha/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
Fixes RH#178633.
2006-10-06 Dmitry V. Levin <ldv@altlinux.org>
* strace.c [!USE_PROCFS] (trace): Presence of PT_GETSIGINFO
macro does not mean that PT_CR_IPSR and PT_CR_IIP macros are
also defined, so check them along with PT_GETSIGINFO.
Fixes RH#209856.
2006-09-01 Dmitry V. Levin <ldv@altlinux.org>
* file.c (print_xattr_val): Fix memory corruption bug reported
by James Antill.
Fixes RH#200621.
2006-04-21 Dmitry V. Levin <ldv@altlinux.org>
* defs.h [LINUX && X86_64 && !__NR_exit_group]: Define
__NR_exit_group.
2006-03-29 Dmitry V. Levin <ldv@altlinux.org>
Fix race conditions in tcb allocation.
* process.c (fork_tcb): Return error code as documented. Do not
print "tcb table full" error message.
[USE_PROCFS] (internal_fork): Do not print "tcb table full"
error message.
[SYS_clone || SYS_clone2] (internal_clone, internal_fork): Call
fork_tcb() before alloctcb(). Do not print "tcb table full"
error message.
* strace.c (main): Do not print "tcb table full" error message.
(expand_tcbtab): Print error message in case of memory allocation
failure.
(alloctcb): Print error message when tcb table is full.
(trace): Expand tcb table if necessary prior to allocating
entry there. Do not print "tcb table full" error message.
Fixes RH#180293.
2006-08-22 Roland McGrath <roland@redhat.com>
* ipc.c (sys_msgget, sys_semget, sys_shmget): Show key values in hex.
Fixes RH#198179.
2006-08-21 Roland McGrath <roland@redhat.com>
* linux/syscall.h (SYS_socket_subcall): Bump to 400.
* linux/syscallent.h: Update table.
* linux/arm/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
Fixes RH#201462.
2006-04-25 Roland McGrath <roland@redhat.com>
* strace.c (main): Fail when -c is given with -ff.
* strace.1: Note their incompatibility.
Fixes RH#187847.
* strace.c (main): Fail when nonoption args follow -p switches.
Fixes Debian#361302.
* Makefile.am (EXTRA_DIST): Add xlate.el.
* linux/mips/Makefile.in: File removed, unused cruft.
* linux/sparc/Makefile.in: Likewise.
* strace.spec (Source0): Use http://dl.sourceforge.net URL.
* ipc.c (sys_semtimedop): Fixed inverted indirect_ipccall test.
* linux/hppa/syscallent.h: Fixed semtimedop entry.
From Mike Stroyan <mike.stroyan@hp.com>.
Fixes Debian#340239.
2006-03-30 Daniel Jacobowitz <dan@codesourcery.com>
* linux/arm/syscallent.h: Correct the name of exit. Remove
M68K conditionals and sys_security. Correct syscalls 243-282.
Fixes Debian#360154.
* process.c (change_syscall): Add ARM support.
* syscall.c (get_scno): Handle ARM EABI.
Fixes Debian#360152.
2006-01-16 Roland McGrath <roland@redhat.com>
* configure.ac, NEWS: Version 4.5.14.
* debian/changelog, strace.spec: 4.5.14-1.
2006-01-13 Roland McGrath <roland@redhat.com>
* debian/control (Build-Depends): Add debhelper.
2006-01-12 Roland McGrath <roland@redhat.com>
* signal.c [LINUX] (sys_restart_syscall): New function.
* linux/syscall.h: Declare sys_restart_syscall.
* linux/sparc/syscall.h: Likewise.
* linux/syscallent.h: Call 0 is restart_syscall.
* linux/arm/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/alpha/syscallent.h: Use sys_restart_syscall.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
Fixes RH#165469, Debian#350641.
2005-08-08 Dmitry V. Levin <ldv@altlinux.org>
* system.c [LINUX] (MS_MGC_VAL): New macro.
[LINUX] (mount_flags): Add it.
[LINUX] (sys_mount): If neither MS_BIND nor MS_MOVE bits are
set in the flags argument, try to fetch data string.
Fixes RH#165377.
2006-01-12 Roland McGrath <roland@redhat.com>
* system.c (sys_sysctl): Don't read off end of NAME when max_strlen
exceeds INFO.nlen.
From Timo Lindfors <timo.lindfors@iki.fi>.
Fixes Debian#339117.
* debian/rules (binary-arch): Don't pass -s to install. Use dh_strip.
Fixes Debian#325132.
* debian/control (Standards-Version): Update to 3.6.2.
* defs.h [LINUXSPARC] (PERSONALITY0_WORDSIZE, PERSONALITY1_WORDSIZE):
New macros.
[SPARC64] (PERSONALITY2_WORDSIZE): New macro.
[X86_64] (PERSONALITY0_WORDSIZE, PERSONALITY1_WORDSIZE): New macros.
* syscall.c (PERSONALITY0_WORDSIZE): New macro if undefined.
(personality_wordsize): New variable.
(decode_subcall): Use it for size of argument words.
Fixes RH#174354.
2005-11-17 Dmitry V. Levin <ldv@altlinux.org>
Implement qual_flags support for each personality.
* strace.c (main): Move qualify calls after set_personality call.
* syscall.c (qual_flags0): New variable..
[SUPPORTED_PERSONALITIES >= 2] (qual_flags1): New variable.
[SUPPORTED_PERSONALITIES >= 3] (qual_flags2): New variable.
(qual_flags): Change variable definition from array to pointer.
(set_personality): Initialize qual_flags variable.
(qualify_one): Add "pers" argument to specify personality.
[SUPPORTED_PERSONALITIES >= 2]: Set qual_flags1 if requested.
[SUPPORTED_PERSONALITIES >= 3]: Set qual_flags2 if requested.
(qual_syscall): Pass personality to qualify_one.
[SUPPORTED_PERSONALITIES >= 2]: Look for syscall also in sysent1
table.
[SUPPORTED_PERSONALITIES >= 3]: Look for syscall also in sysent2
table.
(qual_signal): Pass personality to qualify_one.
(qual_desc): Likewise.
(qualify): Use qualify_one instead of manual qual_flags
manipulations.
[SUPPORTED_PERSONALITIES >= 2]: Look for syscall also in sysent1
table.
[SUPPORTED_PERSONALITIES >= 3]: Look for syscall also in sysent2
table.
* defs.h: Update qual_flags declaration.
Fixes RH#173986.
2005-11-14 Dmitry V. Levin <ldv@altlinux.org>
* syscall.c (qual_syscall): Handle numeric syscall specification.
Fixes RH#174798.
* syscall.c (qual_signal, qual_options): Remove redundant argument
check.
2005-12-01 Roland McGrath <roland@redhat.com>
* ipc.c (indirect_ipccall) [MIPS || HPPA]: Return false.
Fixes Debian#340239.
* Makefile.am (EXTRA_DIST): Add linux/arm/syscallent.h
and linux/m68k/syscallent.h.
Fixes Debian#336197.
* debian/control (Architecture): Add armeb.
Fixes Debian#335681.
2005-11-02 Michal Marek <mmarek@suse.cz>
* strace-graph (handle_trace): follow clone() and vfork() calls.
2005-10-25 Heiko Carstens <heiko.carstens@de.ibm.com>
* linux/s390/syscallent.h: Added ioprio_set, ioprio_get,
inotify_init, inotify_add_watch, inotify_rm_watch.
Corrected number of arguments for request_key.
* linux/s390x/syscallent.h: Likewise.
2005-12-01 Roland McGrath <roland@redhat.com>
* ipc.c (indirect_ipccall) [IA64]: Return false unless the syscall
number is in the low range of IA32 syscalls.
2005-10-07 Andreas Schwab <schwab@suse.de>
* linux/ia64/syscallent.h: Syscall 1105 is gettid, not ioperm.
2005-12-01 Roland McGrath <roland@redhat.com>
* resource.c (resources): Add RLIMIT_NICE, RLIMIT_RTPRIO.
Reported by Scott Tsai <scottt958@yahoo.com.tw>.
* ipc.c (indirect_ipccall): New function.
(sys_msgctl, sys_msgsnd, sys_msgrcv, sys_semop): Use that predicate
instead of #ifdef LINUX test.
[LINUX] (sys_semtimedop): Likewise.
(sys_shmctl, sys_shmat, sys_shmdt): Likewise.
Fixes RH#164755.
2005-07-31 Ulrich Drepper <drepper@redhat.com>
* linux/x86_64/syscallent.h: Fix syscall parameter count for msgrcv and
msgctl.
* ipc.c (sys_msgrcv): Add entering handling and print first parameter
there.
Fixes RH#164757.
2005-08-08 Dmitry V. Levin <ldv@altlinux.org>
* strace.1: Update "SEE ALSO" links to reference to valid
manpages.
Patch from Michail Litvak <mci@owl.openwall.com>.
Fixes RH#165375.
2005-10-21 Roland McGrath <roland@redhat.com>
* util.c (printpathn): Cap N at sizeof path - 1.
2005-08-03 Roland McGrath <roland@redhat.com>
* configure.ac, NEWS: Version 4.5.13.
* debian/changelog, strace.spec: 4.5.13-1.
* configure.ac: Check for struct dqblk.dqb_curblocks field.
* resource.c [LINUX] (OLD_CMD): New macro.
(quotacmds): Use it to hard-wire old O_* values, don't use macros.
(sys_quotactl): If dqb_curblocks is not there, it's called
dqb_curspace instead. Print dqb_* fields as unsigned long long.
2005-07-19 Michael Schmitz <schmitz@debian.org>
Long overdue m68k cleanup.
* linux/syscallent.h: remove m68k declarations.
* linux/m68k/syscallent.h: new file, fixed up declarations
to match kernel version 2.6.11. Newer syscalls are sufficiently
different from i386 to merit a separate file.
2005-08-03 Roland McGrath <roland@redhat.com>
* linux/x86_64/syscallent.h: Update init_module argument count.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent2.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/arm/syscallent.h: Likewise.
2005-07-22 James Lentini <jlentini@gmail.com>
* bjm.c (sys_init_module): Display all three arguments.
* linux/syscallent.h: Update argument count.
2005-08-03 Roland McGrath <roland@redhat.com>
* process.c (internal_wait): Don't suspend when known child is known
to be exiting already.
* strace.c (detach): If detaching the last live thread in a group with
a zombie leader, then detach the leader too.
(handle_group_exit): Use detach, not droptcb, for predeceased thread.
Mark process about to take a signal with TCB_GROUP_EXITING flag.
Fixes RH#161919.
2005-07-19 Roland McGrath <roland@redhat.com>
* defs.h [LINUX] [M68K] (__NR_exit_group): Define it if missing.
Fixes Debian#315500.
2005-07-14 Heiko Carstens <heiko.carstens@de.ibm.com>
* linux/s390/syscallent.h (sys_tgkill, vserver, fadvise64_64)
(statfs64, fstatfs64, remap_file_pages, mbind, get_mempolicy)
(set_mempolicy, mq_open, mq_unlink, mq_timedsend, mq_timedreceive)
(mq_notify, mq_getsetattr, sys_kexec_load, add_key, request_key)
(keyctl, waitid): Added.
* linux/s390x/syscallent.h: Likewise and added missing _llseek.
* linux/s390/errnoent.h (ECANCELED, ENOKEY, EKEYEXPIRED)
(EKEYREVOKED, EKEYREJECTED, EOWNERDEAD, ENOTRECOVERABLE): Added.
* linux/s390x/errnoent.h: Likewise.
2005-07-05 Roland McGrath <roland@redhat.com>
* mem.c [LINUX] (sys_old_mmap) [X86_64]: Extract 32-bit values if
child is 32-bit.
Fixes RH#162467.
2005-06-08 Dmitry V. Levin <ldv@altlinux.org>
Introduce "-e trace=desc".
* defs.h (TRACE_DESC): New flag.
* syscall.c: Define TD macro before include of syscallent files
and undefine it afterwards.
(lookup_class): Recognize "desc" keyword.
* strace.1: Document "-e trace=desc".
* freebsd/i386/syscallent.h: Mark those syscalls which take a
file descriptor as an argument or return a file descriptor with
TD flag.
* linux/alpha/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent2.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* sunos4/syscallent.h: Likewise.
* svr4/syscallent.h: Likewise.
Fixes RH#159400.
Remove TF flag from those syscalls which have no filename argument.
* freebsd/i386/syscallent.h: Remove TF flag from fstat, pread,
pwrite, fstat, sendfile.
* linux/alpha/syscallent.h: Remove TF flag from read, write,
pread, pwrite, sendfile.
* linux/hppa/syscallent.h: Remove TF flag from read, write,
pread, pwrite, fstat64, sendfile, ftruncate64.
* linux/ia64/syscallent.h: Remove TF flag from read, write,
sendfile, fstat, fadvise64.
* linux/mips/syscallent.h: Remove TF flag from read, write,
fstatfs, fstat, pread, pwrite, sendfile, ftruncate64, fstat64,
sendfile64, fadvise64, fstatfs64.
* linux/powerpc/syscallent.h: Remove TF flag from read, write,
fstat, pread, pwrite, sendfile, ftruncate64, fstat64, sendfile64,
fadvise64, fstatfs64, fadvise64_64.
* linux/s390/syscallent.h: Remove TF flag from pread, pwrite,
sendfile, ftruncate64, fstat64, sendfile64.
* linux/s390x/syscallent.h: Remove TF flag from pread, pwrite,
sendfile, sendfile64.
* linux/sh/syscallent.h: Remove TF flag from pread, pwrite,
sendfile, fstat64.
* linux/sh64/syscallent.h: Remove TF flag from pread, pwrite,
sendfile, ftruncate64, fstat64.
* linux/sparc/syscallent.h: Remove TF flag from sendfile, fstat64,
pread, pwrite, sendfile64.
* linux/sparc64/syscallent2.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/syscallent.h: Remove TF flag from pread, pwrite, sendfile,
ftruncate64, fstat64, sendfile64, fadvise64, fadvise64, fstatfs64,
fadvise64_64.
* linux/x86_64/syscallent.h: Remove TF flag from pread, pwrite,
sendfile, fadvise64_64.
* svr4/syscallent.h: Remove TF flag from pread, pwrite, ftruncate,
fstatvfs64, ftruncate64.
Fixes RH#159340.
2005-07-04 Roland McGrath <roland@redhat.com>
* net.c (sockipv6options): Add IPV6_ADD_MEMBERSHIP,
IPV6_DROP_MEMBERSHIP, IPV6_ROUTER_ALERT.
From Ulrich Drepper <drepper@redhat.com>.
Fixes RH#162450.
* net.c (sockipoptions): Fix typos.
From Ulrich Drepper <drepper@redhat.com>.
Fixes RH#161578.
* util.c (printnum_int): New function, printnum with s/long/int/.
* defs.h: Declare it.
* net.c (printsockopt): Use it for int-sized option.
Fixes RH#162449.
Reported by Ulrich Drepper <drepper@redhat.com>.
2005-06-09 Roland McGrath <roland@redhat.com>
* configure.ac, NEWS: Version 4.5.12.
* debian/changelog, strace.spec: 4.5.12-1.
2005-06-08 Dmitry V. Levin <ldv@altlinux.org>
Minor namespace cleanup.
* defs.h (string_quote): Remove declaration.
* file.c (openmodessol) [LINUXSPARC]: Make static.
(fileflags): Likewise.
(aclcmds, aclipc) [HAVE_SYS_ACL_H]: Likewise.
(direnttypes) [FREEBSD || LINUX]: Likewise.
(xattrflags): Likewise.
* process.c (unalignctl_string): Make static.
(setarg): Disable.
* syscall.c (subcalls_table): Make static.
(socket_map) [!(LINUX && (ALPHA || MIPS))]: Likewise.
(sparc_socket_decode): Make static, define for [SPARC || SPARC64] only.
(decode_subcall): Make static.
(syscall_fixup): Likewise.
(get_error): Likewise.
(syscall_enter): Likewise.
* util.c (tv_tv): Disable.
(getpc): Likewise.
(string_quote): Make static.
Fixes RH#159688.
2005-05-12 Philippe De Muyter <phdm@macqel.be>
* util.c (getpc, printcall): Check #if defined(M68K), not M68k.
Enables `-i' on m68k machines.
2005-06-06 Roland McGrath <roland@redhat.com>
* process.c (struct_user_offsets) [X86_64]: Reorder elements so
matching works right.
Fixes RH#159787.
* linux/syscall.h (SYS_socket, SYS_bind, SYS_connect, SYS_listen)
(SYS_accept, SYS_getsockname, SYS_getpeername, SYS_socketpair)
(SYS_send, SYS_recv, SYS_sendto, SYS_recvfrom, SYS_shutdown)
(SYS_setsockopt, SYS_getsockopt, SYS_sendmsg, SYS_recvmsg)
(SYS_getsockname, SYS_semop, SYS_semgsub_et, SYS_semget, SYS_semctl)
(SYS_semtimedop, SYS_msgsnd, SYS_msgrcv, SYS_msgget)
(SYS_msgctl, SYS_shmat, SYS_shmdt, SYS_shmget)
(SYS_shmctl): Macros renamed to SYS_sub_*.
* syscall.c (dumpio): Match SYS_sub_* if defined instead of SYS_*.
* linux/syscall.h (SYS_waitid): Define if not defined.
* linux/syscallent.h: Fix pread/pwrite names to pread64/pwrite64.
* defs.h (struct sysent): New member `native_scno'.
(known_scno): Declare new function.
* linux/syscallent.h: Add new final field to interesting syscalls.
* syscall.c (known_scno): New function.
(dumpio, internal_syscall, syscall_fixup, trace_syscall): Use it.
* process.c (internal_fork, internal_exit): Likewise.
[IA64] (ARG_STACKSIZE, ARG_PTID, ARG_CTID, ARG_TLS): Likewise.
* strace.c (proc_open): Likewise.
* util.c [LINUX] (setbpt): Likewise.
* linux/syscall.h: Remove [!defined(X86_64)] from conditional
for defining SYS_socket_subcall et al.
* linux/syscallent.h: Likewise for #error check.
* syscall.c (trace_syscall): Likewise for SYS_{socketcall,ipc} cases.
Fixes RH#158934.
2005-06-02 Roland McGrath <roland@redhat.com>
* file.c (printstatfs64): Cast values to unsigned long long and use
%llu formats.
Fixes RH#158243.
2005-05-31 Dmitry V. Levin <ldv@altlinux.org>
Deal with memory management issues.
* defs.h (tprint_iov): Update prototype.
* desc.c (sys_epoll_wait) [HAVE_SYS_EPOLL_H]: Do not allocate
epoll_event array of arbitrary size on the stack, to avoid
stack overflow.
* file.c (print_xattr_val): Check for integer overflow during
malloc size calculation, to avoid heap corruption.
* io.c (tprint_iov) [HAVE_SYS_UIO_H]: Check for integer overflow
during malloc size calculation, to avoid heap corruption.
Change iovec array handling to avoid heap memory allocation.
* mem.c (get_nodes) [LINUX]: Check for integer overflow during
size calculation and do not allocate array of arbitrary size on
the stack, to avoid stack overflow.
* net.c (printcmsghdr) [HAVE_SENDMSG]: Do not allocate array of
arbitrary size on the stack, to avoid stack overflow. Do not
trust cmsg.cmsg_len to avoid read beyond the end of allocated
object.
(printmsghdr) [HAVE_SENDMSG]: Update tprint_iov() usage.
* process.c (sys_setgroups): Check for integer overflow during
malloc size calculation, to avoid heap corruption. Change gid_t
array handling to avoid heap memory allocation.
(sys_getgroups): Likewise.
(sys_setgroups32) [LINUX]: Likewise.
(sys_getgroups32) [LINUX]: Likewise.
* stream.c (sys_poll) [HAVE_SYS_POLL_H]: Check for integer
overflow during malloc size calculation, to avoid heap corruption.
Change pollfd array handling to avoid heap memory allocation.
* system.c (sys_sysctl) [LINUX]: Check for integer overflow
during malloc size calculation, to avoid heap corruption.
* util.c (dumpiov) [HAVE_SYS_UIO_H]: Check for integer overflow
during malloc size calculation, to avoid heap corruption.
Fixes RH#159196.
* util.c (printxval): Change third argument from "char *" to
"const char *".
(printflags): Add third argument, "const char *", with similar
meaning to the third argument of printxval().
* defs.h (printxval): Change third argument from "char *" to
"const char *".
(printflags): Add third argument.
* bjm.c (sys_query_module) [LINUX]: Pass third argument to
printflags().
* desc.c (sys_fcntl): Likewise.
(sys_flock) [LOCK_SH]: Likewise.
(print_epoll_event) [HAVE_SYS_EPOLL_H]: Likewise.
* file.c (sys_open): Likewise.
(solaris_open) [LINUXSPARC]: Likewise.
(sys_access): Likewise.
(sys_chflags, sys_fchflags) [FREEBSD]: Likewise.
(realprintstat) [HAVE_LONG_LONG_OFF_T &&
HAVE_STRUCT_STAT_ST_FLAGS]: Likewise.
(printstat64) [HAVE_STAT64 &&
HAVE_STRUCT_STAT_ST_FLAGS]: Likewise.
(sys_setxattr, sys_fsetxattr): Likewise.
* ipc.c (sys_msgget, sys_msgsnd, sys_msgrcv, sys_semget,
sys_shmget, sys_shmat) [LINUX || SUNOS4 || FREEBSD]: Likewise.
(sys_mq_open) [LINUX]: Likewise.
(printmqattr) [HAVE_MQUEUE_H]: Likewise.
* mem.c (print_mmap) [!HAVE_LONG_LONG_OFF_T]: Likewise.
(sys_mmap64) [_LFS64_LARGEFILE || HAVE_LONG_LONG_OFF_T]: Likewise.
(sys_mprotect): Likewise.
(sys_mremap, sys_madvise, sys_mlockall) [LINUX]: Likewise.
(sys_msync) [MS_ASYNC]: Likewise.
(sys_mctl) [MC_SYNC]: Likewise.
(sys_remap_file_pages, sys_mbind, sys_get_mempolicy) [LINUX]:
Likewise.
* net.c (printmsghdr) [HAVE_STRUCT_MSGHDR_MSG_CONTROL]: Likewise.
(sys_send, sys_sendto): Likewise.
(sys_sendmsg) [HAVE_SENDMSG]: Likewise.
(sys_recv, sys_recvfrom): Likewise.
(sys_recvmsg) [HAVE_SENDMSG]: Likewise.
(printicmpfilter) [ICMP_FILTER]: Likewise.
* proc.c (proc_ioctl) [SVR4 && !HAVE_MP_PROCFS || FREEBSD]: Likewise.
* process.c (sys_clone) [LINUX]: Likewise.
(printwaitn): Likewise.
(sys_waitid) [SVR4 || LINUX]: Likewise.
* signal.c (sys_sigvec) [SUNOS4 || FREEBSD]: Likewise.
(sys_sigaction): Likewise.
(printcontext) [SVR4]: Likewise.
(print_stack_t) [LINUX) || FREEBSD]: Likewise.
(sys_rt_sigaction) [LINUX]: Likewise.
* sock.c (sock_ioctl) [LINUX]: Likewise.
* stream.c (sys_putmsg, sys_getmsg): Likewise.
(sys_putpmsg) [SYS_putpmsg]: Likewise.
(sys_getpmsg) [SYS_getpmsg]: Likewise.
(sys_poll): Likewise.
(print_transport_message) [TI_BIND]: Likewise.
(stream_ioctl): Likewise.
* system.c (sys_mount, sys_reboot): Likewise.
(sys_cacheflush) [LINUX && M68K]: Likewise.
(sys_capget, sys_capset) [SYS_capget]: Likewise.
* term.c (term_ioctl) [TIOCMGET]: Likewise.
* time.c (sys_clock_nanosleep, sys_timer_settime) [LINUX]:
Likewise.
Fixes RH#159310.
* bjm.c (sys_query_module) [LINUX]: Unitize "out of memory"
errors reporting style.
* strace.c (rebuild_pollv) [USE_PROCFS]: Likewise.
* system.c (sys_capget, sys_capset) [SYS_capget]: Likewise.
* util.c (printstr): Likewise.
(dumpiov) [HAVE_SYS_UIO_H]: Likewise.
(fixvfork) [SUNOS4]: Likewise.
* desc.c (decode_select): Continue to decode syscall arguments
in case of OOM condition.
* file.c (sys_getdents): Likewise.
(sys_getdents64) [_LFS64_LARGEFILE]: Likewise.
(sys_getdirentries) [FREEBSD]: Likewise.
* mem.c (sys_mincore): Changed type of variables which deal with
malloc size from int to unsigned long.
Fixes RH#159308.
2005-05-22 Dmitry V. Levin <ldv@altlinux.org>
* bjm.c [LINUX]: Do not include <linux/linkage.h>. It is not
safe to include kernel headers, and this one is not used anyway.
Fixes RH#158488.
2005-05-26 Roland McGrath <roland@redhat.com>
* system.c (sys_sysctl): Check for errors accessing user pointers.
Use malloc instead of alloca in case size is insane.
2005-05-09 Roland McGrath <roland@redhat.com>
* configure.ac: Check for libaio.h.
* desc.c (sys_io_setup, sys_io_submit, sys_io_cancel,
sys_io_getevents, sys_io_destroy): New functions.
* linux/syscall.h: Declare them.
* linux/syscallent.h: Use those for io_* syscalls.
* linux/alpha/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
From Zach Brown <zach.brown@oracle.com>.
Fixes RH#155065.
* debian/control (Architecture): Add ppc64.
Fixes Debian bug #301089.
2005-05-05 Anton Blanchard <anton@samba.org>
* process.c (ptrace_cmds): Add PTRACE_GETVRREGS and PTRACE_SETVRREGS
if defined.
2005-05-09 Roland McGrath <roland@redhat.com>
* strace.c (main): Refuse negative -s argument value.
Fixes Debian bug #303256.
2005-04-25 Anton Blanchard <anton@samba.org>
* file.c (openmodes): Add O_NOATIME flag if defined.
2005-04-05 Anton Blanchard <anton@samba.org>
* linux/powerpc/ioctlent.h: Regenerated.
* signal.c (signame): Don't try and dereference negative index.
* linux/powerpc/syscallent.h: Add debug_setcontext, vserver,
mbind, *_mempolicy, mq_*, sys_kexec_load, add_key, request_key,
keyctl, waitid, sys_semtimedop. Fix various other syscalls.
* ipc.c (shm_resource_flags): New variable, table has SHM_HUGETLB
but not IPC_NOWAIT, which have the same value.
(sys_shmget): Use that instead of resource_flags.
2005-03-22 Roland McGrath <roland@redhat.com>
* desc.c (decode_select): Increase local buffer size.
Fixes RH#151570.
* configure.ac, NEWS: Version 4.5.11.
* debian/changelog, strace.spec: 4.5.11-1.
* linux/arm/syscallent.h: Fix 113 entry (syscall, not vm86old).
2005-03-14 Roland McGrath <roland@redhat.com>
* configure.ac, NEWS: Version 4.5.10.
* debian/changelog, strace.spec: 4.5.10-1.
2005-02-26 GOTO Masanori <gotom@debian.or.jp>
* linux/alpha/syscallent.h: Fix the reversed order of lstat64 and
fstat64. Clean up osf_nrecvmsg and osf_ngetsockname.
2005-02-28 Andreas Schwab <schwab@suse.de>
* syscall.c (getrval2): Move #ifdef IA64 inside #ifdef LINUX.
2005-03-14 Roland McGrath <roland@redhat.com>
* linux/mips/syscallent.h: Update various calls.
From Thiemo Seufer <ths@networkno.de>.
Fixes Debian bug #256684.
* debian/control (Architecture): Add s390.
Fixes Debian bug #294172.
2005-03-06 Roland McGrath <roland@redhat.com>
* strace.c (trace) [PTRACE_GETSIGINFO]: Fetch siginfo_t for SIGSEGV
and SIGBUS signals, use si_addr in output.
2005-03-01 Roland McGrath <roland@redhat.com>
* file.c (print_xattr_val): Add a cast.
2005-02-05 Roland McGrath <roland@redhat.com>
* desc.c (decode_select): Calculate size of passed fd_set vectors and
copy in the user's size rather than the standard sizeof(fd_set).
Fixes Debian bug #65654, #284290.
* util.c (printpath, printpathn): Print NULL and don't try any fetch
when ADDR is zero.
Fixes Debian bug #63093.
* debian/control (Build-Depends): Fix for s390 and sparc.
From Bastian Blank <waldi@debian.org>.
Fixes Debian bug #293564.
2004-12-19 Dmitry V. Levin <ldv@altlinux.org>
* strace.c (main) [!USE_PROCFS]: In child process, raise SIGSTOP
right before execv() call. Remove fake_execve() call.
* defs.h (fake_execve): Remove unused declaration.
* process.c (fake_execve): Remove unused function.
Fixes RH#143365.
2005-02-04 Roland McGrath <roland@redhat.com>
* configure.ac, NEWS: Version 4.5.9.
* debian/changelog, strace.spec: 4.5.9-2.
* file.c (O_LARGEFILE): Omit when #undef'd because it was zero.
2005-02-02 Roland McGrath <roland@redhat.com>
* debian/control: Add strace-udeb package for installer debugging.
* debian/rules (binary-arch): Build it.
From Joshua Kwan <joshk@triplehelix.org>.
Fixes Debian bug #268294.
* file.c (openmodes) [O_LARGEFILE] [O_LARGEFILE == 0]: Redefine to
known values for Linux.
* util.c (printcall): Print 16 ?s when long is 8 bytes.
Fixes RH#146932.
* linux/sparc/syscall.h: Declare sys_epoll_create, sys_epoll_ctl,
sys_epoll_wait.
* linux/sparc64/syscall.h: Just #include "../sparc/syscall.h" here.
* ioctl.c (nioctlents2): Add const to type.
Fixes Debian bug #278449.
* sock.c (iffflags): New variable, table of IFF_* values.
(print_addr): New function.
(sock_ioctl): Handle SIOCGIFADDR, SIOCGIFDSTADDR, SIOCGIFBRDADDR,
SIOCGIFNETMASK, SIOCGIFFLAGS, SIOCGIFMETRIC, SIOCGIFMTU, SIOCGIFSLAVE,
SIOCGIFHWADDR. Use print_addr for SIOCGIFCONF, SIOCGIFNAME, and
SIOCGIFINDEX, and fix their output.
From Ulrich Drepper <drepper@redhat.com>.
Fixes RH#138223.
Fixes Debian bug #192164.
2004-12-20 Dmitry V. Levin <ldv@altlinux.org>
* configure.ac: Use AC_GNU_SOURCE macro instead of changing CFLAGS.
* defs.h [HAVE_CONFIG_H]: Include config.h first.
* strace.c: Include "defs.h" first.
Fixes RH#143370.
* syscall.c (call_summary): Fix potential NULL dereference.
Fixes RH#143369.
2004-12-19 Dmitry V. Levin <ldv@altlinux.org>
* syscall.c (qual_signal): Check bounds for numeric signal names.
Fix parser of symbolic signal names.
Fix return code, as required by qualify() function.
* syscall.c (qual_desc): Check bounds for descriptor number.
* syscall.c (qual_syscall): Correct return code, to be consistent
with qualify() and other qual_* functions.
Fixes RH#143362.
2005-02-01 Roland McGrath <roland@redhat.com>
* system.c [LINUX] (MS_MANDLOCK, MS_NOATIME, MS_NODIRATIME, MS_BIND,
MS_MOVE, MS_REC, MS_VERBOSE, MS_POSIXACL, MS_ACTIVE, MS_NOUSER):
New macros.
[LINUX] (mount_flags): Add them.
[LINUX] (sys_mount): If any of (MS_BIND|MS_MOVE|MS_REMOUNT) bits are
set in the flags argument, don't try to fetch the filesystem string.
Fixes RH#141932.
* config.guess: Update from canonical version, timestamp 2004-11-12.
* config.sub: Likewise, timestamp 2004-11-30.
* process.c [LINUX] [X86_64] (sys_arch_prctl): New function.
* linux/syscall.h: Declare it.
* linux/x86_64/syscallent.h: Use it.
Part of RH#142667.
* process.c (sys_sched_setscheduler): Use %#lx format for bad pointer.
(sys_sched_getparam, sys_sched_setparam): Likewise.
Part of RH#142667.
* signal.c [HAVE_SIGACTION] [LINUX && X86_64] (SA_RESTORER): Define
here too.
Part of RH#142667.
* linux/syscallent.h: Use sys_mincore instead of printargs.
* linux/x86_64/syscallent.h: Likewise. Also use sys_getrlimit,
sys_semtimedop, sys_umount2.
Part of RH#142667.
* syscall.c (qual_signal): Fix inverted return value and bogus
argument to qualify_one in the named case.
* file.c (print_xattr_val): Don't use auto array sized by syscall
argument. Use malloc instead, so it can fail for insane values.
Fixes Debian bug #283704.
* net.c (sys_getsockopt): Fix a format %ld -> %d.
* linux/syscall.h [IA64] (SYS_semtimedop): #undef it.
* syscall.c (syscall_enter) [X86_64]: Fix 32-bit argument register map
not to double the middle entry!
Fixes RH#146093.
* linux/x86_64/syscallent.h: Fix exit_group entry.
* util.c (getpc) [S390 || S390X]: Implement it.
Patch by David Wilder <wilder@us.ibm.com>.
* linux/ia64/syscallent.h: Add fadvise64, fstatfs64, statfs64, mbind,
[gs]et_mempolicy, mq_*, sys_kexec_load, vserver, and waitid.
Fixes RH#146245.
2005-01-22 Andreas Schwab <schwab@suse.de>
* net.c (sys_getsockopt): Change type of len to int.
2004-10-19 Roland McGrath <roland@redhat.com>
* configure.ac, NEWS: Version 4.5.8.
* debian/changelog, strace.spec: 4.5.8-1.
* file.c (sys_fadvise64): Conditionalize just on [LINUX].
* configure.ac: Check for sys/epoll.h.
* desc.c: Protect #include <sys/epoll.h> with [HAVE_SYS_EPOLL_H].
(epollctls, epollevents): Protect each entry with #ifdef on its macro.
* strace.c (handle_group_exit): Don't detach leader that wasn't
TCB_ATTACHED. Instead mark it with TCB_GROUP_EXITING.
Remove droptcb loop at end, no longer required since 2.6 reports each
thread death.
Fixes RH#135254.
* strace.c (trace): Use handle_group_exit for non-TCB_ATTACHED child
taking signal when it has nclone_threads > 0.
* strace.c (handle_group_exit, trace): Mark leader with
TCB_GROUP_EXITING and don't be surprised at child deaths when their
leader has it set.
Fixes RH#132150.
* process.c (WCOREFLAG): Define if not defined.
(W_STOPCODE, W_EXITCODE): Likewise.
Reported by Marty Leisner <mleisner@eng.mc.xerox.com>.
* sock.c [! LINUX]: Include <sys/socket.h> before <sys/sockio.h>.
Reported by Marty Leisner <mleisner@eng.mc.xerox.com>.
* debian/rules: Make strace64.1.gz symlink to strace.1.gz instead of
strace64.1 to strace.1, which doesn't exist.
Fixes Debian bug #269220.
2004-09-05 Phil Blundell <pb@nexus.co.uk>
* linux/arm/syscallent.h: New file.
2004-10-19 Roland McGrath <roland@redhat.com>
* debian/rules (DEB_BUILD_GNU_TYPE, CONFIG_OPTS): New variables.
[$(DEB_HOST_GNU_TYPE) == s390-linux] (build64, HOST64, CC64): Set them.
(build/Makefile): Use $(CONFIG_OPTS).
(build64/Makefile): Pass --host as well as --build.
From Bastian Blank <waldi@debian.org>.
Fixes Debian bug #271500.
* linux/hppa/syscallent.h: Update for 2.6.9 syscalls.
From Randolph Chung <tausq@debian.org>
Fixes Debian bug #273887.
* file.c (sys_llseek): Revert last change.
2004-09-14 Richard Henderson <rth@twiddle.net>
* linux/alpha/syscallent.h: Add tgkill, *stat64, vserver, mbind,
[gs]et_mempolicy, mq_*, waitid.
2004-10-07 Roland McGrath <roland@redhat.com>
* file.c (sys_llssek, sys_readahead, sys_fadvise64, sys_fadvise64_64):
Use LONG_LONG macro.
* io.c (sys_pread, sys_pwrite, sys_sendfile): Likewise.
* linux/x86_64/syscallent.h: Fix botched table entries.
From Ulrich Drepper <drepper@redhat.com>.
* mem.c [LINUX] (sys_mbind, sys_set_mempolicy, sys_get_mempolicy):
New functions.
* linux/syscall.h: Declare them.
* linux/x86_64/syscallent.h: Likewise.
From Ulrich Drepper <drepper@redhat.com>.
* linux/syscallent.h: Handle mbind, set_mempolicy, get_mempolicy.
From Ulrich Drepper <drepper@redhat.com>.
* file.c [LINUX && (I386 || X86_64)] (sys_fadvise64, sys_fadvise64_64):
New functions.
* linux/syscall.h: Declare them.
* linux/syscallent.h: Handle fadvise64 and fadvise64_64 using those.
* linux/x86_64/syscallent.h: Likewise.
From Ulrich Drepper <drepper@redhat.com>.
2004-09-13 Dmitry V. Levin <ldv@altlinux.org>
* linux/ioctlsort.c (main): Omit duplicate lines
(with same name and code) from output.
* linux/ioctlent.sh: Build the list of ioctls defined in
scsi/sg.h (0x22..), scsi/scsi.h and scsi/scsi_ioctl.h (0x53..),
as suggested by Peter Jones <pjones@redhat.com>
* linux/ioctlent.h: Regenerated.
Fixes RH#129808.
2004-09-13 Ulrich Drepper <drepper@redhat.com>
Dmitry V. Levin <ldv@altlinux.org>
* time.c [LINUX] (print_rtc): New function, for printing rtc_time
structure.
[LINUX] (rtc_ioctl): New function, for parsing RTC_* ioctls.
* ioctl.c [LINUX] (ioctl_decode): Call rtc_ioctl.
* defs.h [LINUX]: Declare rtc_ioctl.
Fixes RH#58606.
2004-10-06 Roland McGrath <roland@redhat.com>
* desc.c [LINUX] (sys_epoll_create, sys_epoll_ctl, sys_epoll_wait):
New functions.
* linux/syscall.h: Declare them.
* linux/syscallent.h: Use those for epoll_* syscalls.
* linux/alpha/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/sparc64/syscallent2.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
From Ulrich Drepper <drepper@redhat.com>.
Fixes RH#134463.
* resource.c (resources): Add RLIMIT_LOCKS, RLIMIT_SIGPENDING,
and RLIMIT_MSGQUEUE, if defined.
From Ulrich Drepper <drepper@redhat.com>.
Fixes RH#133594.
* net.c [HAVE_SENDMSG] (printcmsghdr): New function.
(printmsghdr): Use it.
From Ulrich Drepper <drepper@redhat.com>.
Fixes RH#131689.
* file.c (sprintmode): Add const to return type.
(sprintfstype): Likewise.
* signal.c (printsiginfo): Add a const.
2004-09-15 Roland McGrath <roland@redhat.com>
* linux/x86_64/syscallent.h: Use sys_waitid.
* linux/syscallent.h: waitid takes 5 arguments, and is in TP category.
* process.c (sys_waitid): Handle fifth argument (struct rusage *).
2004-09-11 Roland McGrath <roland@redhat.com>
* time.c (sys_clock_nanosleep): Print zero flags arg correctly.
(sys_timer_settime): Likewise.
(printsigevent): Print signals by name for SIGEV_SIGNAL.
(sys_timer_create): Print clock ID symbolically.
From Ulrich Drepper <drepper@redhat.com>.
Fixes RH#131420.
2004-09-07 Michal Ludvig <mludvig@suse.cz>
* defs.h (nioctlents1, nsignals2): Fix typos in decls.
2004-09-03 Roland McGrath <roland@redhat.com>
* syscall.c (qual_options): Add const to defn.
Update all uses.
(call_count, error_count, tv_count): Variables removed.
(struct call_counts, counts): New type and variable.
Update all users of the old three to use the new array of structs.
(trace_syscall): Allocate counts on first use.
(sorted_count): Variable removed.
(call_summary): Allocate locally.
* syscall.c (sysent0, sysent1, sysent2, sysent): Add const to defn.
(nsyscalls0, nsyscalls1, nsyscalls2): Likewise.
(errnoent0, errnoent1, errnoent2, errnoent): Likewise.
(nerrnos0, nerrnos1, nerrnos2): Likewise.
* signal.c (signalent0, signalent1, signalent2): Likewise.
(nsignals0, nsignals1, nsignals2): Likewise.
(signame): LIkewise.
* ioctl.c (ioctlent0, ioctlent1, ioctlent2): Likewise.
(nioctlents0, nioctlents1, nioctlents2): Likewise.
(ioctl_lookup, ioctl_next_match): Likewise.
* defs.h: Update decls.
* io.c (sys_ioctl): Update users.
* util.c (xlookup, printxval, addflags, printflags): Use const for
struct xlat * argument.
* defs.h (xlookup, printxval, addflags, printflags): Update decls.
* bjm.c: Add const to all struct xlat defns.
* desc.c: Likewise.
* file.c: Likewise.
* ipc.c: Likewise.
* mem.c: Likewise.
* net.c: Likewise.
* proc.c: Likewise.
* process.c: Likewise.
* resource.c: Likewise.
* signal.c: Likewise.
* sock.c: Likewise.
* stream.c: Likewise.
* system.c: Likewise.
* term.c: Likewise.
* time.c: Likewise.
* util.c: Likewise.
2004-09-01 Roland McGrath <roland@redhat.com>
* linux/x86_64/syscallent.h: Add new entries for timer_*, clock_*, and
mq_* syscalls, and names only for new calls up to 252.
* linux/syscallent.h: Add waitid.
* linux/x86_64/syscallent.h: Likewise.
* linux/syscall.h: Declare sys_waitid.
* process.c (internal_wait): Take second arg giving index of flags
argument.
* defs.h: Update prototype.
* syscall.c (internal_syscall): Update caller.
Also use internal_wait for SYS_waitid.
* process.c (sys_waitid): Define for [LINUX] as well.
Don't tweak TCB_SUSPENDED--internal_wait does that.
(waitid_types): Conditionalize use of nonstandard P_* macros.
2004-08-31 Roland McGrath <roland@redhat.com>
* configure.ac, NEWS: Version 4.5.7.
* debian/changelog: 4.5.7-1.
* strace.spec: 4.5.7-2.
* debian/rules: Rewrite sparc64 change of 2004-07-12.
Always do each build in a separate build directory.
Fixes Debian bug #254728.
* time.c (clocknames): Use #ifdef around CLOCK_* uses.
* strace.1: Say that -c shows system CPU time, not real time.
Fixes Debian bug #254438.
* syscall.c (dumpio): Match pread and pwrite system calls too.
Fixes Debian bug #239947.
* net.c (sockoptions): Add all SO_* macros known in Linux 2.6.9.
Fixes Debian bug #171653.
2004-07-12 Dmitry V. Levin <ldv@altlinux.org>
* signal.c [LINUX] (parse_sigset_t): Fix hex strings parser.
Fixes RH#128091.
2004-08-30 Roland McGrath <roland@redhat.com>
* strace.c (main): Don't call fake_execve under -c.
From Ulrich Drepper <drepper@redhat.com>.
Fixes RH#129166.
* net.c (sockipoptions): Add some options.
[SOL_IPV6] (sockipv6options): New variable.
(sys_getsockopt, printsockopt): Use it for SOL_IPV6 level.
From Ulrich Drepper <drepper@redhat.com>.
Fixes RH#128391.
* time.c (clocknames): New variable, symbolic names for clock_t.
(sys_clock_settime, sys_clock_gettime, sys_clock_nanosleep): Use it.
From Ulrich Drepper <drepper@redhat.com>.
Fixes RH#129378.
* system.c (personality_options): Hard-code values here.
Don't #include <linux/personality.h> at all.
Fixes RH#130965 and Debian bug #40588.
* file.c (print_xattr_val): New function to show attribute values.
(sys_setxattr, sys_fsetxattr, sys_getxattr, sys_fgetxattr): Use it.
From Ulrich Drepper <drepper@redhat.com>.
Fixes RH#131177.
2004-07-12 Roland McGrath <roland@redhat.com>
* configure.ac, NEWS: Version 4.5.6.
* strace.spec, debian/changelog: 4.5.6-1.
* Makefile.am (EXTRA_DIST): Add linux/sparc64 files.
* debian/rules: On sparc-linux, build strace64 as well.
From Ben Collins <bcollins@debian.org>.
Fixes Debian bug #254728.
2004-07-07 David S. Miller <davem@nuts.davemloft.net>
* linux/sparc/syscallent.h: Sync with reality.
* linux/sparc/syscall.h (sys_sendfile64, sys_futex, sys_gettid,
sys_sched_setaffinity, sys_sched_getaffinity, sys_setxattr,
sys_lsetxattr, sys_fsetxattr, sys_getxattr, sys_lgetxattr,
sys_fgetxattr, sys_listxattr, sys_llistxattr, sys_flistxattr,
sys_removexattr, sys_lremovexattr, sys_fremovexattr,
sys_remap_file_pages, sys_readahead, sys_tgkill, sys_statfs64,
sys_fstatfs64, sys_clock_settime, sys_clock_gettime,
sys_clock_getres, sys_clock_nanosleep, sys_timer_create,
sys_timer_settime, sys_timer_gettime): New declarations.
* linux/sparc64/dummy2.h, linux/sparc64/syscallent2.h,
linux/sparc64/syscall.h, linux/sparc64/errnoent.h,
linux/sparc64/errnoent1.h, linux/sparc64/errnoent2.h,
linux/sparc64/ioctlent.h, linux/sparc64/ioctlent1.h,
linux/sparc64/ioctlent2.h, linux/sparc64/signalent.h,
linux/sparc64/signalent.h, linux/sparc64/signalent.h,
linux/sparc64/signalent1.h, linux/sparc64/signalent2.h,
linux/sparc64/syscall1.h, linux/sparc64/syscallent.h,
linux/sparc64/syscallent1.h: New files.
* defs.h (LINUXSPARC): Define also when SPARC64.
(LINUX && SPARC64): Set SUPPORTED_PERSONALITIES to 3.
Ignore SIGTRAP after execve by defining TCB_WAITEXECVE.
Define possibly missing __NR_exit_group. Declare getrval2.
* configure.ac (sparc64): New architecture case.
* file.c (stat_sparc64): New structure.
(printstat_sparc64): New output routine for that.
(printstat): Call it, if personality is 2.
(printstat64): Likewise.
* util.c: Conditionalize ptrace defines on LINUXSPARC
not LINUX && SPARC.
(SPARC64 && LINUX): Define r_pc to r_tpc, and PTRACE_FOOREGS
to PTRACE_FOOREGS64 so that more sparc code can be shared
between 64-bit and 32-bit.
(_hack_syscall5): Correct trap number when SPARC64.
(PTRACE_WRITE{TEXT,DATA}): Add SPARC64 to ifdef guard.
(getpc): Handle SPARC64 && LINUX.
(printcall): Likewise.
(arg fetching/setting): Use same code for SPARC64 LINUX
as for SPARC.
(setbpt): Handle SPARC64 && LINUX.
(clearbpt): Likewise.
* signal.c: Conditionalize ptrace defines on SPARC and
SPARC64.
(SPARC64 && LINUX): Define r_pc to r_tpc, and PTRACE_FOOREGS
to PTRACE_FOOREGS64 so that more sparc code can be shared
between 64-bit and 32-bit.
(m_siginfo): Use same definition on SPARC64 as SPARC.
(sys_sigreturn): Handle LINUX && SPARC64.
* syscall.c: Conditionalize ptrace defines on SPARC and
SPARC64.
(SPARC64 && LINUX): Define r_pc to r_tpc, and PTRACE_FOOREGS
to PTRACE_FOOREGS64 so that more sparc code can be shared
between 64-bit and 32-bit.
(getscno): Use same static state on SPARC64 as SPARC,
and add SPARC64 handling.
(get_error): Handle LINUX && SPARC64.
(force_result): Likewise.
(syscall_enter): Likewise.
(trace_syscall): Handle sys_socketcall and sys_ipc on SPARC64
just like SPARC.
(getrval2): Handle LINUX && SPARC64.
* process.c: Conditionalize ptrace defines on SPARC and
SPARC64.
(SPARC64 && LINUX): Define r_pc to r_tpc, and PTRACE_FOOREGS
to PTRACE_FOOREGS64 so that more sparc code can be shared
between 64-bit and 32-bit.
(change_syscall): Handle LINUX && SPARC64.
(struct_user_offsets): Ifdef out those which do not exist
on SPARC64.
* net.c (sys_pipe): Handle LINUX && SPARC64.
* ioctl.c: Fix initializer typo for nioctlents2, was
nioctlents1 by accident.
2004-06-28 Andreas Schwab <schwab@suse.de>
* process.c (internal_exec): Move TCB_WAITEXECVE handling here.
(sys_execve): Remove it here.
2004-07-12 Roland McGrath <roland@redhat.com>
* Makefile.am (EXTRA_DIST): Add linux/sh64/syscallent.h.
* debian/control (Section): Move to utils, matching Debian override.
* net.c (addrfams): Make variable global.
* sock.c (sock_ioctl): Decode the arguments for SIOCGIFNAME,
SIOCGIFINDEX, and SIOCGIFCONF.
From Ulrich Drepper <drepper@redhat.com>.
Fixes RH#126917.
* linux/ioctlsort.c: Add some #includes.
[POWERPC]: Kludge out high bits.
* linux/ia64/ioctlent.h: Regenerated using RHEL3 headers.
* linux/powerpc/ioctlent.h: Likewise.
2004-07-11 Roland McGrath <roland@redhat.com>
* linux/ioctlent.sh: Replace asm with $asm in all places.
* configure.ac: Add I386 as AM_CONDITIONAL.
* Makefile.am [LINUX]: Add maintainer-mode rules to regenerate
the ioctlent.h file.
2004-07-08 Roland McGrath <roland@redhat.com>
* resource.c (sys_quotactl): Truncate first argument to 32 bits, since
that's what the kernel will do.
2004-07-07 Roland McGrath <roland@redhat.com>
* linux/ioctlent.sh: Take optional second argument to use as directory
name in place of `asm'.
2004-06-27 Roland McGrath <roland@redhat.com>
* configure.ac, NEWS: Version 4.5.5.
* strace.spec, debian/changelog: 4.5.5-1.
2004-06-22 Roland McGrath <roland@redhat.com>
* syscall.c (syscall_fixup) [LINUX && X86_64]: For 32-bit process,
sign extend the low 32 bits of RAX to 64 bits.
Fixes RH#126547.
* syscall.c (force_result): [LINUX && X86_64]: Fix RAX*4 -> RAX*8.
2004-06-03 Roland McGrath <roland@redhat.com>
* configure.ac, NEWS: Version 4.5.4.
* strace.spec, debian/changelog: 4.5.4-1.
* net.c (domains): Add many PF_* values #ifdef PF_*.
(addrfams): Add many AF_* values #ifdef AF_*.
Fixes Debian bug #250506.
2004-05-02 Dmitry V. Levin <ldv@altlinux.org>
* linux/ioctlsort.c (compare): When ioctl codes equal, compare
names.
(main): Print a note that program output is generated by
ioctlsort.
* linux/ioctlent.sh: Build the list of ioctls defined in
linux/fb.h (0x46..), linux/kd.h (0x4B..), linux/cdrom.h (0x53..),
asm/ioctls.h (0x54..), linux/vt.h (0x56..), linux/videotext.h
(0x71..), linux/videotext.h (0x72..), asm/sockios.h (0x89..),
linux/sockios.h (0x89..), linux/wireless.h (0x8B..).
* linux/ioctlent.h: Regenerated from linux-2.6.5.
Fixes RH#122257.
2004-06-03 Roland McGrath <roland@redhat.com>
* debian/control (Architecture): Add amd64.
Fixes Debian bug #246568.
* strace.c (main) [LINUX]: Expand TCBTAB as necessary for threads
attached. Attach threads only under -f. Set TCB_FOLLOWFORK in them.
(expand_tcbtab): New function, broken out of ...
* process.c (fork_tcb): ... here, call that.
* defs.h: Declare expand_tcbtab.
2004-04-19 Roland McGrath <roland@redhat.com>
* process.c (printstatus): Add a space before | in output.
2004-04-16 Roland McGrath <roland@redhat.com>
* configure.ac: Version 4.5.3.
* strace.spec, debian/changelog: 4.5.3-1.
2004-03-18 Dmitry V. Levin <ldv@altlinux.org>
* resource.c (sys_quotactl) [LINUX]: Cast arithmetic shift operand
from long to unsigned long, to fix output of the quotactl command
parser.
Fixes RH#118694.
2004-04-16 Roland McGrath <roland@redhat.com>
* linux/s390/ioctlent.h, linux/s390x/ioctlent.h: Update DASD ioctls.
From Maxim Shchetynin <maxim@de.ibm.com>.
* configure.ac: Check for <mqueue.h>.
* ipc.c (sys_mq_open, printmqattr) [! HAVE_MQUEUE_H]: Don't try to
decode struct mq_attr.
* NEWS: Mention mq support.
* linux/syscall.h: Support new mq_* syscalls on Linux.
* linux/syscallent.h: Likewise.
* linux/dummy.h: Likewise.
* ipc.c: Likewise.
* time.c (printsigevent): Handle SIGEV_THREAD.
From Ulrich Drepper <drepper@redhat.com>.
Fixes RH#120701.
2004-04-13 Roland McGrath <roland@redhat.com>
* net.c (msg_flags): Grok MSG_FIX, MSG_SYN, MSG_RST, MSG_NOSIGNAL,
MSG_MORE.
From Ulrich Drepper <drepper@redhat.com>.
Fixes RH#120541.
* process.c (printstatus): Mask out bits presented symbolically, and
print "| 0xnnn" if the remaining bits are not all zero.
Fixes Debian bug #240062.
* process.c (print_affinitylist): Rewritten to handle indirect values.
(sys_sched_setaffinity, sys_sched_getaffinity): Update callers.
From Ulrich Drepper <drepper@redhat.com>.
Fixes RH#118685.
* acinclude.m4: Quote first argument to AC_DEFUN in all cases.
2004-04-08 Roland McGrath <roland@redhat.com>
* strace.c (main) [LINUX]: When attaching for -p, look in
/proc/PID/task for all threads and attach them as presumed
CLONE_THREAD children.
* NEWS: Mention the feature.
Fixes RH#120462.
2004-03-02 Roland McGrath <roland@redhat.com>
* util.c (setbpt): Fix one missed spot to use new arg0_index macro.
From Michael Holzheu <HOLZHEU@de.ibm.com>.
* debian/control (Standards-Version): Update to 3.6.1.
2004-03-01 Roland McGrath <roland@redhat.com>
* configure.ac, NEWS: Version 4.5.2.
* strace.spec, debian/changelog: 4.5.2-1.
* strace.c (main): Avoid potential buffer overruns from ludicrous
arguments or PATH values.
* syscall.c (qual_signal): Bail out for too-long string.
* mem.c [LINUX]: <asm/mman.h> -> <linux/mman.h>
Fixes Debian bug #223207.
* linux/sparc/syscall.h: Copy linux/syscall.h decls of sys_sched_*.
* configure.ac: Check for `struct user_desc' in <asm/ldt.h>.
* process.c [HAVE_STRUCT_USER_DESC]: Use struct user_desc in place of
struct modify_ldt_ldt_s.
* mem.c [HAVE_STRUCT_USER_DESC]: Likewise.
* system.c (sysctl_vm): Conditionalize VM_* macro uses, add some more.
From Tim Yamin <plasmaroo@gentoo.org>.
* process.c (sys_execve): Clear instead of set TCB_WAITEXECVE on
erring syscall.
* configure.ac: Check for `struct pt_all_user_regs'
and `struct ia64_fpreg' in <sys/ptrace.h>.
* util.c, process.c, syscall.c, signal.c: Work around conflicts between
<sys/ptrace.h> and <linux/ptrace.h> for defining those types.
* process.c (struct_user_offsets) [LINUX && IA64]: Conditionalize
PT_AR_CSD and PT_AR_SSD uses in case of older kernel headers.
* util.c [LINUX] (arg0_index, arg1_index): New macros.
[S390 || S390X]: Define them with inverted values.
(setbpt): Use them for u_arg indices.
2004-02-26 Andreas Schwab <schwab@suse.de>
* defs.h [LINUX && IA64]: Declare getrval2 also on IA64.
* net.c (sys_pipe) [LINUX && IA64]: For IA64 use the two return values.
* syscall.c (getrval2) [LINUX && IA64]: Implement for IA64.
2004-03-01 Roland McGrath <roland@redhat.com>
* linux/dummy.h (sys_sched_getscheduler, sys_sched_setparam,
sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler,
sys_sched_get_priority_max, sys_sched_get_priority_min): Remove macros.
* process.c [LINUX] (sys_sched_getscheduler, sys_sched_setparam,
sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler,
sys_sched_get_priority_min): New functions.
From Ulrich Drepper <drepper@redhat.com>.
Fixes RH#116990.
2004-02-20 Roland McGrath <roland@redhat.com>
* linux/hppa/syscallent.h: Update some syscalls.
From Randolph Chung <tausq@debian.org>.
Fixes Debian bug #231632.
2003-12-31 David Mosberger <davidm@hpl.hp.com>
* process.c (internal_exit): For ia64, also recognize IA-32 252
as exit_group().
(change_syscall): For IA64, also support changing IA-32 syscalls.
* syscall.c (internal_syscall): For IA64, also recognize IA-32
syscall 252 (exit_group) as an internal_exit() syscall.
* util.c (SYS_fork): For IA64, define them to the IA-32 syscall
number.
(SYS_vfork): Likewise.
(arg_setup): For IA64 version, also support IA-32 syscalls.
(get_arg0): Likewise.
(get_arg1): Likewise.
(set_arg0): Likewise.
(set_arg1): Likewise.
2004-02-15 Anton Blanchard <anton@samba.org>
* linux/powerpc/syscallent.h: Add rtas call.
Shift multiplexed syscalls to start at 300, we are already about
to hit 256 real syscalls.
* linux/syscall.h: SYS_socket_subcall is now 300 for [POWERPC].
2004-02-19 Roland McGrath <roland@redhat.com>
* strace.c (main): Use TCP->pid, not PID, in -p message.
Fixes Debian bug #229802.
2004-01-13 Roland McGrath <roland@redhat.com>
* syscall.c (force_result) [LINUX] [S390 || S390X]: Remove bogus upeek
call.
* stream.c (internal_stream_ioctl): Fix typo strict -> struct.
Reported by Petter Reinholdtsen <pere@hungry.com>.
2003-12-31 David Mosberger <davidm@hpl.hp.com>
* process.c (struct_user_offsets) [IA64]: Fix up register name list.
2003-12-14 Anton Blanchard <anton@samba.org>
* file.c (sys_getdents64): Don't cast d_ino and d_off to unsigned long.
Use %llu formats for them.
* file.c [LINUX] (fsmagic): Add SYSFS_MAGIC.
* linux/powerpc/syscallent.h: Update to include recently added
syscalls.
* syscall.c (get_error) [POWERPC]: Cast result to unsigned long for
ppc64, we were misreporting syscalls that really succeeded as having
failed.
2004-01-13 Roland McGrath <roland@redhat.com>
* strace.1: Remove comment about vfork on Linux.
Fixes Debian bug #223390.
* file.c (direnttypes): Define under [LINUX] as well. Add DT_UNKNOWN.
(sys_getdents64) [LINUX]: Print d_type field.
2003-12-15 Dmitry V. Levin <ldv@altlinux.org>
* strace.c (trace) [WCOREDUMP]: Show coredump status of the
killed process if available. Fixes RH#112117.
2003-11-13 Roland McGrath <roland@redhat.com>
* configure.ac, NEWS: Version 4.5.1.
* strace.spec, debian/changelog: 4.5.1-1.
2003-09-06 Dmitry V. Levin <ldv@altlinux.org>
* defs.h (ioctl_lookup): Prototype change.
* ioctl.c (ioctl_next_match): New function.
* defs.h: Declare it.
* io.c (sys_ioctl): Use it, to display all possible ioctl names
when there's more than one match.
* ioctl.c (ioctl_lookup): Likewise.
* stream.c (internal_stream_ioctl): Likewise.
Patch from Solar Designer <solar@openwall.com>.
2003-11-13 Roland McGrath <roland@redhat.com>
* linux/sh/syscallent.h: Use sys_setgroups32, sys_getgroups32.
* linux/sh64/syscallent.h: Likewise.
2003-09-06 Dmitry V. Levin <ldv@altlinux.org>
Fixes for RH#105359.
* util.c (printuid): New function.
* defs.h: Declare it.
* file.c (sys_chown): Use it.
* file.c (sys_fchown): Likewise.
* process.c (sys_setreuid, sys_setregid, sys_setresuid,
sys_setresgid): Likewise.
* linux/syscallent.h: Better handle getgid32, geteuid32, getegid32,
setreuid32, setregid32, getgroups32, setgroups32, fchown32,
setresuid32, getresuid32, setresgid32, getresgid32, chown32,
setuid32, setgid32, setfsuid32, setfsgid32.
* process.c [LINUX]: Define GETGROUPS32_T.
* process.c [LINUX] (sys_setgroups32, sys_getgroups32):
New functions.
* linux/syscall.h (sys_setgroups32, sys_getgroups32):
Declare them.
2003-11-11 Roland McGrath <roland@redhat.com>
* strace.c (main): Bail with usage error for missing command before we
open the -o file or fiddle uids.
2003-11-06 Roland McGrath <roland@redhat.com>
* strace.c (main): Treat piped output more like file output.
Disallow -ff with piped output. Fixes RH#105366.
Reported by Dmitry V. Levin <ldv@altlinux.org>
* strace.c (tprintf): Check result of vfprintf and use perror when it
fails while not writing to stderr itself. Fixes Debian bug #218762.
* net.c (printsock): Fix typo in #ifdef AF_NETLINK.
From Ulrich Drepper <drepper@redhat.com>.
2003-11-01 Roland McGrath <roland@redhat.com>
* syscall.c (trace_syscall) [LINUX]: Calculate ONE_TICK once using
setitimer rather than hard-coding a value based on HZ.
Fixes RH#108012, reported by Florian La Roche <laroche@redhat.com>.
2003-10-21 Roland McGrath <roland@redhat.com>
* strace.1: Fixed a few spelling errors.
Fixes Debian bug #217008.
* syscall.c: Revert last change, was broken.
2003-10-01 Roland McGrath <roland@redhat.com>
* process.c (internal_clone): Don't suspend parent when call requested
a specific PID that is not a traced child.
* signal.c [LINUX] (parse_sigset_t): Rewrite to process hex strings
from right to left so we don't have to presume the size.
Reported by David Woodhouse <dwmw2@redhat.com>.
2003-09-25 Roland McGrath <roland@redhat.com>
* mem.c (mmap_prot) [PROT_SEM, PROT_GROWSDOWN, PROT_GROWSUP]: Include
these in the table if they are defined.
2003-09-24 Roland McGrath <roland@redhat.com>
* configure.ac, NEWS: Version 4.5.
* strace.spec, debian/changelog: 4.5-1.
* syscall.c (get_scno) [LINUX] [S390 || S390X]: Bail out of
instruction decoding branch if TCB_INSYSCALL is clear.
Reported by <jochen@penguin-breeder.org>.
* linux/ioctlent.h: Swap order of overloaded TC* and SNDCTL_* values.
2003-09-23 Roland McGrath <roland@redhat.com>
* strace.spec: On ppc64 (maybe others later), create an strace64
package as well containing just /usr/bin/strace64.
* signal.c (sprintsigmask): Print RT_%u for __SIGRTMIN..__SIGRTMAX.
Fixes RH#104365.
2003-08-21 Roland McGrath <roland@redhat.com>
* linux/syscallent.h: Fix mlock argument count. Fixes RH#101499.
* linux/x86_64/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
2003-07-28 Daniel Jacobowitz <drow@mvista.com>
* defs.h (ALIGN64): Define for MIPS.
* io.c (PREAD_OFFSET_ARG): Define.
(sys_pread, sys_pwrite): Use it.
* process.c (struct_user_offsets) [SH]: Check whether REG_XDREG0
is defined.
* linux/sh/syscallent.h (pread, pwrite): Take six arguments.
(truncate64, ftruncate64): Pretty-print.
* linux/mips/syscallent.h (pread, pwrite): Take six arguments.
(truncate64, ftruncate64): Take four arguments.
2003-07-17 Roland McGrath <roland@redhat.com>
* configure.ac, NEWS: Version 4.4.99.
* strace.spec, debian/changelog: 4.4.99-1.
2003-07-15 Anton Blanchard <anton@samba.org>
* ipc.c: Add SHM_HUGETLB field.
Mask out permission bits in msgget, semget and shmget before
printing resource_flags.
Mask execute permission bits (even though we dont currently
use them).
2003-07-17 Roland McGrath <roland@redhat.com>
* linux/powerpc/syscallent.h (tgkill): New at 250.
* linux/syscallent.h: truncate64/ftruncate64 need 3 args.
From Ulrich Drepper <drepper@redhat.com>.
* linux/syscallent.h: Handle statfs64, fstatfs64, utimes.
* file.c (printstatfs): Print f_fsid and f_frsize.
[LINUX] (printstatfs64, sys_statfs64, sys_fstatfs64): New functions.
* linux/syscall.h: Add decls.
From Ulrich Drepper <drepper@redhat.com>.
2003-07-09 Roland McGrath <roland@redhat.com>
* linux/ia64/syscallent.h (tgkill): New at 1235.
2003-07-05 Richard Henderson <rth@twiddle.net>
* process.c (sys_clone): Order arguments for alpha the same as x86_64.
* syscall.c (ERESTART_RESTARTBLOCK): New.
(trace_syscall): Print it.
* linux/alpha/syscallent.h (osf_syscall): Name properly.
(osf_set_program_attributes): Fix typo.
(osf_nfssvc): Likewise.
(osf_sigsendset): Likewise.
(getdents64, gettid, readahead, tkill, setxattr, lsetxattr, fsetxattr,
getxattr, lgetxattr, fgetxattr, listxattr, llistxattr, flistxattr,
removexattr, lremovexattr, fremovexattr, futex, sched_setaffinity,
sched_getaffinity, tuxcall, io_setup, io_destroy, io_getevents,
io_submit, io_cancel, exit_group, lookup_dcookie, epoll_create,
epoll_ctl, epoll_wait, remap_file_pages, set_tid_address,
restart_syscall, fadvise, timer_create, timer_settime, timer_gettime,
timer_getoverrun, timer_delete, clock_settime, clock_gettime,
clock_getres, clock_nanosleep, semtimedop): New.
2003-07-08 Roland McGrath <roland@redhat.com>
* signal.c (sys_tgkill): New function.
* linux/syscall.h: Declare it.
* linux/syscallent.h: Add tgkill.
2003-06-27 Roland McGrath <roland@redhat.com>
* configure.ac: Check for type `struct __old_kernel_stat'.
* file.c (convertoldstat, printoldstat): Define under
[LINUX && HAVE_STRUCT___OLD_KERNEL_STAT] rather than a list of archs.
(sys_oldstat, sys_oldfstat, sys_oldlstat): Likewise.
* linux/dummy.h [! HAVE_STRUCT___OLD_KERNEL_STAT]
(sys_oldstat, sys_oldfstat, sys_oldlstat): #define to printargs.
2003-06-26 Roland McGrath <roland@redhat.com>
* configure.ac: SHMEDIA -> SH64
* defs.h: Likewise.
* mem.c: Likewise.
* process.c: Likewise.
* sock.c: Likewise.
* syscall.c: Likewise.
* util.c: Likewise.
* linux/shmedia/syscallent.h: Moved to ...
* linux/sh64/syscallent.h: ... here.
* config.guess: Update from canonical version, timestamp 2003-06-17.
* config.sub: Likewise.
* syscall.c (force_result) [LINUX] [ARM]: Fix variable usage.
From: Joshua Neal <tinara@netpipeline.net>.
* process.c [LINUX] (sys_futex): Grok FUTEX_REQUEUE and print 5th arg.
* linux/syscallent.h: sys_futex argument count is now 5, not 4.
* linux/ia64/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
From Jakub Jelinek <jakub@redhat.com>.
* syscall.c (get_scno) [S390 || S390X]: Fix old vs new mode detection.
From Michael Holzheu <HOLZHEU@de.ibm.com>.
2003-06-23 Roland McGrath <roland@redhat.com>
* net.c (sys_socket): Decode protocol for PF_INET6 same as PF_INET.
From Ulrich Drepper <drepper@redhat.com>.
2003-06-10 Roland McGrath <roland@redhat.com>
* configure.ac, NEWS: Version 4.4.98.
* strace.spec, debian/changelog: 4.4.98-1.
2003-06-09 Roland McGrath <roland@redhat.com>
* linux/s390x/syscallent.h: Update many syscalls.
* linux/syscall.h (SYS_socket_subcall): Update [S390X] value.
* linux/s390/syscallent.h: Update many syscalls.
* linux/syscall.h (SYS_socket_subcall): Update [S390] value.
* linux/shmedia/syscallent.h: New file.
From Stephen Thomas <stephen.thomas@superh.com>.
* strace.c (trace): Print a message and newline for a WIFEXITED report
from the process we just printed an unterminated syscall line for.
2003-06-03 Roland McGrath <roland@redhat.com>
* util.c (printcall) [LINUX]: Fix typo [IA62] -> [IA64].
Linux/ARM improvements from Russell King <rmk@arm.linux.org.uk>:
* defs.h [LINUX] (TCB_WAITEXECVE): Define for [ARM] too.
* process.c (struct_user_offsets) [LINUX] [ARM]: Add ARM registers.
* signal.c [LINUX] (sys_sigreturn) [ARM]: New case.
* syscall.c (get_scno, syscall_fixup) [LINUX] [ARM]: Case rewritten.
(get_error) [LINUX] [ARM]: Update.
(syscall_enter) [LINUX] [ARM]: New case.
* util.c (printcall) [LINUX] [ARM]: New case.
* debian/control (Standards-Version): Update to 3.5.10.
* strace.c (main): In PATH search, accept only a regular file with
execute bits set. Fixes Debian bug #137103.
2003-06-02 Roland McGrath <roland@redhat.com>
* strace.c (main): Set -q when given -o and not -p, and not when not
given -o, to match what the man page always said.
Fixes Debian bug #47113, #153678.
* configure.ac, NEWS: Version 4.4.97.
* strace.spec, debian/changelog: 4.4.97-1.
* configure.ac, defs.h, mem.c, process.c, sock.c, syscall.c, util.c:
Merged in SHmedia port from Stephen Thomas <stephen.thomas@superh.com>.
* config.guess: Update from ftp://ftp.gnu.org/pub/gnu/config/,
timestamp 2003-05-22.
* config.sub: Likewise, timestamp 2003-05-24.
2003-05-22 Roland McGrath <roland@redhat.com>
* defs.h (struct tcb): New member `nzombies'.
* strace.c (alloctcb): Initialize it.
(droptcb): Increment our parent's zombie count.
* process.c (internal_wait): Don't go into TCB_SUSPENDED if the
process has zombies it can reap. On the way out, if we reaped
an untraced process, decrement the zombie count.
* process.c (sys_clone): Mask CSIGNAL out of flags and print that
separately using signame.
* process.c (internal_clone) [TCB_CLONE_THREAD]: Use ARG_FLAGS instead
of literal 0 for index. Consult the right flags without clobbering
anything when we reparent the new child to the caller's parent thread.
* linux/s390/syscallent.h: Fix sys_clone argument count.
* linux/s390x/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/alpha/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* process.c [LINUX] [S390 || S390X] (ARG_CTID, ARG_TLS): Fix swapped
indices. Reported by Jakub Jelinek <jakub@redhat.com>.
* signal.c [LINUX] (SI_SIGIO, SI_TKILL): New macros.
[LINUX || SVR4] (siginfo_codes): Add strings for them.
* process.c (print_affinitylist): Fix loop condition.
Reported by Ian Wienand <ianw@gelato.unsw.edu.au>.
2003-04-10 Roland McGrath <roland@redhat.com>
* syscall.c (qual_desc): Return zero after parsing number.
From Rob Leslie <rob@mars.org>, fixes Debian bug #188379.
2003-04-07 Roland McGrath <roland@redhat.com>
* linux/syscallent.h: Handle semtimedop subcall of ipc syscall.
* linux/syscall.h: Likewise.
* ipc.c [LINUX] (sys_semtimedop): New function.
From Ulrich Drepper <drepper@redhat.com>.
* ipc.c (sys_semget): Mask off permission bits for resource_flags.
From Ulrich Drepper <drepper@redhat.com>.
2003-04-01 Philippe De Muyter <phdm@macqel.be>
* sock.c, stream.c: Check #ifdef LINUX, not linux.
* file.c: Always provide sys_*attr, regardless of #ifdef XATTR_CREATE.
2003-03-30 Roland McGrath <roland@redhat.com>
* configure.ac, NEWS: Version 4.4.96.
* strace.spec, debian/changelog: 4.4.96-1.
2003-02-26 Stuart Menefy <stuart.menefy@st.com>
Various fixes for SuperH [SH]:
* mem.c (sys_old_mmap): mmap() parameters passed in registers
* net.c (sys_pipe), syscall.c (getrval2): pipe() results returned
in registers
* process.c (change_syscall): Fixed register which holds system
call number
* util.c (arg0_offset, arg1_offset): provide definition
* Makefile.am: Added new files in linux/sh
* linux/sh/syscallent.h: New file.
* linux/sh/errnoent.h: New file.
* linux/sh/ioctlent.h: New file.
* linux/sh/signalent.h: New file.
* linux/ioctlent.sh: Take an arg for location of header files
* syscallent.sh: Replaced lost $
2003-03-30 Roland McGrath <roland@redhat.com>
* time.c [LINUX]: Handle new Linux 2.5 clock/timer syscalls.
* linux/syscall.h, linux/syscallent.h, linux/dummy.h: Likewise.
From Ulrich Drepper <drepper@redhat.com>.
* linux/syscallent.h: Use sys_getrlimit for 191.
Use name "old_getrlimit" for 76.
Reported by Ulrich Drepper <drepper@redhat.com>.
2003-03-18 Roland McGrath <roland@redhat.com>
* process.c [LINUX] (sys_clone): Don't dereference parent_tid argument.
2003-03-17 Roland McGrath <roland@redhat.com>
* linux/x86_64/syscallent.h: clone takes 5 args.
* process.c [LINUX] (sys_clone) [X86_64]: Fix argument order.
2003-03-15 Roland McGrath <roland@redhat.com>
* linux/x86_64/syscallent.h: Add exit_group syscall at 231.
2003-03-14 Roland McGrath <roland@redhat.com>
* linux/x86_64/syscallent.h: Update and add many 2.5 syscalls.
* linux/ia64/syscallent.h: clone takes 5 arguments.
* process.c [LINUX && IA64] (ARG_*): Update for 2.5 clone calls.
2003-03-12 Roland McGrath <roland@redhat.com>
* linux/ia64/syscallent.h: Fix arg counts for clone and clone2.
Use sys_clone for clone2.
* linux/syscall.h: Don't declare sys_clone2.
* process.c (sys_clone): Rewritten to handle both flavors,
print all extra args depending on flag bits.
(sys_clone2): Function removed.
* linux/ia64/syscallent.h: Add a bunch of 2.5 syscalls.
2003-03-04 Roland McGrath <roland@redhat.com>
* syscall.c (get_scno) [IA64]: Do TCB_WAITEXECVE check only when
TCB_INSYSCALL is clear, like other platforms do.
2003-03-04 Ulrich Drepper <drepper@redhat.com>
* mem.c [LINUX] (sys_remap_file_pages): New function.
* linux/syscall.h: Declare it.
* linux/syscallent.h: Use it.
* linux/powerpc/syscallent.h: Likewise.
* process.c [LINUX] (sys_futex): Omit final if op is not FUTEX_WAIT.
2003-02-26 Roland McGrath <roland@redhat.com>
* configure.ac: Fix typo in netinet/in.h check.
Also include <sys/types.h> and <sys/socket.h> before <netinet/in.h>.
Reported by Alex Semenyaka <alexs@snark.rinet.ru>.
2003-02-24 Roland McGrath <roland@redhat.com>
* configure.ac, NEWS: Version 4.4.95.
* strace.spec, debian/changelog: 4.4.95-1.
* process.c (sys_getresgid): Fix typos in argument access.
2003-02-23 Roland McGrath <roland@redhat.com>
* process.c (sys_getresuid): Fix typos in argument access.
Reported by Anton Blanchard <anton@samba.org>.
2003-02-19 Roland McGrath <roland@redhat.com>
* configure.ac, NEWS: Version 4.4.94.
* strace.spec, debian/changelog: 4.4.94-1.
* version.c: Removed.
* Makefile.am (strace_SOURCES): Remove it.
* strace.c: Use PACKAGE_NAME and VERSION macros instead of version var.
FreeBSD rfork support changes from Russ Cox <rsc@plan9.bell-labs.com>:
* syscall.c (internal_syscall): Handle SYS_rfork with internal_fork.
* process.c (internal_fork) [SYS_rfork]: Bail if RFPROC flag not set.
2003-01-23 Roland McGrath <roland@redhat.com>
* signal.c: Reorder #ifdefs so HAVE_ASM_SIGCONTEXT_H doesn't matter on
SPARC, which doesn't use the header regardless.
* util.c [LINUX && SPARC]: Do renaming kludges around <asm/reg.h>
like signal.c does.
* linux/sparc/syscall.h: Declare sys_getdents64, sys_llseek.
* linux/dummy.h [! SYS_getpmsg] (sys_getpmsg): #define to printargs.
[! SYS_putpmsg] (sys_putpmsg): Likewise.
* process.c: Reorder includes to put sys/reg.h before linux/ptrace.h,
since they can conflict.
2003-01-21 Roland McGrath <roland@redhat.com>
* strace.c (usage): Omit -z, since it has never worked properly.
* NEWS: Likewise.
* strace.c (main): Grok new option `-E var=val' or `-E var' to put
var=val in environ or to remove var, respectively.
(usage): Mention it.
* strace.1, NEWS: Document it.
* configure.ac, NEWS: Version 4.4.93.
* strace.spec, debian/changelog: 4.4.93-1.
* strace.spec (Source0): Use strace-VERSION.tar.bz2 now.
2003-01-20 Roland McGrath <roland@redhat.com>
* defs.h [LINUX] [S390 || S390X] (TCB_WAITEXECVE): Define it.
* syscall.c (get_scno, syscall_fixup) [LINUX] [S390 || S390X]: Handle
TCB_WAITEXECVE state with special kludges.
* process.c [LINUX] (sys_clone) [S390 || S390X]: Argument order is
reversed from other architectures.
* process.c (sys_execve) [LINUX]: Make setting TCB_WAITEXECVE flag
conditional on [TCB_WAITEXECVE] instead of list of processors.
* util.c (restore_arg0): Evaluate args in no-op defns.
* util.c [S390 || S390X] (arg0_offset, arg1_offset): Fix definitions
for clone call on S390. From Michael Holzheu <holzheu@de.ibm.com>.
2003-01-17 Anton Blanchard <anton@samba.org>
* util.c [LINUX] (setbpt): Handle SYS_vfork like SYS_fork.
* linux/syscall.h (SYS_socket_subcall): 256 also for POWERPC.
2003-01-14 Roland McGrath <roland@redhat.com>
* linux/powerpc/errnoent.h: Add missing errnos.
* linux/powerpc/ioctlent.h: Update ioctl values.
From Anton Blanchard <anton@samba.org>.
* io.c [LINUX] (sys_pread, sys_pwrite): Fix last change.
From Anton Blanchard <anton@samba.org>.
* linux/hppa/syscallent.h: Use sys_getdents64, sys_truncate64,
sys_ftruncate64, instead of printargs, for those syscalls.
* linux/mips/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/syscall.h (SYS_socket_subcall): Only 256 for S390, S390X.
All others at the moment use linux/syscallent.h, where it's 300.
* strace.1: Update bug reporting info.
* resource.c [LINUX] (quotacmds): Grok new command encodings.
From Nathan Scott <nathans@debian.org>.
* configure.ac, NEWS: Version 4.4.92.
* strace.spec, debian/changelog: 4.4.92-1.
* configure.ac: Match powerpc* (includes powerpc64), and don't match
ppc (never comes out of config.sub).
* process.c (sys_ptrace): Use #lx format for address argument.
[POWERPC]: Use sizeof(unsigned long) in place of 4 for multipliers.
* process.c [POWERPC]: Likewise.
* signal.c (sys_sigreturn) [POWERPC]: Likewise.
* syscall.c (get_scno) [POWERPC]: Likewise.
* util.c [POWERPC]: Likewise.
(printnum): Use long for NUM.
From Anton Blanchard <anton@samba.org>.
* defs.h (ALIGN64): Fix defn for PPC, same as FreeBSD one.
* util.c [LINUX] (restore_arg0, restore_arg1): New macros, defined
appropriately via set_arg0 or no-ops for each architecture.
(clearbpt): Use those instead of set_arg0 and set_arg1.
* defs.h [_LARGEFILE64_SOURCE] (_LFS64_LARGEFILE): Define it.
* linux/syscallent.h: Use sys_getdents64, sys_truncate64,
sys_ftruncate64, instead of printargs, for those syscalls.
* process.c: Use <linux/ptrace.h> regardless of <sys/reg.h>.
(sys_ptrace): Use printxval.
(ptrace_cmds): Make PTRACE_GETREGS et al conditional on #ifdef PTRACE_*
instead of only #ifdef SUNOS4. Add PTRACE_[GS]ETFPXREGS.
* ipc.c (PRINTCTL): New macro. #ifdef IPC_64, factor out the flag and
print it before using printxval.
(sys_msgctl, sys_semctl, sys_shmctl): Use it.
2003-01-13 Roland McGrath <roland@redhat.com>
* config.guess: Update from ftp://ftp.gnu.org/pub/gnu/config/,
timestamp 2003-01-10.
* config.sub: Likewise, timestamp 2003-01-03.
* install-sh: Update from Automake 1.7.2.
* linux/powerpc/signalent.h: Add SIGRTMIN.
From Anton Blanchard <anton@samba.org>.
* linux/powerpc/syscallent.h: Add missing system calls.
Decode more system calls, we were just printargs for many things.
Remove some x86-specific system calls.
Remove two syscalls between the socket and ipc syscalls,
it was resulting in all IPC syscalls being off by two.
* ioctl.c (ioctl_decode) [POWERPC]: Decode term ioctls like Alpha.
From Anton Blanchard <anton@samba.org>.
* defs.h [POWERPC] (UESP, EIP, EAX, ORIG_EAX): Remove this cruft.
[LINUX && POWERPC && !__powerpc64__] (ALIGN64): New macro.
* io.c (sys_pread, sys_pwrite): Use ALIGN64.
From Anton Blanchard <anton@samba.org>.
* term.c [LINUX]: Get kernel definition of struct termios.
From Anton Blanchard <anton@samba.org>.
* linux/ioctlent.sh: Look in sound/ directory too.
From Anton Blanchard <anton@samba.org>.
* desc.c (printflock64): Fix ADDR argument type.
From Anton Blanchard <anton@samba.org>.
* strace.c [! HAVE_STRSIGNAL]: Clean up #ifdefs on decls for
sys_siglist and _sys_siglist.
Reported by John Hughes <john@Calva.COM>.
* net.c: HAVE_OPTHDR -> HAVE_STRUCT_OPTHDR
Reported by John Hughes <john@Calva.COM>.
* linux/syscall.h [ARM] (SYS_socket_subcall): Set to 300.
2003-01-10 Roland McGrath <roland@redhat.com>
* configure.ac, NEWS: Version 4.4.91.
* strace.spec, debian/changelog: 4.4.91-1
* util.c [LINUX && X86_64] (arg0_offset, arg1_offset): Use correct
values for x86-64, conditional on current_personality.
* strace.c (droptcb): Clear flags word before calling rebuild_pollv.
* configure.ac: Check struct T_conn_res for QUEUE_ptr or ACCEPTOR_id.
* stream.c (print_transport_message): Use #ifdefs for those members.
* strace.c (rebuild_pollv): Fix typo: struct poll -> struct pollfd.
* configure.ac: Fix siginfo_t/sig_atomic_t checks.
Use prerequisite #include <netinet/in.h> for netinet/*.h checks.
* strace.c (pfd2tcb): Fix for new tcbtab type.
(rebuild_pollv): Likewise.
(detach): Put variables used under [LINUX] inside #ifdef.
* process.c (change_syscall) [POWERPC]: Add missing return.
* util.c [POWERPC] (arg0_offset): Set to 4*PT_R3, not 4*PT_ORIG_R3.
* strace.spec: New file.
* debian/changelog: 4.4.90-1
* debian/rules (binary-arch): Depend on build.
(clean): Don't try to run Makefile.in.
* debian/control (Standards-Version): Now 3.5.8.
* configure.ac: Diddle CFLAGS after AC_PROG_CC, not before.
2003-01-09 Roland McGrath <roland@redhat.com>
* syscall.c (force_result) [S390 || S390X]: Fix typo.
* debian/control: Update Maintainer: field.
2003-01-08 Roland McGrath <roland@redhat.com>
* NEWS: Update for 4.4.90 test release.
Support for new Linux 2.5 thread features.
* defs.h [LINUX]: Define __NR_exit_group if not defined.
(struct tcb): New members nclone_threads, nclone_detached,
and nclone_waiting.
(TCB_CLONE_DETACHED, TCB_CLONE_THREAD, TCB_GROUP_EXITING): New macros.
(waiting_parent): Macro removed.
(pid2tcb): Declare it.
* process.c (internal_clone) [TCB_CLONE_THREAD]: Reparent the new
child to our parent if we are a CLONE_THREAD child ourselves.
Maintain TCB_CLONE_THREAD and TCB_CLONE_DETACHED flags and counts.
(internal_wait) [TCB_CLONE_THREAD]: Factor out detached children when
determining if we have any. If TCB_CLONE_THREAD is set, check
parent's children instead of our own, and bump nclone_waiting count.
(internal_exit) [__NR_exit_group]: Set the TCB_GROUP_EXITING flag if
the syscall was exit_group.
* syscall.c (internal_syscall): Use internal_exit for exit_group.
* strace.c (pid2tcb): No longer static.
(alloctcb) [TCB_CLONE_THREAD]: Initialize new fields.
(droptcb) [TCB_CLONE_THREAD]: Maintain new fields.
If we have thread children, set TCB_EXITING and don't clear the TCB.
(resume) [TCB_CLONE_THREAD]: Decrement parent's nclone_waiting.
(detach) [TCB_CLONE_THREAD]: When calling resume, check all thread
children of our parent that might be waiting for us too.
[TCB_GROUP_EXITING] (handle_group_exit): New function.
(trace) [TCB_GROUP_EXITING]: Use that in place of detach or droptcb.
Revamp -f support for Linux.
* util.c [LINUX] (setbpt, clearbpt): New implementations that tweak
the system call to be clone with CLONE_PTRACE set. Various new static
helper functions.
* process.c (internal_clone): Define also #ifdef SYS_clone2.
Initialize TCPCHILD->parent field.
[CLONE_PTRACE]: Don't do PTRACE_ATTACH here, because it's preattached.
Check in case the new child is in the tcb already.
(internal_fork) [LINUX]: Just call internal_clone.
* strace.c (trace) [LINUX]: Under -f/-F, grok an unknown pid
reporting to wait, put it in the TCB with TCB_ATTACHED|TCB_SUSPENDED.
* linux/x86_64/syscallent1.h (sys_oldlstat): #define as printargs.
* file.c [LINUX]: #undef st_[amc]time in case they are macros.
* Makefile.am (AM_CFLAGS): New variable, define to $(WARNFLAGS).
* Makefile.am (EXTRA_DIST): Remove debian/postinst and debian/prerm.
2003-01-09 Wichert Akkerman <wichert@deephackmode.org>
* debian/postinst, debian/prerm: removed, /usr/doc symlink is no
longer used
* debian/rules: no longer install postinst and prerm
* debian/control: do not end summary with full stop (lintian)
2002-12-30 Roland McGrath <roland@redhat.com>
* Makefile.am (bin_SCRIPTS): New variable, list strace-graph.
(EXTRA_DIST): Add missing files.
* configure.ac: Fix asm/sigcontext.h check to include prerequisite.
* syscall.c (qualify_one): New function.
(qual_options): Replace lookup field with qualify, update initializer.
(qualify): Update caller.
(qual_signal, qual_fault, qual_desc): Rewritten from lookup_*.
(qual_syscall): Rewritten lookup_syscall, match name more than once.
Fixes RH#70579, bites IA64 -efoo when foo exists on IA32.
* version.c (version): Make const, bump to 4.4.90.
* strace.c: Update decl.
* Makefile.am [LINUX && X86_64]: Remove cruft.
* linux/x86_64/errnoent1.h: New file.
* linux/x86_64/ioctlent1.h: New file.
* linux/x86_64/signalent1.h: New file.
* linux/x86_64/syscallent1.h: New file.
* linux/x86_64/i386-headers.diff: File removed.
* linux/x86_64/makeheaders.sh: File removed.
* linux/x86_64/Makefile.in: File removed.
* linux/syscallent.h [X86_64]: Disable sanity checks, subcall stuff is
already broken for 32-bit personality on x86-64.
2002-12-29 Roland McGrath <roland@redhat.com>
* configure.ac, Makefile.am: Punt subdirs, handle everything here.
* linux/Makefile.am: File removed.
* freebsd/Makefile.am: File removed.
* sunos4/Makefile.in: File removed.
* svr4/Makefile.in: File removed.
* linux/alpha/Makefile.in: File removed.
* linux/hppa/Makefile.in: File removed.
* linux/ia64/Makefile.in: File removed.
* linux/powerpc/Makefile.in: File removed.
* linux/s390/Makefile.in: File removed.
* linux/s390x/Makefile.in: File removed.
2002-12-26 Roland McGrath <roland@redhat.com>
* syscallent.sh: Grok three flavors of #define line, uniquify.
* linux/hppa/syscallent.sh: File removed.
* linux/powerpc/syscallent.sh: File removed.
* linux/Makefile.am: New file.
* linux/Makefile.in: File removed.
* freebsd/Makefile.am: New file.
* freebsd/i386/Makefile.am: New file.
* freebsd/i386/Makefile.in: File removed.
2002-12-22 Roland McGrath <roland@redhat.com>
Update to Autoconf 2.57, and Automakify with version 1.7.
* Makefile.am: New file.
* Makefile.in: File removed.
* configure.in: Moved to ...
* configure.ac: ... here. Update for Autoconf 2.5x and Automake.
* aclocal.m4: Moved to ...
* acinclude.m4: ... here. Update for Autoconf 2.5x.
* acconfig.h: File removed.
* AUTHORS: New file, makes automake happy.
* autogen.sh: File removed.
* README-CVS: Update to recommend autoreconf instead.
* file.c: HAVE_ST_* -> HAVE_STRUCT_STAT_ST_*.
* net.c: HAVE_SIN6_SCOPE_ID -> HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID,
HAVE_MSG_CONTROL -> HAVE_STRUCT_MSGHDR_MSG_CONTROL.
* strace.c: *_DECLARED -> HAVE_DECL_*
* stream.c: HAVE_* -> HAVE_STRUCT_*
* linux/Makefile.in (ioctldefs.h ioctls.h): Use $(SHELL) instead of
sh, and use $(srcdir) to find the script.
* linux/powerpc/Makefile.in (ioctlent.raw): Find ioctlent.sh in ../.
(ioctlsort.o): Use ../ioctlsort.c, not ../../ioctlsort.c.
* linux/x86_64/Makefile.in (headers): Renamed to all.
* linux/alpha/Makefile.in: Add empty install target.
* linux/x86_64/Makefile.in: Likewise.
* linux/powerpc/Makefile.in: Likewise.
* linux/Makefile.in: Likewise.
2002-12-26 Roland McGrath <roland@redhat.com>
* defs.h [LINUX && MIPS] (MAX_QUALS): Set to 5000, not 4999.
From Daniel Jacobowitz <drow@false.org>.
2002-12-21 Roland McGrath <roland@redhat.com>
* linux/syscallent.h: Add some new 2.5 syscall names.
Now clone takes 5 args.
* process.c [LINUX] (clone_flags): Update with 2.5 flag bits.
[LINUX] (sys_clone): Print new args.
* mem.c (print_ldt_entry): Make global.
* linux/syscall.h [I386 || IA64] (SYS_socket_subcall): Bump to 300 for
safety, since up to 260 are already used in 2.5 kernels.
* linux/syscallent.h: Update the table.
* linux/ia64/syscallent.h: Likewise.
* syscall.c (force_result): New function.
* process.c (internal_wait): Handle ECHILD exit from wait call with
WNOHANG flag set; force the return value to 0 in the inferior when it
has live children we are tracing.
* NEWS: Mention the bug fix.
2002-12-17 Roland McGrath <roland@redhat.com>
* linux/ia64/syscallent.h: Remove placeholders 275-298 to catch up
with linux/syscallent.h additions.
* strace.c (tcbtab): Make this a pointer to pointers, not an array.
(tcbtabsize): New variable.
(main): Initialize them using dynamic allocation.
(alloctcb, main): Use tcbtabsize in place of MAX_PROCS; indirect.
(pid2tcb, cleanup): Likewise.
[USE_PROCFS] (pollv): Make this a pointer, not an array; make static.
(rebuild_pollv): Dynamically allocate the vector.
* defs.h (tcbtab): Update decls.
(MAX_PROCS): Macro removed, no more static limit on this.
* process.c (fork_tcb): New function.
(internal_clone, internal_fork): Use it instead of checking nprocs.
* strace.c (detach) [LINUX]: Use __WALL (or a second try with __WCLONE)
in wait after sending SIGSTOP.
2002-12-16 Roland McGrath <roland@redhat.com>
* signal.c (sprintsigmask): Increase static buffer size to account for
worst possible case. Reported by Daniel Jacobowitz <drow@false.org>.
* process.c [LINUX] (wait4_options): Fix __WCLONE value. Add
__WNOTHREAD and __WALL.
* strace.c (trace) [LINUX]: Only check errno if wait4 actually fails,
so we don't repeat a wait and thus drop a status. Fixes RH#62591.
2002-12-15 Roland McGrath <roland@redhat.com>
* process.c (setarg) [POWERPC]: Support it.
* util.c [POWERPC] (LOOP): Fix value, now 0x48000000 (0: b 0b).
Old value was bogus, not even a proper instruction.
From Guy M. Streeter <streeter@redhat.com>.
* strace.c (main) [! USE_PROCFS]: Always reset SIGCHLD to SIG_DFL.
* configure.in: Don't check for putpmsg.
* stream.c (sys_getpmsg, sys_putpmsg): Make these conditional on
#ifdef SYS_*, rather than on HAVE_PUTPMSG.
* aclocal.m4 (AC_STAT64): Include <linux/types.h> before <asm/stat.h>
in test. Test our own #ifdef LINUX rather than predefined `linux'.
* linux/powerpc/syscallent.h: Use sys_llseek for _llseek.
* linux/sparc/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* syscall.c (syscall_enter) [LINUX && POWERPC]: Define PT_ORIG_R3 if
not defined, since <asm/ptrace.h> defines it only #ifdef __KERNEL__.
* process.c: Likewise.
* desc.c (sys_osf_select): Add missing return type.
* syscall.c (trace_syscall): Use strerror, not sys_errlist/sys_nerr.
* linux/ia64/syscallent.h: Remove macros for sys_delete_module,
sys_nanosleep, both already in linux/dummy.h.
* syscall.c (get_scno): Move static `currpers' inside #ifdef X86_64.
(trace_syscall): Fix return without value.
* linux/syscallent.h: Update table with names of new syscalls
io_setup, io_destroy, io_getvents, io_submit, io_cancel.
* linux/ia64/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* signal.c [LINUX && I386]: Provide SA_RESTORER constant if not
defined. If the bit is set, print the sa_restorer field of sigaction.
* mem.c: Add sys_{get,set}_thread_area.
* linux/syscall.h: Declare them.
* linux/syscallent.h: Update the table for these.
* linux/dummy.h (sys_modify_ldt): Define only #ifndef I386.
(sys_get_thread_area, sys_set_thread_area): New macros #ifndef I386.
* configure.in: Check for linux/xattr.h and linux/futex.h headers.
* linux/syscall.h: Add sys_* decls for new syscalls getpmsg, putpmsg,
readahead, sendfile64, setxattr, fsetxattr, getxattr, fgetxattr, int
listxattr, flistxattr, removexattr, fremovexattr, sched_setaffinity,
sched_getaffinity, futex.
* linux/syscallent.h: Update the table.
* io.c: Add sys_sendfile64.
* file.c: Add sys_readahead, sys_*xattr.
* process.c: Add sys_futex, sys_*affinity.
* linux/syscall.h (SYS_socket_subcall): Define to 256 on all machines.
(SYS_ipc_subcall): Always SYS_socket_subcall + SYS_socket_nsubcalls.
* linux/syscallent.h: Update the table for socket and ipc subcalls.
2002-11-09 Heiko Carstens <heiko.carstens@de.ibm.com>
Bugfix for s390/s390x:
* syscall.c: Fixed scno derivation for s390/s390x.
2002-11-06 Michal Ludvig <mludvig@suse.cz>
Merged patch from Steven J. Hill <sjhill@realitydiluted.com>
to allow the compilation of a native MIPS strace.
2002-11-06 Michal Ludvig <mludvig@suse.cz>
From Marty Leisner <leisner@rochester.rr.com>,
rewritten by mludvig:
* strace.c (not_failing_only): New.
(usage): Added -z switch description.
(main): Added -z switch parsing to not_failing_only variable.
* syscall.c (trace_syscall): Added not_failing_only handling.
2002-10-08 Heiko Carstens <heiko.carstens@de.ibm.com>
Missing complete changelog for 2002-10-07 commit:
* Makefile.in: Added linux/s390, linux/s390x to ALL_SUBDIRS.
* acconfig.h: New define for s390x.
* config.sub: Added missing define for s390 and new one for s390x.
* configure.in: Added new define for s390x.
* file.c: Added missing #undef dirent64 and new defines for s390x.
* linux/s390: New directory.
* linux/s390/Makefile.in: New file.
* linux/s390/errnoent.h: New file.
* linux/s390/ioctlent.h: New file.
* linux/s390/signalent.h: New file.
* linux/s390/syscallent.h: New file.
* linux/s390x: New directoy.
* linux/s390x/Makefile.in: New file.
* linux/s390x/errnoent.h: New file.
* linux/s390x/ioctlent.h: New file.
* linux/s390x/signalent.h: New file.
* linux/s390x/syscallent.h: New file.
* linux/syscall.h: Added sys_mincore() prototype and added new
s390x defines.
* process.c: Added s390x defines.
(change_syscall): Changed handling for s390.
(setarg): Added missing s390/s390x code in setarg().
* signal.c: Added s390x define.
(sys_sigreturn): Bugfix in s390/s390x code (wrong number of
arguments to sprintsigmask()).
* stream.c (internal_stream_ioctl): Changed int cast to long cast,
since printstr() expects a long.
* syscall.c (decode_subcall): Changed several variables to be long
instead of int to match 64 bit requirements. Added s390x defines.
(syscall_enter): Changed upeek() call to match s390 and s390x
requirements.
* util.c: Added s390x defines.
2002-10-07 Michal Ludvig <mludvig@suse.cz>
Merged s390x port by Heiko Carstens <Heiko.Carstens@de.ibm.com>
and bugfixes to s390 by D.J. Barrow.
2002-09-23 Michal Ludvig <mludvig@suse.cz>
Merged x86-64 port by Andi Kleen <ak@suse.de>
and Michal Ludvig <mludvig@suse.cz>
* Makefile.in: New target 'headers'. Failure ignored.
* acconfig.h: New defines for x86-64.
* configure.in: Ditto.
* defs.h: Ditto.
* file.c: Ditto.
* signal.c: Ditto.
* process.c: Added support for x86-64.
* util.c: Ditto.
* syscall.c: Ditto + added automatic personality switching.
* linux/syscall.h: Ditto.
* linux/x86_64: New directory.
* linux/x86_64/Makefile.in: New file.
* linux/x86_64/gentab.pl: Ditto.
* linux/x86_64/i386-headers.diff: Ditto.
* linux/x86_64/makeheaders.sh: Ditto.
* linux/x86_64/syscallent.h: Ditto.
* mem.c (print_mmap): Always print arg[4] as int.
2002-09-23 Michal Ludvig <mludvig@suse.cz>
* configure.in: Fix regular expressions.
* linux/syscall.h: Added missing braces in prototype of
sys_getdents64().
* file.c: Use '#ifdef LINUX' instead of '#ifdef linux'.
(struct fileflags): Made extern to inhibit compiation warnings.
(sys_getdents64): Merged LINUX and SVR4 part.
* syscall.c (get_scno): Split multiline string into two distinct
strings.
2002-05-24 John Hughes <john@calva.com>
* stream.h, net.h: Avoid possible infinite loop caused by
unsigned arithmetic in preceeding change.
2002-05-23 John Hughes <john@calva.com>
* acconfig.h: Add HAVE_OPTHDR and HAVE_T_OPTHDR defines.
* aclocal.m4: Add tests for struct opthdr in sys/socket.h and
struct t_opthdr in sys/tiuser.h, define HAVE_OPTHDR and HAVE_T_OPTHDR
if found.
* configure.in: use tests for struct opthdr and struct t_opthdr.
* defs.h: add new function print_sock_optmgmt.
* io.c: add hack that lets ioctl decode functions set auxilliary
string return.
* stream.c: better decoding for timod ioctls.
* net.c: add function print_sock_optmgmt, used by timod ioctl
decoding functions in stream.c.
2002-05-23 John Hughes <john@calva.com>
* acconfig.h: Make autoheader happy about Linux/SuperH
2002-05-23 John Hughes <john@calva.com>
* strace.c: Get rid of warning if not using POLL_HACK
2002-05-22 John Hughes <john@calva.com>
* net.c: Simplify {get,set}sockopt, decode SO_LINGER, cope with
options that are not just ints, cope with systems that don't
#define SOL_TCP and so on.
2002-05-21 John Hughes <john@calva.com>
* strace.c: Fix warning if POLL_HACK is used.
2002-05-17 John Hughes <john@calva.com>
* svr4/ioctlent.sh: Some defines on UW come with too many spaces.
2002-05-17 John Hughes <john@calva.com>
* svr4/ioctlent.sh: Cope with #defines wrapped in #ifdefs.
2002-05-17 John Hughes <john@calva.com>
* stream.c: tidy up output a little.
2002-05-17 John Hughes <john@calva.com>
* process.c, svr4/dummy.h, svr4/syscall.h: decode arguments
to procpriv syscall.
2002-05-01 Wichert Akkerman <wichert@deephackmode.org>
* configure.in, defs.h, process.c, sock.c, syscall.c, util.c: merge
patch from Greg Banks <gbanks@pocketpenguins.com> for Linux/SuperH
support
2002-04-01 Wichert Akkerman <wichert@deephackmode.org>
* strace.c: close tcp->outf in droptcb()
2002-04-01 Wichert Akkerman <wichert@deephackmode.org>
* net.c: decode packet options
2002-03-31 Wichert Akkerman <wichert@deephackmode.org>
* linux/{alpha,hppa,ia64,mips,powerpc,sparc}/syscallent.h: regenerated
2002-03-31 Wichert Akkerman <wichert@deephackmode.org>
* debian/*: added
* linux/syscallent.h: fix typo and add the reserved stream syscalls
* defs.h, file.c, io.c: fix signed/unsigned issues
* syscall.c: check for negative u_errors
* cvsbuild: renamed to autogen.sh
2001-12-17 Wichert Akkerman <wakkerma@debian.org>
* net.c: add new TCP socket options
2001-10-26 John Hughes <john@calva.com>
* svr4/ioctlent.sh: Cope with #define lines containing
comments that terminate on subsequent lines. Used to
comment out subsequent ioctls!
2001-10-25 Wichert Akkerman <wakkerma@debian.org>
* linux/ioctlent.h: regenerated using current scripts so
term ioctls are included
2001-10-19 John Hughes <john@Calva.COM>
* strace.c(proc_open): On SVR4 only trace the syscalls,
signals and faults we care about.
2001-10-18 John Hughes <john@Calva.COM>
* acconfig.h: Add HAS_SIGINFO_T.
* aclocal.m4: add check for siginfo_t in signal.h.
* configure.in: use check for siginfo_t.
* defs.h: if HAVE_SIGINFO_T the declare printsiginfo. On SVR4
allow access to siginfo when signal recieved.
* process.c: Remove SVR4 only version of printsiginfo.
* signal.c: merge SVR4 and LINUX versions of printsiginfo.
* strace.c: on SVR4 print siginfo when signal recieved.
2001-10-18 John Hughes <john@Calva.COM>
* system.c(sys_ssisys): handle return values for ssisys
2001-10-18 John Hughes <john@Calva.COM>
* signal.c: handle sigwait
* svr4/dummy.c: Move sigwait to done
* svr4/syscall.h: handle sigwait
2001-10-16 John Hughes <john@Calva.COM>
* system.c(sys_ssisys): decode some args for ssisys.
2001-10-16 John Hughes <john@Calva.COM>
* mem.c: MS_SYNC is zero, so must be first in xlat list.
* svr4/dummy.h: memcntl is much like mctl.
2001-10-16 John Hughes <john@Calva.COM>
* util.c (umovestr): UnixWare (svr4?) returns 0 when trying
to read unmapped page. Make it possible to strace ksh.
2001-10-03 David Mosberger <davidm@hpl.hp.com>
* process.c (internal_clone): Avoid race condition by clearing
breakpoint after attaching to child.
2001-10-02 David Mosberger <davidm@hpl.hp.com>
* linux/ia64/syscallent.h: Define ia32 syscall numbers (originally
by Don Dugger, with my refinements).
* linux/ia64/ioctlent.h: Regenerate and manually merge conflicting
ioctls (TCGETS & SNDCTL_TMR_TIMEBASE, etc.).
* linux/ia64/Makefile.in (ioctldefs.h ioctls.h): Update for
new ioctlent.h generation scheme.
* linux/syscall.h (sys_clone2): Declare.
[IA64] Define ia32 socket, ipc, and extra syscall numbers.
* linux/ioctlent.sh (regexp): Also handle <asm/ioctls.h> so we
don't miss the tty ioctls (unfortunately, some of the sound timer
ioctls are in conflict with them!).
* util.c (setbpt) [IA64]: Add ia32 support (by Don Dugger).
(clrbpt) [IA64]: Ditto.
* syscall.c (internal_syscall): Handle SYS_clone2, SYS32_wait4,
and SYS32_exit.
(get_scno): Get ia32 syscall number from r1 (orig eax) instead of
r8 (eax). Handle TCB_WAITEXECVE.
(syscall_fixup): Handle ia64.
(syscall_enter): Fix argument fetching for ia64.
* strace.c [IA64 && LINUX]: Include <asm/ptrace_offsets.h>.
(trace) [PT_GETSIGINFO]: Print signal address and pc if possible.
* process.c (tcp): New function.
(change_syscall): Add support for ia64 linux.
(sys_execve): Turn on TCB_WAITEXECVE for ia64 linux.
* desc.c (getlk): Cast l_len to "long long" to avoid warnings when
type is narrower.
* resource.c (sprintrlim64): Ditto.
* defs.h (TCB_WAITEXECVE) [IA64]: Define.
[IA64]: Declare "ia32" variable.
* bjm.c: Do not include <linux/module.h>. It's not safe to include
kernel headers. Declare the necessary constants and structures
directly instead.
2001-10-01 David Mosberger <davidm@hpl.hp.com>
* signal.c (parse_sigset_t): New function.
(sigishandled): Fix off-by-one bug by using parse_sigset_t() and
avoiding relying on internal layout of sigset_t datastructure.
2001-04-26 David Mosberger <davidm@hpl.hp.com>
* linux/ia64/syscallent.h: Add getunwind().
2001-04-11 David Mosberger <davidm@hpl.hp.com>
* syscall.c (syscall_enter): Use PT_RBS_END instead of deprecated
PT_AR_BSP. Pick up arguments starting with out0, which is not
always the same as r32 (e.g., consider inlined syscalls).
2001-09-28 John Hughes <john@Calva.COM>
* process.c: FreeBSD-CURRENT no longer has PT_READ_U, and anyway we
were showing it as PT_WRITE_U! Fix from Maxime Henrion.
2001-09-18 John Hughes <john@Calva.COM>
* net.c: fix display of sockaddr structures, sometimes too many "}",
sometimes too few. Fix suggested by Richard Kettlewell.
2001-08-19 Wichert Akkerman <wakkerma@debian.org>
* signal.c: do not include asm/sigcontext.h on IA64 since it gets
the struct from bits/sigcontext.h already which signal.h includes.
2001-08-03 Wichert Akkerman <wakkerma@debian.org>
* linux/ioctlent.sh: change regexps so we catch sound ioctls as well in
Linux
* linux/Makefile.in: fix a few things so the ioctl list is generated
properly
* ioctl.c: remember to shift ioctl masks as well
2001-08-03 Wichert Akkerman <wakkerma@debian.org>
* Linux/**/syscallent.h: synchronize section for fcntl and use sys_fcntl
for sys_fcntl as well
2001-08-03 Wichert Akkerman <wakkerma@debian.org>
* linux/hppa/syscallent.h: updated from Matthew Wilcox
2001-08-03 Wichert Akkerman <wakkerma@debian.org>
* process.c: seems Linux/IA64 changed register names on us, switch to
using new names.
2001-08-03 Wichert Akkerman <wakkerma@debian.org>
* strace.c: set CLOEXEC flag for outputfile
2001-08-03 Wichert Akkerman <wakkerma@debian.org>
* linux/sparc/syscall.h, linux/sparc/syscallent.h: add some LFS calls
2001-07-23 Wichert Akkerman <wakkerma@debian.org>
* configure.in: Support cross-compiling between architectures
2001-07-13 Wichert Akkerman <wakkerma@debian.org>
* configure.in: add S390 to architecture list
2001-07-10 John Hughes <john@Calva.COM>
* TODO, defs.h, io.h, net.c, strace.c, syscall.c, util.c: Merge fixes
from Richard Kettlewell <rkettlewell@zeus.com> which add I/O dumping
of args to readv/writev. Also gets rid of redundant printiovec
routine from net.c (duplicate of tprint_iov in util.c).
2001-07-02 Wichert Akkerman <wakkerma@debian.org>
* config.{guess,sub}: updated
2001-05-15 John Hughes <john@Calva.COM>
* signal.c: pass a pointer to sigmask to printsigmask from printcontext,
it was just passing the sigmask (ucp->uc_sigmask).
2001-05-15 John Hughes <john@Calva.COM>
* util.c: Don't run off the end of valid memory in umovestr when
USE_PROCFS. Important for FREEBSD systems (which seem to have an
unmapped page just after the args/env area).
2001-04-18 John Hughes <john@Calva.COM>
* configure.in: test for sys/nscsys.h, the non-stop clusters includes.
* process.c: handle rfork{1,all} and rexecve calls on non-stop clusters.
* syscall.c: treat rfork{1,all} and fork{1,all} as fork like calls.
Treat rexecve as an exec.
* system.c: decode arguments to ssisys call on nsc systems.
* svr4/dummy.h, svr4/syscall.h: now we handle rfork{1,all}, ssisys and
rexecve calls.
2001-04-12 Wichert Akkerman <wakkerma@debian.org>
* process.c: fix cast for powerpc code
* linux/powerpc/syscallent.h: update syscall list
* README: fix address for the strace mailinglist
* signal.c: switch to using /proc/<pid>/status on Linux so we can get
the realtime signals as well
2001-04-10 Wichert Akkerman <wakkerma@debian.org>
* Merge patches from Maciej W. Rozycki:
+ util.c: add code to print PC for MIPS
+ linux/mips/syscallent.h: updated
+ system.c: formating fixes for sys_sysmips
+ configure.in: test for yet more headers
+ stream.c: use configure-headertests instead of relying on OS hints
2001-04-07 Wichert Akkerman <wakkerma@debian.org>
* NEWS: start 4.3.1 items
* version.c: updated to say 4.3.1 (was still 4.2, oops!)
2001-04-07 Wichert Akkerman <wakkerma@debian.org>
* configure.in: test for asm/sysmips.h and linux/utsname.h
* linux/syscall.h: fix a typo for sys_sysmips
* system.c: include asm/sysmips.h and linux/utsname.h if they exist,
fix typo
2001-03-31 Wichert Akkerman <wakkerma@debian.org>
* linux/mips/ioctlent.h: updated using new Linux ioctl setup
2001-03-31 Wichert Akkerman <wakkerma@debian.org>
* linux/ia64/ioctlent.h: regenerated
2001-03-31 Wichert Akkerman <wakkerma@debian.org>
* linux/{alpha,ia64,powerpc}/ioctlent.sh: removed, all archs use the
general Linux ioctlent.sh
2001-03-31 Wichert Akkerman <wakkerma@debian.org>
* linux/ioctlent.sh: add dir variable for location of kernel headers
2001-03-29 Wichert Akkerman <wakkerma@debian.org>
* linux/ia64/ioctlent.h: updated using new Linux ioctl setup
2001-03-29 Wichert Akkerman <wakkerma@debian.org>
* linux/powerpc/ioctlent.h: updated using new Linux ioctl setup
2001-03-29 Wichert Akkerman <wakkerma@debian.org>
* linux/hppa/ioctlent.h: updated using new Linux ioctl setup
2001-03-29 Wichert Akkerman <wakkerma@debian.org>
* linux/alpha/ioctlent.h: updated using new Linux ioctl setup
2001-03-28 Wichert Akkerman <wakkerma@debian.org>
* configure.in: use sparc* so we can compile on sparc64 as well
* process.c, syscall.c: work around double define of fpq, fq and fpu
structs on Linux/sparc, and use regs instead of pt_regs
* don't use asm/sigcontext.h on Linux/sparc
2001-03-28 Wichert Akkerman <wakkerma@debian.org>
* linux/sparc/ioctlent.h: updated using new Linux ioctl setup
2001-03-28 Wichert Akkerman <wakkerma@debian.org>
* strace.c: use __WALL as wait4 flag if it exists so we can properly
trace threaded programs
2001-03-27 John Hughes <john@Calva.COM>
* aclocal.m4: add check for endianness of long long.
* acconfig.h: add #define for LITTLE_ENDIAN_LONG_LONG.
* configure.in: check for endianness of long long.
* defs.h: change LONG_LONG macro to work with either endianness of
long long.
2001-03-27 John Hughes <john@Calva.COM>
* net.c: Make compilable by SCO UDK compiler (doesn't like empty
initialisation list for array).
2001-03-27 John Hughes <john@Calva.COM>
* svr4/syscallent.h: ntp_adjtime entry was duplicated on Solaris
systems - bad merge of Harald Boehme's patch by me.
2001-03-27 Wichert Akkerman <wakkerma@debian.org>
* lots of files: add Linux/hppa support
2001-03-19 Wichert Akkerman <wakkerma@debian.org>
* linux/mips/syscallent.h: we can't have -1 nargs, change to 0
* linux/syscallent.h: not that syscalls 220 and 221 are used now
* config.guess: updated
2001-03-17 Wichert Akkerman <wakkerma@debian.org>
* linux/ioclsort.c: new file
* linux/ioctlent.sh: complete rewrite to use a more sane approach to get
the ioctl list that doesn't involve attempting to #include all kernel
headers
* linux/.cvsignore: added ioctdefs.h and ioctls.h which are generated
by the new ioctlent.sh
* ioctl.c: only look at the number and type bits for linux, since
ioctlent.sh no longer supplies the others
2001-03-08 John Hughes <john@Calva.COM>
* freebsd/syscalls.pl: On FreeBSD we must cope with COMPATibility syscalls,
pretend they have names ending with "?" so that -e trace=stat (for
example) will work.
* freebsd/i386/syscallent.h: add ? to compatability syscalls.
* freebsd/i386/syscall.h: consistency.
2001-03-08 John Hughes <john@Calva.COM>
* acconfig.h: add new ST_xxx defines.
* aclocal.m4: macros to check for more fields in struct stat.
* configure.in: use new macros to check for fields in struct stat.
* file.c: use new defines to replace #ifdef FREEBSD by #if HAVE_ST_xxx.
2001-03-08 John Hughes <john@Calva.COM>
* defs.h: rename wimpy get64 as powerful new LONG_LONG
* file.c: use LONG_LONG
* io.c: use LONG_LONG
* mem.c use LONG_LONG
2001-03-08 John Hughes <john@Calva.COM>
* acconfig.h: new #defines HAVE_LONG_LONG_OFF_T and HAVE_LONG_LONG_RLIM_T.
* aclocal.m4: routines to check for long long off_t and rlim_t.
* configure.in: check for long long off_t and rlim_t.
* desc.c: if HAVE_LONG_LONG_OFF_T treat flock as flock64
* file.c: if HAVE_LONG_LONG_OFF_T treat stat,lstat,fstat and lseek as 64
bit versions.
* io.c: if HAVE_LONG_LONG_OFF_T use 64 bit versions of pread and pwrite.
* mem.c: if HAVE_LONG_LONG_OFF_T use 64 bit version of mmap
* resource.c: if HAVE_LONG_LONG_OFF_T use 64 bit versions of getrlimit
and setrlimit.
* freebsd/syscalls.print: don't explicitly use 64 bit versions of calls,
now done automaticaly for us.
* freebsd/i386/syscall.h: ditto.
* freebsd/i386/syscallent.h ditto.
2001-03-07 John Hughes <john@Calva.COM>
* desc.c: On FreeBSD flock structure uses 64 bit offsets.
* file.c: On FreeBSD use stat64 and pals instead of stat.
* freebsd/syscalls.print: use stat64, lstat64 and fstat64.
* freebsd/i386/syscall.h: ditto.
* freebsd/i386/syscallent.h: ditto.
2001-03-07 John Hughes <john@Calva.COM>
* file.c: merge missing part of Harald Böhme's solaris patches,
was only declaring sys_{stat64,lstat64,fstat64} on linux!
2001-03-07 John Hughes <john@Calva.COM>
* svr4/dummy.h: fix multiple define warning on non LFS64 systems.
* svr4/syscallent.h: pread/pwrite are TF calls.
2001-03-07 John Hughes <john@Calva.COM>
* defs.h: add ALIGN64 macro to cope with FreeBSD's strange insistence
on alignment for off_t (64 bit) arguments. Also simplify get64 so
we don't need to know endianness of long long.
* file.c: FreeBSD now uses 64 bit versions of lseek, truncate,
ftruncate, allows reduction in numvber of horrid #if's
* io.c: FreeBSD now uses 64 bit versions of pread, pwrite.
* mem.c: FreeBSD now uses 64 bit version of mmap.
* freebsd/syscalls.print: use 64 bit versions of various syscalls.
* freebsd/i386/syscall.h: use 64 bit versions of various syscalls.
* freebsd/i386/syscallent.h: use 64 bit versions of various syscalls.
2001-03-06 John Hughes <john@Calva.COM>
* file.c: Implement truncate64 and ftruncate64
* svr4/dummy.h: add dummies for truncate64 and ftruncate64 for non
LFS64 systems.
* svr4/syscall.h: add declarations for truncate64 and ftruncate64.
2001-03-06 John Hughes <john@Calva.COM>
* freebsd/syscalls.pl: fix for FreeBSD 4.1 (new optional field in
syscall master file).
2001-03-06 John Hughes <john@Calva.COM>
* syscall.c: fix for FreeBSD 4.1 (SYS_semconfig has disappeared). Also
zap incorrect syscall subarg range check.
2001-03-06 John Hughes <john@Calva.COM>
* configure.in, defs.h, desc.c, file.c, io.c, mem.c, net.c, resource.c,
signal.c, syscall.c, svr4/dummy.h, svr4/syscall.h, svr4/syscallent.h:
merge Harald Böhme's solaris patches (_LFS64_LARGEFILE and kernel aio
mostly).
2001-03-06 John Hughes <john@Calva.COM>
* dummy.h: add unimplemented UW sycalls
* syscall.h: we can do settimeofday for UW, whopee!
* syscallent.h: fix unimplemented UW syscalls
2001-03-06 John Hughes <john@Calva.COM>
* aclocal.m4: look for pr_syscall in pr_lwp if we HAVE_MP_PROCFS
* defs.h: add PR_SYSCALL to allow use of pr_lwp.pr_syscall if it exists.
* syscall.c: use PR_SYSCALL instead of pr_syscall, fix up UnixWare code
so it doesn't try to use pr_sysarg.
2001-03-06 John Hughes <john@Calva.COM>
* aclocal.m4: on systems other than linux look for stat64 in sys/stat.h
* file.c: handle xstat version _STAT64_VER, aka stat64.
2001-03-06 John Hughes <john@Calva.COM>
* net.c: make sure SOL_ options are defined before using.
* signal.c: declare sigset variable, only used on linux, inside #ifdef.
2001-02-21 Wichert Akkerman <wakkerma@debian.org>
* net.c: fix format for printing Unix domain sockets
2001-02-19 Wichert Akkerman <wakkerma@debian.org>
* linux/mips/syscallent.h: use new sys_sysmips
* system.c: add sys_sysmips decoding
2001-02-16 Wichert Akkerman <wakkerma@debian.org>
* CREDITS: add Arkadiusz Miskiewicz <misiek@pld.org.pl> who
submitted the IP6 scope ID updates
* acconfig.h: add HAVE_SIN6_SCOPE_ID and HAVE_SIN6_SCOPE_ID_LINUX
* aclocal.m4: add AC_SIN6_SCOPE_ID to check if sin6_scope_id is
available
* configure.in: check for if_indextoname function and sin6_scope_id
* net.c: teach printsock about IP6 scope ids
2001-02-16 Wichert Akkerman <wakkerma@debian.org>
* configure.in: test for netinet/tcp.h and netinet/udp.h existance
* net.c: include netinet/tcp.h and netinet/udp.h if they exist
* Makefile.in: use @mandir@ and @bindir@
2000-11-26 Wichert Akkerman <wakkerma@debian.org>
* net.c: fix formating error in sys_setsockopt
* net.c: add list of socketlayers and use that for [gs]etsockopt
2000-10-12 Wichert Akkerman <wakkerma@debian.org>
* time.c: use sys/timex.h so things compile with 2.2 kernels
* stream.c: test if MSG_* constants are #defined
2000-09-03 Wichert Akkerman <wakkerma@debian.org>
* process.c: perform bpt trick for clone as well so we can get the
pid of the child before it starts doing something
* file.c: rename dirent64 struct to kernel_dirent64 so things compile
again with newer libcs
* test/clone.c: improve our testcase a bit
* Merge another patch from Gäel Roualland with FreeBSD updates
2000-09-01 Wichert Akkerman <wakkerma@debian.org>
* lots of files: merge patch from Gaël Roualland to add
support for FreeBSD.
2000-08-09 Wichert Akkerman <wakkerma@debian.org>
* file.c: update to reflect that st_ino suddenly became a long long
in the in Linux 2.4.0-test6
2000-08-09 Wichert Akkerman <wakkerma@debian.org>
* test/clone.c: minor fixup
* Another bunch of patches from John Hughes merged:
* signal.c:
+ SVR4 printcontext(): sigset_t != sigset_t*
+ getcontext returns a value, so print on exit of syscall
+ add UC_FP to ucontext_flags for OS writers that can't spell
+ sys_signal(): special case SIG_{ERR,DFL,IGN}
+ decode_subcall(): only do subcall range checking when needed
* bunch of UnixWare updates
* aclocal.m4, acconfig.h, configure.in: add test for long long type
2000-07-04 Wichert Akkerman <wakkerma@debian.org>
* net.c: add SOL_PACKET and SOL_RAW socket options, update
SOL_IP and SOL_TCP
2000-06-23 Wichert Akkerman <wakkerma@debian.org>
* strace.c: close outf before we exec a child process
2000-06-09 Ulrich Drepper <drepper@redhat.com>
* configure.in: Don't link against libnsl on Linux, it's unnecessary.
* defs.h (struct tcb): Make auxstr member const.
* file.c (fsmagic): And many more magic numbers.
* util.c: Don't include <linux/ptrace.h> for glibc 2.1 and up.
2000-04-26 Wichert Akkerman <wakkerma@debian.org>
* defs.h: balance #if/#endif again
* system.c: fix return statements in sys_capget()
* Merge updates from Topi Miettinen <Topi.Miettinen@nic.fi>:
+ file.c: add F_[SG]ETSIG to fcntl flags
+ strace.c: don't setre[gu]id if not needed
+ system.c: handle sys_reboot for Linux
+ term.c: add baudrate constants up to B4000000
+ linux/**/syscallent.h: note that munlockall has no arguments
2000-04-25 David Mosberger <davidm@hpl.hp.com>
* CREDITS: fix email address
* process.c: handle PR_[GS]ET_UNALIGN and PR_[GS]ET_KEEPCAPS
* signal.c: honour offset of sigconfig in sigframe structure for
Linux/ia64
* linux/ia64/syscallent.h: Add perfmonctl, pivotroot, mincore, and
madvise syscalls.
* syscall.c (syscall_enter): With Kevin's latest ptrace patches,
AR_BSP points to the _end_ of the active register frame, so we need
to adjust bsp by moving it back by the size of the active frame
before using it.
2000-04-24 Wichert Akkerman <wakkerma@debian.org>
* process.c: add sparc support to change_syscall
2000-04-22 Wichert Akkerman <wakkerma@debian.org>
* linux/mips/syscallent.h: fix some typos
2000-04-14 Wichert Akkerman <wakkerma@debian.org>
* linux/mips/syscallent.h: added names for SVR4, SYSV, BSD4.3 and POSIX
syscalls
2000-04-13 Wichert Akkerman <wakkerma@debian.org>
* defs.h: Linux/MIPS uses syscalls up to >4k, so set MAX_QUALS to
4999
2000-04-09 Wichert Akkerman <wakkerma@debian.org>
* README-linux: updated to note that strace might not compile
with development kernels
* bjm.c: sys_query_module: check if malloc succeeds
* system.c: sys_cap[gs]et(): check if malloc succeeds, only malloc once
* linux/syscallent.h: updated for 2.3.99pre3
* linux/alpha/syscallent.h: updated for 2.3.99pre3, add all osf syscalls
even though Linux doesn't implement them
* syscall.c: add global variables for MIPS registers as well
* syscall.c: move global variables to before get_scno since that uses them
* util.c: oops, misspelled defined
* process.c: fix ptrace calls in change_syscall
* mem.c: decode sys_madvise
* Merge patch from Topi Miettinen <Topi.Miettinen@nic.fi>
+ add support for quotactl, fdatasync, mlock, mlockall, munlockall & acct
+ small fix for RLIMIT_* and RUSAGE_BOTH
+ enhace support for capget and capset
2000-02-19 Wichert Akkerman <wakkerma@debian.org>
* test/vfork.c: new file to test vfork traces
* test/.cvsignore: new file
* defs.h: Up maximum number of traced processed to 64
* strace.c: Disable some debugging code from davidm
* implement setarg for more architectures
* implement change_syscall
1999-12-27 Morten Welinder <terra@diku.dk>
* syscall.c (lookup_signal, lookup_desc): isdigit requires an
_unsigned_ char parameter.
2000-02-14 Wichert Akkerman <wakkerma@debian.org>
* S390 updates
2000-02-03 Wichert Akkerman <wakkerma@debian.org>
* Merge Linux/ia64 patches
2000-01-02 Pavel Machek <pavel@ucw.cz>
* probe if sys/poll.h exists in configure + minor cleanups
* syscall.c: split trace_syscall into few pieces to make code readable
2000-01-21 Wichert Akkerman <wakkerma@debian.org>
* Release version 4.2 to get the current updates out and so
we can concentrate in finishing the clone support.
2000-01-11 Wichert Akkerman <wakkerma@debian.org>
* Add 1900 to tm_year in sprinttime
1999-12-24 Wichert Akkerman <wakkerma@debian.org>
* file.c: protect printstat64 with STAT64 instead of linux so we can
compile on Linux architectures that don't have it
* util.c: fix LOOP for ARM
Fri Dec 24 18:05:00 EST 1999
1999-12-23 Ulrich Drepper <drepper@cygnus.com>
* file.c: Use ugly libc_stat trick also for stat64.
Implement sys_stat64, sys_fstat64, sys_lstat64, and printstat64.
* process.c (internal_clone): Fix a few typos and add definitions to make
it at least compile.
* linux/syscall.h: Declare sys_stat64, sys_lstat64, and sys_fstat64.
* linux/syscallent.h: Define table entries for sys_stat64, sys_lstat64,
and sys_fstat64.
* aclocal.m4: Define AC_STAT64.
* acconfig.h: Define HAVE_STAT64.
* configure.in: Add AC_STAT64.
Thu Dec 23 15:01:37 CET 1999 Wichert Akkerman <wakkerma@debian.org>
* Merge patch from ftp://oss.software.ibm.com/linux390/ to add
support for Linux on the IBM S/390 architecture
* process.c: add internal_clone(), currently only shows the options
* syscall.c: use internal_clone to handle SYS_clone
Mon Dec 20 00:27:50 CET 1999 Wichert Akkerman <wakkerma@debian.org>
* Rewrite mmap-handling to support mmap2 on Linux
Tue Dec 14 11:35:16 CET 1999 Wichert Akkerman <wakkerma@debian.org>
* Note that Linux can handle sys_semop() as well
Tue Nov 30 11:05:26 CET 1999 Wichert Akkerman <wakkerma@debian.org>
* Include linux/in6.h for glibc2.0 and older
Mon Nov 29 16:33:04 CET 1999 Wichert Akkerman <wakkerma@debian.org>
* Merge patches from John Hughes to make configure support UnixWare
Sat Nov 27 21:38:17 CET 1999 Wichert Akkerman <wakkerma@debian.org>
* Enhance sys_query_module
Fri Nov 26 10:51:55 CET 1999 Wichert Akkerman <wakkerma@debian.org>
* Patches from John Hughes:
+ cosmectic fix in sys_getpmsg
+ allow net.c to compile on systems without AF_INET6
+ Only use long_to_sigset on Linux systems
+ UnixWare treats sigmask_t and sigmask_t* as the same thing
+ Add pollhack
+ Parse mount arguments for UnixWare
+ ACL fixes for UnixWare
Fri Nov 26 01:28:09 CET 1999 Wichert Akkerman <wakkerma@debian.org>
* Release 4.1 to get all the changes made out there
Thu Nov 18 18:04:04 CET 1999 Wichert Akkerman <wakkerma@debian.org>
* Merge stracefork from Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
+ Socket calls parsed better
+ bunch of alpha OSF syscalls added
+ Fix alpha 32/64 bit issues
Mon Nov 1 20:52:08 CET 1999 Wichert Akkerman <wakkerma@debian.org>
* Move Linux kernelmodule-functions from system.c to bjm.c and
remove duplicate for sys_create_module
* Linux MIPS updates:
+ Play with #ifdef's in net.c to get IPv6 right
+ Use printargs for vm86-syscall
Sun Oct 31 22:03:00 CET 1999 Wichert Akkerman <wakkerma@debian.org>
* Merge Linux mips patch from Florian Lohoff <flo@rfc822.org>
Mon Oct 11 00:36:25 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
* Merge patch from Keith Owens <kaos@ocs.com.au> to sys_query_module
and sys_delete_module correctly
Wed Oct 6 02:00:33 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
* Update cvsbuild to give a better error if autoconf isn't installed
* Add test for linux/ptrace.h to configure
* Since we define GNU_SOURCE in the Makefile we don't need to define
USE_GNU in file.c anymore
Fri Sep 10 04:35:16 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
* #define USE_GNU before including file.c so we get some extra O_* flags
Tue Aug 31 16:27:21 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
* Add missing } in IPv6 output
Tue Aug 31 01:23:08 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
* Update copyright for strace-graph to BSD to be consistent with
the rest of strace
Mon Aug 30 00:53:57 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
* Merge patch from Daniel Jacobowitz: KERN_JAVA_* and KERN_SECURELVL aren't
defined for all kernelversions
* Add strace-graph, written by Richard Braakman <dark@xs4all.nl>
Thu Aug 19 13:10:15 CEST 1999 Jakub Jelinek <jj@ultra.linux.cz>
* linux/sparc/syscall.h: Declare create_module/init_module.
* configure.in: Allow compilation in a different directory
than the source one.
* signal.c: Use asm/reg.h and struct regs instead of pt_regs
so that we don't depend on asm/ptrace.h which clashes with
glibc sys/ptrace.h.
* util.c: Likewise.
* syscall.c: Likewise.
Wed Aug 4 18:01:50 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
* Syscall 94 on Linux alpha is sys_poll
Sun Jul 25 14:38:33 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
* Merge in UnixWare patches from John Hughes <john@Calva.COM>
Thu Jul 15 23:00:32 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
* Merge patch from Maciej W. Rozycki <macro@ds2.pg.gda.pl>:
+ Correctly implement fix sys_createmodule (Linux)
+ Add limited handlig of sys_initmodule (Linux)
Tue Jul 13 17:07:50 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
* Add configure-test for sys/reg.h and use that
* Use sys/reg.h instead of asm/ptrace.h
Sat Jul 10 01:46:10 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
* Remove hack in signal.c for arm architecture
* Add hack so we compile correctly on powerpc
Fri Jul 9 02:28:16 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
* Add a corrected patch from Daniel Jacobowitz
Thu Jul 8 16:00:04 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
* Merge patch from Daniel Jacobowitz to allow us to use the kernel types
for the stat structure
Thu Jun 24 15:54:18 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
* Fix test for sys/reg include
Tue Jun 22 17:26:33 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
* Fixed some Linux/powerpc sillyness, thanks to Daniel Jacobowitz
* Fixed some SunOS compile problems earlier that I forgot to include
here
Mon Jun 14 12:44:25 CEST 1999
* Avoid leakint fd into child when forking, patch from
John Hughes <john@Calva.COM>
Fri Jun 11 14:54:47 CEST 1999
* Applied IRIX64 patch from Thomas E. Dickey <dickey@clark.net>
* Applied Solaris and manpage updates from Guy Harris <guy@netapp.com>
Wed Jun 9 14:48:49 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
* Brought syscall list for alpha up to date
Wed Jun 2 18:30:12 CEST 1999 Jakub Jelinek <jj@ultra.linux.cz>
* system.c: sys_umount2 syscall support.
* linux/sparc/errnoent.h: Update sparc-linux errnos.
* linux/sparc/syscall.h: Update used sparc-linux syscalls.
* linux/sparc/syscallent.h: Match 2.2.9 system calls.
* file.c: sparc-linux asm/stat.h uses dev_t etc. types,
so it needs strace's own copy of the stat structure.
* util.c: Make it compile on sparc-linux.
* strace.c: Fix strace -f and -ff operation on sparc-linux.
* signal.c: rt_sigaction has different arguments on sparc*-linux
and alpha-linux.
* syscall.c: Recognize sparc64-linux binaries.
Fri May 28 21:09:00 PST Ulrich Drepper <drepper@cygnus.com>
* configure.in: Fix typo (CFLAG -> CFLAGS).
* syscall.c: Don't include linux/ptrace.h explicitly for glibc.
Thu May 27 13:59:27 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
* Add some sysctl support, patch from Ulrich Drepper
Wed May 26 01:04:34 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
* Use kernel dirent structure for Linux
Sun May 9 02:18:30 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
* Merge in patches from Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+ some layout and other minor fixes
+ add some m68k-specific things to linux/syscallent.h. Note that m68k
is similar enough to i386 to not need it's own subdirectory
+ add support for sendfile and mremap syscalls for Linux
* Merge in patches from Sascha Schumann <sascha@schumann.2ns.de>
+ ioctls.h vs sys/ioctl.h on Alpha platform
+ pointer was casted to an int in stream.c
+ strsignal() needs -D_GNU_SOURCE in CFLAGS
+ several other casts changed
+ correct ARM/POWERPC architecture defines in acconfig.h
* Merge in patches from Morten Welinder <terra@diku.dk>
+ add some autoconf-tests for includefiles
+ handle solaris version of sigcontext struct (actually I hacked this
up again, but the idea is his :)
Sun Apr 18 22:32:42 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
* Update syscalls for linux alpha, patch from Bart Warmerdam
<bartw@debian.org>
* Update sparc code so it actually compiles
Fri Apr 16 02:18:05 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
* Add support for old_*stat functions for Linux. Please note you need
to use reasonably recent kernel headers to compile strace now.
* Change references to LINUX into linux in file.c
* Fix include for LDT in mem.c
Thu Apr 15 22:28:15 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
* Change in strace maintainership, jrs passed the torch to me.
* Use autoconf 2.13
* Incorporate all changes already made in the Debian strace package:
+ compiles with more Linux kernels
+ added support for more Linux architectures
+ add support for a lot of extra syscalls
+ fix some problems with hanging children
+ check stray syscall after execv
+ decode capget and capset arguments
+ add more constants to net.c
+ detect ROSE networking
+ add more protocol families to domains
+ add IPIP protocol
+ added MSG_PROXY and MSG_CTRUNC to msg_flags
+ added SO_BSDCOMPAT and SO_REUSEPORT to sockoptions
+ added IP, IPX and TCP-options
+ added IP, IPX and TCP support to get-/setsockopt()
+ added IPX support
+ updated handling of signals
Sun Oct 27 22:28:00 1996 J. Richard Sladkey <jrs@world.std.com>
* util.c (umovestr) [LINUX]: Handle Linux like SunOS4
instead of SVR4. That is, read a few bytes at a time
to avoid overrunning the end of the stack.
Fri May 31 01:48:49 1996 J. Richard Sladkey <jrs@world.std.com>
* version.c: Version 3.1 is released.
Thu May 23 01:04:43 1996 J. Richard Sladkey <jrs@world.std.com>
* aclocal.m4 (AC_DECL_SYS_ERRLIST): Try looking in stdio.h
as well since that's where glibc declares it. Go figure.
* signal.c (sys_sigreturn) [ALPHA]: Use sigcontext
instead of sigcontext_struct since glibc v5+ apparently
plays games with the native OS namespace.
From David Mosberger-Tang <davidm@AZStarNet.com>.
Mon May 20 23:17:14 1996 J. Richard Sladkey <jrs@world.std.com>
* version.c: Version 3.0.14 is released.
* aclocal.m4 (AC_STRUCT_MSG_CONTROL): New macro.
* configure.in: Add call to AC_STRUCT_MSG_CONTROL.
* net.c (printmsghdr): Handle BSD 4.3 and 4.4 msghdr members
differently.
Reported by Henrik Storner <storner@osiris.ping.dk>.
* configure.in: (AC_CHECK_{HEADERS,FUNCS}): Add checks for
sys/filio.h and sys/stream.h and remove check for poll.
* desc.c (decode_select, sys_select, sys_oldselect) [LINUX]:
Handle old and new styles of argument passing for select on Linux.
* ioctl.c, stream.c: Conditionalize stream code on presence of
sys/stream.h instead of poll because glibc implements poll but
not the rest of the stream interface.
* signal.c [LINUX]: Standardize on the name sigcontext_struct.
(sys_sigprocmask) [ALPHA]: Handle OSF flavor which is more like
sigsetmask.
* term.c (term_ioctl): Use _VMIN, if present, for TC{G,S}ETA*.
* util.c (umoven, umovestr): Move data in long-sized chunks
at a time, instead of hard coding it to be 4.
From David Mosberger-Tang <davidm@AZStarNet.com>.
Mon May 20 01:19:36 1996 J. Richard Sladkey <jrs@world.std.com>
* version.c: Version 3.0.13 is released.
* configure.in (AC_CHECK_HEADERS): Add check for asm/sigcontext.h.
* signal.c [HAVE_ASM_SIGCONTEXT_H]: Conditionally include
asm/sigcontext.h to define sigcontext_struct and don't define it
locally if the header is present.
* syscall.c (nerrnos{0,2}): Correct size computation.
* Makefile.in: Remove dependencies and rules relating to files
normally found in the os directory. Because of the new scheme we
don't know precisely where they come from. Sigh.
* signalent.sh: Make it work for sunos4, linux, and svr4.
* {sunos4,linux{,/alpha},svr4}/Makefile.in: Make rules correspond
to traditional make syntax. Add signalent.h to files which can
unconditionally be rebuilt. Prevent signalent.h from being
unconditionally being rebuilt since it's customized.
* {sunos4,linux{,/alpha},svr4}/{ioctlent,errnoent,signalent}.h:
Use versions built by {ioctlent,errnoent,signaltent}.sh.
* sunos4/ioctlent.sh: Work around sprintf troubles with SunOS
4.1.4 and gcc 2.7.2.
Sun May 19 17:14:09 1996 J. Richard Sladkey <jrs@world.std.com>
* configure.in, Makefile.in: Add OSARCH concept to finish
build support for the alpha.
* Makefile.in, linux/Makefile.in: Rewrite clean, distclean,
and maintainer-clean rules.
* defs.h, ioctlsort.c: Make ioctl code member unsigned.
* ioctl.c, ioctlsort.c (compare): Perform explicit checking
for less, greater, and equal since subtraction on two's
complement numbers isn't an order relation (it isn't transitive)!
* linux/Makefile.in: Add rules for the signalent.h file.
* linux/alpha/Makefile.in: New file.
Sun May 19 01:12:28 1996 J. Richard Sladkey <jrs@world.std.com>
* version.c: Version 3.0.12 is released.
* linux{,alpha}/ioctlent.sh: Tweak for recent kernels.
From Michael E Chastain <mec@duracef.shout.net>.
* defs.h (SUPPORTED_PERSONALITES, DEFAULT_PERSONALITY): New.
* syscall.c (set_personality): New.
* strace.c (main): Call set_personality.
* defs.h, syscall.c, ioctl.c, signal.c: Make sysent, errnoent,
ioctlent, and signalent indirect pointers and redirect them
based on personality.
* {sunos4,svr4,linux{,/alpha}}/signalent.h: New files.
Suggested by Tom Dyas <tdyas@eden.rutgers.edu>.
* util.c (upeek): Handle case where ptrace returns a long
and sizeof(long) != sizeof(int).
From Richard Henderson <richard@twiddle.tamu.edu>
Fri May 17 21:03:36 1996 J. Richard Sladkey <jrs@world.std.com>
* version.c: Version 3.0.11 is released.
* many files: Fix more printf warnings for other platforms.
* ipc.c (sys_msgrcv) [LINUX]: Conditionalize definition of ipc_wrapper.
* linux/dummy.h: Handle missing library support for {send,recv}msg.
Reported by Thomas Bogendoerfer <tsbogend@bigbug.franken.de>.
* linux/syscall.h (sys_utimes): Fix a typo in the declaration.
From Thomas Bogendoerfer <tsbogend@bigbug.franken.de>.
Fri May 17 00:50:06 1996 J. Richard Sladkey <jrs@world.std.com>
* version.c: Version 3.0.10 is released.
* Makfile.in: Add os/arch to includes so that a given arch
(like alpha) can override the native arch (like i386).
* configure.in: Check for sendmsg.
* net.c: Make sendmsg and recvmsg dependent on an autoconf
test. Reported by Michael E Chastain <mec@duracef.shout.net>.
* acconfig.h, configure.in: Detect the alpha.
* ioctl.c: Handle the alpha.
* defs.h: Make some members long for the alpha. Define
some register nicknames. Add support for WAITEXECVE.
* file.c [ALPHA]: Support the alpha for statfs. Add
osf_statfs and osf_fstatfs for the alpha. Make damn sure
major and minor results are suitable for passing to printf.
* signal.c, syscall.c: Support the alpha.
* process.c: Add alpha user offsets.
* most files: Use %l? for printf arguments since
most are now longs for the alpha.
* linux/alpha/{errnoent.h,ioctlent.{h,sh},syscallent.h}:
New for the alpha.
From Thomas Bogendoerfer <tsbogend@bigbug.franken.de>.
Wed May 15 00:29:37 1996 J. Richard Sladkey <jrs@world.std.com>
* version.c: Version 3.0.9 is released.
* config.in, config.sub, install-sh: Upgrade to autoconf 2.10.
* linux/dummy.h, linux/syscallent.h, linux/syscall.h: Add recent
Linux kernel version system calls.
Wed Mar 13 01:03:38 1996 J. Richard Sladkey <jrs@world.std.com>
* ipc.c [SUNOS4]: Add SunOS support for decoding IPC calls.
* syscall.c [SUNOS4]: Compile decode_subcall on SunOS and
decode IPC calls using it.
* sunos4/dummy.h: Alias sys_semop to printargs.
* sunos4/syscall.h: Add new pseudo syscalls for IPC.
* sunos4/syscallent.h: Include new subcalls for IPC.
From Matthias Pfaller <leo@dachau.marco.de>.
Tue Feb 13 22:08:25 1996 J. Richard Sladkey <jrs@world.std.com>
* version.c: Version 3.0.8 is released.
* time.c [LINUX]: Explicitly include linux/version.h.
* strace.c (main): Don't let them even *try* to
get strace to attach to itself since some systems
don't handle this case very gracefully.
Reported by David S. Miller <davem@caip.rutgers.edu>.
* Makefile.in (distclean): Fix it for subdirectories.
* sunos4/syscallent.h, svr4/syscallent.h: Fill in the new
sys_flags member for each defined system call.
Fri Dec 8 01:17:28 1995 Rick Sladkey <jrs@world.std.com>
* defs.h (TRACE_*): New flags to describe what class
of system call each system call is.
(sysent): Add sys_flags member.
* syscall.c (sysent): Define (and later undef) abbreviations
for the system call class flags.
(lookup_class): New function to translate strings to
system call class flags.
(qualify): Handle new system call class mechanism.
* linux/syscallent.h: Fill in the new sys_flags member
for each defined system call.
* defs.h (print_sock): Remove redundant and non-K&R C
compatible prototype. From Juergen Weigert
<jnweiger@immd4.informatik.uni-erlangen.de>.
Thu Dec 7 01:17:40 1995 Rick Sladkey <jrs@world.std.com>
* linux/ioctlent.sh: Tweak to improve ioctl accuracy.
From Michael E Chastain <mec@duracef.shout.net>.
* system.c (includes) [LINUX]: Add linux/nfs.h for recent
kernels. From Michael E Chastain <mec@duracef.shout.net>.
Wed Dec 6 21:52:28 1995 Rick Sladkey <jrs@world.std.com>
* file.c (sprintfstype): Enclose string result in double
quotes.
* time.c (sys_adjtimex) [LINUX]: Conditionalize
constantly evolving timex structure.
From Aaron Ucko <UCKO@VAX1.ROCKHURST.EDU>.
* defs.h, syscall.c, strace.c: Rename syscall to
trace_syscall and change prototype and all callers
because of broken Linux shared libraries.
From Aaron Ucko <UCKO@VAX1.ROCKHURST.EDU>.
* Makefile.in (clean): Check for a file with test -f not
test -d. From Aaron Ucko <UCKO@VAX1.ROCKHURST.EDU>.
Tue Sep 26 02:32:31 1995 Rick Sladkey <jrs@world.std.com>
* version.c: Version 3.0.7 is released.
* util.c (string_quote): Fix thinko which caused core
dumps for strings with quotes in them.
Reported by Marty Leisner <leisner@sdsp.mc.xerox.com>.
* linux/Makefile.in (errnoent.h rule): Grab all errno.h
files from /usr/include, not just the linux one.
From Michael E Chastain <mec@duracef.shout.net>.
* linux/errnoent.sh: Total rewrite to handle more ioctls with
fewer false positives on more kernel flavors.
From Michael E Chastain <mec@duracef.shout.net>.
Mon Sep 4 01:29:22 1995 Rick Sladkey <jrs@world.std.com>
* version.c: Version 3.0.6 is released.
* linux/dummy.h, linux/syscall.h, linux/syscallent.h: Add
sys_msync.
* mem.c (mctl_funcs, mctl_lockas, sys_mctl): Conditionalize
on MC_SYNC instead of HAVE_MCTL.
(mctl_sync): Conditionalize on MS_ASYNC instead of HAVE_MCTL.
(sys_msync): New function.
Sat Sep 2 12:06:04 1995 Rick Sladkey <jrs@world.std.com>
* linux/dummy.h, linux/syscall.h, linux/syscallent.h: Add
sys_flock and sys_getdents.
* desc.c (flockcmds, sys_flock): Conditionalize on LOCK_SH
not SUNOS4.
* file.c (sys_getdents): Define unconditionally and handle
LINUX case.
* strace.c (main): Disallow username option unless both real
and effective uids are root.
Wed Aug 30 01:29:58 1995 Rick Sladkey <jrs@world.std.com>
* strace.c (main): Ensure that run_uid and run_gid are
always set to something meaningful.
(main, newoutf) [!SVR4]: Swap real and effective uids while
opening any output files.
(main) [!SVR4]: Treat effective uid of root as a request
to handle suid binaries correctly using the real uid of
the invoking user.
Sat Aug 19 00:06:08 1995 Rick Sladkey <jrs@world.std.com>
* Makefile.in: Add `|| true' to clean rule because
although GNU make 3.74 uses `sh -c' to invoke commands
every other make in the world uses `sh -ec'.
* syscall.c (syscall) [SVR4, MIPS]: The fifth and subsequent
arguments appear to be stored on the stack, not in the
registers following A3 (empirical result).
* defs.h: Add prototype for printsock.
* svr4/dummy.h: Remove generic handling of sys_mount.
* system.c [SVR4, MIPS]: Include several system headers to cleanly
get access to SGI mount information.
(mount_flags, nfs_flags) [SVR4, MIPS]: New objects.
(sys_mount) [SVR4, MIPS]: New function.
(sys_mount) [SVR4, !MIPS]: New function.
Tue Jul 4 00:30:34 1995 Rick Sladkey <jrs@world.std.com>
* version.c: Version 3.0.5 is released.
* desc.c, resource.c, strace.c, syscall.c, time.c: Cast tv_sec and
tv_usec members to long when using printf.
* ipc.c: Omit define of __KERNEL__.
({MSG,SEM,SHM}_{STAT,INFO}): Explicitly define those things we
want which __KERNEL__ used to provide.
(sys_msgrcv): Change reference to ipc_kludge structure to
look-alike ipc_wrapper to avoid dependence on __KERNEL__.
mem.c (mmap_flags) [MAP_{GROWSDOWN,DENYWRITE,EXECUTABLE}]: Add
Linux specific options.
syscall.c: Use SYS_ERRLIST_DECLARED instead of guessing.
[E{RESTART{SYS,NO{INTR,HAND}},NOIOCTLCMD}]: Explicitly define
instead of depending of __KERNEL__.
term.c: Cast c_{i,o,c,l}flag to long when using printf.
Tue Jun 6 00:27:48 1995 Rick Sladkey <jrs@world.std.com>
* aclocal.m4 (AC_DECL_SYS_ERRLIST, AC_DECL__SYS_SIGLIST): New.
* configure.in: Call AC_DECL_SYS_ERRLIST, AC_DECL_SYS_SIGLIST,
and AC_DECL__SYS_SIGLIST.
* acconfig.h (SYS_ERRLIST_DECLARED): New.
* strace.c (strerror): Use SYS_ERRLIST_DECLARED.
(strsignal): Use SYS_SIGLIST_DECLARED.
net.c (sys_socket): Omit inadvertent surplus comma when
protocol family isn't PF_INET.
util.c (dumpstr): Fix incorrect printing of one too many
characters when the length is not an even multiple of 16 bytes.
Reported by Juergen Weigert
<jnweiger@immd4.informatik.uni-erlangen.de>.
Thu May 4 23:37:47 1995 Rick Sladkey <jrs@world.std.com>
* ioctl.c (compare): Change prototype to match POSIX qsort.
* signal.c (sigishandled) [SVR4]: Omit everything after return.
* strace.c (trace) [SVR4]: Break out of for loop instead of
returning when finished so final return statement is executed.
* syscall.c (internal_syscall): Add more SYS_wait* variations.
(syscall) [LINUX]: Correct typo which commented out the M68K
argument to ifdef.
* util.c (printstr): Cast unsigned char pointer argument
to char pointer in umovestr call.
(dumpstr): Likewise for umoven.
Wed May 3 01:10:56 1995 Rick Sladkey <jrs@world.std.com>
* version.c: Version 3.0.4 is released.
* signal.c (sys_sigblock): Move after the definition of
sys_sigsetmask that it calls to avoid an implicit declaration.
* stream.c (transport_user_options, transport_server_options):
Only needed if TI_BIND is defined.
* configure.in: Add -Wno-implicit to WARNFLAGS on SunOS 4.x.
* process.c (internal_fork) [SVR4]: Fix a typo that omitted
the tcp arguement from the call to exiting. Add getrval2
check so no fork processing is done in the child.
(printwaitn): Initialize exited so that its value is defined
for all flows of execution.
Tue May 2 22:39:42 1995 Rick Sladkey <jrs@world.std.com>
* linux/dummy.h: Add aliases for sysfs, personality, afs_syscall,
setfsuid, setfsgid, and _llseek syscalls.
* linux/syscall.h: Add prototypes for them.
* linux/syscallent.h: Add them to the syscall entries table.
* system.c (headers) [LINUX]: Include linux/unistd.h to get __NR_*
defines and conditionally include linux/personality.h if
__NR_personality is defined.
(personality_options) [LINUX]: New table.
(sys_personality) [LINUX]: New function.
Tue May 2 00:20:39 1995 Rick Sladkey <jrs@world.std.com>
* strace.c (trace) [!SVR4]: Change forever loop to one predicated
on the number of traced processes so that we can have untraced
children (e.g. via popen).
* strace (main) [!SVR4]: Call fake_execve to get the actual
exec and its arguments into the trace.
(environ): Declare it.
* process.c (fake_execve): New function.
(headers): Include sys/syscall.h to get SYS_* defines.
* process.c (sys_execv, sys_execve): Surround argument annotations
with C comment delimiters.
(printargv, printargc): The arg vector is an array of char pointers
not ints.
* strace.c (printleader): Also check for multiple -p arguments
when deciding whether to print the pid field.
* strace.c (strerror) [!HAVE_STRERROR]: New function.
* defs.h (strerror, strsignal): Add these prototypes if we provide
the functions.
* configure.in (AC_CHECK_FUNCS): Add strerror.
* strace.c (main, proc_poller): Add SIGPIPE to the list of caught
and blocked signals.
* strace.c (main): Add username option. Verify they are root before
letting them use it. Look up the ids in the password file. Set
them just before executing the program.
From Reuben Sumner <rasumner@undergrad.math.uwaterloo.ca>.
Sat Apr 29 00:09:56 1995 Rick Sladkey <jrs@world.std.com>
* version.c: Version 3.0.3 is released.
* system.c (mount_flags) [LINUX]: Omit duplicated MS_NOSUID entry.
From Reuben Sumner <rasumner@undergrad.math.uwaterloo.ca>.
* strace.c (outfname): Initialize to NULL.
(main): Defer output file processing until after arguments.
Allow either a pipe or a bang for command arguments.
Check if outfname is NULL instead of checking outf for stderr.
Reinitialize each startup TCB's outf to fix -p/-o ordering bug.
(droptcb): Reset close TCB's outf to NULL instead of stderr.
(tprintf): Avoid calling vfprintf if outf is NULL.
* strace.c (main): Use popen if -o argument begins with a pipe.
From Marty Leisner <leisner@sdsp.mc.xerox.com>.
* process.c (printstatus): Fix a typo where WIFSIGNALED was meant
but WIFSTOPPED was used.
* Makefile.in: Add an EXTRA_DEFS variable and use it in the .c.o
rule to prevent the comment from being untrue.
Fri Apr 28 22:01:56 1995 Rick Sladkey <jrs@world.std.com>
* strace.c (sys_exit): Move follow fork code to internal_exit.
(sys_fork): Move follow fork code to internal_fork.
(sys_execv, sys_execve): Move follow fork code to internal_exec.
(sys_waitpid, sys_wait4): Move follow fork code to internal_wait.
(vforking): Remove this static variable and check scno in
internal_fork instead.
(internal_exit, internal_fork, internal_exec, internal_wait): New
functions.
* defs.h: Add prototypes for the new internal_* functions.
* syscall.c (syscall): Move syscall entering trace qualifier check
and reprint checking after context decoding and precede them with
a call to internal_syscall. Precede syscall exiting trace
qualifier check with a call to internal_syscall.
(internal_syscall): New function.
* defs.h (struct tcb): Make scno signed.
* strace.c (syscall) Make u_error signed.
[LINUX, I386]: Avoid unsigned cast in eax check.
* syscall.c (sys_indir): Make i, scno, and nargs signed.
* desc.c (sys_select): Make cumlen unsigned
Mon Apr 24 23:52:47 1995 Rick Sladkey <jrs@world.std.com>
* net.c (socktypes): Add SOCK_PACKET.
Sun Apr 2 23:50:39 1995 Rick Sladkey <jrs@world.std.com>
* Makefile (clean): Check explicitly for a Makefile in subdirs
before running make in them.
Sun Mar 26 12:37:21 1995 Rick Sladkey <jrs@world.std.com>
* strace.c [MIPS] (proc_open): Conditionalize run on MIPS.
[MIPS] (detach): Initialize error for MIPS case.
(trace): Initialize ioctl_result and ioctl_errno for overly helpful
compilers.
* syscall.c (decode_subcall): Move variable i into conditionals
that use use it.
* system.c (syssgi_options): Conditionalize SGI_RECVLMSG and
SGI_SET_FPDEBUG that SGI decided to drop. I don't have the stomach
to change them all.
* term.c (term_ioctl): Force [c_[iocl]flags members to long before
printing since we don't know what the size of their type is.
* util.c [SVR4, MIPS] (umoven): Prevent MIPS from using pread even
if autoconf detects it since it seems to either not work or do
something else entirely on Irix 5.3.
Sun Mar 26 00:01:11 1995 Rick Sladkey <jrs@world.std.com>
* version.c: Version 3.0.2 is released.
* linux/dummy.h: Make sys_fchdir like sys_close instead of printargs
so that the file descriptor arg is decimal.
Sat Mar 25 22:50:13 1995 Rick Sladkey <jrs@world.std.com>
* net.c [LINUX] (protocols): Explicitly define all IPPROTO_* entries
because on Linux they are enumerators.
* system.c [LINUX] (mount_flags): Handle renaming of MS_SYNC to
MS_SYNCHRONOUS.
* util.c (printxval): When there is no translation, print the actual
number first and the the default value as a C comment.
* net.c (sys_send, sys_sendto, sys_sendmsg, sys_getsockopt,
sys_setsockopt): Change first argument from unsigned to signed to
cater to the frequent practice of calling system calls with a file
descriptor of -1.
* mem.c (sys_mmap): Likewise.
Sun Mar 19 13:53:52 1995 Rick Sladkey <jrs@world.std.com>
* signal.c [LINUX] (signalent): Handle old and new values of SIGIO.
Sun Dec 11 22:51:51 1994 Rick Sladkey <jrs@world.std.com>
* version.c: Version 3.0.1 is released.
* Makefile.in, configure.in, aclocal.m4: Changes for autoconf 2.0.
* config.guess, config.guess: Update from the FSF.
* install-sh: New from the FSF.
Mon Dec 5 20:51:29 1994 Rick Sladkey <jrs@world.std.com>
* Makefile.in: Add m68k arch.
* acconfig.h (M68K): Add m68k define.
* configure.in: Add detection of arch m68k.
* process.c [M68K] (struct_user_offsets): Support m68k registers and
offsets.
* signal.c [M68K] (sigcontext_struct): Support m68k sigcontext
structure.
[M68K] (sys_sigreturn): Support m68k sigreturn handling.
* syscall.c [M68K] (syscall): Support m68k syscall number register
and errno in d0 instead of eax.
* util.c [M68K] (getpc, printcall, setbpt, clearbpt): Support m68k
program counter in PT_PC instead of EIP.
[M68K] (LOOP): Support m68k loop instruction.
From Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
* mem.c [MAP_ANONYMOUS] (mmap_flags): Correct inadvertent reference
to MAP_FIXED instead of MAP_ANONYMOUS.
From Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
* signal.c [LINUX] (signalent): Signal 30 is now SIGPWR.
From Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
Mon Dec 5 01:05:46 1994 Rick Sladkey <jrs@world.std.com>
* defs.h (tprintf): Fix typo in non-gcc ansi prototype for tprintf.
Reported by Thanh Ma <tma@encore.com>.
* strace.c (cleanup): Send SIGCONT before SIGTERM because Linux
1.1.62 doesn't continue a traced child when the parent exits.
Reported by Matt Day <mday@artisoft.com>.
* system.c [LINUX]: Include netinet/in.h before arpa/inet.h.
* util.c (printstr): Fix longstanding bug in notating string
continuation.
* strace.c [SVR4] (proc_open): Specifically wait for the child the
child to go into the execve syscall to avoid spurious traces.
[LINUX] (detach): Conditionalize the status variable.
Sun Dec 4 23:21:42 1994 Rick Sladkey <jrs@world.std.com>
* Makefile.in: Add mips arch.
* acconfig.h (MIPS): Add mips define.
* configure.in: Add detection of opsys irix5 and arch mips. Check
for prctl function.
Check for sys/sysconfig.h header.
* defs.h (MAX_ARGS): Bump maximum syscall arguments from 8 to 32.
* file.c [SVR4]: Include sys/cred.h.
(access_flags): Update access flags for SGI.
(sprinttime): Change type of sprinttime argument from unsigned
long to time_t.
* process.c [HAVE_PRCTL]: Include sys/prctl.h.
[HAVE_PRCTL] (prctl_options, sys_prctl): New for SGI.
(printsiginfo): Conditionally compile SI_TIMER and SI_MESGQ.
Cast si_band member to long before printing.
* signal.c (sigact_flags): Add _SA_BSDCALL for SGI.
(sigprocmaskcmds): Add SIG_SETMASK32 for SGI.
* strace.c [SVR4] [MIPS]:
(foobar): New dummy signal handler.
(main): Install a dummy signal handler in the child before pausing
to work around an SGI bug in PRSABORT.
(proc_open): Send a interrupt to the child instead of aborting the
syscall which doesn't work on Irix5.2.
* svr4/dummy.h: Add new unfinished SGI syscalls
(e.g. sys_sysmp, sys_sginap, etc.). Handle some SGI syscalls like
existing calls (e.g. sys_ksigaction like sys_sigaction).
Printargs does the print thing for sys_sethostid.
* svr4/syscall.h: Declare all new SGI syscalls.
(SGI_KLUDGE): Define syscall table starting index to be 1 for SGI
and add it to all subcall entry points.
(SYS_pgrpsys_subcall, SYS_sigcall_subcall, SYS_context): Don't
decode as subcalls on MIPS. Instead, use the normal syscalls.
* svr4/syscallent.h [MIPS]: Lead syscall table with a dummy entry
since SGI syscall numbers are off by one.
[MIPS] (sys_pgrpsys): Rename to sys_setpgrp on SGI.
[MIPS] (sys_xenix): Rename to sys_syssgi on SGI.
[MIPS] (sys_sysmachine): Rename to sys_sysmips on SGI.
[MIPS]: Conditionalize SVR4 extension into SGI and Solaris classes.
* syscall.c (dumpio): Validate descriptor against MAX_QUALS.
[HAVE_PR_SYSCALL] (syscall): Conditionalize SYS_vfork.
[MIPS] (syscall): Add SGI section for decoding u_error and u_rval.
Add workaround for broken SGI pr_sysarg on syscall entry.
[SVR4] (syscall): Conditionalize subcall decoding for
SYS_ptrpsys_subcall, SYS_sigcall_subcall and SYS_context_subcall.
[SVR4] [MIPS] (getrval2): Handle SGI.
* syscallent.sh: Dork the sed line to be choosier about SYS_ lines.
* system.c [HAVE_SYSCONFIG_H]: Include sys/sysconfig.h.
[MIPS] (syssgi_options, sys_syssgi): New for SGI.
|